Skip to main content
Migration takes over the key material from a user’s Fireblocks Non-Custodial Wallet (NCW) and provisions Dynamic embedded wallets for it. It is a single cross-chain operation: one call migrates the device across every supported chain and keeps the addresses the user already had.
Before you start. This is for applications already running a Fireblocks NCW integration. Migration imports that device’s keys into a Dynamic embedded wallet for the currently signed-in Dynamic user — your Fireblocks wallet is not changed or disabled. Migration supports EVM, Solana, and Bitcoin (native SegWit only, see Bitcoin). Other chains return a per-chain failure.

How it works

The migration runs inside Dynamic’s embedded-wallet iframe, served from https://app.dynamicauth.com. The Fireblocks key takeover and per-chain key derivation happen in that sandboxed iframe — the raw key material never enters your application’s page context. During the takeover, the Fireblocks NCW SDK (running in the iframe) exchanges MPC protocol messages with Fireblocks. It does not call Fireblocks directly. Instead it relays each message through your backend’s RPC endpoint, which forwards it to Fireblocks using your Fireblocks API credentials. The flow per message:
  1. The iframe sends the NCW message to POST {backendBaseUrl}/api/devices/{deviceId}/rpc, with your application’s auth token for the user as a bearer token.
  2. Your backend relays the message to Fireblocks and returns the response unchanged.
  3. The iframe completes the takeover, derives each chain’s key, and imports it into the Dynamic embedded wallet.
Your Fireblocks API key and secret stay on your backend. The browser only ever holds your application’s auth token for the user — never a Fireblocks credential.

Multiple Fireblocks accounts

A Fireblocks device can hold several vault accounts, each with its own addresses. Migration handles all of them: pass each account’s addresses under accounts, keyed by the account’s Fireblocks account index, and each address becomes its own Dynamic embedded wallet.
Migration runs only on the (account, chain) pairs you list, so an account migrates exactly the chains it names. Each wallet in the result carries fireblocksAccountIndex so you can attribute it to the Fireblocks account it came from.
The coinTypes override applies to every account in the call. To migrate accounts that use different coin types for the same chain, for example mainnet and testnet EVM, migrate them in separate calls.

Prerequisites

1

Configure the migration backend in the Dynamic Console

Fireblocks migration must be enabled for your environment before the settings below appear. Contact us to turn it on.
In your environment settings, configure the Fireblocks migration backend:
  • Backend base URL — the base URL of your backend (HTTPS required). The iframe calls {backendBaseUrl}/api/devices/{deviceId}/rpc.
  • Environment — sandbox or production, matching the Fireblocks environment the NCW device belongs to.
Fireblocks migration settings in the Dynamic Console
2

Expose an RPC endpoint on your backend

Implement POST /api/devices/{deviceId}/rpc to relay NCW messages to Fireblocks:
  • Request — header Authorization: Bearer <token> (your application’s auth token for the user), body { "message": "<ncw-message>" }.
  • Action — authenticate the token, then forward the message to Fireblocks with the Fireblocks server SDK, invokeWalletRpc(walletId, deviceId, message), and return the Fireblocks response JSON unchanged. Your Fireblocks API credentials live here, on the backend.
Resolve the walletId from the authenticated user behind the token. See the Fireblocks NCW backend demo for a reference implementation.
3

Enable CORS for the Dynamic iframe

The RPC request originates from the Dynamic iframe origin, https://app.dynamicauth.com. Your /rpc endpoint must allow CORS from that origin — allow the POST method and the Content-Type and Authorization request headers.
Without CORS, the browser blocks the request and the takeover fails with a network error before any message reaches Fireblocks.

Bitcoin

Migration imports a Bitcoin wallet as a native SegWit (P2WPKH) wallet. Native SegWit addresses start with bc1q, and the migrated wallet keeps the address the user already had in Fireblocks. Migration covers account 0 of the device on Bitcoin mainnet. Native SegWit is the only Bitcoin address type that migrates. Dynamic embedded wallets do not support legacy P2PKH addresses, which start with 1, so migration does not import them.
Move any funds held at a legacy P2PKH address to the user’s native SegWit address before you migrate. Dynamic embedded wallets cannot sign for legacy addresses, so funds that stay at a legacy address cannot be spent from the migrated wallet.
To migrate Bitcoin:
  • Enable Bitcoin for your environment in the Dynamic Console. Migration runs only on enabled chains.
  • Pass the user’s native SegWit address under the chain name BTC in expectedAddresses, in lowercase. Other spellings such as bitcoin are skipped.
  • Expect the address check to reject any other address. If the value does not match the address derived from the Fireblocks key, for example a legacy address, the BTC entry returns MIGRATION_IMPORT_ADDRESS_MISMATCH and nothing is imported.

Migrate with the SDK

Once the Dynamic Console and backend are configured, call the migration from your SDK:

JavaScript

Last modified on November 27, 2026