Skip to main content

Stakable assets

Retrieve the assets eligible for staking.

Parameter

AttributeDescription
stakeCollectionIdYour collection Id given by anvil
utxosArray of utxos

Usage example

import { anvil } from "@ada-anvil/sdk-server";

try {
await anvil.staking.getStakableAssets({
stakeCollectionId: YOUR_COLLECTION_ID,
utxos: ["THE_UTXO"],
});
} 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