wallet_openEarn
Last updated
🔜 The wallet_openEarn method is coming soon
Your app can use the wallet_openEarn method to open Xverse Wallet’s native Earn flow for a specific yield strategy, so the user can deposit Bitcoin or stablecoins directly from their wallet.
This is especially useful for onboarding users into BitcoinFi experiences across Bitcoin and Bitcoin L2 ecosystems such as Starknet, Spark, or Stacks.
strategy (required)
The Xverse Earn yield strategy to open
Example: WBTC_nativeStaking (staking WBTC natively on Starknet)
🔓 Your app must have first connected to the wallet and obtained account read permissions
🔒 If your user has not connected their active Xverse account to your app yet, and your app does not the necessary account read permissions -> the method will throw with an access denied error
If the account is connected and the requested onramp exists
-> the method successfully returns openEarnResult
-> Xverse Wallet opens the Earn screen for the requested strategy
the user can then choose an amount and confirm the deposit/investment in Xverse Wallet

If the account is not connected or the requested Xverse Earn strategy does not exist, the method will reject with an error object.
Last updated