Skip to main content
You will configure a QRC-20 token, deploy it through approval-gated post-quantum signing, mint an initial supply, and verify the result.

Prerequisites

  • A Qustody tenant and an API key with tokens:create, tokens:deploy, and tokens:mint permissions.
  • A vault account with native currency for gas (vault_123 in the examples).
  • An approval policy attached to the vault that requires at least one approver for token operations.
  • A registered wallet whose post-quantum public key is held by the configured external signer.

Step 1 — Configure the token

POST /v1/tokens
Idempotency-Key: configure-eit-2026-04-27

{
  "standard": "QRC-20",
  "templateId": "tpl_qrc20_v1",
  "name": "Example Institutional Token",
  "symbol": "EIT",
  "decimals": 18,
  "initialSupply": "0",
  "supplyPolicy": {
    "mintable": true,
    "burnable": true,
    "maxSupply": "1000000000000000000000000"
  },
  "admin": {
    "vaultAccountId": "vault_123",
    "approvalPolicyId": "policy_456"
  },
  "network": "quantum-chain-testnet"
}
Response carries id: "token_abc123" and status: "DRAFT".

Step 2 — Estimate the deployment

POST /v1/tokens/token_abc123/deployment/estimate

{ "deployerWalletId": "wallet_xyz789", "constructorArgs": { "name": "Example Institutional Token", "symbol": "EIT", "decimals": 18, "initialSupply": "0" } }
Confirm the gas estimate and that checks.deployerHasFunds is true.

Step 3 — Request deployment

POST /v1/tokens/token_abc123/deploy
Idempotency-Key: deploy-eit-2026-04-27

{ "deployerWalletId": "wallet_xyz789", "constructorArgs": { "name": "Example Institutional Token", "symbol": "EIT", "decimals": 18, "initialSupply": "0" }, "feeStrategy": "MEDIUM" }
Response: status: "PENDING_AUTHORIZATION".

Step 4 — Approve

An approver user must call:
POST /v1/transactions/{transactionRequestId}/approve
The deployment continues through PENDING_SIGNATURE → SIGNED → BROADCASTING → CONFIRMING → COMPLETED.

Step 5 — Track deployment

Subscribe to token.deployed (or poll GET /v1/tokens/token_abc123/deployment). Once COMPLETED, you receive the on-chain contractAddress.

Step 6 — Mint initial supply

POST /v1/tokens/token_abc123/mint
Idempotency-Key: mint-eit-initial-2026-04-27

{
  "amount": "1000000000000000000000",
  "recipient": { "type": "vaultAccountId", "vaultAccountId": "vault_123" }
}
Approve, then wait for token.minted.

Step 7 — Verify balance

GET /v1/wallets/wallet_xyz789/balance?asset=token_abc123
You should see 1000000000000000000000 (1000 × 10^18 = 1000 EIT).

Common errors

ErrorLikely cause
TOKEN_STANDARD_NOT_SUPPORTEDMisspelled standard. Must be QRC-20.
POLICY_DENIEDApproval policy denies the deploy or mint.
TOKEN_SUPPLY_EXCEEDEDamount would push supply past maxSupply.
IDEMPOTENCY_CONFLICTSame Idempotency-Key with a different body.