Get started by creating a transaction
Creating a transaction means assembling a transfer or contract call, submitting it for policy checks, and collecting the required signatures. The SDK helps you propose the transaction, tracks approvals, and executes once thresholds are met. This quickstart walks through getting accounts, selecting a policy, and creating a transaction proposal using the SDK.1) Install the SDK
Install@onchainden/mls-sdk-ts using your package manager of choice.
2) Set up the client and signer
Initialize the SDK client and the signer that will submit approvals. You’ll need an API key created by an admin in the Den dashboard, and your signer wallet must be added to the organization as a member to propose, sign, and execute transactions. See Setting up an API member for the full setup process.3) List accounts
Fetch available accounts so you can choose a transaction source.4) List policies
Load policies and select one that matches the transaction you want to create.5) Create a transaction proposal
Create a proposal with the selected account, policy, and transaction details.signatureData object with the initiator
signing payload. After the initiator signs, transaction responses use the same
signatureData object to expose the approve and reject payloads.
6) Sign as the initiator
Sign the initiator payload hash to authorize the transaction, then submit the ABI-encoded signer address and signature.MANUAL_APPROVAL policies, approvers then submit their approve or reject
signatures.
7) Execute once threshold is met
Execute the transaction after policy approvals are satisfied.executionStatus reflects its current state (for
example, "processing" while the on-chain submission is pending).
Production signing setups
TheprivateKeyToAccount example in this guide is for local development. Here are some example patterns you can use in production. See Signing keys to learn more.
Example patterns
Example patterns
Cloud KMSHSMEnvironment variable