proto-signing: Update ts-proto-generated codec

This commit is contained in:
willclarktech 2021-01-27 14:52:18 +00:00
parent 8b25f8540b
commit ecbbc05e63
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7
22 changed files with 2544 additions and 2651 deletions

View File

@ -1,124 +1,82 @@
/* eslint-disable */
import { Coin } from "../../../cosmos/base/v1beta1/coin";
import { Writer, Reader } from "protobufjs/minimal";
import * as Long from "long";
/**
* Params defines the parameters for the bank module.
*/
export const protobufPackage = "cosmos.bank.v1beta1";
/** Params defines the parameters for the bank module. */
export interface Params {
sendEnabled: SendEnabled[];
defaultSendEnabled: boolean;
}
/**
* SendEnabled maps coin denom to a send_enabled status (whether a denom is
* sendable).
* SendEnabled maps coin denom to a send_enabled status (whether a denom is
* sendable).
*/
export interface SendEnabled {
denom: string;
enabled: boolean;
}
/**
* Input models transaction input.
*/
/** Input models transaction input. */
export interface Input {
address: string;
coins: Coin[];
}
/**
* Output models transaction outputs.
*/
/** Output models transaction outputs. */
export interface Output {
address: string;
coins: Coin[];
}
/**
* Supply represents a struct that passively keeps track of the total supply
* amounts in the network.
* Supply represents a struct that passively keeps track of the total supply
* amounts in the network.
*/
export interface Supply {
total: Coin[];
}
/**
* DenomUnit represents a struct that describes a given
* denomination unit of the basic token.
* DenomUnit represents a struct that describes a given
* denomination unit of the basic token.
*/
export interface DenomUnit {
/**
* denom represents the string name of the given denom unit (e.g uatom).
*/
/** denom represents the string name of the given denom unit (e.g uatom). */
denom: string;
/**
* exponent represents power of 10 exponent that one must
* raise the base_denom to in order to equal the given DenomUnit's denom
* 1 denom = 1^exponent base_denom
* (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
* exponent = 6, thus: 1 atom = 10^6 uatom).
* exponent represents power of 10 exponent that one must
* raise the base_denom to in order to equal the given DenomUnit's denom
* 1 denom = 1^exponent base_denom
* (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
* exponent = 6, thus: 1 atom = 10^6 uatom).
*/
exponent: number;
/**
* aliases is a list of string aliases for the given denom
*/
/** aliases is a list of string aliases for the given denom */
aliases: string[];
}
/**
* Metadata represents a struct that describes
* a basic token.
* Metadata represents a struct that describes
* a basic token.
*/
export interface Metadata {
description: string;
/**
* denom_units represents the list of DenomUnit's for a given coin
*/
/** denom_units represents the list of DenomUnit's for a given coin */
denomUnits: DenomUnit[];
/**
* base represents the base denom (should be the DenomUnit with exponent = 0).
*/
/** base represents the base denom (should be the DenomUnit with exponent = 0). */
base: string;
/**
* display indicates the suggested denom that should be
* displayed in clients.
* display indicates the suggested denom that should be
* displayed in clients.
*/
display: string;
}
const baseParams: object = {
defaultSendEnabled: false,
};
const baseSendEnabled: object = {
denom: "",
enabled: false,
};
const baseInput: object = {
address: "",
};
const baseOutput: object = {
address: "",
};
const baseSupply: object = {};
const baseDenomUnit: object = {
denom: "",
exponent: 0,
aliases: "",
};
const baseMetadata: object = {
description: "",
base: "",
display: "",
};
export const protobufPackage = "cosmos.bank.v1beta1";
const baseParams: object = { defaultSendEnabled: false };
export const Params = {
encode(message: Params, writer: Writer = Writer.create()): Writer {
@ -128,7 +86,8 @@ export const Params = {
writer.uint32(16).bool(message.defaultSendEnabled);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): Params {
decode(input: Reader | Uint8Array, length?: number): Params {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseParams } as Params;
@ -149,6 +108,7 @@ export const Params = {
}
return message;
},
fromJSON(object: any): Params {
const message = { ...baseParams } as Params;
message.sendEnabled = [];
@ -164,6 +124,7 @@ export const Params = {
}
return message;
},
fromPartial(object: DeepPartial<Params>): Params {
const message = { ...baseParams } as Params;
message.sendEnabled = [];
@ -179,6 +140,7 @@ export const Params = {
}
return message;
},
toJSON(message: Params): unknown {
const obj: any = {};
if (message.sendEnabled) {
@ -191,13 +153,16 @@ export const Params = {
},
};
const baseSendEnabled: object = { denom: "", enabled: false };
export const SendEnabled = {
encode(message: SendEnabled, writer: Writer = Writer.create()): Writer {
writer.uint32(10).string(message.denom);
writer.uint32(16).bool(message.enabled);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): SendEnabled {
decode(input: Reader | Uint8Array, length?: number): SendEnabled {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseSendEnabled } as SendEnabled;
@ -217,6 +182,7 @@ export const SendEnabled = {
}
return message;
},
fromJSON(object: any): SendEnabled {
const message = { ...baseSendEnabled } as SendEnabled;
if (object.denom !== undefined && object.denom !== null) {
@ -231,6 +197,7 @@ export const SendEnabled = {
}
return message;
},
fromPartial(object: DeepPartial<SendEnabled>): SendEnabled {
const message = { ...baseSendEnabled } as SendEnabled;
if (object.denom !== undefined && object.denom !== null) {
@ -245,6 +212,7 @@ export const SendEnabled = {
}
return message;
},
toJSON(message: SendEnabled): unknown {
const obj: any = {};
message.denom !== undefined && (obj.denom = message.denom);
@ -253,6 +221,8 @@ export const SendEnabled = {
},
};
const baseInput: object = { address: "" };
export const Input = {
encode(message: Input, writer: Writer = Writer.create()): Writer {
writer.uint32(10).string(message.address);
@ -261,7 +231,8 @@ export const Input = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): Input {
decode(input: Reader | Uint8Array, length?: number): Input {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseInput } as Input;
@ -282,6 +253,7 @@ export const Input = {
}
return message;
},
fromJSON(object: any): Input {
const message = { ...baseInput } as Input;
message.coins = [];
@ -297,6 +269,7 @@ export const Input = {
}
return message;
},
fromPartial(object: DeepPartial<Input>): Input {
const message = { ...baseInput } as Input;
message.coins = [];
@ -312,6 +285,7 @@ export const Input = {
}
return message;
},
toJSON(message: Input): unknown {
const obj: any = {};
message.address !== undefined && (obj.address = message.address);
@ -324,6 +298,8 @@ export const Input = {
},
};
const baseOutput: object = { address: "" };
export const Output = {
encode(message: Output, writer: Writer = Writer.create()): Writer {
writer.uint32(10).string(message.address);
@ -332,7 +308,8 @@ export const Output = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): Output {
decode(input: Reader | Uint8Array, length?: number): Output {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseOutput } as Output;
@ -353,6 +330,7 @@ export const Output = {
}
return message;
},
fromJSON(object: any): Output {
const message = { ...baseOutput } as Output;
message.coins = [];
@ -368,6 +346,7 @@ export const Output = {
}
return message;
},
fromPartial(object: DeepPartial<Output>): Output {
const message = { ...baseOutput } as Output;
message.coins = [];
@ -383,6 +362,7 @@ export const Output = {
}
return message;
},
toJSON(message: Output): unknown {
const obj: any = {};
message.address !== undefined && (obj.address = message.address);
@ -395,6 +375,8 @@ export const Output = {
},
};
const baseSupply: object = {};
export const Supply = {
encode(message: Supply, writer: Writer = Writer.create()): Writer {
for (const v of message.total) {
@ -402,7 +384,8 @@ export const Supply = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): Supply {
decode(input: Reader | Uint8Array, length?: number): Supply {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseSupply } as Supply;
@ -420,6 +403,7 @@ export const Supply = {
}
return message;
},
fromJSON(object: any): Supply {
const message = { ...baseSupply } as Supply;
message.total = [];
@ -430,6 +414,7 @@ export const Supply = {
}
return message;
},
fromPartial(object: DeepPartial<Supply>): Supply {
const message = { ...baseSupply } as Supply;
message.total = [];
@ -440,6 +425,7 @@ export const Supply = {
}
return message;
},
toJSON(message: Supply): unknown {
const obj: any = {};
if (message.total) {
@ -451,6 +437,8 @@ export const Supply = {
},
};
const baseDenomUnit: object = { denom: "", exponent: 0, aliases: "" };
export const DenomUnit = {
encode(message: DenomUnit, writer: Writer = Writer.create()): Writer {
writer.uint32(10).string(message.denom);
@ -460,7 +448,8 @@ export const DenomUnit = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): DenomUnit {
decode(input: Reader | Uint8Array, length?: number): DenomUnit {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseDenomUnit } as DenomUnit;
@ -484,6 +473,7 @@ export const DenomUnit = {
}
return message;
},
fromJSON(object: any): DenomUnit {
const message = { ...baseDenomUnit } as DenomUnit;
message.aliases = [];
@ -504,6 +494,7 @@ export const DenomUnit = {
}
return message;
},
fromPartial(object: DeepPartial<DenomUnit>): DenomUnit {
const message = { ...baseDenomUnit } as DenomUnit;
message.aliases = [];
@ -524,6 +515,7 @@ export const DenomUnit = {
}
return message;
},
toJSON(message: DenomUnit): unknown {
const obj: any = {};
message.denom !== undefined && (obj.denom = message.denom);
@ -537,6 +529,8 @@ export const DenomUnit = {
},
};
const baseMetadata: object = { description: "", base: "", display: "" };
export const Metadata = {
encode(message: Metadata, writer: Writer = Writer.create()): Writer {
writer.uint32(10).string(message.description);
@ -547,7 +541,8 @@ export const Metadata = {
writer.uint32(34).string(message.display);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): Metadata {
decode(input: Reader | Uint8Array, length?: number): Metadata {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseMetadata } as Metadata;
@ -574,6 +569,7 @@ export const Metadata = {
}
return message;
},
fromJSON(object: any): Metadata {
const message = { ...baseMetadata } as Metadata;
message.denomUnits = [];
@ -599,6 +595,7 @@ export const Metadata = {
}
return message;
},
fromPartial(object: DeepPartial<Metadata>): Metadata {
const message = { ...baseMetadata } as Metadata;
message.denomUnits = [];
@ -624,6 +621,7 @@ export const Metadata = {
}
return message;
},
toJSON(message: Metadata): unknown {
const obj: any = {};
message.description !== undefined && (obj.description = message.description);
@ -638,7 +636,7 @@ export const Metadata = {
},
};
type Builtin = Date | Function | Uint8Array | string | number | undefined;
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

View File

@ -1,86 +1,31 @@
/* eslint-disable */
import { Reader, Writer } from "protobufjs/minimal";
import { Coin } from "../../../cosmos/base/v1beta1/coin";
import { Input, Output } from "../../../cosmos/bank/v1beta1/bank";
import { Reader, Writer } from "protobufjs/minimal";
import * as Long from "long";
/**
* MsgSend represents a message to send coins from one account to another.
*/
export const protobufPackage = "cosmos.bank.v1beta1";
/** MsgSend represents a message to send coins from one account to another. */
export interface MsgSend {
fromAddress: string;
toAddress: string;
amount: Coin[];
}
/**
* MsgSendResponse defines the Msg/Send response type.
*/
/** MsgSendResponse defines the Msg/Send response type. */
export interface MsgSendResponse {}
/**
* MsgMultiSend represents an arbitrary multi-in, multi-out send message.
*/
/** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */
export interface MsgMultiSend {
inputs: Input[];
outputs: Output[];
}
/**
* MsgMultiSendResponse defines the Msg/MultiSend response type.
*/
/** MsgMultiSendResponse defines the Msg/MultiSend response type. */
export interface MsgMultiSendResponse {}
const baseMsgSend: object = {
fromAddress: "",
toAddress: "",
};
const baseMsgSendResponse: object = {};
const baseMsgMultiSend: object = {};
const baseMsgMultiSendResponse: object = {};
/**
* Msg defines the bank Msg service.
*/
export interface Msg {
/**
* Send defines a method for sending coins from one account to another account.
*/
Send(request: MsgSend): Promise<MsgSendResponse>;
/**
* MultiSend defines a method for sending coins from some accounts to other accounts.
*/
MultiSend(request: MsgMultiSend): Promise<MsgMultiSendResponse>;
}
export class MsgClientImpl implements Msg {
private readonly rpc: Rpc;
constructor(rpc: Rpc) {
this.rpc = rpc;
}
Send(request: MsgSend): Promise<MsgSendResponse> {
const data = MsgSend.encode(request).finish();
const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "Send", data);
return promise.then((data) => MsgSendResponse.decode(new Reader(data)));
}
MultiSend(request: MsgMultiSend): Promise<MsgMultiSendResponse> {
const data = MsgMultiSend.encode(request).finish();
const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "MultiSend", data);
return promise.then((data) => MsgMultiSendResponse.decode(new Reader(data)));
}
}
interface Rpc {
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
}
export const protobufPackage = "cosmos.bank.v1beta1";
const baseMsgSend: object = { fromAddress: "", toAddress: "" };
export const MsgSend = {
encode(message: MsgSend, writer: Writer = Writer.create()): Writer {
@ -91,7 +36,8 @@ export const MsgSend = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): MsgSend {
decode(input: Reader | Uint8Array, length?: number): MsgSend {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseMsgSend } as MsgSend;
@ -115,6 +61,7 @@ export const MsgSend = {
}
return message;
},
fromJSON(object: any): MsgSend {
const message = { ...baseMsgSend } as MsgSend;
message.amount = [];
@ -135,6 +82,7 @@ export const MsgSend = {
}
return message;
},
fromPartial(object: DeepPartial<MsgSend>): MsgSend {
const message = { ...baseMsgSend } as MsgSend;
message.amount = [];
@ -155,6 +103,7 @@ export const MsgSend = {
}
return message;
},
toJSON(message: MsgSend): unknown {
const obj: any = {};
message.fromAddress !== undefined && (obj.fromAddress = message.fromAddress);
@ -168,11 +117,14 @@ export const MsgSend = {
},
};
const baseMsgSendResponse: object = {};
export const MsgSendResponse = {
encode(_: MsgSendResponse, writer: Writer = Writer.create()): Writer {
return writer;
},
decode(input: Uint8Array | Reader, length?: number): MsgSendResponse {
decode(input: Reader | Uint8Array, length?: number): MsgSendResponse {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseMsgSendResponse } as MsgSendResponse;
@ -186,20 +138,25 @@ export const MsgSendResponse = {
}
return message;
},
fromJSON(_: any): MsgSendResponse {
const message = { ...baseMsgSendResponse } as MsgSendResponse;
return message;
},
fromPartial(_: DeepPartial<MsgSendResponse>): MsgSendResponse {
const message = { ...baseMsgSendResponse } as MsgSendResponse;
return message;
},
toJSON(_: MsgSendResponse): unknown {
const obj: any = {};
return obj;
},
};
const baseMsgMultiSend: object = {};
export const MsgMultiSend = {
encode(message: MsgMultiSend, writer: Writer = Writer.create()): Writer {
for (const v of message.inputs) {
@ -210,7 +167,8 @@ export const MsgMultiSend = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): MsgMultiSend {
decode(input: Reader | Uint8Array, length?: number): MsgMultiSend {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseMsgMultiSend } as MsgMultiSend;
@ -232,6 +190,7 @@ export const MsgMultiSend = {
}
return message;
},
fromJSON(object: any): MsgMultiSend {
const message = { ...baseMsgMultiSend } as MsgMultiSend;
message.inputs = [];
@ -248,6 +207,7 @@ export const MsgMultiSend = {
}
return message;
},
fromPartial(object: DeepPartial<MsgMultiSend>): MsgMultiSend {
const message = { ...baseMsgMultiSend } as MsgMultiSend;
message.inputs = [];
@ -264,6 +224,7 @@ export const MsgMultiSend = {
}
return message;
},
toJSON(message: MsgMultiSend): unknown {
const obj: any = {};
if (message.inputs) {
@ -280,11 +241,14 @@ export const MsgMultiSend = {
},
};
const baseMsgMultiSendResponse: object = {};
export const MsgMultiSendResponse = {
encode(_: MsgMultiSendResponse, writer: Writer = Writer.create()): Writer {
return writer;
},
decode(input: Uint8Array | Reader, length?: number): MsgMultiSendResponse {
decode(input: Reader | Uint8Array, length?: number): MsgMultiSendResponse {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseMsgMultiSendResponse } as MsgMultiSendResponse;
@ -298,21 +262,54 @@ export const MsgMultiSendResponse = {
}
return message;
},
fromJSON(_: any): MsgMultiSendResponse {
const message = { ...baseMsgMultiSendResponse } as MsgMultiSendResponse;
return message;
},
fromPartial(_: DeepPartial<MsgMultiSendResponse>): MsgMultiSendResponse {
const message = { ...baseMsgMultiSendResponse } as MsgMultiSendResponse;
return message;
},
toJSON(_: MsgMultiSendResponse): unknown {
const obj: any = {};
return obj;
},
};
type Builtin = Date | Function | Uint8Array | string | number | undefined;
/** Msg defines the bank Msg service. */
export interface Msg {
/** Send defines a method for sending coins from one account to another account. */
Send(request: MsgSend): Promise<MsgSendResponse>;
/** MultiSend defines a method for sending coins from some accounts to other accounts. */
MultiSend(request: MsgMultiSend): Promise<MsgMultiSendResponse>;
}
export class MsgClientImpl implements Msg {
private readonly rpc: Rpc;
constructor(rpc: Rpc) {
this.rpc = rpc;
}
Send(request: MsgSend): Promise<MsgSendResponse> {
const data = MsgSend.encode(request).finish();
const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "methodDesc.name", data);
return promise.then((data) => MsgSendResponse.decode(new Reader(data)));
}
MultiSend(request: MsgMultiSend): Promise<MsgMultiSendResponse> {
const data = MsgMultiSend.encode(request).finish();
const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "methodDesc.name", data);
return promise.then((data) => MsgMultiSendResponse.decode(new Reader(data)));
}
}
interface Rpc {
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
}
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

View File

@ -1,11 +1,14 @@
/* eslint-disable */
import { Writer, Reader } from "protobufjs/minimal";
import * as Long from "long";
export const protobufPackage = "cosmos.base.v1beta1";
/**
* Coin defines a token with a denomination and an amount.
* Coin defines a token with a denomination and an amount.
*
* NOTE: The amount field is an Int which implements the custom method
* signatures required by gogoproto.
* NOTE: The amount field is an Int which implements the custom method
* signatures required by gogoproto.
*/
export interface Coin {
denom: string;
@ -13,49 +16,27 @@ export interface Coin {
}
/**
* DecCoin defines a token with a denomination and a decimal amount.
* DecCoin defines a token with a denomination and a decimal amount.
*
* NOTE: The amount field is an Dec which implements the custom method
* signatures required by gogoproto.
* NOTE: The amount field is an Dec which implements the custom method
* signatures required by gogoproto.
*/
export interface DecCoin {
denom: string;
amount: string;
}
/**
* IntProto defines a Protobuf wrapper around an Int object.
*/
/** IntProto defines a Protobuf wrapper around an Int object. */
export interface IntProto {
int: string;
}
/**
* DecProto defines a Protobuf wrapper around a Dec object.
*/
/** DecProto defines a Protobuf wrapper around a Dec object. */
export interface DecProto {
dec: string;
}
const baseCoin: object = {
denom: "",
amount: "",
};
const baseDecCoin: object = {
denom: "",
amount: "",
};
const baseIntProto: object = {
int: "",
};
const baseDecProto: object = {
dec: "",
};
export const protobufPackage = "cosmos.base.v1beta1";
const baseCoin: object = { denom: "", amount: "" };
export const Coin = {
encode(message: Coin, writer: Writer = Writer.create()): Writer {
@ -63,7 +44,8 @@ export const Coin = {
writer.uint32(18).string(message.amount);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): Coin {
decode(input: Reader | Uint8Array, length?: number): Coin {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseCoin } as Coin;
@ -83,6 +65,7 @@ export const Coin = {
}
return message;
},
fromJSON(object: any): Coin {
const message = { ...baseCoin } as Coin;
if (object.denom !== undefined && object.denom !== null) {
@ -97,6 +80,7 @@ export const Coin = {
}
return message;
},
fromPartial(object: DeepPartial<Coin>): Coin {
const message = { ...baseCoin } as Coin;
if (object.denom !== undefined && object.denom !== null) {
@ -111,6 +95,7 @@ export const Coin = {
}
return message;
},
toJSON(message: Coin): unknown {
const obj: any = {};
message.denom !== undefined && (obj.denom = message.denom);
@ -119,13 +104,16 @@ export const Coin = {
},
};
const baseDecCoin: object = { denom: "", amount: "" };
export const DecCoin = {
encode(message: DecCoin, writer: Writer = Writer.create()): Writer {
writer.uint32(10).string(message.denom);
writer.uint32(18).string(message.amount);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): DecCoin {
decode(input: Reader | Uint8Array, length?: number): DecCoin {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseDecCoin } as DecCoin;
@ -145,6 +133,7 @@ export const DecCoin = {
}
return message;
},
fromJSON(object: any): DecCoin {
const message = { ...baseDecCoin } as DecCoin;
if (object.denom !== undefined && object.denom !== null) {
@ -159,6 +148,7 @@ export const DecCoin = {
}
return message;
},
fromPartial(object: DeepPartial<DecCoin>): DecCoin {
const message = { ...baseDecCoin } as DecCoin;
if (object.denom !== undefined && object.denom !== null) {
@ -173,6 +163,7 @@ export const DecCoin = {
}
return message;
},
toJSON(message: DecCoin): unknown {
const obj: any = {};
message.denom !== undefined && (obj.denom = message.denom);
@ -181,12 +172,15 @@ export const DecCoin = {
},
};
const baseIntProto: object = { int: "" };
export const IntProto = {
encode(message: IntProto, writer: Writer = Writer.create()): Writer {
writer.uint32(10).string(message.int);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): IntProto {
decode(input: Reader | Uint8Array, length?: number): IntProto {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseIntProto } as IntProto;
@ -203,6 +197,7 @@ export const IntProto = {
}
return message;
},
fromJSON(object: any): IntProto {
const message = { ...baseIntProto } as IntProto;
if (object.int !== undefined && object.int !== null) {
@ -212,6 +207,7 @@ export const IntProto = {
}
return message;
},
fromPartial(object: DeepPartial<IntProto>): IntProto {
const message = { ...baseIntProto } as IntProto;
if (object.int !== undefined && object.int !== null) {
@ -221,6 +217,7 @@ export const IntProto = {
}
return message;
},
toJSON(message: IntProto): unknown {
const obj: any = {};
message.int !== undefined && (obj.int = message.int);
@ -228,12 +225,15 @@ export const IntProto = {
},
};
const baseDecProto: object = { dec: "" };
export const DecProto = {
encode(message: DecProto, writer: Writer = Writer.create()): Writer {
writer.uint32(10).string(message.dec);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): DecProto {
decode(input: Reader | Uint8Array, length?: number): DecProto {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseDecProto } as DecProto;
@ -250,6 +250,7 @@ export const DecProto = {
}
return message;
},
fromJSON(object: any): DecProto {
const message = { ...baseDecProto } as DecProto;
if (object.dec !== undefined && object.dec !== null) {
@ -259,6 +260,7 @@ export const DecProto = {
}
return message;
},
fromPartial(object: DeepPartial<DecProto>): DecProto {
const message = { ...baseDecProto } as DecProto;
if (object.dec !== undefined && object.dec !== null) {
@ -268,6 +270,7 @@ export const DecProto = {
}
return message;
},
toJSON(message: DecProto): unknown {
const obj: any = {};
message.dec !== undefined && (obj.dec = message.dec);
@ -275,7 +278,7 @@ export const DecProto = {
},
};
type Builtin = Date | Function | Uint8Array | string | number | undefined;
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

View File

@ -1,20 +1,23 @@
/* eslint-disable */
import { Writer, Reader } from "protobufjs/minimal";
import * as Long from "long";
export const protobufPackage = "cosmos.crypto.multisig.v1beta1";
/**
* MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey.
* See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers
* signed and with which modes.
* MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey.
* See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers
* signed and with which modes.
*/
export interface MultiSignature {
signatures: Uint8Array[];
}
/**
* CompactBitArray is an implementation of a space efficient bit array.
* This is used to ensure that the encoded data takes up a minimal amount of
* space after proto encoding.
* This is not thread safe, and is not intended for concurrent usage.
* CompactBitArray is an implementation of a space efficient bit array.
* This is used to ensure that the encoded data takes up a minimal amount of
* space after proto encoding.
* This is not thread safe, and is not intended for concurrent usage.
*/
export interface CompactBitArray {
extraBitsStored: number;
@ -23,12 +26,6 @@ export interface CompactBitArray {
const baseMultiSignature: object = {};
const baseCompactBitArray: object = {
extraBitsStored: 0,
};
export const protobufPackage = "cosmos.crypto.multisig.v1beta1";
export const MultiSignature = {
encode(message: MultiSignature, writer: Writer = Writer.create()): Writer {
for (const v of message.signatures) {
@ -36,7 +33,8 @@ export const MultiSignature = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): MultiSignature {
decode(input: Reader | Uint8Array, length?: number): MultiSignature {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseMultiSignature } as MultiSignature;
@ -54,6 +52,7 @@ export const MultiSignature = {
}
return message;
},
fromJSON(object: any): MultiSignature {
const message = { ...baseMultiSignature } as MultiSignature;
message.signatures = [];
@ -64,6 +63,7 @@ export const MultiSignature = {
}
return message;
},
fromPartial(object: DeepPartial<MultiSignature>): MultiSignature {
const message = { ...baseMultiSignature } as MultiSignature;
message.signatures = [];
@ -74,6 +74,7 @@ export const MultiSignature = {
}
return message;
},
toJSON(message: MultiSignature): unknown {
const obj: any = {};
if (message.signatures) {
@ -85,13 +86,16 @@ export const MultiSignature = {
},
};
const baseCompactBitArray: object = { extraBitsStored: 0 };
export const CompactBitArray = {
encode(message: CompactBitArray, writer: Writer = Writer.create()): Writer {
writer.uint32(8).uint32(message.extraBitsStored);
writer.uint32(18).bytes(message.elems);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): CompactBitArray {
decode(input: Reader | Uint8Array, length?: number): CompactBitArray {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseCompactBitArray } as CompactBitArray;
@ -111,6 +115,7 @@ export const CompactBitArray = {
}
return message;
},
fromJSON(object: any): CompactBitArray {
const message = { ...baseCompactBitArray } as CompactBitArray;
if (object.extraBitsStored !== undefined && object.extraBitsStored !== null) {
@ -123,6 +128,7 @@ export const CompactBitArray = {
}
return message;
},
fromPartial(object: DeepPartial<CompactBitArray>): CompactBitArray {
const message = { ...baseCompactBitArray } as CompactBitArray;
if (object.extraBitsStored !== undefined && object.extraBitsStored !== null) {
@ -137,6 +143,7 @@ export const CompactBitArray = {
}
return message;
},
toJSON(message: CompactBitArray): unknown {
const obj: any = {};
message.extraBitsStored !== undefined && (obj.extraBitsStored = message.extraBitsStored);
@ -146,15 +153,18 @@ export const CompactBitArray = {
},
};
interface WindowBase64 {
atob(b64: string): string;
btoa(bin: string): string;
}
const windowBase64 = (globalThis as unknown) as WindowBase64;
const atob = windowBase64.atob || ((b64: string) => Buffer.from(b64, "base64").toString("binary"));
const btoa = windowBase64.btoa || ((bin: string) => Buffer.from(bin, "binary").toString("base64"));
declare var self: any | undefined;
declare var window: any | undefined;
var globalThis: any = (() => {
if (typeof globalThis !== "undefined") return globalThis;
if (typeof self !== "undefined") return self;
if (typeof window !== "undefined") return window;
if (typeof global !== "undefined") return global;
throw new Error("Unable to locate global object");
})();
const atob: (b64: string) => string =
globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
function bytesFromBase64(b64: string): Uint8Array {
const bin = atob(b64);
const arr = new Uint8Array(bin.length);
@ -164,6 +174,8 @@ function bytesFromBase64(b64: string): Uint8Array {
return arr;
}
const btoa: (bin: string) => string =
globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
function base64FromBytes(arr: Uint8Array): string {
const bin: string[] = [];
for (let i = 0; i < arr.byteLength; ++i) {
@ -171,7 +183,8 @@ function base64FromBytes(arr: Uint8Array): string {
}
return btoa(bin.join(""));
}
type Builtin = Date | Function | Uint8Array | string | number | undefined;
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

View File

@ -1,36 +1,34 @@
/* eslint-disable */
import { Writer, Reader } from "protobufjs/minimal";
import * as Long from "long";
export const protobufPackage = "cosmos.crypto.secp256k1";
/**
* PubKey defines a secp256k1 public key
* Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte
* if the y-coordinate is the lexicographically largest of the two associated with
* the x-coordinate. Otherwise the first byte is a 0x03.
* This prefix is followed with the x-coordinate.
* PubKey defines a secp256k1 public key
* Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte
* if the y-coordinate is the lexicographically largest of the two associated with
* the x-coordinate. Otherwise the first byte is a 0x03.
* This prefix is followed with the x-coordinate.
*/
export interface PubKey {
key: Uint8Array;
}
/**
* PrivKey defines a secp256k1 private key.
*/
/** PrivKey defines a secp256k1 private key. */
export interface PrivKey {
key: Uint8Array;
}
const basePubKey: object = {};
const basePrivKey: object = {};
export const protobufPackage = "cosmos.crypto.secp256k1";
export const PubKey = {
encode(message: PubKey, writer: Writer = Writer.create()): Writer {
writer.uint32(10).bytes(message.key);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): PubKey {
decode(input: Reader | Uint8Array, length?: number): PubKey {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...basePubKey } as PubKey;
@ -47,6 +45,7 @@ export const PubKey = {
}
return message;
},
fromJSON(object: any): PubKey {
const message = { ...basePubKey } as PubKey;
if (object.key !== undefined && object.key !== null) {
@ -54,6 +53,7 @@ export const PubKey = {
}
return message;
},
fromPartial(object: DeepPartial<PubKey>): PubKey {
const message = { ...basePubKey } as PubKey;
if (object.key !== undefined && object.key !== null) {
@ -63,6 +63,7 @@ export const PubKey = {
}
return message;
},
toJSON(message: PubKey): unknown {
const obj: any = {};
message.key !== undefined &&
@ -71,12 +72,15 @@ export const PubKey = {
},
};
const basePrivKey: object = {};
export const PrivKey = {
encode(message: PrivKey, writer: Writer = Writer.create()): Writer {
writer.uint32(10).bytes(message.key);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): PrivKey {
decode(input: Reader | Uint8Array, length?: number): PrivKey {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...basePrivKey } as PrivKey;
@ -93,6 +97,7 @@ export const PrivKey = {
}
return message;
},
fromJSON(object: any): PrivKey {
const message = { ...basePrivKey } as PrivKey;
if (object.key !== undefined && object.key !== null) {
@ -100,6 +105,7 @@ export const PrivKey = {
}
return message;
},
fromPartial(object: DeepPartial<PrivKey>): PrivKey {
const message = { ...basePrivKey } as PrivKey;
if (object.key !== undefined && object.key !== null) {
@ -109,6 +115,7 @@ export const PrivKey = {
}
return message;
},
toJSON(message: PrivKey): unknown {
const obj: any = {};
message.key !== undefined &&
@ -117,15 +124,18 @@ export const PrivKey = {
},
};
interface WindowBase64 {
atob(b64: string): string;
btoa(bin: string): string;
}
const windowBase64 = (globalThis as unknown) as WindowBase64;
const atob = windowBase64.atob || ((b64: string) => Buffer.from(b64, "base64").toString("binary"));
const btoa = windowBase64.btoa || ((bin: string) => Buffer.from(bin, "binary").toString("base64"));
declare var self: any | undefined;
declare var window: any | undefined;
var globalThis: any = (() => {
if (typeof globalThis !== "undefined") return globalThis;
if (typeof self !== "undefined") return self;
if (typeof window !== "undefined") return window;
if (typeof global !== "undefined") return global;
throw new Error("Unable to locate global object");
})();
const atob: (b64: string) => string =
globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
function bytesFromBase64(b64: string): Uint8Array {
const bin = atob(b64);
const arr = new Uint8Array(bin.length);
@ -135,6 +145,8 @@ function bytesFromBase64(b64: string): Uint8Array {
return arr;
}
const btoa: (bin: string) => string =
globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
function base64FromBytes(arr: Uint8Array): string {
const bin: string[] = [];
for (let i = 0; i < arr.byteLength; ++i) {
@ -142,7 +154,8 @@ function base64FromBytes(arr: Uint8Array): string {
}
return btoa(bin.join(""));
}
type Builtin = Date | Function | Uint8Array | string | number | undefined;
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

View File

@ -4,112 +4,29 @@ import * as Long from "long";
import { CompactBitArray } from "../../../../cosmos/crypto/multisig/v1beta1/multisig";
import { Writer, Reader } from "protobufjs/minimal";
/**
* SignatureDescriptors wraps multiple SignatureDescriptor's.
*/
export interface SignatureDescriptors {
/**
* signatures are the signature descriptors
*/
signatures: SignatureDescriptor[];
}
/**
* SignatureDescriptor is a convenience type which represents the full data for
* a signature including the public key of the signer, signing modes and the
* signature itself. It is primarily used for coordinating signatures between
* clients.
*/
export interface SignatureDescriptor {
/**
* public_key is the public key of the signer
*/
publicKey?: Any;
data?: SignatureDescriptor_Data;
/**
* sequence is the sequence of the account, which describes the
* number of committed transactions signed by a given address. It is used to prevent
* replay attacks.
*/
sequence: Long;
}
/**
* Data represents signature data
*/
export interface SignatureDescriptor_Data {
/**
* single represents a single signer
*/
single?: SignatureDescriptor_Data_Single | undefined;
/**
* multi represents a multisig signer
*/
multi?: SignatureDescriptor_Data_Multi | undefined;
}
/**
* Single is the signature data for a single signer
*/
export interface SignatureDescriptor_Data_Single {
/**
* mode is the signing mode of the single signer
*/
mode: SignMode;
/**
* signature is the raw signature bytes
*/
signature: Uint8Array;
}
/**
* Multi is the signature data for a multisig public key
*/
export interface SignatureDescriptor_Data_Multi {
/**
* bitarray specifies which keys within the multisig are signing
*/
bitarray?: CompactBitArray;
/**
* signatures is the signatures of the multi-signature
*/
signatures: SignatureDescriptor_Data[];
}
const baseSignatureDescriptors: object = {};
const baseSignatureDescriptor: object = {
sequence: Long.UZERO,
};
const baseSignatureDescriptor_Data: object = {};
const baseSignatureDescriptor_Data_Single: object = {
mode: 0,
};
const baseSignatureDescriptor_Data_Multi: object = {};
export const protobufPackage = "cosmos.tx.signing.v1beta1";
/** SignMode represents a signing mode with its own security guarantees.
*/
/** SignMode represents a signing mode with its own security guarantees. */
export enum SignMode {
/** SIGN_MODE_UNSPECIFIED - SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be
rejected
/**
* SIGN_MODE_UNSPECIFIED - SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be
* rejected
*/
SIGN_MODE_UNSPECIFIED = 0,
/** SIGN_MODE_DIRECT - SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is
verified with raw bytes from Tx
/**
* SIGN_MODE_DIRECT - SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is
* verified with raw bytes from Tx
*/
SIGN_MODE_DIRECT = 1,
/** SIGN_MODE_TEXTUAL - SIGN_MODE_TEXTUAL is a future signing mode that will verify some
human-readable textual representation on top of the binary representation
from SIGN_MODE_DIRECT
/**
* SIGN_MODE_TEXTUAL - SIGN_MODE_TEXTUAL is a future signing mode that will verify some
* human-readable textual representation on top of the binary representation
* from SIGN_MODE_DIRECT
*/
SIGN_MODE_TEXTUAL = 2,
/** SIGN_MODE_LEGACY_AMINO_JSON - SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses
Amino JSON and will be removed in the future
/**
* SIGN_MODE_LEGACY_AMINO_JSON - SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses
* Amino JSON and will be removed in the future
*/
SIGN_MODE_LEGACY_AMINO_JSON = 127,
UNRECOGNIZED = -1,
@ -151,6 +68,56 @@ export function signModeToJSON(object: SignMode): string {
}
}
/** SignatureDescriptors wraps multiple SignatureDescriptor's. */
export interface SignatureDescriptors {
/** signatures are the signature descriptors */
signatures: SignatureDescriptor[];
}
/**
* SignatureDescriptor is a convenience type which represents the full data for
* a signature including the public key of the signer, signing modes and the
* signature itself. It is primarily used for coordinating signatures between
* clients.
*/
export interface SignatureDescriptor {
/** public_key is the public key of the signer */
publicKey?: Any;
data?: SignatureDescriptor_Data;
/**
* sequence is the sequence of the account, which describes the
* number of committed transactions signed by a given address. It is used to prevent
* replay attacks.
*/
sequence: Long;
}
/** Data represents signature data */
export interface SignatureDescriptor_Data {
/** single represents a single signer */
single?: SignatureDescriptor_Data_Single | undefined;
/** multi represents a multisig signer */
multi?: SignatureDescriptor_Data_Multi | undefined;
}
/** Single is the signature data for a single signer */
export interface SignatureDescriptor_Data_Single {
/** mode is the signing mode of the single signer */
mode: SignMode;
/** signature is the raw signature bytes */
signature: Uint8Array;
}
/** Multi is the signature data for a multisig public key */
export interface SignatureDescriptor_Data_Multi {
/** bitarray specifies which keys within the multisig are signing */
bitarray?: CompactBitArray;
/** signatures is the signatures of the multi-signature */
signatures: SignatureDescriptor_Data[];
}
const baseSignatureDescriptors: object = {};
export const SignatureDescriptors = {
encode(message: SignatureDescriptors, writer: Writer = Writer.create()): Writer {
for (const v of message.signatures) {
@ -158,7 +125,8 @@ export const SignatureDescriptors = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): SignatureDescriptors {
decode(input: Reader | Uint8Array, length?: number): SignatureDescriptors {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseSignatureDescriptors } as SignatureDescriptors;
@ -176,6 +144,7 @@ export const SignatureDescriptors = {
}
return message;
},
fromJSON(object: any): SignatureDescriptors {
const message = { ...baseSignatureDescriptors } as SignatureDescriptors;
message.signatures = [];
@ -186,6 +155,7 @@ export const SignatureDescriptors = {
}
return message;
},
fromPartial(object: DeepPartial<SignatureDescriptors>): SignatureDescriptors {
const message = { ...baseSignatureDescriptors } as SignatureDescriptors;
message.signatures = [];
@ -196,6 +166,7 @@ export const SignatureDescriptors = {
}
return message;
},
toJSON(message: SignatureDescriptors): unknown {
const obj: any = {};
if (message.signatures) {
@ -207,6 +178,8 @@ export const SignatureDescriptors = {
},
};
const baseSignatureDescriptor: object = { sequence: Long.UZERO };
export const SignatureDescriptor = {
encode(message: SignatureDescriptor, writer: Writer = Writer.create()): Writer {
if (message.publicKey !== undefined && message.publicKey !== undefined) {
@ -218,7 +191,8 @@ export const SignatureDescriptor = {
writer.uint32(24).uint64(message.sequence);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): SignatureDescriptor {
decode(input: Reader | Uint8Array, length?: number): SignatureDescriptor {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseSignatureDescriptor } as SignatureDescriptor;
@ -241,6 +215,7 @@ export const SignatureDescriptor = {
}
return message;
},
fromJSON(object: any): SignatureDescriptor {
const message = { ...baseSignatureDescriptor } as SignatureDescriptor;
if (object.publicKey !== undefined && object.publicKey !== null) {
@ -260,6 +235,7 @@ export const SignatureDescriptor = {
}
return message;
},
fromPartial(object: DeepPartial<SignatureDescriptor>): SignatureDescriptor {
const message = { ...baseSignatureDescriptor } as SignatureDescriptor;
if (object.publicKey !== undefined && object.publicKey !== null) {
@ -279,6 +255,7 @@ export const SignatureDescriptor = {
}
return message;
},
toJSON(message: SignatureDescriptor): unknown {
const obj: any = {};
message.publicKey !== undefined &&
@ -290,6 +267,8 @@ export const SignatureDescriptor = {
},
};
const baseSignatureDescriptor_Data: object = {};
export const SignatureDescriptor_Data = {
encode(message: SignatureDescriptor_Data, writer: Writer = Writer.create()): Writer {
if (message.single !== undefined) {
@ -300,7 +279,8 @@ export const SignatureDescriptor_Data = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): SignatureDescriptor_Data {
decode(input: Reader | Uint8Array, length?: number): SignatureDescriptor_Data {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseSignatureDescriptor_Data } as SignatureDescriptor_Data;
@ -320,6 +300,7 @@ export const SignatureDescriptor_Data = {
}
return message;
},
fromJSON(object: any): SignatureDescriptor_Data {
const message = { ...baseSignatureDescriptor_Data } as SignatureDescriptor_Data;
if (object.single !== undefined && object.single !== null) {
@ -334,6 +315,7 @@ export const SignatureDescriptor_Data = {
}
return message;
},
fromPartial(object: DeepPartial<SignatureDescriptor_Data>): SignatureDescriptor_Data {
const message = { ...baseSignatureDescriptor_Data } as SignatureDescriptor_Data;
if (object.single !== undefined && object.single !== null) {
@ -348,6 +330,7 @@ export const SignatureDescriptor_Data = {
}
return message;
},
toJSON(message: SignatureDescriptor_Data): unknown {
const obj: any = {};
message.single !== undefined &&
@ -358,13 +341,16 @@ export const SignatureDescriptor_Data = {
},
};
const baseSignatureDescriptor_Data_Single: object = { mode: 0 };
export const SignatureDescriptor_Data_Single = {
encode(message: SignatureDescriptor_Data_Single, writer: Writer = Writer.create()): Writer {
writer.uint32(8).int32(message.mode);
writer.uint32(18).bytes(message.signature);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): SignatureDescriptor_Data_Single {
decode(input: Reader | Uint8Array, length?: number): SignatureDescriptor_Data_Single {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseSignatureDescriptor_Data_Single } as SignatureDescriptor_Data_Single;
@ -384,6 +370,7 @@ export const SignatureDescriptor_Data_Single = {
}
return message;
},
fromJSON(object: any): SignatureDescriptor_Data_Single {
const message = { ...baseSignatureDescriptor_Data_Single } as SignatureDescriptor_Data_Single;
if (object.mode !== undefined && object.mode !== null) {
@ -396,6 +383,7 @@ export const SignatureDescriptor_Data_Single = {
}
return message;
},
fromPartial(object: DeepPartial<SignatureDescriptor_Data_Single>): SignatureDescriptor_Data_Single {
const message = { ...baseSignatureDescriptor_Data_Single } as SignatureDescriptor_Data_Single;
if (object.mode !== undefined && object.mode !== null) {
@ -410,6 +398,7 @@ export const SignatureDescriptor_Data_Single = {
}
return message;
},
toJSON(message: SignatureDescriptor_Data_Single): unknown {
const obj: any = {};
message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
@ -421,6 +410,8 @@ export const SignatureDescriptor_Data_Single = {
},
};
const baseSignatureDescriptor_Data_Multi: object = {};
export const SignatureDescriptor_Data_Multi = {
encode(message: SignatureDescriptor_Data_Multi, writer: Writer = Writer.create()): Writer {
if (message.bitarray !== undefined && message.bitarray !== undefined) {
@ -431,7 +422,8 @@ export const SignatureDescriptor_Data_Multi = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): SignatureDescriptor_Data_Multi {
decode(input: Reader | Uint8Array, length?: number): SignatureDescriptor_Data_Multi {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseSignatureDescriptor_Data_Multi } as SignatureDescriptor_Data_Multi;
@ -452,6 +444,7 @@ export const SignatureDescriptor_Data_Multi = {
}
return message;
},
fromJSON(object: any): SignatureDescriptor_Data_Multi {
const message = { ...baseSignatureDescriptor_Data_Multi } as SignatureDescriptor_Data_Multi;
message.signatures = [];
@ -467,6 +460,7 @@ export const SignatureDescriptor_Data_Multi = {
}
return message;
},
fromPartial(object: DeepPartial<SignatureDescriptor_Data_Multi>): SignatureDescriptor_Data_Multi {
const message = { ...baseSignatureDescriptor_Data_Multi } as SignatureDescriptor_Data_Multi;
message.signatures = [];
@ -482,6 +476,7 @@ export const SignatureDescriptor_Data_Multi = {
}
return message;
},
toJSON(message: SignatureDescriptor_Data_Multi): unknown {
const obj: any = {};
message.bitarray !== undefined &&
@ -495,15 +490,18 @@ export const SignatureDescriptor_Data_Multi = {
},
};
interface WindowBase64 {
atob(b64: string): string;
btoa(bin: string): string;
}
const windowBase64 = (globalThis as unknown) as WindowBase64;
const atob = windowBase64.atob || ((b64: string) => Buffer.from(b64, "base64").toString("binary"));
const btoa = windowBase64.btoa || ((bin: string) => Buffer.from(bin, "binary").toString("base64"));
declare var self: any | undefined;
declare var window: any | undefined;
var globalThis: any = (() => {
if (typeof globalThis !== "undefined") return globalThis;
if (typeof self !== "undefined") return self;
if (typeof window !== "undefined") return window;
if (typeof global !== "undefined") return global;
throw new Error("Unable to locate global object");
})();
const atob: (b64: string) => string =
globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
function bytesFromBase64(b64: string): Uint8Array {
const bin = atob(b64);
const arr = new Uint8Array(bin.length);
@ -513,6 +511,8 @@ function bytesFromBase64(b64: string): Uint8Array {
return arr;
}
const btoa: (bin: string) => string =
globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
function base64FromBytes(arr: Uint8Array): string {
const bin: string[] = [];
for (let i = 0; i < arr.byteLength; ++i) {
@ -520,7 +520,8 @@ function base64FromBytes(arr: Uint8Array): string {
}
return btoa(bin.join(""));
}
type Builtin = Date | Function | Uint8Array | string | number | undefined;
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

View File

@ -6,267 +6,209 @@ import { CompactBitArray } from "../../../cosmos/crypto/multisig/v1beta1/multisi
import { Coin } from "../../../cosmos/base/v1beta1/coin";
import { Writer, Reader } from "protobufjs/minimal";
/**
* Tx is the standard type used for broadcasting transactions.
*/
export const protobufPackage = "cosmos.tx.v1beta1";
/** Tx is the standard type used for broadcasting transactions. */
export interface Tx {
/**
* body is the processable content of the transaction
*/
/** body is the processable content of the transaction */
body?: TxBody;
/**
* auth_info is the authorization related content of the transaction,
* specifically signers, signer modes and fee
* auth_info is the authorization related content of the transaction,
* specifically signers, signer modes and fee
*/
authInfo?: AuthInfo;
/**
* signatures is a list of signatures that matches the length and order of
* AuthInfo's signer_infos to allow connecting signature meta information like
* public key and signing mode by position.
* signatures is a list of signatures that matches the length and order of
* AuthInfo's signer_infos to allow connecting signature meta information like
* public key and signing mode by position.
*/
signatures: Uint8Array[];
}
/**
* TxRaw is a variant of Tx that pins the signer's exact binary representation
* of body and auth_info. This is used for signing, broadcasting and
* verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and
* the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used
* as the transaction ID.
* TxRaw is a variant of Tx that pins the signer's exact binary representation
* of body and auth_info. This is used for signing, broadcasting and
* verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and
* the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used
* as the transaction ID.
*/
export interface TxRaw {
/**
* body_bytes is a protobuf serialization of a TxBody that matches the
* representation in SignDoc.
* body_bytes is a protobuf serialization of a TxBody that matches the
* representation in SignDoc.
*/
bodyBytes: Uint8Array;
/**
* auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
* representation in SignDoc.
* auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
* representation in SignDoc.
*/
authInfoBytes: Uint8Array;
/**
* signatures is a list of signatures that matches the length and order of
* AuthInfo's signer_infos to allow connecting signature meta information like
* public key and signing mode by position.
* signatures is a list of signatures that matches the length and order of
* AuthInfo's signer_infos to allow connecting signature meta information like
* public key and signing mode by position.
*/
signatures: Uint8Array[];
}
/**
* SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT.
*/
/** SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. */
export interface SignDoc {
/**
* body_bytes is protobuf serialization of a TxBody that matches the
* representation in TxRaw.
* body_bytes is protobuf serialization of a TxBody that matches the
* representation in TxRaw.
*/
bodyBytes: Uint8Array;
/**
* auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
* representation in TxRaw.
* auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
* representation in TxRaw.
*/
authInfoBytes: Uint8Array;
/**
* chain_id is the unique identifier of the chain this transaction targets.
* It prevents signed transactions from being used on another chain by an
* attacker
* chain_id is the unique identifier of the chain this transaction targets.
* It prevents signed transactions from being used on another chain by an
* attacker
*/
chainId: string;
/**
* account_number is the account number of the account in state
*/
/** account_number is the account number of the account in state */
accountNumber: Long;
}
/**
* TxBody is the body of a transaction that all signers sign over.
*/
/** TxBody is the body of a transaction that all signers sign over. */
export interface TxBody {
/**
* messages is a list of messages to be executed. The required signers of
* those messages define the number and order of elements in AuthInfo's
* signer_infos and Tx's signatures. Each required signer address is added to
* the list only the first time it occurs.
* By convention, the first required signer (usually from the first message)
* is referred to as the primary signer and pays the fee for the whole
* transaction.
* messages is a list of messages to be executed. The required signers of
* those messages define the number and order of elements in AuthInfo's
* signer_infos and Tx's signatures. Each required signer address is added to
* the list only the first time it occurs.
* By convention, the first required signer (usually from the first message)
* is referred to as the primary signer and pays the fee for the whole
* transaction.
*/
messages: Any[];
/**
* memo is any arbitrary memo to be added to the transaction
*/
/** memo is any arbitrary memo to be added to the transaction */
memo: string;
/**
* timeout is the block height after which this transaction will not
* be processed by the chain
* timeout is the block height after which this transaction will not
* be processed by the chain
*/
timeoutHeight: Long;
/**
* extension_options are arbitrary options that can be added by chains
* when the default options are not sufficient. If any of these are present
* and can't be handled, the transaction will be rejected
* extension_options are arbitrary options that can be added by chains
* when the default options are not sufficient. If any of these are present
* and can't be handled, the transaction will be rejected
*/
extensionOptions: Any[];
/**
* extension_options are arbitrary options that can be added by chains
* when the default options are not sufficient. If any of these are present
* and can't be handled, they will be ignored
* extension_options are arbitrary options that can be added by chains
* when the default options are not sufficient. If any of these are present
* and can't be handled, they will be ignored
*/
nonCriticalExtensionOptions: Any[];
}
/**
* AuthInfo describes the fee and signer modes that are used to sign a
* transaction.
* AuthInfo describes the fee and signer modes that are used to sign a
* transaction.
*/
export interface AuthInfo {
/**
* signer_infos defines the signing modes for the required signers. The number
* and order of elements must match the required signers from TxBody's
* messages. The first element is the primary signer and the one which pays
* the fee.
* signer_infos defines the signing modes for the required signers. The number
* and order of elements must match the required signers from TxBody's
* messages. The first element is the primary signer and the one which pays
* the fee.
*/
signerInfos: SignerInfo[];
/**
* Fee is the fee and gas limit for the transaction. The first signer is the
* primary signer and the one which pays the fee. The fee can be calculated
* based on the cost of evaluating the body and doing signature verification
* of the signers. This can be estimated via simulation.
* Fee is the fee and gas limit for the transaction. The first signer is the
* primary signer and the one which pays the fee. The fee can be calculated
* based on the cost of evaluating the body and doing signature verification
* of the signers. This can be estimated via simulation.
*/
fee?: Fee;
}
/**
* SignerInfo describes the public key and signing mode of a single top-level
* signer.
* SignerInfo describes the public key and signing mode of a single top-level
* signer.
*/
export interface SignerInfo {
/**
* public_key is the public key of the signer. It is optional for accounts
* that already exist in state. If unset, the verifier can use the required \
* signer address for this position and lookup the public key.
* public_key is the public key of the signer. It is optional for accounts
* that already exist in state. If unset, the verifier can use the required \
* signer address for this position and lookup the public key.
*/
publicKey?: Any;
/**
* mode_info describes the signing mode of the signer and is a nested
* structure to support nested multisig pubkey's
* mode_info describes the signing mode of the signer and is a nested
* structure to support nested multisig pubkey's
*/
modeInfo?: ModeInfo;
/**
* sequence is the sequence of the account, which describes the
* number of committed transactions signed by a given address. It is used to
* prevent replay attacks.
* sequence is the sequence of the account, which describes the
* number of committed transactions signed by a given address. It is used to
* prevent replay attacks.
*/
sequence: Long;
}
/**
* ModeInfo describes the signing mode of a single or nested multisig signer.
*/
/** ModeInfo describes the signing mode of a single or nested multisig signer. */
export interface ModeInfo {
/**
* single represents a single signer
*/
/** single represents a single signer */
single?: ModeInfo_Single | undefined;
/**
* multi represents a nested multisig signer
*/
/** multi represents a nested multisig signer */
multi?: ModeInfo_Multi | undefined;
}
/**
* Single is the mode info for a single signer. It is structured as a message
* to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the
* future
* Single is the mode info for a single signer. It is structured as a message
* to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the
* future
*/
export interface ModeInfo_Single {
/**
* mode is the signing mode of the single signer
*/
/** mode is the signing mode of the single signer */
mode: SignMode;
}
/**
* Multi is the mode info for a multisig public key
*/
/** Multi is the mode info for a multisig public key */
export interface ModeInfo_Multi {
/**
* bitarray specifies which keys within the multisig are signing
*/
/** bitarray specifies which keys within the multisig are signing */
bitarray?: CompactBitArray;
/**
* mode_infos is the corresponding modes of the signers of the multisig
* which could include nested multisig public keys
* mode_infos is the corresponding modes of the signers of the multisig
* which could include nested multisig public keys
*/
modeInfos: ModeInfo[];
}
/**
* Fee includes the amount of coins paid in fees and the maximum
* gas to be used by the transaction. The ratio yields an effective "gasprice",
* which must be above some miminum to be accepted into the mempool.
* Fee includes the amount of coins paid in fees and the maximum
* gas to be used by the transaction. The ratio yields an effective "gasprice",
* which must be above some miminum to be accepted into the mempool.
*/
export interface Fee {
/**
* amount is the amount of coins to be paid as a fee
*/
/** amount is the amount of coins to be paid as a fee */
amount: Coin[];
/**
* gas_limit is the maximum gas that can be used in transaction processing
* before an out of gas error occurs
* gas_limit is the maximum gas that can be used in transaction processing
* before an out of gas error occurs
*/
gasLimit: Long;
/**
* if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees.
* the payer must be a tx signer (and thus have signed this field in AuthInfo).
* setting this field does *not* change the ordering of required signers for the transaction.
* if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees.
* the payer must be a tx signer (and thus have signed this field in AuthInfo).
* setting this field does *not* change the ordering of required signers for the transaction.
*/
payer: string;
/**
* if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used
* to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does
* not support fee grants, this will fail
* if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used
* to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does
* not support fee grants, this will fail
*/
granter: string;
}
const baseTx: object = {};
const baseTxRaw: object = {};
const baseSignDoc: object = {
chainId: "",
accountNumber: Long.UZERO,
};
const baseTxBody: object = {
memo: "",
timeoutHeight: Long.UZERO,
};
const baseAuthInfo: object = {};
const baseSignerInfo: object = {
sequence: Long.UZERO,
};
const baseModeInfo: object = {};
const baseModeInfo_Single: object = {
mode: 0,
};
const baseModeInfo_Multi: object = {};
const baseFee: object = {
gasLimit: Long.UZERO,
payer: "",
granter: "",
};
export const protobufPackage = "cosmos.tx.v1beta1";
export const Tx = {
encode(message: Tx, writer: Writer = Writer.create()): Writer {
if (message.body !== undefined && message.body !== undefined) {
@ -280,7 +222,8 @@ export const Tx = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): Tx {
decode(input: Reader | Uint8Array, length?: number): Tx {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseTx } as Tx;
@ -304,6 +247,7 @@ export const Tx = {
}
return message;
},
fromJSON(object: any): Tx {
const message = { ...baseTx } as Tx;
message.signatures = [];
@ -324,6 +268,7 @@ export const Tx = {
}
return message;
},
fromPartial(object: DeepPartial<Tx>): Tx {
const message = { ...baseTx } as Tx;
message.signatures = [];
@ -344,6 +289,7 @@ export const Tx = {
}
return message;
},
toJSON(message: Tx): unknown {
const obj: any = {};
message.body !== undefined && (obj.body = message.body ? TxBody.toJSON(message.body) : undefined);
@ -358,6 +304,8 @@ export const Tx = {
},
};
const baseTxRaw: object = {};
export const TxRaw = {
encode(message: TxRaw, writer: Writer = Writer.create()): Writer {
writer.uint32(10).bytes(message.bodyBytes);
@ -367,7 +315,8 @@ export const TxRaw = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): TxRaw {
decode(input: Reader | Uint8Array, length?: number): TxRaw {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseTxRaw } as TxRaw;
@ -391,6 +340,7 @@ export const TxRaw = {
}
return message;
},
fromJSON(object: any): TxRaw {
const message = { ...baseTxRaw } as TxRaw;
message.signatures = [];
@ -407,6 +357,7 @@ export const TxRaw = {
}
return message;
},
fromPartial(object: DeepPartial<TxRaw>): TxRaw {
const message = { ...baseTxRaw } as TxRaw;
message.signatures = [];
@ -427,6 +378,7 @@ export const TxRaw = {
}
return message;
},
toJSON(message: TxRaw): unknown {
const obj: any = {};
message.bodyBytes !== undefined &&
@ -446,6 +398,8 @@ export const TxRaw = {
},
};
const baseSignDoc: object = { chainId: "", accountNumber: Long.UZERO };
export const SignDoc = {
encode(message: SignDoc, writer: Writer = Writer.create()): Writer {
writer.uint32(10).bytes(message.bodyBytes);
@ -454,7 +408,8 @@ export const SignDoc = {
writer.uint32(32).uint64(message.accountNumber);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): SignDoc {
decode(input: Reader | Uint8Array, length?: number): SignDoc {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseSignDoc } as SignDoc;
@ -480,6 +435,7 @@ export const SignDoc = {
}
return message;
},
fromJSON(object: any): SignDoc {
const message = { ...baseSignDoc } as SignDoc;
if (object.bodyBytes !== undefined && object.bodyBytes !== null) {
@ -500,6 +456,7 @@ export const SignDoc = {
}
return message;
},
fromPartial(object: DeepPartial<SignDoc>): SignDoc {
const message = { ...baseSignDoc } as SignDoc;
if (object.bodyBytes !== undefined && object.bodyBytes !== null) {
@ -524,6 +481,7 @@ export const SignDoc = {
}
return message;
},
toJSON(message: SignDoc): unknown {
const obj: any = {};
message.bodyBytes !== undefined &&
@ -541,6 +499,8 @@ export const SignDoc = {
},
};
const baseTxBody: object = { memo: "", timeoutHeight: Long.UZERO };
export const TxBody = {
encode(message: TxBody, writer: Writer = Writer.create()): Writer {
for (const v of message.messages) {
@ -556,7 +516,8 @@ export const TxBody = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): TxBody {
decode(input: Reader | Uint8Array, length?: number): TxBody {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseTxBody } as TxBody;
@ -588,6 +549,7 @@ export const TxBody = {
}
return message;
},
fromJSON(object: any): TxBody {
const message = { ...baseTxBody } as TxBody;
message.messages = [];
@ -620,6 +582,7 @@ export const TxBody = {
}
return message;
},
fromPartial(object: DeepPartial<TxBody>): TxBody {
const message = { ...baseTxBody } as TxBody;
message.messages = [];
@ -652,6 +615,7 @@ export const TxBody = {
}
return message;
},
toJSON(message: TxBody): unknown {
const obj: any = {};
if (message.messages) {
@ -678,6 +642,8 @@ export const TxBody = {
},
};
const baseAuthInfo: object = {};
export const AuthInfo = {
encode(message: AuthInfo, writer: Writer = Writer.create()): Writer {
for (const v of message.signerInfos) {
@ -688,7 +654,8 @@ export const AuthInfo = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): AuthInfo {
decode(input: Reader | Uint8Array, length?: number): AuthInfo {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseAuthInfo } as AuthInfo;
@ -709,6 +676,7 @@ export const AuthInfo = {
}
return message;
},
fromJSON(object: any): AuthInfo {
const message = { ...baseAuthInfo } as AuthInfo;
message.signerInfos = [];
@ -724,6 +692,7 @@ export const AuthInfo = {
}
return message;
},
fromPartial(object: DeepPartial<AuthInfo>): AuthInfo {
const message = { ...baseAuthInfo } as AuthInfo;
message.signerInfos = [];
@ -739,6 +708,7 @@ export const AuthInfo = {
}
return message;
},
toJSON(message: AuthInfo): unknown {
const obj: any = {};
if (message.signerInfos) {
@ -751,6 +721,8 @@ export const AuthInfo = {
},
};
const baseSignerInfo: object = { sequence: Long.UZERO };
export const SignerInfo = {
encode(message: SignerInfo, writer: Writer = Writer.create()): Writer {
if (message.publicKey !== undefined && message.publicKey !== undefined) {
@ -762,7 +734,8 @@ export const SignerInfo = {
writer.uint32(24).uint64(message.sequence);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): SignerInfo {
decode(input: Reader | Uint8Array, length?: number): SignerInfo {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseSignerInfo } as SignerInfo;
@ -785,6 +758,7 @@ export const SignerInfo = {
}
return message;
},
fromJSON(object: any): SignerInfo {
const message = { ...baseSignerInfo } as SignerInfo;
if (object.publicKey !== undefined && object.publicKey !== null) {
@ -804,6 +778,7 @@ export const SignerInfo = {
}
return message;
},
fromPartial(object: DeepPartial<SignerInfo>): SignerInfo {
const message = { ...baseSignerInfo } as SignerInfo;
if (object.publicKey !== undefined && object.publicKey !== null) {
@ -823,6 +798,7 @@ export const SignerInfo = {
}
return message;
},
toJSON(message: SignerInfo): unknown {
const obj: any = {};
message.publicKey !== undefined &&
@ -834,6 +810,8 @@ export const SignerInfo = {
},
};
const baseModeInfo: object = {};
export const ModeInfo = {
encode(message: ModeInfo, writer: Writer = Writer.create()): Writer {
if (message.single !== undefined) {
@ -844,7 +822,8 @@ export const ModeInfo = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): ModeInfo {
decode(input: Reader | Uint8Array, length?: number): ModeInfo {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseModeInfo } as ModeInfo;
@ -864,6 +843,7 @@ export const ModeInfo = {
}
return message;
},
fromJSON(object: any): ModeInfo {
const message = { ...baseModeInfo } as ModeInfo;
if (object.single !== undefined && object.single !== null) {
@ -878,6 +858,7 @@ export const ModeInfo = {
}
return message;
},
fromPartial(object: DeepPartial<ModeInfo>): ModeInfo {
const message = { ...baseModeInfo } as ModeInfo;
if (object.single !== undefined && object.single !== null) {
@ -892,6 +873,7 @@ export const ModeInfo = {
}
return message;
},
toJSON(message: ModeInfo): unknown {
const obj: any = {};
message.single !== undefined &&
@ -902,12 +884,15 @@ export const ModeInfo = {
},
};
const baseModeInfo_Single: object = { mode: 0 };
export const ModeInfo_Single = {
encode(message: ModeInfo_Single, writer: Writer = Writer.create()): Writer {
writer.uint32(8).int32(message.mode);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): ModeInfo_Single {
decode(input: Reader | Uint8Array, length?: number): ModeInfo_Single {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseModeInfo_Single } as ModeInfo_Single;
@ -924,6 +909,7 @@ export const ModeInfo_Single = {
}
return message;
},
fromJSON(object: any): ModeInfo_Single {
const message = { ...baseModeInfo_Single } as ModeInfo_Single;
if (object.mode !== undefined && object.mode !== null) {
@ -933,6 +919,7 @@ export const ModeInfo_Single = {
}
return message;
},
fromPartial(object: DeepPartial<ModeInfo_Single>): ModeInfo_Single {
const message = { ...baseModeInfo_Single } as ModeInfo_Single;
if (object.mode !== undefined && object.mode !== null) {
@ -942,6 +929,7 @@ export const ModeInfo_Single = {
}
return message;
},
toJSON(message: ModeInfo_Single): unknown {
const obj: any = {};
message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
@ -949,6 +937,8 @@ export const ModeInfo_Single = {
},
};
const baseModeInfo_Multi: object = {};
export const ModeInfo_Multi = {
encode(message: ModeInfo_Multi, writer: Writer = Writer.create()): Writer {
if (message.bitarray !== undefined && message.bitarray !== undefined) {
@ -959,7 +949,8 @@ export const ModeInfo_Multi = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): ModeInfo_Multi {
decode(input: Reader | Uint8Array, length?: number): ModeInfo_Multi {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseModeInfo_Multi } as ModeInfo_Multi;
@ -980,6 +971,7 @@ export const ModeInfo_Multi = {
}
return message;
},
fromJSON(object: any): ModeInfo_Multi {
const message = { ...baseModeInfo_Multi } as ModeInfo_Multi;
message.modeInfos = [];
@ -995,6 +987,7 @@ export const ModeInfo_Multi = {
}
return message;
},
fromPartial(object: DeepPartial<ModeInfo_Multi>): ModeInfo_Multi {
const message = { ...baseModeInfo_Multi } as ModeInfo_Multi;
message.modeInfos = [];
@ -1010,6 +1003,7 @@ export const ModeInfo_Multi = {
}
return message;
},
toJSON(message: ModeInfo_Multi): unknown {
const obj: any = {};
message.bitarray !== undefined &&
@ -1023,6 +1017,8 @@ export const ModeInfo_Multi = {
},
};
const baseFee: object = { gasLimit: Long.UZERO, payer: "", granter: "" };
export const Fee = {
encode(message: Fee, writer: Writer = Writer.create()): Writer {
for (const v of message.amount) {
@ -1033,7 +1029,8 @@ export const Fee = {
writer.uint32(34).string(message.granter);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): Fee {
decode(input: Reader | Uint8Array, length?: number): Fee {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseFee } as Fee;
@ -1060,6 +1057,7 @@ export const Fee = {
}
return message;
},
fromJSON(object: any): Fee {
const message = { ...baseFee } as Fee;
message.amount = [];
@ -1085,6 +1083,7 @@ export const Fee = {
}
return message;
},
fromPartial(object: DeepPartial<Fee>): Fee {
const message = { ...baseFee } as Fee;
message.amount = [];
@ -1110,6 +1109,7 @@ export const Fee = {
}
return message;
},
toJSON(message: Fee): unknown {
const obj: any = {};
if (message.amount) {
@ -1124,15 +1124,18 @@ export const Fee = {
},
};
interface WindowBase64 {
atob(b64: string): string;
btoa(bin: string): string;
}
const windowBase64 = (globalThis as unknown) as WindowBase64;
const atob = windowBase64.atob || ((b64: string) => Buffer.from(b64, "base64").toString("binary"));
const btoa = windowBase64.btoa || ((bin: string) => Buffer.from(bin, "binary").toString("base64"));
declare var self: any | undefined;
declare var window: any | undefined;
var globalThis: any = (() => {
if (typeof globalThis !== "undefined") return globalThis;
if (typeof self !== "undefined") return self;
if (typeof window !== "undefined") return window;
if (typeof global !== "undefined") return global;
throw new Error("Unable to locate global object");
})();
const atob: (b64: string) => string =
globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
function bytesFromBase64(b64: string): Uint8Array {
const bin = atob(b64);
const arr = new Uint8Array(bin.length);
@ -1142,6 +1145,8 @@ function bytesFromBase64(b64: string): Uint8Array {
return arr;
}
const btoa: (bin: string) => string =
globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
function base64FromBytes(arr: Uint8Array): string {
const bin: string[] = [];
for (let i = 0; i < arr.byteLength; ++i) {
@ -1149,7 +1154,8 @@ function base64FromBytes(arr: Uint8Array): string {
}
return btoa(bin.join(""));
}
type Builtin = Date | Function | Uint8Array | string | number | undefined;
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

View File

@ -1,3 +1,2 @@
/* eslint-disable */
export const protobufPackage = "cosmos_proto";

View File

@ -1,3 +1,2 @@
/* eslint-disable */
export const protobufPackage = "gogoproto";

View File

@ -1,131 +1,126 @@
/* eslint-disable */
import { Writer, Reader } from "protobufjs/minimal";
import * as Long from "long";
export const protobufPackage = "google.protobuf";
/**
* `Any` contains an arbitrary serialized protocol buffer message along with a
* URL that describes the type of the serialized message.
* `Any` contains an arbitrary serialized protocol buffer message along with a
* URL that describes the type of the serialized message.
*
* Protobuf library provides support to pack/unpack Any values in the form
* of utility functions or additional generated methods of the Any type.
* Protobuf library provides support to pack/unpack Any values in the form
* of utility functions or additional generated methods of the Any type.
*
* Example 1: Pack and unpack a message in C++.
* Example 1: Pack and unpack a message in C++.
*
* Foo foo = ...;
* Any any;
* any.PackFrom(foo);
* ...
* if (any.UnpackTo(&foo)) {
* ...
* }
*
* Example 2: Pack and unpack a message in Java.
*
* Foo foo = ...;
* Any any = Any.pack(foo);
* ...
* if (any.is(Foo.class)) {
* foo = any.unpack(Foo.class);
* }
*
* Example 3: Pack and unpack a message in Python.
*
* foo = Foo(...)
* any = Any()
* any.Pack(foo)
* ...
* if any.Is(Foo.DESCRIPTOR):
* any.Unpack(foo)
* ...
*
* Example 4: Pack and unpack a message in Go
*
* foo := &pb.Foo{...}
* any, err := ptypes.MarshalAny(foo)
* Foo foo = ...;
* Any any;
* any.PackFrom(foo);
* ...
* if (any.UnpackTo(&foo)) {
* ...
* foo := &pb.Foo{}
* if err := ptypes.UnmarshalAny(any, foo); err != nil {
* ...
* }
* }
*
* The pack methods provided by protobuf library will by default use
* 'type.googleapis.com/full.type.name' as the type URL and the unpack
* methods only use the fully qualified type name after the last '/'
* in the type URL, for example "foo.bar.com/x/y.z" will yield type
* name "y.z".
* Example 2: Pack and unpack a message in Java.
*
* Foo foo = ...;
* Any any = Any.pack(foo);
* ...
* if (any.is(Foo.class)) {
* foo = any.unpack(Foo.class);
* }
*
* JSON
* ====
* The JSON representation of an `Any` value uses the regular
* representation of the deserialized, embedded message, with an
* additional field `@type` which contains the type URL. Example:
* Example 3: Pack and unpack a message in Python.
*
* package google.profile;
* message Person {
* string first_name = 1;
* string last_name = 2;
* foo = Foo(...)
* any = Any()
* any.Pack(foo)
* ...
* if any.Is(Foo.DESCRIPTOR):
* any.Unpack(foo)
* ...
*
* Example 4: Pack and unpack a message in Go
*
* foo := &pb.Foo{...}
* any, err := ptypes.MarshalAny(foo)
* ...
* foo := &pb.Foo{}
* if err := ptypes.UnmarshalAny(any, foo); err != nil {
* ...
* }
*
* {
* "@type": "type.googleapis.com/google.profile.Person",
* "firstName": <string>,
* "lastName": <string>
* }
* The pack methods provided by protobuf library will by default use
* 'type.googleapis.com/full.type.name' as the type URL and the unpack
* methods only use the fully qualified type name after the last '/'
* in the type URL, for example "foo.bar.com/x/y.z" will yield type
* name "y.z".
*
* If the embedded message type is well-known and has a custom JSON
* representation, that representation will be embedded adding a field
* `value` which holds the custom JSON in addition to the `@type`
* field. Example (for message [google.protobuf.Duration][]):
*
* {
* "@type": "type.googleapis.com/google.protobuf.Duration",
* "value": "1.212s"
* }
* JSON
* ====
* The JSON representation of an `Any` value uses the regular
* representation of the deserialized, embedded message, with an
* additional field `@type` which contains the type URL. Example:
*
* package google.profile;
* message Person {
* string first_name = 1;
* string last_name = 2;
* }
*
* {
* "@type": "type.googleapis.com/google.profile.Person",
* "firstName": <string>,
* "lastName": <string>
* }
*
* If the embedded message type is well-known and has a custom JSON
* representation, that representation will be embedded adding a field
* `value` which holds the custom JSON in addition to the `@type`
* field. Example (for message [google.protobuf.Duration][]):
*
* {
* "@type": "type.googleapis.com/google.protobuf.Duration",
* "value": "1.212s"
* }
*/
export interface Any {
/**
* A URL/resource name that uniquely identifies the type of the serialized
* protocol buffer message. This string must contain at least
* one "/" character. The last segment of the URL's path must represent
* the fully qualified name of the type (as in
* `path/google.protobuf.Duration`). The name should be in a canonical form
* (e.g., leading "." is not accepted).
* A URL/resource name that uniquely identifies the type of the serialized
* protocol buffer message. This string must contain at least
* one "/" character. The last segment of the URL's path must represent
* the fully qualified name of the type (as in
* `path/google.protobuf.Duration`). The name should be in a canonical form
* (e.g., leading "." is not accepted).
*
* In practice, teams usually precompile into the binary all types that they
* expect it to use in the context of Any. However, for URLs which use the
* scheme `http`, `https`, or no scheme, one can optionally set up a type
* server that maps type URLs to message definitions as follows:
* In practice, teams usually precompile into the binary all types that they
* expect it to use in the context of Any. However, for URLs which use the
* scheme `http`, `https`, or no scheme, one can optionally set up a type
* server that maps type URLs to message definitions as follows:
*
* * If no scheme is provided, `https` is assumed.
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
* value in binary format, or produce an error.
* * Applications are allowed to cache lookup results based on the
* URL, or have them precompiled into a binary to avoid any
* lookup. Therefore, binary compatibility needs to be preserved
* on changes to types. (Use versioned type names to manage
* breaking changes.)
* * If no scheme is provided, `https` is assumed.
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
* value in binary format, or produce an error.
* * Applications are allowed to cache lookup results based on the
* URL, or have them precompiled into a binary to avoid any
* lookup. Therefore, binary compatibility needs to be preserved
* on changes to types. (Use versioned type names to manage
* breaking changes.)
*
* Note: this functionality is not currently available in the official
* protobuf release, and it is not used for type URLs beginning with
* type.googleapis.com.
*
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.
* Note: this functionality is not currently available in the official
* protobuf release, and it is not used for type URLs beginning with
* type.googleapis.com.
*
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.
*/
typeUrl: string;
/**
* Must be a valid serialized protocol buffer of the above specified type.
*/
/** Must be a valid serialized protocol buffer of the above specified type. */
value: Uint8Array;
}
const baseAny: object = {
typeUrl: "",
};
export const protobufPackage = "google.protobuf";
const baseAny: object = { typeUrl: "" };
export const Any = {
encode(message: Any, writer: Writer = Writer.create()): Writer {
@ -133,7 +128,8 @@ export const Any = {
writer.uint32(18).bytes(message.value);
return writer;
},
decode(input: Uint8Array | Reader, length?: number): Any {
decode(input: Reader | Uint8Array, length?: number): Any {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...baseAny } as Any;
@ -153,6 +149,7 @@ export const Any = {
}
return message;
},
fromJSON(object: any): Any {
const message = { ...baseAny } as Any;
if (object.typeUrl !== undefined && object.typeUrl !== null) {
@ -165,6 +162,7 @@ export const Any = {
}
return message;
},
fromPartial(object: DeepPartial<Any>): Any {
const message = { ...baseAny } as Any;
if (object.typeUrl !== undefined && object.typeUrl !== null) {
@ -179,6 +177,7 @@ export const Any = {
}
return message;
},
toJSON(message: Any): unknown {
const obj: any = {};
message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl);
@ -188,15 +187,18 @@ export const Any = {
},
};
interface WindowBase64 {
atob(b64: string): string;
btoa(bin: string): string;
}
const windowBase64 = (globalThis as unknown) as WindowBase64;
const atob = windowBase64.atob || ((b64: string) => Buffer.from(b64, "base64").toString("binary"));
const btoa = windowBase64.btoa || ((bin: string) => Buffer.from(bin, "binary").toString("base64"));
declare var self: any | undefined;
declare var window: any | undefined;
var globalThis: any = (() => {
if (typeof globalThis !== "undefined") return globalThis;
if (typeof self !== "undefined") return self;
if (typeof window !== "undefined") return window;
if (typeof global !== "undefined") return global;
throw new Error("Unable to locate global object");
})();
const atob: (b64: string) => string =
globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
function bytesFromBase64(b64: string): Uint8Array {
const bin = atob(b64);
const arr = new Uint8Array(bin.length);
@ -206,6 +208,8 @@ function bytesFromBase64(b64: string): Uint8Array {
return arr;
}
const btoa: (bin: string) => string =
globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
function base64FromBytes(arr: Uint8Array): string {
const bin: string[] = [];
for (let i = 0; i < arr.byteLength; ++i) {
@ -213,7 +217,8 @@ function base64FromBytes(arr: Uint8Array): string {
}
return btoa(bin.join(""));
}
type Builtin = Date | Function | Uint8Array | string | number | undefined;
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,10 @@
/* eslint-disable */
import { Writer, Reader } from "protobufjs/minimal";
import * as Long from "long";
/**
* PublicKey defines the keys available for use with Tendermint Validators
*/
export const protobufPackage = "tendermint.crypto";
/** PublicKey defines the keys available for use with Tendermint Validators */
export interface PublicKey {
ed25519: Uint8Array | undefined;
secp256k1: Uint8Array | undefined;
@ -11,8 +12,6 @@ export interface PublicKey {
const basePublicKey: object = {};
export const protobufPackage = "tendermint.crypto";
export const PublicKey = {
encode(message: PublicKey, writer: Writer = Writer.create()): Writer {
if (message.ed25519 !== undefined) {
@ -23,7 +22,8 @@ export const PublicKey = {
}
return writer;
},
decode(input: Uint8Array | Reader, length?: number): PublicKey {
decode(input: Reader | Uint8Array, length?: number): PublicKey {
const reader = input instanceof Uint8Array ? new Reader(input) : input;
let end = length === undefined ? reader.len : reader.pos + length;
const message = { ...basePublicKey } as PublicKey;
@ -43,6 +43,7 @@ export const PublicKey = {
}
return message;
},
fromJSON(object: any): PublicKey {
const message = { ...basePublicKey } as PublicKey;
if (object.ed25519 !== undefined && object.ed25519 !== null) {
@ -53,6 +54,7 @@ export const PublicKey = {
}
return message;
},
fromPartial(object: DeepPartial<PublicKey>): PublicKey {
const message = { ...basePublicKey } as PublicKey;
if (object.ed25519 !== undefined && object.ed25519 !== null) {
@ -67,6 +69,7 @@ export const PublicKey = {
}
return message;
},
toJSON(message: PublicKey): unknown {
const obj: any = {};
message.ed25519 !== undefined &&
@ -77,15 +80,18 @@ export const PublicKey = {
},
};
interface WindowBase64 {
atob(b64: string): string;
btoa(bin: string): string;
}
const windowBase64 = (globalThis as unknown) as WindowBase64;
const atob = windowBase64.atob || ((b64: string) => Buffer.from(b64, "base64").toString("binary"));
const btoa = windowBase64.btoa || ((bin: string) => Buffer.from(bin, "binary").toString("base64"));
declare var self: any | undefined;
declare var window: any | undefined;
var globalThis: any = (() => {
if (typeof globalThis !== "undefined") return globalThis;
if (typeof self !== "undefined") return self;
if (typeof window !== "undefined") return window;
if (typeof global !== "undefined") return global;
throw new Error("Unable to locate global object");
})();
const atob: (b64: string) => string =
globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
function bytesFromBase64(b64: string): Uint8Array {
const bin = atob(b64);
const arr = new Uint8Array(bin.length);
@ -95,6 +101,8 @@ function bytesFromBase64(b64: string): Uint8Array {
return arr;
}
const btoa: (bin: string) => string =
globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
function base64FromBytes(arr: Uint8Array): string {
const bin: string[] = [];
for (let i = 0; i < arr.byteLength; ++i) {
@ -102,7 +110,8 @@ function base64FromBytes(arr: Uint8Array): string {
}
return btoa(bin.join(""));
}
type Builtin = Date | Function | Uint8Array | string | number | undefined;
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

View File

@ -1,134 +1,121 @@
import { Coin } from "../../../cosmos/base/v1beta1/coin";
import { Writer, Reader } from "protobufjs/minimal";
/**
* Params defines the parameters for the bank module.
*/
import * as Long from "long";
export declare const protobufPackage = "cosmos.bank.v1beta1";
/** Params defines the parameters for the bank module. */
export interface Params {
sendEnabled: SendEnabled[];
defaultSendEnabled: boolean;
}
/**
* SendEnabled maps coin denom to a send_enabled status (whether a denom is
* sendable).
* SendEnabled maps coin denom to a send_enabled status (whether a denom is
* sendable).
*/
export interface SendEnabled {
denom: string;
enabled: boolean;
}
/**
* Input models transaction input.
*/
/** Input models transaction input. */
export interface Input {
address: string;
coins: Coin[];
}
/**
* Output models transaction outputs.
*/
/** Output models transaction outputs. */
export interface Output {
address: string;
coins: Coin[];
}
/**
* Supply represents a struct that passively keeps track of the total supply
* amounts in the network.
* Supply represents a struct that passively keeps track of the total supply
* amounts in the network.
*/
export interface Supply {
total: Coin[];
}
/**
* DenomUnit represents a struct that describes a given
* denomination unit of the basic token.
* DenomUnit represents a struct that describes a given
* denomination unit of the basic token.
*/
export interface DenomUnit {
/**
* denom represents the string name of the given denom unit (e.g uatom).
*/
/** denom represents the string name of the given denom unit (e.g uatom). */
denom: string;
/**
* exponent represents power of 10 exponent that one must
* raise the base_denom to in order to equal the given DenomUnit's denom
* 1 denom = 1^exponent base_denom
* (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
* exponent = 6, thus: 1 atom = 10^6 uatom).
* exponent represents power of 10 exponent that one must
* raise the base_denom to in order to equal the given DenomUnit's denom
* 1 denom = 1^exponent base_denom
* (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
* exponent = 6, thus: 1 atom = 10^6 uatom).
*/
exponent: number;
/**
* aliases is a list of string aliases for the given denom
*/
/** aliases is a list of string aliases for the given denom */
aliases: string[];
}
/**
* Metadata represents a struct that describes
* a basic token.
* Metadata represents a struct that describes
* a basic token.
*/
export interface Metadata {
description: string;
/**
* denom_units represents the list of DenomUnit's for a given coin
*/
/** denom_units represents the list of DenomUnit's for a given coin */
denomUnits: DenomUnit[];
/**
* base represents the base denom (should be the DenomUnit with exponent = 0).
*/
/** base represents the base denom (should be the DenomUnit with exponent = 0). */
base: string;
/**
* display indicates the suggested denom that should be
* displayed in clients.
* display indicates the suggested denom that should be
* displayed in clients.
*/
display: string;
}
export declare const protobufPackage = "cosmos.bank.v1beta1";
export declare const Params: {
encode(message: Params, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): Params;
decode(input: Reader | Uint8Array, length?: number | undefined): Params;
fromJSON(object: any): Params;
fromPartial(object: DeepPartial<Params>): Params;
toJSON(message: Params): unknown;
};
export declare const SendEnabled: {
encode(message: SendEnabled, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): SendEnabled;
decode(input: Reader | Uint8Array, length?: number | undefined): SendEnabled;
fromJSON(object: any): SendEnabled;
fromPartial(object: DeepPartial<SendEnabled>): SendEnabled;
toJSON(message: SendEnabled): unknown;
};
export declare const Input: {
encode(message: Input, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): Input;
decode(input: Reader | Uint8Array, length?: number | undefined): Input;
fromJSON(object: any): Input;
fromPartial(object: DeepPartial<Input>): Input;
toJSON(message: Input): unknown;
};
export declare const Output: {
encode(message: Output, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): Output;
decode(input: Reader | Uint8Array, length?: number | undefined): Output;
fromJSON(object: any): Output;
fromPartial(object: DeepPartial<Output>): Output;
toJSON(message: Output): unknown;
};
export declare const Supply: {
encode(message: Supply, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): Supply;
decode(input: Reader | Uint8Array, length?: number | undefined): Supply;
fromJSON(object: any): Supply;
fromPartial(object: DeepPartial<Supply>): Supply;
toJSON(message: Supply): unknown;
};
export declare const DenomUnit: {
encode(message: DenomUnit, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): DenomUnit;
decode(input: Reader | Uint8Array, length?: number | undefined): DenomUnit;
fromJSON(object: any): DenomUnit;
fromPartial(object: DeepPartial<DenomUnit>): DenomUnit;
toJSON(message: DenomUnit): unknown;
};
export declare const Metadata: {
encode(message: Metadata, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): Metadata;
decode(input: Reader | Uint8Array, length?: number | undefined): Metadata;
fromJSON(object: any): Metadata;
fromPartial(object: DeepPartial<Metadata>): Metadata;
toJSON(message: Metadata): unknown;
};
declare type Builtin = Date | Function | Uint8Array | string | number | undefined;
declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export declare type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

View File

@ -1,40 +1,56 @@
import { Reader, Writer } from "protobufjs/minimal";
import { Coin } from "../../../cosmos/base/v1beta1/coin";
import { Input, Output } from "../../../cosmos/bank/v1beta1/bank";
import { Reader, Writer } from "protobufjs/minimal";
/**
* MsgSend represents a message to send coins from one account to another.
*/
import * as Long from "long";
export declare const protobufPackage = "cosmos.bank.v1beta1";
/** MsgSend represents a message to send coins from one account to another. */
export interface MsgSend {
fromAddress: string;
toAddress: string;
amount: Coin[];
}
/**
* MsgSendResponse defines the Msg/Send response type.
*/
/** MsgSendResponse defines the Msg/Send response type. */
export interface MsgSendResponse {}
/**
* MsgMultiSend represents an arbitrary multi-in, multi-out send message.
*/
/** MsgMultiSend represents an arbitrary multi-in, multi-out send message. */
export interface MsgMultiSend {
inputs: Input[];
outputs: Output[];
}
/**
* MsgMultiSendResponse defines the Msg/MultiSend response type.
*/
/** MsgMultiSendResponse defines the Msg/MultiSend response type. */
export interface MsgMultiSendResponse {}
/**
* Msg defines the bank Msg service.
*/
export declare const MsgSend: {
encode(message: MsgSend, writer?: Writer): Writer;
decode(input: Reader | Uint8Array, length?: number | undefined): MsgSend;
fromJSON(object: any): MsgSend;
fromPartial(object: DeepPartial<MsgSend>): MsgSend;
toJSON(message: MsgSend): unknown;
};
export declare const MsgSendResponse: {
encode(_: MsgSendResponse, writer?: Writer): Writer;
decode(input: Reader | Uint8Array, length?: number | undefined): MsgSendResponse;
fromJSON(_: any): MsgSendResponse;
fromPartial(_: DeepPartial<MsgSendResponse>): MsgSendResponse;
toJSON(_: MsgSendResponse): unknown;
};
export declare const MsgMultiSend: {
encode(message: MsgMultiSend, writer?: Writer): Writer;
decode(input: Reader | Uint8Array, length?: number | undefined): MsgMultiSend;
fromJSON(object: any): MsgMultiSend;
fromPartial(object: DeepPartial<MsgMultiSend>): MsgMultiSend;
toJSON(message: MsgMultiSend): unknown;
};
export declare const MsgMultiSendResponse: {
encode(_: MsgMultiSendResponse, writer?: Writer): Writer;
decode(input: Reader | Uint8Array, length?: number | undefined): MsgMultiSendResponse;
fromJSON(_: any): MsgMultiSendResponse;
fromPartial(_: DeepPartial<MsgMultiSendResponse>): MsgMultiSendResponse;
toJSON(_: MsgMultiSendResponse): unknown;
};
/** Msg defines the bank Msg service. */
export interface Msg {
/**
* Send defines a method for sending coins from one account to another account.
*/
/** Send defines a method for sending coins from one account to another account. */
Send(request: MsgSend): Promise<MsgSendResponse>;
/**
* MultiSend defines a method for sending coins from some accounts to other accounts.
*/
/** MultiSend defines a method for sending coins from some accounts to other accounts. */
MultiSend(request: MsgMultiSend): Promise<MsgMultiSendResponse>;
}
export declare class MsgClientImpl implements Msg {
@ -46,36 +62,7 @@ export declare class MsgClientImpl implements Msg {
interface Rpc {
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
}
export declare const protobufPackage = "cosmos.bank.v1beta1";
export declare const MsgSend: {
encode(message: MsgSend, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): MsgSend;
fromJSON(object: any): MsgSend;
fromPartial(object: DeepPartial<MsgSend>): MsgSend;
toJSON(message: MsgSend): unknown;
};
export declare const MsgSendResponse: {
encode(_: MsgSendResponse, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): MsgSendResponse;
fromJSON(_: any): MsgSendResponse;
fromPartial(_: DeepPartial<MsgSendResponse>): MsgSendResponse;
toJSON(_: MsgSendResponse): unknown;
};
export declare const MsgMultiSend: {
encode(message: MsgMultiSend, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): MsgMultiSend;
fromJSON(object: any): MsgMultiSend;
fromPartial(object: DeepPartial<MsgMultiSend>): MsgMultiSend;
toJSON(message: MsgMultiSend): unknown;
};
export declare const MsgMultiSendResponse: {
encode(_: MsgMultiSendResponse, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): MsgMultiSendResponse;
fromJSON(_: any): MsgMultiSendResponse;
fromPartial(_: DeepPartial<MsgMultiSendResponse>): MsgMultiSendResponse;
toJSON(_: MsgMultiSendResponse): unknown;
};
declare type Builtin = Date | Function | Uint8Array | string | number | undefined;
declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export declare type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

View File

@ -1,66 +1,63 @@
import { Writer, Reader } from "protobufjs/minimal";
import * as Long from "long";
export declare const protobufPackage = "cosmos.base.v1beta1";
/**
* Coin defines a token with a denomination and an amount.
* Coin defines a token with a denomination and an amount.
*
* NOTE: The amount field is an Int which implements the custom method
* signatures required by gogoproto.
* NOTE: The amount field is an Int which implements the custom method
* signatures required by gogoproto.
*/
export interface Coin {
denom: string;
amount: string;
}
/**
* DecCoin defines a token with a denomination and a decimal amount.
* DecCoin defines a token with a denomination and a decimal amount.
*
* NOTE: The amount field is an Dec which implements the custom method
* signatures required by gogoproto.
* NOTE: The amount field is an Dec which implements the custom method
* signatures required by gogoproto.
*/
export interface DecCoin {
denom: string;
amount: string;
}
/**
* IntProto defines a Protobuf wrapper around an Int object.
*/
/** IntProto defines a Protobuf wrapper around an Int object. */
export interface IntProto {
int: string;
}
/**
* DecProto defines a Protobuf wrapper around a Dec object.
*/
/** DecProto defines a Protobuf wrapper around a Dec object. */
export interface DecProto {
dec: string;
}
export declare const protobufPackage = "cosmos.base.v1beta1";
export declare const Coin: {
encode(message: Coin, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): Coin;
decode(input: Reader | Uint8Array, length?: number | undefined): Coin;
fromJSON(object: any): Coin;
fromPartial(object: DeepPartial<Coin>): Coin;
toJSON(message: Coin): unknown;
};
export declare const DecCoin: {
encode(message: DecCoin, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): DecCoin;
decode(input: Reader | Uint8Array, length?: number | undefined): DecCoin;
fromJSON(object: any): DecCoin;
fromPartial(object: DeepPartial<DecCoin>): DecCoin;
toJSON(message: DecCoin): unknown;
};
export declare const IntProto: {
encode(message: IntProto, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): IntProto;
decode(input: Reader | Uint8Array, length?: number | undefined): IntProto;
fromJSON(object: any): IntProto;
fromPartial(object: DeepPartial<IntProto>): IntProto;
toJSON(message: IntProto): unknown;
};
export declare const DecProto: {
encode(message: DecProto, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): DecProto;
decode(input: Reader | Uint8Array, length?: number | undefined): DecProto;
fromJSON(object: any): DecProto;
fromPartial(object: DeepPartial<DecProto>): DecProto;
toJSON(message: DecProto): unknown;
};
declare type Builtin = Date | Function | Uint8Array | string | number | undefined;
declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export declare type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

View File

@ -1,38 +1,39 @@
import { Writer, Reader } from "protobufjs/minimal";
import * as Long from "long";
export declare const protobufPackage = "cosmos.crypto.multisig.v1beta1";
/**
* MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey.
* See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers
* signed and with which modes.
* MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey.
* See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers
* signed and with which modes.
*/
export interface MultiSignature {
signatures: Uint8Array[];
}
/**
* CompactBitArray is an implementation of a space efficient bit array.
* This is used to ensure that the encoded data takes up a minimal amount of
* space after proto encoding.
* This is not thread safe, and is not intended for concurrent usage.
* CompactBitArray is an implementation of a space efficient bit array.
* This is used to ensure that the encoded data takes up a minimal amount of
* space after proto encoding.
* This is not thread safe, and is not intended for concurrent usage.
*/
export interface CompactBitArray {
extraBitsStored: number;
elems: Uint8Array;
}
export declare const protobufPackage = "cosmos.crypto.multisig.v1beta1";
export declare const MultiSignature: {
encode(message: MultiSignature, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): MultiSignature;
decode(input: Reader | Uint8Array, length?: number | undefined): MultiSignature;
fromJSON(object: any): MultiSignature;
fromPartial(object: DeepPartial<MultiSignature>): MultiSignature;
toJSON(message: MultiSignature): unknown;
};
export declare const CompactBitArray: {
encode(message: CompactBitArray, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): CompactBitArray;
decode(input: Reader | Uint8Array, length?: number | undefined): CompactBitArray;
fromJSON(object: any): CompactBitArray;
fromPartial(object: DeepPartial<CompactBitArray>): CompactBitArray;
toJSON(message: CompactBitArray): unknown;
};
declare type Builtin = Date | Function | Uint8Array | string | number | undefined;
declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export declare type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

View File

@ -1,36 +1,35 @@
import { Writer, Reader } from "protobufjs/minimal";
import * as Long from "long";
export declare const protobufPackage = "cosmos.crypto.secp256k1";
/**
* PubKey defines a secp256k1 public key
* Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte
* if the y-coordinate is the lexicographically largest of the two associated with
* the x-coordinate. Otherwise the first byte is a 0x03.
* This prefix is followed with the x-coordinate.
* PubKey defines a secp256k1 public key
* Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte
* if the y-coordinate is the lexicographically largest of the two associated with
* the x-coordinate. Otherwise the first byte is a 0x03.
* This prefix is followed with the x-coordinate.
*/
export interface PubKey {
key: Uint8Array;
}
/**
* PrivKey defines a secp256k1 private key.
*/
/** PrivKey defines a secp256k1 private key. */
export interface PrivKey {
key: Uint8Array;
}
export declare const protobufPackage = "cosmos.crypto.secp256k1";
export declare const PubKey: {
encode(message: PubKey, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): PubKey;
decode(input: Reader | Uint8Array, length?: number | undefined): PubKey;
fromJSON(object: any): PubKey;
fromPartial(object: DeepPartial<PubKey>): PubKey;
toJSON(message: PubKey): unknown;
};
export declare const PrivKey: {
encode(message: PrivKey, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): PrivKey;
decode(input: Reader | Uint8Array, length?: number | undefined): PrivKey;
fromJSON(object: any): PrivKey;
fromPartial(object: DeepPartial<PrivKey>): PrivKey;
toJSON(message: PrivKey): unknown;
};
declare type Builtin = Date | Function | Uint8Array | string | number | undefined;
declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export declare type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

View File

@ -2,134 +2,113 @@ import { Any } from "../../../../google/protobuf/any";
import * as Long from "long";
import { CompactBitArray } from "../../../../cosmos/crypto/multisig/v1beta1/multisig";
import { Writer, Reader } from "protobufjs/minimal";
/**
* SignatureDescriptors wraps multiple SignatureDescriptor's.
*/
export interface SignatureDescriptors {
/**
* signatures are the signature descriptors
*/
signatures: SignatureDescriptor[];
}
/**
* SignatureDescriptor is a convenience type which represents the full data for
* a signature including the public key of the signer, signing modes and the
* signature itself. It is primarily used for coordinating signatures between
* clients.
*/
export interface SignatureDescriptor {
/**
* public_key is the public key of the signer
*/
publicKey?: Any;
data?: SignatureDescriptor_Data;
/**
* sequence is the sequence of the account, which describes the
* number of committed transactions signed by a given address. It is used to prevent
* replay attacks.
*/
sequence: Long;
}
/**
* Data represents signature data
*/
export interface SignatureDescriptor_Data {
/**
* single represents a single signer
*/
single?: SignatureDescriptor_Data_Single | undefined;
/**
* multi represents a multisig signer
*/
multi?: SignatureDescriptor_Data_Multi | undefined;
}
/**
* Single is the signature data for a single signer
*/
export interface SignatureDescriptor_Data_Single {
/**
* mode is the signing mode of the single signer
*/
mode: SignMode;
/**
* signature is the raw signature bytes
*/
signature: Uint8Array;
}
/**
* Multi is the signature data for a multisig public key
*/
export interface SignatureDescriptor_Data_Multi {
/**
* bitarray specifies which keys within the multisig are signing
*/
bitarray?: CompactBitArray;
/**
* signatures is the signatures of the multi-signature
*/
signatures: SignatureDescriptor_Data[];
}
export declare const protobufPackage = "cosmos.tx.signing.v1beta1";
/** SignMode represents a signing mode with its own security guarantees.
*/
/** SignMode represents a signing mode with its own security guarantees. */
export declare enum SignMode {
/** SIGN_MODE_UNSPECIFIED - SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be
rejected
*/
/**
* SIGN_MODE_UNSPECIFIED - SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be
* rejected
*/
SIGN_MODE_UNSPECIFIED = 0,
/** SIGN_MODE_DIRECT - SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is
verified with raw bytes from Tx
*/
/**
* SIGN_MODE_DIRECT - SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is
* verified with raw bytes from Tx
*/
SIGN_MODE_DIRECT = 1,
/** SIGN_MODE_TEXTUAL - SIGN_MODE_TEXTUAL is a future signing mode that will verify some
human-readable textual representation on top of the binary representation
from SIGN_MODE_DIRECT
*/
/**
* SIGN_MODE_TEXTUAL - SIGN_MODE_TEXTUAL is a future signing mode that will verify some
* human-readable textual representation on top of the binary representation
* from SIGN_MODE_DIRECT
*/
SIGN_MODE_TEXTUAL = 2,
/** SIGN_MODE_LEGACY_AMINO_JSON - SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses
Amino JSON and will be removed in the future
*/
/**
* SIGN_MODE_LEGACY_AMINO_JSON - SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses
* Amino JSON and will be removed in the future
*/
SIGN_MODE_LEGACY_AMINO_JSON = 127,
UNRECOGNIZED = -1,
}
export declare function signModeFromJSON(object: any): SignMode;
export declare function signModeToJSON(object: SignMode): string;
/** SignatureDescriptors wraps multiple SignatureDescriptor's. */
export interface SignatureDescriptors {
/** signatures are the signature descriptors */
signatures: SignatureDescriptor[];
}
/**
* SignatureDescriptor is a convenience type which represents the full data for
* a signature including the public key of the signer, signing modes and the
* signature itself. It is primarily used for coordinating signatures between
* clients.
*/
export interface SignatureDescriptor {
/** public_key is the public key of the signer */
publicKey?: Any;
data?: SignatureDescriptor_Data;
/**
* sequence is the sequence of the account, which describes the
* number of committed transactions signed by a given address. It is used to prevent
* replay attacks.
*/
sequence: Long;
}
/** Data represents signature data */
export interface SignatureDescriptor_Data {
/** single represents a single signer */
single?: SignatureDescriptor_Data_Single | undefined;
/** multi represents a multisig signer */
multi?: SignatureDescriptor_Data_Multi | undefined;
}
/** Single is the signature data for a single signer */
export interface SignatureDescriptor_Data_Single {
/** mode is the signing mode of the single signer */
mode: SignMode;
/** signature is the raw signature bytes */
signature: Uint8Array;
}
/** Multi is the signature data for a multisig public key */
export interface SignatureDescriptor_Data_Multi {
/** bitarray specifies which keys within the multisig are signing */
bitarray?: CompactBitArray;
/** signatures is the signatures of the multi-signature */
signatures: SignatureDescriptor_Data[];
}
export declare const SignatureDescriptors: {
encode(message: SignatureDescriptors, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): SignatureDescriptors;
decode(input: Reader | Uint8Array, length?: number | undefined): SignatureDescriptors;
fromJSON(object: any): SignatureDescriptors;
fromPartial(object: DeepPartial<SignatureDescriptors>): SignatureDescriptors;
toJSON(message: SignatureDescriptors): unknown;
};
export declare const SignatureDescriptor: {
encode(message: SignatureDescriptor, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): SignatureDescriptor;
decode(input: Reader | Uint8Array, length?: number | undefined): SignatureDescriptor;
fromJSON(object: any): SignatureDescriptor;
fromPartial(object: DeepPartial<SignatureDescriptor>): SignatureDescriptor;
toJSON(message: SignatureDescriptor): unknown;
};
export declare const SignatureDescriptor_Data: {
encode(message: SignatureDescriptor_Data, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): SignatureDescriptor_Data;
decode(input: Reader | Uint8Array, length?: number | undefined): SignatureDescriptor_Data;
fromJSON(object: any): SignatureDescriptor_Data;
fromPartial(object: DeepPartial<SignatureDescriptor_Data>): SignatureDescriptor_Data;
toJSON(message: SignatureDescriptor_Data): unknown;
};
export declare const SignatureDescriptor_Data_Single: {
encode(message: SignatureDescriptor_Data_Single, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): SignatureDescriptor_Data_Single;
decode(input: Reader | Uint8Array, length?: number | undefined): SignatureDescriptor_Data_Single;
fromJSON(object: any): SignatureDescriptor_Data_Single;
fromPartial(object: DeepPartial<SignatureDescriptor_Data_Single>): SignatureDescriptor_Data_Single;
toJSON(message: SignatureDescriptor_Data_Single): unknown;
};
export declare const SignatureDescriptor_Data_Multi: {
encode(message: SignatureDescriptor_Data_Multi, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): SignatureDescriptor_Data_Multi;
decode(input: Reader | Uint8Array, length?: number | undefined): SignatureDescriptor_Data_Multi;
fromJSON(object: any): SignatureDescriptor_Data_Multi;
fromPartial(object: DeepPartial<SignatureDescriptor_Data_Multi>): SignatureDescriptor_Data_Multi;
toJSON(message: SignatureDescriptor_Data_Multi): unknown;
};
declare type Builtin = Date | Function | Uint8Array | string | number | undefined;
declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export declare type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

View File

@ -4,293 +4,267 @@ import { SignMode } from "../../../cosmos/tx/signing/v1beta1/signing";
import { CompactBitArray } from "../../../cosmos/crypto/multisig/v1beta1/multisig";
import { Coin } from "../../../cosmos/base/v1beta1/coin";
import { Writer, Reader } from "protobufjs/minimal";
/**
* Tx is the standard type used for broadcasting transactions.
*/
export declare const protobufPackage = "cosmos.tx.v1beta1";
/** Tx is the standard type used for broadcasting transactions. */
export interface Tx {
/**
* body is the processable content of the transaction
*/
/** body is the processable content of the transaction */
body?: TxBody;
/**
* auth_info is the authorization related content of the transaction,
* specifically signers, signer modes and fee
* auth_info is the authorization related content of the transaction,
* specifically signers, signer modes and fee
*/
authInfo?: AuthInfo;
/**
* signatures is a list of signatures that matches the length and order of
* AuthInfo's signer_infos to allow connecting signature meta information like
* public key and signing mode by position.
* signatures is a list of signatures that matches the length and order of
* AuthInfo's signer_infos to allow connecting signature meta information like
* public key and signing mode by position.
*/
signatures: Uint8Array[];
}
/**
* TxRaw is a variant of Tx that pins the signer's exact binary representation
* of body and auth_info. This is used for signing, broadcasting and
* verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and
* the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used
* as the transaction ID.
* TxRaw is a variant of Tx that pins the signer's exact binary representation
* of body and auth_info. This is used for signing, broadcasting and
* verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and
* the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used
* as the transaction ID.
*/
export interface TxRaw {
/**
* body_bytes is a protobuf serialization of a TxBody that matches the
* representation in SignDoc.
* body_bytes is a protobuf serialization of a TxBody that matches the
* representation in SignDoc.
*/
bodyBytes: Uint8Array;
/**
* auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
* representation in SignDoc.
* auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
* representation in SignDoc.
*/
authInfoBytes: Uint8Array;
/**
* signatures is a list of signatures that matches the length and order of
* AuthInfo's signer_infos to allow connecting signature meta information like
* public key and signing mode by position.
* signatures is a list of signatures that matches the length and order of
* AuthInfo's signer_infos to allow connecting signature meta information like
* public key and signing mode by position.
*/
signatures: Uint8Array[];
}
/**
* SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT.
*/
/** SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. */
export interface SignDoc {
/**
* body_bytes is protobuf serialization of a TxBody that matches the
* representation in TxRaw.
* body_bytes is protobuf serialization of a TxBody that matches the
* representation in TxRaw.
*/
bodyBytes: Uint8Array;
/**
* auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
* representation in TxRaw.
* auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
* representation in TxRaw.
*/
authInfoBytes: Uint8Array;
/**
* chain_id is the unique identifier of the chain this transaction targets.
* It prevents signed transactions from being used on another chain by an
* attacker
* chain_id is the unique identifier of the chain this transaction targets.
* It prevents signed transactions from being used on another chain by an
* attacker
*/
chainId: string;
/**
* account_number is the account number of the account in state
*/
/** account_number is the account number of the account in state */
accountNumber: Long;
}
/**
* TxBody is the body of a transaction that all signers sign over.
*/
/** TxBody is the body of a transaction that all signers sign over. */
export interface TxBody {
/**
* messages is a list of messages to be executed. The required signers of
* those messages define the number and order of elements in AuthInfo's
* signer_infos and Tx's signatures. Each required signer address is added to
* the list only the first time it occurs.
* By convention, the first required signer (usually from the first message)
* is referred to as the primary signer and pays the fee for the whole
* transaction.
* messages is a list of messages to be executed. The required signers of
* those messages define the number and order of elements in AuthInfo's
* signer_infos and Tx's signatures. Each required signer address is added to
* the list only the first time it occurs.
* By convention, the first required signer (usually from the first message)
* is referred to as the primary signer and pays the fee for the whole
* transaction.
*/
messages: Any[];
/**
* memo is any arbitrary memo to be added to the transaction
*/
/** memo is any arbitrary memo to be added to the transaction */
memo: string;
/**
* timeout is the block height after which this transaction will not
* be processed by the chain
* timeout is the block height after which this transaction will not
* be processed by the chain
*/
timeoutHeight: Long;
/**
* extension_options are arbitrary options that can be added by chains
* when the default options are not sufficient. If any of these are present
* and can't be handled, the transaction will be rejected
* extension_options are arbitrary options that can be added by chains
* when the default options are not sufficient. If any of these are present
* and can't be handled, the transaction will be rejected
*/
extensionOptions: Any[];
/**
* extension_options are arbitrary options that can be added by chains
* when the default options are not sufficient. If any of these are present
* and can't be handled, they will be ignored
* extension_options are arbitrary options that can be added by chains
* when the default options are not sufficient. If any of these are present
* and can't be handled, they will be ignored
*/
nonCriticalExtensionOptions: Any[];
}
/**
* AuthInfo describes the fee and signer modes that are used to sign a
* transaction.
* AuthInfo describes the fee and signer modes that are used to sign a
* transaction.
*/
export interface AuthInfo {
/**
* signer_infos defines the signing modes for the required signers. The number
* and order of elements must match the required signers from TxBody's
* messages. The first element is the primary signer and the one which pays
* the fee.
* signer_infos defines the signing modes for the required signers. The number
* and order of elements must match the required signers from TxBody's
* messages. The first element is the primary signer and the one which pays
* the fee.
*/
signerInfos: SignerInfo[];
/**
* Fee is the fee and gas limit for the transaction. The first signer is the
* primary signer and the one which pays the fee. The fee can be calculated
* based on the cost of evaluating the body and doing signature verification
* of the signers. This can be estimated via simulation.
* Fee is the fee and gas limit for the transaction. The first signer is the
* primary signer and the one which pays the fee. The fee can be calculated
* based on the cost of evaluating the body and doing signature verification
* of the signers. This can be estimated via simulation.
*/
fee?: Fee;
}
/**
* SignerInfo describes the public key and signing mode of a single top-level
* signer.
* SignerInfo describes the public key and signing mode of a single top-level
* signer.
*/
export interface SignerInfo {
/**
* public_key is the public key of the signer. It is optional for accounts
* that already exist in state. If unset, the verifier can use the required \
* signer address for this position and lookup the public key.
* public_key is the public key of the signer. It is optional for accounts
* that already exist in state. If unset, the verifier can use the required \
* signer address for this position and lookup the public key.
*/
publicKey?: Any;
/**
* mode_info describes the signing mode of the signer and is a nested
* structure to support nested multisig pubkey's
* mode_info describes the signing mode of the signer and is a nested
* structure to support nested multisig pubkey's
*/
modeInfo?: ModeInfo;
/**
* sequence is the sequence of the account, which describes the
* number of committed transactions signed by a given address. It is used to
* prevent replay attacks.
* sequence is the sequence of the account, which describes the
* number of committed transactions signed by a given address. It is used to
* prevent replay attacks.
*/
sequence: Long;
}
/**
* ModeInfo describes the signing mode of a single or nested multisig signer.
*/
/** ModeInfo describes the signing mode of a single or nested multisig signer. */
export interface ModeInfo {
/**
* single represents a single signer
*/
/** single represents a single signer */
single?: ModeInfo_Single | undefined;
/**
* multi represents a nested multisig signer
*/
/** multi represents a nested multisig signer */
multi?: ModeInfo_Multi | undefined;
}
/**
* Single is the mode info for a single signer. It is structured as a message
* to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the
* future
* Single is the mode info for a single signer. It is structured as a message
* to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the
* future
*/
export interface ModeInfo_Single {
/**
* mode is the signing mode of the single signer
*/
/** mode is the signing mode of the single signer */
mode: SignMode;
}
/**
* Multi is the mode info for a multisig public key
*/
/** Multi is the mode info for a multisig public key */
export interface ModeInfo_Multi {
/**
* bitarray specifies which keys within the multisig are signing
*/
/** bitarray specifies which keys within the multisig are signing */
bitarray?: CompactBitArray;
/**
* mode_infos is the corresponding modes of the signers of the multisig
* which could include nested multisig public keys
* mode_infos is the corresponding modes of the signers of the multisig
* which could include nested multisig public keys
*/
modeInfos: ModeInfo[];
}
/**
* Fee includes the amount of coins paid in fees and the maximum
* gas to be used by the transaction. The ratio yields an effective "gasprice",
* which must be above some miminum to be accepted into the mempool.
* Fee includes the amount of coins paid in fees and the maximum
* gas to be used by the transaction. The ratio yields an effective "gasprice",
* which must be above some miminum to be accepted into the mempool.
*/
export interface Fee {
/**
* amount is the amount of coins to be paid as a fee
*/
/** amount is the amount of coins to be paid as a fee */
amount: Coin[];
/**
* gas_limit is the maximum gas that can be used in transaction processing
* before an out of gas error occurs
* gas_limit is the maximum gas that can be used in transaction processing
* before an out of gas error occurs
*/
gasLimit: Long;
/**
* if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees.
* the payer must be a tx signer (and thus have signed this field in AuthInfo).
* setting this field does *not* change the ordering of required signers for the transaction.
* if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees.
* the payer must be a tx signer (and thus have signed this field in AuthInfo).
* setting this field does *not* change the ordering of required signers for the transaction.
*/
payer: string;
/**
* if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used
* to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does
* not support fee grants, this will fail
* if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used
* to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does
* not support fee grants, this will fail
*/
granter: string;
}
export declare const protobufPackage = "cosmos.tx.v1beta1";
export declare const Tx: {
encode(message: Tx, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): Tx;
decode(input: Reader | Uint8Array, length?: number | undefined): Tx;
fromJSON(object: any): Tx;
fromPartial(object: DeepPartial<Tx>): Tx;
toJSON(message: Tx): unknown;
};
export declare const TxRaw: {
encode(message: TxRaw, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): TxRaw;
decode(input: Reader | Uint8Array, length?: number | undefined): TxRaw;
fromJSON(object: any): TxRaw;
fromPartial(object: DeepPartial<TxRaw>): TxRaw;
toJSON(message: TxRaw): unknown;
};
export declare const SignDoc: {
encode(message: SignDoc, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): SignDoc;
decode(input: Reader | Uint8Array, length?: number | undefined): SignDoc;
fromJSON(object: any): SignDoc;
fromPartial(object: DeepPartial<SignDoc>): SignDoc;
toJSON(message: SignDoc): unknown;
};
export declare const TxBody: {
encode(message: TxBody, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): TxBody;
decode(input: Reader | Uint8Array, length?: number | undefined): TxBody;
fromJSON(object: any): TxBody;
fromPartial(object: DeepPartial<TxBody>): TxBody;
toJSON(message: TxBody): unknown;
};
export declare const AuthInfo: {
encode(message: AuthInfo, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): AuthInfo;
decode(input: Reader | Uint8Array, length?: number | undefined): AuthInfo;
fromJSON(object: any): AuthInfo;
fromPartial(object: DeepPartial<AuthInfo>): AuthInfo;
toJSON(message: AuthInfo): unknown;
};
export declare const SignerInfo: {
encode(message: SignerInfo, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): SignerInfo;
decode(input: Reader | Uint8Array, length?: number | undefined): SignerInfo;
fromJSON(object: any): SignerInfo;
fromPartial(object: DeepPartial<SignerInfo>): SignerInfo;
toJSON(message: SignerInfo): unknown;
};
export declare const ModeInfo: {
encode(message: ModeInfo, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): ModeInfo;
decode(input: Reader | Uint8Array, length?: number | undefined): ModeInfo;
fromJSON(object: any): ModeInfo;
fromPartial(object: DeepPartial<ModeInfo>): ModeInfo;
toJSON(message: ModeInfo): unknown;
};
export declare const ModeInfo_Single: {
encode(message: ModeInfo_Single, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): ModeInfo_Single;
decode(input: Reader | Uint8Array, length?: number | undefined): ModeInfo_Single;
fromJSON(object: any): ModeInfo_Single;
fromPartial(object: DeepPartial<ModeInfo_Single>): ModeInfo_Single;
toJSON(message: ModeInfo_Single): unknown;
};
export declare const ModeInfo_Multi: {
encode(message: ModeInfo_Multi, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): ModeInfo_Multi;
decode(input: Reader | Uint8Array, length?: number | undefined): ModeInfo_Multi;
fromJSON(object: any): ModeInfo_Multi;
fromPartial(object: DeepPartial<ModeInfo_Multi>): ModeInfo_Multi;
toJSON(message: ModeInfo_Multi): unknown;
};
export declare const Fee: {
encode(message: Fee, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): Fee;
decode(input: Reader | Uint8Array, length?: number | undefined): Fee;
fromJSON(object: any): Fee;
fromPartial(object: DeepPartial<Fee>): Fee;
toJSON(message: Fee): unknown;
};
declare type Builtin = Date | Function | Uint8Array | string | number | undefined;
declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export declare type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

View File

@ -1,132 +1,129 @@
import { Writer, Reader } from "protobufjs/minimal";
import * as Long from "long";
export declare const protobufPackage = "google.protobuf";
/**
* `Any` contains an arbitrary serialized protocol buffer message along with a
* URL that describes the type of the serialized message.
* `Any` contains an arbitrary serialized protocol buffer message along with a
* URL that describes the type of the serialized message.
*
* Protobuf library provides support to pack/unpack Any values in the form
* of utility functions or additional generated methods of the Any type.
* Protobuf library provides support to pack/unpack Any values in the form
* of utility functions or additional generated methods of the Any type.
*
* Example 1: Pack and unpack a message in C++.
* Example 1: Pack and unpack a message in C++.
*
* Foo foo = ...;
* Any any;
* any.PackFrom(foo);
* ...
* if (any.UnpackTo(&foo)) {
* ...
* }
*
* Example 2: Pack and unpack a message in Java.
*
* Foo foo = ...;
* Any any = Any.pack(foo);
* ...
* if (any.is(Foo.class)) {
* foo = any.unpack(Foo.class);
* }
*
* Example 3: Pack and unpack a message in Python.
*
* foo = Foo(...)
* any = Any()
* any.Pack(foo)
* ...
* if any.Is(Foo.DESCRIPTOR):
* any.Unpack(foo)
* ...
*
* Example 4: Pack and unpack a message in Go
*
* foo := &pb.Foo{...}
* any, err := ptypes.MarshalAny(foo)
* Foo foo = ...;
* Any any;
* any.PackFrom(foo);
* ...
* if (any.UnpackTo(&foo)) {
* ...
* foo := &pb.Foo{}
* if err := ptypes.UnmarshalAny(any, foo); err != nil {
* ...
* }
* }
*
* The pack methods provided by protobuf library will by default use
* 'type.googleapis.com/full.type.name' as the type URL and the unpack
* methods only use the fully qualified type name after the last '/'
* in the type URL, for example "foo.bar.com/x/y.z" will yield type
* name "y.z".
* Example 2: Pack and unpack a message in Java.
*
* Foo foo = ...;
* Any any = Any.pack(foo);
* ...
* if (any.is(Foo.class)) {
* foo = any.unpack(Foo.class);
* }
*
* JSON
* ====
* The JSON representation of an `Any` value uses the regular
* representation of the deserialized, embedded message, with an
* additional field `@type` which contains the type URL. Example:
* Example 3: Pack and unpack a message in Python.
*
* package google.profile;
* message Person {
* string first_name = 1;
* string last_name = 2;
* foo = Foo(...)
* any = Any()
* any.Pack(foo)
* ...
* if any.Is(Foo.DESCRIPTOR):
* any.Unpack(foo)
* ...
*
* Example 4: Pack and unpack a message in Go
*
* foo := &pb.Foo{...}
* any, err := ptypes.MarshalAny(foo)
* ...
* foo := &pb.Foo{}
* if err := ptypes.UnmarshalAny(any, foo); err != nil {
* ...
* }
*
* {
* "@type": "type.googleapis.com/google.profile.Person",
* "firstName": <string>,
* "lastName": <string>
* }
* The pack methods provided by protobuf library will by default use
* 'type.googleapis.com/full.type.name' as the type URL and the unpack
* methods only use the fully qualified type name after the last '/'
* in the type URL, for example "foo.bar.com/x/y.z" will yield type
* name "y.z".
*
* If the embedded message type is well-known and has a custom JSON
* representation, that representation will be embedded adding a field
* `value` which holds the custom JSON in addition to the `@type`
* field. Example (for message [google.protobuf.Duration][]):
*
* {
* "@type": "type.googleapis.com/google.protobuf.Duration",
* "value": "1.212s"
* }
* JSON
* ====
* The JSON representation of an `Any` value uses the regular
* representation of the deserialized, embedded message, with an
* additional field `@type` which contains the type URL. Example:
*
* package google.profile;
* message Person {
* string first_name = 1;
* string last_name = 2;
* }
*
* {
* "@type": "type.googleapis.com/google.profile.Person",
* "firstName": <string>,
* "lastName": <string>
* }
*
* If the embedded message type is well-known and has a custom JSON
* representation, that representation will be embedded adding a field
* `value` which holds the custom JSON in addition to the `@type`
* field. Example (for message [google.protobuf.Duration][]):
*
* {
* "@type": "type.googleapis.com/google.protobuf.Duration",
* "value": "1.212s"
* }
*/
export interface Any {
/**
* A URL/resource name that uniquely identifies the type of the serialized
* protocol buffer message. This string must contain at least
* one "/" character. The last segment of the URL's path must represent
* the fully qualified name of the type (as in
* `path/google.protobuf.Duration`). The name should be in a canonical form
* (e.g., leading "." is not accepted).
* A URL/resource name that uniquely identifies the type of the serialized
* protocol buffer message. This string must contain at least
* one "/" character. The last segment of the URL's path must represent
* the fully qualified name of the type (as in
* `path/google.protobuf.Duration`). The name should be in a canonical form
* (e.g., leading "." is not accepted).
*
* In practice, teams usually precompile into the binary all types that they
* expect it to use in the context of Any. However, for URLs which use the
* scheme `http`, `https`, or no scheme, one can optionally set up a type
* server that maps type URLs to message definitions as follows:
* In practice, teams usually precompile into the binary all types that they
* expect it to use in the context of Any. However, for URLs which use the
* scheme `http`, `https`, or no scheme, one can optionally set up a type
* server that maps type URLs to message definitions as follows:
*
* * If no scheme is provided, `https` is assumed.
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
* value in binary format, or produce an error.
* * Applications are allowed to cache lookup results based on the
* URL, or have them precompiled into a binary to avoid any
* lookup. Therefore, binary compatibility needs to be preserved
* on changes to types. (Use versioned type names to manage
* breaking changes.)
* * If no scheme is provided, `https` is assumed.
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
* value in binary format, or produce an error.
* * Applications are allowed to cache lookup results based on the
* URL, or have them precompiled into a binary to avoid any
* lookup. Therefore, binary compatibility needs to be preserved
* on changes to types. (Use versioned type names to manage
* breaking changes.)
*
* Note: this functionality is not currently available in the official
* protobuf release, and it is not used for type URLs beginning with
* type.googleapis.com.
*
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.
* Note: this functionality is not currently available in the official
* protobuf release, and it is not used for type URLs beginning with
* type.googleapis.com.
*
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.
*/
typeUrl: string;
/**
* Must be a valid serialized protocol buffer of the above specified type.
*/
/** Must be a valid serialized protocol buffer of the above specified type. */
value: Uint8Array;
}
export declare const protobufPackage = "google.protobuf";
export declare const Any: {
encode(message: Any, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): Any;
decode(input: Reader | Uint8Array, length?: number | undefined): Any;
fromJSON(object: any): Any;
fromPartial(object: DeepPartial<Any>): Any;
toJSON(message: Any): unknown;
};
declare type Builtin = Date | Function | Uint8Array | string | number | undefined;
declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export declare type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +1,19 @@
import { Writer, Reader } from "protobufjs/minimal";
/**
* PublicKey defines the keys available for use with Tendermint Validators
*/
import * as Long from "long";
export declare const protobufPackage = "tendermint.crypto";
/** PublicKey defines the keys available for use with Tendermint Validators */
export interface PublicKey {
ed25519: Uint8Array | undefined;
secp256k1: Uint8Array | undefined;
}
export declare const protobufPackage = "tendermint.crypto";
export declare const PublicKey: {
encode(message: PublicKey, writer?: Writer): Writer;
decode(input: Uint8Array | Reader, length?: number | undefined): PublicKey;
decode(input: Reader | Uint8Array, length?: number | undefined): PublicKey;
fromJSON(object: any): PublicKey;
fromPartial(object: DeepPartial<PublicKey>): PublicKey;
toJSON(message: PublicKey): unknown;
};
declare type Builtin = Date | Function | Uint8Array | string | number | undefined;
declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
export declare type DeepPartial<T> = T extends Builtin
? T
: T extends Array<infer U>