@substrate/api-sidecar
Version:
REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.
50 lines (49 loc) • 1.63 kB
TypeScript
import { TAssetDepositBalance } from '@polkadot/types/interfaces';
import { AssetId } from '@polkadot/types/interfaces/runtime';
import { bool, u128 } from '@polkadot/types/primitive';
import { IAt } from '.';
export interface IPoolAssetBalance {
/**
* Identifier for the class of asset.
*/
assetId: AssetId | number;
/**
* The units in which substrate records balances.
*/
balance: u128;
/**
* Whether this asset class is frozen except for permissioned/admin instructions.
*/
isFrozen: bool | string;
/**
* Whether a non-zero balance of this asset is deposit of sufficient
* value to account for the state bloat associated with its balance storage. If set to
* `true`, then non-zero balances may be stored without a `consumer` reference (and thus
* an ED in the Balances pallet or whatever else is used to control user-account state
* growth).
*/
isSufficient: bool | boolean;
}
/**
* Response from `/accounts/{accountId}/pool-assets-balances?asset=assetId`
*/
export interface IAccountPoolAssetsBalances {
at: IAt;
poolAssets: IPoolAssetBalance[];
rcBlockHash?: string;
rcBlockNumber?: string;
ahTimestamp?: string;
}
/**
* Response from `/accounts/{accountId}/pool-asset-approvals?asset=assetId&delegate=accountId`
*
* If a pool asset approval does not exist, the `amount` and `deposit` will be null.
*/
export interface IAccountPoolAssetApproval {
at: IAt;
amount: u128 | null;
deposit: TAssetDepositBalance | null;
rcBlockHash?: string;
rcBlockNumber?: string;
ahTimestamp?: string;
}