@exodus/asset-types
Version: 0.0.0
Interfaces
Type Aliases
AbstractAsset
AddressOverrideCallbackParams
ApiFeatures
Asset
AssetAddress
AssetApi
AssetMeta
AssetPlugin
BalanceFieldName
Balances
BaseAsset
BaseTxSendParams
BlockExplorer
CombinedAsset
CommonAssetApi
CreateAddressParams
CreateAssetParams
CreateBumpTxParams
CreateHistoryMonitorApi
CreateNftTransferParams
CreateOptInTxParams
CreateOtherTxParams
CreateTransferParams
CreateTxResponse
EcdsaSignParams
Ed25519SignParams
EncodedEcdsaSignature
EncondePublicOptions
Extendable
Helper that allows extending a type as a union type
while also providing syntactic sugar for extending a type with FreeForm
ExtendedTxSendParams
Fees
FreeForm
FungibleTokenTxSendParams
GetActivityTxsParams
GetBalancesParams
GetDefaultAddressPathParams
GetFeeAsyncParams
GetFeeAsyncResponse
GetHistoricalBalanceParams
GetKeyIdentifierParams
GetOptInCostParams
GetSupportedPurposesParams
HardwareDevice
HardwareDeviceSignTransactionParams
HDKeysMap
Purpose -> BIP32 instance
HistoricalBalance
HistoricalBalanceEntry
IdentifiableTx
Info
IsOptedInParams
IsRecipientOptedInParams
KeyEncoder
NewTxSendParams
Nft
NonFungibleTokenTxSendParams
RequireOnly
SchnorrSignParams
SignatureEncoding
SignatureType
SignHardwareTxParams
SignMessageParams
SignParams
SignReturnValue
SignTransactionParams
SignTxParams
StakingAmountMode
- `required`: caller provides an amount
- `optional`: omitted means everything eligible
- `wholeBalance`: the operation always applies to the whole balance
- `none`: amount does not apply
StakingApi
Exposed as `api.staking` on the staked asset, base asset or token, when `api.features.stakingApi` is true.
Never exposed on combined assets; staking lives on their network member assets.
StakingAsset
Asset exposing `api.staking`: a base asset or a token, never a combined asset.
StakingAsyncParams
Params of async methods. They load account state, fee data and addresses through the asset client interface.
StakingAutoCompound
StakingCanPerformResult
StakingCapabilities
StakingLimits
Limits of one operation. Rules spanning amounts, e.g. minimum remaining stake, are enforced by `canPerform`.
StakingOperation
StakingOperationCapability
StakingOperationIntent
StakingParticipation
- `passive`: rewards for holding, no staking transactions
- `delegation`: whole balance delegated with one transaction, funds stay spendable
- `amount`: explicit amount bonded or locked
- `freeze`: amount frozen for network resources or votes
StakingPosition
StakingPositionStatus
StakingPrepareParams
StakingReasonCode
StakingRejectionError
Thrown by `prepare` and `submit` when an operation is rejected, e.g. by the `canPerform` rules or `PLAN_EXPIRED`.
StakingRewardsDistribution
StakingState
StakingSubmitError
Thrown by `submit` when a transaction fails; earlier transactions of the plan may already be broadcast.
StakingSubmitMode
StakingSubmitParams
StakingSubmitProgress
StakingSubmitResult
StakingSyncParams
Params of sync methods. They must not perform I/O.
`accountState` and `feeData` are opaque to callers: pass them through, never read them.
StakingTarget
StakingTargetKind
StakingTotals
Must equal the staking fields returned by `api.getBalances`.
StakingTxClassification
StakingTxPlan
StakingUnbondingKind
StrictTxSendParams
Timestamp
Milliseconds since the Unix epoch, UTC.
TokenAsset
TokenAssetApi
TokenOptInCost
TokenOptInFeeData
TokensApi
TxSendParams
UnsignedTxPayload
WalletAccountLike
WalletAccountParams
WithRequired
Mark the given keys of target type as required
XOR
Exclusive OR
Signer
interface
Methods
getPublicKey
getPublicKey(params?: GetPublicKeyParams): Promise
Parameters:
params (optional): GetPublicKeyParams
Returns:
Promisesign
AbstractAsset
type
AddressOverrideCallbackParams
type
Properties
asset
A
ApiFeatures
type
Properties
accountState?
boolean
customTokens?
boolean
feeMonitor?
boolean
feesApi?
boolean
historicalBalance?
boolean
isMaxFeeAsset?
boolean
isTestnet?
boolean
nfts?
boolean
noHistory?
boolean
signMessageWithSigner?
boolean
signWithSigner?
boolean
staking?
Record
stakingApi?
`api.staking` implements `StakingApi`
boolean
tokensRequireOptIn?
boolean
Asset
type
AssetAddress
type
Properties
resolvePurpose?
any
validate
any
AssetApi
type
AssetMeta
type
Properties
assetType
string
baseAssetName
string
blockExplorer
chainBadgeColors
string[]
currency
decimals?
number
displayName
string
displayNetworkName
string
displayNetworkTicker
string
displayTicker
string
gradientColors
string[]
info?
mintAddress?
string
name
string
primaryColor
string
ticker
string
tokenAssetType?
string
units
Record
AssetPlugin
type
Properties
createAsset
any
BalanceFieldName
type
Balances
type
BaseAsset
type
BaseTxSendParams
type
Properties
address
string
amount?
asset
options?
Options
walletAccount
BlockExplorer
type
Properties
addressUrl
any
txUrl
any
CombinedAsset
type
CommonAssetApi
type
Properties
features
getActivityTxs?
any
getBalances
any
getHistoricalBalance?
any
getTxLogFilter?
any
staking?
CreateAddressParams
type
CreateAssetParams
type
Properties
assetClientInterface
unknown
config
C
overrideCallback?
any
CreateBumpTxParams
type
CreateHistoryMonitorApi
type
CreateNftTransferParams
type
CreateOptInTxParams
type
CreateOtherTxParams
type
CreateTransferParams
type
CreateTxResponse
type
EcdsaSignParams
type
Ed25519SignParams
type
EncodedEcdsaSignature
type
EncondePublicOptions
type
Extendable
type
Helper that allows extending a type as a union type
while also providing syntactic sugar for extending a type with FreeForm
ExtendedTxSendParams
type
Fees
type
FreeForm
type
FungibleTokenTxSendParams
type
GetActivityTxsParams
type
GetBalancesParams
type
GetDefaultAddressPathParams
type
GetFeeAsyncParams
type
GetFeeAsyncResponse
type
GetHistoricalBalanceParams
type
GetKeyIdentifierParams
type
GetOptInCostParams
type
GetSupportedPurposesParams
type
HardwareDevice
type
HardwareDeviceSignTransactionParams
type
HDKeysMap
type
Purpose -> BIP32 instance
HistoricalBalance
type
HistoricalBalanceEntry
type
IdentifiableTx
type
Info
type
Properties
description?
string
reddit?
string
telegram?
string
twitter?
string
website?
string
IsOptedInParams
type
IsRecipientOptedInParams
type
KeyEncoder
type
Properties
encodePrivate
any
encodePublic
any
NewTxSendParams
type
Nft
type
NonFungibleTokenTxSendParams
type
RequireOnly
type
SchnorrSignParams
type
SignatureEncoding
type
SignatureType
type
SignHardwareTxParams
type
SignMessageParams
type
SignParams
type
SignReturnValue
type
SignTransactionParams
type
SignTxParams
type
StakingAmountMode
type
- `required`: caller provides an amount
- `optional`: omitted means everything eligible
- `wholeBalance`: the operation always applies to the whole balance
- `none`: amount does not apply
StakingApi
type
Exposed as `api.staking` on the staked asset, base asset or token, when `api.features.stakingApi` is true.
Never exposed on combined assets; staking lives on their network member assets.
Properties
canPerform
any
classifyTx
`asset` is the asset whose activity is rendered; `tx` may come from its base asset tx log.
any
getCapabilities
any
getLimits
any
getStakingState
any
listTargets?
Only when `capabilities.target.selection` is `selectable`.
any
prepare?
Builds the transactions of one operation declared in `capabilities.operations`.
`prepare` and `submit` are present when at least one operation is declared.
Rejects with `StakingRejectionError`.
any
submit?
Rejects with `StakingRejectionError` before sending, or `StakingSubmitError` when a transaction fails.
any
StakingAsset
type
Asset exposing `api.staking`: a base asset or a token, never a combined asset.
StakingAsyncParams
type
Params of async methods. They load account state, fee data and addresses through the asset client interface.
StakingAutoCompound
type
StakingCanPerformResult
type
Properties
ok
boolean
reasonCode?
shortfallAssetName?
Asset the shortfall is denominated in.
string
warnings?
Non blocking conditions, e.g. `LOW_FEE_BALANCE` when a stake leaves too little to pay later exit fees,
or `LOW_FEE_BALANCE_FOR_CLAIM` when an unstake leaves too little to pay the claim fee.
StakingCapabilities
type
Properties
activation?
any
claimUnstaked
"automatic" | "manual" | "none"
feeAssetName
Asset paying the fees of staking transactions, e.g. ethereum for polygon.
string
hardwareWallets?
Hardware wallet sources whose accounts can sign staking txs, e.g. `['trezor']`.
string[]
liquid
Staked funds remain spendable; `frozen` excludes them.
boolean
maxPositions?
Unbonding positions allowed per staking target, e.g. 7 per validator on cosmos.
number
operations
Only the declared operations have a `prepare*` method. Empty for passive chains.
Partial
participation
positions
"aggregate" | "multiple"
rewards
any
target
any
unbonding
any
StakingLimits
type
Limits of one operation. Rules spanning amounts, e.g. minimum remaining stake, are enforced by `canPerform`.
Properties
estimatedFee?
Fee estimate shown before confirming, in `capabilities.feeAssetName`; the plan fee is authoritative.
min?
StakingOperation
type
StakingOperationCapability
type
Properties
amount
multiTx
The plan may contain more than one transaction.
boolean
positionSelectable
Caller may pick `positionIds`.
boolean
supportsMax
`isMax` is supported; the plan deducts fees from the amount.
boolean
StakingOperationIntent
type
StakingParticipation
type
- `passive`: rewards for holding, no staking transactions
- `delegation`: whole balance delegated with one transaction, funds stay spendable
- `amount`: explicit amount bonded or locked
- `freeze`: amount frozen for network resources or votes
StakingPosition
type
Properties
amount
availableAt?
When an activating position becomes active or a deactivating one becomes withdrawable.
id
Stake account address, validator address, unbond nonce or unbonding entry key.
string
rewards?
status
target?
StakingPositionStatus
type
StakingPrepareParams
type
StakingReasonCode
type
StakingRejectionError
type
Thrown by `prepare` and `submit` when an operation is rejected, e.g. by the `canPerform` rules or `PLAN_EXPIRED`.
StakingRewardsDistribution
type
StakingState
type
Properties
autoCompound?
earned?
Lifetime rewards, informational; not part of any balance. `undefined` while not loaded; zero only when known to be zero.
hasPosition
Any non zero staking bucket; lets the wallet keep exits reachable when staking is disabled.
boolean
isStaking
A delegation or active position exists.
boolean
loaded
Monitor fetched staking data at least once.
boolean
nextRewardAt?
Estimated time of the next reward (the first one while no reward was earned yet), UTC ms. Computed by the chain; wallets render it as a countdown.
totals
StakingSubmitError
type
Thrown by `submit` when a transaction fails; earlier transactions of the plan may already be broadcast.
StakingSubmitMode
type
StakingSubmitParams
type
StakingSubmitProgress
type
Properties
index
Index in `plan.txs` of the transaction about to be signed and broadcast.
number
total
number
StakingSubmitResult
type
Properties
bundleId?
string
txIds
In plan order.
string[]
StakingSyncParams
type
Params of sync methods. They must not perform I/O.
`accountState` and `feeData` are opaque to callers: pass them through, never read them.
Properties
accountState
Account state of `asset.baseAsset` for `walletAccount`, also for tokens.
AccountState
feeData
Fee data of `asset.feeAsset`.
unknown
txLog?
Tx log of the staked asset; pending txs are applied to balances and pending operations.
TxSet
walletAccount
StakingTarget
type
Properties
id
Validator address, pool hash, baker address or provider id.
string
name?
string
StakingTargetKind
type
StakingTotals
type
Must equal the staking fields returned by `api.getBalances`.
StakingTxClassification
type
Properties
amount?
autoCompounded?
Rewards restaked automatically instead of being paid out.
boolean
deposit?
Refundable deposit the tx paid on top of its fee, e.g. the cardano stake key deposit on stake.
direction?
Rewards: whether the rewards reached this wallet or another withdraw address.
"received" | "sent"
enabled?
`setAutoCompound`: whether auto compounding was turned on or off.
boolean
operation
StakingOperation | "reward"
refund?
Deposit the tx returned to the balance, e.g. the cardano stake key deposit on unstake.
StakingTxPlan
type
Properties
assetName
string
deposit?
Part of `fee` that is a refundable deposit, e.g. the cardano stake key deposit; returned by a later operation.
expiresAt?
The plan must be prepared again after this time, e.g. recent blockhash or nonce validity.
feeAssetName
string
operation
refund?
Deposit returned to the balance once the plan confirms, e.g. the cardano stake key deposit on unstake.
submit
walletAccount
string
StakingUnbondingKind
type
StrictTxSendParams
type
Timestamp
type
Milliseconds since the Unix epoch, UTC.
TokenAsset
type
TokenAssetApi
type
Properties
getBalances
any
TokenOptInCost
type
TokenOptInFeeData
type
TokensApi
type
Properties
canOptIn
any
canOptOut
any
createOptInTx
any
createOptOutTx
any
getOptInCost
any
isOptedIn
any
isRecipientOptedIn
any
TxSendParams
type
UnsignedTxPayload
type
WalletAccountLike
type
WalletAccountParams
type
WithRequired
type
Mark the given keys of target type as required
XOR
type
Exclusive OR
