interchainjs
Version:
InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.
120 lines (119 loc) • 5.1 kB
TypeScript
import { Any, AnyAmino } from "../../../../google/protobuf/any";
import { DeepPartial } from "../../../../helpers";
import { BinaryReader, BinaryWriter } from "../../../../binary";
/**
* Type defines a classification of message issued from a controller chain to its associated interchain accounts
* host
*/
export declare enum Type {
/** TYPE_UNSPECIFIED - Default zero value enumeration */
TYPE_UNSPECIFIED = 0,
/** TYPE_EXECUTE_TX - Execute a transaction on an interchain accounts host chain */
TYPE_EXECUTE_TX = 1,
UNRECOGNIZED = -1
}
export declare const TypeAmino: typeof Type;
export declare function typeFromJSON(object: any): Type;
export declare function typeToJSON(object: Type): string;
/**
* InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field.
* @name InterchainAccountPacketData
* @package ibc.applications.interchain_accounts.v1
* @see proto type: ibc.applications.interchain_accounts.v1.InterchainAccountPacketData
*/
export interface InterchainAccountPacketData {
type: Type;
data: Uint8Array;
memo: string;
}
export interface InterchainAccountPacketDataProtoMsg {
typeUrl: "/ibc.applications.interchain_accounts.v1.InterchainAccountPacketData";
value: Uint8Array;
}
/**
* InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field.
* @name InterchainAccountPacketDataAmino
* @package ibc.applications.interchain_accounts.v1
* @see proto type: ibc.applications.interchain_accounts.v1.InterchainAccountPacketData
*/
export interface InterchainAccountPacketDataAmino {
type: Type;
data: string;
memo: string;
}
export interface InterchainAccountPacketDataAminoMsg {
type: "cosmos-sdk/InterchainAccountPacketData";
value: InterchainAccountPacketDataAmino;
}
/**
* CosmosTx contains a list of sdk.Msg's. It should be used when sending transactions to an SDK host chain.
* @name CosmosTx
* @package ibc.applications.interchain_accounts.v1
* @see proto type: ibc.applications.interchain_accounts.v1.CosmosTx
*/
export interface CosmosTx {
messages: Any[];
}
export interface CosmosTxProtoMsg {
typeUrl: "/ibc.applications.interchain_accounts.v1.CosmosTx";
value: Uint8Array;
}
/**
* CosmosTx contains a list of sdk.Msg's. It should be used when sending transactions to an SDK host chain.
* @name CosmosTxAmino
* @package ibc.applications.interchain_accounts.v1
* @see proto type: ibc.applications.interchain_accounts.v1.CosmosTx
*/
export interface CosmosTxAmino {
messages: AnyAmino[];
}
export interface CosmosTxAminoMsg {
type: "cosmos-sdk/CosmosTx";
value: CosmosTxAmino;
}
/**
* InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field.
* @name InterchainAccountPacketData
* @package ibc.applications.interchain_accounts.v1
* @see proto type: ibc.applications.interchain_accounts.v1.InterchainAccountPacketData
*/
export declare const InterchainAccountPacketData: {
typeUrl: string;
aminoType: string;
is(o: any): o is InterchainAccountPacketData;
isAmino(o: any): o is InterchainAccountPacketDataAmino;
encode(message: InterchainAccountPacketData, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): InterchainAccountPacketData;
fromPartial(object: DeepPartial<InterchainAccountPacketData>): InterchainAccountPacketData;
fromAmino(object: InterchainAccountPacketDataAmino): InterchainAccountPacketData;
toAmino(message: InterchainAccountPacketData): InterchainAccountPacketDataAmino;
fromAminoMsg(object: InterchainAccountPacketDataAminoMsg): InterchainAccountPacketData;
toAminoMsg(message: InterchainAccountPacketData): InterchainAccountPacketDataAminoMsg;
fromProtoMsg(message: InterchainAccountPacketDataProtoMsg): InterchainAccountPacketData;
toProto(message: InterchainAccountPacketData): Uint8Array;
toProtoMsg(message: InterchainAccountPacketData): InterchainAccountPacketDataProtoMsg;
registerTypeUrl(): void;
};
/**
* CosmosTx contains a list of sdk.Msg's. It should be used when sending transactions to an SDK host chain.
* @name CosmosTx
* @package ibc.applications.interchain_accounts.v1
* @see proto type: ibc.applications.interchain_accounts.v1.CosmosTx
*/
export declare const CosmosTx: {
typeUrl: string;
aminoType: string;
is(o: any): o is CosmosTx;
isAmino(o: any): o is CosmosTxAmino;
encode(message: CosmosTx, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): CosmosTx;
fromPartial(object: DeepPartial<CosmosTx>): CosmosTx;
fromAmino(object: CosmosTxAmino): CosmosTx;
toAmino(message: CosmosTx): CosmosTxAmino;
fromAminoMsg(object: CosmosTxAminoMsg): CosmosTx;
toAminoMsg(message: CosmosTx): CosmosTxAminoMsg;
fromProtoMsg(message: CosmosTxProtoMsg): CosmosTx;
toProto(message: CosmosTx): Uint8Array;
toProtoMsg(message: CosmosTx): CosmosTxProtoMsg;
registerTypeUrl(): void;
};