dollar-signwallet_openBuy

Help Users Buy Bitcoin Ecosystem Assets

Your app can use the wallet_openBuy method to prompt the user to buy the crypto asset your app requires, using their Xverse wallet's native onramps. This can be especially useful to onboard users to apps operating on Bitcoin and Bitcoin L2s like Starknet, Spark or Stacks.

Request Params

  • asset

    • The asset (ticker) to buy

    • Example: WBTC when buying WBTC on Starknet

Permissions Required

wallet_openBuy Result: Open the Buy flow

βœ… Success

If the account is connected and the requested onramp exists

  • -> the method successfully returns openBuyResult

  • -> Xverse wallet opens the relevant buy screen for the requested onramp

    • the user can then select their currency, payment method and provider using Xverse wallet

❌ Error

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

Last updated