interchainjs
Version:
InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.
130 lines (129 loc) • 3.78 kB
TypeScript
import { Hop, HopAmino } from "../v1/transfer";
import { BinaryReader, BinaryWriter } from "../../../../binary";
import { DeepPartial } from "../../../../helpers";
/**
* Token defines a struct which represents a token to be transferred.
* @name Token
* @package ibc.applications.transfer.v2
* @see proto type: ibc.applications.transfer.v2.Token
*/
export interface Token {
/**
* the token denomination
*/
denom: Denom;
/**
* the token amount to be transferred
*/
amount: string;
}
export interface TokenProtoMsg {
typeUrl: "/ibc.applications.transfer.v2.Token";
value: Uint8Array;
}
/**
* Token defines a struct which represents a token to be transferred.
* @name TokenAmino
* @package ibc.applications.transfer.v2
* @see proto type: ibc.applications.transfer.v2.Token
*/
export interface TokenAmino {
/**
* the token denomination
*/
denom: DenomAmino;
/**
* the token amount to be transferred
*/
amount: string;
}
export interface TokenAminoMsg {
type: "cosmos-sdk/Token";
value: TokenAmino;
}
/**
* Denom holds the base denom of a Token and a trace of the chains it was sent through.
* @name Denom
* @package ibc.applications.transfer.v2
* @see proto type: ibc.applications.transfer.v2.Denom
*/
export interface Denom {
/**
* the base token denomination
*/
base: string;
/**
* the trace of the token
*/
trace: Hop[];
}
export interface DenomProtoMsg {
typeUrl: "/ibc.applications.transfer.v2.Denom";
value: Uint8Array;
}
/**
* Denom holds the base denom of a Token and a trace of the chains it was sent through.
* @name DenomAmino
* @package ibc.applications.transfer.v2
* @see proto type: ibc.applications.transfer.v2.Denom
*/
export interface DenomAmino {
/**
* the base token denomination
*/
base: string;
/**
* the trace of the token
*/
trace: HopAmino[];
}
export interface DenomAminoMsg {
type: "cosmos-sdk/Denom";
value: DenomAmino;
}
/**
* Token defines a struct which represents a token to be transferred.
* @name Token
* @package ibc.applications.transfer.v2
* @see proto type: ibc.applications.transfer.v2.Token
*/
export declare const Token: {
typeUrl: string;
aminoType: string;
is(o: any): o is Token;
isAmino(o: any): o is TokenAmino;
encode(message: Token, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): Token;
fromPartial(object: DeepPartial<Token>): Token;
fromAmino(object: TokenAmino): Token;
toAmino(message: Token): TokenAmino;
fromAminoMsg(object: TokenAminoMsg): Token;
toAminoMsg(message: Token): TokenAminoMsg;
fromProtoMsg(message: TokenProtoMsg): Token;
toProto(message: Token): Uint8Array;
toProtoMsg(message: Token): TokenProtoMsg;
registerTypeUrl(): void;
};
/**
* Denom holds the base denom of a Token and a trace of the chains it was sent through.
* @name Denom
* @package ibc.applications.transfer.v2
* @see proto type: ibc.applications.transfer.v2.Denom
*/
export declare const Denom: {
typeUrl: string;
aminoType: string;
is(o: any): o is Denom;
isAmino(o: any): o is DenomAmino;
encode(message: Denom, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): Denom;
fromPartial(object: DeepPartial<Denom>): Denom;
fromAmino(object: DenomAmino): Denom;
toAmino(message: Denom): DenomAmino;
fromAminoMsg(object: DenomAminoMsg): Denom;
toAminoMsg(message: Denom): DenomAminoMsg;
fromProtoMsg(message: DenomProtoMsg): Denom;
toProto(message: Denom): Uint8Array;
toProtoMsg(message: Denom): DenomProtoMsg;
registerTypeUrl(): void;
};