A React hook that enables staking USDC tokens in the VESU protocol. This hook handles both the approval and deposit transactions in a single operation.
stake
or stakeAsync
:
encryptKey
(string): User’s decryption PINwallet
(WalletData): Wallet public/private key pairamount
(string | number): Amount of USDC to stakereceiverWallet
(string): Address to receive the staked tokensbearerToken
(string): Authentication token for the APIstake
: Function to trigger staking (mutate)stakeAsync
: Async function to trigger staking (mutateAsync)stakeData
: Transaction hash of the stake operationisLoading
: Boolean indicating if the operation is in progressisError
: Boolean indicating if an error occurred0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8
approve
0x017f19582c61479f2fe0b6606300e975c0a8f439102f43eeecc1d0e9b3d84350
deposit