SettleMint
Runbooks

Deploy and mint a deposit

Create a deposit token, handle queued creation responses, grant token roles, unpause it, and mint deposit certificates with the DALP TypeScript SDK.

Deposit issuance turns a deposit product into an ERC-3643-style asset workflow: create the token, handle a queued creation response when one is returned, assign the operating roles, unpause the contract, then mint deposit certificates to registered wallets.

Rendering diagram...

Prerequisites

Before running these commands, you need:

  1. Your DALP platform URL, such as https://your-platform.example.com
  2. An API key for the user that will create and operate the deposit token
  3. PINCODE set up during onboarding. Manage it from Account → Wallet.
  4. Admin access if you need to grant yourself system roles
  5. The tokenManager system role granted before creating the deposit token
  6. The issuer wallet and each recipient wallet registered in the identity registry before minting
  7. Deposit product terms: denomination asset, decimals, price currency, base price, term length, and any early withdrawal policy you need to operate outside this minting flow

Your wallet address is returned by dalp.user.me. Set decimals to match the denomination asset you plan to use for accounting, then provide priceCurrency and basePrice so treasury and liability views can value the certificates consistently.


Quick reference

StepWhatMethod
1Create SDK clientcreateDalpClient
2Get wallet addressdalp.user.me
3Grant system rolesGrant tokenManager role
4Create deposit tokendalp.token.create (type: "deposit")
5Grant token rolesdalp.token.grantRole
6Unpausedalp.token.unpause
7Mint deposit certificatesdalp.token.mint
8Verify holdersdalp.token.holders

Deposit token lifecycle flow

The minting flow is intentionally linear. Do not mint until the token exists, the required token roles are granted, and the recipient identity is registered.

Rendering diagram...

Deposit-specific requirements:

RequirementDetail
Identity registrationRegister the issuer wallet and recipient wallets in the identity registry. Unregistered recipients fail the mint.
Decimal matchSet token decimals to match the denomination asset you use for accounting.
Liability trackingSet priceCurrency and basePrice on creation for treasury and liability views.
System roleHold tokenManager to create the token.
Token rolesHold supplyManagement to mint and emergency to unpause.
Queued creationResolve a returned transactionId before granting token roles.

Step-by-step commands

Step 1: create the SDK client

Create the DALP SDK client with your platform URL and API key. Keep the PINCODE available for wallet verification on the write calls.

import { createDalpClient } from "@settlemint/dalp-sdk";

async function main() {
  // Step 1: Create the SDK client
  const dalp = createDalpClient({
    url: "https://your-platform.example.com",
    apiKey: "YOUR_API_KEY",
  });
  const pincode = "YOUR_PINCODE";
Client helper implementation

The shared client helper configures the generated DALP SDK client with your API key. Implementation:

import { createDalpClient } from "@settlemint/dalp-sdk";

// Create the SDK client — replace with your actual values
const dalp = createDalpClient({
  url: "https://your-platform.example.com",
  apiKey: "sm_dalp_xxxxxxxxxxxxxxxx",
});

// All methods are fully typed with auto-complete
const me = await dalp.user.me({});
console.log("Wallet:", me.data.wallet);

const tokens = await dalp.token.list({ query: {} });
console.log("Tokens:", tokens.data.length);

Step 2: get your wallet address

  // Step 2: Get your wallet address
  const me = await dalp.user.me({});
  const myWallet = me.data.wallet;
  if (!myWallet) {
    throw new Error("No wallet found. Create a wallet first via the DALP dashboard.");
  }
  console.log("Wallet:", myWallet);

Save your wallet address. You use it for identity registration, token role grants, and the first mint in this example.


Step 3: set up system roles

Complete the role and identity setup before calling dalp.token.create.

Grant the tokenManager system role. Optionally grant claimPolicyManager or complianceManager if you plan to automate collateral attestation or custom compliance. Only users with the admin role can grant system roles. If you do not have admin access, ask your system administrator.

Register your wallet address in the identity registry using dalp.system.identity.create. Do the same for any other recipient wallet you plan to mint to. An unregistered recipient causes the mint call to fail.


Step 4: create deposit token

  // Step 4: Create deposit token
  const deposit = await dalp.token.create({
    body: {
      type: "deposit",
      name: "12M USD CD",
      symbol: "CD12",
      decimals: 18,
      countryCode: "840",
      priceCurrency: "USD",
      basePrice: "1.00",
      initialModulePairs: [],
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });

  if ("transactionId" in deposit) {
    console.log("Deposit creation queued:", deposit.transactionId);
    return;
  }
  const tokenAddress = deposit.data.id;
  console.log("Deposit created:", tokenAddress);

Parameters:

  • type: Must be "deposit".
  • name: Deposit name, such as "12M USD CD".
  • symbol: Deposit symbol, such as "CD12".
  • decimals: Match the denomination asset decimals (see "Denomination asset selection" in the deposit guide).
  • countryCode: ISO country code (840 = USA, 056 = Belgium, 276 = Germany).
  • priceCurrency: ISO currency code, such as "USD".
  • basePrice: Fiat value per deposit token in the selected priceCurrency, such as "1.00".
  • termLengthDays: Optional term length in days.
  • interestRateBps: Optional annual interest rate in basis points.
  • earlyWithdrawalPenaltyBps: Optional early withdrawal penalty in basis points.
  • initialModulePairs: Compliance modules (empty array [] for basic setup).

In synchronous mode, the response includes deposit data with id, which is the token contract address. Save that address for the remaining steps.

If DALP returns transactionId instead, the deposit creation transaction has been queued. Poll dalp.transaction.status until the transaction completes. Then call dalp.token.list with supported filters such as name, symbol, and tokenType: "deposit". Save the matching token id before continuing with role grants, unpause, or minting.

The example script returns after logging the queued transaction ID. Production automation should resume the runbook only after it has resolved the deposit token address.

For vault linking, denomination asset approvals, early-withdrawal automation, and bank-owned reconciliation controls, use the deposit certificates guide. This API guide covers contract deployment and minting.


Step 5: grant token roles

Grant yourself supplyManagement for minting and emergency for unpausing the deposit contract.

When you create a token, you receive the token admin role and can grant additional token roles. Grant these roles before you try to unpause or mint.

  // Step 5: Grant token roles
  await dalp.token.grantRole({
    params: { tokenAddress },
    body: {
      accounts: [myWallet],
      role: "supplyManagement",
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });
  await dalp.token.grantRole({
    params: { tokenAddress },
    body: {
      accounts: [myWallet],
      role: "emergency",
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });

Both role grant transactions must complete. Wait for confirmation before Step 6.


Step 6: unpause the deposit

New tokens start paused. Unpause to enable transfers:

  // Step 6: Unpause the deposit
  await dalp.token.unpause({
    params: { tokenAddress },
    body: {
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });
  console.log("Deposit unpaused");

This step requires the emergency role from Step 5. Make sure both role grants are confirmed before unpausing.


Step 7: mint deposit certificates

Register each recipient wallet in the identity registry before minting. For your own wallet, complete Step 3 first. For another recipient, call dalp.system.identity.create before adding the address to recipients.

  // Step 7: Mint deposit certificates — 50,000 units
  // IMPORTANT: Recipient must be registered in identity registry
  await dalp.token.mint({
    params: { tokenAddress },
    body: {
      recipients: [myWallet],
      amounts: [50_000_000_000_000_000_000_000n],
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });
  console.log("Minted deposit certificates");

Parameters:

  • tokenAddress: Your deposit contract address (in path)
  • recipients: Array of recipient wallet addresses. Each must be registered in the identity registry.
  • amounts: Array of token-unit amounts. The example mints 50,000 certificates with 18 decimals.

This step requires the supplyManagement role from Step 5. The certificates appear in the holder list after the transaction is indexed. If DALP returns RecipientNotVerified, register that wallet with dalp.system.identity.create and retry the mint.


Step 8: verify the mint

  // Step 8: Verify holders
  const holders = await dalp.token.holders({ params: { tokenAddress }, query: { limit: 200 } });
  console.log("Holders:", holders.data);

The holder list shows the recipient and minted balance. Asset views use the same token supply and price fields to show depositor positions and liability values.


Full script

import { createDalpClient } from "@settlemint/dalp-sdk";

async function main() {
  // Step 1: Create the SDK client
  const dalp = createDalpClient({
    url: "https://your-platform.example.com",
    apiKey: "YOUR_API_KEY",
  });
  const pincode = "YOUR_PINCODE";

  // Step 2: Get your wallet address
  const me = await dalp.user.me({});
  const myWallet = me.data.wallet;
  if (!myWallet) {
    throw new Error("No wallet found. Create a wallet first via the DALP dashboard.");
  }
  console.log("Wallet:", myWallet);

  // Step 3: Set up system roles
  // Follow the Set Up Roles guide to:
  // - Grant yourself 'tokenManager' system role
  // - Register your identity (CRITICAL: required before minting)
  // See: /docs/developer-guides/runbooks/setup-roles

  // Step 4: Create deposit token
  const deposit = await dalp.token.create({
    body: {
      type: "deposit",
      name: "12M USD CD",
      symbol: "CD12",
      decimals: 18,
      countryCode: "840",
      priceCurrency: "USD",
      basePrice: "1.00",
      initialModulePairs: [],
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });

  if ("transactionId" in deposit) {
    console.log("Deposit creation queued:", deposit.transactionId);
    return;
  }
  const tokenAddress = deposit.data.id;
  console.log("Deposit created:", tokenAddress);

  // Step 5: Grant token roles
  await dalp.token.grantRole({
    params: { tokenAddress },
    body: {
      accounts: [myWallet],
      role: "supplyManagement",
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });
  await dalp.token.grantRole({
    params: { tokenAddress },
    body: {
      accounts: [myWallet],
      role: "emergency",
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });
  console.log("Roles granted");

  // Step 6: Unpause the deposit
  await dalp.token.unpause({
    params: { tokenAddress },
    body: {
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });
  console.log("Deposit unpaused");

  // Step 7: Mint deposit certificates — 50,000 units
  // IMPORTANT: Recipient must be registered in identity registry
  await dalp.token.mint({
    params: { tokenAddress },
    body: {
      recipients: [myWallet],
      amounts: [50_000_000_000_000_000_000_000n],
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });
  console.log("Minted deposit certificates");

  // Step 8: Verify holders
  const holders = await dalp.token.holders({ params: { tokenAddress }, query: { limit: 200 } });
  console.log("Holders:", holders.data);
}

await main();

Tokenized deposits listing

Troubleshooting

ErrorFix
Authentication missingCheck the API key passed to createDalpClient.
PINCODE_INVALIDReconfirm your PINCODE.
USER_NOT_AUTHORIZED / tokenManager requiredGrant the tokenManager role (requires admin access).
Permission deniedGrant the required token roles (supplyManagement, emergency).
Token is pausedConfirm Step 6 (unpause) succeeded and the account holds the emergency role.
RecipientNotVerifiedRegister the recipient wallet with dalp.system.identity.create, then retry the mint.
Queued token creationPoll dalp.transaction.status with the returned transactionId. Continue only after the queued operation completes and you have resolved the token address.
Invalid country codeProvide a numeric ISO 3166-1 code (840, 056, 276, etc.).
Mismatched decimals vs. denomination assetMatch decimals to the ERC-20 you plan to lock in vaults, as described in the deposit guide's "Denomination asset selection."

On this page