SettleMint
Developer guidesRunbooks

Deploy and mint equity

Step-by-step guide for creating and minting equity 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)

Note: Your wallet address is available via DALP while signing up, or you can get it from Step 2. When creating the equity token (Step 4), you'll need to choose:

  • Equity class - Type of equity (e.g., COMMON_EQUITY for common stock, PREFERRED_EQUITY for preferred stock)
  • Equity category - Specific classification (e.g., VOTING_COMMON_STOCK for voting shares, DUAL_CLASS_SHARES for dual-class structures)
  • Optional ISIN - International Securities Identification Number if your shares are registered (e.g., "US0378331005")

You can use an empty array [] for initialModulePairs to start with basic compliance and configure modules later. To add collateral requirements, see Configure equity collateral.


Quick reference

StepWhatMethod
1Initialize ClientinitializeClient
2Get user infouserMe
3Grant system rolesGrant tokenManager role
4Create equity tokentokenCreate (type: "equity")
5Grant token rolestokenGrantRole
6Unpause tokentokenUnpause
7Mint sharestokenMint
8Verify holders and metadatatokenHolders

Equity token lifecycle flow

This diagram shows the complete equity token deployment and minting workflow:

Rendering diagram...

Equity-specific requirements:

  • Class and category – Choose from platform taxonomy (COMMON_EQUITY, PREFERRED_EQUITY, VOTING_COMMON_STOCK, etc.)
  • ISIN – Optional international securities identifier for registered shares
  • Decimals – Use 0 for whole-share cap table parity or 18 for fractional ownership
  • Identity registration – Recipients must have registered identities before minting
  • 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'

  // Step 4: Create equity token
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

    body: {
      type: "equity",
      name: "Series B Voting Shares",
      symbol: "SBVS",
      decimals: 18,
      countryCode: "840",
      priceCurrency: "USD",
      basePrice: "10.00",

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
    • complianceManager - Optional, if your compliance flow requires custom claim topics (Reg D vs. Reg S, KYC tiers, ROFR modules)
  2. Register identity:

    • CRITICAL: You must register your identity before minting equity 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 equity token

        verificationType: "PINCODE",
      },
    },
  });

  if ("transactionId" in equity) {
    console.log("Equity creation queued:", equity.transactionId);
    return;
  }
  const tokenAddress = equity.data.id;
  console.log("Equity 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",

Parameters:

  • type: Must be "equity"
  • name: Equity name (e.g., "Series B Voting Shares")
  • symbol: Equity symbol (e.g., "SBVS")
  • decimals: Use 0 for whole-share cap table parity (per the equity user guide) or 18 for fractionalized ownership
  • countryCode: ISO country code (840 = USA, 056 = Belgium, 276 = Germany)
  • priceCurrency: ISO currency code (e.g., "USD")
  • basePrice: Reference valuation per share using toBigDecimal("10", 18) = USD 10.00
  • class: One of the equityClasses values (COMMON_EQUITY, PREFERRED_EQUITY, SECTOR_INDUSTRY_EQUITY, etc.)
  • category: One of the equityCategories values (VOTING_COMMON_STOCK, DUAL_CLASS_SHARES, etc.)
  • uniqueIdentifier: Optional ISIN for reporting (omit for private or pre-ISIN rounds)
  • initialModulePairs: Compliance modules (empty array [] for basic setup)

Expected: Returns equity data with id (contract address)

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


Step 5: grant token roles

REQUIRED: Grant yourself supplyManagement (for minting) and emergency (for unpausing) roles on the equity 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.

        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });
  console.log("Roles granted");

  // Step 6: Unpause the equity
  await dalp.token.unpause({
    params: { tokenAddress },
    body: {
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },

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

Note: Add governance to the roles array if you plan to change compliance modules or ROFR settings via API.


Step 6: unpause the equity

New tokens start paused. Unpause to enable transfers:

  });
  console.log("Equity unpaused");

  // Step 7: Mint shares — 100 shares
  await dalp.token.mint({
    params: { tokenAddress },
    body: {
      recipients: [myWallet],
      amounts: [100_000_000_000_000_000_000n],
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },

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 shares

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.

  });
  console.log("Minted shares");

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

await main();

Parameters:

  • tokenAddress: Your equity contract address (in path)
  • recipients: Array of recipient wallet address(es) - must be verified in identity registry
  • amounts: Array of amounts using toBigDecimal("100", 18) = 100 shares

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 holders

Expected: Shows equity holders with their balances. You should see the recipient with the minted balance plus identity claims that include the price reference, share class, and any compliance metadata.


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'

  // Step 4: Create equity token
  const equity = await dalp.token.create({
    body: {
      type: "equity",
      name: "Series B Voting Shares",
      symbol: "SBVS",
      decimals: 18,
      countryCode: "840",
      priceCurrency: "USD",
      basePrice: "10.00",
      class: "COMMON_EQUITY",
      category: "VOTING_COMMON_STOCK",
      uniqueIdentifier: "US0378331005",
      initialModulePairs: [],
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });

  if ("transactionId" in equity) {
    console.log("Equity creation queued:", equity.transactionId);
    return;
  }
  const tokenAddress = equity.data.id;
  console.log("Equity 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 equity
  await dalp.token.unpause({
    params: { tokenAddress },
    body: {
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });
  console.log("Equity unpaused");

  // Step 7: Mint shares — 100 shares
  await dalp.token.mint({
    params: { tokenAddress },
    body: {
      recipients: [myWallet],
      amounts: [100_000_000_000_000_000_000n],
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });
  console.log("Minted shares");

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

await main();

Equity token with on-chain governance parameters

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 enum value" for class or category → Use values from the platform taxonomy (COMMON_EQUITY, PREFERRED_EQUITY, VOTING_COMMON_STOCK, etc.).

On this page