@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,1012 +1 @@
|
|
|
1
|
-
//@ts-nocheck
|
|
2
|
-
import { Any } from '../../../../google/protobuf/any.js';
|
|
3
|
-
import { Event } from '../../../../tendermint/abci/types.js';
|
|
4
|
-
import { BinaryReader, BinaryWriter } from '../../../../binary.js';
|
|
5
|
-
import { isSet, bytesFromBase64, base64FromBytes, } from '../../../../helpers.js';
|
|
6
|
-
import {} from '../../../../json-safe.js';
|
|
7
|
-
function createBaseTxResponse() {
|
|
8
|
-
return {
|
|
9
|
-
height: BigInt(0),
|
|
10
|
-
txhash: '',
|
|
11
|
-
codespace: '',
|
|
12
|
-
code: 0,
|
|
13
|
-
data: '',
|
|
14
|
-
rawLog: '',
|
|
15
|
-
logs: [],
|
|
16
|
-
info: '',
|
|
17
|
-
gasWanted: BigInt(0),
|
|
18
|
-
gasUsed: BigInt(0),
|
|
19
|
-
tx: undefined,
|
|
20
|
-
timestamp: '',
|
|
21
|
-
events: [],
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export const TxResponse = {
|
|
25
|
-
typeUrl: '/cosmos.base.abci.v1beta1.TxResponse',
|
|
26
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
27
|
-
if (message.height !== BigInt(0)) {
|
|
28
|
-
writer.uint32(8).int64(message.height);
|
|
29
|
-
}
|
|
30
|
-
if (message.txhash !== '') {
|
|
31
|
-
writer.uint32(18).string(message.txhash);
|
|
32
|
-
}
|
|
33
|
-
if (message.codespace !== '') {
|
|
34
|
-
writer.uint32(26).string(message.codespace);
|
|
35
|
-
}
|
|
36
|
-
if (message.code !== 0) {
|
|
37
|
-
writer.uint32(32).uint32(message.code);
|
|
38
|
-
}
|
|
39
|
-
if (message.data !== '') {
|
|
40
|
-
writer.uint32(42).string(message.data);
|
|
41
|
-
}
|
|
42
|
-
if (message.rawLog !== '') {
|
|
43
|
-
writer.uint32(50).string(message.rawLog);
|
|
44
|
-
}
|
|
45
|
-
for (const v of message.logs) {
|
|
46
|
-
ABCIMessageLog.encode(v, writer.uint32(58).fork()).ldelim();
|
|
47
|
-
}
|
|
48
|
-
if (message.info !== '') {
|
|
49
|
-
writer.uint32(66).string(message.info);
|
|
50
|
-
}
|
|
51
|
-
if (message.gasWanted !== BigInt(0)) {
|
|
52
|
-
writer.uint32(72).int64(message.gasWanted);
|
|
53
|
-
}
|
|
54
|
-
if (message.gasUsed !== BigInt(0)) {
|
|
55
|
-
writer.uint32(80).int64(message.gasUsed);
|
|
56
|
-
}
|
|
57
|
-
if (message.tx !== undefined) {
|
|
58
|
-
Any.encode(message.tx, writer.uint32(90).fork()).ldelim();
|
|
59
|
-
}
|
|
60
|
-
if (message.timestamp !== '') {
|
|
61
|
-
writer.uint32(98).string(message.timestamp);
|
|
62
|
-
}
|
|
63
|
-
for (const v of message.events) {
|
|
64
|
-
Event.encode(v, writer.uint32(106).fork()).ldelim();
|
|
65
|
-
}
|
|
66
|
-
return writer;
|
|
67
|
-
},
|
|
68
|
-
decode(input, length) {
|
|
69
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
70
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
71
|
-
const message = createBaseTxResponse();
|
|
72
|
-
while (reader.pos < end) {
|
|
73
|
-
const tag = reader.uint32();
|
|
74
|
-
switch (tag >>> 3) {
|
|
75
|
-
case 1:
|
|
76
|
-
message.height = reader.int64();
|
|
77
|
-
break;
|
|
78
|
-
case 2:
|
|
79
|
-
message.txhash = reader.string();
|
|
80
|
-
break;
|
|
81
|
-
case 3:
|
|
82
|
-
message.codespace = reader.string();
|
|
83
|
-
break;
|
|
84
|
-
case 4:
|
|
85
|
-
message.code = reader.uint32();
|
|
86
|
-
break;
|
|
87
|
-
case 5:
|
|
88
|
-
message.data = reader.string();
|
|
89
|
-
break;
|
|
90
|
-
case 6:
|
|
91
|
-
message.rawLog = reader.string();
|
|
92
|
-
break;
|
|
93
|
-
case 7:
|
|
94
|
-
message.logs.push(ABCIMessageLog.decode(reader, reader.uint32()));
|
|
95
|
-
break;
|
|
96
|
-
case 8:
|
|
97
|
-
message.info = reader.string();
|
|
98
|
-
break;
|
|
99
|
-
case 9:
|
|
100
|
-
message.gasWanted = reader.int64();
|
|
101
|
-
break;
|
|
102
|
-
case 10:
|
|
103
|
-
message.gasUsed = reader.int64();
|
|
104
|
-
break;
|
|
105
|
-
case 11:
|
|
106
|
-
message.tx = Any.decode(reader, reader.uint32());
|
|
107
|
-
break;
|
|
108
|
-
case 12:
|
|
109
|
-
message.timestamp = reader.string();
|
|
110
|
-
break;
|
|
111
|
-
case 13:
|
|
112
|
-
message.events.push(Event.decode(reader, reader.uint32()));
|
|
113
|
-
break;
|
|
114
|
-
default:
|
|
115
|
-
reader.skipType(tag & 7);
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return message;
|
|
120
|
-
},
|
|
121
|
-
fromJSON(object) {
|
|
122
|
-
return {
|
|
123
|
-
height: isSet(object.height)
|
|
124
|
-
? BigInt(object.height.toString())
|
|
125
|
-
: BigInt(0),
|
|
126
|
-
txhash: isSet(object.txhash) ? String(object.txhash) : '',
|
|
127
|
-
codespace: isSet(object.codespace) ? String(object.codespace) : '',
|
|
128
|
-
code: isSet(object.code) ? Number(object.code) : 0,
|
|
129
|
-
data: isSet(object.data) ? String(object.data) : '',
|
|
130
|
-
rawLog: isSet(object.rawLog) ? String(object.rawLog) : '',
|
|
131
|
-
logs: Array.isArray(object?.logs)
|
|
132
|
-
? object.logs.map((e) => ABCIMessageLog.fromJSON(e))
|
|
133
|
-
: [],
|
|
134
|
-
info: isSet(object.info) ? String(object.info) : '',
|
|
135
|
-
gasWanted: isSet(object.gasWanted)
|
|
136
|
-
? BigInt(object.gasWanted.toString())
|
|
137
|
-
: BigInt(0),
|
|
138
|
-
gasUsed: isSet(object.gasUsed)
|
|
139
|
-
? BigInt(object.gasUsed.toString())
|
|
140
|
-
: BigInt(0),
|
|
141
|
-
tx: isSet(object.tx) ? Any.fromJSON(object.tx) : undefined,
|
|
142
|
-
timestamp: isSet(object.timestamp) ? String(object.timestamp) : '',
|
|
143
|
-
events: Array.isArray(object?.events)
|
|
144
|
-
? object.events.map((e) => Event.fromJSON(e))
|
|
145
|
-
: [],
|
|
146
|
-
};
|
|
147
|
-
},
|
|
148
|
-
toJSON(message) {
|
|
149
|
-
const obj = {};
|
|
150
|
-
message.height !== undefined &&
|
|
151
|
-
(obj.height = (message.height || BigInt(0)).toString());
|
|
152
|
-
message.txhash !== undefined && (obj.txhash = message.txhash);
|
|
153
|
-
message.codespace !== undefined && (obj.codespace = message.codespace);
|
|
154
|
-
message.code !== undefined && (obj.code = Math.round(message.code));
|
|
155
|
-
message.data !== undefined && (obj.data = message.data);
|
|
156
|
-
message.rawLog !== undefined && (obj.rawLog = message.rawLog);
|
|
157
|
-
if (message.logs) {
|
|
158
|
-
obj.logs = message.logs.map(e => e ? ABCIMessageLog.toJSON(e) : undefined);
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
obj.logs = [];
|
|
162
|
-
}
|
|
163
|
-
message.info !== undefined && (obj.info = message.info);
|
|
164
|
-
message.gasWanted !== undefined &&
|
|
165
|
-
(obj.gasWanted = (message.gasWanted || BigInt(0)).toString());
|
|
166
|
-
message.gasUsed !== undefined &&
|
|
167
|
-
(obj.gasUsed = (message.gasUsed || BigInt(0)).toString());
|
|
168
|
-
message.tx !== undefined &&
|
|
169
|
-
(obj.tx = message.tx ? Any.toJSON(message.tx) : undefined);
|
|
170
|
-
message.timestamp !== undefined && (obj.timestamp = message.timestamp);
|
|
171
|
-
if (message.events) {
|
|
172
|
-
obj.events = message.events.map(e => (e ? Event.toJSON(e) : undefined));
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
obj.events = [];
|
|
176
|
-
}
|
|
177
|
-
return obj;
|
|
178
|
-
},
|
|
179
|
-
fromPartial(object) {
|
|
180
|
-
const message = createBaseTxResponse();
|
|
181
|
-
message.height =
|
|
182
|
-
object.height !== undefined && object.height !== null
|
|
183
|
-
? BigInt(object.height.toString())
|
|
184
|
-
: BigInt(0);
|
|
185
|
-
message.txhash = object.txhash ?? '';
|
|
186
|
-
message.codespace = object.codespace ?? '';
|
|
187
|
-
message.code = object.code ?? 0;
|
|
188
|
-
message.data = object.data ?? '';
|
|
189
|
-
message.rawLog = object.rawLog ?? '';
|
|
190
|
-
message.logs = object.logs?.map(e => ABCIMessageLog.fromPartial(e)) || [];
|
|
191
|
-
message.info = object.info ?? '';
|
|
192
|
-
message.gasWanted =
|
|
193
|
-
object.gasWanted !== undefined && object.gasWanted !== null
|
|
194
|
-
? BigInt(object.gasWanted.toString())
|
|
195
|
-
: BigInt(0);
|
|
196
|
-
message.gasUsed =
|
|
197
|
-
object.gasUsed !== undefined && object.gasUsed !== null
|
|
198
|
-
? BigInt(object.gasUsed.toString())
|
|
199
|
-
: BigInt(0);
|
|
200
|
-
message.tx =
|
|
201
|
-
object.tx !== undefined && object.tx !== null
|
|
202
|
-
? Any.fromPartial(object.tx)
|
|
203
|
-
: undefined;
|
|
204
|
-
message.timestamp = object.timestamp ?? '';
|
|
205
|
-
message.events = object.events?.map(e => Event.fromPartial(e)) || [];
|
|
206
|
-
return message;
|
|
207
|
-
},
|
|
208
|
-
fromProtoMsg(message) {
|
|
209
|
-
return TxResponse.decode(message.value);
|
|
210
|
-
},
|
|
211
|
-
toProto(message) {
|
|
212
|
-
return TxResponse.encode(message).finish();
|
|
213
|
-
},
|
|
214
|
-
toProtoMsg(message) {
|
|
215
|
-
return {
|
|
216
|
-
typeUrl: '/cosmos.base.abci.v1beta1.TxResponse',
|
|
217
|
-
value: TxResponse.encode(message).finish(),
|
|
218
|
-
};
|
|
219
|
-
},
|
|
220
|
-
};
|
|
221
|
-
function createBaseABCIMessageLog() {
|
|
222
|
-
return {
|
|
223
|
-
msgIndex: 0,
|
|
224
|
-
log: '',
|
|
225
|
-
events: [],
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
export const ABCIMessageLog = {
|
|
229
|
-
typeUrl: '/cosmos.base.abci.v1beta1.ABCIMessageLog',
|
|
230
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
231
|
-
if (message.msgIndex !== 0) {
|
|
232
|
-
writer.uint32(8).uint32(message.msgIndex);
|
|
233
|
-
}
|
|
234
|
-
if (message.log !== '') {
|
|
235
|
-
writer.uint32(18).string(message.log);
|
|
236
|
-
}
|
|
237
|
-
for (const v of message.events) {
|
|
238
|
-
StringEvent.encode(v, writer.uint32(26).fork()).ldelim();
|
|
239
|
-
}
|
|
240
|
-
return writer;
|
|
241
|
-
},
|
|
242
|
-
decode(input, length) {
|
|
243
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
244
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
245
|
-
const message = createBaseABCIMessageLog();
|
|
246
|
-
while (reader.pos < end) {
|
|
247
|
-
const tag = reader.uint32();
|
|
248
|
-
switch (tag >>> 3) {
|
|
249
|
-
case 1:
|
|
250
|
-
message.msgIndex = reader.uint32();
|
|
251
|
-
break;
|
|
252
|
-
case 2:
|
|
253
|
-
message.log = reader.string();
|
|
254
|
-
break;
|
|
255
|
-
case 3:
|
|
256
|
-
message.events.push(StringEvent.decode(reader, reader.uint32()));
|
|
257
|
-
break;
|
|
258
|
-
default:
|
|
259
|
-
reader.skipType(tag & 7);
|
|
260
|
-
break;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
return message;
|
|
264
|
-
},
|
|
265
|
-
fromJSON(object) {
|
|
266
|
-
return {
|
|
267
|
-
msgIndex: isSet(object.msgIndex) ? Number(object.msgIndex) : 0,
|
|
268
|
-
log: isSet(object.log) ? String(object.log) : '',
|
|
269
|
-
events: Array.isArray(object?.events)
|
|
270
|
-
? object.events.map((e) => StringEvent.fromJSON(e))
|
|
271
|
-
: [],
|
|
272
|
-
};
|
|
273
|
-
},
|
|
274
|
-
toJSON(message) {
|
|
275
|
-
const obj = {};
|
|
276
|
-
message.msgIndex !== undefined &&
|
|
277
|
-
(obj.msgIndex = Math.round(message.msgIndex));
|
|
278
|
-
message.log !== undefined && (obj.log = message.log);
|
|
279
|
-
if (message.events) {
|
|
280
|
-
obj.events = message.events.map(e => e ? StringEvent.toJSON(e) : undefined);
|
|
281
|
-
}
|
|
282
|
-
else {
|
|
283
|
-
obj.events = [];
|
|
284
|
-
}
|
|
285
|
-
return obj;
|
|
286
|
-
},
|
|
287
|
-
fromPartial(object) {
|
|
288
|
-
const message = createBaseABCIMessageLog();
|
|
289
|
-
message.msgIndex = object.msgIndex ?? 0;
|
|
290
|
-
message.log = object.log ?? '';
|
|
291
|
-
message.events = object.events?.map(e => StringEvent.fromPartial(e)) || [];
|
|
292
|
-
return message;
|
|
293
|
-
},
|
|
294
|
-
fromProtoMsg(message) {
|
|
295
|
-
return ABCIMessageLog.decode(message.value);
|
|
296
|
-
},
|
|
297
|
-
toProto(message) {
|
|
298
|
-
return ABCIMessageLog.encode(message).finish();
|
|
299
|
-
},
|
|
300
|
-
toProtoMsg(message) {
|
|
301
|
-
return {
|
|
302
|
-
typeUrl: '/cosmos.base.abci.v1beta1.ABCIMessageLog',
|
|
303
|
-
value: ABCIMessageLog.encode(message).finish(),
|
|
304
|
-
};
|
|
305
|
-
},
|
|
306
|
-
};
|
|
307
|
-
function createBaseStringEvent() {
|
|
308
|
-
return {
|
|
309
|
-
type: '',
|
|
310
|
-
attributes: [],
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
export const StringEvent = {
|
|
314
|
-
typeUrl: '/cosmos.base.abci.v1beta1.StringEvent',
|
|
315
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
316
|
-
if (message.type !== '') {
|
|
317
|
-
writer.uint32(10).string(message.type);
|
|
318
|
-
}
|
|
319
|
-
for (const v of message.attributes) {
|
|
320
|
-
Attribute.encode(v, writer.uint32(18).fork()).ldelim();
|
|
321
|
-
}
|
|
322
|
-
return writer;
|
|
323
|
-
},
|
|
324
|
-
decode(input, length) {
|
|
325
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
326
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
327
|
-
const message = createBaseStringEvent();
|
|
328
|
-
while (reader.pos < end) {
|
|
329
|
-
const tag = reader.uint32();
|
|
330
|
-
switch (tag >>> 3) {
|
|
331
|
-
case 1:
|
|
332
|
-
message.type = reader.string();
|
|
333
|
-
break;
|
|
334
|
-
case 2:
|
|
335
|
-
message.attributes.push(Attribute.decode(reader, reader.uint32()));
|
|
336
|
-
break;
|
|
337
|
-
default:
|
|
338
|
-
reader.skipType(tag & 7);
|
|
339
|
-
break;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
return message;
|
|
343
|
-
},
|
|
344
|
-
fromJSON(object) {
|
|
345
|
-
return {
|
|
346
|
-
type: isSet(object.type) ? String(object.type) : '',
|
|
347
|
-
attributes: Array.isArray(object?.attributes)
|
|
348
|
-
? object.attributes.map((e) => Attribute.fromJSON(e))
|
|
349
|
-
: [],
|
|
350
|
-
};
|
|
351
|
-
},
|
|
352
|
-
toJSON(message) {
|
|
353
|
-
const obj = {};
|
|
354
|
-
message.type !== undefined && (obj.type = message.type);
|
|
355
|
-
if (message.attributes) {
|
|
356
|
-
obj.attributes = message.attributes.map(e => e ? Attribute.toJSON(e) : undefined);
|
|
357
|
-
}
|
|
358
|
-
else {
|
|
359
|
-
obj.attributes = [];
|
|
360
|
-
}
|
|
361
|
-
return obj;
|
|
362
|
-
},
|
|
363
|
-
fromPartial(object) {
|
|
364
|
-
const message = createBaseStringEvent();
|
|
365
|
-
message.type = object.type ?? '';
|
|
366
|
-
message.attributes =
|
|
367
|
-
object.attributes?.map(e => Attribute.fromPartial(e)) || [];
|
|
368
|
-
return message;
|
|
369
|
-
},
|
|
370
|
-
fromProtoMsg(message) {
|
|
371
|
-
return StringEvent.decode(message.value);
|
|
372
|
-
},
|
|
373
|
-
toProto(message) {
|
|
374
|
-
return StringEvent.encode(message).finish();
|
|
375
|
-
},
|
|
376
|
-
toProtoMsg(message) {
|
|
377
|
-
return {
|
|
378
|
-
typeUrl: '/cosmos.base.abci.v1beta1.StringEvent',
|
|
379
|
-
value: StringEvent.encode(message).finish(),
|
|
380
|
-
};
|
|
381
|
-
},
|
|
382
|
-
};
|
|
383
|
-
function createBaseAttribute() {
|
|
384
|
-
return {
|
|
385
|
-
key: '',
|
|
386
|
-
value: '',
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
export const Attribute = {
|
|
390
|
-
typeUrl: '/cosmos.base.abci.v1beta1.Attribute',
|
|
391
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
392
|
-
if (message.key !== '') {
|
|
393
|
-
writer.uint32(10).string(message.key);
|
|
394
|
-
}
|
|
395
|
-
if (message.value !== '') {
|
|
396
|
-
writer.uint32(18).string(message.value);
|
|
397
|
-
}
|
|
398
|
-
return writer;
|
|
399
|
-
},
|
|
400
|
-
decode(input, length) {
|
|
401
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
402
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
403
|
-
const message = createBaseAttribute();
|
|
404
|
-
while (reader.pos < end) {
|
|
405
|
-
const tag = reader.uint32();
|
|
406
|
-
switch (tag >>> 3) {
|
|
407
|
-
case 1:
|
|
408
|
-
message.key = reader.string();
|
|
409
|
-
break;
|
|
410
|
-
case 2:
|
|
411
|
-
message.value = reader.string();
|
|
412
|
-
break;
|
|
413
|
-
default:
|
|
414
|
-
reader.skipType(tag & 7);
|
|
415
|
-
break;
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
return message;
|
|
419
|
-
},
|
|
420
|
-
fromJSON(object) {
|
|
421
|
-
return {
|
|
422
|
-
key: isSet(object.key) ? String(object.key) : '',
|
|
423
|
-
value: isSet(object.value) ? String(object.value) : '',
|
|
424
|
-
};
|
|
425
|
-
},
|
|
426
|
-
toJSON(message) {
|
|
427
|
-
const obj = {};
|
|
428
|
-
message.key !== undefined && (obj.key = message.key);
|
|
429
|
-
message.value !== undefined && (obj.value = message.value);
|
|
430
|
-
return obj;
|
|
431
|
-
},
|
|
432
|
-
fromPartial(object) {
|
|
433
|
-
const message = createBaseAttribute();
|
|
434
|
-
message.key = object.key ?? '';
|
|
435
|
-
message.value = object.value ?? '';
|
|
436
|
-
return message;
|
|
437
|
-
},
|
|
438
|
-
fromProtoMsg(message) {
|
|
439
|
-
return Attribute.decode(message.value);
|
|
440
|
-
},
|
|
441
|
-
toProto(message) {
|
|
442
|
-
return Attribute.encode(message).finish();
|
|
443
|
-
},
|
|
444
|
-
toProtoMsg(message) {
|
|
445
|
-
return {
|
|
446
|
-
typeUrl: '/cosmos.base.abci.v1beta1.Attribute',
|
|
447
|
-
value: Attribute.encode(message).finish(),
|
|
448
|
-
};
|
|
449
|
-
},
|
|
450
|
-
};
|
|
451
|
-
function createBaseGasInfo() {
|
|
452
|
-
return {
|
|
453
|
-
gasWanted: BigInt(0),
|
|
454
|
-
gasUsed: BigInt(0),
|
|
455
|
-
};
|
|
456
|
-
}
|
|
457
|
-
export const GasInfo = {
|
|
458
|
-
typeUrl: '/cosmos.base.abci.v1beta1.GasInfo',
|
|
459
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
460
|
-
if (message.gasWanted !== BigInt(0)) {
|
|
461
|
-
writer.uint32(8).uint64(message.gasWanted);
|
|
462
|
-
}
|
|
463
|
-
if (message.gasUsed !== BigInt(0)) {
|
|
464
|
-
writer.uint32(16).uint64(message.gasUsed);
|
|
465
|
-
}
|
|
466
|
-
return writer;
|
|
467
|
-
},
|
|
468
|
-
decode(input, length) {
|
|
469
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
470
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
471
|
-
const message = createBaseGasInfo();
|
|
472
|
-
while (reader.pos < end) {
|
|
473
|
-
const tag = reader.uint32();
|
|
474
|
-
switch (tag >>> 3) {
|
|
475
|
-
case 1:
|
|
476
|
-
message.gasWanted = reader.uint64();
|
|
477
|
-
break;
|
|
478
|
-
case 2:
|
|
479
|
-
message.gasUsed = reader.uint64();
|
|
480
|
-
break;
|
|
481
|
-
default:
|
|
482
|
-
reader.skipType(tag & 7);
|
|
483
|
-
break;
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
return message;
|
|
487
|
-
},
|
|
488
|
-
fromJSON(object) {
|
|
489
|
-
return {
|
|
490
|
-
gasWanted: isSet(object.gasWanted)
|
|
491
|
-
? BigInt(object.gasWanted.toString())
|
|
492
|
-
: BigInt(0),
|
|
493
|
-
gasUsed: isSet(object.gasUsed)
|
|
494
|
-
? BigInt(object.gasUsed.toString())
|
|
495
|
-
: BigInt(0),
|
|
496
|
-
};
|
|
497
|
-
},
|
|
498
|
-
toJSON(message) {
|
|
499
|
-
const obj = {};
|
|
500
|
-
message.gasWanted !== undefined &&
|
|
501
|
-
(obj.gasWanted = (message.gasWanted || BigInt(0)).toString());
|
|
502
|
-
message.gasUsed !== undefined &&
|
|
503
|
-
(obj.gasUsed = (message.gasUsed || BigInt(0)).toString());
|
|
504
|
-
return obj;
|
|
505
|
-
},
|
|
506
|
-
fromPartial(object) {
|
|
507
|
-
const message = createBaseGasInfo();
|
|
508
|
-
message.gasWanted =
|
|
509
|
-
object.gasWanted !== undefined && object.gasWanted !== null
|
|
510
|
-
? BigInt(object.gasWanted.toString())
|
|
511
|
-
: BigInt(0);
|
|
512
|
-
message.gasUsed =
|
|
513
|
-
object.gasUsed !== undefined && object.gasUsed !== null
|
|
514
|
-
? BigInt(object.gasUsed.toString())
|
|
515
|
-
: BigInt(0);
|
|
516
|
-
return message;
|
|
517
|
-
},
|
|
518
|
-
fromProtoMsg(message) {
|
|
519
|
-
return GasInfo.decode(message.value);
|
|
520
|
-
},
|
|
521
|
-
toProto(message) {
|
|
522
|
-
return GasInfo.encode(message).finish();
|
|
523
|
-
},
|
|
524
|
-
toProtoMsg(message) {
|
|
525
|
-
return {
|
|
526
|
-
typeUrl: '/cosmos.base.abci.v1beta1.GasInfo',
|
|
527
|
-
value: GasInfo.encode(message).finish(),
|
|
528
|
-
};
|
|
529
|
-
},
|
|
530
|
-
};
|
|
531
|
-
function createBaseResult() {
|
|
532
|
-
return {
|
|
533
|
-
data: new Uint8Array(),
|
|
534
|
-
log: '',
|
|
535
|
-
events: [],
|
|
536
|
-
msgResponses: [],
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
export const Result = {
|
|
540
|
-
typeUrl: '/cosmos.base.abci.v1beta1.Result',
|
|
541
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
542
|
-
if (message.data.length !== 0) {
|
|
543
|
-
writer.uint32(10).bytes(message.data);
|
|
544
|
-
}
|
|
545
|
-
if (message.log !== '') {
|
|
546
|
-
writer.uint32(18).string(message.log);
|
|
547
|
-
}
|
|
548
|
-
for (const v of message.events) {
|
|
549
|
-
Event.encode(v, writer.uint32(26).fork()).ldelim();
|
|
550
|
-
}
|
|
551
|
-
for (const v of message.msgResponses) {
|
|
552
|
-
Any.encode(v, writer.uint32(34).fork()).ldelim();
|
|
553
|
-
}
|
|
554
|
-
return writer;
|
|
555
|
-
},
|
|
556
|
-
decode(input, length) {
|
|
557
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
558
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
559
|
-
const message = createBaseResult();
|
|
560
|
-
while (reader.pos < end) {
|
|
561
|
-
const tag = reader.uint32();
|
|
562
|
-
switch (tag >>> 3) {
|
|
563
|
-
case 1:
|
|
564
|
-
message.data = reader.bytes();
|
|
565
|
-
break;
|
|
566
|
-
case 2:
|
|
567
|
-
message.log = reader.string();
|
|
568
|
-
break;
|
|
569
|
-
case 3:
|
|
570
|
-
message.events.push(Event.decode(reader, reader.uint32()));
|
|
571
|
-
break;
|
|
572
|
-
case 4:
|
|
573
|
-
message.msgResponses.push(Any.decode(reader, reader.uint32()));
|
|
574
|
-
break;
|
|
575
|
-
default:
|
|
576
|
-
reader.skipType(tag & 7);
|
|
577
|
-
break;
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
return message;
|
|
581
|
-
},
|
|
582
|
-
fromJSON(object) {
|
|
583
|
-
return {
|
|
584
|
-
data: isSet(object.data)
|
|
585
|
-
? bytesFromBase64(object.data)
|
|
586
|
-
: new Uint8Array(),
|
|
587
|
-
log: isSet(object.log) ? String(object.log) : '',
|
|
588
|
-
events: Array.isArray(object?.events)
|
|
589
|
-
? object.events.map((e) => Event.fromJSON(e))
|
|
590
|
-
: [],
|
|
591
|
-
msgResponses: Array.isArray(object?.msgResponses)
|
|
592
|
-
? object.msgResponses.map((e) => Any.fromJSON(e))
|
|
593
|
-
: [],
|
|
594
|
-
};
|
|
595
|
-
},
|
|
596
|
-
toJSON(message) {
|
|
597
|
-
const obj = {};
|
|
598
|
-
message.data !== undefined &&
|
|
599
|
-
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
|
600
|
-
message.log !== undefined && (obj.log = message.log);
|
|
601
|
-
if (message.events) {
|
|
602
|
-
obj.events = message.events.map(e => (e ? Event.toJSON(e) : undefined));
|
|
603
|
-
}
|
|
604
|
-
else {
|
|
605
|
-
obj.events = [];
|
|
606
|
-
}
|
|
607
|
-
if (message.msgResponses) {
|
|
608
|
-
obj.msgResponses = message.msgResponses.map(e => e ? Any.toJSON(e) : undefined);
|
|
609
|
-
}
|
|
610
|
-
else {
|
|
611
|
-
obj.msgResponses = [];
|
|
612
|
-
}
|
|
613
|
-
return obj;
|
|
614
|
-
},
|
|
615
|
-
fromPartial(object) {
|
|
616
|
-
const message = createBaseResult();
|
|
617
|
-
message.data = object.data ?? new Uint8Array();
|
|
618
|
-
message.log = object.log ?? '';
|
|
619
|
-
message.events = object.events?.map(e => Event.fromPartial(e)) || [];
|
|
620
|
-
message.msgResponses =
|
|
621
|
-
object.msgResponses?.map(e => Any.fromPartial(e)) || [];
|
|
622
|
-
return message;
|
|
623
|
-
},
|
|
624
|
-
fromProtoMsg(message) {
|
|
625
|
-
return Result.decode(message.value);
|
|
626
|
-
},
|
|
627
|
-
toProto(message) {
|
|
628
|
-
return Result.encode(message).finish();
|
|
629
|
-
},
|
|
630
|
-
toProtoMsg(message) {
|
|
631
|
-
return {
|
|
632
|
-
typeUrl: '/cosmos.base.abci.v1beta1.Result',
|
|
633
|
-
value: Result.encode(message).finish(),
|
|
634
|
-
};
|
|
635
|
-
},
|
|
636
|
-
};
|
|
637
|
-
function createBaseSimulationResponse() {
|
|
638
|
-
return {
|
|
639
|
-
gasInfo: GasInfo.fromPartial({}),
|
|
640
|
-
result: undefined,
|
|
641
|
-
};
|
|
642
|
-
}
|
|
643
|
-
export const SimulationResponse = {
|
|
644
|
-
typeUrl: '/cosmos.base.abci.v1beta1.SimulationResponse',
|
|
645
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
646
|
-
if (message.gasInfo !== undefined) {
|
|
647
|
-
GasInfo.encode(message.gasInfo, writer.uint32(10).fork()).ldelim();
|
|
648
|
-
}
|
|
649
|
-
if (message.result !== undefined) {
|
|
650
|
-
Result.encode(message.result, writer.uint32(18).fork()).ldelim();
|
|
651
|
-
}
|
|
652
|
-
return writer;
|
|
653
|
-
},
|
|
654
|
-
decode(input, length) {
|
|
655
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
656
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
657
|
-
const message = createBaseSimulationResponse();
|
|
658
|
-
while (reader.pos < end) {
|
|
659
|
-
const tag = reader.uint32();
|
|
660
|
-
switch (tag >>> 3) {
|
|
661
|
-
case 1:
|
|
662
|
-
message.gasInfo = GasInfo.decode(reader, reader.uint32());
|
|
663
|
-
break;
|
|
664
|
-
case 2:
|
|
665
|
-
message.result = Result.decode(reader, reader.uint32());
|
|
666
|
-
break;
|
|
667
|
-
default:
|
|
668
|
-
reader.skipType(tag & 7);
|
|
669
|
-
break;
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
return message;
|
|
673
|
-
},
|
|
674
|
-
fromJSON(object) {
|
|
675
|
-
return {
|
|
676
|
-
gasInfo: isSet(object.gasInfo)
|
|
677
|
-
? GasInfo.fromJSON(object.gasInfo)
|
|
678
|
-
: undefined,
|
|
679
|
-
result: isSet(object.result) ? Result.fromJSON(object.result) : undefined,
|
|
680
|
-
};
|
|
681
|
-
},
|
|
682
|
-
toJSON(message) {
|
|
683
|
-
const obj = {};
|
|
684
|
-
message.gasInfo !== undefined &&
|
|
685
|
-
(obj.gasInfo = message.gasInfo
|
|
686
|
-
? GasInfo.toJSON(message.gasInfo)
|
|
687
|
-
: undefined);
|
|
688
|
-
message.result !== undefined &&
|
|
689
|
-
(obj.result = message.result ? Result.toJSON(message.result) : undefined);
|
|
690
|
-
return obj;
|
|
691
|
-
},
|
|
692
|
-
fromPartial(object) {
|
|
693
|
-
const message = createBaseSimulationResponse();
|
|
694
|
-
message.gasInfo =
|
|
695
|
-
object.gasInfo !== undefined && object.gasInfo !== null
|
|
696
|
-
? GasInfo.fromPartial(object.gasInfo)
|
|
697
|
-
: undefined;
|
|
698
|
-
message.result =
|
|
699
|
-
object.result !== undefined && object.result !== null
|
|
700
|
-
? Result.fromPartial(object.result)
|
|
701
|
-
: undefined;
|
|
702
|
-
return message;
|
|
703
|
-
},
|
|
704
|
-
fromProtoMsg(message) {
|
|
705
|
-
return SimulationResponse.decode(message.value);
|
|
706
|
-
},
|
|
707
|
-
toProto(message) {
|
|
708
|
-
return SimulationResponse.encode(message).finish();
|
|
709
|
-
},
|
|
710
|
-
toProtoMsg(message) {
|
|
711
|
-
return {
|
|
712
|
-
typeUrl: '/cosmos.base.abci.v1beta1.SimulationResponse',
|
|
713
|
-
value: SimulationResponse.encode(message).finish(),
|
|
714
|
-
};
|
|
715
|
-
},
|
|
716
|
-
};
|
|
717
|
-
function createBaseMsgData() {
|
|
718
|
-
return {
|
|
719
|
-
msgType: '',
|
|
720
|
-
data: new Uint8Array(),
|
|
721
|
-
};
|
|
722
|
-
}
|
|
723
|
-
export const MsgData = {
|
|
724
|
-
typeUrl: '/cosmos.base.abci.v1beta1.MsgData',
|
|
725
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
726
|
-
if (message.msgType !== '') {
|
|
727
|
-
writer.uint32(10).string(message.msgType);
|
|
728
|
-
}
|
|
729
|
-
if (message.data.length !== 0) {
|
|
730
|
-
writer.uint32(18).bytes(message.data);
|
|
731
|
-
}
|
|
732
|
-
return writer;
|
|
733
|
-
},
|
|
734
|
-
decode(input, length) {
|
|
735
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
736
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
737
|
-
const message = createBaseMsgData();
|
|
738
|
-
while (reader.pos < end) {
|
|
739
|
-
const tag = reader.uint32();
|
|
740
|
-
switch (tag >>> 3) {
|
|
741
|
-
case 1:
|
|
742
|
-
message.msgType = reader.string();
|
|
743
|
-
break;
|
|
744
|
-
case 2:
|
|
745
|
-
message.data = reader.bytes();
|
|
746
|
-
break;
|
|
747
|
-
default:
|
|
748
|
-
reader.skipType(tag & 7);
|
|
749
|
-
break;
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
return message;
|
|
753
|
-
},
|
|
754
|
-
fromJSON(object) {
|
|
755
|
-
return {
|
|
756
|
-
msgType: isSet(object.msgType) ? String(object.msgType) : '',
|
|
757
|
-
data: isSet(object.data)
|
|
758
|
-
? bytesFromBase64(object.data)
|
|
759
|
-
: new Uint8Array(),
|
|
760
|
-
};
|
|
761
|
-
},
|
|
762
|
-
toJSON(message) {
|
|
763
|
-
const obj = {};
|
|
764
|
-
message.msgType !== undefined && (obj.msgType = message.msgType);
|
|
765
|
-
message.data !== undefined &&
|
|
766
|
-
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
|
767
|
-
return obj;
|
|
768
|
-
},
|
|
769
|
-
fromPartial(object) {
|
|
770
|
-
const message = createBaseMsgData();
|
|
771
|
-
message.msgType = object.msgType ?? '';
|
|
772
|
-
message.data = object.data ?? new Uint8Array();
|
|
773
|
-
return message;
|
|
774
|
-
},
|
|
775
|
-
fromProtoMsg(message) {
|
|
776
|
-
return MsgData.decode(message.value);
|
|
777
|
-
},
|
|
778
|
-
toProto(message) {
|
|
779
|
-
return MsgData.encode(message).finish();
|
|
780
|
-
},
|
|
781
|
-
toProtoMsg(message) {
|
|
782
|
-
return {
|
|
783
|
-
typeUrl: '/cosmos.base.abci.v1beta1.MsgData',
|
|
784
|
-
value: MsgData.encode(message).finish(),
|
|
785
|
-
};
|
|
786
|
-
},
|
|
787
|
-
};
|
|
788
|
-
function createBaseTxMsgData() {
|
|
789
|
-
return {
|
|
790
|
-
data: [],
|
|
791
|
-
msgResponses: [],
|
|
792
|
-
};
|
|
793
|
-
}
|
|
794
|
-
export const TxMsgData = {
|
|
795
|
-
typeUrl: '/cosmos.base.abci.v1beta1.TxMsgData',
|
|
796
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
797
|
-
for (const v of message.data) {
|
|
798
|
-
MsgData.encode(v, writer.uint32(10).fork()).ldelim();
|
|
799
|
-
}
|
|
800
|
-
for (const v of message.msgResponses) {
|
|
801
|
-
Any.encode(v, writer.uint32(18).fork()).ldelim();
|
|
802
|
-
}
|
|
803
|
-
return writer;
|
|
804
|
-
},
|
|
805
|
-
decode(input, length) {
|
|
806
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
807
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
808
|
-
const message = createBaseTxMsgData();
|
|
809
|
-
while (reader.pos < end) {
|
|
810
|
-
const tag = reader.uint32();
|
|
811
|
-
switch (tag >>> 3) {
|
|
812
|
-
case 1:
|
|
813
|
-
message.data.push(MsgData.decode(reader, reader.uint32()));
|
|
814
|
-
break;
|
|
815
|
-
case 2:
|
|
816
|
-
message.msgResponses.push(Any.decode(reader, reader.uint32()));
|
|
817
|
-
break;
|
|
818
|
-
default:
|
|
819
|
-
reader.skipType(tag & 7);
|
|
820
|
-
break;
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
return message;
|
|
824
|
-
},
|
|
825
|
-
fromJSON(object) {
|
|
826
|
-
return {
|
|
827
|
-
data: Array.isArray(object?.data)
|
|
828
|
-
? object.data.map((e) => MsgData.fromJSON(e))
|
|
829
|
-
: [],
|
|
830
|
-
msgResponses: Array.isArray(object?.msgResponses)
|
|
831
|
-
? object.msgResponses.map((e) => Any.fromJSON(e))
|
|
832
|
-
: [],
|
|
833
|
-
};
|
|
834
|
-
},
|
|
835
|
-
toJSON(message) {
|
|
836
|
-
const obj = {};
|
|
837
|
-
if (message.data) {
|
|
838
|
-
obj.data = message.data.map(e => (e ? MsgData.toJSON(e) : undefined));
|
|
839
|
-
}
|
|
840
|
-
else {
|
|
841
|
-
obj.data = [];
|
|
842
|
-
}
|
|
843
|
-
if (message.msgResponses) {
|
|
844
|
-
obj.msgResponses = message.msgResponses.map(e => e ? Any.toJSON(e) : undefined);
|
|
845
|
-
}
|
|
846
|
-
else {
|
|
847
|
-
obj.msgResponses = [];
|
|
848
|
-
}
|
|
849
|
-
return obj;
|
|
850
|
-
},
|
|
851
|
-
fromPartial(object) {
|
|
852
|
-
const message = createBaseTxMsgData();
|
|
853
|
-
message.data = object.data?.map(e => MsgData.fromPartial(e)) || [];
|
|
854
|
-
message.msgResponses =
|
|
855
|
-
object.msgResponses?.map(e => Any.fromPartial(e)) || [];
|
|
856
|
-
return message;
|
|
857
|
-
},
|
|
858
|
-
fromProtoMsg(message) {
|
|
859
|
-
return TxMsgData.decode(message.value);
|
|
860
|
-
},
|
|
861
|
-
toProto(message) {
|
|
862
|
-
return TxMsgData.encode(message).finish();
|
|
863
|
-
},
|
|
864
|
-
toProtoMsg(message) {
|
|
865
|
-
return {
|
|
866
|
-
typeUrl: '/cosmos.base.abci.v1beta1.TxMsgData',
|
|
867
|
-
value: TxMsgData.encode(message).finish(),
|
|
868
|
-
};
|
|
869
|
-
},
|
|
870
|
-
};
|
|
871
|
-
function createBaseSearchTxsResult() {
|
|
872
|
-
return {
|
|
873
|
-
totalCount: BigInt(0),
|
|
874
|
-
count: BigInt(0),
|
|
875
|
-
pageNumber: BigInt(0),
|
|
876
|
-
pageTotal: BigInt(0),
|
|
877
|
-
limit: BigInt(0),
|
|
878
|
-
txs: [],
|
|
879
|
-
};
|
|
880
|
-
}
|
|
881
|
-
export const SearchTxsResult = {
|
|
882
|
-
typeUrl: '/cosmos.base.abci.v1beta1.SearchTxsResult',
|
|
883
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
884
|
-
if (message.totalCount !== BigInt(0)) {
|
|
885
|
-
writer.uint32(8).uint64(message.totalCount);
|
|
886
|
-
}
|
|
887
|
-
if (message.count !== BigInt(0)) {
|
|
888
|
-
writer.uint32(16).uint64(message.count);
|
|
889
|
-
}
|
|
890
|
-
if (message.pageNumber !== BigInt(0)) {
|
|
891
|
-
writer.uint32(24).uint64(message.pageNumber);
|
|
892
|
-
}
|
|
893
|
-
if (message.pageTotal !== BigInt(0)) {
|
|
894
|
-
writer.uint32(32).uint64(message.pageTotal);
|
|
895
|
-
}
|
|
896
|
-
if (message.limit !== BigInt(0)) {
|
|
897
|
-
writer.uint32(40).uint64(message.limit);
|
|
898
|
-
}
|
|
899
|
-
for (const v of message.txs) {
|
|
900
|
-
TxResponse.encode(v, writer.uint32(50).fork()).ldelim();
|
|
901
|
-
}
|
|
902
|
-
return writer;
|
|
903
|
-
},
|
|
904
|
-
decode(input, length) {
|
|
905
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
906
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
907
|
-
const message = createBaseSearchTxsResult();
|
|
908
|
-
while (reader.pos < end) {
|
|
909
|
-
const tag = reader.uint32();
|
|
910
|
-
switch (tag >>> 3) {
|
|
911
|
-
case 1:
|
|
912
|
-
message.totalCount = reader.uint64();
|
|
913
|
-
break;
|
|
914
|
-
case 2:
|
|
915
|
-
message.count = reader.uint64();
|
|
916
|
-
break;
|
|
917
|
-
case 3:
|
|
918
|
-
message.pageNumber = reader.uint64();
|
|
919
|
-
break;
|
|
920
|
-
case 4:
|
|
921
|
-
message.pageTotal = reader.uint64();
|
|
922
|
-
break;
|
|
923
|
-
case 5:
|
|
924
|
-
message.limit = reader.uint64();
|
|
925
|
-
break;
|
|
926
|
-
case 6:
|
|
927
|
-
message.txs.push(TxResponse.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
|
-
totalCount: isSet(object.totalCount)
|
|
939
|
-
? BigInt(object.totalCount.toString())
|
|
940
|
-
: BigInt(0),
|
|
941
|
-
count: isSet(object.count) ? BigInt(object.count.toString()) : BigInt(0),
|
|
942
|
-
pageNumber: isSet(object.pageNumber)
|
|
943
|
-
? BigInt(object.pageNumber.toString())
|
|
944
|
-
: BigInt(0),
|
|
945
|
-
pageTotal: isSet(object.pageTotal)
|
|
946
|
-
? BigInt(object.pageTotal.toString())
|
|
947
|
-
: BigInt(0),
|
|
948
|
-
limit: isSet(object.limit) ? BigInt(object.limit.toString()) : BigInt(0),
|
|
949
|
-
txs: Array.isArray(object?.txs)
|
|
950
|
-
? object.txs.map((e) => TxResponse.fromJSON(e))
|
|
951
|
-
: [],
|
|
952
|
-
};
|
|
953
|
-
},
|
|
954
|
-
toJSON(message) {
|
|
955
|
-
const obj = {};
|
|
956
|
-
message.totalCount !== undefined &&
|
|
957
|
-
(obj.totalCount = (message.totalCount || BigInt(0)).toString());
|
|
958
|
-
message.count !== undefined &&
|
|
959
|
-
(obj.count = (message.count || BigInt(0)).toString());
|
|
960
|
-
message.pageNumber !== undefined &&
|
|
961
|
-
(obj.pageNumber = (message.pageNumber || BigInt(0)).toString());
|
|
962
|
-
message.pageTotal !== undefined &&
|
|
963
|
-
(obj.pageTotal = (message.pageTotal || BigInt(0)).toString());
|
|
964
|
-
message.limit !== undefined &&
|
|
965
|
-
(obj.limit = (message.limit || BigInt(0)).toString());
|
|
966
|
-
if (message.txs) {
|
|
967
|
-
obj.txs = message.txs.map(e => (e ? TxResponse.toJSON(e) : undefined));
|
|
968
|
-
}
|
|
969
|
-
else {
|
|
970
|
-
obj.txs = [];
|
|
971
|
-
}
|
|
972
|
-
return obj;
|
|
973
|
-
},
|
|
974
|
-
fromPartial(object) {
|
|
975
|
-
const message = createBaseSearchTxsResult();
|
|
976
|
-
message.totalCount =
|
|
977
|
-
object.totalCount !== undefined && object.totalCount !== null
|
|
978
|
-
? BigInt(object.totalCount.toString())
|
|
979
|
-
: BigInt(0);
|
|
980
|
-
message.count =
|
|
981
|
-
object.count !== undefined && object.count !== null
|
|
982
|
-
? BigInt(object.count.toString())
|
|
983
|
-
: BigInt(0);
|
|
984
|
-
message.pageNumber =
|
|
985
|
-
object.pageNumber !== undefined && object.pageNumber !== null
|
|
986
|
-
? BigInt(object.pageNumber.toString())
|
|
987
|
-
: BigInt(0);
|
|
988
|
-
message.pageTotal =
|
|
989
|
-
object.pageTotal !== undefined && object.pageTotal !== null
|
|
990
|
-
? BigInt(object.pageTotal.toString())
|
|
991
|
-
: BigInt(0);
|
|
992
|
-
message.limit =
|
|
993
|
-
object.limit !== undefined && object.limit !== null
|
|
994
|
-
? BigInt(object.limit.toString())
|
|
995
|
-
: BigInt(0);
|
|
996
|
-
message.txs = object.txs?.map(e => TxResponse.fromPartial(e)) || [];
|
|
997
|
-
return message;
|
|
998
|
-
},
|
|
999
|
-
fromProtoMsg(message) {
|
|
1000
|
-
return SearchTxsResult.decode(message.value);
|
|
1001
|
-
},
|
|
1002
|
-
toProto(message) {
|
|
1003
|
-
return SearchTxsResult.encode(message).finish();
|
|
1004
|
-
},
|
|
1005
|
-
toProtoMsg(message) {
|
|
1006
|
-
return {
|
|
1007
|
-
typeUrl: '/cosmos.base.abci.v1beta1.SearchTxsResult',
|
|
1008
|
-
value: SearchTxsResult.encode(message).finish(),
|
|
1009
|
-
};
|
|
1010
|
-
},
|
|
1011
|
-
};
|
|
1012
|
-
//# sourceMappingURL=abci.js.map
|
|
1
|
+
import{Any as t}from"../../../../google/protobuf/any.js";import{Event as e}from"../../../../tendermint/abci/types.js";import{BinaryReader as o,BinaryWriter as s}from"../../../../binary.js";import{isSet as n,bytesFromBase64 as a,base64FromBytes as i}from"../../../../helpers.js";import{}from"../../../../json-safe.js";function r(){return{height:BigInt(0),txhash:"",codespace:"",code:0,data:"",rawLog:"",logs:[],info:"",gasWanted:BigInt(0),gasUsed:BigInt(0),tx:void 0,timestamp:"",events:[]}}export const TxResponse={typeUrl:"/cosmos.base.abci.v1beta1.TxResponse",encode(o,n=s.create()){o.height!==BigInt(0)&&n.uint32(8).int64(o.height),""!==o.txhash&&n.uint32(18).string(o.txhash),""!==o.codespace&&n.uint32(26).string(o.codespace),0!==o.code&&n.uint32(32).uint32(o.code),""!==o.data&&n.uint32(42).string(o.data),""!==o.rawLog&&n.uint32(50).string(o.rawLog);for(const t of o.logs)ABCIMessageLog.encode(t,n.uint32(58).fork()).ldelim();""!==o.info&&n.uint32(66).string(o.info),o.gasWanted!==BigInt(0)&&n.uint32(72).int64(o.gasWanted),o.gasUsed!==BigInt(0)&&n.uint32(80).int64(o.gasUsed),void 0!==o.tx&&t.encode(o.tx,n.uint32(90).fork()).ldelim(),""!==o.timestamp&&n.uint32(98).string(o.timestamp);for(const t of o.events)e.encode(t,n.uint32(106).fork()).ldelim();return n},decode(s,n){const a=s instanceof o?s:new o(s);let i=void 0===n?a.len:a.pos+n;const g=r();for(;a.pos<i;){const o=a.uint32();switch(o>>>3){case 1:g.height=a.int64();break;case 2:g.txhash=a.string();break;case 3:g.codespace=a.string();break;case 4:g.code=a.uint32();break;case 5:g.data=a.string();break;case 6:g.rawLog=a.string();break;case 7:g.logs.push(ABCIMessageLog.decode(a,a.uint32()));break;case 8:g.info=a.string();break;case 9:g.gasWanted=a.int64();break;case 10:g.gasUsed=a.int64();break;case 11:g.tx=t.decode(a,a.uint32());break;case 12:g.timestamp=a.string();break;case 13:g.events.push(e.decode(a,a.uint32()));break;default:a.skipType(7&o)}}return g},fromJSON:o=>({height:n(o.height)?BigInt(o.height.toString()):BigInt(0),txhash:n(o.txhash)?String(o.txhash):"",codespace:n(o.codespace)?String(o.codespace):"",code:n(o.code)?Number(o.code):0,data:n(o.data)?String(o.data):"",rawLog:n(o.rawLog)?String(o.rawLog):"",logs:Array.isArray(o?.logs)?o.logs.map((t=>ABCIMessageLog.fromJSON(t))):[],info:n(o.info)?String(o.info):"",gasWanted:n(o.gasWanted)?BigInt(o.gasWanted.toString()):BigInt(0),gasUsed:n(o.gasUsed)?BigInt(o.gasUsed.toString()):BigInt(0),tx:n(o.tx)?t.fromJSON(o.tx):void 0,timestamp:n(o.timestamp)?String(o.timestamp):"",events:Array.isArray(o?.events)?o.events.map((t=>e.fromJSON(t))):[]}),toJSON(o){const s={};return void 0!==o.height&&(s.height=(o.height||BigInt(0)).toString()),void 0!==o.txhash&&(s.txhash=o.txhash),void 0!==o.codespace&&(s.codespace=o.codespace),void 0!==o.code&&(s.code=Math.round(o.code)),void 0!==o.data&&(s.data=o.data),void 0!==o.rawLog&&(s.rawLog=o.rawLog),o.logs?s.logs=o.logs.map((t=>t?ABCIMessageLog.toJSON(t):void 0)):s.logs=[],void 0!==o.info&&(s.info=o.info),void 0!==o.gasWanted&&(s.gasWanted=(o.gasWanted||BigInt(0)).toString()),void 0!==o.gasUsed&&(s.gasUsed=(o.gasUsed||BigInt(0)).toString()),void 0!==o.tx&&(s.tx=o.tx?t.toJSON(o.tx):void 0),void 0!==o.timestamp&&(s.timestamp=o.timestamp),o.events?s.events=o.events.map((t=>t?e.toJSON(t):void 0)):s.events=[],s},fromPartial(o){const s=r();return s.height=void 0!==o.height&&null!==o.height?BigInt(o.height.toString()):BigInt(0),s.txhash=o.txhash??"",s.codespace=o.codespace??"",s.code=o.code??0,s.data=o.data??"",s.rawLog=o.rawLog??"",s.logs=o.logs?.map((t=>ABCIMessageLog.fromPartial(t)))||[],s.info=o.info??"",s.gasWanted=void 0!==o.gasWanted&&null!==o.gasWanted?BigInt(o.gasWanted.toString()):BigInt(0),s.gasUsed=void 0!==o.gasUsed&&null!==o.gasUsed?BigInt(o.gasUsed.toString()):BigInt(0),s.tx=void 0!==o.tx&&null!==o.tx?t.fromPartial(o.tx):void 0,s.timestamp=o.timestamp??"",s.events=o.events?.map((t=>e.fromPartial(t)))||[],s},fromProtoMsg:t=>TxResponse.decode(t.value),toProto:t=>TxResponse.encode(t).finish(),toProtoMsg:t=>({typeUrl:"/cosmos.base.abci.v1beta1.TxResponse",value:TxResponse.encode(t).finish()})};export const ABCIMessageLog={typeUrl:"/cosmos.base.abci.v1beta1.ABCIMessageLog",encode(t,e=s.create()){0!==t.msgIndex&&e.uint32(8).uint32(t.msgIndex),""!==t.log&&e.uint32(18).string(t.log);for(const o of t.events)StringEvent.encode(o,e.uint32(26).fork()).ldelim();return e},decode(t,e){const s=t instanceof o?t:new o(t);let n=void 0===e?s.len:s.pos+e;const a={msgIndex:0,log:"",events:[]};for(;s.pos<n;){const t=s.uint32();switch(t>>>3){case 1:a.msgIndex=s.uint32();break;case 2:a.log=s.string();break;case 3:a.events.push(StringEvent.decode(s,s.uint32()));break;default:s.skipType(7&t)}}return a},fromJSON:t=>({msgIndex:n(t.msgIndex)?Number(t.msgIndex):0,log:n(t.log)?String(t.log):"",events:Array.isArray(t?.events)?t.events.map((t=>StringEvent.fromJSON(t))):[]}),toJSON(t){const e={};return void 0!==t.msgIndex&&(e.msgIndex=Math.round(t.msgIndex)),void 0!==t.log&&(e.log=t.log),t.events?e.events=t.events.map((t=>t?StringEvent.toJSON(t):void 0)):e.events=[],e},fromPartial(t){const e={msgIndex:0,log:"",events:[]};return e.msgIndex=t.msgIndex??0,e.log=t.log??"",e.events=t.events?.map((t=>StringEvent.fromPartial(t)))||[],e},fromProtoMsg:t=>ABCIMessageLog.decode(t.value),toProto:t=>ABCIMessageLog.encode(t).finish(),toProtoMsg:t=>({typeUrl:"/cosmos.base.abci.v1beta1.ABCIMessageLog",value:ABCIMessageLog.encode(t).finish()})};export const StringEvent={typeUrl:"/cosmos.base.abci.v1beta1.StringEvent",encode(t,e=s.create()){""!==t.type&&e.uint32(10).string(t.type);for(const o of t.attributes)Attribute.encode(o,e.uint32(18).fork()).ldelim();return e},decode(t,e){const s=t instanceof o?t:new o(t);let n=void 0===e?s.len:s.pos+e;const a={type:"",attributes:[]};for(;s.pos<n;){const t=s.uint32();switch(t>>>3){case 1:a.type=s.string();break;case 2:a.attributes.push(Attribute.decode(s,s.uint32()));break;default:s.skipType(7&t)}}return a},fromJSON:t=>({type:n(t.type)?String(t.type):"",attributes:Array.isArray(t?.attributes)?t.attributes.map((t=>Attribute.fromJSON(t))):[]}),toJSON(t){const e={};return void 0!==t.type&&(e.type=t.type),t.attributes?e.attributes=t.attributes.map((t=>t?Attribute.toJSON(t):void 0)):e.attributes=[],e},fromPartial(t){const e={type:"",attributes:[]};return e.type=t.type??"",e.attributes=t.attributes?.map((t=>Attribute.fromPartial(t)))||[],e},fromProtoMsg:t=>StringEvent.decode(t.value),toProto:t=>StringEvent.encode(t).finish(),toProtoMsg:t=>({typeUrl:"/cosmos.base.abci.v1beta1.StringEvent",value:StringEvent.encode(t).finish()})};export const Attribute={typeUrl:"/cosmos.base.abci.v1beta1.Attribute",encode:(t,e=s.create())=>(""!==t.key&&e.uint32(10).string(t.key),""!==t.value&&e.uint32(18).string(t.value),e),decode(t,e){const s=t instanceof o?t:new o(t);let n=void 0===e?s.len:s.pos+e;const a={key:"",value:""};for(;s.pos<n;){const t=s.uint32();switch(t>>>3){case 1:a.key=s.string();break;case 2:a.value=s.string();break;default:s.skipType(7&t)}}return a},fromJSON:t=>({key:n(t.key)?String(t.key):"",value:n(t.value)?String(t.value):""}),toJSON(t){const e={};return void 0!==t.key&&(e.key=t.key),void 0!==t.value&&(e.value=t.value),e},fromPartial(t){const e={key:"",value:""};return e.key=t.key??"",e.value=t.value??"",e},fromProtoMsg:t=>Attribute.decode(t.value),toProto:t=>Attribute.encode(t).finish(),toProtoMsg:t=>({typeUrl:"/cosmos.base.abci.v1beta1.Attribute",value:Attribute.encode(t).finish()})};function g(){return{gasWanted:BigInt(0),gasUsed:BigInt(0)}}export const GasInfo={typeUrl:"/cosmos.base.abci.v1beta1.GasInfo",encode:(t,e=s.create())=>(t.gasWanted!==BigInt(0)&&e.uint32(8).uint64(t.gasWanted),t.gasUsed!==BigInt(0)&&e.uint32(16).uint64(t.gasUsed),e),decode(t,e){const s=t instanceof o?t:new o(t);let n=void 0===e?s.len:s.pos+e;const a=g();for(;s.pos<n;){const t=s.uint32();switch(t>>>3){case 1:a.gasWanted=s.uint64();break;case 2:a.gasUsed=s.uint64();break;default:s.skipType(7&t)}}return a},fromJSON:t=>({gasWanted:n(t.gasWanted)?BigInt(t.gasWanted.toString()):BigInt(0),gasUsed:n(t.gasUsed)?BigInt(t.gasUsed.toString()):BigInt(0)}),toJSON(t){const e={};return void 0!==t.gasWanted&&(e.gasWanted=(t.gasWanted||BigInt(0)).toString()),void 0!==t.gasUsed&&(e.gasUsed=(t.gasUsed||BigInt(0)).toString()),e},fromPartial(t){const e=g();return e.gasWanted=void 0!==t.gasWanted&&null!==t.gasWanted?BigInt(t.gasWanted.toString()):BigInt(0),e.gasUsed=void 0!==t.gasUsed&&null!==t.gasUsed?BigInt(t.gasUsed.toString()):BigInt(0),e},fromProtoMsg:t=>GasInfo.decode(t.value),toProto:t=>GasInfo.encode(t).finish(),toProtoMsg:t=>({typeUrl:"/cosmos.base.abci.v1beta1.GasInfo",value:GasInfo.encode(t).finish()})};function d(){return{data:new Uint8Array,log:"",events:[],msgResponses:[]}}export const Result={typeUrl:"/cosmos.base.abci.v1beta1.Result",encode(o,n=s.create()){0!==o.data.length&&n.uint32(10).bytes(o.data),""!==o.log&&n.uint32(18).string(o.log);for(const t of o.events)e.encode(t,n.uint32(26).fork()).ldelim();for(const e of o.msgResponses)t.encode(e,n.uint32(34).fork()).ldelim();return n},decode(s,n){const a=s instanceof o?s:new o(s);let i=void 0===n?a.len:a.pos+n;const r=d();for(;a.pos<i;){const o=a.uint32();switch(o>>>3){case 1:r.data=a.bytes();break;case 2:r.log=a.string();break;case 3:r.events.push(e.decode(a,a.uint32()));break;case 4:r.msgResponses.push(t.decode(a,a.uint32()));break;default:a.skipType(7&o)}}return r},fromJSON:o=>({data:n(o.data)?a(o.data):new Uint8Array,log:n(o.log)?String(o.log):"",events:Array.isArray(o?.events)?o.events.map((t=>e.fromJSON(t))):[],msgResponses:Array.isArray(o?.msgResponses)?o.msgResponses.map((e=>t.fromJSON(e))):[]}),toJSON(o){const s={};return void 0!==o.data&&(s.data=i(void 0!==o.data?o.data:new Uint8Array)),void 0!==o.log&&(s.log=o.log),o.events?s.events=o.events.map((t=>t?e.toJSON(t):void 0)):s.events=[],o.msgResponses?s.msgResponses=o.msgResponses.map((e=>e?t.toJSON(e):void 0)):s.msgResponses=[],s},fromPartial(o){const s=d();return s.data=o.data??new Uint8Array,s.log=o.log??"",s.events=o.events?.map((t=>e.fromPartial(t)))||[],s.msgResponses=o.msgResponses?.map((e=>t.fromPartial(e)))||[],s},fromProtoMsg:t=>Result.decode(t.value),toProto:t=>Result.encode(t).finish(),toProtoMsg:t=>({typeUrl:"/cosmos.base.abci.v1beta1.Result",value:Result.encode(t).finish()})};function c(){return{gasInfo:GasInfo.fromPartial({}),result:void 0}}export const SimulationResponse={typeUrl:"/cosmos.base.abci.v1beta1.SimulationResponse",encode:(t,e=s.create())=>(void 0!==t.gasInfo&&GasInfo.encode(t.gasInfo,e.uint32(10).fork()).ldelim(),void 0!==t.result&&Result.encode(t.result,e.uint32(18).fork()).ldelim(),e),decode(t,e){const s=t instanceof o?t:new o(t);let n=void 0===e?s.len:s.pos+e;const a=c();for(;s.pos<n;){const t=s.uint32();switch(t>>>3){case 1:a.gasInfo=GasInfo.decode(s,s.uint32());break;case 2:a.result=Result.decode(s,s.uint32());break;default:s.skipType(7&t)}}return a},fromJSON:t=>({gasInfo:n(t.gasInfo)?GasInfo.fromJSON(t.gasInfo):void 0,result:n(t.result)?Result.fromJSON(t.result):void 0}),toJSON(t){const e={};return void 0!==t.gasInfo&&(e.gasInfo=t.gasInfo?GasInfo.toJSON(t.gasInfo):void 0),void 0!==t.result&&(e.result=t.result?Result.toJSON(t.result):void 0),e},fromPartial(t){const e=c();return e.gasInfo=void 0!==t.gasInfo&&null!==t.gasInfo?GasInfo.fromPartial(t.gasInfo):void 0,e.result=void 0!==t.result&&null!==t.result?Result.fromPartial(t.result):void 0,e},fromProtoMsg:t=>SimulationResponse.decode(t.value),toProto:t=>SimulationResponse.encode(t).finish(),toProtoMsg:t=>({typeUrl:"/cosmos.base.abci.v1beta1.SimulationResponse",value:SimulationResponse.encode(t).finish()})};function u(){return{msgType:"",data:new Uint8Array}}export const MsgData={typeUrl:"/cosmos.base.abci.v1beta1.MsgData",encode:(t,e=s.create())=>(""!==t.msgType&&e.uint32(10).string(t.msgType),0!==t.data.length&&e.uint32(18).bytes(t.data),e),decode(t,e){const s=t instanceof o?t:new o(t);let n=void 0===e?s.len:s.pos+e;const a=u();for(;s.pos<n;){const t=s.uint32();switch(t>>>3){case 1:a.msgType=s.string();break;case 2:a.data=s.bytes();break;default:s.skipType(7&t)}}return a},fromJSON:t=>({msgType:n(t.msgType)?String(t.msgType):"",data:n(t.data)?a(t.data):new Uint8Array}),toJSON(t){const e={};return void 0!==t.msgType&&(e.msgType=t.msgType),void 0!==t.data&&(e.data=i(void 0!==t.data?t.data:new Uint8Array)),e},fromPartial(t){const e=u();return e.msgType=t.msgType??"",e.data=t.data??new Uint8Array,e},fromProtoMsg:t=>MsgData.decode(t.value),toProto:t=>MsgData.encode(t).finish(),toProtoMsg:t=>({typeUrl:"/cosmos.base.abci.v1beta1.MsgData",value:MsgData.encode(t).finish()})};export const TxMsgData={typeUrl:"/cosmos.base.abci.v1beta1.TxMsgData",encode(e,o=s.create()){for(const t of e.data)MsgData.encode(t,o.uint32(10).fork()).ldelim();for(const s of e.msgResponses)t.encode(s,o.uint32(18).fork()).ldelim();return o},decode(e,s){const n=e instanceof o?e:new o(e);let a=void 0===s?n.len:n.pos+s;const i={data:[],msgResponses:[]};for(;n.pos<a;){const e=n.uint32();switch(e>>>3){case 1:i.data.push(MsgData.decode(n,n.uint32()));break;case 2:i.msgResponses.push(t.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return i},fromJSON:e=>({data:Array.isArray(e?.data)?e.data.map((t=>MsgData.fromJSON(t))):[],msgResponses:Array.isArray(e?.msgResponses)?e.msgResponses.map((e=>t.fromJSON(e))):[]}),toJSON(e){const o={};return e.data?o.data=e.data.map((t=>t?MsgData.toJSON(t):void 0)):o.data=[],e.msgResponses?o.msgResponses=e.msgResponses.map((e=>e?t.toJSON(e):void 0)):o.msgResponses=[],o},fromPartial(e){const o={data:[],msgResponses:[]};return o.data=e.data?.map((t=>MsgData.fromPartial(t)))||[],o.msgResponses=e.msgResponses?.map((e=>t.fromPartial(e)))||[],o},fromProtoMsg:t=>TxMsgData.decode(t.value),toProto:t=>TxMsgData.encode(t).finish(),toProtoMsg:t=>({typeUrl:"/cosmos.base.abci.v1beta1.TxMsgData",value:TxMsgData.encode(t).finish()})};function l(){return{totalCount:BigInt(0),count:BigInt(0),pageNumber:BigInt(0),pageTotal:BigInt(0),limit:BigInt(0),txs:[]}}export const SearchTxsResult={typeUrl:"/cosmos.base.abci.v1beta1.SearchTxsResult",encode(t,e=s.create()){t.totalCount!==BigInt(0)&&e.uint32(8).uint64(t.totalCount),t.count!==BigInt(0)&&e.uint32(16).uint64(t.count),t.pageNumber!==BigInt(0)&&e.uint32(24).uint64(t.pageNumber),t.pageTotal!==BigInt(0)&&e.uint32(32).uint64(t.pageTotal),t.limit!==BigInt(0)&&e.uint32(40).uint64(t.limit);for(const o of t.txs)TxResponse.encode(o,e.uint32(50).fork()).ldelim();return e},decode(t,e){const s=t instanceof o?t:new o(t);let n=void 0===e?s.len:s.pos+e;const a=l();for(;s.pos<n;){const t=s.uint32();switch(t>>>3){case 1:a.totalCount=s.uint64();break;case 2:a.count=s.uint64();break;case 3:a.pageNumber=s.uint64();break;case 4:a.pageTotal=s.uint64();break;case 5:a.limit=s.uint64();break;case 6:a.txs.push(TxResponse.decode(s,s.uint32()));break;default:s.skipType(7&t)}}return a},fromJSON:t=>({totalCount:n(t.totalCount)?BigInt(t.totalCount.toString()):BigInt(0),count:n(t.count)?BigInt(t.count.toString()):BigInt(0),pageNumber:n(t.pageNumber)?BigInt(t.pageNumber.toString()):BigInt(0),pageTotal:n(t.pageTotal)?BigInt(t.pageTotal.toString()):BigInt(0),limit:n(t.limit)?BigInt(t.limit.toString()):BigInt(0),txs:Array.isArray(t?.txs)?t.txs.map((t=>TxResponse.fromJSON(t))):[]}),toJSON(t){const e={};return void 0!==t.totalCount&&(e.totalCount=(t.totalCount||BigInt(0)).toString()),void 0!==t.count&&(e.count=(t.count||BigInt(0)).toString()),void 0!==t.pageNumber&&(e.pageNumber=(t.pageNumber||BigInt(0)).toString()),void 0!==t.pageTotal&&(e.pageTotal=(t.pageTotal||BigInt(0)).toString()),void 0!==t.limit&&(e.limit=(t.limit||BigInt(0)).toString()),t.txs?e.txs=t.txs.map((t=>t?TxResponse.toJSON(t):void 0)):e.txs=[],e},fromPartial(t){const e=l();return e.totalCount=void 0!==t.totalCount&&null!==t.totalCount?BigInt(t.totalCount.toString()):BigInt(0),e.count=void 0!==t.count&&null!==t.count?BigInt(t.count.toString()):BigInt(0),e.pageNumber=void 0!==t.pageNumber&&null!==t.pageNumber?BigInt(t.pageNumber.toString()):BigInt(0),e.pageTotal=void 0!==t.pageTotal&&null!==t.pageTotal?BigInt(t.pageTotal.toString()):BigInt(0),e.limit=void 0!==t.limit&&null!==t.limit?BigInt(t.limit.toString()):BigInt(0),e.txs=t.txs?.map((t=>TxResponse.fromPartial(t)))||[],e},fromProtoMsg:t=>SearchTxsResult.decode(t.value),toProto:t=>SearchTxsResult.encode(t).finish(),toProtoMsg:t=>({typeUrl:"/cosmos.base.abci.v1beta1.SearchTxsResult",value:SearchTxsResult.encode(t).finish()})};
|