Overview
This page documents the TypeScript types and data structures used in the Staking API, as defined in the Crocante platform source code.Staking Type
Represents an available staking product configuration.StakingTypeItem Interface
Field Descriptions
Unique identifier for the staking product. Use this as
typeId when creating a stake.The cryptocurrency identifier that can be staked. Examples:
"BTC", "ETH", "USDT", "SOL".Staking mode:
VARIABLE- Flexible staking with variable APY, no fixed lock-upFIXED- Fixed-term staking with guaranteed APY and defined duration
Annual Percentage Yield as a decimal string. For example:
"0.05"represents 5% APY"0.12"represents 12% APY
Minimum amount required to create a stake for this product. Specified in the base unit of the currency.
Duration of the lock-up period in days. Only present for
FIXED mode products. After this period, the stake becomes redeemable.Example
Staking Position
Represents an active or redeemed staking position.StakingData Interface
Field Descriptions
References the staking product ID that this position is based on.
ISO 8601 timestamp indicating when the staking position was created.
ISO 8601 timestamp indicating when the stake can be redeemed. For FIXED staking, this is
startsAt + durationDays. For redeemed stakes, this is null.The original amount staked at position creation.
The APY at the time the stake was created. Preserved for historical tracking.
Metadata about the staking operation. See Operation Type below.
Complete details of the staking product this position is based on.
Current staked amount (typically same as
initialAmount).The yield accumulated so far on this staking position.
Estimated total yield at redemption time. For FIXED stakes, this is the guaranteed yield. For VARIABLE stakes, this is an estimate based on current APY.
Current APY. For FIXED mode, this matches
initialAPY. For VARIABLE mode, this may differ as rates change.Example
Operation Type
Metadata associated with every staking operation.Operation Interface
Field Descriptions
Unique identifier for the operation. Use this ID when redeeming the stake via
EP_STAKING_REDEEM.User ID of the account that created this staking operation.
User ID of the current owner of this staking position.
ISO 8601 timestamp when the staking operation was created.
ISO 8601 timestamp of the most recent update to this operation.
ISO 8601 timestamp when the operation was closed/redeemed.
null for active stakes.Current status of the operation. Common values:
"Active"- Stake is currently active"Redeemed"- Stake has been redeemed
Operation type identifier. For staking operations, this is typically
"STAKE".Extended type descriptor providing additional context about the operation.
