interchainjs
Version:
InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.
187 lines (186 loc) • 7.77 kB
TypeScript
import { BinaryReader, BinaryWriter } from "../binary";
import { DeepPartial } from "../helpers";
export declare enum ScalarType {
SCALAR_TYPE_UNSPECIFIED = 0,
SCALAR_TYPE_STRING = 1,
SCALAR_TYPE_BYTES = 2,
UNRECOGNIZED = -1
}
export declare const ScalarTypeAmino: typeof ScalarType;
export declare function scalarTypeFromJSON(object: any): ScalarType;
export declare function scalarTypeToJSON(object: ScalarType): string;
/**
* InterfaceDescriptor describes an interface type to be used with
* accepts_interface and implements_interface and declared by declare_interface.
* @name InterfaceDescriptor
* @package cosmos_proto
* @see proto type: cosmos_proto.InterfaceDescriptor
*/
export interface InterfaceDescriptor {
/**
* name is the name of the interface. It should be a short-name (without
* a period) such that the fully qualified name of the interface will be
* package.name, ex. for the package a.b and interface named C, the
* fully-qualified name will be a.b.C.
*/
name: string;
/**
* description is a human-readable description of the interface and its
* purpose.
*/
description: string;
}
export interface InterfaceDescriptorProtoMsg {
typeUrl: "/cosmos_proto.InterfaceDescriptor";
value: Uint8Array;
}
/**
* InterfaceDescriptor describes an interface type to be used with
* accepts_interface and implements_interface and declared by declare_interface.
* @name InterfaceDescriptorAmino
* @package cosmos_proto
* @see proto type: cosmos_proto.InterfaceDescriptor
*/
export interface InterfaceDescriptorAmino {
/**
* name is the name of the interface. It should be a short-name (without
* a period) such that the fully qualified name of the interface will be
* package.name, ex. for the package a.b and interface named C, the
* fully-qualified name will be a.b.C.
*/
name: string;
/**
* description is a human-readable description of the interface and its
* purpose.
*/
description: string;
}
export interface InterfaceDescriptorAminoMsg {
type: "/cosmos_proto.InterfaceDescriptor";
value: InterfaceDescriptorAmino;
}
/**
* ScalarDescriptor describes an scalar type to be used with
* the scalar field option and declared by declare_scalar.
* Scalars extend simple protobuf built-in types with additional
* syntax and semantics, for instance to represent big integers.
* Scalars should ideally define an encoding such that there is only one
* valid syntactical representation for a given semantic meaning,
* i.e. the encoding should be deterministic.
* @name ScalarDescriptor
* @package cosmos_proto
* @see proto type: cosmos_proto.ScalarDescriptor
*/
export interface ScalarDescriptor {
/**
* name is the name of the scalar. It should be a short-name (without
* a period) such that the fully qualified name of the scalar will be
* package.name, ex. for the package a.b and scalar named C, the
* fully-qualified name will be a.b.C.
*/
name: string;
/**
* description is a human-readable description of the scalar and its
* encoding format. For instance a big integer or decimal scalar should
* specify precisely the expected encoding format.
*/
description: string;
/**
* field_type is the type of field with which this scalar can be used.
* Scalars can be used with one and only one type of field so that
* encoding standards and simple and clear. Currently only string and
* bytes fields are supported for scalars.
*/
fieldType: ScalarType[];
}
export interface ScalarDescriptorProtoMsg {
typeUrl: "/cosmos_proto.ScalarDescriptor";
value: Uint8Array;
}
/**
* ScalarDescriptor describes an scalar type to be used with
* the scalar field option and declared by declare_scalar.
* Scalars extend simple protobuf built-in types with additional
* syntax and semantics, for instance to represent big integers.
* Scalars should ideally define an encoding such that there is only one
* valid syntactical representation for a given semantic meaning,
* i.e. the encoding should be deterministic.
* @name ScalarDescriptorAmino
* @package cosmos_proto
* @see proto type: cosmos_proto.ScalarDescriptor
*/
export interface ScalarDescriptorAmino {
/**
* name is the name of the scalar. It should be a short-name (without
* a period) such that the fully qualified name of the scalar will be
* package.name, ex. for the package a.b and scalar named C, the
* fully-qualified name will be a.b.C.
*/
name: string;
/**
* description is a human-readable description of the scalar and its
* encoding format. For instance a big integer or decimal scalar should
* specify precisely the expected encoding format.
*/
description: string;
/**
* field_type is the type of field with which this scalar can be used.
* Scalars can be used with one and only one type of field so that
* encoding standards and simple and clear. Currently only string and
* bytes fields are supported for scalars.
*/
field_type: ScalarType[];
}
export interface ScalarDescriptorAminoMsg {
type: "/cosmos_proto.ScalarDescriptor";
value: ScalarDescriptorAmino;
}
/**
* InterfaceDescriptor describes an interface type to be used with
* accepts_interface and implements_interface and declared by declare_interface.
* @name InterfaceDescriptor
* @package cosmos_proto
* @see proto type: cosmos_proto.InterfaceDescriptor
*/
export declare const InterfaceDescriptor: {
typeUrl: string;
is(o: any): o is InterfaceDescriptor;
isAmino(o: any): o is InterfaceDescriptorAmino;
encode(message: InterfaceDescriptor, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): InterfaceDescriptor;
fromPartial(object: DeepPartial<InterfaceDescriptor>): InterfaceDescriptor;
fromAmino(object: InterfaceDescriptorAmino): InterfaceDescriptor;
toAmino(message: InterfaceDescriptor): InterfaceDescriptorAmino;
fromAminoMsg(object: InterfaceDescriptorAminoMsg): InterfaceDescriptor;
fromProtoMsg(message: InterfaceDescriptorProtoMsg): InterfaceDescriptor;
toProto(message: InterfaceDescriptor): Uint8Array;
toProtoMsg(message: InterfaceDescriptor): InterfaceDescriptorProtoMsg;
registerTypeUrl(): void;
};
/**
* ScalarDescriptor describes an scalar type to be used with
* the scalar field option and declared by declare_scalar.
* Scalars extend simple protobuf built-in types with additional
* syntax and semantics, for instance to represent big integers.
* Scalars should ideally define an encoding such that there is only one
* valid syntactical representation for a given semantic meaning,
* i.e. the encoding should be deterministic.
* @name ScalarDescriptor
* @package cosmos_proto
* @see proto type: cosmos_proto.ScalarDescriptor
*/
export declare const ScalarDescriptor: {
typeUrl: string;
is(o: any): o is ScalarDescriptor;
isAmino(o: any): o is ScalarDescriptorAmino;
encode(message: ScalarDescriptor, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): ScalarDescriptor;
fromPartial(object: DeepPartial<ScalarDescriptor>): ScalarDescriptor;
fromAmino(object: ScalarDescriptorAmino): ScalarDescriptor;
toAmino(message: ScalarDescriptor): ScalarDescriptorAmino;
fromAminoMsg(object: ScalarDescriptorAminoMsg): ScalarDescriptor;
fromProtoMsg(message: ScalarDescriptorProtoMsg): ScalarDescriptor;
toProto(message: ScalarDescriptor): Uint8Array;
toProtoMsg(message: ScalarDescriptor): ScalarDescriptorProtoMsg;
registerTypeUrl(): void;
};