Documentation Index
Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
Use this file to discover all available pages before exploring further.
Spin up millions of secure, server-controlled wallets with battle-tested MPC infrastructure. Built for onchain automation, Dynamic Server Wallets let you trigger transactions, interact with contracts, and run complex flows—all without user involvement, and fully owned by your backend.
Find pricing for server wallets here.
Setup
Enable multiple embedded wallets per chain
Install desired Node SDKs
npm i @dynamic-labs-wallet/node-evm
npm i @dynamic-labs-wallet/node-svm
Create client with authenticateApiToken
Separate clients are needed for each chain.import { DynamicEvmWalletClient } from "@dynamic-labs-wallet/node-evm";
export const authenticatedEvmClient = async ({
authToken,
environmentId,
}: {
authToken: string;
environmentId: string;
}) => {
const client = new DynamicEvmWalletClient({
environmentId,
});
await client.authenticateApiToken(authToken);
return client;
};
Access MPC functionality by creating a new wallet account
import { ThresholdSignatureScheme } from '@dynamic-labs-wallet/node';
import { authenticatedEvmClient } from '<path-to-dynamic-authenticated-client>';
const AUTH_TOKEN = "your-auth-token";
const ENVIRONMENT_ID = "your-environment-id";
const evmClient = await authenticatedEvmClient({
authToken: AUTH_TOKEN,
environmentId: ENVIRONMENT_ID,
});
const thresholdSignatureScheme = ThresholdSignatureScheme.TWO_OF_TWO; // or TWO_OF_THREE
const password = "your-optional-password";
const onError = (error: Error) => {
// handle error
console.error(error);
};
const {
accountAddress,
rawPublicKey,
publicKeyHex,
externalServerKeyShares,
walletId,
} = await evmClient.createWalletAccount({
thresholdSignatureScheme,
password,
onError,
backUpToClientShareService: true, // Optional: backs up key shares to Dynamic's service (important-comment)
});
You can now use the accountAddress to sign messages, create transactions, and more. The walletId can be used to retrieve the wallet later.backUpToClientShareService is false by default, which means Dynamic will not store the key shares for you. You are responsible for securely storing the externalServerKeyShares returned by createWalletAccount. Losing these shares means losing access to the wallet. See Storage Best Practices for guidance on secure storage.Alternatively, set backUpToClientShareService: true to leverage Dynamic’s key share service, in which case you do not need to manage storage yourself.Example: Sign a message with the MPC wallet account
import { authenticatedEvmClient } from '<path-to-dynamic-authenticated-client>';
const AUTH_TOKEN = 'your-auth-token';
const ENVIRONMENT_ID = 'your-environment-id';
const evmClient = await authenticatedEvmClient({
authToken: AUTH_TOKEN,
environmentId: ENVIRONMENT_ID,
});
const message = 'Hello, world!';
const accountAddress = '0x1234567890123456789012345678901234567890';
const password = 'your-optional-password';
const serializedSignature = await evmClient.signMessage({
message,
accountAddress,
password,
});
Next Steps
You can find the full SDK reference for server wallets for each chain below: