UNPKG

@substrate/api-sidecar

Version:

REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.

31 lines (30 loc) 1.15 kB
import { Vec } from '@polkadot/types'; import { Balance, BalanceLock, Index, LockIdentifier, Reasons } from '@polkadot/types/interfaces'; import { IAt } from '.'; export interface IAccountBalanceInfo { at: IAt; tokenSymbol: string; nonce: Index; free: Balance | string; reserved: Balance | string; miscFrozen: Balance | string; feeFrozen: Balance | string; frozen: Balance | string; /** * Calculated transferable balance. This uses the formula: free - max(maybeEd, frozen - reserve) * Where `maybeEd` means if there is no frozen and reserves it will be zero, else it will be the existential deposit. * This is only correct when the return type of `api.query.system.account` is `FrameSystemAccountInfo`. * Which is the most up to date calculation for transferable balances. * * ref: https://github.com/paritytech/polkadot-sdk/issues/1833 */ transferable: Balance | string; locks: Vec<BalanceLock> | IBalanceLock[]; rcBlockNumber?: string; ahTimestamp?: string; } export interface IBalanceLock { id: LockIdentifier; amount: string; reasons: Reasons; }