bridgewallet_openBridge

Help Users Bridge Assets Between Bitcoin Layers

Your app can use the wallet_openBridge method to prompt the user to bridge assets between Bitcoin layers with their Xverse wallet. This can be especially useful to onboard users to apps operating on Bitcoin and Bitcoin L2s like Starknet, Spark or Stacks.

Request Params

  • fromAsset

    • The asset (ticker) you wish your user to bridge to another Bitcoin layer

    • Example: BTC when bridging BTC from Bitcoin Mainnet to Starknet

  • toAsset

    • The asset (ticker) you wish your user to receive on the destination Bitcoin layer

    • Example: WBTC when bridging BTC from Bitcoin Mainnet to Starknet

Permissions Required

wallet_openBridge Result: Open the Bridge Flow

βœ… Success

If the account is connected and the requested bridge route exists

  • -> the method successfully returns openBridgeResult

  • -> Xverse wallet opens the relevant bridge screen for the requested bridge route

    • the user can then choose an amount and confirm the bridge in Xverse Wallet

❌ Error

  • If the account is not connected or the requested bridge route does not exist, the method will reject with an error object

Last updated