UNPKG

@ninerealms/midgard-client

Version:
157 lines 4.73 kB
import BigNumber from 'bignumber.js'; export interface ThorchainInboundAddressResponse { chain: string; pub_key: string; address: string; router: string; halted: boolean; gas_rate: string; } export interface ThorchainInboundAddress { chain: string; pubKey: string; address: string; router: string; halted: boolean; gasRate: BigNumber; } export declare const rawToThorchainInboundAddress: ({ gas_rate, pub_key, ...ibAddress }: ThorchainInboundAddressResponse) => ThorchainInboundAddress; export declare const thorchainInboundAddresses: () => Promise<ThorchainInboundAddress[]>; export interface ThorchainConstantsInt64 { AsgardSize: number; BadValidatorRate: number; BadValidatorRedline: number; BlocksPerYear: number; ChurnInterval: number; ChurnRetryInterval: number; DesiredValidatorSet: number; DoubleSignMaxAge: number; EmissionCurve: number; FailKeygenSlashPoints: number; FailKeysignSlashPoints: number; FullImpLossProtectionBlocks: number; FundMigrationInterval: number; IncentiveCurve: number; JailTimeKeygen: number; JailTimeKeysign: number; LackOfObservationPenalty: number; LiquidityLockUpBlocks: number; MaxAvailablePools: number; MaxSwapsPerBlock: number; MinRunePoolDepth: number; MinSlashPointsForBadValidator: number; MinSwapsPerBlock: number; MinimumBondInRune: number; MinimumNodesForBFT: number; MinimumNodesForYggdrasil: number; NativeTransactionFee: number; NewPoolCycle: number; ObservationDelayFlexibility: number; ObserveSlashPoints: number; OldValidatorRate: number; OutboundTransactionFee: number; PoolCycle: number; SigningTransactionPeriod: number; VirtualMultSynths: number; YggFundLimit: number; } export interface ThorchainConstantsBool { StrictBondLiquidityRatio: boolean; } export interface ThorchainConstantsString { DefaultPoolStatus: string; } export interface ThorchainConstants { int_64_values: ThorchainConstantsInt64; bool_values: ThorchainConstantsBool; string_values: ThorchainConstantsString; } export declare const thorchainConstants: () => Promise<ThorchainConstants>; export interface BlockResponse { chain: string; last_observed_in: number; last_signed_out: number; thorchain: number; } export interface Block { chain: string; lastObservedIn: number; lastSignedOut: number; thorchain: number; } export declare const rawToBlock: (block: BlockResponse) => Block; export declare const thorchainLastblock: () => Promise<Block[]>; export interface Queue { swap: number; outbound: number; internal: number; } export declare const thorchainQueue: () => Promise<Queue[]>; export interface JailStayResponse { node_address?: string; release_height?: number; reason?: string; } export interface ChainPositionResponse { chain: string; height: number; } export interface ChainPosition { chain: string; height: BigNumber; } export interface PreflightStatus { status: string; reason: string; code: number; } export interface ThorchainNodeResponse { node_address: string; status: string; validator_cons_pub_key: string; bond: string; active_block_height: number; bond_address: string; status_since: number; signer_membership: string[]; requested_to_leave: boolean; forced_to_leave: boolean; leave_height: number; ip_address: string; version: string; slash_points: number; jail: JailStayResponse | null; current_award: string; observe_chains: ChainPositionResponse[] | null; preflight_status: PreflightStatus; } export interface JailStay { nodeAddress?: string; releaseHeight?: BigNumber; reason?: string; } export interface ThorchainNode { nodeAddress: string; status: string; validatorConsPubKey: string; bond: BigNumber; activeBlockHeight: BigNumber; bondAddress: string; statusSince: BigNumber; signerMembership: string[]; requestedToLeave: boolean; forcedToLeave: boolean; leaveHeight: BigNumber; ipAddress: string; version: string; slashPoints: BigNumber; jail: JailStay | null; currentAward: BigNumber; observeChains: ChainPosition[] | null; preflightStatus: PreflightStatus; } export declare const rawToJail: (jail: JailStayResponse | null) => JailStay | null; export declare const rawToChainPosition: (position: ChainPositionResponse) => ChainPosition; export declare const rawToNode: (res: ThorchainNodeResponse) => ThorchainNode; export declare const thorchainNodes: () => Promise<ThorchainNode[]>; //# sourceMappingURL=thorchain.d.ts.map