UNPKG

airgap-coin-lib

Version:

The airgap-coin-lib is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.

57 lines (56 loc) 1.29 kB
import { CosmosTransactionCursor } from './CosmosTypes'; import { IAirGapTransaction } from '../../interfaces/IAirGapTransaction'; import { CosmosProtocol } from './CosmosProtocol'; export interface Attribute { key: string; value: string; } export interface Event { type: string; attributes: Attribute[]; } export interface Log { msg_index: number; log: string; events: Event[]; } export interface Amount { denom: string; amount: string; } export interface Value { amount: Amount[]; to_address: string; from_address: string; } export interface Fee { gas: string; amount: Amount[]; } export interface CosmosTransactionsResponse { id: number; height: number; tx_hash: string; logs: Log[]; msg: Msg[]; fee: Fee; gas_wanted: number; gas_used: number; memo: string; timestamp: Date; } interface MsgTypeValue { from_address: string; to_address: string; amount: Amount[]; } interface Msg { type: string; value: MsgTypeValue; } export declare class CosmosInfoClient { baseURL: string; constructor(baseURL?: string); fetchTransactions(protocol: CosmosProtocol, address: string, limit: number, cursor?: CosmosTransactionCursor): Promise<IAirGapTransaction[]>; } export {};