interchainjs
Version:
InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.
310 lines (309 loc) • 11.2 kB
TypeScript
import { Coin, CoinAmino } from "../../../../cosmos/base/v1beta1/coin";
import { Height, HeightAmino, Params, ParamsAmino } from "../../../core/client/v1/client";
import { BinaryReader, BinaryWriter } from "../../../../binary";
import { DeepPartial } from "../../../../helpers";
/**
* MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between
* ICS20 enabled chains. See ICS Spec here:
* https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures
* @name MsgTransfer
* @package ibc.applications.transfer.v1
* @see proto type: ibc.applications.transfer.v1.MsgTransfer
*/
export interface MsgTransfer {
/**
* the port on which the packet will be sent
*/
sourcePort: string;
/**
* the channel by which the packet will be sent
*/
sourceChannel: string;
/**
* token to be transferred
*/
token: Coin;
/**
* the sender address
*/
sender: string;
/**
* the recipient address on the destination chain
*/
receiver: string;
/**
* Timeout height relative to the current block height.
* If you are sending with IBC v1 protocol, either timeout_height or timeout_timestamp must be set.
* If you are sending with IBC v2 protocol, timeout_timestamp must be set, and timeout_height must be omitted.
*/
timeoutHeight: Height;
/**
* Timeout timestamp in absolute nanoseconds since unix epoch.
* If you are sending with IBC v1 protocol, either timeout_height or timeout_timestamp must be set.
* If you are sending with IBC v2 protocol, timeout_timestamp must be set.
*/
timeoutTimestamp: bigint;
/**
* optional memo
*/
memo: string;
/**
* optional encoding
*/
encoding: string;
}
export interface MsgTransferProtoMsg {
typeUrl: "/ibc.applications.transfer.v1.MsgTransfer";
value: Uint8Array;
}
/**
* MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between
* ICS20 enabled chains. See ICS Spec here:
* https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures
* @name MsgTransferAmino
* @package ibc.applications.transfer.v1
* @see proto type: ibc.applications.transfer.v1.MsgTransfer
*/
export interface MsgTransferAmino {
/**
* the port on which the packet will be sent
*/
source_port: string;
/**
* the channel by which the packet will be sent
*/
source_channel: string;
/**
* token to be transferred
*/
token: CoinAmino;
/**
* the sender address
*/
sender: string;
/**
* the recipient address on the destination chain
*/
receiver: string;
/**
* Timeout height relative to the current block height.
* If you are sending with IBC v1 protocol, either timeout_height or timeout_timestamp must be set.
* If you are sending with IBC v2 protocol, timeout_timestamp must be set, and timeout_height must be omitted.
*/
timeout_height: HeightAmino;
/**
* Timeout timestamp in absolute nanoseconds since unix epoch.
* If you are sending with IBC v1 protocol, either timeout_height or timeout_timestamp must be set.
* If you are sending with IBC v2 protocol, timeout_timestamp must be set.
*/
timeout_timestamp: string;
/**
* optional memo
*/
memo: string;
/**
* optional encoding
*/
encoding: string;
}
export interface MsgTransferAminoMsg {
type: "cosmos-sdk/MsgTransfer";
value: MsgTransferAmino;
}
/**
* MsgTransferResponse defines the Msg/Transfer response type.
* @name MsgTransferResponse
* @package ibc.applications.transfer.v1
* @see proto type: ibc.applications.transfer.v1.MsgTransferResponse
*/
export interface MsgTransferResponse {
/**
* sequence number of the transfer packet sent
*/
sequence: bigint;
}
export interface MsgTransferResponseProtoMsg {
typeUrl: "/ibc.applications.transfer.v1.MsgTransferResponse";
value: Uint8Array;
}
/**
* MsgTransferResponse defines the Msg/Transfer response type.
* @name MsgTransferResponseAmino
* @package ibc.applications.transfer.v1
* @see proto type: ibc.applications.transfer.v1.MsgTransferResponse
*/
export interface MsgTransferResponseAmino {
/**
* sequence number of the transfer packet sent
*/
sequence: string;
}
export interface MsgTransferResponseAminoMsg {
type: "cosmos-sdk/MsgTransferResponse";
value: MsgTransferResponseAmino;
}
/**
* MsgUpdateParams is the Msg/UpdateParams request type.
* @name MsgUpdateParams
* @package ibc.applications.transfer.v1
* @see proto type: ibc.applications.transfer.v1.MsgUpdateParams
*/
export interface MsgUpdateParams {
/**
* signer address
*/
signer: string;
/**
* params defines the transfer parameters to update.
*
* NOTE: All parameters must be supplied.
*/
params: Params;
}
export interface MsgUpdateParamsProtoMsg {
typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParams";
value: Uint8Array;
}
/**
* MsgUpdateParams is the Msg/UpdateParams request type.
* @name MsgUpdateParamsAmino
* @package ibc.applications.transfer.v1
* @see proto type: ibc.applications.transfer.v1.MsgUpdateParams
*/
export interface MsgUpdateParamsAmino {
/**
* signer address
*/
signer: string;
/**
* params defines the transfer parameters to update.
*
* NOTE: All parameters must be supplied.
*/
params: ParamsAmino;
}
export interface MsgUpdateParamsAminoMsg {
type: "cosmos-sdk/MsgUpdateParams";
value: MsgUpdateParamsAmino;
}
/**
* MsgUpdateParamsResponse defines the response structure for executing a
* MsgUpdateParams message.
* @name MsgUpdateParamsResponse
* @package ibc.applications.transfer.v1
* @see proto type: ibc.applications.transfer.v1.MsgUpdateParamsResponse
*/
export interface MsgUpdateParamsResponse {
}
export interface MsgUpdateParamsResponseProtoMsg {
typeUrl: "/ibc.applications.transfer.v1.MsgUpdateParamsResponse";
value: Uint8Array;
}
/**
* MsgUpdateParamsResponse defines the response structure for executing a
* MsgUpdateParams message.
* @name MsgUpdateParamsResponseAmino
* @package ibc.applications.transfer.v1
* @see proto type: ibc.applications.transfer.v1.MsgUpdateParamsResponse
*/
export interface MsgUpdateParamsResponseAmino {
}
export interface MsgUpdateParamsResponseAminoMsg {
type: "cosmos-sdk/MsgUpdateParamsResponse";
value: MsgUpdateParamsResponseAmino;
}
/**
* MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between
* ICS20 enabled chains. See ICS Spec here:
* https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures
* @name MsgTransfer
* @package ibc.applications.transfer.v1
* @see proto type: ibc.applications.transfer.v1.MsgTransfer
*/
export declare const MsgTransfer: {
typeUrl: string;
aminoType: string;
is(o: any): o is MsgTransfer;
isAmino(o: any): o is MsgTransferAmino;
encode(message: MsgTransfer, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MsgTransfer;
fromPartial(object: DeepPartial<MsgTransfer>): MsgTransfer;
fromAmino(object: MsgTransferAmino): MsgTransfer;
toAmino(message: MsgTransfer): MsgTransferAmino;
fromAminoMsg(object: MsgTransferAminoMsg): MsgTransfer;
toAminoMsg(message: MsgTransfer): MsgTransferAminoMsg;
fromProtoMsg(message: MsgTransferProtoMsg): MsgTransfer;
toProto(message: MsgTransfer): Uint8Array;
toProtoMsg(message: MsgTransfer): MsgTransferProtoMsg;
registerTypeUrl(): void;
};
/**
* MsgTransferResponse defines the Msg/Transfer response type.
* @name MsgTransferResponse
* @package ibc.applications.transfer.v1
* @see proto type: ibc.applications.transfer.v1.MsgTransferResponse
*/
export declare const MsgTransferResponse: {
typeUrl: string;
aminoType: string;
is(o: any): o is MsgTransferResponse;
isAmino(o: any): o is MsgTransferResponseAmino;
encode(message: MsgTransferResponse, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MsgTransferResponse;
fromPartial(object: DeepPartial<MsgTransferResponse>): MsgTransferResponse;
fromAmino(object: MsgTransferResponseAmino): MsgTransferResponse;
toAmino(message: MsgTransferResponse): MsgTransferResponseAmino;
fromAminoMsg(object: MsgTransferResponseAminoMsg): MsgTransferResponse;
toAminoMsg(message: MsgTransferResponse): MsgTransferResponseAminoMsg;
fromProtoMsg(message: MsgTransferResponseProtoMsg): MsgTransferResponse;
toProto(message: MsgTransferResponse): Uint8Array;
toProtoMsg(message: MsgTransferResponse): MsgTransferResponseProtoMsg;
registerTypeUrl(): void;
};
/**
* MsgUpdateParams is the Msg/UpdateParams request type.
* @name MsgUpdateParams
* @package ibc.applications.transfer.v1
* @see proto type: ibc.applications.transfer.v1.MsgUpdateParams
*/
export declare const MsgUpdateParams: {
typeUrl: string;
aminoType: string;
is(o: any): o is MsgUpdateParams;
isAmino(o: any): o is MsgUpdateParamsAmino;
encode(message: MsgUpdateParams, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateParams;
fromPartial(object: DeepPartial<MsgUpdateParams>): MsgUpdateParams;
fromAmino(object: MsgUpdateParamsAmino): MsgUpdateParams;
toAmino(message: MsgUpdateParams): MsgUpdateParamsAmino;
fromAminoMsg(object: MsgUpdateParamsAminoMsg): MsgUpdateParams;
toAminoMsg(message: MsgUpdateParams): MsgUpdateParamsAminoMsg;
fromProtoMsg(message: MsgUpdateParamsProtoMsg): MsgUpdateParams;
toProto(message: MsgUpdateParams): Uint8Array;
toProtoMsg(message: MsgUpdateParams): MsgUpdateParamsProtoMsg;
registerTypeUrl(): void;
};
/**
* MsgUpdateParamsResponse defines the response structure for executing a
* MsgUpdateParams message.
* @name MsgUpdateParamsResponse
* @package ibc.applications.transfer.v1
* @see proto type: ibc.applications.transfer.v1.MsgUpdateParamsResponse
*/
export declare const MsgUpdateParamsResponse: {
typeUrl: string;
aminoType: string;
is(o: any): o is MsgUpdateParamsResponse;
isAmino(o: any): o is MsgUpdateParamsResponseAmino;
encode(_: MsgUpdateParamsResponse, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): MsgUpdateParamsResponse;
fromPartial(_: DeepPartial<MsgUpdateParamsResponse>): MsgUpdateParamsResponse;
fromAmino(_: MsgUpdateParamsResponseAmino): MsgUpdateParamsResponse;
toAmino(_: MsgUpdateParamsResponse): MsgUpdateParamsResponseAmino;
fromAminoMsg(object: MsgUpdateParamsResponseAminoMsg): MsgUpdateParamsResponse;
toAminoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseAminoMsg;
fromProtoMsg(message: MsgUpdateParamsResponseProtoMsg): MsgUpdateParamsResponse;
toProto(message: MsgUpdateParamsResponse): Uint8Array;
toProtoMsg(message: MsgUpdateParamsResponse): MsgUpdateParamsResponseProtoMsg;
registerTypeUrl(): void;
};