UNPKG

@onekeyfe/blockchain-libs

Version:
83 lines (82 loc) 1.83 kB
import BigNumber from 'bignumber.js'; declare type ClientInfo = { bestBlockNumber: number; isReady: boolean; }; declare type AddressInfo = { balance: BigNumber; existing: boolean; nonce?: number; }; declare enum TransactionStatus { NOT_FOUND = 0, PENDING = 1, INVALID = 2, CONFIRM_AND_SUCCESS = 10, CONFIRM_BUT_FAILED = 11 } declare type EstimatedPrice = { price: BigNumber; waitingBlock?: number; payload?: { [key: string]: any; }; }; declare type FeePricePerUnit = { normal: EstimatedPrice; others?: Array<EstimatedPrice>; }; declare type PartialTokenInfo = { decimals: number; name: string; symbol: string; }; declare type AddressValidation = { isValid: boolean; normalizedAddress?: string; displayAddress?: string; encoding?: string; }; declare type UTXO = { txid: string; vout: number; value: BigNumber; }; declare type TxInput = { address: string; value: BigNumber; tokenAddress?: string; utxo?: UTXO; publicKey?: string; }; declare type TxOutput = { address: string; value: BigNumber; tokenAddress?: string; payload?: { [key: string]: any; }; }; declare type UnsignedTx = { inputs: TxInput[]; outputs: TxOutput[]; type?: string; nonce?: number; feeLimit?: BigNumber; feePricePerUnit?: BigNumber; payload: { [key: string]: any; }; tokensChangedTo?: { [key: string]: string; }; }; declare type SignedTx = { txid: string; rawTx: string; }; declare type TypedMessage = { type?: number; message: string; }; export { ClientInfo, AddressInfo, TransactionStatus, EstimatedPrice, FeePricePerUnit, PartialTokenInfo, AddressValidation, UTXO, TxInput, TxOutput, UnsignedTx, SignedTx, TypedMessage, };