Skip to main content

Stakable assets

Retrieve the assets eligible for staking.

Connect a wallet

To utilize those functions, it is necessary to connect a wallet beforehand.

Parameter

AttributeDescription
stakeCollectionIdYour 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

AttributeDescription
idUnique internal asset identifier
availableIndicates whether the asset is available for staking
unitThe unit for the asset
policyIdThe policy ID associated with the asset
assetNameThe name of the asset
rarityRarity classification provided by CNFT Tools
metadataMetadata that varies depending on the collection