Skip to main content

sbt_mintPrivate

sbt_mintPrivate submits a zkSBT issuance transaction and handles proof attachment, issuer authorization, and note commitment updates in one call. It is tailored for credential programs that prefer RPC automation over direct extrinsic crafting.

Parameters#

ParameterTypeRequiredDescription
schemaIdstringYesIdentifier for the zkSBT schema being minted.
recipientCommitmentstringYesCommitment representing the recipient’s zkAddress note.
proofstringYesProof generated via zk_generateProof.
expirynumberOptionalUnix timestamp after which the credential is invalid.
metadataobjectOptionalEncrypted metadata blob for off-chain reference.

Returns#

FieldTypeDescription
extrinsicHashstringHash of the submitted mint extrinsic.
blockHashstringBlock that included the credential issuance.
noteCommitmentstringThe finalized commitment stored on-chain.

Request Example#

{
"jsonrpc": "2.0",
"method": "sbt_mintPrivate",
"params": [{
"schemaId": "zksbt:kyc-tier2",
"recipientCommitment": "0x6f36...",
"proof": "0x8f4c...",
"expiry": 1767225600,
"metadata": {
"encrypted_reference": "0x01ab..."
}
}],
"id": 11
}

Workflow#

  1. Generate the proof client-side with zk_generateProof.
  2. Invoke sbt_mintPrivate with the proof and encrypted metadata.
  3. Track the returned extrinsicHash using author_submitExtrinsic or chain_getBlock to confirm inclusion.
  4. Notify the recipient to rescan their zkAddress wallet for the new credential note.

Errors#

CodeMeaningFix
-43001Issuer unauthorizedEnsure issuer keys are registered in the zkSBT pallet.
-43002Proof invalidRegenerate proof and confirm schema matches.
-43003Recipient missingValidate the recipient’s commitment before submission.

Use state_getStorage to audit minted credentials and revocation state for ongoing compliance.