airgap-coin-lib
Version:
The airgap-coin-lib is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.
36 lines (35 loc) • 1.43 kB
TypeScript
import { IAirGapTransaction } from '../../interfaces/IAirGapTransaction';
import { SerializableUnsignedCosmosTransaction } from '../../serializer/schemas/definitions/unsigned-transaction-cosmos';
import { CosmosMessage } from './cosmos-message/CosmosMessage';
import { CosmosFee } from './CosmosFee';
import { CosmosProtocol } from './CosmosProtocol';
export interface JSONConvertible {
toJSON(): any;
}
export interface RPCConvertible {
toRPCBody(): any;
}
export declare class CosmosTransaction implements JSONConvertible, RPCConvertible {
readonly messages: CosmosMessage[];
readonly fee: CosmosFee;
readonly memo: string;
readonly chainID: string;
readonly accountNumber: string;
readonly sequence: string;
constructor(messages: CosmosMessage[], fee: CosmosFee, memo: string, chainID: string, accountNumber: string, sequence: string);
toJSON(): {
accountNumber: string;
chainID: string;
fee: {
amount: import("./CosmosCoin").CosmosCoinJSON[];
gas: string;
};
memo: string;
messages: import("./cosmos-message/CosmosMessage").CosmosMessageJSON[];
sequence: string;
};
toRPCBody(): any;
toAirGapTransactions(protocol: CosmosProtocol): IAirGapTransaction[];
static fromJSON(json: SerializableUnsignedCosmosTransaction): CosmosTransaction;
static fromRPCBody(json: any): CosmosTransaction;
}