UNPKG

js-conflux-sdk

Version:
186 lines 4.88 kB
/** @constant {number} */ export const WORD_BYTES: 32; /** @constant {number} */ export const WORD_CHARS: number; /** @constant {BigInt} */ export const UINT_BOUND: any; /** @constant {BigInt} */ export const MAX_UINT: any; /** * * * - `LATEST_MINED` 'latest_mined': latest epoch. * - `LATEST_STATE` 'latest_state': latest state, about 5 epoch less then `LATEST_MINED` * - `LATEST_FINALIZED` 'latest_finalized': latest epoch which finalized by PoS chain. * - `LATEST_CONFIRMED` 'latest_confirmed': latest epoch which confirmation risk less 1e-8. * - `LATEST_CHECKPOINT` 'latest_checkpoint': latest check point epoch. * - `EARLIEST` 'earliest': earliest epoch number, same as 0. */ export type EPOCH_NUMBER = string; export namespace EPOCH_NUMBER { const LATEST_MINED: string; const LATEST_STATE: string; const LATEST_FINALIZED: string; const LATEST_CONFIRMED: string; const LATEST_CHECKPOINT: string; const EARLIEST: string; } /** * Min gas price for transaction * @constant {number} * @example * > CONST.MIN_GAS_PRICE 1000000000 */ export const MIN_GAS_PRICE: 1000000000; /** * Gas use for pure transfer transaction * @constant {number} * @example * > CONST.TRANSACTION_GAS 21000 */ export const TRANSACTION_GAS: 21000; /** * Storage limit for pure transfer transaction * @constant {number} * @example * > CONST.TRANSACTION_STORAGE_LIMIT 0 */ export const TRANSACTION_STORAGE_LIMIT: 0; /** * Testnet chainId * @constant {number} * @example * > CONST.TESTNET_ID 1 */ export const TESTNET_ID: 1; /** * Mainnet chainId * @constant {number} * @example * > CONST.MAINNET_ID 1029 */ export const MAINNET_ID: 1029; /** * Zero address * @constant {string} * @example * > ZERO_ADDRESS 0x0000000000000000000000000000000000000000 */ export const ZERO_ADDRESS_HEX: "0x0000000000000000000000000000000000000000"; /** * * * - `FUTURE_NONCE` 'futureNonce': pending because future nonce * - `NOT_ENOUGH_CASH` 'notEnoughCash': pending because insufficient balance */ export type PENDING_TX_STATUS = string; export namespace PENDING_TX_STATUS { const FUTURE_NONCE: string; const NOT_ENOUGH_CASH: string; } /** * Enum for trace action types */ export type ACTION_TYPES = string; export namespace ACTION_TYPES { const CALL: string; const CREATE: string; const CALL_RESULT: string; const CREATE_RESULT: string; const INTERNAL_TRANSFER_ACTION: string; } /** * Enum for trace call types */ export type CALL_TYPES = string; export namespace CALL_TYPES { export const NONE: string; const CALL_1: string; export { CALL_1 as CALL }; export const CALL_CODE: string; export const DELEGATE_CALL: string; export const STATIC_CALL: string; } /** * Enum for trace call status */ export type CALL_STATUS = string; export namespace CALL_STATUS { const SUCCESS: string; const REVERTED: string; const FAIL: string; } /** * Enum for trace pocket types */ export type POCKET_ENUM = string; export namespace POCKET_ENUM { const BALANCE: string; const STAKING_BALANCE: string; const STORAGE_COLLATERAL: string; const SPONSOR_BALANCE_FOR_GAS: string; const SPONSOR_BALANCE_FOR_COLLATERAL: string; const MINT_BURN: string; const GAS_PAYMENT: string; } /** * Enum for transaction.status and receipt.outcomeStatus */ export type TX_STATUS = number; export namespace TX_STATUS { export const UNEXECUTE: any; const SUCCESS_1: number; export { SUCCESS_1 as SUCCESS }; const FAIL_1: number; export { FAIL_1 as FAIL }; export const SKIP: number; } /** * Enum for trace create types */ export type CREATE_TYPES = string; export namespace CREATE_TYPES { const NONE_1: string; export { NONE_1 as NONE }; const CREATE_1: string; export { CREATE_1 as CREATE }; export const CREATE2: string; } /** * Enum for space type */ export type SPACE_ENUM = string; export namespace SPACE_ENUM { const NONE_2: string; export { NONE_2 as NONE }; export const NATIVE: string; export const EVM: string; } /** * KECCAK (i.e. Keccak) hash of the empty bytes string. * @constant {string} * */ export const KECCAK_EMPTY: "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"; /** @constant {string} */ export const ZERO_HASH: "0x0000000000000000000000000000000000000000000000000000000000000000"; /** * Enum for address types */ export type ADDRESS_TYPES = string; export namespace ADDRESS_TYPES { const USER: string; const CONTRACT: string; const BUILTIN: string; const NULL: string; } export const TRANSACTION_TYPE_LEGACY: 0; export const TRANSACTION_TYPE_EIP2930: 1; export const TRANSACTION_TYPE_EIP1559: 2; export const TXRLP_TYPE_PREFIX: Buffer; export const TXRLP_TYPE_PREFIX_2930: Buffer; export const TXRLP_TYPE_PREFIX_1559: Buffer; //# sourceMappingURL=CONST.d.ts.map