@agoric/cosmic-proto 0.5.0-u19.2 → 0.5.0-u20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/address-hooks.d.ts +4 -3
- package/dist/address-hooks.js +1 -217
- package/dist/address-hooks.js.map +1 -1
- package/dist/codegen/agoric/bundle.js +1 -51
- package/dist/codegen/agoric/lien/genesis.js +1 -143
- package/dist/codegen/agoric/lien/lien.js +1 -87
- package/dist/codegen/agoric/swingset/genesis.js +1 -181
- package/dist/codegen/agoric/swingset/msgs.js +1 -700
- package/dist/codegen/agoric/swingset/query.js +1 -356
- package/dist/codegen/agoric/swingset/swingset.js +1 -816
- package/dist/codegen/agoric/vbank/genesis.js +1 -82
- package/dist/codegen/agoric/vbank/msgs.js +1 -2
- package/dist/codegen/agoric/vbank/query.js +1 -222
- package/dist/codegen/agoric/vbank/vbank.js +1 -237
- package/dist/codegen/agoric/vibc/msgs.js +1 -127
- package/dist/codegen/agoric/vlocalchain/vlocalchain.js +1 -307
- package/dist/codegen/agoric/vstorage/genesis.js +1 -138
- package/dist/codegen/agoric/vstorage/query.js +1 -441
- package/dist/codegen/agoric/vstorage/vstorage.js +1 -128
- package/dist/codegen/agoric/vtransfer/genesis.js +1 -70
- package/dist/codegen/amino/amino.js +1 -2
- package/dist/codegen/amino/bundle.js +1 -6
- package/dist/codegen/binary.js +1 -367
- package/dist/codegen/circle/bundle.d.ts +0 -506
- package/dist/codegen/circle/bundle.js +1 -40
- package/dist/codegen/circle/cctp/v1/attester.js +1 -63
- package/dist/codegen/circle/cctp/v1/burn_message.js +1 -117
- package/dist/codegen/circle/cctp/v1/burning_and_minting_paused.js +1 -63
- package/dist/codegen/circle/cctp/v1/events.js +1 -1612
- package/dist/codegen/circle/cctp/v1/genesis.js +1 -295
- package/dist/codegen/circle/cctp/v1/max_message_body_size.js +1 -69
- package/dist/codegen/circle/cctp/v1/message.js +1 -160
- package/dist/codegen/circle/cctp/v1/nonce.js +1 -80
- package/dist/codegen/circle/cctp/v1/per_message_burn_limit.js +1 -73
- package/dist/codegen/circle/cctp/v1/query.js +1 -2421
- package/dist/codegen/circle/cctp/v1/remote_token_messenger.js +1 -77
- package/dist/codegen/circle/cctp/v1/sending_and_receiving_messages_paused.js +1 -63
- package/dist/codegen/circle/cctp/v1/signature_threshold.js +1 -63
- package/dist/codegen/circle/cctp/v1/token_pair.js +1 -91
- package/dist/codegen/circle/cctp/v1/tx.d.ts +0 -998
- package/dist/codegen/circle/cctp/v1/tx.js +1 -3264
- package/dist/codegen/circle/cctp/v1/tx.js.map +1 -1
- package/dist/codegen/cosmos/auth/v1beta1/auth.js +1 -337
- package/dist/codegen/cosmos/auth/v1beta1/genesis.js +1 -86
- package/dist/codegen/cosmos/auth/v1beta1/query.js +1 -1113
- package/dist/codegen/cosmos/authz/v1beta1/authz.js +1 -334
- package/dist/codegen/cosmos/authz/v1beta1/event.js +1 -161
- package/dist/codegen/cosmos/authz/v1beta1/genesis.js +1 -71
- package/dist/codegen/cosmos/authz/v1beta1/query.js +1 -506
- package/dist/codegen/cosmos/authz/v1beta1/tx.js +1 -415
- package/dist/codegen/cosmos/bank/v1beta1/authz.js +1 -71
- package/dist/codegen/cosmos/bank/v1beta1/bank.js +1 -592
- package/dist/codegen/cosmos/bank/v1beta1/genesis.js +1 -196
- package/dist/codegen/cosmos/bank/v1beta1/query.js +1 -1347
- package/dist/codegen/cosmos/bank/v1beta1/tx.js +1 -267
- package/dist/codegen/cosmos/base/abci/v1beta1/abci.js +1 -1012
- package/dist/codegen/cosmos/base/node/v1beta1/query.js +1 -112
- package/dist/codegen/cosmos/base/query/v1beta1/pagination.js +1 -189
- package/dist/codegen/cosmos/base/reflection/v2alpha1/reflection.js +1 -1755
- package/dist/codegen/cosmos/base/v1beta1/coin.js +1 -257
- package/dist/codegen/cosmos/bundle.js +1 -249
- package/dist/codegen/cosmos/crypto/ed25519/keys.js +1 -123
- package/dist/codegen/cosmos/crypto/hd/v1/hd.js +1 -109
- package/dist/codegen/cosmos/crypto/keyring/v1/record.js +1 -367
- package/dist/codegen/cosmos/crypto/multisig/keys.js +1 -82
- package/dist/codegen/cosmos/crypto/multisig/v1beta1/multisig.js +1 -144
- package/dist/codegen/cosmos/crypto/secp256k1/keys.js +1 -123
- package/dist/codegen/cosmos/crypto/secp256r1/keys.js +1 -125
- package/dist/codegen/cosmos/distribution/v1beta1/distribution.js +1 -978
- package/dist/codegen/cosmos/distribution/v1beta1/genesis.js +1 -837
- package/dist/codegen/cosmos/distribution/v1beta1/query.js +1 -1207
- package/dist/codegen/cosmos/distribution/v1beta1/tx.js +1 -512
- package/dist/codegen/cosmos/feegrant/v1beta1/feegrant.js +1 -412
- package/dist/codegen/cosmos/feegrant/v1beta1/genesis.js +1 -71
- package/dist/codegen/cosmos/feegrant/v1beta1/query.js +1 -461
- package/dist/codegen/cosmos/feegrant/v1beta1/tx.js +1 -267
- package/dist/codegen/cosmos/gov/v1/genesis.js +1 -177
- package/dist/codegen/cosmos/gov/v1/gov.js +1 -928
- package/dist/codegen/cosmos/gov/v1/query.js +1 -1216
- package/dist/codegen/cosmos/gov/v1/tx.js +1 -730
- package/dist/codegen/cosmos/gov/v1beta1/genesis.js +1 -177
- package/dist/codegen/cosmos/gov/v1beta1/gov.js +1 -1003
- package/dist/codegen/cosmos/gov/v1beta1/query.js +1 -1216
- package/dist/codegen/cosmos/gov/v1beta1/tx.js +1 -578
- package/dist/codegen/cosmos/group/v1/events.js +1 -696
- package/dist/codegen/cosmos/group/v1/genesis.js +1 -190
- package/dist/codegen/cosmos/group/v1/query.js +1 -2096
- package/dist/codegen/cosmos/group/v1/tx.js +1 -2073
- package/dist/codegen/cosmos/group/v1/types.js +1 -1387
- package/dist/codegen/cosmos/mint/v1beta1/genesis.js +1 -82
- package/dist/codegen/cosmos/mint/v1beta1/mint.js +1 -211
- package/dist/codegen/cosmos/mint/v1beta1/query.js +1 -330
- package/dist/codegen/cosmos/msg/v1/msg.js +1 -2
- package/dist/codegen/cosmos/params/v1beta1/params.js +1 -171
- package/dist/codegen/cosmos/params/v1beta1/query.js +1 -327
- package/dist/codegen/cosmos/staking/v1beta1/authz.js +1 -240
- package/dist/codegen/cosmos/staking/v1beta1/genesis.js +1 -256
- package/dist/codegen/cosmos/staking/v1beta1/query.js +1 -2069
- package/dist/codegen/cosmos/staking/v1beta1/staking.js +1 -1915
- package/dist/codegen/cosmos/staking/v1beta1/tx.js +1 -968
- package/dist/codegen/cosmos/tx/signing/v1beta1/signing.js +1 -516
- package/dist/codegen/cosmos/tx/v1beta1/service.js +1 -975
- package/dist/codegen/cosmos/tx/v1beta1/tx.js +1 -1256
- package/dist/codegen/cosmos/upgrade/v1beta1/query.js +1 -592
- package/dist/codegen/cosmos/upgrade/v1beta1/tx.js +1 -228
- package/dist/codegen/cosmos/upgrade/v1beta1/upgrade.js +1 -352
- package/dist/codegen/cosmos/vesting/v1beta1/tx.js +1 -865
- package/dist/codegen/cosmos/vesting/v1beta1/vesting.js +1 -674
- package/dist/codegen/cosmos_proto/bundle.js +1 -6
- package/dist/codegen/cosmos_proto/cosmos.js +1 -208
- package/dist/codegen/gogoproto/bundle.js +1 -6
- package/dist/codegen/gogoproto/gogo.js +1 -2
- package/dist/codegen/google/api/annotations.js +1 -2
- package/dist/codegen/google/api/http.js +1 -319
- package/dist/codegen/google/bundle.js +1 -17
- package/dist/codegen/google/protobuf/any.js +1 -77
- package/dist/codegen/google/protobuf/descriptor.js +1 -3421
- package/dist/codegen/google/protobuf/duration.js +1 -79
- package/dist/codegen/google/protobuf/empty.js +1 -50
- package/dist/codegen/google/protobuf/timestamp.js +1 -79
- package/dist/codegen/helpers.js +1 -196
- package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/controller.js +1 -66
- package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/query.js +1 -243
- package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/tx.js +1 -314
- package/dist/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis.js +1 -503
- package/dist/codegen/ibc/applications/interchain_accounts/host/v1/host.js +1 -83
- package/dist/codegen/ibc/applications/interchain_accounts/host/v1/query.js +1 -114
- package/dist/codegen/ibc/applications/interchain_accounts/v1/account.js +1 -86
- package/dist/codegen/ibc/applications/interchain_accounts/v1/metadata.js +1 -119
- package/dist/codegen/ibc/applications/interchain_accounts/v1/packet.js +1 -190
- package/dist/codegen/ibc/applications/transfer/v1/authz.js +1 -178
- package/dist/codegen/ibc/applications/transfer/v1/genesis.js +1 -96
- package/dist/codegen/ibc/applications/transfer/v1/query.js +1 -634
- package/dist/codegen/ibc/applications/transfer/v1/transfer.js +1 -147
- package/dist/codegen/ibc/applications/transfer/v1/tx.js +1 -220
- package/dist/codegen/ibc/applications/transfer/v2/packet.js +1 -103
- package/dist/codegen/ibc/bundle.js +1 -142
- package/dist/codegen/ibc/core/channel/v1/channel.js +1 -845
- package/dist/codegen/ibc/core/channel/v1/genesis.js +1 -281
- package/dist/codegen/ibc/core/channel/v1/query.js +1 -2344
- package/dist/codegen/ibc/core/channel/v1/tx.js +1 -1745
- package/dist/codegen/ibc/core/client/v1/client.js +1 -583
- package/dist/codegen/ibc/core/client/v1/genesis.js +1 -301
- package/dist/codegen/ibc/core/client/v1/query.js +1 -1283
- package/dist/codegen/ibc/core/client/v1/tx.js +1 -587
- package/dist/codegen/ibc/core/commitment/v1/commitment.js +1 -259
- package/dist/codegen/ibc/core/connection/v1/connection.js +1 -678
- package/dist/codegen/ibc/core/connection/v1/genesis.js +1 -122
- package/dist/codegen/ibc/core/connection/v1/query.js +1 -952
- package/dist/codegen/ibc/core/connection/v1/tx.js +1 -843
- package/dist/codegen/ibc/lightclients/localhost/v1/localhost.js +1 -78
- package/dist/codegen/ibc/lightclients/solomachine/v1/solomachine.js +1 -1520
- package/dist/codegen/ibc/lightclients/solomachine/v2/solomachine.js +1 -1514
- package/dist/codegen/ibc/lightclients/tendermint/v1/tendermint.js +1 -628
- package/dist/codegen/icq/bundle.js +1 -17
- package/dist/codegen/icq/v1/genesis.js +1 -78
- package/dist/codegen/icq/v1/icq.js +1 -83
- package/dist/codegen/icq/v1/packet.js +1 -270
- package/dist/codegen/icq/v1/query.js +1 -114
- package/dist/codegen/icq/v1/tx.js +1 -124
- package/dist/codegen/ics23/bundle.js +1 -6
- package/dist/codegen/index.js +1 -23
- package/dist/codegen/json-safe.js +1 -8
- package/dist/codegen/proofs.js +1 -1436
- package/dist/codegen/stride/bundle.js +1 -71
- package/dist/codegen/stride/epochs/genesis.js +1 -227
- package/dist/codegen/stride/epochs/query.js +1 -398
- package/dist/codegen/stride/records/callbacks.js +1 -136
- package/dist/codegen/stride/records/genesis.js +1 -186
- package/dist/codegen/stride/records/params.js +1 -50
- package/dist/codegen/stride/records/query.js +1 -1552
- package/dist/codegen/stride/records/records.js +1 -939
- package/dist/codegen/stride/stakedym/genesis.js +1 -312
- package/dist/codegen/stride/stakedym/query.js +1 -887
- package/dist/codegen/stride/stakedym/stakedym.js +1 -909
- package/dist/codegen/stride/stakedym/tx.js +1 -1661
- package/dist/codegen/stride/stakeibc/address_unbonding.js +1 -135
- package/dist/codegen/stride/stakeibc/callbacks.js +1 -1191
- package/dist/codegen/stride/stakeibc/epoch_tracker.js +1 -115
- package/dist/codegen/stride/stakeibc/genesis.js +1 -135
- package/dist/codegen/stride/stakeibc/gov.js +1 -212
- package/dist/codegen/stride/stakeibc/host_zone.js +1 -544
- package/dist/codegen/stride/stakeibc/ica_account.js +1 -165
- package/dist/codegen/stride/stakeibc/packet.js +1 -113
- package/dist/codegen/stride/stakeibc/params.js +1 -317
- package/dist/codegen/stride/stakeibc/query.js +1 -1372
- package/dist/codegen/stride/stakeibc/trade_route.js +1 -377
- package/dist/codegen/stride/stakeibc/tx.js +1 -3392
- package/dist/codegen/stride/stakeibc/validator.js +1 -170
- package/dist/codegen/stride/staketia/genesis.js +1 -312
- package/dist/codegen/stride/staketia/query.js +1 -887
- package/dist/codegen/stride/staketia/staketia.js +1 -819
- package/dist/codegen/stride/staketia/tx.js +1 -1671
- package/dist/codegen/tendermint/abci/types.d.ts +264 -692
- package/dist/codegen/tendermint/abci/types.js +1 -4434
- package/dist/codegen/tendermint/abci/types.js.map +1 -1
- package/dist/codegen/tendermint/bundle.d.ts +0 -272
- package/dist/codegen/tendermint/bundle.js +1 -42
- package/dist/codegen/tendermint/crypto/keys.js +1 -85
- package/dist/codegen/tendermint/crypto/proof.js +1 -409
- package/dist/codegen/tendermint/libs/bits/types.js +1 -94
- package/dist/codegen/tendermint/p2p/types.js +1 -506
- package/dist/codegen/tendermint/types/block.js +1 -119
- package/dist/codegen/tendermint/types/evidence.js +1 -415
- package/dist/codegen/tendermint/types/params.js +1 -529
- package/dist/codegen/tendermint/types/types.js +1 -1534
- package/dist/codegen/tendermint/types/validator.js +1 -299
- package/dist/codegen/tendermint/version/types.js +1 -155
- package/dist/codegen/utf8.js +1 -138
- package/dist/codegen/varint.js +1 -409
- package/dist/helpers.js +1 -22
- package/dist/index.js +1 -6
- package/package.json +12 -10
|
@@ -1,1256 +1 @@
|
|
|
1
|
-
//@ts-nocheck
|
|
2
|
-
import { Any } from '../../../google/protobuf/any.js';
|
|
3
|
-
import { SignMode, signModeFromJSON, signModeToJSON, } from '../signing/v1beta1/signing.js';
|
|
4
|
-
import { CompactBitArray, } from '../../crypto/multisig/v1beta1/multisig.js';
|
|
5
|
-
import { Coin } from '../../base/v1beta1/coin.js';
|
|
6
|
-
import { BinaryReader, BinaryWriter } from '../../../binary.js';
|
|
7
|
-
import { isSet, bytesFromBase64, base64FromBytes } from '../../../helpers.js';
|
|
8
|
-
import {} from '../../../json-safe.js';
|
|
9
|
-
function createBaseTx() {
|
|
10
|
-
return {
|
|
11
|
-
body: undefined,
|
|
12
|
-
authInfo: undefined,
|
|
13
|
-
signatures: [],
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export const Tx = {
|
|
17
|
-
typeUrl: '/cosmos.tx.v1beta1.Tx',
|
|
18
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
19
|
-
if (message.body !== undefined) {
|
|
20
|
-
TxBody.encode(message.body, writer.uint32(10).fork()).ldelim();
|
|
21
|
-
}
|
|
22
|
-
if (message.authInfo !== undefined) {
|
|
23
|
-
AuthInfo.encode(message.authInfo, writer.uint32(18).fork()).ldelim();
|
|
24
|
-
}
|
|
25
|
-
for (const v of message.signatures) {
|
|
26
|
-
writer.uint32(26).bytes(v);
|
|
27
|
-
}
|
|
28
|
-
return writer;
|
|
29
|
-
},
|
|
30
|
-
decode(input, length) {
|
|
31
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
32
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
33
|
-
const message = createBaseTx();
|
|
34
|
-
while (reader.pos < end) {
|
|
35
|
-
const tag = reader.uint32();
|
|
36
|
-
switch (tag >>> 3) {
|
|
37
|
-
case 1:
|
|
38
|
-
message.body = TxBody.decode(reader, reader.uint32());
|
|
39
|
-
break;
|
|
40
|
-
case 2:
|
|
41
|
-
message.authInfo = AuthInfo.decode(reader, reader.uint32());
|
|
42
|
-
break;
|
|
43
|
-
case 3:
|
|
44
|
-
message.signatures.push(reader.bytes());
|
|
45
|
-
break;
|
|
46
|
-
default:
|
|
47
|
-
reader.skipType(tag & 7);
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return message;
|
|
52
|
-
},
|
|
53
|
-
fromJSON(object) {
|
|
54
|
-
return {
|
|
55
|
-
body: isSet(object.body) ? TxBody.fromJSON(object.body) : undefined,
|
|
56
|
-
authInfo: isSet(object.authInfo)
|
|
57
|
-
? AuthInfo.fromJSON(object.authInfo)
|
|
58
|
-
: undefined,
|
|
59
|
-
signatures: Array.isArray(object?.signatures)
|
|
60
|
-
? object.signatures.map((e) => bytesFromBase64(e))
|
|
61
|
-
: [],
|
|
62
|
-
};
|
|
63
|
-
},
|
|
64
|
-
toJSON(message) {
|
|
65
|
-
const obj = {};
|
|
66
|
-
message.body !== undefined &&
|
|
67
|
-
(obj.body = message.body ? TxBody.toJSON(message.body) : undefined);
|
|
68
|
-
message.authInfo !== undefined &&
|
|
69
|
-
(obj.authInfo = message.authInfo
|
|
70
|
-
? AuthInfo.toJSON(message.authInfo)
|
|
71
|
-
: undefined);
|
|
72
|
-
if (message.signatures) {
|
|
73
|
-
obj.signatures = message.signatures.map(e => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
obj.signatures = [];
|
|
77
|
-
}
|
|
78
|
-
return obj;
|
|
79
|
-
},
|
|
80
|
-
fromPartial(object) {
|
|
81
|
-
const message = createBaseTx();
|
|
82
|
-
message.body =
|
|
83
|
-
object.body !== undefined && object.body !== null
|
|
84
|
-
? TxBody.fromPartial(object.body)
|
|
85
|
-
: undefined;
|
|
86
|
-
message.authInfo =
|
|
87
|
-
object.authInfo !== undefined && object.authInfo !== null
|
|
88
|
-
? AuthInfo.fromPartial(object.authInfo)
|
|
89
|
-
: undefined;
|
|
90
|
-
message.signatures = object.signatures?.map(e => e) || [];
|
|
91
|
-
return message;
|
|
92
|
-
},
|
|
93
|
-
fromProtoMsg(message) {
|
|
94
|
-
return Tx.decode(message.value);
|
|
95
|
-
},
|
|
96
|
-
toProto(message) {
|
|
97
|
-
return Tx.encode(message).finish();
|
|
98
|
-
},
|
|
99
|
-
toProtoMsg(message) {
|
|
100
|
-
return {
|
|
101
|
-
typeUrl: '/cosmos.tx.v1beta1.Tx',
|
|
102
|
-
value: Tx.encode(message).finish(),
|
|
103
|
-
};
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
function createBaseTxRaw() {
|
|
107
|
-
return {
|
|
108
|
-
bodyBytes: new Uint8Array(),
|
|
109
|
-
authInfoBytes: new Uint8Array(),
|
|
110
|
-
signatures: [],
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
export const TxRaw = {
|
|
114
|
-
typeUrl: '/cosmos.tx.v1beta1.TxRaw',
|
|
115
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
116
|
-
if (message.bodyBytes.length !== 0) {
|
|
117
|
-
writer.uint32(10).bytes(message.bodyBytes);
|
|
118
|
-
}
|
|
119
|
-
if (message.authInfoBytes.length !== 0) {
|
|
120
|
-
writer.uint32(18).bytes(message.authInfoBytes);
|
|
121
|
-
}
|
|
122
|
-
for (const v of message.signatures) {
|
|
123
|
-
writer.uint32(26).bytes(v);
|
|
124
|
-
}
|
|
125
|
-
return writer;
|
|
126
|
-
},
|
|
127
|
-
decode(input, length) {
|
|
128
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
129
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
130
|
-
const message = createBaseTxRaw();
|
|
131
|
-
while (reader.pos < end) {
|
|
132
|
-
const tag = reader.uint32();
|
|
133
|
-
switch (tag >>> 3) {
|
|
134
|
-
case 1:
|
|
135
|
-
message.bodyBytes = reader.bytes();
|
|
136
|
-
break;
|
|
137
|
-
case 2:
|
|
138
|
-
message.authInfoBytes = reader.bytes();
|
|
139
|
-
break;
|
|
140
|
-
case 3:
|
|
141
|
-
message.signatures.push(reader.bytes());
|
|
142
|
-
break;
|
|
143
|
-
default:
|
|
144
|
-
reader.skipType(tag & 7);
|
|
145
|
-
break;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return message;
|
|
149
|
-
},
|
|
150
|
-
fromJSON(object) {
|
|
151
|
-
return {
|
|
152
|
-
bodyBytes: isSet(object.bodyBytes)
|
|
153
|
-
? bytesFromBase64(object.bodyBytes)
|
|
154
|
-
: new Uint8Array(),
|
|
155
|
-
authInfoBytes: isSet(object.authInfoBytes)
|
|
156
|
-
? bytesFromBase64(object.authInfoBytes)
|
|
157
|
-
: new Uint8Array(),
|
|
158
|
-
signatures: Array.isArray(object?.signatures)
|
|
159
|
-
? object.signatures.map((e) => bytesFromBase64(e))
|
|
160
|
-
: [],
|
|
161
|
-
};
|
|
162
|
-
},
|
|
163
|
-
toJSON(message) {
|
|
164
|
-
const obj = {};
|
|
165
|
-
message.bodyBytes !== undefined &&
|
|
166
|
-
(obj.bodyBytes = base64FromBytes(message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array()));
|
|
167
|
-
message.authInfoBytes !== undefined &&
|
|
168
|
-
(obj.authInfoBytes = base64FromBytes(message.authInfoBytes !== undefined
|
|
169
|
-
? message.authInfoBytes
|
|
170
|
-
: new Uint8Array()));
|
|
171
|
-
if (message.signatures) {
|
|
172
|
-
obj.signatures = message.signatures.map(e => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
obj.signatures = [];
|
|
176
|
-
}
|
|
177
|
-
return obj;
|
|
178
|
-
},
|
|
179
|
-
fromPartial(object) {
|
|
180
|
-
const message = createBaseTxRaw();
|
|
181
|
-
message.bodyBytes = object.bodyBytes ?? new Uint8Array();
|
|
182
|
-
message.authInfoBytes = object.authInfoBytes ?? new Uint8Array();
|
|
183
|
-
message.signatures = object.signatures?.map(e => e) || [];
|
|
184
|
-
return message;
|
|
185
|
-
},
|
|
186
|
-
fromProtoMsg(message) {
|
|
187
|
-
return TxRaw.decode(message.value);
|
|
188
|
-
},
|
|
189
|
-
toProto(message) {
|
|
190
|
-
return TxRaw.encode(message).finish();
|
|
191
|
-
},
|
|
192
|
-
toProtoMsg(message) {
|
|
193
|
-
return {
|
|
194
|
-
typeUrl: '/cosmos.tx.v1beta1.TxRaw',
|
|
195
|
-
value: TxRaw.encode(message).finish(),
|
|
196
|
-
};
|
|
197
|
-
},
|
|
198
|
-
};
|
|
199
|
-
function createBaseSignDoc() {
|
|
200
|
-
return {
|
|
201
|
-
bodyBytes: new Uint8Array(),
|
|
202
|
-
authInfoBytes: new Uint8Array(),
|
|
203
|
-
chainId: '',
|
|
204
|
-
accountNumber: BigInt(0),
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
export const SignDoc = {
|
|
208
|
-
typeUrl: '/cosmos.tx.v1beta1.SignDoc',
|
|
209
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
210
|
-
if (message.bodyBytes.length !== 0) {
|
|
211
|
-
writer.uint32(10).bytes(message.bodyBytes);
|
|
212
|
-
}
|
|
213
|
-
if (message.authInfoBytes.length !== 0) {
|
|
214
|
-
writer.uint32(18).bytes(message.authInfoBytes);
|
|
215
|
-
}
|
|
216
|
-
if (message.chainId !== '') {
|
|
217
|
-
writer.uint32(26).string(message.chainId);
|
|
218
|
-
}
|
|
219
|
-
if (message.accountNumber !== BigInt(0)) {
|
|
220
|
-
writer.uint32(32).uint64(message.accountNumber);
|
|
221
|
-
}
|
|
222
|
-
return writer;
|
|
223
|
-
},
|
|
224
|
-
decode(input, length) {
|
|
225
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
226
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
227
|
-
const message = createBaseSignDoc();
|
|
228
|
-
while (reader.pos < end) {
|
|
229
|
-
const tag = reader.uint32();
|
|
230
|
-
switch (tag >>> 3) {
|
|
231
|
-
case 1:
|
|
232
|
-
message.bodyBytes = reader.bytes();
|
|
233
|
-
break;
|
|
234
|
-
case 2:
|
|
235
|
-
message.authInfoBytes = reader.bytes();
|
|
236
|
-
break;
|
|
237
|
-
case 3:
|
|
238
|
-
message.chainId = reader.string();
|
|
239
|
-
break;
|
|
240
|
-
case 4:
|
|
241
|
-
message.accountNumber = reader.uint64();
|
|
242
|
-
break;
|
|
243
|
-
default:
|
|
244
|
-
reader.skipType(tag & 7);
|
|
245
|
-
break;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
return message;
|
|
249
|
-
},
|
|
250
|
-
fromJSON(object) {
|
|
251
|
-
return {
|
|
252
|
-
bodyBytes: isSet(object.bodyBytes)
|
|
253
|
-
? bytesFromBase64(object.bodyBytes)
|
|
254
|
-
: new Uint8Array(),
|
|
255
|
-
authInfoBytes: isSet(object.authInfoBytes)
|
|
256
|
-
? bytesFromBase64(object.authInfoBytes)
|
|
257
|
-
: new Uint8Array(),
|
|
258
|
-
chainId: isSet(object.chainId) ? String(object.chainId) : '',
|
|
259
|
-
accountNumber: isSet(object.accountNumber)
|
|
260
|
-
? BigInt(object.accountNumber.toString())
|
|
261
|
-
: BigInt(0),
|
|
262
|
-
};
|
|
263
|
-
},
|
|
264
|
-
toJSON(message) {
|
|
265
|
-
const obj = {};
|
|
266
|
-
message.bodyBytes !== undefined &&
|
|
267
|
-
(obj.bodyBytes = base64FromBytes(message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array()));
|
|
268
|
-
message.authInfoBytes !== undefined &&
|
|
269
|
-
(obj.authInfoBytes = base64FromBytes(message.authInfoBytes !== undefined
|
|
270
|
-
? message.authInfoBytes
|
|
271
|
-
: new Uint8Array()));
|
|
272
|
-
message.chainId !== undefined && (obj.chainId = message.chainId);
|
|
273
|
-
message.accountNumber !== undefined &&
|
|
274
|
-
(obj.accountNumber = (message.accountNumber || BigInt(0)).toString());
|
|
275
|
-
return obj;
|
|
276
|
-
},
|
|
277
|
-
fromPartial(object) {
|
|
278
|
-
const message = createBaseSignDoc();
|
|
279
|
-
message.bodyBytes = object.bodyBytes ?? new Uint8Array();
|
|
280
|
-
message.authInfoBytes = object.authInfoBytes ?? new Uint8Array();
|
|
281
|
-
message.chainId = object.chainId ?? '';
|
|
282
|
-
message.accountNumber =
|
|
283
|
-
object.accountNumber !== undefined && object.accountNumber !== null
|
|
284
|
-
? BigInt(object.accountNumber.toString())
|
|
285
|
-
: BigInt(0);
|
|
286
|
-
return message;
|
|
287
|
-
},
|
|
288
|
-
fromProtoMsg(message) {
|
|
289
|
-
return SignDoc.decode(message.value);
|
|
290
|
-
},
|
|
291
|
-
toProto(message) {
|
|
292
|
-
return SignDoc.encode(message).finish();
|
|
293
|
-
},
|
|
294
|
-
toProtoMsg(message) {
|
|
295
|
-
return {
|
|
296
|
-
typeUrl: '/cosmos.tx.v1beta1.SignDoc',
|
|
297
|
-
value: SignDoc.encode(message).finish(),
|
|
298
|
-
};
|
|
299
|
-
},
|
|
300
|
-
};
|
|
301
|
-
function createBaseSignDocDirectAux() {
|
|
302
|
-
return {
|
|
303
|
-
bodyBytes: new Uint8Array(),
|
|
304
|
-
publicKey: undefined,
|
|
305
|
-
chainId: '',
|
|
306
|
-
accountNumber: BigInt(0),
|
|
307
|
-
sequence: BigInt(0),
|
|
308
|
-
tip: undefined,
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
export const SignDocDirectAux = {
|
|
312
|
-
typeUrl: '/cosmos.tx.v1beta1.SignDocDirectAux',
|
|
313
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
314
|
-
if (message.bodyBytes.length !== 0) {
|
|
315
|
-
writer.uint32(10).bytes(message.bodyBytes);
|
|
316
|
-
}
|
|
317
|
-
if (message.publicKey !== undefined) {
|
|
318
|
-
Any.encode(message.publicKey, writer.uint32(18).fork()).ldelim();
|
|
319
|
-
}
|
|
320
|
-
if (message.chainId !== '') {
|
|
321
|
-
writer.uint32(26).string(message.chainId);
|
|
322
|
-
}
|
|
323
|
-
if (message.accountNumber !== BigInt(0)) {
|
|
324
|
-
writer.uint32(32).uint64(message.accountNumber);
|
|
325
|
-
}
|
|
326
|
-
if (message.sequence !== BigInt(0)) {
|
|
327
|
-
writer.uint32(40).uint64(message.sequence);
|
|
328
|
-
}
|
|
329
|
-
if (message.tip !== undefined) {
|
|
330
|
-
Tip.encode(message.tip, writer.uint32(50).fork()).ldelim();
|
|
331
|
-
}
|
|
332
|
-
return writer;
|
|
333
|
-
},
|
|
334
|
-
decode(input, length) {
|
|
335
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
336
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
337
|
-
const message = createBaseSignDocDirectAux();
|
|
338
|
-
while (reader.pos < end) {
|
|
339
|
-
const tag = reader.uint32();
|
|
340
|
-
switch (tag >>> 3) {
|
|
341
|
-
case 1:
|
|
342
|
-
message.bodyBytes = reader.bytes();
|
|
343
|
-
break;
|
|
344
|
-
case 2:
|
|
345
|
-
message.publicKey = Any.decode(reader, reader.uint32());
|
|
346
|
-
break;
|
|
347
|
-
case 3:
|
|
348
|
-
message.chainId = reader.string();
|
|
349
|
-
break;
|
|
350
|
-
case 4:
|
|
351
|
-
message.accountNumber = reader.uint64();
|
|
352
|
-
break;
|
|
353
|
-
case 5:
|
|
354
|
-
message.sequence = reader.uint64();
|
|
355
|
-
break;
|
|
356
|
-
case 6:
|
|
357
|
-
message.tip = Tip.decode(reader, reader.uint32());
|
|
358
|
-
break;
|
|
359
|
-
default:
|
|
360
|
-
reader.skipType(tag & 7);
|
|
361
|
-
break;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
return message;
|
|
365
|
-
},
|
|
366
|
-
fromJSON(object) {
|
|
367
|
-
return {
|
|
368
|
-
bodyBytes: isSet(object.bodyBytes)
|
|
369
|
-
? bytesFromBase64(object.bodyBytes)
|
|
370
|
-
: new Uint8Array(),
|
|
371
|
-
publicKey: isSet(object.publicKey)
|
|
372
|
-
? Any.fromJSON(object.publicKey)
|
|
373
|
-
: undefined,
|
|
374
|
-
chainId: isSet(object.chainId) ? String(object.chainId) : '',
|
|
375
|
-
accountNumber: isSet(object.accountNumber)
|
|
376
|
-
? BigInt(object.accountNumber.toString())
|
|
377
|
-
: BigInt(0),
|
|
378
|
-
sequence: isSet(object.sequence)
|
|
379
|
-
? BigInt(object.sequence.toString())
|
|
380
|
-
: BigInt(0),
|
|
381
|
-
tip: isSet(object.tip) ? Tip.fromJSON(object.tip) : undefined,
|
|
382
|
-
};
|
|
383
|
-
},
|
|
384
|
-
toJSON(message) {
|
|
385
|
-
const obj = {};
|
|
386
|
-
message.bodyBytes !== undefined &&
|
|
387
|
-
(obj.bodyBytes = base64FromBytes(message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array()));
|
|
388
|
-
message.publicKey !== undefined &&
|
|
389
|
-
(obj.publicKey = message.publicKey
|
|
390
|
-
? Any.toJSON(message.publicKey)
|
|
391
|
-
: undefined);
|
|
392
|
-
message.chainId !== undefined && (obj.chainId = message.chainId);
|
|
393
|
-
message.accountNumber !== undefined &&
|
|
394
|
-
(obj.accountNumber = (message.accountNumber || BigInt(0)).toString());
|
|
395
|
-
message.sequence !== undefined &&
|
|
396
|
-
(obj.sequence = (message.sequence || BigInt(0)).toString());
|
|
397
|
-
message.tip !== undefined &&
|
|
398
|
-
(obj.tip = message.tip ? Tip.toJSON(message.tip) : undefined);
|
|
399
|
-
return obj;
|
|
400
|
-
},
|
|
401
|
-
fromPartial(object) {
|
|
402
|
-
const message = createBaseSignDocDirectAux();
|
|
403
|
-
message.bodyBytes = object.bodyBytes ?? new Uint8Array();
|
|
404
|
-
message.publicKey =
|
|
405
|
-
object.publicKey !== undefined && object.publicKey !== null
|
|
406
|
-
? Any.fromPartial(object.publicKey)
|
|
407
|
-
: undefined;
|
|
408
|
-
message.chainId = object.chainId ?? '';
|
|
409
|
-
message.accountNumber =
|
|
410
|
-
object.accountNumber !== undefined && object.accountNumber !== null
|
|
411
|
-
? BigInt(object.accountNumber.toString())
|
|
412
|
-
: BigInt(0);
|
|
413
|
-
message.sequence =
|
|
414
|
-
object.sequence !== undefined && object.sequence !== null
|
|
415
|
-
? BigInt(object.sequence.toString())
|
|
416
|
-
: BigInt(0);
|
|
417
|
-
message.tip =
|
|
418
|
-
object.tip !== undefined && object.tip !== null
|
|
419
|
-
? Tip.fromPartial(object.tip)
|
|
420
|
-
: undefined;
|
|
421
|
-
return message;
|
|
422
|
-
},
|
|
423
|
-
fromProtoMsg(message) {
|
|
424
|
-
return SignDocDirectAux.decode(message.value);
|
|
425
|
-
},
|
|
426
|
-
toProto(message) {
|
|
427
|
-
return SignDocDirectAux.encode(message).finish();
|
|
428
|
-
},
|
|
429
|
-
toProtoMsg(message) {
|
|
430
|
-
return {
|
|
431
|
-
typeUrl: '/cosmos.tx.v1beta1.SignDocDirectAux',
|
|
432
|
-
value: SignDocDirectAux.encode(message).finish(),
|
|
433
|
-
};
|
|
434
|
-
},
|
|
435
|
-
};
|
|
436
|
-
function createBaseTxBody() {
|
|
437
|
-
return {
|
|
438
|
-
messages: [],
|
|
439
|
-
memo: '',
|
|
440
|
-
timeoutHeight: BigInt(0),
|
|
441
|
-
extensionOptions: [],
|
|
442
|
-
nonCriticalExtensionOptions: [],
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
export const TxBody = {
|
|
446
|
-
typeUrl: '/cosmos.tx.v1beta1.TxBody',
|
|
447
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
448
|
-
for (const v of message.messages) {
|
|
449
|
-
Any.encode(v, writer.uint32(10).fork()).ldelim();
|
|
450
|
-
}
|
|
451
|
-
if (message.memo !== '') {
|
|
452
|
-
writer.uint32(18).string(message.memo);
|
|
453
|
-
}
|
|
454
|
-
if (message.timeoutHeight !== BigInt(0)) {
|
|
455
|
-
writer.uint32(24).uint64(message.timeoutHeight);
|
|
456
|
-
}
|
|
457
|
-
for (const v of message.extensionOptions) {
|
|
458
|
-
Any.encode(v, writer.uint32(8186).fork()).ldelim();
|
|
459
|
-
}
|
|
460
|
-
for (const v of message.nonCriticalExtensionOptions) {
|
|
461
|
-
Any.encode(v, writer.uint32(16378).fork()).ldelim();
|
|
462
|
-
}
|
|
463
|
-
return writer;
|
|
464
|
-
},
|
|
465
|
-
decode(input, length) {
|
|
466
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
467
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
468
|
-
const message = createBaseTxBody();
|
|
469
|
-
while (reader.pos < end) {
|
|
470
|
-
const tag = reader.uint32();
|
|
471
|
-
switch (tag >>> 3) {
|
|
472
|
-
case 1:
|
|
473
|
-
message.messages.push(Any.decode(reader, reader.uint32()));
|
|
474
|
-
break;
|
|
475
|
-
case 2:
|
|
476
|
-
message.memo = reader.string();
|
|
477
|
-
break;
|
|
478
|
-
case 3:
|
|
479
|
-
message.timeoutHeight = reader.uint64();
|
|
480
|
-
break;
|
|
481
|
-
case 1023:
|
|
482
|
-
message.extensionOptions.push(Any.decode(reader, reader.uint32()));
|
|
483
|
-
break;
|
|
484
|
-
case 2047:
|
|
485
|
-
message.nonCriticalExtensionOptions.push(Any.decode(reader, reader.uint32()));
|
|
486
|
-
break;
|
|
487
|
-
default:
|
|
488
|
-
reader.skipType(tag & 7);
|
|
489
|
-
break;
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
return message;
|
|
493
|
-
},
|
|
494
|
-
fromJSON(object) {
|
|
495
|
-
return {
|
|
496
|
-
messages: Array.isArray(object?.messages)
|
|
497
|
-
? object.messages.map((e) => Any.fromJSON(e))
|
|
498
|
-
: [],
|
|
499
|
-
memo: isSet(object.memo) ? String(object.memo) : '',
|
|
500
|
-
timeoutHeight: isSet(object.timeoutHeight)
|
|
501
|
-
? BigInt(object.timeoutHeight.toString())
|
|
502
|
-
: BigInt(0),
|
|
503
|
-
extensionOptions: Array.isArray(object?.extensionOptions)
|
|
504
|
-
? object.extensionOptions.map((e) => Any.fromJSON(e))
|
|
505
|
-
: [],
|
|
506
|
-
nonCriticalExtensionOptions: Array.isArray(object?.nonCriticalExtensionOptions)
|
|
507
|
-
? object.nonCriticalExtensionOptions.map((e) => Any.fromJSON(e))
|
|
508
|
-
: [],
|
|
509
|
-
};
|
|
510
|
-
},
|
|
511
|
-
toJSON(message) {
|
|
512
|
-
const obj = {};
|
|
513
|
-
if (message.messages) {
|
|
514
|
-
obj.messages = message.messages.map(e => (e ? Any.toJSON(e) : undefined));
|
|
515
|
-
}
|
|
516
|
-
else {
|
|
517
|
-
obj.messages = [];
|
|
518
|
-
}
|
|
519
|
-
message.memo !== undefined && (obj.memo = message.memo);
|
|
520
|
-
message.timeoutHeight !== undefined &&
|
|
521
|
-
(obj.timeoutHeight = (message.timeoutHeight || BigInt(0)).toString());
|
|
522
|
-
if (message.extensionOptions) {
|
|
523
|
-
obj.extensionOptions = message.extensionOptions.map(e => e ? Any.toJSON(e) : undefined);
|
|
524
|
-
}
|
|
525
|
-
else {
|
|
526
|
-
obj.extensionOptions = [];
|
|
527
|
-
}
|
|
528
|
-
if (message.nonCriticalExtensionOptions) {
|
|
529
|
-
obj.nonCriticalExtensionOptions = message.nonCriticalExtensionOptions.map(e => (e ? Any.toJSON(e) : undefined));
|
|
530
|
-
}
|
|
531
|
-
else {
|
|
532
|
-
obj.nonCriticalExtensionOptions = [];
|
|
533
|
-
}
|
|
534
|
-
return obj;
|
|
535
|
-
},
|
|
536
|
-
fromPartial(object) {
|
|
537
|
-
const message = createBaseTxBody();
|
|
538
|
-
message.messages = object.messages?.map(e => Any.fromPartial(e)) || [];
|
|
539
|
-
message.memo = object.memo ?? '';
|
|
540
|
-
message.timeoutHeight =
|
|
541
|
-
object.timeoutHeight !== undefined && object.timeoutHeight !== null
|
|
542
|
-
? BigInt(object.timeoutHeight.toString())
|
|
543
|
-
: BigInt(0);
|
|
544
|
-
message.extensionOptions =
|
|
545
|
-
object.extensionOptions?.map(e => Any.fromPartial(e)) || [];
|
|
546
|
-
message.nonCriticalExtensionOptions =
|
|
547
|
-
object.nonCriticalExtensionOptions?.map(e => Any.fromPartial(e)) || [];
|
|
548
|
-
return message;
|
|
549
|
-
},
|
|
550
|
-
fromProtoMsg(message) {
|
|
551
|
-
return TxBody.decode(message.value);
|
|
552
|
-
},
|
|
553
|
-
toProto(message) {
|
|
554
|
-
return TxBody.encode(message).finish();
|
|
555
|
-
},
|
|
556
|
-
toProtoMsg(message) {
|
|
557
|
-
return {
|
|
558
|
-
typeUrl: '/cosmos.tx.v1beta1.TxBody',
|
|
559
|
-
value: TxBody.encode(message).finish(),
|
|
560
|
-
};
|
|
561
|
-
},
|
|
562
|
-
};
|
|
563
|
-
function createBaseAuthInfo() {
|
|
564
|
-
return {
|
|
565
|
-
signerInfos: [],
|
|
566
|
-
fee: undefined,
|
|
567
|
-
tip: undefined,
|
|
568
|
-
};
|
|
569
|
-
}
|
|
570
|
-
export const AuthInfo = {
|
|
571
|
-
typeUrl: '/cosmos.tx.v1beta1.AuthInfo',
|
|
572
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
573
|
-
for (const v of message.signerInfos) {
|
|
574
|
-
SignerInfo.encode(v, writer.uint32(10).fork()).ldelim();
|
|
575
|
-
}
|
|
576
|
-
if (message.fee !== undefined) {
|
|
577
|
-
Fee.encode(message.fee, writer.uint32(18).fork()).ldelim();
|
|
578
|
-
}
|
|
579
|
-
if (message.tip !== undefined) {
|
|
580
|
-
Tip.encode(message.tip, writer.uint32(26).fork()).ldelim();
|
|
581
|
-
}
|
|
582
|
-
return writer;
|
|
583
|
-
},
|
|
584
|
-
decode(input, length) {
|
|
585
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
586
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
587
|
-
const message = createBaseAuthInfo();
|
|
588
|
-
while (reader.pos < end) {
|
|
589
|
-
const tag = reader.uint32();
|
|
590
|
-
switch (tag >>> 3) {
|
|
591
|
-
case 1:
|
|
592
|
-
message.signerInfos.push(SignerInfo.decode(reader, reader.uint32()));
|
|
593
|
-
break;
|
|
594
|
-
case 2:
|
|
595
|
-
message.fee = Fee.decode(reader, reader.uint32());
|
|
596
|
-
break;
|
|
597
|
-
case 3:
|
|
598
|
-
message.tip = Tip.decode(reader, reader.uint32());
|
|
599
|
-
break;
|
|
600
|
-
default:
|
|
601
|
-
reader.skipType(tag & 7);
|
|
602
|
-
break;
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
return message;
|
|
606
|
-
},
|
|
607
|
-
fromJSON(object) {
|
|
608
|
-
return {
|
|
609
|
-
signerInfos: Array.isArray(object?.signerInfos)
|
|
610
|
-
? object.signerInfos.map((e) => SignerInfo.fromJSON(e))
|
|
611
|
-
: [],
|
|
612
|
-
fee: isSet(object.fee) ? Fee.fromJSON(object.fee) : undefined,
|
|
613
|
-
tip: isSet(object.tip) ? Tip.fromJSON(object.tip) : undefined,
|
|
614
|
-
};
|
|
615
|
-
},
|
|
616
|
-
toJSON(message) {
|
|
617
|
-
const obj = {};
|
|
618
|
-
if (message.signerInfos) {
|
|
619
|
-
obj.signerInfos = message.signerInfos.map(e => e ? SignerInfo.toJSON(e) : undefined);
|
|
620
|
-
}
|
|
621
|
-
else {
|
|
622
|
-
obj.signerInfos = [];
|
|
623
|
-
}
|
|
624
|
-
message.fee !== undefined &&
|
|
625
|
-
(obj.fee = message.fee ? Fee.toJSON(message.fee) : undefined);
|
|
626
|
-
message.tip !== undefined &&
|
|
627
|
-
(obj.tip = message.tip ? Tip.toJSON(message.tip) : undefined);
|
|
628
|
-
return obj;
|
|
629
|
-
},
|
|
630
|
-
fromPartial(object) {
|
|
631
|
-
const message = createBaseAuthInfo();
|
|
632
|
-
message.signerInfos =
|
|
633
|
-
object.signerInfos?.map(e => SignerInfo.fromPartial(e)) || [];
|
|
634
|
-
message.fee =
|
|
635
|
-
object.fee !== undefined && object.fee !== null
|
|
636
|
-
? Fee.fromPartial(object.fee)
|
|
637
|
-
: undefined;
|
|
638
|
-
message.tip =
|
|
639
|
-
object.tip !== undefined && object.tip !== null
|
|
640
|
-
? Tip.fromPartial(object.tip)
|
|
641
|
-
: undefined;
|
|
642
|
-
return message;
|
|
643
|
-
},
|
|
644
|
-
fromProtoMsg(message) {
|
|
645
|
-
return AuthInfo.decode(message.value);
|
|
646
|
-
},
|
|
647
|
-
toProto(message) {
|
|
648
|
-
return AuthInfo.encode(message).finish();
|
|
649
|
-
},
|
|
650
|
-
toProtoMsg(message) {
|
|
651
|
-
return {
|
|
652
|
-
typeUrl: '/cosmos.tx.v1beta1.AuthInfo',
|
|
653
|
-
value: AuthInfo.encode(message).finish(),
|
|
654
|
-
};
|
|
655
|
-
},
|
|
656
|
-
};
|
|
657
|
-
function createBaseSignerInfo() {
|
|
658
|
-
return {
|
|
659
|
-
publicKey: undefined,
|
|
660
|
-
modeInfo: undefined,
|
|
661
|
-
sequence: BigInt(0),
|
|
662
|
-
};
|
|
663
|
-
}
|
|
664
|
-
export const SignerInfo = {
|
|
665
|
-
typeUrl: '/cosmos.tx.v1beta1.SignerInfo',
|
|
666
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
667
|
-
if (message.publicKey !== undefined) {
|
|
668
|
-
Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim();
|
|
669
|
-
}
|
|
670
|
-
if (message.modeInfo !== undefined) {
|
|
671
|
-
ModeInfo.encode(message.modeInfo, writer.uint32(18).fork()).ldelim();
|
|
672
|
-
}
|
|
673
|
-
if (message.sequence !== BigInt(0)) {
|
|
674
|
-
writer.uint32(24).uint64(message.sequence);
|
|
675
|
-
}
|
|
676
|
-
return writer;
|
|
677
|
-
},
|
|
678
|
-
decode(input, length) {
|
|
679
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
680
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
681
|
-
const message = createBaseSignerInfo();
|
|
682
|
-
while (reader.pos < end) {
|
|
683
|
-
const tag = reader.uint32();
|
|
684
|
-
switch (tag >>> 3) {
|
|
685
|
-
case 1:
|
|
686
|
-
message.publicKey = Any.decode(reader, reader.uint32());
|
|
687
|
-
break;
|
|
688
|
-
case 2:
|
|
689
|
-
message.modeInfo = ModeInfo.decode(reader, reader.uint32());
|
|
690
|
-
break;
|
|
691
|
-
case 3:
|
|
692
|
-
message.sequence = reader.uint64();
|
|
693
|
-
break;
|
|
694
|
-
default:
|
|
695
|
-
reader.skipType(tag & 7);
|
|
696
|
-
break;
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
return message;
|
|
700
|
-
},
|
|
701
|
-
fromJSON(object) {
|
|
702
|
-
return {
|
|
703
|
-
publicKey: isSet(object.publicKey)
|
|
704
|
-
? Any.fromJSON(object.publicKey)
|
|
705
|
-
: undefined,
|
|
706
|
-
modeInfo: isSet(object.modeInfo)
|
|
707
|
-
? ModeInfo.fromJSON(object.modeInfo)
|
|
708
|
-
: undefined,
|
|
709
|
-
sequence: isSet(object.sequence)
|
|
710
|
-
? BigInt(object.sequence.toString())
|
|
711
|
-
: BigInt(0),
|
|
712
|
-
};
|
|
713
|
-
},
|
|
714
|
-
toJSON(message) {
|
|
715
|
-
const obj = {};
|
|
716
|
-
message.publicKey !== undefined &&
|
|
717
|
-
(obj.publicKey = message.publicKey
|
|
718
|
-
? Any.toJSON(message.publicKey)
|
|
719
|
-
: undefined);
|
|
720
|
-
message.modeInfo !== undefined &&
|
|
721
|
-
(obj.modeInfo = message.modeInfo
|
|
722
|
-
? ModeInfo.toJSON(message.modeInfo)
|
|
723
|
-
: undefined);
|
|
724
|
-
message.sequence !== undefined &&
|
|
725
|
-
(obj.sequence = (message.sequence || BigInt(0)).toString());
|
|
726
|
-
return obj;
|
|
727
|
-
},
|
|
728
|
-
fromPartial(object) {
|
|
729
|
-
const message = createBaseSignerInfo();
|
|
730
|
-
message.publicKey =
|
|
731
|
-
object.publicKey !== undefined && object.publicKey !== null
|
|
732
|
-
? Any.fromPartial(object.publicKey)
|
|
733
|
-
: undefined;
|
|
734
|
-
message.modeInfo =
|
|
735
|
-
object.modeInfo !== undefined && object.modeInfo !== null
|
|
736
|
-
? ModeInfo.fromPartial(object.modeInfo)
|
|
737
|
-
: undefined;
|
|
738
|
-
message.sequence =
|
|
739
|
-
object.sequence !== undefined && object.sequence !== null
|
|
740
|
-
? BigInt(object.sequence.toString())
|
|
741
|
-
: BigInt(0);
|
|
742
|
-
return message;
|
|
743
|
-
},
|
|
744
|
-
fromProtoMsg(message) {
|
|
745
|
-
return SignerInfo.decode(message.value);
|
|
746
|
-
},
|
|
747
|
-
toProto(message) {
|
|
748
|
-
return SignerInfo.encode(message).finish();
|
|
749
|
-
},
|
|
750
|
-
toProtoMsg(message) {
|
|
751
|
-
return {
|
|
752
|
-
typeUrl: '/cosmos.tx.v1beta1.SignerInfo',
|
|
753
|
-
value: SignerInfo.encode(message).finish(),
|
|
754
|
-
};
|
|
755
|
-
},
|
|
756
|
-
};
|
|
757
|
-
function createBaseModeInfo() {
|
|
758
|
-
return {
|
|
759
|
-
single: undefined,
|
|
760
|
-
multi: undefined,
|
|
761
|
-
};
|
|
762
|
-
}
|
|
763
|
-
export const ModeInfo = {
|
|
764
|
-
typeUrl: '/cosmos.tx.v1beta1.ModeInfo',
|
|
765
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
766
|
-
if (message.single !== undefined) {
|
|
767
|
-
ModeInfo_Single.encode(message.single, writer.uint32(10).fork()).ldelim();
|
|
768
|
-
}
|
|
769
|
-
if (message.multi !== undefined) {
|
|
770
|
-
ModeInfo_Multi.encode(message.multi, writer.uint32(18).fork()).ldelim();
|
|
771
|
-
}
|
|
772
|
-
return writer;
|
|
773
|
-
},
|
|
774
|
-
decode(input, length) {
|
|
775
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
776
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
777
|
-
const message = createBaseModeInfo();
|
|
778
|
-
while (reader.pos < end) {
|
|
779
|
-
const tag = reader.uint32();
|
|
780
|
-
switch (tag >>> 3) {
|
|
781
|
-
case 1:
|
|
782
|
-
message.single = ModeInfo_Single.decode(reader, reader.uint32());
|
|
783
|
-
break;
|
|
784
|
-
case 2:
|
|
785
|
-
message.multi = ModeInfo_Multi.decode(reader, reader.uint32());
|
|
786
|
-
break;
|
|
787
|
-
default:
|
|
788
|
-
reader.skipType(tag & 7);
|
|
789
|
-
break;
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
return message;
|
|
793
|
-
},
|
|
794
|
-
fromJSON(object) {
|
|
795
|
-
return {
|
|
796
|
-
single: isSet(object.single)
|
|
797
|
-
? ModeInfo_Single.fromJSON(object.single)
|
|
798
|
-
: undefined,
|
|
799
|
-
multi: isSet(object.multi)
|
|
800
|
-
? ModeInfo_Multi.fromJSON(object.multi)
|
|
801
|
-
: undefined,
|
|
802
|
-
};
|
|
803
|
-
},
|
|
804
|
-
toJSON(message) {
|
|
805
|
-
const obj = {};
|
|
806
|
-
message.single !== undefined &&
|
|
807
|
-
(obj.single = message.single
|
|
808
|
-
? ModeInfo_Single.toJSON(message.single)
|
|
809
|
-
: undefined);
|
|
810
|
-
message.multi !== undefined &&
|
|
811
|
-
(obj.multi = message.multi
|
|
812
|
-
? ModeInfo_Multi.toJSON(message.multi)
|
|
813
|
-
: undefined);
|
|
814
|
-
return obj;
|
|
815
|
-
},
|
|
816
|
-
fromPartial(object) {
|
|
817
|
-
const message = createBaseModeInfo();
|
|
818
|
-
message.single =
|
|
819
|
-
object.single !== undefined && object.single !== null
|
|
820
|
-
? ModeInfo_Single.fromPartial(object.single)
|
|
821
|
-
: undefined;
|
|
822
|
-
message.multi =
|
|
823
|
-
object.multi !== undefined && object.multi !== null
|
|
824
|
-
? ModeInfo_Multi.fromPartial(object.multi)
|
|
825
|
-
: undefined;
|
|
826
|
-
return message;
|
|
827
|
-
},
|
|
828
|
-
fromProtoMsg(message) {
|
|
829
|
-
return ModeInfo.decode(message.value);
|
|
830
|
-
},
|
|
831
|
-
toProto(message) {
|
|
832
|
-
return ModeInfo.encode(message).finish();
|
|
833
|
-
},
|
|
834
|
-
toProtoMsg(message) {
|
|
835
|
-
return {
|
|
836
|
-
typeUrl: '/cosmos.tx.v1beta1.ModeInfo',
|
|
837
|
-
value: ModeInfo.encode(message).finish(),
|
|
838
|
-
};
|
|
839
|
-
},
|
|
840
|
-
};
|
|
841
|
-
function createBaseModeInfo_Single() {
|
|
842
|
-
return {
|
|
843
|
-
mode: 0,
|
|
844
|
-
};
|
|
845
|
-
}
|
|
846
|
-
export const ModeInfo_Single = {
|
|
847
|
-
typeUrl: '/cosmos.tx.v1beta1.Single',
|
|
848
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
849
|
-
if (message.mode !== 0) {
|
|
850
|
-
writer.uint32(8).int32(message.mode);
|
|
851
|
-
}
|
|
852
|
-
return writer;
|
|
853
|
-
},
|
|
854
|
-
decode(input, length) {
|
|
855
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
856
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
857
|
-
const message = createBaseModeInfo_Single();
|
|
858
|
-
while (reader.pos < end) {
|
|
859
|
-
const tag = reader.uint32();
|
|
860
|
-
switch (tag >>> 3) {
|
|
861
|
-
case 1:
|
|
862
|
-
message.mode = reader.int32();
|
|
863
|
-
break;
|
|
864
|
-
default:
|
|
865
|
-
reader.skipType(tag & 7);
|
|
866
|
-
break;
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
return message;
|
|
870
|
-
},
|
|
871
|
-
fromJSON(object) {
|
|
872
|
-
return {
|
|
873
|
-
mode: isSet(object.mode) ? signModeFromJSON(object.mode) : -1,
|
|
874
|
-
};
|
|
875
|
-
},
|
|
876
|
-
toJSON(message) {
|
|
877
|
-
const obj = {};
|
|
878
|
-
message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
|
|
879
|
-
return obj;
|
|
880
|
-
},
|
|
881
|
-
fromPartial(object) {
|
|
882
|
-
const message = createBaseModeInfo_Single();
|
|
883
|
-
message.mode = object.mode ?? 0;
|
|
884
|
-
return message;
|
|
885
|
-
},
|
|
886
|
-
fromProtoMsg(message) {
|
|
887
|
-
return ModeInfo_Single.decode(message.value);
|
|
888
|
-
},
|
|
889
|
-
toProto(message) {
|
|
890
|
-
return ModeInfo_Single.encode(message).finish();
|
|
891
|
-
},
|
|
892
|
-
toProtoMsg(message) {
|
|
893
|
-
return {
|
|
894
|
-
typeUrl: '/cosmos.tx.v1beta1.Single',
|
|
895
|
-
value: ModeInfo_Single.encode(message).finish(),
|
|
896
|
-
};
|
|
897
|
-
},
|
|
898
|
-
};
|
|
899
|
-
function createBaseModeInfo_Multi() {
|
|
900
|
-
return {
|
|
901
|
-
bitarray: undefined,
|
|
902
|
-
modeInfos: [],
|
|
903
|
-
};
|
|
904
|
-
}
|
|
905
|
-
export const ModeInfo_Multi = {
|
|
906
|
-
typeUrl: '/cosmos.tx.v1beta1.Multi',
|
|
907
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
908
|
-
if (message.bitarray !== undefined) {
|
|
909
|
-
CompactBitArray.encode(message.bitarray, writer.uint32(10).fork()).ldelim();
|
|
910
|
-
}
|
|
911
|
-
for (const v of message.modeInfos) {
|
|
912
|
-
ModeInfo.encode(v, writer.uint32(18).fork()).ldelim();
|
|
913
|
-
}
|
|
914
|
-
return writer;
|
|
915
|
-
},
|
|
916
|
-
decode(input, length) {
|
|
917
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
918
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
919
|
-
const message = createBaseModeInfo_Multi();
|
|
920
|
-
while (reader.pos < end) {
|
|
921
|
-
const tag = reader.uint32();
|
|
922
|
-
switch (tag >>> 3) {
|
|
923
|
-
case 1:
|
|
924
|
-
message.bitarray = CompactBitArray.decode(reader, reader.uint32());
|
|
925
|
-
break;
|
|
926
|
-
case 2:
|
|
927
|
-
message.modeInfos.push(ModeInfo.decode(reader, reader.uint32()));
|
|
928
|
-
break;
|
|
929
|
-
default:
|
|
930
|
-
reader.skipType(tag & 7);
|
|
931
|
-
break;
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
return message;
|
|
935
|
-
},
|
|
936
|
-
fromJSON(object) {
|
|
937
|
-
return {
|
|
938
|
-
bitarray: isSet(object.bitarray)
|
|
939
|
-
? CompactBitArray.fromJSON(object.bitarray)
|
|
940
|
-
: undefined,
|
|
941
|
-
modeInfos: Array.isArray(object?.modeInfos)
|
|
942
|
-
? object.modeInfos.map((e) => ModeInfo.fromJSON(e))
|
|
943
|
-
: [],
|
|
944
|
-
};
|
|
945
|
-
},
|
|
946
|
-
toJSON(message) {
|
|
947
|
-
const obj = {};
|
|
948
|
-
message.bitarray !== undefined &&
|
|
949
|
-
(obj.bitarray = message.bitarray
|
|
950
|
-
? CompactBitArray.toJSON(message.bitarray)
|
|
951
|
-
: undefined);
|
|
952
|
-
if (message.modeInfos) {
|
|
953
|
-
obj.modeInfos = message.modeInfos.map(e => e ? ModeInfo.toJSON(e) : undefined);
|
|
954
|
-
}
|
|
955
|
-
else {
|
|
956
|
-
obj.modeInfos = [];
|
|
957
|
-
}
|
|
958
|
-
return obj;
|
|
959
|
-
},
|
|
960
|
-
fromPartial(object) {
|
|
961
|
-
const message = createBaseModeInfo_Multi();
|
|
962
|
-
message.bitarray =
|
|
963
|
-
object.bitarray !== undefined && object.bitarray !== null
|
|
964
|
-
? CompactBitArray.fromPartial(object.bitarray)
|
|
965
|
-
: undefined;
|
|
966
|
-
message.modeInfos =
|
|
967
|
-
object.modeInfos?.map(e => ModeInfo.fromPartial(e)) || [];
|
|
968
|
-
return message;
|
|
969
|
-
},
|
|
970
|
-
fromProtoMsg(message) {
|
|
971
|
-
return ModeInfo_Multi.decode(message.value);
|
|
972
|
-
},
|
|
973
|
-
toProto(message) {
|
|
974
|
-
return ModeInfo_Multi.encode(message).finish();
|
|
975
|
-
},
|
|
976
|
-
toProtoMsg(message) {
|
|
977
|
-
return {
|
|
978
|
-
typeUrl: '/cosmos.tx.v1beta1.Multi',
|
|
979
|
-
value: ModeInfo_Multi.encode(message).finish(),
|
|
980
|
-
};
|
|
981
|
-
},
|
|
982
|
-
};
|
|
983
|
-
function createBaseFee() {
|
|
984
|
-
return {
|
|
985
|
-
amount: [],
|
|
986
|
-
gasLimit: BigInt(0),
|
|
987
|
-
payer: '',
|
|
988
|
-
granter: '',
|
|
989
|
-
};
|
|
990
|
-
}
|
|
991
|
-
export const Fee = {
|
|
992
|
-
typeUrl: '/cosmos.tx.v1beta1.Fee',
|
|
993
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
994
|
-
for (const v of message.amount) {
|
|
995
|
-
Coin.encode(v, writer.uint32(10).fork()).ldelim();
|
|
996
|
-
}
|
|
997
|
-
if (message.gasLimit !== BigInt(0)) {
|
|
998
|
-
writer.uint32(16).uint64(message.gasLimit);
|
|
999
|
-
}
|
|
1000
|
-
if (message.payer !== '') {
|
|
1001
|
-
writer.uint32(26).string(message.payer);
|
|
1002
|
-
}
|
|
1003
|
-
if (message.granter !== '') {
|
|
1004
|
-
writer.uint32(34).string(message.granter);
|
|
1005
|
-
}
|
|
1006
|
-
return writer;
|
|
1007
|
-
},
|
|
1008
|
-
decode(input, length) {
|
|
1009
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1010
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1011
|
-
const message = createBaseFee();
|
|
1012
|
-
while (reader.pos < end) {
|
|
1013
|
-
const tag = reader.uint32();
|
|
1014
|
-
switch (tag >>> 3) {
|
|
1015
|
-
case 1:
|
|
1016
|
-
message.amount.push(Coin.decode(reader, reader.uint32()));
|
|
1017
|
-
break;
|
|
1018
|
-
case 2:
|
|
1019
|
-
message.gasLimit = reader.uint64();
|
|
1020
|
-
break;
|
|
1021
|
-
case 3:
|
|
1022
|
-
message.payer = reader.string();
|
|
1023
|
-
break;
|
|
1024
|
-
case 4:
|
|
1025
|
-
message.granter = reader.string();
|
|
1026
|
-
break;
|
|
1027
|
-
default:
|
|
1028
|
-
reader.skipType(tag & 7);
|
|
1029
|
-
break;
|
|
1030
|
-
}
|
|
1031
|
-
}
|
|
1032
|
-
return message;
|
|
1033
|
-
},
|
|
1034
|
-
fromJSON(object) {
|
|
1035
|
-
return {
|
|
1036
|
-
amount: Array.isArray(object?.amount)
|
|
1037
|
-
? object.amount.map((e) => Coin.fromJSON(e))
|
|
1038
|
-
: [],
|
|
1039
|
-
gasLimit: isSet(object.gasLimit)
|
|
1040
|
-
? BigInt(object.gasLimit.toString())
|
|
1041
|
-
: BigInt(0),
|
|
1042
|
-
payer: isSet(object.payer) ? String(object.payer) : '',
|
|
1043
|
-
granter: isSet(object.granter) ? String(object.granter) : '',
|
|
1044
|
-
};
|
|
1045
|
-
},
|
|
1046
|
-
toJSON(message) {
|
|
1047
|
-
const obj = {};
|
|
1048
|
-
if (message.amount) {
|
|
1049
|
-
obj.amount = message.amount.map(e => (e ? Coin.toJSON(e) : undefined));
|
|
1050
|
-
}
|
|
1051
|
-
else {
|
|
1052
|
-
obj.amount = [];
|
|
1053
|
-
}
|
|
1054
|
-
message.gasLimit !== undefined &&
|
|
1055
|
-
(obj.gasLimit = (message.gasLimit || BigInt(0)).toString());
|
|
1056
|
-
message.payer !== undefined && (obj.payer = message.payer);
|
|
1057
|
-
message.granter !== undefined && (obj.granter = message.granter);
|
|
1058
|
-
return obj;
|
|
1059
|
-
},
|
|
1060
|
-
fromPartial(object) {
|
|
1061
|
-
const message = createBaseFee();
|
|
1062
|
-
message.amount = object.amount?.map(e => Coin.fromPartial(e)) || [];
|
|
1063
|
-
message.gasLimit =
|
|
1064
|
-
object.gasLimit !== undefined && object.gasLimit !== null
|
|
1065
|
-
? BigInt(object.gasLimit.toString())
|
|
1066
|
-
: BigInt(0);
|
|
1067
|
-
message.payer = object.payer ?? '';
|
|
1068
|
-
message.granter = object.granter ?? '';
|
|
1069
|
-
return message;
|
|
1070
|
-
},
|
|
1071
|
-
fromProtoMsg(message) {
|
|
1072
|
-
return Fee.decode(message.value);
|
|
1073
|
-
},
|
|
1074
|
-
toProto(message) {
|
|
1075
|
-
return Fee.encode(message).finish();
|
|
1076
|
-
},
|
|
1077
|
-
toProtoMsg(message) {
|
|
1078
|
-
return {
|
|
1079
|
-
typeUrl: '/cosmos.tx.v1beta1.Fee',
|
|
1080
|
-
value: Fee.encode(message).finish(),
|
|
1081
|
-
};
|
|
1082
|
-
},
|
|
1083
|
-
};
|
|
1084
|
-
function createBaseTip() {
|
|
1085
|
-
return {
|
|
1086
|
-
amount: [],
|
|
1087
|
-
tipper: '',
|
|
1088
|
-
};
|
|
1089
|
-
}
|
|
1090
|
-
export const Tip = {
|
|
1091
|
-
typeUrl: '/cosmos.tx.v1beta1.Tip',
|
|
1092
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
1093
|
-
for (const v of message.amount) {
|
|
1094
|
-
Coin.encode(v, writer.uint32(10).fork()).ldelim();
|
|
1095
|
-
}
|
|
1096
|
-
if (message.tipper !== '') {
|
|
1097
|
-
writer.uint32(18).string(message.tipper);
|
|
1098
|
-
}
|
|
1099
|
-
return writer;
|
|
1100
|
-
},
|
|
1101
|
-
decode(input, length) {
|
|
1102
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1103
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1104
|
-
const message = createBaseTip();
|
|
1105
|
-
while (reader.pos < end) {
|
|
1106
|
-
const tag = reader.uint32();
|
|
1107
|
-
switch (tag >>> 3) {
|
|
1108
|
-
case 1:
|
|
1109
|
-
message.amount.push(Coin.decode(reader, reader.uint32()));
|
|
1110
|
-
break;
|
|
1111
|
-
case 2:
|
|
1112
|
-
message.tipper = reader.string();
|
|
1113
|
-
break;
|
|
1114
|
-
default:
|
|
1115
|
-
reader.skipType(tag & 7);
|
|
1116
|
-
break;
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
return message;
|
|
1120
|
-
},
|
|
1121
|
-
fromJSON(object) {
|
|
1122
|
-
return {
|
|
1123
|
-
amount: Array.isArray(object?.amount)
|
|
1124
|
-
? object.amount.map((e) => Coin.fromJSON(e))
|
|
1125
|
-
: [],
|
|
1126
|
-
tipper: isSet(object.tipper) ? String(object.tipper) : '',
|
|
1127
|
-
};
|
|
1128
|
-
},
|
|
1129
|
-
toJSON(message) {
|
|
1130
|
-
const obj = {};
|
|
1131
|
-
if (message.amount) {
|
|
1132
|
-
obj.amount = message.amount.map(e => (e ? Coin.toJSON(e) : undefined));
|
|
1133
|
-
}
|
|
1134
|
-
else {
|
|
1135
|
-
obj.amount = [];
|
|
1136
|
-
}
|
|
1137
|
-
message.tipper !== undefined && (obj.tipper = message.tipper);
|
|
1138
|
-
return obj;
|
|
1139
|
-
},
|
|
1140
|
-
fromPartial(object) {
|
|
1141
|
-
const message = createBaseTip();
|
|
1142
|
-
message.amount = object.amount?.map(e => Coin.fromPartial(e)) || [];
|
|
1143
|
-
message.tipper = object.tipper ?? '';
|
|
1144
|
-
return message;
|
|
1145
|
-
},
|
|
1146
|
-
fromProtoMsg(message) {
|
|
1147
|
-
return Tip.decode(message.value);
|
|
1148
|
-
},
|
|
1149
|
-
toProto(message) {
|
|
1150
|
-
return Tip.encode(message).finish();
|
|
1151
|
-
},
|
|
1152
|
-
toProtoMsg(message) {
|
|
1153
|
-
return {
|
|
1154
|
-
typeUrl: '/cosmos.tx.v1beta1.Tip',
|
|
1155
|
-
value: Tip.encode(message).finish(),
|
|
1156
|
-
};
|
|
1157
|
-
},
|
|
1158
|
-
};
|
|
1159
|
-
function createBaseAuxSignerData() {
|
|
1160
|
-
return {
|
|
1161
|
-
address: '',
|
|
1162
|
-
signDoc: undefined,
|
|
1163
|
-
mode: 0,
|
|
1164
|
-
sig: new Uint8Array(),
|
|
1165
|
-
};
|
|
1166
|
-
}
|
|
1167
|
-
export const AuxSignerData = {
|
|
1168
|
-
typeUrl: '/cosmos.tx.v1beta1.AuxSignerData',
|
|
1169
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
1170
|
-
if (message.address !== '') {
|
|
1171
|
-
writer.uint32(10).string(message.address);
|
|
1172
|
-
}
|
|
1173
|
-
if (message.signDoc !== undefined) {
|
|
1174
|
-
SignDocDirectAux.encode(message.signDoc, writer.uint32(18).fork()).ldelim();
|
|
1175
|
-
}
|
|
1176
|
-
if (message.mode !== 0) {
|
|
1177
|
-
writer.uint32(24).int32(message.mode);
|
|
1178
|
-
}
|
|
1179
|
-
if (message.sig.length !== 0) {
|
|
1180
|
-
writer.uint32(34).bytes(message.sig);
|
|
1181
|
-
}
|
|
1182
|
-
return writer;
|
|
1183
|
-
},
|
|
1184
|
-
decode(input, length) {
|
|
1185
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1186
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1187
|
-
const message = createBaseAuxSignerData();
|
|
1188
|
-
while (reader.pos < end) {
|
|
1189
|
-
const tag = reader.uint32();
|
|
1190
|
-
switch (tag >>> 3) {
|
|
1191
|
-
case 1:
|
|
1192
|
-
message.address = reader.string();
|
|
1193
|
-
break;
|
|
1194
|
-
case 2:
|
|
1195
|
-
message.signDoc = SignDocDirectAux.decode(reader, reader.uint32());
|
|
1196
|
-
break;
|
|
1197
|
-
case 3:
|
|
1198
|
-
message.mode = reader.int32();
|
|
1199
|
-
break;
|
|
1200
|
-
case 4:
|
|
1201
|
-
message.sig = reader.bytes();
|
|
1202
|
-
break;
|
|
1203
|
-
default:
|
|
1204
|
-
reader.skipType(tag & 7);
|
|
1205
|
-
break;
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
return message;
|
|
1209
|
-
},
|
|
1210
|
-
fromJSON(object) {
|
|
1211
|
-
return {
|
|
1212
|
-
address: isSet(object.address) ? String(object.address) : '',
|
|
1213
|
-
signDoc: isSet(object.signDoc)
|
|
1214
|
-
? SignDocDirectAux.fromJSON(object.signDoc)
|
|
1215
|
-
: undefined,
|
|
1216
|
-
mode: isSet(object.mode) ? signModeFromJSON(object.mode) : -1,
|
|
1217
|
-
sig: isSet(object.sig) ? bytesFromBase64(object.sig) : new Uint8Array(),
|
|
1218
|
-
};
|
|
1219
|
-
},
|
|
1220
|
-
toJSON(message) {
|
|
1221
|
-
const obj = {};
|
|
1222
|
-
message.address !== undefined && (obj.address = message.address);
|
|
1223
|
-
message.signDoc !== undefined &&
|
|
1224
|
-
(obj.signDoc = message.signDoc
|
|
1225
|
-
? SignDocDirectAux.toJSON(message.signDoc)
|
|
1226
|
-
: undefined);
|
|
1227
|
-
message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
|
|
1228
|
-
message.sig !== undefined &&
|
|
1229
|
-
(obj.sig = base64FromBytes(message.sig !== undefined ? message.sig : new Uint8Array()));
|
|
1230
|
-
return obj;
|
|
1231
|
-
},
|
|
1232
|
-
fromPartial(object) {
|
|
1233
|
-
const message = createBaseAuxSignerData();
|
|
1234
|
-
message.address = object.address ?? '';
|
|
1235
|
-
message.signDoc =
|
|
1236
|
-
object.signDoc !== undefined && object.signDoc !== null
|
|
1237
|
-
? SignDocDirectAux.fromPartial(object.signDoc)
|
|
1238
|
-
: undefined;
|
|
1239
|
-
message.mode = object.mode ?? 0;
|
|
1240
|
-
message.sig = object.sig ?? new Uint8Array();
|
|
1241
|
-
return message;
|
|
1242
|
-
},
|
|
1243
|
-
fromProtoMsg(message) {
|
|
1244
|
-
return AuxSignerData.decode(message.value);
|
|
1245
|
-
},
|
|
1246
|
-
toProto(message) {
|
|
1247
|
-
return AuxSignerData.encode(message).finish();
|
|
1248
|
-
},
|
|
1249
|
-
toProtoMsg(message) {
|
|
1250
|
-
return {
|
|
1251
|
-
typeUrl: '/cosmos.tx.v1beta1.AuxSignerData',
|
|
1252
|
-
value: AuxSignerData.encode(message).finish(),
|
|
1253
|
-
};
|
|
1254
|
-
},
|
|
1255
|
-
};
|
|
1256
|
-
//# sourceMappingURL=tx.js.map
|
|
1
|
+
import{Any as o}from"../../../google/protobuf/any.js";import{SignMode as e,signModeFromJSON as t,signModeToJSON as n}from"../signing/v1beta1/signing.js";import{CompactBitArray as i}from"../../crypto/multisig/v1beta1/multisig.js";import{Coin as r}from"../../base/v1beta1/coin.js";import{BinaryReader as s,BinaryWriter as a}from"../../../binary.js";import{isSet as d,bytesFromBase64 as c,base64FromBytes as u}from"../../../helpers.js";import{}from"../../../json-safe.js";export const Tx={typeUrl:"/cosmos.tx.v1beta1.Tx",encode(o,e=a.create()){void 0!==o.body&&TxBody.encode(o.body,e.uint32(10).fork()).ldelim(),void 0!==o.authInfo&&AuthInfo.encode(o.authInfo,e.uint32(18).fork()).ldelim();for(const t of o.signatures)e.uint32(26).bytes(t);return e},decode(o,e){const t=o instanceof s?o:new s(o);let n=void 0===e?t.len:t.pos+e;const i={body:void 0,authInfo:void 0,signatures:[]};for(;t.pos<n;){const o=t.uint32();switch(o>>>3){case 1:i.body=TxBody.decode(t,t.uint32());break;case 2:i.authInfo=AuthInfo.decode(t,t.uint32());break;case 3:i.signatures.push(t.bytes());break;default:t.skipType(7&o)}}return i},fromJSON:o=>({body:d(o.body)?TxBody.fromJSON(o.body):void 0,authInfo:d(o.authInfo)?AuthInfo.fromJSON(o.authInfo):void 0,signatures:Array.isArray(o?.signatures)?o.signatures.map((o=>c(o))):[]}),toJSON(o){const e={};return void 0!==o.body&&(e.body=o.body?TxBody.toJSON(o.body):void 0),void 0!==o.authInfo&&(e.authInfo=o.authInfo?AuthInfo.toJSON(o.authInfo):void 0),o.signatures?e.signatures=o.signatures.map((o=>u(void 0!==o?o:new Uint8Array))):e.signatures=[],e},fromPartial(o){const e={body:void 0,authInfo:void 0,signatures:[]};return e.body=void 0!==o.body&&null!==o.body?TxBody.fromPartial(o.body):void 0,e.authInfo=void 0!==o.authInfo&&null!==o.authInfo?AuthInfo.fromPartial(o.authInfo):void 0,e.signatures=o.signatures?.map((o=>o))||[],e},fromProtoMsg:o=>Tx.decode(o.value),toProto:o=>Tx.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.tx.v1beta1.Tx",value:Tx.encode(o).finish()})};function m(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,signatures:[]}}export const TxRaw={typeUrl:"/cosmos.tx.v1beta1.TxRaw",encode(o,e=a.create()){0!==o.bodyBytes.length&&e.uint32(10).bytes(o.bodyBytes),0!==o.authInfoBytes.length&&e.uint32(18).bytes(o.authInfoBytes);for(const t of o.signatures)e.uint32(26).bytes(t);return e},decode(o,e){const t=o instanceof s?o:new s(o);let n=void 0===e?t.len:t.pos+e;const i=m();for(;t.pos<n;){const o=t.uint32();switch(o>>>3){case 1:i.bodyBytes=t.bytes();break;case 2:i.authInfoBytes=t.bytes();break;case 3:i.signatures.push(t.bytes());break;default:t.skipType(7&o)}}return i},fromJSON:o=>({bodyBytes:d(o.bodyBytes)?c(o.bodyBytes):new Uint8Array,authInfoBytes:d(o.authInfoBytes)?c(o.authInfoBytes):new Uint8Array,signatures:Array.isArray(o?.signatures)?o.signatures.map((o=>c(o))):[]}),toJSON(o){const e={};return void 0!==o.bodyBytes&&(e.bodyBytes=u(void 0!==o.bodyBytes?o.bodyBytes:new Uint8Array)),void 0!==o.authInfoBytes&&(e.authInfoBytes=u(void 0!==o.authInfoBytes?o.authInfoBytes:new Uint8Array)),o.signatures?e.signatures=o.signatures.map((o=>u(void 0!==o?o:new Uint8Array))):e.signatures=[],e},fromPartial(o){const e=m();return e.bodyBytes=o.bodyBytes??new Uint8Array,e.authInfoBytes=o.authInfoBytes??new Uint8Array,e.signatures=o.signatures?.map((o=>o))||[],e},fromProtoMsg:o=>TxRaw.decode(o.value),toProto:o=>TxRaw.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.tx.v1beta1.TxRaw",value:TxRaw.encode(o).finish()})};function f(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,chainId:"",accountNumber:BigInt(0)}}export const SignDoc={typeUrl:"/cosmos.tx.v1beta1.SignDoc",encode:(o,e=a.create())=>(0!==o.bodyBytes.length&&e.uint32(10).bytes(o.bodyBytes),0!==o.authInfoBytes.length&&e.uint32(18).bytes(o.authInfoBytes),""!==o.chainId&&e.uint32(26).string(o.chainId),o.accountNumber!==BigInt(0)&&e.uint32(32).uint64(o.accountNumber),e),decode(o,e){const t=o instanceof s?o:new s(o);let n=void 0===e?t.len:t.pos+e;const i=f();for(;t.pos<n;){const o=t.uint32();switch(o>>>3){case 1:i.bodyBytes=t.bytes();break;case 2:i.authInfoBytes=t.bytes();break;case 3:i.chainId=t.string();break;case 4:i.accountNumber=t.uint64();break;default:t.skipType(7&o)}}return i},fromJSON:o=>({bodyBytes:d(o.bodyBytes)?c(o.bodyBytes):new Uint8Array,authInfoBytes:d(o.authInfoBytes)?c(o.authInfoBytes):new Uint8Array,chainId:d(o.chainId)?String(o.chainId):"",accountNumber:d(o.accountNumber)?BigInt(o.accountNumber.toString()):BigInt(0)}),toJSON(o){const e={};return void 0!==o.bodyBytes&&(e.bodyBytes=u(void 0!==o.bodyBytes?o.bodyBytes:new Uint8Array)),void 0!==o.authInfoBytes&&(e.authInfoBytes=u(void 0!==o.authInfoBytes?o.authInfoBytes:new Uint8Array)),void 0!==o.chainId&&(e.chainId=o.chainId),void 0!==o.accountNumber&&(e.accountNumber=(o.accountNumber||BigInt(0)).toString()),e},fromPartial(o){const e=f();return e.bodyBytes=o.bodyBytes??new Uint8Array,e.authInfoBytes=o.authInfoBytes??new Uint8Array,e.chainId=o.chainId??"",e.accountNumber=void 0!==o.accountNumber&&null!==o.accountNumber?BigInt(o.accountNumber.toString()):BigInt(0),e},fromProtoMsg:o=>SignDoc.decode(o.value),toProto:o=>SignDoc.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.tx.v1beta1.SignDoc",value:SignDoc.encode(o).finish()})};function l(){return{bodyBytes:new Uint8Array,publicKey:void 0,chainId:"",accountNumber:BigInt(0),sequence:BigInt(0),tip:void 0}}export const SignDocDirectAux={typeUrl:"/cosmos.tx.v1beta1.SignDocDirectAux",encode:(e,t=a.create())=>(0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),void 0!==e.publicKey&&o.encode(e.publicKey,t.uint32(18).fork()).ldelim(),""!==e.chainId&&t.uint32(26).string(e.chainId),e.accountNumber!==BigInt(0)&&t.uint32(32).uint64(e.accountNumber),e.sequence!==BigInt(0)&&t.uint32(40).uint64(e.sequence),void 0!==e.tip&&Tip.encode(e.tip,t.uint32(50).fork()).ldelim(),t),decode(e,t){const n=e instanceof s?e:new s(e);let i=void 0===t?n.len:n.pos+t;const r=l();for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.bodyBytes=n.bytes();break;case 2:r.publicKey=o.decode(n,n.uint32());break;case 3:r.chainId=n.string();break;case 4:r.accountNumber=n.uint64();break;case 5:r.sequence=n.uint64();break;case 6:r.tip=Tip.decode(n,n.uint32());break;default:n.skipType(7&e)}}return r},fromJSON:e=>({bodyBytes:d(e.bodyBytes)?c(e.bodyBytes):new Uint8Array,publicKey:d(e.publicKey)?o.fromJSON(e.publicKey):void 0,chainId:d(e.chainId)?String(e.chainId):"",accountNumber:d(e.accountNumber)?BigInt(e.accountNumber.toString()):BigInt(0),sequence:d(e.sequence)?BigInt(e.sequence.toString()):BigInt(0),tip:d(e.tip)?Tip.fromJSON(e.tip):void 0}),toJSON(e){const t={};return void 0!==e.bodyBytes&&(t.bodyBytes=u(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.publicKey&&(t.publicKey=e.publicKey?o.toJSON(e.publicKey):void 0),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||BigInt(0)).toString()),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),void 0!==e.tip&&(t.tip=e.tip?Tip.toJSON(e.tip):void 0),t},fromPartial(e){const t=l();return t.bodyBytes=e.bodyBytes??new Uint8Array,t.publicKey=void 0!==e.publicKey&&null!==e.publicKey?o.fromPartial(e.publicKey):void 0,t.chainId=e.chainId??"",t.accountNumber=void 0!==e.accountNumber&&null!==e.accountNumber?BigInt(e.accountNumber.toString()):BigInt(0),t.sequence=void 0!==e.sequence&&null!==e.sequence?BigInt(e.sequence.toString()):BigInt(0),t.tip=void 0!==e.tip&&null!==e.tip?Tip.fromPartial(e.tip):void 0,t},fromProtoMsg:o=>SignDocDirectAux.decode(o.value),toProto:o=>SignDocDirectAux.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.tx.v1beta1.SignDocDirectAux",value:SignDocDirectAux.encode(o).finish()})};function g(){return{messages:[],memo:"",timeoutHeight:BigInt(0),extensionOptions:[],nonCriticalExtensionOptions:[]}}export const TxBody={typeUrl:"/cosmos.tx.v1beta1.TxBody",encode(e,t=a.create()){for(const n of e.messages)o.encode(n,t.uint32(10).fork()).ldelim();""!==e.memo&&t.uint32(18).string(e.memo),e.timeoutHeight!==BigInt(0)&&t.uint32(24).uint64(e.timeoutHeight);for(const n of e.extensionOptions)o.encode(n,t.uint32(8186).fork()).ldelim();for(const n of e.nonCriticalExtensionOptions)o.encode(n,t.uint32(16378).fork()).ldelim();return t},decode(e,t){const n=e instanceof s?e:new s(e);let i=void 0===t?n.len:n.pos+t;const r=g();for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.messages.push(o.decode(n,n.uint32()));break;case 2:r.memo=n.string();break;case 3:r.timeoutHeight=n.uint64();break;case 1023:r.extensionOptions.push(o.decode(n,n.uint32()));break;case 2047:r.nonCriticalExtensionOptions.push(o.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return r},fromJSON:e=>({messages:Array.isArray(e?.messages)?e.messages.map((e=>o.fromJSON(e))):[],memo:d(e.memo)?String(e.memo):"",timeoutHeight:d(e.timeoutHeight)?BigInt(e.timeoutHeight.toString()):BigInt(0),extensionOptions:Array.isArray(e?.extensionOptions)?e.extensionOptions.map((e=>o.fromJSON(e))):[],nonCriticalExtensionOptions:Array.isArray(e?.nonCriticalExtensionOptions)?e.nonCriticalExtensionOptions.map((e=>o.fromJSON(e))):[]}),toJSON(e){const t={};return e.messages?t.messages=e.messages.map((e=>e?o.toJSON(e):void 0)):t.messages=[],void 0!==e.memo&&(t.memo=e.memo),void 0!==e.timeoutHeight&&(t.timeoutHeight=(e.timeoutHeight||BigInt(0)).toString()),e.extensionOptions?t.extensionOptions=e.extensionOptions.map((e=>e?o.toJSON(e):void 0)):t.extensionOptions=[],e.nonCriticalExtensionOptions?t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map((e=>e?o.toJSON(e):void 0)):t.nonCriticalExtensionOptions=[],t},fromPartial(e){const t=g();return t.messages=e.messages?.map((e=>o.fromPartial(e)))||[],t.memo=e.memo??"",t.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?BigInt(e.timeoutHeight.toString()):BigInt(0),t.extensionOptions=e.extensionOptions?.map((e=>o.fromPartial(e)))||[],t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions?.map((e=>o.fromPartial(e)))||[],t},fromProtoMsg:o=>TxBody.decode(o.value),toProto:o=>TxBody.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.tx.v1beta1.TxBody",value:TxBody.encode(o).finish()})};export const AuthInfo={typeUrl:"/cosmos.tx.v1beta1.AuthInfo",encode(o,e=a.create()){for(const t of o.signerInfos)SignerInfo.encode(t,e.uint32(10).fork()).ldelim();return void 0!==o.fee&&Fee.encode(o.fee,e.uint32(18).fork()).ldelim(),void 0!==o.tip&&Tip.encode(o.tip,e.uint32(26).fork()).ldelim(),e},decode(o,e){const t=o instanceof s?o:new s(o);let n=void 0===e?t.len:t.pos+e;const i={signerInfos:[],fee:void 0,tip:void 0};for(;t.pos<n;){const o=t.uint32();switch(o>>>3){case 1:i.signerInfos.push(SignerInfo.decode(t,t.uint32()));break;case 2:i.fee=Fee.decode(t,t.uint32());break;case 3:i.tip=Tip.decode(t,t.uint32());break;default:t.skipType(7&o)}}return i},fromJSON:o=>({signerInfos:Array.isArray(o?.signerInfos)?o.signerInfos.map((o=>SignerInfo.fromJSON(o))):[],fee:d(o.fee)?Fee.fromJSON(o.fee):void 0,tip:d(o.tip)?Tip.fromJSON(o.tip):void 0}),toJSON(o){const e={};return o.signerInfos?e.signerInfos=o.signerInfos.map((o=>o?SignerInfo.toJSON(o):void 0)):e.signerInfos=[],void 0!==o.fee&&(e.fee=o.fee?Fee.toJSON(o.fee):void 0),void 0!==o.tip&&(e.tip=o.tip?Tip.toJSON(o.tip):void 0),e},fromPartial(o){const e={signerInfos:[],fee:void 0,tip:void 0};return e.signerInfos=o.signerInfos?.map((o=>SignerInfo.fromPartial(o)))||[],e.fee=void 0!==o.fee&&null!==o.fee?Fee.fromPartial(o.fee):void 0,e.tip=void 0!==o.tip&&null!==o.tip?Tip.fromPartial(o.tip):void 0,e},fromProtoMsg:o=>AuthInfo.decode(o.value),toProto:o=>AuthInfo.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.tx.v1beta1.AuthInfo",value:AuthInfo.encode(o).finish()})};function y(){return{publicKey:void 0,modeInfo:void 0,sequence:BigInt(0)}}export const SignerInfo={typeUrl:"/cosmos.tx.v1beta1.SignerInfo",encode:(e,t=a.create())=>(void 0!==e.publicKey&&o.encode(e.publicKey,t.uint32(10).fork()).ldelim(),void 0!==e.modeInfo&&ModeInfo.encode(e.modeInfo,t.uint32(18).fork()).ldelim(),e.sequence!==BigInt(0)&&t.uint32(24).uint64(e.sequence),t),decode(e,t){const n=e instanceof s?e:new s(e);let i=void 0===t?n.len:n.pos+t;const r=y();for(;n.pos<i;){const e=n.uint32();switch(e>>>3){case 1:r.publicKey=o.decode(n,n.uint32());break;case 2:r.modeInfo=ModeInfo.decode(n,n.uint32());break;case 3:r.sequence=n.uint64();break;default:n.skipType(7&e)}}return r},fromJSON:e=>({publicKey:d(e.publicKey)?o.fromJSON(e.publicKey):void 0,modeInfo:d(e.modeInfo)?ModeInfo.fromJSON(e.modeInfo):void 0,sequence:d(e.sequence)?BigInt(e.sequence.toString()):BigInt(0)}),toJSON(e){const t={};return void 0!==e.publicKey&&(t.publicKey=e.publicKey?o.toJSON(e.publicKey):void 0),void 0!==e.modeInfo&&(t.modeInfo=e.modeInfo?ModeInfo.toJSON(e.modeInfo):void 0),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),t},fromPartial(e){const t=y();return t.publicKey=void 0!==e.publicKey&&null!==e.publicKey?o.fromPartial(e.publicKey):void 0,t.modeInfo=void 0!==e.modeInfo&&null!==e.modeInfo?ModeInfo.fromPartial(e.modeInfo):void 0,t.sequence=void 0!==e.sequence&&null!==e.sequence?BigInt(e.sequence.toString()):BigInt(0),t},fromProtoMsg:o=>SignerInfo.decode(o.value),toProto:o=>SignerInfo.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.tx.v1beta1.SignerInfo",value:SignerInfo.encode(o).finish()})};export const ModeInfo={typeUrl:"/cosmos.tx.v1beta1.ModeInfo",encode:(o,e=a.create())=>(void 0!==o.single&&ModeInfo_Single.encode(o.single,e.uint32(10).fork()).ldelim(),void 0!==o.multi&&ModeInfo_Multi.encode(o.multi,e.uint32(18).fork()).ldelim(),e),decode(o,e){const t=o instanceof s?o:new s(o);let n=void 0===e?t.len:t.pos+e;const i={single:void 0,multi:void 0};for(;t.pos<n;){const o=t.uint32();switch(o>>>3){case 1:i.single=ModeInfo_Single.decode(t,t.uint32());break;case 2:i.multi=ModeInfo_Multi.decode(t,t.uint32());break;default:t.skipType(7&o)}}return i},fromJSON:o=>({single:d(o.single)?ModeInfo_Single.fromJSON(o.single):void 0,multi:d(o.multi)?ModeInfo_Multi.fromJSON(o.multi):void 0}),toJSON(o){const e={};return void 0!==o.single&&(e.single=o.single?ModeInfo_Single.toJSON(o.single):void 0),void 0!==o.multi&&(e.multi=o.multi?ModeInfo_Multi.toJSON(o.multi):void 0),e},fromPartial(o){const e={single:void 0,multi:void 0};return e.single=void 0!==o.single&&null!==o.single?ModeInfo_Single.fromPartial(o.single):void 0,e.multi=void 0!==o.multi&&null!==o.multi?ModeInfo_Multi.fromPartial(o.multi):void 0,e},fromProtoMsg:o=>ModeInfo.decode(o.value),toProto:o=>ModeInfo.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.tx.v1beta1.ModeInfo",value:ModeInfo.encode(o).finish()})};export const ModeInfo_Single={typeUrl:"/cosmos.tx.v1beta1.Single",encode:(o,e=a.create())=>(0!==o.mode&&e.uint32(8).int32(o.mode),e),decode(o,e){const t=o instanceof s?o:new s(o);let n=void 0===e?t.len:t.pos+e;const i={mode:0};for(;t.pos<n;){const o=t.uint32();if(o>>>3==1)i.mode=t.int32();else t.skipType(7&o)}return i},fromJSON:o=>({mode:d(o.mode)?t(o.mode):-1}),toJSON(o){const e={};return void 0!==o.mode&&(e.mode=n(o.mode)),e},fromPartial(o){const e={mode:0};return e.mode=o.mode??0,e},fromProtoMsg:o=>ModeInfo_Single.decode(o.value),toProto:o=>ModeInfo_Single.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.tx.v1beta1.Single",value:ModeInfo_Single.encode(o).finish()})};export const ModeInfo_Multi={typeUrl:"/cosmos.tx.v1beta1.Multi",encode(o,e=a.create()){void 0!==o.bitarray&&i.encode(o.bitarray,e.uint32(10).fork()).ldelim();for(const t of o.modeInfos)ModeInfo.encode(t,e.uint32(18).fork()).ldelim();return e},decode(o,e){const t=o instanceof s?o:new s(o);let n=void 0===e?t.len:t.pos+e;const r={bitarray:void 0,modeInfos:[]};for(;t.pos<n;){const o=t.uint32();switch(o>>>3){case 1:r.bitarray=i.decode(t,t.uint32());break;case 2:r.modeInfos.push(ModeInfo.decode(t,t.uint32()));break;default:t.skipType(7&o)}}return r},fromJSON:o=>({bitarray:d(o.bitarray)?i.fromJSON(o.bitarray):void 0,modeInfos:Array.isArray(o?.modeInfos)?o.modeInfos.map((o=>ModeInfo.fromJSON(o))):[]}),toJSON(o){const e={};return void 0!==o.bitarray&&(e.bitarray=o.bitarray?i.toJSON(o.bitarray):void 0),o.modeInfos?e.modeInfos=o.modeInfos.map((o=>o?ModeInfo.toJSON(o):void 0)):e.modeInfos=[],e},fromPartial(o){const e={bitarray:void 0,modeInfos:[]};return e.bitarray=void 0!==o.bitarray&&null!==o.bitarray?i.fromPartial(o.bitarray):void 0,e.modeInfos=o.modeInfos?.map((o=>ModeInfo.fromPartial(o)))||[],e},fromProtoMsg:o=>ModeInfo_Multi.decode(o.value),toProto:o=>ModeInfo_Multi.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.tx.v1beta1.Multi",value:ModeInfo_Multi.encode(o).finish()})};function p(){return{amount:[],gasLimit:BigInt(0),payer:"",granter:""}}export const Fee={typeUrl:"/cosmos.tx.v1beta1.Fee",encode(o,e=a.create()){for(const t of o.amount)r.encode(t,e.uint32(10).fork()).ldelim();return o.gasLimit!==BigInt(0)&&e.uint32(16).uint64(o.gasLimit),""!==o.payer&&e.uint32(26).string(o.payer),""!==o.granter&&e.uint32(34).string(o.granter),e},decode(o,e){const t=o instanceof s?o:new s(o);let n=void 0===e?t.len:t.pos+e;const i=p();for(;t.pos<n;){const o=t.uint32();switch(o>>>3){case 1:i.amount.push(r.decode(t,t.uint32()));break;case 2:i.gasLimit=t.uint64();break;case 3:i.payer=t.string();break;case 4:i.granter=t.string();break;default:t.skipType(7&o)}}return i},fromJSON:o=>({amount:Array.isArray(o?.amount)?o.amount.map((o=>r.fromJSON(o))):[],gasLimit:d(o.gasLimit)?BigInt(o.gasLimit.toString()):BigInt(0),payer:d(o.payer)?String(o.payer):"",granter:d(o.granter)?String(o.granter):""}),toJSON(o){const e={};return o.amount?e.amount=o.amount.map((o=>o?r.toJSON(o):void 0)):e.amount=[],void 0!==o.gasLimit&&(e.gasLimit=(o.gasLimit||BigInt(0)).toString()),void 0!==o.payer&&(e.payer=o.payer),void 0!==o.granter&&(e.granter=o.granter),e},fromPartial(o){const e=p();return e.amount=o.amount?.map((o=>r.fromPartial(o)))||[],e.gasLimit=void 0!==o.gasLimit&&null!==o.gasLimit?BigInt(o.gasLimit.toString()):BigInt(0),e.payer=o.payer??"",e.granter=o.granter??"",e},fromProtoMsg:o=>Fee.decode(o.value),toProto:o=>Fee.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.tx.v1beta1.Fee",value:Fee.encode(o).finish()})};export const Tip={typeUrl:"/cosmos.tx.v1beta1.Tip",encode(o,e=a.create()){for(const t of o.amount)r.encode(t,e.uint32(10).fork()).ldelim();return""!==o.tipper&&e.uint32(18).string(o.tipper),e},decode(o,e){const t=o instanceof s?o:new s(o);let n=void 0===e?t.len:t.pos+e;const i={amount:[],tipper:""};for(;t.pos<n;){const o=t.uint32();switch(o>>>3){case 1:i.amount.push(r.decode(t,t.uint32()));break;case 2:i.tipper=t.string();break;default:t.skipType(7&o)}}return i},fromJSON:o=>({amount:Array.isArray(o?.amount)?o.amount.map((o=>r.fromJSON(o))):[],tipper:d(o.tipper)?String(o.tipper):""}),toJSON(o){const e={};return o.amount?e.amount=o.amount.map((o=>o?r.toJSON(o):void 0)):e.amount=[],void 0!==o.tipper&&(e.tipper=o.tipper),e},fromPartial(o){const e={amount:[],tipper:""};return e.amount=o.amount?.map((o=>r.fromPartial(o)))||[],e.tipper=o.tipper??"",e},fromProtoMsg:o=>Tip.decode(o.value),toProto:o=>Tip.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.tx.v1beta1.Tip",value:Tip.encode(o).finish()})};function b(){return{address:"",signDoc:void 0,mode:0,sig:new Uint8Array}}export const AuxSignerData={typeUrl:"/cosmos.tx.v1beta1.AuxSignerData",encode:(o,e=a.create())=>(""!==o.address&&e.uint32(10).string(o.address),void 0!==o.signDoc&&SignDocDirectAux.encode(o.signDoc,e.uint32(18).fork()).ldelim(),0!==o.mode&&e.uint32(24).int32(o.mode),0!==o.sig.length&&e.uint32(34).bytes(o.sig),e),decode(o,e){const t=o instanceof s?o:new s(o);let n=void 0===e?t.len:t.pos+e;const i=b();for(;t.pos<n;){const o=t.uint32();switch(o>>>3){case 1:i.address=t.string();break;case 2:i.signDoc=SignDocDirectAux.decode(t,t.uint32());break;case 3:i.mode=t.int32();break;case 4:i.sig=t.bytes();break;default:t.skipType(7&o)}}return i},fromJSON:o=>({address:d(o.address)?String(o.address):"",signDoc:d(o.signDoc)?SignDocDirectAux.fromJSON(o.signDoc):void 0,mode:d(o.mode)?t(o.mode):-1,sig:d(o.sig)?c(o.sig):new Uint8Array}),toJSON(o){const e={};return void 0!==o.address&&(e.address=o.address),void 0!==o.signDoc&&(e.signDoc=o.signDoc?SignDocDirectAux.toJSON(o.signDoc):void 0),void 0!==o.mode&&(e.mode=n(o.mode)),void 0!==o.sig&&(e.sig=u(void 0!==o.sig?o.sig:new Uint8Array)),e},fromPartial(o){const e=b();return e.address=o.address??"",e.signDoc=void 0!==o.signDoc&&null!==o.signDoc?SignDocDirectAux.fromPartial(o.signDoc):void 0,e.mode=o.mode??0,e.sig=o.sig??new Uint8Array,e},fromProtoMsg:o=>AuxSignerData.decode(o.value),toProto:o=>AuxSignerData.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/cosmos.tx.v1beta1.AuxSignerData",value:AuxSignerData.encode(o).finish()})};
|