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#
| Parameter | Type | Required | Description |
|---|---|---|---|
schemaId | string | Yes | Identifier for the zkSBT schema being minted. |
recipientCommitment | string | Yes | Commitment representing the recipient’s zkAddress note. |
proof | string | Yes | Proof generated via zk_generateProof. |
expiry | number | Optional | Unix timestamp after which the credential is invalid. |
metadata | object | Optional | Encrypted metadata blob for off-chain reference. |
Returns#
| Field | Type | Description |
|---|---|---|
extrinsicHash | string | Hash of the submitted mint extrinsic. |
blockHash | string | Block that included the credential issuance. |
noteCommitment | string | The 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#
- Generate the proof client-side with
zk_generateProof. - Invoke
sbt_mintPrivatewith the proof and encrypted metadata. - Track the returned
extrinsicHashusingauthor_submitExtrinsicorchain_getBlockto confirm inclusion. - Notify the recipient to rescan their zkAddress wallet for the new credential note.
Errors#
| Code | Meaning | Fix |
|---|---|---|
-43001 | Issuer unauthorized | Ensure issuer keys are registered in the zkSBT pallet. |
-43002 | Proof invalid | Regenerate proof and confirm schema matches. |
-43003 | Recipient missing | Validate the recipient’s commitment before submission. |
Use state_getStorage to audit minted credentials and revocation state for ongoing compliance.