Socket
Socket
Sign inDemoInstall

@cosmjs/proto-signing

Package Overview
Dependencies
Maintainers
2
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cosmjs/proto-signing - npm Package Compare versions

Comparing version 0.24.0-alpha.25 to 0.24.0-alpha.26

build/directsecp256k1hdwallet.spec.d.ts

14

build/codec/cosmos/bank/v1beta1/bank.d.ts

@@ -73,4 +73,4 @@ import { Coin } from "../../../cosmos/base/v1beta1/coin";

fromJSON(object: any): Params;
toJSON(message: Params): unknown;
fromPartial(object: DeepPartial<Params>): Params;
toJSON(message: Params): unknown;
};

@@ -81,4 +81,4 @@ export declare const SendEnabled: {

fromJSON(object: any): SendEnabled;
toJSON(message: SendEnabled): unknown;
fromPartial(object: DeepPartial<SendEnabled>): SendEnabled;
toJSON(message: SendEnabled): unknown;
};

@@ -89,4 +89,4 @@ export declare const Input: {

fromJSON(object: any): Input;
toJSON(message: Input): unknown;
fromPartial(object: DeepPartial<Input>): Input;
toJSON(message: Input): unknown;
};

@@ -97,4 +97,4 @@ export declare const Output: {

fromJSON(object: any): Output;
toJSON(message: Output): unknown;
fromPartial(object: DeepPartial<Output>): Output;
toJSON(message: Output): unknown;
};

@@ -105,4 +105,4 @@ export declare const Supply: {

fromJSON(object: any): Supply;
toJSON(message: Supply): unknown;
fromPartial(object: DeepPartial<Supply>): Supply;
toJSON(message: Supply): unknown;
};

@@ -113,4 +113,4 @@ export declare const DenomUnit: {

fromJSON(object: any): DenomUnit;
toJSON(message: DenomUnit): unknown;
fromPartial(object: DeepPartial<DenomUnit>): DenomUnit;
toJSON(message: DenomUnit): unknown;
};

@@ -121,4 +121,4 @@ export declare const Metadata: {

fromJSON(object: any): Metadata;
toJSON(message: Metadata): unknown;
fromPartial(object: DeepPartial<Metadata>): Metadata;
toJSON(message: Metadata): unknown;
};

@@ -125,0 +125,0 @@ declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;

@@ -17,3 +17,5 @@ "use strict";

}
writer.uint32(16).bool(message.defaultSendEnabled);
if (message.defaultSendEnabled === true) {
writer.uint32(16).bool(message.defaultSendEnabled);
}
return writer;

@@ -58,2 +60,13 @@ },

},
toJSON(message) {
const obj = {};
if (message.sendEnabled) {
obj.sendEnabled = message.sendEnabled.map((e) => (e ? exports.SendEnabled.toJSON(e) : undefined));
}
else {
obj.sendEnabled = [];
}
message.defaultSendEnabled !== undefined && (obj.defaultSendEnabled = message.defaultSendEnabled);
return obj;
},
fromPartial(object) {

@@ -75,13 +88,2 @@ const message = Object.assign({}, baseParams);

},
toJSON(message) {
const obj = {};
if (message.sendEnabled) {
obj.sendEnabled = message.sendEnabled.map((e) => (e ? exports.SendEnabled.toJSON(e) : undefined));
}
else {
obj.sendEnabled = [];
}
message.defaultSendEnabled !== undefined && (obj.defaultSendEnabled = message.defaultSendEnabled);
return obj;
},
};

@@ -91,4 +93,8 @@ const baseSendEnabled = { denom: "", enabled: false };

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(10).string(message.denom);
writer.uint32(16).bool(message.enabled);
if (message.denom !== "") {
writer.uint32(10).string(message.denom);
}
if (message.enabled === true) {
writer.uint32(16).bool(message.enabled);
}
return writer;

@@ -132,2 +138,8 @@ },

},
toJSON(message) {
const obj = {};
message.denom !== undefined && (obj.denom = message.denom);
message.enabled !== undefined && (obj.enabled = message.enabled);
return obj;
},
fromPartial(object) {

@@ -149,8 +161,2 @@ const message = Object.assign({}, baseSendEnabled);

},
toJSON(message) {
const obj = {};
message.denom !== undefined && (obj.denom = message.denom);
message.enabled !== undefined && (obj.enabled = message.enabled);
return obj;
},
};

@@ -160,3 +166,5 @@ const baseInput = { address: "" };

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(10).string(message.address);
if (message.address !== "") {
writer.uint32(10).string(message.address);
}
for (const v of message.coins) {

@@ -204,2 +212,13 @@ coin_1.Coin.encode(v, writer.uint32(18).fork()).ldelim();

},
toJSON(message) {
const obj = {};
message.address !== undefined && (obj.address = message.address);
if (message.coins) {
obj.coins = message.coins.map((e) => (e ? coin_1.Coin.toJSON(e) : undefined));
}
else {
obj.coins = [];
}
return obj;
},
fromPartial(object) {

@@ -221,13 +240,2 @@ const message = Object.assign({}, baseInput);

},
toJSON(message) {
const obj = {};
message.address !== undefined && (obj.address = message.address);
if (message.coins) {
obj.coins = message.coins.map((e) => (e ? coin_1.Coin.toJSON(e) : undefined));
}
else {
obj.coins = [];
}
return obj;
},
};

@@ -237,3 +245,5 @@ const baseOutput = { address: "" };

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(10).string(message.address);
if (message.address !== "") {
writer.uint32(10).string(message.address);
}
for (const v of message.coins) {

@@ -281,2 +291,13 @@ coin_1.Coin.encode(v, writer.uint32(18).fork()).ldelim();

},
toJSON(message) {
const obj = {};
message.address !== undefined && (obj.address = message.address);
if (message.coins) {
obj.coins = message.coins.map((e) => (e ? coin_1.Coin.toJSON(e) : undefined));
}
else {
obj.coins = [];
}
return obj;
},
fromPartial(object) {

@@ -298,13 +319,2 @@ const message = Object.assign({}, baseOutput);

},
toJSON(message) {
const obj = {};
message.address !== undefined && (obj.address = message.address);
if (message.coins) {
obj.coins = message.coins.map((e) => (e ? coin_1.Coin.toJSON(e) : undefined));
}
else {
obj.coins = [];
}
return obj;
},
};

@@ -347,2 +357,12 @@ const baseSupply = {};

},
toJSON(message) {
const obj = {};
if (message.total) {
obj.total = message.total.map((e) => (e ? coin_1.Coin.toJSON(e) : undefined));
}
else {
obj.total = [];
}
return obj;
},
fromPartial(object) {

@@ -358,12 +378,2 @@ const message = Object.assign({}, baseSupply);

},
toJSON(message) {
const obj = {};
if (message.total) {
obj.total = message.total.map((e) => (e ? coin_1.Coin.toJSON(e) : undefined));
}
else {
obj.total = [];
}
return obj;
},
};

@@ -373,4 +383,8 @@ const baseDenomUnit = { denom: "", exponent: 0, aliases: "" };

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(10).string(message.denom);
writer.uint32(16).uint32(message.exponent);
if (message.denom !== "") {
writer.uint32(10).string(message.denom);
}
if (message.exponent !== 0) {
writer.uint32(16).uint32(message.exponent);
}
for (const v of message.aliases) {

@@ -427,2 +441,14 @@ writer.uint32(26).string(v);

},
toJSON(message) {
const obj = {};
message.denom !== undefined && (obj.denom = message.denom);
message.exponent !== undefined && (obj.exponent = message.exponent);
if (message.aliases) {
obj.aliases = message.aliases.map((e) => e);
}
else {
obj.aliases = [];
}
return obj;
},
fromPartial(object) {

@@ -450,14 +476,2 @@ const message = Object.assign({}, baseDenomUnit);

},
toJSON(message) {
const obj = {};
message.denom !== undefined && (obj.denom = message.denom);
message.exponent !== undefined && (obj.exponent = message.exponent);
if (message.aliases) {
obj.aliases = message.aliases.map((e) => e);
}
else {
obj.aliases = [];
}
return obj;
},
};

@@ -467,8 +481,14 @@ const baseMetadata = { description: "", base: "", display: "" };

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(10).string(message.description);
if (message.description !== "") {
writer.uint32(10).string(message.description);
}
for (const v of message.denomUnits) {
exports.DenomUnit.encode(v, writer.uint32(18).fork()).ldelim();
}
writer.uint32(26).string(message.base);
writer.uint32(34).string(message.display);
if (message.base !== "") {
writer.uint32(26).string(message.base);
}
if (message.display !== "") {
writer.uint32(34).string(message.display);
}
return writer;

@@ -531,2 +551,15 @@ },

},
toJSON(message) {
const obj = {};
message.description !== undefined && (obj.description = message.description);
if (message.denomUnits) {
obj.denomUnits = message.denomUnits.map((e) => (e ? exports.DenomUnit.toJSON(e) : undefined));
}
else {
obj.denomUnits = [];
}
message.base !== undefined && (obj.base = message.base);
message.display !== undefined && (obj.display = message.display);
return obj;
},
fromPartial(object) {

@@ -560,16 +593,3 @@ const message = Object.assign({}, baseMetadata);

},
toJSON(message) {
const obj = {};
message.description !== undefined && (obj.description = message.description);
if (message.denomUnits) {
obj.denomUnits = message.denomUnits.map((e) => (e ? exports.DenomUnit.toJSON(e) : undefined));
}
else {
obj.denomUnits = [];
}
message.base !== undefined && (obj.base = message.base);
message.display !== undefined && (obj.display = message.display);
return obj;
},
};
//# sourceMappingURL=bank.js.map

@@ -27,4 +27,4 @@ import { Coin } from "../../../cosmos/base/v1beta1/coin";

fromJSON(object: any): MsgSend;
toJSON(message: MsgSend): unknown;
fromPartial(object: DeepPartial<MsgSend>): MsgSend;
toJSON(message: MsgSend): unknown;
};

@@ -35,4 +35,4 @@ export declare const MsgSendResponse: {

fromJSON(_: any): MsgSendResponse;
toJSON(_: MsgSendResponse): unknown;
fromPartial(_: DeepPartial<MsgSendResponse>): MsgSendResponse;
toJSON(_: MsgSendResponse): unknown;
};

@@ -43,4 +43,4 @@ export declare const MsgMultiSend: {

fromJSON(object: any): MsgMultiSend;
toJSON(message: MsgMultiSend): unknown;
fromPartial(object: DeepPartial<MsgMultiSend>): MsgMultiSend;
toJSON(message: MsgMultiSend): unknown;
};

@@ -51,4 +51,4 @@ export declare const MsgMultiSendResponse: {

fromJSON(_: any): MsgMultiSendResponse;
toJSON(_: MsgMultiSendResponse): unknown;
fromPartial(_: DeepPartial<MsgMultiSendResponse>): MsgMultiSendResponse;
toJSON(_: MsgMultiSendResponse): unknown;
};

@@ -55,0 +55,0 @@ /** Msg defines the bank Msg service. */

@@ -15,4 +15,8 @@ "use strict";

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(10).string(message.fromAddress);
writer.uint32(18).string(message.toAddress);
if (message.fromAddress !== "") {
writer.uint32(10).string(message.fromAddress);
}
if (message.toAddress !== "") {
writer.uint32(18).string(message.toAddress);
}
for (const v of message.amount) {

@@ -69,2 +73,14 @@ coin_1.Coin.encode(v, writer.uint32(26).fork()).ldelim();

},
toJSON(message) {
const obj = {};
message.fromAddress !== undefined && (obj.fromAddress = message.fromAddress);
message.toAddress !== undefined && (obj.toAddress = message.toAddress);
if (message.amount) {
obj.amount = message.amount.map((e) => (e ? coin_1.Coin.toJSON(e) : undefined));
}
else {
obj.amount = [];
}
return obj;
},
fromPartial(object) {

@@ -92,14 +108,2 @@ const message = Object.assign({}, baseMsgSend);

},
toJSON(message) {
const obj = {};
message.fromAddress !== undefined && (obj.fromAddress = message.fromAddress);
message.toAddress !== undefined && (obj.toAddress = message.toAddress);
if (message.amount) {
obj.amount = message.amount.map((e) => (e ? coin_1.Coin.toJSON(e) : undefined));
}
else {
obj.amount = [];
}
return obj;
},
};

@@ -129,2 +133,6 @@ const baseMsgSendResponse = {};

},
toJSON(_) {
const obj = {};
return obj;
},
fromPartial(_) {

@@ -134,6 +142,2 @@ const message = Object.assign({}, baseMsgSendResponse);

},
toJSON(_) {
const obj = {};
return obj;
},
};

@@ -189,2 +193,18 @@ const baseMsgMultiSend = {};

},
toJSON(message) {
const obj = {};
if (message.inputs) {
obj.inputs = message.inputs.map((e) => (e ? bank_1.Input.toJSON(e) : undefined));
}
else {
obj.inputs = [];
}
if (message.outputs) {
obj.outputs = message.outputs.map((e) => (e ? bank_1.Output.toJSON(e) : undefined));
}
else {
obj.outputs = [];
}
return obj;
},
fromPartial(object) {

@@ -206,18 +226,2 @@ const message = Object.assign({}, baseMsgMultiSend);

},
toJSON(message) {
const obj = {};
if (message.inputs) {
obj.inputs = message.inputs.map((e) => (e ? bank_1.Input.toJSON(e) : undefined));
}
else {
obj.inputs = [];
}
if (message.outputs) {
obj.outputs = message.outputs.map((e) => (e ? bank_1.Output.toJSON(e) : undefined));
}
else {
obj.outputs = [];
}
return obj;
},
};

@@ -247,2 +251,6 @@ const baseMsgMultiSendResponse = {};

},
toJSON(_) {
const obj = {};
return obj;
},
fromPartial(_) {

@@ -252,6 +260,2 @@ const message = Object.assign({}, baseMsgMultiSendResponse);

},
toJSON(_) {
const obj = {};
return obj;
},
};

@@ -264,3 +268,3 @@ class MsgClientImpl {

const data = exports.MsgSend.encode(request).finish();
const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "methodDesc.name", data);
const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "Send", data);
return promise.then((data) => exports.MsgSendResponse.decode(new minimal_1.default.Reader(data)));

@@ -270,3 +274,3 @@ }

const data = exports.MsgMultiSend.encode(request).finish();
const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "methodDesc.name", data);
const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "MultiSend", data);
return promise.then((data) => exports.MsgMultiSendResponse.decode(new minimal_1.default.Reader(data)));

@@ -273,0 +277,0 @@ }

@@ -36,4 +36,4 @@ import Long from "long";

fromJSON(object: any): Coin;
toJSON(message: Coin): unknown;
fromPartial(object: DeepPartial<Coin>): Coin;
toJSON(message: Coin): unknown;
};

@@ -44,4 +44,4 @@ export declare const DecCoin: {

fromJSON(object: any): DecCoin;
toJSON(message: DecCoin): unknown;
fromPartial(object: DeepPartial<DecCoin>): DecCoin;
toJSON(message: DecCoin): unknown;
};

@@ -52,4 +52,4 @@ export declare const IntProto: {

fromJSON(object: any): IntProto;
toJSON(message: IntProto): unknown;
fromPartial(object: DeepPartial<IntProto>): IntProto;
toJSON(message: IntProto): unknown;
};

@@ -60,4 +60,4 @@ export declare const DecProto: {

fromJSON(object: any): DecProto;
toJSON(message: DecProto): unknown;
fromPartial(object: DeepPartial<DecProto>): DecProto;
toJSON(message: DecProto): unknown;
};

@@ -64,0 +64,0 @@ declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;

@@ -12,4 +12,8 @@ "use strict";

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(10).string(message.denom);
writer.uint32(18).string(message.amount);
if (message.denom !== "") {
writer.uint32(10).string(message.denom);
}
if (message.amount !== "") {
writer.uint32(18).string(message.amount);
}
return writer;

@@ -53,2 +57,8 @@ },

},
toJSON(message) {
const obj = {};
message.denom !== undefined && (obj.denom = message.denom);
message.amount !== undefined && (obj.amount = message.amount);
return obj;
},
fromPartial(object) {

@@ -70,8 +80,2 @@ const message = Object.assign({}, baseCoin);

},
toJSON(message) {
const obj = {};
message.denom !== undefined && (obj.denom = message.denom);
message.amount !== undefined && (obj.amount = message.amount);
return obj;
},
};

@@ -81,4 +85,8 @@ const baseDecCoin = { denom: "", amount: "" };

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(10).string(message.denom);
writer.uint32(18).string(message.amount);
if (message.denom !== "") {
writer.uint32(10).string(message.denom);
}
if (message.amount !== "") {
writer.uint32(18).string(message.amount);
}
return writer;

@@ -122,2 +130,8 @@ },

},
toJSON(message) {
const obj = {};
message.denom !== undefined && (obj.denom = message.denom);
message.amount !== undefined && (obj.amount = message.amount);
return obj;
},
fromPartial(object) {

@@ -139,8 +153,2 @@ const message = Object.assign({}, baseDecCoin);

},
toJSON(message) {
const obj = {};
message.denom !== undefined && (obj.denom = message.denom);
message.amount !== undefined && (obj.amount = message.amount);
return obj;
},
};

@@ -150,3 +158,5 @@ const baseIntProto = { int: "" };

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(10).string(message.int);
if (message.int !== "") {
writer.uint32(10).string(message.int);
}
return writer;

@@ -181,2 +191,7 @@ },

},
toJSON(message) {
const obj = {};
message.int !== undefined && (obj.int = message.int);
return obj;
},
fromPartial(object) {

@@ -192,7 +207,2 @@ const message = Object.assign({}, baseIntProto);

},
toJSON(message) {
const obj = {};
message.int !== undefined && (obj.int = message.int);
return obj;
},
};

@@ -202,3 +212,5 @@ const baseDecProto = { dec: "" };

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(10).string(message.dec);
if (message.dec !== "") {
writer.uint32(10).string(message.dec);
}
return writer;

@@ -233,2 +245,7 @@ },

},
toJSON(message) {
const obj = {};
message.dec !== undefined && (obj.dec = message.dec);
return obj;
},
fromPartial(object) {

@@ -244,8 +261,3 @@ const message = Object.assign({}, baseDecProto);

},
toJSON(message) {
const obj = {};
message.dec !== undefined && (obj.dec = message.dec);
return obj;
},
};
//# sourceMappingURL=coin.js.map

@@ -26,4 +26,4 @@ import Long from "long";

fromJSON(object: any): MultiSignature;
toJSON(message: MultiSignature): unknown;
fromPartial(object: DeepPartial<MultiSignature>): MultiSignature;
toJSON(message: MultiSignature): unknown;
};

@@ -34,4 +34,4 @@ export declare const CompactBitArray: {

fromJSON(object: any): CompactBitArray;
toJSON(message: CompactBitArray): unknown;
fromPartial(object: DeepPartial<CompactBitArray>): CompactBitArray;
toJSON(message: CompactBitArray): unknown;
};

@@ -38,0 +38,0 @@ declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;

@@ -45,2 +45,12 @@ "use strict";

},
toJSON(message) {
const obj = {};
if (message.signatures) {
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
}
else {
obj.signatures = [];
}
return obj;
},
fromPartial(object) {

@@ -56,12 +66,2 @@ const message = Object.assign({}, baseMultiSignature);

},
toJSON(message) {
const obj = {};
if (message.signatures) {
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
}
else {
obj.signatures = [];
}
return obj;
},
};

@@ -71,4 +71,8 @@ const baseCompactBitArray = { extraBitsStored: 0 };

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(8).uint32(message.extraBitsStored);
writer.uint32(18).bytes(message.elems);
if (message.extraBitsStored !== 0) {
writer.uint32(8).uint32(message.extraBitsStored);
}
if (message.elems.length !== 0) {
writer.uint32(18).bytes(message.elems);
}
return writer;

@@ -109,2 +113,9 @@ },

},
toJSON(message) {
const obj = {};
message.extraBitsStored !== undefined && (obj.extraBitsStored = message.extraBitsStored);
message.elems !== undefined &&
(obj.elems = base64FromBytes(message.elems !== undefined ? message.elems : new Uint8Array()));
return obj;
},
fromPartial(object) {

@@ -126,9 +137,2 @@ const message = Object.assign({}, baseCompactBitArray);

},
toJSON(message) {
const obj = {};
message.extraBitsStored !== undefined && (obj.extraBitsStored = message.extraBitsStored);
message.elems !== undefined &&
(obj.elems = base64FromBytes(message.elems !== undefined ? message.elems : new Uint8Array()));
return obj;
},
};

@@ -144,3 +148,3 @@ var globalThis = (() => {

return global;
throw new Error("Unable to locate global object");
throw "Unable to locate global object";
})();

@@ -147,0 +151,0 @@ const atob = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));

@@ -22,4 +22,4 @@ import Long from "long";

fromJSON(object: any): PubKey;
toJSON(message: PubKey): unknown;
fromPartial(object: DeepPartial<PubKey>): PubKey;
toJSON(message: PubKey): unknown;
};

@@ -30,4 +30,4 @@ export declare const PrivKey: {

fromJSON(object: any): PrivKey;
toJSON(message: PrivKey): unknown;
fromPartial(object: DeepPartial<PrivKey>): PrivKey;
toJSON(message: PrivKey): unknown;
};

@@ -34,0 +34,0 @@ declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;

@@ -12,3 +12,5 @@ "use strict";

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(10).bytes(message.key);
if (message.key.length !== 0) {
writer.uint32(10).bytes(message.key);
}
return writer;

@@ -40,2 +42,8 @@ },

},
toJSON(message) {
const obj = {};
message.key !== undefined &&
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
return obj;
},
fromPartial(object) {

@@ -51,8 +59,2 @@ const message = Object.assign({}, basePubKey);

},
toJSON(message) {
const obj = {};
message.key !== undefined &&
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
return obj;
},
};

@@ -62,3 +64,5 @@ const basePrivKey = {};

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(10).bytes(message.key);
if (message.key.length !== 0) {
writer.uint32(10).bytes(message.key);
}
return writer;

@@ -90,2 +94,8 @@ },

},
toJSON(message) {
const obj = {};
message.key !== undefined &&
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
return obj;
},
fromPartial(object) {

@@ -101,8 +111,2 @@ const message = Object.assign({}, basePrivKey);

},
toJSON(message) {
const obj = {};
message.key !== undefined &&
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
return obj;
},
};

@@ -118,3 +122,3 @@ var globalThis = (() => {

return global;
throw new Error("Unable to locate global object");
throw "Unable to locate global object";
})();

@@ -121,0 +125,0 @@ const atob = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));

@@ -80,4 +80,4 @@ import { Any } from "../../../../google/protobuf/any";

fromJSON(object: any): SignatureDescriptors;
toJSON(message: SignatureDescriptors): unknown;
fromPartial(object: DeepPartial<SignatureDescriptors>): SignatureDescriptors;
toJSON(message: SignatureDescriptors): unknown;
};

@@ -88,4 +88,4 @@ export declare const SignatureDescriptor: {

fromJSON(object: any): SignatureDescriptor;
toJSON(message: SignatureDescriptor): unknown;
fromPartial(object: DeepPartial<SignatureDescriptor>): SignatureDescriptor;
toJSON(message: SignatureDescriptor): unknown;
};

@@ -96,4 +96,4 @@ export declare const SignatureDescriptor_Data: {

fromJSON(object: any): SignatureDescriptor_Data;
toJSON(message: SignatureDescriptor_Data): unknown;
fromPartial(object: DeepPartial<SignatureDescriptor_Data>): SignatureDescriptor_Data;
toJSON(message: SignatureDescriptor_Data): unknown;
};

@@ -104,4 +104,4 @@ export declare const SignatureDescriptor_Data_Single: {

fromJSON(object: any): SignatureDescriptor_Data_Single;
toJSON(message: SignatureDescriptor_Data_Single): unknown;
fromPartial(object: DeepPartial<SignatureDescriptor_Data_Single>): SignatureDescriptor_Data_Single;
toJSON(message: SignatureDescriptor_Data_Single): unknown;
};

@@ -112,4 +112,4 @@ export declare const SignatureDescriptor_Data_Multi: {

fromJSON(object: any): SignatureDescriptor_Data_Multi;
toJSON(message: SignatureDescriptor_Data_Multi): unknown;
fromPartial(object: DeepPartial<SignatureDescriptor_Data_Multi>): SignatureDescriptor_Data_Multi;
toJSON(message: SignatureDescriptor_Data_Multi): unknown;
};

@@ -116,0 +116,0 @@ declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;

@@ -111,2 +111,12 @@ "use strict";

},
toJSON(message) {
const obj = {};
if (message.signatures) {
obj.signatures = message.signatures.map((e) => (e ? exports.SignatureDescriptor.toJSON(e) : undefined));
}
else {
obj.signatures = [];
}
return obj;
},
fromPartial(object) {

@@ -122,12 +132,2 @@ const message = Object.assign({}, baseSignatureDescriptors);

},
toJSON(message) {
const obj = {};
if (message.signatures) {
obj.signatures = message.signatures.map((e) => (e ? exports.SignatureDescriptor.toJSON(e) : undefined));
}
else {
obj.signatures = [];
}
return obj;
},
};

@@ -137,9 +137,11 @@ const baseSignatureDescriptor = { sequence: long_1.default.UZERO };

encode(message, writer = minimal_1.default.Writer.create()) {
if (message.publicKey !== undefined && message.publicKey !== undefined) {
if (message.publicKey !== undefined) {
any_1.Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim();
}
if (message.data !== undefined && message.data !== undefined) {
if (message.data !== undefined) {
exports.SignatureDescriptor_Data.encode(message.data, writer.uint32(18).fork()).ldelim();
}
writer.uint32(24).uint64(message.sequence);
if (!message.sequence.isZero()) {
writer.uint32(24).uint64(message.sequence);
}
return writer;

@@ -173,3 +175,3 @@ },

if (object.publicKey !== undefined && object.publicKey !== null) {
message.publicKey = any_1.Any.fromPartial(object.publicKey);
message.publicKey = any_1.Any.fromJSON(object.publicKey);
}

@@ -193,2 +195,11 @@ else {

},
toJSON(message) {
const obj = {};
message.publicKey !== undefined &&
(obj.publicKey = message.publicKey ? any_1.Any.toJSON(message.publicKey) : undefined);
message.data !== undefined &&
(obj.data = message.data ? exports.SignatureDescriptor_Data.toJSON(message.data) : undefined);
message.sequence !== undefined && (obj.sequence = (message.sequence || long_1.default.UZERO).toString());
return obj;
},
fromPartial(object) {

@@ -216,11 +227,2 @@ const message = Object.assign({}, baseSignatureDescriptor);

},
toJSON(message) {
const obj = {};
message.publicKey !== undefined &&
(obj.publicKey = message.publicKey ? any_1.Any.toJSON(message.publicKey) : undefined);
message.data !== undefined &&
(obj.data = message.data ? exports.SignatureDescriptor_Data.toJSON(message.data) : undefined);
message.sequence !== undefined && (obj.sequence = (message.sequence || long_1.default.UZERO).toString());
return obj;
},
};

@@ -274,2 +276,10 @@ const baseSignatureDescriptor_Data = {};

},
toJSON(message) {
const obj = {};
message.single !== undefined &&
(obj.single = message.single ? exports.SignatureDescriptor_Data_Single.toJSON(message.single) : undefined);
message.multi !== undefined &&
(obj.multi = message.multi ? exports.SignatureDescriptor_Data_Multi.toJSON(message.multi) : undefined);
return obj;
},
fromPartial(object) {

@@ -291,10 +301,2 @@ const message = Object.assign({}, baseSignatureDescriptor_Data);

},
toJSON(message) {
const obj = {};
message.single !== undefined &&
(obj.single = message.single ? exports.SignatureDescriptor_Data_Single.toJSON(message.single) : undefined);
message.multi !== undefined &&
(obj.multi = message.multi ? exports.SignatureDescriptor_Data_Multi.toJSON(message.multi) : undefined);
return obj;
},
};

@@ -304,4 +306,8 @@ const baseSignatureDescriptor_Data_Single = { mode: 0 };

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(8).int32(message.mode);
writer.uint32(18).bytes(message.signature);
if (message.mode !== 0) {
writer.uint32(8).int32(message.mode);
}
if (message.signature.length !== 0) {
writer.uint32(18).bytes(message.signature);
}
return writer;

@@ -342,2 +348,9 @@ },

},
toJSON(message) {
const obj = {};
message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
message.signature !== undefined &&
(obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array()));
return obj;
},
fromPartial(object) {

@@ -359,9 +372,2 @@ const message = Object.assign({}, baseSignatureDescriptor_Data_Single);

},
toJSON(message) {
const obj = {};
message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
message.signature !== undefined &&
(obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : new Uint8Array()));
return obj;
},
};

@@ -371,3 +377,3 @@ const baseSignatureDescriptor_Data_Multi = {};

encode(message, writer = minimal_1.default.Writer.create()) {
if (message.bitarray !== undefined && message.bitarray !== undefined) {
if (message.bitarray !== undefined) {
multisig_1.CompactBitArray.encode(message.bitarray, writer.uint32(10).fork()).ldelim();

@@ -417,2 +423,14 @@ }

},
toJSON(message) {
const obj = {};
message.bitarray !== undefined &&
(obj.bitarray = message.bitarray ? multisig_1.CompactBitArray.toJSON(message.bitarray) : undefined);
if (message.signatures) {
obj.signatures = message.signatures.map((e) => (e ? exports.SignatureDescriptor_Data.toJSON(e) : undefined));
}
else {
obj.signatures = [];
}
return obj;
},
fromPartial(object) {

@@ -434,14 +452,2 @@ const message = Object.assign({}, baseSignatureDescriptor_Data_Multi);

},
toJSON(message) {
const obj = {};
message.bitarray !== undefined &&
(obj.bitarray = message.bitarray ? multisig_1.CompactBitArray.toJSON(message.bitarray) : undefined);
if (message.signatures) {
obj.signatures = message.signatures.map((e) => (e ? exports.SignatureDescriptor_Data.toJSON(e) : undefined));
}
else {
obj.signatures = [];
}
return obj;
},
};

@@ -457,3 +463,3 @@ var globalThis = (() => {

return global;
throw new Error("Unable to locate global object");
throw "Unable to locate global object";
})();

@@ -460,0 +466,0 @@ const atob = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));

@@ -201,4 +201,4 @@ import Long from "long";

fromJSON(object: any): Tx;
toJSON(message: Tx): unknown;
fromPartial(object: DeepPartial<Tx>): Tx;
toJSON(message: Tx): unknown;
};

@@ -209,4 +209,4 @@ export declare const TxRaw: {

fromJSON(object: any): TxRaw;
toJSON(message: TxRaw): unknown;
fromPartial(object: DeepPartial<TxRaw>): TxRaw;
toJSON(message: TxRaw): unknown;
};

@@ -217,4 +217,4 @@ export declare const SignDoc: {

fromJSON(object: any): SignDoc;
toJSON(message: SignDoc): unknown;
fromPartial(object: DeepPartial<SignDoc>): SignDoc;
toJSON(message: SignDoc): unknown;
};

@@ -225,4 +225,4 @@ export declare const TxBody: {

fromJSON(object: any): TxBody;
toJSON(message: TxBody): unknown;
fromPartial(object: DeepPartial<TxBody>): TxBody;
toJSON(message: TxBody): unknown;
};

@@ -233,4 +233,4 @@ export declare const AuthInfo: {

fromJSON(object: any): AuthInfo;
toJSON(message: AuthInfo): unknown;
fromPartial(object: DeepPartial<AuthInfo>): AuthInfo;
toJSON(message: AuthInfo): unknown;
};

@@ -241,4 +241,4 @@ export declare const SignerInfo: {

fromJSON(object: any): SignerInfo;
toJSON(message: SignerInfo): unknown;
fromPartial(object: DeepPartial<SignerInfo>): SignerInfo;
toJSON(message: SignerInfo): unknown;
};

@@ -249,4 +249,4 @@ export declare const ModeInfo: {

fromJSON(object: any): ModeInfo;
toJSON(message: ModeInfo): unknown;
fromPartial(object: DeepPartial<ModeInfo>): ModeInfo;
toJSON(message: ModeInfo): unknown;
};

@@ -257,4 +257,4 @@ export declare const ModeInfo_Single: {

fromJSON(object: any): ModeInfo_Single;
toJSON(message: ModeInfo_Single): unknown;
fromPartial(object: DeepPartial<ModeInfo_Single>): ModeInfo_Single;
toJSON(message: ModeInfo_Single): unknown;
};

@@ -265,4 +265,4 @@ export declare const ModeInfo_Multi: {

fromJSON(object: any): ModeInfo_Multi;
toJSON(message: ModeInfo_Multi): unknown;
fromPartial(object: DeepPartial<ModeInfo_Multi>): ModeInfo_Multi;
toJSON(message: ModeInfo_Multi): unknown;
};

@@ -273,4 +273,4 @@ export declare const Fee: {

fromJSON(object: any): Fee;
toJSON(message: Fee): unknown;
fromPartial(object: DeepPartial<Fee>): Fee;
toJSON(message: Fee): unknown;
};

@@ -277,0 +277,0 @@ declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;

@@ -18,6 +18,6 @@ "use strict";

encode(message, writer = minimal_1.default.Writer.create()) {
if (message.body !== undefined && message.body !== undefined) {
if (message.body !== undefined) {
exports.TxBody.encode(message.body, writer.uint32(10).fork()).ldelim();
}
if (message.authInfo !== undefined && message.authInfo !== undefined) {
if (message.authInfo !== undefined) {
exports.AuthInfo.encode(message.authInfo, writer.uint32(18).fork()).ldelim();

@@ -76,2 +76,15 @@ }

},
toJSON(message) {
const obj = {};
message.body !== undefined && (obj.body = message.body ? exports.TxBody.toJSON(message.body) : undefined);
message.authInfo !== undefined &&
(obj.authInfo = message.authInfo ? exports.AuthInfo.toJSON(message.authInfo) : undefined);
if (message.signatures) {
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
}
else {
obj.signatures = [];
}
return obj;
},
fromPartial(object) {

@@ -99,15 +112,2 @@ const message = Object.assign({}, baseTx);

},
toJSON(message) {
const obj = {};
message.body !== undefined && (obj.body = message.body ? exports.TxBody.toJSON(message.body) : undefined);
message.authInfo !== undefined &&
(obj.authInfo = message.authInfo ? exports.AuthInfo.toJSON(message.authInfo) : undefined);
if (message.signatures) {
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
}
else {
obj.signatures = [];
}
return obj;
},
};

@@ -117,4 +117,8 @@ const baseTxRaw = {};

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(10).bytes(message.bodyBytes);
writer.uint32(18).bytes(message.authInfoBytes);
if (message.bodyBytes.length !== 0) {
writer.uint32(10).bytes(message.bodyBytes);
}
if (message.authInfoBytes.length !== 0) {
writer.uint32(18).bytes(message.authInfoBytes);
}
for (const v of message.signatures) {

@@ -165,2 +169,16 @@ writer.uint32(26).bytes(v);

},
toJSON(message) {
const obj = {};
message.bodyBytes !== undefined &&
(obj.bodyBytes = base64FromBytes(message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array()));
message.authInfoBytes !== undefined &&
(obj.authInfoBytes = base64FromBytes(message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array()));
if (message.signatures) {
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
}
else {
obj.signatures = [];
}
return obj;
},
fromPartial(object) {

@@ -188,16 +206,2 @@ const message = Object.assign({}, baseTxRaw);

},
toJSON(message) {
const obj = {};
message.bodyBytes !== undefined &&
(obj.bodyBytes = base64FromBytes(message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array()));
message.authInfoBytes !== undefined &&
(obj.authInfoBytes = base64FromBytes(message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array()));
if (message.signatures) {
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
}
else {
obj.signatures = [];
}
return obj;
},
};

@@ -207,6 +211,14 @@ const baseSignDoc = { chainId: "", accountNumber: long_1.default.UZERO };

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(10).bytes(message.bodyBytes);
writer.uint32(18).bytes(message.authInfoBytes);
writer.uint32(26).string(message.chainId);
writer.uint32(32).uint64(message.accountNumber);
if (message.bodyBytes.length !== 0) {
writer.uint32(10).bytes(message.bodyBytes);
}
if (message.authInfoBytes.length !== 0) {
writer.uint32(18).bytes(message.authInfoBytes);
}
if (message.chainId !== "") {
writer.uint32(26).string(message.chainId);
}
if (!message.accountNumber.isZero()) {
writer.uint32(32).uint64(message.accountNumber);
}
return writer;

@@ -262,2 +274,13 @@ },

},
toJSON(message) {
const obj = {};
message.bodyBytes !== undefined &&
(obj.bodyBytes = base64FromBytes(message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array()));
message.authInfoBytes !== undefined &&
(obj.authInfoBytes = base64FromBytes(message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array()));
message.chainId !== undefined && (obj.chainId = message.chainId);
message.accountNumber !== undefined &&
(obj.accountNumber = (message.accountNumber || long_1.default.UZERO).toString());
return obj;
},
fromPartial(object) {

@@ -291,13 +314,2 @@ const message = Object.assign({}, baseSignDoc);

},
toJSON(message) {
const obj = {};
message.bodyBytes !== undefined &&
(obj.bodyBytes = base64FromBytes(message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array()));
message.authInfoBytes !== undefined &&
(obj.authInfoBytes = base64FromBytes(message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array()));
message.chainId !== undefined && (obj.chainId = message.chainId);
message.accountNumber !== undefined &&
(obj.accountNumber = (message.accountNumber || long_1.default.UZERO).toString());
return obj;
},
};

@@ -310,4 +322,8 @@ const baseTxBody = { memo: "", timeoutHeight: long_1.default.UZERO };

}
writer.uint32(18).string(message.memo);
writer.uint32(24).uint64(message.timeoutHeight);
if (message.memo !== "") {
writer.uint32(18).string(message.memo);
}
if (!message.timeoutHeight.isZero()) {
writer.uint32(24).uint64(message.timeoutHeight);
}
for (const v of message.extensionOptions) {

@@ -387,2 +403,27 @@ any_1.Any.encode(v, writer.uint32(8186).fork()).ldelim();

},
toJSON(message) {
const obj = {};
if (message.messages) {
obj.messages = message.messages.map((e) => (e ? any_1.Any.toJSON(e) : undefined));
}
else {
obj.messages = [];
}
message.memo !== undefined && (obj.memo = message.memo);
message.timeoutHeight !== undefined &&
(obj.timeoutHeight = (message.timeoutHeight || long_1.default.UZERO).toString());
if (message.extensionOptions) {
obj.extensionOptions = message.extensionOptions.map((e) => (e ? any_1.Any.toJSON(e) : undefined));
}
else {
obj.extensionOptions = [];
}
if (message.nonCriticalExtensionOptions) {
obj.nonCriticalExtensionOptions = message.nonCriticalExtensionOptions.map((e) => e ? any_1.Any.toJSON(e) : undefined);
}
else {
obj.nonCriticalExtensionOptions = [];
}
return obj;
},
fromPartial(object) {

@@ -422,27 +463,2 @@ const message = Object.assign({}, baseTxBody);

},
toJSON(message) {
const obj = {};
if (message.messages) {
obj.messages = message.messages.map((e) => (e ? any_1.Any.toJSON(e) : undefined));
}
else {
obj.messages = [];
}
message.memo !== undefined && (obj.memo = message.memo);
message.timeoutHeight !== undefined &&
(obj.timeoutHeight = (message.timeoutHeight || long_1.default.UZERO).toString());
if (message.extensionOptions) {
obj.extensionOptions = message.extensionOptions.map((e) => (e ? any_1.Any.toJSON(e) : undefined));
}
else {
obj.extensionOptions = [];
}
if (message.nonCriticalExtensionOptions) {
obj.nonCriticalExtensionOptions = message.nonCriticalExtensionOptions.map((e) => e ? any_1.Any.toJSON(e) : undefined);
}
else {
obj.nonCriticalExtensionOptions = [];
}
return obj;
},
};

@@ -455,3 +471,3 @@ const baseAuthInfo = {};

}
if (message.fee !== undefined && message.fee !== undefined) {
if (message.fee !== undefined) {
exports.Fee.encode(message.fee, writer.uint32(18).fork()).ldelim();

@@ -498,2 +514,13 @@ }

},
toJSON(message) {
const obj = {};
if (message.signerInfos) {
obj.signerInfos = message.signerInfos.map((e) => (e ? exports.SignerInfo.toJSON(e) : undefined));
}
else {
obj.signerInfos = [];
}
message.fee !== undefined && (obj.fee = message.fee ? exports.Fee.toJSON(message.fee) : undefined);
return obj;
},
fromPartial(object) {

@@ -515,13 +542,2 @@ const message = Object.assign({}, baseAuthInfo);

},
toJSON(message) {
const obj = {};
if (message.signerInfos) {
obj.signerInfos = message.signerInfos.map((e) => (e ? exports.SignerInfo.toJSON(e) : undefined));
}
else {
obj.signerInfos = [];
}
message.fee !== undefined && (obj.fee = message.fee ? exports.Fee.toJSON(message.fee) : undefined);
return obj;
},
};

@@ -531,9 +547,11 @@ const baseSignerInfo = { sequence: long_1.default.UZERO };

encode(message, writer = minimal_1.default.Writer.create()) {
if (message.publicKey !== undefined && message.publicKey !== undefined) {
if (message.publicKey !== undefined) {
any_1.Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim();
}
if (message.modeInfo !== undefined && message.modeInfo !== undefined) {
if (message.modeInfo !== undefined) {
exports.ModeInfo.encode(message.modeInfo, writer.uint32(18).fork()).ldelim();
}
writer.uint32(24).uint64(message.sequence);
if (!message.sequence.isZero()) {
writer.uint32(24).uint64(message.sequence);
}
return writer;

@@ -586,2 +604,11 @@ },

},
toJSON(message) {
const obj = {};
message.publicKey !== undefined &&
(obj.publicKey = message.publicKey ? any_1.Any.toJSON(message.publicKey) : undefined);
message.modeInfo !== undefined &&
(obj.modeInfo = message.modeInfo ? exports.ModeInfo.toJSON(message.modeInfo) : undefined);
message.sequence !== undefined && (obj.sequence = (message.sequence || long_1.default.UZERO).toString());
return obj;
},
fromPartial(object) {

@@ -609,11 +636,2 @@ const message = Object.assign({}, baseSignerInfo);

},
toJSON(message) {
const obj = {};
message.publicKey !== undefined &&
(obj.publicKey = message.publicKey ? any_1.Any.toJSON(message.publicKey) : undefined);
message.modeInfo !== undefined &&
(obj.modeInfo = message.modeInfo ? exports.ModeInfo.toJSON(message.modeInfo) : undefined);
message.sequence !== undefined && (obj.sequence = (message.sequence || long_1.default.UZERO).toString());
return obj;
},
};

@@ -667,2 +685,10 @@ const baseModeInfo = {};

},
toJSON(message) {
const obj = {};
message.single !== undefined &&
(obj.single = message.single ? exports.ModeInfo_Single.toJSON(message.single) : undefined);
message.multi !== undefined &&
(obj.multi = message.multi ? exports.ModeInfo_Multi.toJSON(message.multi) : undefined);
return obj;
},
fromPartial(object) {

@@ -684,10 +710,2 @@ const message = Object.assign({}, baseModeInfo);

},
toJSON(message) {
const obj = {};
message.single !== undefined &&
(obj.single = message.single ? exports.ModeInfo_Single.toJSON(message.single) : undefined);
message.multi !== undefined &&
(obj.multi = message.multi ? exports.ModeInfo_Multi.toJSON(message.multi) : undefined);
return obj;
},
};

@@ -697,3 +715,5 @@ const baseModeInfo_Single = { mode: 0 };

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(8).int32(message.mode);
if (message.mode !== 0) {
writer.uint32(8).int32(message.mode);
}
return writer;

@@ -728,2 +748,7 @@ },

},
toJSON(message) {
const obj = {};
message.mode !== undefined && (obj.mode = signing_1.signModeToJSON(message.mode));
return obj;
},
fromPartial(object) {

@@ -739,7 +764,2 @@ const message = Object.assign({}, baseModeInfo_Single);

},
toJSON(message) {
const obj = {};
message.mode !== undefined && (obj.mode = signing_1.signModeToJSON(message.mode));
return obj;
},
};

@@ -749,3 +769,3 @@ const baseModeInfo_Multi = {};

encode(message, writer = minimal_1.default.Writer.create()) {
if (message.bitarray !== undefined && message.bitarray !== undefined) {
if (message.bitarray !== undefined) {
multisig_1.CompactBitArray.encode(message.bitarray, writer.uint32(10).fork()).ldelim();

@@ -795,2 +815,14 @@ }

},
toJSON(message) {
const obj = {};
message.bitarray !== undefined &&
(obj.bitarray = message.bitarray ? multisig_1.CompactBitArray.toJSON(message.bitarray) : undefined);
if (message.modeInfos) {
obj.modeInfos = message.modeInfos.map((e) => (e ? exports.ModeInfo.toJSON(e) : undefined));
}
else {
obj.modeInfos = [];
}
return obj;
},
fromPartial(object) {

@@ -812,14 +844,2 @@ const message = Object.assign({}, baseModeInfo_Multi);

},
toJSON(message) {
const obj = {};
message.bitarray !== undefined &&
(obj.bitarray = message.bitarray ? multisig_1.CompactBitArray.toJSON(message.bitarray) : undefined);
if (message.modeInfos) {
obj.modeInfos = message.modeInfos.map((e) => (e ? exports.ModeInfo.toJSON(e) : undefined));
}
else {
obj.modeInfos = [];
}
return obj;
},
};

@@ -832,5 +852,11 @@ const baseFee = { gasLimit: long_1.default.UZERO, payer: "", granter: "" };

}
writer.uint32(16).uint64(message.gasLimit);
writer.uint32(26).string(message.payer);
writer.uint32(34).string(message.granter);
if (!message.gasLimit.isZero()) {
writer.uint32(16).uint64(message.gasLimit);
}
if (message.payer !== "") {
writer.uint32(26).string(message.payer);
}
if (message.granter !== "") {
writer.uint32(34).string(message.granter);
}
return writer;

@@ -893,2 +919,15 @@ },

},
toJSON(message) {
const obj = {};
if (message.amount) {
obj.amount = message.amount.map((e) => (e ? coin_1.Coin.toJSON(e) : undefined));
}
else {
obj.amount = [];
}
message.gasLimit !== undefined && (obj.gasLimit = (message.gasLimit || long_1.default.UZERO).toString());
message.payer !== undefined && (obj.payer = message.payer);
message.granter !== undefined && (obj.granter = message.granter);
return obj;
},
fromPartial(object) {

@@ -922,15 +961,2 @@ const message = Object.assign({}, baseFee);

},
toJSON(message) {
const obj = {};
if (message.amount) {
obj.amount = message.amount.map((e) => (e ? coin_1.Coin.toJSON(e) : undefined));
}
else {
obj.amount = [];
}
message.gasLimit !== undefined && (obj.gasLimit = (message.gasLimit || long_1.default.UZERO).toString());
message.payer !== undefined && (obj.payer = message.payer);
message.granter !== undefined && (obj.granter = message.granter);
return obj;
},
};

@@ -946,3 +972,3 @@ var globalThis = (() => {

return global;
throw new Error("Unable to locate global object");
throw "Unable to locate global object";
})();

@@ -949,0 +975,0 @@ const atob = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));

@@ -123,4 +123,4 @@ import Long from "long";

fromJSON(object: any): Any;
toJSON(message: Any): unknown;
fromPartial(object: DeepPartial<Any>): Any;
toJSON(message: Any): unknown;
};

@@ -127,0 +127,0 @@ declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;

@@ -12,4 +12,8 @@ "use strict";

encode(message, writer = minimal_1.default.Writer.create()) {
writer.uint32(10).string(message.typeUrl);
writer.uint32(18).bytes(message.value);
if (message.typeUrl !== "") {
writer.uint32(10).string(message.typeUrl);
}
if (message.value.length !== 0) {
writer.uint32(18).bytes(message.value);
}
return writer;

@@ -50,2 +54,9 @@ },

},
toJSON(message) {
const obj = {};
message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl);
message.value !== undefined &&
(obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
return obj;
},
fromPartial(object) {

@@ -67,9 +78,2 @@ const message = Object.assign({}, baseAny);

},
toJSON(message) {
const obj = {};
message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl);
message.value !== undefined &&
(obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
return obj;
},
};

@@ -85,3 +89,3 @@ var globalThis = (() => {

return global;
throw new Error("Unable to locate global object");
throw "Unable to locate global object";
})();

@@ -88,0 +92,0 @@ const atob = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));

@@ -834,4 +834,4 @@ import Long from "long";

fromJSON(object: any): FileDescriptorSet;
toJSON(message: FileDescriptorSet): unknown;
fromPartial(object: DeepPartial<FileDescriptorSet>): FileDescriptorSet;
toJSON(message: FileDescriptorSet): unknown;
};

@@ -842,4 +842,4 @@ export declare const FileDescriptorProto: {

fromJSON(object: any): FileDescriptorProto;
toJSON(message: FileDescriptorProto): unknown;
fromPartial(object: DeepPartial<FileDescriptorProto>): FileDescriptorProto;
toJSON(message: FileDescriptorProto): unknown;
};

@@ -850,4 +850,4 @@ export declare const DescriptorProto: {

fromJSON(object: any): DescriptorProto;
toJSON(message: DescriptorProto): unknown;
fromPartial(object: DeepPartial<DescriptorProto>): DescriptorProto;
toJSON(message: DescriptorProto): unknown;
};

@@ -858,4 +858,4 @@ export declare const DescriptorProto_ExtensionRange: {

fromJSON(object: any): DescriptorProto_ExtensionRange;
toJSON(message: DescriptorProto_ExtensionRange): unknown;
fromPartial(object: DeepPartial<DescriptorProto_ExtensionRange>): DescriptorProto_ExtensionRange;
toJSON(message: DescriptorProto_ExtensionRange): unknown;
};

@@ -866,4 +866,4 @@ export declare const DescriptorProto_ReservedRange: {

fromJSON(object: any): DescriptorProto_ReservedRange;
toJSON(message: DescriptorProto_ReservedRange): unknown;
fromPartial(object: DeepPartial<DescriptorProto_ReservedRange>): DescriptorProto_ReservedRange;
toJSON(message: DescriptorProto_ReservedRange): unknown;
};

@@ -874,4 +874,4 @@ export declare const ExtensionRangeOptions: {

fromJSON(object: any): ExtensionRangeOptions;
toJSON(message: ExtensionRangeOptions): unknown;
fromPartial(object: DeepPartial<ExtensionRangeOptions>): ExtensionRangeOptions;
toJSON(message: ExtensionRangeOptions): unknown;
};

@@ -882,4 +882,4 @@ export declare const FieldDescriptorProto: {

fromJSON(object: any): FieldDescriptorProto;
toJSON(message: FieldDescriptorProto): unknown;
fromPartial(object: DeepPartial<FieldDescriptorProto>): FieldDescriptorProto;
toJSON(message: FieldDescriptorProto): unknown;
};

@@ -890,4 +890,4 @@ export declare const OneofDescriptorProto: {

fromJSON(object: any): OneofDescriptorProto;
toJSON(message: OneofDescriptorProto): unknown;
fromPartial(object: DeepPartial<OneofDescriptorProto>): OneofDescriptorProto;
toJSON(message: OneofDescriptorProto): unknown;
};

@@ -898,4 +898,4 @@ export declare const EnumDescriptorProto: {

fromJSON(object: any): EnumDescriptorProto;
toJSON(message: EnumDescriptorProto): unknown;
fromPartial(object: DeepPartial<EnumDescriptorProto>): EnumDescriptorProto;
toJSON(message: EnumDescriptorProto): unknown;
};

@@ -906,4 +906,4 @@ export declare const EnumDescriptorProto_EnumReservedRange: {

fromJSON(object: any): EnumDescriptorProto_EnumReservedRange;
toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown;
fromPartial(object: DeepPartial<EnumDescriptorProto_EnumReservedRange>): EnumDescriptorProto_EnumReservedRange;
toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown;
};

@@ -914,4 +914,4 @@ export declare const EnumValueDescriptorProto: {

fromJSON(object: any): EnumValueDescriptorProto;
toJSON(message: EnumValueDescriptorProto): unknown;
fromPartial(object: DeepPartial<EnumValueDescriptorProto>): EnumValueDescriptorProto;
toJSON(message: EnumValueDescriptorProto): unknown;
};

@@ -922,4 +922,4 @@ export declare const ServiceDescriptorProto: {

fromJSON(object: any): ServiceDescriptorProto;
toJSON(message: ServiceDescriptorProto): unknown;
fromPartial(object: DeepPartial<ServiceDescriptorProto>): ServiceDescriptorProto;
toJSON(message: ServiceDescriptorProto): unknown;
};

@@ -930,4 +930,4 @@ export declare const MethodDescriptorProto: {

fromJSON(object: any): MethodDescriptorProto;
toJSON(message: MethodDescriptorProto): unknown;
fromPartial(object: DeepPartial<MethodDescriptorProto>): MethodDescriptorProto;
toJSON(message: MethodDescriptorProto): unknown;
};

@@ -938,4 +938,4 @@ export declare const FileOptions: {

fromJSON(object: any): FileOptions;
toJSON(message: FileOptions): unknown;
fromPartial(object: DeepPartial<FileOptions>): FileOptions;
toJSON(message: FileOptions): unknown;
};

@@ -946,4 +946,4 @@ export declare const MessageOptions: {

fromJSON(object: any): MessageOptions;
toJSON(message: MessageOptions): unknown;
fromPartial(object: DeepPartial<MessageOptions>): MessageOptions;
toJSON(message: MessageOptions): unknown;
};

@@ -954,4 +954,4 @@ export declare const FieldOptions: {

fromJSON(object: any): FieldOptions;
toJSON(message: FieldOptions): unknown;
fromPartial(object: DeepPartial<FieldOptions>): FieldOptions;
toJSON(message: FieldOptions): unknown;
};

@@ -962,4 +962,4 @@ export declare const OneofOptions: {

fromJSON(object: any): OneofOptions;
toJSON(message: OneofOptions): unknown;
fromPartial(object: DeepPartial<OneofOptions>): OneofOptions;
toJSON(message: OneofOptions): unknown;
};

@@ -970,4 +970,4 @@ export declare const EnumOptions: {

fromJSON(object: any): EnumOptions;
toJSON(message: EnumOptions): unknown;
fromPartial(object: DeepPartial<EnumOptions>): EnumOptions;
toJSON(message: EnumOptions): unknown;
};

@@ -978,4 +978,4 @@ export declare const EnumValueOptions: {

fromJSON(object: any): EnumValueOptions;
toJSON(message: EnumValueOptions): unknown;
fromPartial(object: DeepPartial<EnumValueOptions>): EnumValueOptions;
toJSON(message: EnumValueOptions): unknown;
};

@@ -986,4 +986,4 @@ export declare const ServiceOptions: {

fromJSON(object: any): ServiceOptions;
toJSON(message: ServiceOptions): unknown;
fromPartial(object: DeepPartial<ServiceOptions>): ServiceOptions;
toJSON(message: ServiceOptions): unknown;
};

@@ -994,4 +994,4 @@ export declare const MethodOptions: {

fromJSON(object: any): MethodOptions;
toJSON(message: MethodOptions): unknown;
fromPartial(object: DeepPartial<MethodOptions>): MethodOptions;
toJSON(message: MethodOptions): unknown;
};

@@ -1002,4 +1002,4 @@ export declare const UninterpretedOption: {

fromJSON(object: any): UninterpretedOption;
toJSON(message: UninterpretedOption): unknown;
fromPartial(object: DeepPartial<UninterpretedOption>): UninterpretedOption;
toJSON(message: UninterpretedOption): unknown;
};

@@ -1010,4 +1010,4 @@ export declare const UninterpretedOption_NamePart: {

fromJSON(object: any): UninterpretedOption_NamePart;
toJSON(message: UninterpretedOption_NamePart): unknown;
fromPartial(object: DeepPartial<UninterpretedOption_NamePart>): UninterpretedOption_NamePart;
toJSON(message: UninterpretedOption_NamePart): unknown;
};

@@ -1018,4 +1018,4 @@ export declare const SourceCodeInfo: {

fromJSON(object: any): SourceCodeInfo;
toJSON(message: SourceCodeInfo): unknown;
fromPartial(object: DeepPartial<SourceCodeInfo>): SourceCodeInfo;
toJSON(message: SourceCodeInfo): unknown;
};

@@ -1026,4 +1026,4 @@ export declare const SourceCodeInfo_Location: {

fromJSON(object: any): SourceCodeInfo_Location;
toJSON(message: SourceCodeInfo_Location): unknown;
fromPartial(object: DeepPartial<SourceCodeInfo_Location>): SourceCodeInfo_Location;
toJSON(message: SourceCodeInfo_Location): unknown;
};

@@ -1034,4 +1034,4 @@ export declare const GeneratedCodeInfo: {

fromJSON(object: any): GeneratedCodeInfo;
toJSON(message: GeneratedCodeInfo): unknown;
fromPartial(object: DeepPartial<GeneratedCodeInfo>): GeneratedCodeInfo;
toJSON(message: GeneratedCodeInfo): unknown;
};

@@ -1042,4 +1042,4 @@ export declare const GeneratedCodeInfo_Annotation: {

fromJSON(object: any): GeneratedCodeInfo_Annotation;
toJSON(message: GeneratedCodeInfo_Annotation): unknown;
fromPartial(object: DeepPartial<GeneratedCodeInfo_Annotation>): GeneratedCodeInfo_Annotation;
toJSON(message: GeneratedCodeInfo_Annotation): unknown;
};

@@ -1046,0 +1046,0 @@ declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;

@@ -13,4 +13,4 @@ import Long from "long";

fromJSON(object: any): PublicKey;
toJSON(message: PublicKey): unknown;
fromPartial(object: DeepPartial<PublicKey>): PublicKey;
toJSON(message: PublicKey): unknown;
};

@@ -17,0 +17,0 @@ declare type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;

@@ -50,2 +50,10 @@ "use strict";

},
toJSON(message) {
const obj = {};
message.ed25519 !== undefined &&
(obj.ed25519 = message.ed25519 !== undefined ? base64FromBytes(message.ed25519) : undefined);
message.secp256k1 !== undefined &&
(obj.secp256k1 = message.secp256k1 !== undefined ? base64FromBytes(message.secp256k1) : undefined);
return obj;
},
fromPartial(object) {

@@ -67,10 +75,2 @@ const message = Object.assign({}, basePublicKey);

},
toJSON(message) {
const obj = {};
message.ed25519 !== undefined &&
(obj.ed25519 = message.ed25519 !== undefined ? base64FromBytes(message.ed25519) : undefined);
message.secp256k1 !== undefined &&
(obj.secp256k1 = message.secp256k1 !== undefined ? base64FromBytes(message.secp256k1) : undefined);
return obj;
},
};

@@ -86,3 +86,3 @@ var globalThis = (() => {

return global;
throw new Error("Unable to locate global object");
throw "Unable to locate global object";
})();

@@ -89,0 +89,0 @@ const atob = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));

@@ -1,2 +0,2 @@

export { EncodeObject, GeneratedType, Registry } from "./registry";
export { isPbjsGeneratedType, isTsProtoGeneratedType, EncodeObject, GeneratedType, Registry, TsProtoGeneratedType, PbjsGeneratedType, } from "./registry";
export { DirectSecp256k1HdWallet } from "./directsecp256k1hdwallet";

@@ -3,0 +3,0 @@ export { DirectSecp256k1Wallet } from "./directsecp256k1wallet";

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeSignDoc = exports.makeSignBytes = exports.makeAuthInfoBytes = exports.isOfflineDirectSigner = exports.encodePubkey = exports.decodePubkey = exports.makeCosmoshubPath = exports.DirectSecp256k1Wallet = exports.DirectSecp256k1HdWallet = exports.Registry = void 0;
exports.makeSignDoc = exports.makeSignBytes = exports.makeAuthInfoBytes = exports.isOfflineDirectSigner = exports.encodePubkey = exports.decodePubkey = exports.makeCosmoshubPath = exports.DirectSecp256k1Wallet = exports.DirectSecp256k1HdWallet = exports.Registry = exports.isTsProtoGeneratedType = exports.isPbjsGeneratedType = void 0;
var registry_1 = require("./registry");
Object.defineProperty(exports, "isPbjsGeneratedType", { enumerable: true, get: function () { return registry_1.isPbjsGeneratedType; } });
Object.defineProperty(exports, "isTsProtoGeneratedType", { enumerable: true, get: function () { return registry_1.isTsProtoGeneratedType; } });
Object.defineProperty(exports, "Registry", { enumerable: true, get: function () { return registry_1.Registry; } });

@@ -6,0 +8,0 @@ var directsecp256k1hdwallet_1 = require("./directsecp256k1hdwallet");

@@ -5,3 +5,6 @@ import Long from "long";

import { Any } from "./codec/google/protobuf/any";
export interface GeneratedType {
/**
* A type generated by [ts-proto](https://github.com/stephenh/ts-proto).
*/
export interface TsProtoGeneratedType {
readonly encode: (message: any | {

@@ -21,2 +24,20 @@ [k: string]: any;

}
/**
* A type generated by [protobufjs](https://github.com/protobufjs/protobuf.js).
*
* This can be used if you want to create types at runtime using pure JavaScript.
* See https://gist.github.com/fadeev/a4981eff1cf3a805ef10e25313d5f2b7
*/
export interface PbjsGeneratedType {
readonly create: (properties?: {
[k: string]: any;
}) => any;
readonly encode: (message: any | {
[k: string]: any;
}, writer?: protobuf.Writer) => protobuf.Writer;
readonly decode: (reader: protobuf.Reader | Uint8Array, length?: number) => any;
}
export declare type GeneratedType = TsProtoGeneratedType | PbjsGeneratedType;
export declare function isTsProtoGeneratedType(type: GeneratedType): type is TsProtoGeneratedType;
export declare function isPbjsGeneratedType(type: GeneratedType): type is PbjsGeneratedType;
export interface EncodeObject {

@@ -41,2 +62,18 @@ readonly typeUrl: string;

register(typeUrl: string, type: GeneratedType): void;
/**
* Looks up a type that was previously added to the registry.
*
* The generator information (ts-proto or pbjs) gets lost along the way.
* If you need to work with the result type in TypeScript, you can use:
*
* ```
* import { assert } from "@cosmjs/utils";
*
* const Coin = registry.lookupType("/cosmos.base.v1beta1.Coin");
* assert(Coin); // Ensures not unset
* assert(isTsProtoGeneratedType(Coin)); // Ensures this is the type we expect
*
* // Coin is typed TsProtoGeneratedType now.
* ```
*/
lookupType(typeUrl: string): GeneratedType | undefined;

@@ -43,0 +80,0 @@ private lookupTypeWithError;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Registry = void 0;
exports.Registry = exports.isPbjsGeneratedType = exports.isTsProtoGeneratedType = void 0;
const tx_1 = require("./codec/cosmos/bank/v1beta1/tx");

@@ -8,2 +8,10 @@ const coin_1 = require("./codec/cosmos/base/v1beta1/coin");

const any_1 = require("./codec/google/protobuf/any");
function isTsProtoGeneratedType(type) {
return typeof type.fromPartial === "function";
}
exports.isTsProtoGeneratedType = isTsProtoGeneratedType;
function isPbjsGeneratedType(type) {
return !isTsProtoGeneratedType(type);
}
exports.isPbjsGeneratedType = isPbjsGeneratedType;
const defaultTypeUrls = {

@@ -27,2 +35,18 @@ cosmosCoin: "/cosmos.base.v1beta1.Coin",

}
/**
* Looks up a type that was previously added to the registry.
*
* The generator information (ts-proto or pbjs) gets lost along the way.
* If you need to work with the result type in TypeScript, you can use:
*
* ```
* import { assert } from "@cosmjs/utils";
*
* const Coin = registry.lookupType("/cosmos.base.v1beta1.Coin");
* assert(Coin); // Ensures not unset
* assert(isTsProtoGeneratedType(Coin)); // Ensures this is the type we expect
*
* // Coin is typed TsProtoGeneratedType now.
* ```
*/
lookupType(typeUrl) {

@@ -43,4 +67,4 @@ return this.types.get(typeUrl);

const type = this.lookupTypeWithError(typeUrl);
const created = type.fromPartial(value);
return Uint8Array.from(type.encode(created).finish());
const instance = isTsProtoGeneratedType(type) ? type.fromPartial(value) : type.create(value);
return Uint8Array.from(type.encode(instance).finish());
}

@@ -47,0 +71,0 @@ encodeTxBody(txBodyFields) {

{
"name": "@cosmjs/proto-signing",
"version": "0.24.0-alpha.25",
"version": "0.24.0-alpha.26",
"description": "Utilities for protobuf based signing (Cosmos SDK 0.40+)",

@@ -46,3 +46,3 @@ "contributors": [

"dependencies": {
"@cosmjs/launchpad": "^0.24.0-alpha.25",
"@cosmjs/launchpad": "^0.24.0-alpha.26",
"long": "^4.0.0",

@@ -52,6 +52,6 @@ "protobufjs": "~6.10.2"

"devDependencies": {
"@cosmjs/encoding": "^0.24.0-alpha.25",
"@cosmjs/utils": "^0.24.0-alpha.25"
"@cosmjs/encoding": "^0.24.0-alpha.26",
"@cosmjs/utils": "^0.24.0-alpha.26"
},
"gitHead": "8e4813405c182d3d0f5625a88f8a3ea9d09347cd"
"gitHead": "33e4d4d6ebffb1690b144a2c4963a5fff7cbc620"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc