Skip to main content

Recommended: JavaScript SDK with React Hooks

For new React apps, we recommend the JavaScript SDK with React Hooks (@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.
These actions run on your server using the decrypted delegated share and per‑wallet API key.

Use the delegated wallet

Once you decrypt and store the delegated materials, you can perform allowed actions scoped to that wallet.
Use the EVM helper to act on behalf of the user. walletApiKey comes from decrypting data.encryptedWalletApiKey; keyShare comes from decrypting data.encryptedDelegatedShare.
const { createDelegatedEvmWalletClient, delegatedSignMessage } = import('@dynamic-labs-wallet/node-evm');

const client = createDelegatedEvmWalletClient({
  environmentId,
  apiKey
});

const signature = await delegatedSignMessage(client, {
  walletId,
  walletApiKey,
  keyShare,
  message,
});

What's next?

Learn how revoking delegation works
Want to sponsor gas for delegated transactions from your server? See Sponsor Gas for Server Wallets (EVM).
Last modified on June 25, 2026