TSS-MPC Embedded Wallets

The TSS-MPC implementation is currently in beta testing. We may introduce significant changes that could impact wallet functionality. Do not store any assets you cannot afford to lose.

Overview

This version of Dynamic TSS-MPC supports 2/2 and 2/3 threshold signature schemes. This guide works for both React and React Native implementations. Server wallets are accessible through our node SDKs. Headless documentation will be provided in future updates.

Future releases will provide additional key share storage flexibility, including independent hosting of backup shares.

Supported Chains

  • EVM
  • Solana
  • Sui

Breaking changes may occur in future updates.

Known Limitations

The following features are currently not supported but will be included in subsequent releases:

  1. Low-Level Access to Signers for chains other than EVM and SVM and Sui
  2. Pre-Generated wallets

Getting Started

1. Share Environment ID

Do not mix this environment with an existing environment containing V2 or V1 wallets.

2. Request Feature Access

Share your Environment ID with the Dynamic team to enable TSS-MPC via a feature flag.

3. Enable Embedded Wallets V3

Navigate to the Dynamic Dashboard > Developers, Enabled Embedded Wallets and set the default wallet version to V3.

4. Set up your SDK

You must be on react sdk v4.20.0 and later versions.

You must also whitelist the dynamic auth URL for the iframe connection to work. Here’s how:

1. In an HTTP header (e.g., Express.js):

res.setHeader("Content-Security-Policy", "frame-src https://app.dynamicauth.com 'self';");

⚠️ If you’re already setting CSP, append https://app.dynamicauth.com to the existing frame-src list rather than replacing it.


2. In an HTML <meta> tag:

<meta http-equiv="Content-Security-Policy" content="frame-src https://app.dynamicauth.com 'self';">

3. In NGINX config:

add_header Content-Security-Policy "frame-src https://app.dynamicauth.com 'self';";

4. In Vercel or Netlify (via headers file):

vercel.json:

{
  "headers": [
    {
      "source": "/(.*)",
      "headers": [
        {
          "key": "Content-Security-Policy",
          "value": "frame-src https://app.dynamicauth.com 'self';"
        }
      ]
    }
  ]
}

_headers (Netlify):

/*
  Content-Security-Policy: frame-src https://app.dynamicauth.com 'self';

Key Wallet Functions

Creating and Importing Wallets

createWalletAccount()

Creates a new TSS-MPC wallet account.

importPrivateKey(options)

Imports a private key.

Parameters:

  • privateKey: string - The private key to import
  • thresholdSignatureScheme: string - Defaults to ‘TWO_OF_TWO’

Export Functions

exportPrivateKey(options)

Exports the private key for a specific account.

Parameters:

  • accountAddress: string - The address of the account to export
  • displayContainer: HTMLIFrameElement - The container to display the private key in

exportClientKeyshares(options)

Exports client keyshares for a specific account.

Parameters:

  • accountAddress: string - The address of the account to export keyshares for

Server Wallets

Dynamic Server Wallets let you spin up wallets, sign nd run complex flows using your backend.