SettleMint
Developer guidesRunbooks

Deploy and mint a deposit

Step-by-step guide for creating and minting deposit tokens using the DALP TypeScript client.

Prerequisites

Before running these commands, you need to:

  1. Platform URL - Know your DALP platform URL (e.g., https://your-platform.example.com)
  2. Deploy DALP - Have a running DALP instance (local or hosted)
  3. Sign up - Create a user account through the DALP UI with email/password
  4. Enable PINCODE - Set up PINCODE during onboarding. Manage it from Account → Wallet.
  5. Admin role - Your account must have admin role to grant system roles (Step 3)
  6. Deposit product design - Term structure, denomination asset, early withdrawal settings from the user guide
  7. Vault + denomination asset plan - Know the ERC-20 currency you will lock in DALP vaults (USDC, institutional stablecoin, etc.)

Note: Your wallet address is available via DALP while signing up, or you can get it from Step 2. You'll need your wallet address, deposit decimals that match the denomination asset (the user guide emphasizes matching decimals to avoid accounting drift), and priceCurrency (ISO currency code) and basePrice (string) for liability tracking dashboards.


Quick reference

StepWhatMethod
1Initialize ClientinitializeClient
2Get user infouserMe
3Grant system rolesGrant tokenManager role
4Create deposit tokentokenCreate (type: "deposit")
5Grant token rolestokenGrantRole
6UnpausetokenUnpause
7Mint deposit certificatestokenMint
8Verify holders/liabilitytokenHolders

Deposit token lifecycle flow

This diagram shows the complete deposit certificate deployment and minting workflow:

Rendering diagram...

Deposit-specific requirements:

  • Identity registration – Recipients must have registered identities before minting
  • Decimals alignment – Match token decimals to denomination asset to prevent accounting drift
  • Liability tracking – Configure priceCurrency and basePrice for dashboard integration
  • System roles – Requires tokenManager before creation
  • Token rolessupplyManagement for minting, emergency for unpausing

Step-by-step commands

Step 1: Initialize Client

Initialize the OpenAPI client with your platform URL and API key.

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)
Client helper implementation

The initializeClient helper configures the generated OpenAPI 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: check you're logged in


  // Step 4: Create deposit token
  const deposit = await dalp.token.create({
    body: {
      type: "deposit",
      name: "12M USD CD",
      symbol: "CD12",
      decimals: 18,

Save your wallet address - you'll need it!


Step 3: set up system roles

REQUIRED: Complete these steps to grant yourself the necessary system roles.

  1. Grant system roles:

    • tokenManager - Required to create tokens
    • claimPolicyManager or complianceManager - Optional, if you plan to automate collateral attestation or custom compliance
  2. Register identity:

    • CRITICAL: You must register your identity before minting deposit tokens. This is required by the ERC-3643 standard.
    • Use systemIdentityCreate to register your wallet address in the identity registry.
    • If minting to other recipients, they must also be registered before Step 7.

Note: Only users with admin role can grant system roles. If you don't have admin access, ask your system administrator to grant you the tokenManager role.


Step 4: create deposit token

      },
    },
  });

  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: {

Parameters:

  • type: Must be "deposit"
  • name: Deposit name (e.g., "12M USD CD")
  • symbol: Deposit symbol (e.g., "CD12")
  • decimals: Match the denomination asset decimals (guide section "Denomination asset selection")
  • countryCode: ISO country code (840 = USA, 056 = Belgium, 276 = Germany)
  • priceCurrency: ISO currency code (e.g., "USD")
  • basePrice: Fiat price per certificate using toBigDecimal("1", 18) = USD 1.00
  • initialModulePairs: Compliance modules (empty array [] for basic setup)

Expected: Returns deposit data with id (contract address)

SAVE THE CONTRACT ADDRESS from the response! You need it for Step 5.

Vault linking, denomination asset approvals, and early-withdrawal automation continue via the workflows described in the deposit user guide. This API guide covers contract deployment plus minting.


Step 5: grant token roles

REQUIRED: Grant yourself supplyManagement (for minting) and emergency (for unpausing) roles on the deposit contract.

Note: When you create a token, you automatically receive the admin role (which allows you to grant other roles) and the governance role. You must grant yourself supplyManagement and emergency roles before minting and unpausing.

      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,

Expected: The role grant transaction completes. Wait for transaction confirmation before proceeding to Step 6.


Step 6: unpause the deposit

New tokens start paused. Unpause to enable transfers:

      },
    },
  });
  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: {

Note: This step requires the emergency role from Step 5. Make sure Step 5 completed successfully and the transaction was confirmed before unpausing.


Step 7: mint deposit certificates

IMPORTANT: The recipient wallet address must be registered in the identity registry before minting. If you're minting to your own wallet, ensure your identity is registered (see Step 3). For other recipients, register them using systemIdentityCreate.

        verificationType: "PINCODE",
      },
    },
  });
  console.log("Minted deposit certificates");

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

await main();

Parameters:

  • tokenAddress: Your deposit contract address (in path)
  • recipients: Array of recipient wallet address(es) - must be verified in identity registry
  • amounts: Array of amounts using toBigDecimal("50000", 18) = 50,000 deposit certificates

Expected: Returns transaction hash.

Note: This step requires the supplyManagement role from Step 5. If you get "RecipientNotVerified" error, register the recipient wallet in the identity registry first using systemIdentityCreate.


Step 8: verify the mint

Expected: Shows deposit holders with their balances. Balances will line up with depositor positions shown in the Asset Management view; claims include the base price used by treasury dashboards.


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 } });
  console.log("Holders:", holders.data.token?.balances);
}

await main();

Tokenized deposits listing

Troubleshooting

"Authentication missing" → Check your API key in initializeClient.

"PINCODE_INVALID" → Reconfirm your PINCODE.

"USER_NOT_AUTHORIZED" / "tokenManager required" → Grant the tokenManager role (requires admin access).

"Permission denied" → Grant the required token roles (supplyManagement, emergency).

"Token is paused" → Make sure Step 6 (unpause) succeeded and you have emergency role.

"RecipientNotVerified" → The recipient wallet must be registered in the identity registry before minting. Register the recipient wallet using systemIdentityCreate.

"Invalid country code" → Provide a numeric ISO 3166-1 code (840, 056, 276, etc.).

Mismatched decimals vs. denomination asset → Align decimals with the ERC-20 you plan to lock in vaults as described in the deposit guide's "Denomination asset selection."

On this page