Stakable assets
Retrieve the assets eligible for staking.
Connect a wallet
To utilize those functions, it is necessary to connect a wallet beforehand.
Parameter
| Attribute | Description |
|---|---|
| stakeCollectionId | Your collection Id given by anvil |
Usage example
import { anvil } from "@ada-anvil/sdk-client";
try {
await anvil.wallet.connect("eternl");
await anvil.staking.getStakableAssets({ stakeCollectionId: YOUR_COLLECTION_ID });
} catch {
console.log("YOUR ERROR HANDLING");
}
Return informations
| Attribute | Description |
|---|---|
| id | Unique internal asset identifier |
| available | Indicates whether the asset is available for staking |
| unit | The unit for the asset |
| policyId | The policy ID associated with the asset |
| assetName | The name of the asset |
| rarity | Rarity classification provided by CNFT Tools |
| metadata | Metadata that varies depending on the collection |