User Interactions
Register (Commit)
// 1. Simulate to check status
const action = await sdk.register({ vaultAddress: '0x...' });
if (action.simulation.needsApproval) {
console.log("Approval needed! SDK will handle this.");
}
// 2. Execute (Auto-Approve + Stake)
await action.execute({
onApproving: () => console.log('Approving...'),
onSubmitting: () => console.log('Registering...'),
onSubmitted: (hash) => console.log('Tx Hash:', hash)
});Claim Rewards
Last updated
