Submit Stake
Submit a stake to start earning rewards or claim your staked assets.
Parameter
Attribute | Description |
---|---|
context | Must be "STAKING" or "HARVESTING" |
mainnet | A boolean to use mainnet |
signature | End User Signature |
stakeId | The stake identifier to submit |
transaction | The transaction to submit |
Usage example
Stake Assets
import { anvil } from "@ada-anvil/sdk-server";
try {
await anvil.staking.submitStake({
context: "STAKING",
mainnet: true,
signature: SIGNATURE,
stakeId: STAKE_ID,
transaction: TRANSACTION,
});
} catch {
console.log("YOUR ERROR HANDLING");
}
Claim Assets
import { anvil } from "@ada-anvil/sdk-server";
try {
await anvil.staking.submitStake({
context: "HARVESTING",
mainnet: true,
signature: SIGNATURE,
stakeId: STAKE_ID,
transaction: TRANSACTION,
});
} catch {
console.log("YOUR ERROR HANDLING");
}
Return informations
Attribute | Description |
---|---|
string | Transaction hash |