Deploy and mint a fund
Step-by-step guide for creating and minting fund tokens using the DALP TypeScript client.
Prerequisites
Before running these commands, you need to:
- Platform URL - Know your DALP platform URL (e.g.,
https://your-platform.example.com) - Deploy DALP - Have a running DALP instance (local or hosted)
- Sign up - Create a user account through the DALP UI with email/password
- Enable PINCODE - Set up PINCODE during onboarding. Manage it from Account → Wallet.
- Admin role - Your account must have
adminrole 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. You'll need it for Steps 3, 5, and 7.
Quick reference
| Step | What | Method |
|---|---|---|
| 1 | Initialize Client | initializeClient |
| 2 | Get user info | userMe |
| 3 | Grant system roles | Grant tokenManager role |
| 4 | Create fund token | tokenCreate (type: "fund") |
| 5 | Grant token roles | tokenGrantRole |
| 6 | Unpause token | tokenUnpause |
| 7 | Mint fund units | tokenMint |
| 8 | Verify balances & NAV claims | tokenHolders |
Fund token lifecycle flow
This diagram shows the complete fund token deployment and minting workflow:
Fund-specific requirements:
- Class and category – Choose from fund taxonomy (
LONG_SHORT_EQUITY,VENTURE_CAPITAL,MULTI_STRATEGY, etc.) - Management fee – Set
managementFeeBpsbetween 0 and 10,000 basis points (e.g., 150 = 1.5% annual) - NAV tracking – Configure
priceCurrencyandbasePricefor net asset value reporting - Identity registration – Recipients must have registered identities before minting
- System roles – Requires
tokenManagerbefore creation - Token roles –
supplyManagementfor minting/redemptions,emergencyfor 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
// Grant yourself 'tokenManager' and register your identity
// Step 4: Create fund tokenClient 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: "fund",
name: "Global Growth Fund Class A",
symbol: "GGFA",
decimals: 18,
countryCode: "056",
priceCurrency: "USD",
basePrice: "100.00",Save your wallet address - you'll need it!
Step 3: set up system roles
REQUIRED: Grant yourself the tokenManager system role to create tokens.
-
Grant system roles:
tokenManager- Required to create tokens
-
Register identity: REQUIRED before minting
- Use
systemIdentityCreateto register your wallet address in the identity registry.
- Use
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 and register your identity.
Step 4: Create fund token
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: {Note: Ensure you have the tokenManager system role from Step 3.
Parameters:
type: Must be"fund"name: Fund name (e.g., "Global Growth Fund Class A")symbol: Fund symbol (e.g., "GGFA")decimals: Use18for fractional units (recommended) or0for whole units onlycountryCode: ISO country code (840 = USA, 056 = Belgium, 276 = Germany)priceCurrency: ISO currency code (e.g., "USD")basePrice: Reference NAV per unit usingtoBigDecimal("100", 18)= USD 100.00class: One of thefundClassesvalues (LONG_SHORT_EQUITY,ABSOLUTE_RETURN,REGIONAL, etc.)category: One of thefundCategoriesvalues (MULTI_STRATEGY,VENTURE_CAPITAL,EQUITY_HEDGE, etc.)managementFeeBps: Management fee in basis points (0-10,000).150= 1.5% annual feeuniqueIdentifier: Optional ISIN for reporting (omit for private or unregistered funds)initialModulePairs: Compliance modules (empty array[]for basic setup)
Expected: Returns fund 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/redemptions) and emergency (for unpausing) roles on the fund 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.
verificationType: "PINCODE",
},
},
});
console.log("Roles granted");
// Step 6: Unpause the fund
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 update valuation or redemption parameters via API.
Step 6: Unpause the fund
New tokens start paused. Unpause to enable transfers:
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",
},
},Expected: Transaction completes and fund is unpaused.
Step 7: Mint fund units
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 fund units");
// Step 8: Verify holders
const holders = await dalp.token.holders({ params: { tokenAddress } });
console.log("Holders:", holders.data.token?.balances);
}
await main();Parameters:
tokenAddress: Your fund contract address (in path)recipients: Array of recipient wallet address(es) - must be verified in identity registryamounts: Array of amounts usingtoBigDecimal("100", 18)= 100 units
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 fund holders with their balances. You should see the recipient with the minted balance plus identity claims (NAV, management fee, optional ISIN), mirroring the dashboard view.
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 } });
console.log("Holders:", holders.data.token?.balances);
}
await main();
Troubleshooting
- "Authentication missing" → Check your API key in
initializeClient. - "PINCODE_INVALID" → Reset or re-enter PINCODE from Account → Wallet.
- "tokenManager required" → Grant the
tokenManagerrole (requires admin access). - "Basis points cannot exceed 10000" → Keep
managementFeeBpsbetween 0 and 10,000. - "Invalid enum value" for class/category → Use values from
fundClasses/fundCategories(e.g.,LONG_SHORT_EQUITY,VENTURE_CAPITAL). - "Token is paused" → Run Step 6 and ensure
emergencyrole is assigned. Wait for transaction confirmation after granting roles. - "Permission denied" during mint → Confirm
supplyManagementrole from Step 5. - "RecipientNotVerified" → Register the recipient wallet in the identity registry using
systemIdentityCreate.