SettleMint
Developer guidesRunbooks

Create and mint a fund token

Use the DALP TypeScript client to create a fund token, assign the roles needed for supply operations, unpause the token, and mint units to a registered holder.

Use this how-to when you already operate a DALP environment and need to mint fund units to registered holders.

The creation request defines the token, its reference price, optional classification fields, and management-fee metadata. Supply operations and investor records stay separate from the creation payload.

Rendering diagram...

Prerequisites

Before you run the script, confirm that you have:

  • A DALP platform URL, such as https://your-platform.example.com.
  • A running DALP instance.
  • A DALP user account with a wallet and PINCODE set from Account → Wallet.
  • An API key for that account.
  • The admin system role if you need to grant tokenManager or register identities yourself.

Save your wallet address after login. You use it when registering identity, granting token roles, and minting fund units.

Quick reference

StepGoalMethod
1Create the clientcreateDalpClient
2Read the current user walletuser.me
3Prepare system access and identitytokenManager role and identity registration
4Create the fund tokentoken.create with type: "fund"
5Grant token rolestoken.grantRole
6Unpause the tokentoken.unpause
7Mint fund unitstoken.mint
8Check balancestoken.holders

Fund creation fields

The fund creation schema extends the base token fields with fund-specific pricing and metadata.

FieldRequiredPurpose
typeYesMust be "fund".
priceCurrencyYesFiat currency code for the fund unit reference price.
basePriceYesReference price per unit in priceCurrency, such as "100.00".
managementFeeBpsYesManagement fee in basis points. Valid range is 0 to 10,000.
classNoFund class value, such as LONG_SHORT_EQUITY, when classification is useful.
categoryNoFund category value, such as MULTI_STRATEGY, when classification is useful.
uniqueIdentifierNoISIN or other identifier used for reporting when the fund has one.
initialModulePairsYesCompliance modules to attach during creation. Use [] for a basic setup.

The creation payload models the token and its metadata. Keep underlying holdings, fee accruals, redemption terms, investor suitability evidence, and off-platform fund administration in the systems that own those records.

Step-by-step commands

Step 1: create the client

Create the generated DALP 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: read your wallet address

Call user.me and keep the returned wallet address for identity registration, token-role grants, and minting.

  // 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: prepare system access and identity

A fund issuer needs the tokenManager system role before creating tokens. The recipient wallet also needs an identity registry entry before minting.

If your account does not have admin, ask an administrator to grant tokenManager and register the wallet identity before you continue.

Step 4: create the fund token

Create the fund token with type: "fund". The example uses LONG_SHORT_EQUITY, MULTI_STRATEGY, a USD 100.00 reference price, and a 150 bps management fee.

  // Step 4: Create fund token
  const fund = await dalp.token.create({
    body: {
      type: "fund",
      name: "Global Growth Fund Class A",
      symbol: "GGFA",
      decimals: 18,
      countryCode: "056",
      priceCurrency: "USD",
      basePrice: "100.00",
      class: "LONG_SHORT_EQUITY",
      category: "MULTI_STRATEGY",
      managementFeeBps: 150,
      uniqueIdentifier: "BE0003796134",
      initialModulePairs: [],
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });

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

The response can be queued. If it returns token data directly, save fund.data.id as the token address for the remaining steps.

If the response returns transactionId, status, and statusUrl, poll transaction.status with that transactionId until the status is COMPLETED. The completed status response gives you the confirmed transaction hash.

After the queued create completes, call token.list and filter for the fund's unique symbol, uniqueIdentifier, or other creation fields from this step. Save the returned token id as the token address before you continue. Do not grant roles, unpause, or mint until the created fund token appears in the token read model.

Step 5: grant token roles

Grant the wallet the token roles needed for the next actions:

  • supplyManagement allows minting and redemption-related supply operations.
  • emergency allows the wallet to unpause the token.
  // 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");

Wait for the role-grant transactions to confirm before unpausing or minting. Add governance only if the wallet also needs to update valuation or redemption parameters through the API.

Step 6: unpause the fund

New tokens start paused. Unpause the fund token before you mint or transfer units.

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

Step 7: mint fund units

Mint only to wallets registered in the identity registry. The example mints 100 fund units to the current user's wallet.

  // Step 7: Mint fund units — 100 units
  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 fund units");

The mint request returns when the transaction has been submitted. If you receive RecipientNotVerified, register the recipient wallet with systemIdentityCreate and retry.

Step 8: verify holders

Read the holder list and confirm the minted unit balance before you continue with valuation, reporting, or fund administration.

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

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
  // Grant yourself 'tokenManager' and register your identity

  // Step 4: Create fund token
  const fund = await dalp.token.create({
    body: {
      type: "fund",
      name: "Global Growth Fund Class A",
      symbol: "GGFA",
      decimals: 18,
      countryCode: "056",
      priceCurrency: "USD",
      basePrice: "100.00",
      class: "LONG_SHORT_EQUITY",
      category: "MULTI_STRATEGY",
      managementFeeBps: 150,
      uniqueIdentifier: "BE0003796134",
      initialModulePairs: [],
      walletVerification: {
        secretVerificationCode: pincode,
        verificationType: "PINCODE",
      },
    },
  });

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

  // Step 7: Mint fund units — 100 units
  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 fund units");

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

await main();

Fund token with investment category and management fee metadata

Troubleshooting

Error or symptomFix
Authentication missingCheck the API key passed to createDalpClient.
PINCODE_INVALIDReset or re-enter PINCODE from Account → Wallet.
tokenManager requiredGrant the tokenManager system role. This requires admin access.
Basis points cannot exceed 10000Keep managementFeeBps between 0 and 10,000.
Invalid enum value for class or categoryUse values from the fund class and category enums, such as LONG_SHORT_EQUITY or MULTI_STRATEGY.
Token is pausedRun the unpause step after the emergency role grant has confirmed.
Permission denied during mintConfirm the wallet has the supplyManagement token role.
RecipientNotVerifiedRegister the recipient wallet in the identity registry with systemIdentityCreate.

On this page