UNPKG

interchainjs

Version:

InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.

260 lines (259 loc) 9.67 kB
import { Token, TokenAmino } from "./token"; import { Hop, HopAmino } from "../v1/transfer"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { DeepPartial } from "../../../../helpers"; /** * FungibleTokenPacketData defines a struct for the packet payload * See FungibleTokenPacketData spec: * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures * @name FungibleTokenPacketData * @package ibc.applications.transfer.v2 * @see proto type: ibc.applications.transfer.v2.FungibleTokenPacketData */ export interface FungibleTokenPacketData { /** * the token denomination to be transferred */ denom: string; /** * the token amount to be transferred */ amount: string; /** * the sender address */ sender: string; /** * the recipient address on the destination chain */ receiver: string; /** * optional memo */ memo: string; } export interface FungibleTokenPacketDataProtoMsg { typeUrl: "/ibc.applications.transfer.v2.FungibleTokenPacketData"; value: Uint8Array; } /** * FungibleTokenPacketData defines a struct for the packet payload * See FungibleTokenPacketData spec: * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures * @name FungibleTokenPacketDataAmino * @package ibc.applications.transfer.v2 * @see proto type: ibc.applications.transfer.v2.FungibleTokenPacketData */ export interface FungibleTokenPacketDataAmino { /** * the token denomination to be transferred */ denom: string; /** * the token amount to be transferred */ amount: string; /** * the sender address */ sender: string; /** * the recipient address on the destination chain */ receiver: string; /** * optional memo */ memo: string; } export interface FungibleTokenPacketDataAminoMsg { type: "cosmos-sdk/FungibleTokenPacketData"; value: FungibleTokenPacketDataAmino; } /** * FungibleTokenPacketDataV2 defines a struct for the packet payload * See FungibleTokenPacketDataV2 spec: * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures * @name FungibleTokenPacketDataV2 * @package ibc.applications.transfer.v2 * @see proto type: ibc.applications.transfer.v2.FungibleTokenPacketDataV2 */ export interface FungibleTokenPacketDataV2 { /** * the tokens to be transferred */ tokens: Token[]; /** * the sender address */ sender: string; /** * the recipient address on the destination chain */ receiver: string; /** * optional memo */ memo: string; /** * optional forwarding information */ forwarding: ForwardingPacketData; } export interface FungibleTokenPacketDataV2ProtoMsg { typeUrl: "/ibc.applications.transfer.v2.FungibleTokenPacketDataV2"; value: Uint8Array; } /** * FungibleTokenPacketDataV2 defines a struct for the packet payload * See FungibleTokenPacketDataV2 spec: * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures * @name FungibleTokenPacketDataV2Amino * @package ibc.applications.transfer.v2 * @see proto type: ibc.applications.transfer.v2.FungibleTokenPacketDataV2 */ export interface FungibleTokenPacketDataV2Amino { /** * the tokens to be transferred */ tokens: TokenAmino[]; /** * the sender address */ sender: string; /** * the recipient address on the destination chain */ receiver: string; /** * optional memo */ memo: string; /** * optional forwarding information */ forwarding: ForwardingPacketDataAmino; } export interface FungibleTokenPacketDataV2AminoMsg { type: "cosmos-sdk/FungibleTokenPacketDataV2"; value: FungibleTokenPacketDataV2Amino; } /** * ForwardingPacketData defines a list of port ID, channel ID pairs determining the path * through which a packet must be forwarded, and the destination memo string to be used in the * final destination of the tokens. * @name ForwardingPacketData * @package ibc.applications.transfer.v2 * @see proto type: ibc.applications.transfer.v2.ForwardingPacketData */ export interface ForwardingPacketData { /** * optional memo consumed by final destination chain */ destinationMemo: string; /** * optional intermediate path through which packet will be forwarded. */ hops: Hop[]; } export interface ForwardingPacketDataProtoMsg { typeUrl: "/ibc.applications.transfer.v2.ForwardingPacketData"; value: Uint8Array; } /** * ForwardingPacketData defines a list of port ID, channel ID pairs determining the path * through which a packet must be forwarded, and the destination memo string to be used in the * final destination of the tokens. * @name ForwardingPacketDataAmino * @package ibc.applications.transfer.v2 * @see proto type: ibc.applications.transfer.v2.ForwardingPacketData */ export interface ForwardingPacketDataAmino { /** * optional memo consumed by final destination chain */ destination_memo: string; /** * optional intermediate path through which packet will be forwarded. */ hops: HopAmino[]; } export interface ForwardingPacketDataAminoMsg { type: "cosmos-sdk/ForwardingPacketData"; value: ForwardingPacketDataAmino; } /** * FungibleTokenPacketData defines a struct for the packet payload * See FungibleTokenPacketData spec: * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures * @name FungibleTokenPacketData * @package ibc.applications.transfer.v2 * @see proto type: ibc.applications.transfer.v2.FungibleTokenPacketData */ export declare const FungibleTokenPacketData: { typeUrl: string; aminoType: string; is(o: any): o is FungibleTokenPacketData; isAmino(o: any): o is FungibleTokenPacketDataAmino; encode(message: FungibleTokenPacketData, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): FungibleTokenPacketData; fromPartial(object: DeepPartial<FungibleTokenPacketData>): FungibleTokenPacketData; fromAmino(object: FungibleTokenPacketDataAmino): FungibleTokenPacketData; toAmino(message: FungibleTokenPacketData): FungibleTokenPacketDataAmino; fromAminoMsg(object: FungibleTokenPacketDataAminoMsg): FungibleTokenPacketData; toAminoMsg(message: FungibleTokenPacketData): FungibleTokenPacketDataAminoMsg; fromProtoMsg(message: FungibleTokenPacketDataProtoMsg): FungibleTokenPacketData; toProto(message: FungibleTokenPacketData): Uint8Array; toProtoMsg(message: FungibleTokenPacketData): FungibleTokenPacketDataProtoMsg; registerTypeUrl(): void; }; /** * FungibleTokenPacketDataV2 defines a struct for the packet payload * See FungibleTokenPacketDataV2 spec: * https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures * @name FungibleTokenPacketDataV2 * @package ibc.applications.transfer.v2 * @see proto type: ibc.applications.transfer.v2.FungibleTokenPacketDataV2 */ export declare const FungibleTokenPacketDataV2: { typeUrl: string; aminoType: string; is(o: any): o is FungibleTokenPacketDataV2; isAmino(o: any): o is FungibleTokenPacketDataV2Amino; encode(message: FungibleTokenPacketDataV2, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): FungibleTokenPacketDataV2; fromPartial(object: DeepPartial<FungibleTokenPacketDataV2>): FungibleTokenPacketDataV2; fromAmino(object: FungibleTokenPacketDataV2Amino): FungibleTokenPacketDataV2; toAmino(message: FungibleTokenPacketDataV2): FungibleTokenPacketDataV2Amino; fromAminoMsg(object: FungibleTokenPacketDataV2AminoMsg): FungibleTokenPacketDataV2; toAminoMsg(message: FungibleTokenPacketDataV2): FungibleTokenPacketDataV2AminoMsg; fromProtoMsg(message: FungibleTokenPacketDataV2ProtoMsg): FungibleTokenPacketDataV2; toProto(message: FungibleTokenPacketDataV2): Uint8Array; toProtoMsg(message: FungibleTokenPacketDataV2): FungibleTokenPacketDataV2ProtoMsg; registerTypeUrl(): void; }; /** * ForwardingPacketData defines a list of port ID, channel ID pairs determining the path * through which a packet must be forwarded, and the destination memo string to be used in the * final destination of the tokens. * @name ForwardingPacketData * @package ibc.applications.transfer.v2 * @see proto type: ibc.applications.transfer.v2.ForwardingPacketData */ export declare const ForwardingPacketData: { typeUrl: string; aminoType: string; is(o: any): o is ForwardingPacketData; isAmino(o: any): o is ForwardingPacketDataAmino; encode(message: ForwardingPacketData, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): ForwardingPacketData; fromPartial(object: DeepPartial<ForwardingPacketData>): ForwardingPacketData; fromAmino(object: ForwardingPacketDataAmino): ForwardingPacketData; toAmino(message: ForwardingPacketData): ForwardingPacketDataAmino; fromAminoMsg(object: ForwardingPacketDataAminoMsg): ForwardingPacketData; toAminoMsg(message: ForwardingPacketData): ForwardingPacketDataAminoMsg; fromProtoMsg(message: ForwardingPacketDataProtoMsg): ForwardingPacketData; toProto(message: ForwardingPacketData): Uint8Array; toProtoMsg(message: ForwardingPacketData): ForwardingPacketDataProtoMsg; registerTypeUrl(): void; };