Skip to content
Creates a new attestation under a specific credential and schema. This instruction allows authorized signers to create attestations that contain verified data and have a defined expiration time.

​Parameters

ParameterTypeDescription
payerTransactionSignerThe account that will pay for the transaction
authorityTransactionSignerThe authorized signer of the credential
credentialAddressThe credential account associated with the schema
schemaAddressThe schema account that defines the attestation structure
attestationAddressThe attestation account to create
systemProgramAddressThe System Program account (defaults to ‘11111111111111111111111111111111’)
nonceAddressA unique identifier for the attestation
dataUint8ArrayThe attestation data that must conform to the schema
expirynumber | bigintThe expiration timestamp for the attestation

​Returns

Returns an Instruction ({ accounts, data, programAddress }). Add it to a transaction and send it with your client, for example client.sendTransaction(instruction). There is no sendAndConfirm() method. Create a Client sets up client, payerSigner, and authoritySigner.

​Example

​Important Notes

  • Only authorized signers of the credential can create attestations
  • The authority must be a signer of the transaction
  • The payer must be a signer of the transaction
  • The attestation account must be writable
  • The credential and schema accounts must be readable
  • This operation requires the System Program for rent exemption calculations
  • The schema must not be paused
  • The data must conform to the schema’s structure and validation rules
  • The nonce must be unique for each attestation
  • The expiry timestamp must be in the future
  • The attestation will be invalid after the expiry timestamp
  • The credential must be associated with the schema