@agoric/cosmic-proto 0.4.1-dev-9f8732f.0 → 0.4.1-dev-1cee3dd.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.js +1 -217
- 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.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.js +1 -356
- 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.js +1 -1922
- 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 +7 -5
package/dist/codegen/binary.js
CHANGED
|
@@ -1,367 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This file and any referenced files were automatically generated by @cosmology/telescope@1.8.3
|
|
4
|
-
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
5
|
-
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
6
|
-
*/
|
|
7
|
-
// Copyright (c) 2016, Daniel Wirtz All rights reserved.
|
|
8
|
-
// Redistribution and use in source and binary forms, with or without
|
|
9
|
-
// modification, are permitted provided that the following conditions are
|
|
10
|
-
// met:
|
|
11
|
-
// * Redistributions of source code must retain the above copyright
|
|
12
|
-
// notice, this list of conditions and the following disclaimer.
|
|
13
|
-
// * Redistributions in binary form must reproduce the above copyright
|
|
14
|
-
// notice, this list of conditions and the following disclaimer in the
|
|
15
|
-
// documentation and/or other materials provided with the distribution.
|
|
16
|
-
// * Neither the name of its author, nor the names of its contributors
|
|
17
|
-
// may be used to endorse or promote products derived from this software
|
|
18
|
-
// without specific prior written permission.
|
|
19
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
-
// ---
|
|
31
|
-
// Code generated by the command line utilities is owned by the owner
|
|
32
|
-
// of the input file used when generating it. This code is not
|
|
33
|
-
// standalone and requires a support library to be linked with it. This
|
|
34
|
-
// support library is itself covered by the above license.
|
|
35
|
-
import { utf8Length, utf8Read, utf8Write } from './utf8.js';
|
|
36
|
-
import { int64ToString, readInt32, readUInt32, uInt64ToString, varint32read, varint64read, writeVarint32, writeVarint64, int64FromString, int64Length, writeFixed32, writeByte, zzDecode, zzEncode, } from './varint.js';
|
|
37
|
-
export var WireType;
|
|
38
|
-
(function (WireType) {
|
|
39
|
-
WireType[WireType["Varint"] = 0] = "Varint";
|
|
40
|
-
WireType[WireType["Fixed64"] = 1] = "Fixed64";
|
|
41
|
-
WireType[WireType["Bytes"] = 2] = "Bytes";
|
|
42
|
-
WireType[WireType["Fixed32"] = 5] = "Fixed32";
|
|
43
|
-
})(WireType || (WireType = {}));
|
|
44
|
-
export class BinaryReader {
|
|
45
|
-
buf;
|
|
46
|
-
pos;
|
|
47
|
-
type;
|
|
48
|
-
len;
|
|
49
|
-
assertBounds() {
|
|
50
|
-
if (this.pos > this.len)
|
|
51
|
-
throw new RangeError('premature EOF');
|
|
52
|
-
}
|
|
53
|
-
constructor(buf) {
|
|
54
|
-
this.buf = buf ? new Uint8Array(buf) : new Uint8Array(0);
|
|
55
|
-
this.pos = 0;
|
|
56
|
-
this.type = 0;
|
|
57
|
-
this.len = this.buf.length;
|
|
58
|
-
}
|
|
59
|
-
tag() {
|
|
60
|
-
const tag = this.uint32(), fieldNo = tag >>> 3, wireType = tag & 7;
|
|
61
|
-
if (fieldNo <= 0 || wireType < 0 || wireType > 5)
|
|
62
|
-
throw new Error('illegal tag: field no ' + fieldNo + ' wire type ' + wireType);
|
|
63
|
-
return [fieldNo, wireType, tag];
|
|
64
|
-
}
|
|
65
|
-
skip(length) {
|
|
66
|
-
if (typeof length === 'number') {
|
|
67
|
-
if (this.pos + length > this.len)
|
|
68
|
-
throw indexOutOfRange(this, length);
|
|
69
|
-
this.pos += length;
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
do {
|
|
73
|
-
if (this.pos >= this.len)
|
|
74
|
-
throw indexOutOfRange(this);
|
|
75
|
-
} while (this.buf[this.pos++] & 128);
|
|
76
|
-
}
|
|
77
|
-
return this;
|
|
78
|
-
}
|
|
79
|
-
skipType(wireType) {
|
|
80
|
-
switch (wireType) {
|
|
81
|
-
case WireType.Varint:
|
|
82
|
-
this.skip();
|
|
83
|
-
break;
|
|
84
|
-
case WireType.Fixed64:
|
|
85
|
-
this.skip(8);
|
|
86
|
-
break;
|
|
87
|
-
case WireType.Bytes:
|
|
88
|
-
this.skip(this.uint32());
|
|
89
|
-
break;
|
|
90
|
-
case 3:
|
|
91
|
-
while ((wireType = this.uint32() & 7) !== 4) {
|
|
92
|
-
this.skipType(wireType);
|
|
93
|
-
}
|
|
94
|
-
break;
|
|
95
|
-
case WireType.Fixed32:
|
|
96
|
-
this.skip(4);
|
|
97
|
-
break;
|
|
98
|
-
/* istanbul ignore next */
|
|
99
|
-
default:
|
|
100
|
-
throw Error('invalid wire type ' + wireType + ' at offset ' + this.pos);
|
|
101
|
-
}
|
|
102
|
-
return this;
|
|
103
|
-
}
|
|
104
|
-
uint32() {
|
|
105
|
-
return varint32read.bind(this)();
|
|
106
|
-
}
|
|
107
|
-
int32() {
|
|
108
|
-
return this.uint32() | 0;
|
|
109
|
-
}
|
|
110
|
-
sint32() {
|
|
111
|
-
const num = this.uint32();
|
|
112
|
-
return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding
|
|
113
|
-
}
|
|
114
|
-
fixed32() {
|
|
115
|
-
const val = readUInt32(this.buf, this.pos);
|
|
116
|
-
this.pos += 4;
|
|
117
|
-
return val;
|
|
118
|
-
}
|
|
119
|
-
sfixed32() {
|
|
120
|
-
const val = readInt32(this.buf, this.pos);
|
|
121
|
-
this.pos += 4;
|
|
122
|
-
return val;
|
|
123
|
-
}
|
|
124
|
-
int64() {
|
|
125
|
-
const [lo, hi] = varint64read.bind(this)();
|
|
126
|
-
return BigInt(int64ToString(lo, hi));
|
|
127
|
-
}
|
|
128
|
-
uint64() {
|
|
129
|
-
const [lo, hi] = varint64read.bind(this)();
|
|
130
|
-
return BigInt(uInt64ToString(lo, hi));
|
|
131
|
-
}
|
|
132
|
-
sint64() {
|
|
133
|
-
let [lo, hi] = varint64read.bind(this)();
|
|
134
|
-
// zig zag
|
|
135
|
-
[lo, hi] = zzDecode(lo, hi);
|
|
136
|
-
return BigInt(int64ToString(lo, hi));
|
|
137
|
-
}
|
|
138
|
-
fixed64() {
|
|
139
|
-
const lo = this.sfixed32();
|
|
140
|
-
const hi = this.sfixed32();
|
|
141
|
-
return BigInt(uInt64ToString(lo, hi));
|
|
142
|
-
}
|
|
143
|
-
sfixed64() {
|
|
144
|
-
const lo = this.sfixed32();
|
|
145
|
-
const hi = this.sfixed32();
|
|
146
|
-
return BigInt(int64ToString(lo, hi));
|
|
147
|
-
}
|
|
148
|
-
float() {
|
|
149
|
-
throw new Error('float not supported');
|
|
150
|
-
}
|
|
151
|
-
double() {
|
|
152
|
-
throw new Error('double not supported');
|
|
153
|
-
}
|
|
154
|
-
bool() {
|
|
155
|
-
const [lo, hi] = varint64read.bind(this)();
|
|
156
|
-
return lo !== 0 || hi !== 0;
|
|
157
|
-
}
|
|
158
|
-
bytes() {
|
|
159
|
-
const len = this.uint32(), start = this.pos;
|
|
160
|
-
this.pos += len;
|
|
161
|
-
this.assertBounds();
|
|
162
|
-
return this.buf.subarray(start, start + len);
|
|
163
|
-
}
|
|
164
|
-
string() {
|
|
165
|
-
const bytes = this.bytes();
|
|
166
|
-
return utf8Read(bytes, 0, bytes.length);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
class Op {
|
|
170
|
-
fn;
|
|
171
|
-
len;
|
|
172
|
-
val;
|
|
173
|
-
next;
|
|
174
|
-
constructor(fn, len, val) {
|
|
175
|
-
this.fn = fn;
|
|
176
|
-
this.len = len;
|
|
177
|
-
this.val = val;
|
|
178
|
-
}
|
|
179
|
-
proceed(buf, pos) {
|
|
180
|
-
if (this.fn) {
|
|
181
|
-
this.fn(this.val, buf, pos);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
class State {
|
|
186
|
-
head;
|
|
187
|
-
tail;
|
|
188
|
-
len;
|
|
189
|
-
next;
|
|
190
|
-
constructor(writer) {
|
|
191
|
-
this.head = writer.head;
|
|
192
|
-
this.tail = writer.tail;
|
|
193
|
-
this.len = writer.len;
|
|
194
|
-
this.next = writer.states;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
export class BinaryWriter {
|
|
198
|
-
len = 0;
|
|
199
|
-
head;
|
|
200
|
-
tail;
|
|
201
|
-
states;
|
|
202
|
-
constructor() {
|
|
203
|
-
this.head = new Op(null, 0, 0);
|
|
204
|
-
this.tail = this.head;
|
|
205
|
-
this.states = null;
|
|
206
|
-
}
|
|
207
|
-
static create() {
|
|
208
|
-
return new BinaryWriter();
|
|
209
|
-
}
|
|
210
|
-
static alloc(size) {
|
|
211
|
-
if (typeof Uint8Array !== 'undefined') {
|
|
212
|
-
return pool(size => new Uint8Array(size), Uint8Array.prototype.subarray)(size);
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
215
|
-
return new Array(size);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
_push(fn, len, val) {
|
|
219
|
-
this.tail = this.tail.next = new Op(fn, len, val);
|
|
220
|
-
this.len += len;
|
|
221
|
-
return this;
|
|
222
|
-
}
|
|
223
|
-
finish() {
|
|
224
|
-
let head = this.head.next, pos = 0;
|
|
225
|
-
const buf = BinaryWriter.alloc(this.len);
|
|
226
|
-
while (head) {
|
|
227
|
-
head.proceed(buf, pos);
|
|
228
|
-
pos += head.len;
|
|
229
|
-
head = head.next;
|
|
230
|
-
}
|
|
231
|
-
return buf;
|
|
232
|
-
}
|
|
233
|
-
fork() {
|
|
234
|
-
this.states = new State(this);
|
|
235
|
-
this.head = this.tail = new Op(null, 0, 0);
|
|
236
|
-
this.len = 0;
|
|
237
|
-
return this;
|
|
238
|
-
}
|
|
239
|
-
reset() {
|
|
240
|
-
if (this.states) {
|
|
241
|
-
this.head = this.states.head;
|
|
242
|
-
this.tail = this.states.tail;
|
|
243
|
-
this.len = this.states.len;
|
|
244
|
-
this.states = this.states.next;
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
this.head = this.tail = new Op(null, 0, 0);
|
|
248
|
-
this.len = 0;
|
|
249
|
-
}
|
|
250
|
-
return this;
|
|
251
|
-
}
|
|
252
|
-
ldelim() {
|
|
253
|
-
const head = this.head, tail = this.tail, len = this.len;
|
|
254
|
-
this.reset().uint32(len);
|
|
255
|
-
if (len) {
|
|
256
|
-
this.tail.next = head.next; // skip noop
|
|
257
|
-
this.tail = tail;
|
|
258
|
-
this.len += len;
|
|
259
|
-
}
|
|
260
|
-
return this;
|
|
261
|
-
}
|
|
262
|
-
tag(fieldNo, type) {
|
|
263
|
-
return this.uint32(((fieldNo << 3) | type) >>> 0);
|
|
264
|
-
}
|
|
265
|
-
uint32(value) {
|
|
266
|
-
this.len += (this.tail = this.tail.next =
|
|
267
|
-
new Op(writeVarint32, (value = value >>> 0) < 128
|
|
268
|
-
? 1
|
|
269
|
-
: value < 16384
|
|
270
|
-
? 2
|
|
271
|
-
: value < 2097152
|
|
272
|
-
? 3
|
|
273
|
-
: value < 268435456
|
|
274
|
-
? 4
|
|
275
|
-
: 5, value)).len;
|
|
276
|
-
return this;
|
|
277
|
-
}
|
|
278
|
-
int32(value) {
|
|
279
|
-
return value < 0
|
|
280
|
-
? this._push(writeVarint64, 10, int64FromString(value.toString())) // 10 bytes per spec
|
|
281
|
-
: this.uint32(value);
|
|
282
|
-
}
|
|
283
|
-
sint32(value) {
|
|
284
|
-
return this.uint32(((value << 1) ^ (value >> 31)) >>> 0);
|
|
285
|
-
}
|
|
286
|
-
int64(value) {
|
|
287
|
-
const { lo, hi } = int64FromString(value.toString());
|
|
288
|
-
return this._push(writeVarint64, int64Length(lo, hi), { lo, hi });
|
|
289
|
-
}
|
|
290
|
-
// uint64 is the same with int64
|
|
291
|
-
uint64 = BinaryWriter.prototype.int64;
|
|
292
|
-
sint64(value) {
|
|
293
|
-
let { lo, hi } = int64FromString(value.toString());
|
|
294
|
-
// zig zag
|
|
295
|
-
[lo, hi] = zzEncode(lo, hi);
|
|
296
|
-
return this._push(writeVarint64, int64Length(lo, hi), { lo, hi });
|
|
297
|
-
}
|
|
298
|
-
fixed64(value) {
|
|
299
|
-
const { lo, hi } = int64FromString(value.toString());
|
|
300
|
-
return this._push(writeFixed32, 4, lo)._push(writeFixed32, 4, hi);
|
|
301
|
-
}
|
|
302
|
-
// sfixed64 is the same with fixed64
|
|
303
|
-
sfixed64 = BinaryWriter.prototype.fixed64;
|
|
304
|
-
bool(value) {
|
|
305
|
-
return this._push(writeByte, 1, value ? 1 : 0);
|
|
306
|
-
}
|
|
307
|
-
fixed32(value) {
|
|
308
|
-
return this._push(writeFixed32, 4, value >>> 0);
|
|
309
|
-
}
|
|
310
|
-
// sfixed32 is the same with fixed32
|
|
311
|
-
sfixed32 = BinaryWriter.prototype.fixed32;
|
|
312
|
-
float(value) {
|
|
313
|
-
throw new Error('float not supported' + value);
|
|
314
|
-
}
|
|
315
|
-
double(value) {
|
|
316
|
-
throw new Error('double not supported' + value);
|
|
317
|
-
}
|
|
318
|
-
bytes(value) {
|
|
319
|
-
const len = value.length >>> 0;
|
|
320
|
-
if (!len)
|
|
321
|
-
return this._push(writeByte, 1, 0);
|
|
322
|
-
return this.uint32(len)._push(writeBytes, len, value);
|
|
323
|
-
}
|
|
324
|
-
string(value) {
|
|
325
|
-
const len = utf8Length(value);
|
|
326
|
-
return len
|
|
327
|
-
? this.uint32(len)._push(utf8Write, len, value)
|
|
328
|
-
: this._push(writeByte, 1, 0);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
function writeBytes(val, buf, pos) {
|
|
332
|
-
if (typeof Uint8Array !== 'undefined') {
|
|
333
|
-
buf.set(val, pos);
|
|
334
|
-
}
|
|
335
|
-
else {
|
|
336
|
-
for (let i = 0; i < val.length; ++i)
|
|
337
|
-
buf[pos + i] = val[i];
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
function pool(alloc, slice, size) {
|
|
341
|
-
const SIZE = size || 8192;
|
|
342
|
-
const MAX = SIZE >>> 1;
|
|
343
|
-
let slab = null;
|
|
344
|
-
let offset = SIZE;
|
|
345
|
-
return function pool_alloc(size) {
|
|
346
|
-
if (size < 1 || size > MAX)
|
|
347
|
-
return alloc(size);
|
|
348
|
-
if (offset + size > SIZE) {
|
|
349
|
-
slab = alloc(SIZE);
|
|
350
|
-
offset = 0;
|
|
351
|
-
}
|
|
352
|
-
const buf = slice.call(slab, offset, (offset += size));
|
|
353
|
-
if (offset & 7)
|
|
354
|
-
// align to 32 bit
|
|
355
|
-
offset = (offset | 7) + 1;
|
|
356
|
-
return buf;
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
function indexOutOfRange(reader, writeLength) {
|
|
360
|
-
return RangeError('index out of range: ' +
|
|
361
|
-
reader.pos +
|
|
362
|
-
' + ' +
|
|
363
|
-
(writeLength || 1) +
|
|
364
|
-
' > ' +
|
|
365
|
-
reader.len);
|
|
366
|
-
}
|
|
367
|
-
//# sourceMappingURL=binary.js.map
|
|
1
|
+
import{utf8Length as t,utf8Read as i,utf8Write as s}from"./utf8.js";import{int64ToString as e,readInt32 as n,readUInt32 as r,uInt64ToString as h,varint32read as o,varint64read as u,writeVarint32 as a,writeVarint64 as l,int64FromString as p,int64Length as d,writeFixed32 as f,writeByte as c,zzDecode as y,zzEncode as x}from"./varint.js";export var WireType;!function(t){t[t.Varint=0]="Varint",t[t.Fixed64=1]="Fixed64",t[t.Bytes=2]="Bytes",t[t.Fixed32=5]="Fixed32"}(WireType||(WireType={}));export class BinaryReader{buf;pos;type;len;assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}constructor(t){this.buf=t?new Uint8Array(t):new Uint8Array(0),this.pos=0,this.type=0,this.len=this.buf.length}tag(){const t=this.uint32(),i=t>>>3,s=7&t;if(i<=0||s<0||s>5)throw new Error("illegal tag: field no "+i+" wire type "+s);return[i,s,t]}skip(t){if("number"==typeof t){if(this.pos+t>this.len)throw B(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw B(this)}while(128&this.buf[this.pos++]);return this}skipType(t){switch(t){case WireType.Varint:this.skip();break;case WireType.Fixed64:this.skip(8);break;case WireType.Bytes:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case WireType.Fixed32:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this}uint32(){return o.bind(this)()}int32(){return 0|this.uint32()}sint32(){const t=this.uint32();return t%2==1?(t+1)/-2:t/2}fixed32(){const t=r(this.buf,this.pos);return this.pos+=4,t}sfixed32(){const t=n(this.buf,this.pos);return this.pos+=4,t}int64(){const[t,i]=u.bind(this)();return BigInt(e(t,i))}uint64(){const[t,i]=u.bind(this)();return BigInt(h(t,i))}sint64(){let[t,i]=u.bind(this)();return[t,i]=y(t,i),BigInt(e(t,i))}fixed64(){const t=this.sfixed32(),i=this.sfixed32();return BigInt(h(t,i))}sfixed64(){const t=this.sfixed32(),i=this.sfixed32();return BigInt(e(t,i))}float(){throw new Error("float not supported")}double(){throw new Error("double not supported")}bool(){const[t,i]=u.bind(this)();return 0!==t||0!==i}bytes(){const t=this.uint32(),i=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(i,i+t)}string(){const t=this.bytes();return i(t,0,t.length)}}class w{fn;len;val;next;constructor(t,i,s){this.fn=t,this.len=i,this.val=s}proceed(t,i){this.fn&&this.fn(this.val,t,i)}}class b{head;tail;len;next;constructor(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}}export class BinaryWriter{len=0;head;tail;states;constructor(){this.head=new w(null,0,0),this.tail=this.head,this.states=null}static create(){return new BinaryWriter}static alloc(t){return"undefined"!=typeof Uint8Array?function(t,i,s){const e=s||8192,n=e>>>1;let r=null,h=e;return function(s){if(s<1||s>n)return t(s);h+s>e&&(r=t(e),h=0);const o=i.call(r,h,h+=s);return 7&h&&(h=1+(7|h)),o}}((t=>new Uint8Array(t)),Uint8Array.prototype.subarray)(t):new Array(t)}_push(t,i,s){return this.tail=this.tail.next=new w(t,i,s),this.len+=i,this}finish(){let t=this.head.next,i=0;const s=BinaryWriter.alloc(this.len);for(;t;)t.proceed(s,i),i+=t.len,t=t.next;return s}fork(){return this.states=new b(this),this.head=this.tail=new w(null,0,0),this.len=0,this}reset(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new w(null,0,0),this.len=0),this}ldelim(){const t=this.head,i=this.tail,s=this.len;return this.reset().uint32(s),s&&(this.tail.next=t.next,this.tail=i,this.len+=s),this}tag(t,i){return this.uint32((t<<3|i)>>>0)}uint32(t){return this.len+=(this.tail=this.tail.next=new w(a,(t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this}int32(t){return t<0?this._push(l,10,p(t.toString())):this.uint32(t)}sint32(t){return this.uint32((t<<1^t>>31)>>>0)}int64(t){const{lo:i,hi:s}=p(t.toString());return this._push(l,d(i,s),{lo:i,hi:s})}uint64=BinaryWriter.prototype.int64;sint64(t){let{lo:i,hi:s}=p(t.toString());return[i,s]=x(i,s),this._push(l,d(i,s),{lo:i,hi:s})}fixed64(t){const{lo:i,hi:s}=p(t.toString());return this._push(f,4,i)._push(f,4,s)}sfixed64=BinaryWriter.prototype.fixed64;bool(t){return this._push(c,1,t?1:0)}fixed32(t){return this._push(f,4,t>>>0)}sfixed32=BinaryWriter.prototype.fixed32;float(t){throw new Error("float not supported"+t)}double(t){throw new Error("double not supported"+t)}bytes(t){const i=t.length>>>0;return i?this.uint32(i)._push(g,i,t):this._push(c,1,0)}string(i){const e=t(i);return e?this.uint32(e)._push(s,e,i):this._push(c,1,0)}}function g(t,i,s){if("undefined"!=typeof Uint8Array)i.set(t,s);else for(let e=0;e<t.length;++e)i[s+e]=t[e]}function B(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}
|
|
@@ -1,40 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import * as _17 from './cctp/v1/attester.js';
|
|
3
|
-
import * as _18 from './cctp/v1/burn_message.js';
|
|
4
|
-
import * as _19 from './cctp/v1/burning_and_minting_paused.js';
|
|
5
|
-
import * as _20 from './cctp/v1/events.js';
|
|
6
|
-
import * as _21 from './cctp/v1/genesis.js';
|
|
7
|
-
import * as _22 from './cctp/v1/max_message_body_size.js';
|
|
8
|
-
import * as _23 from './cctp/v1/message.js';
|
|
9
|
-
import * as _24 from './cctp/v1/nonce.js';
|
|
10
|
-
import * as _25 from './cctp/v1/per_message_burn_limit.js';
|
|
11
|
-
import * as _26 from './cctp/v1/query.js';
|
|
12
|
-
import * as _27 from './cctp/v1/remote_token_messenger.js';
|
|
13
|
-
import * as _28 from './cctp/v1/sending_and_receiving_messages_paused.js';
|
|
14
|
-
import * as _29 from './cctp/v1/signature_threshold.js';
|
|
15
|
-
import * as _30 from './cctp/v1/token_pair.js';
|
|
16
|
-
import * as _31 from './cctp/v1/tx.js';
|
|
17
|
-
export var circle;
|
|
18
|
-
(function (circle) {
|
|
19
|
-
let cctp;
|
|
20
|
-
(function (cctp) {
|
|
21
|
-
cctp.v1 = {
|
|
22
|
-
..._17,
|
|
23
|
-
..._18,
|
|
24
|
-
..._19,
|
|
25
|
-
..._20,
|
|
26
|
-
..._21,
|
|
27
|
-
..._22,
|
|
28
|
-
..._23,
|
|
29
|
-
..._24,
|
|
30
|
-
..._25,
|
|
31
|
-
..._26,
|
|
32
|
-
..._27,
|
|
33
|
-
..._28,
|
|
34
|
-
..._29,
|
|
35
|
-
..._30,
|
|
36
|
-
..._31,
|
|
37
|
-
};
|
|
38
|
-
})(cctp = circle.cctp || (circle.cctp = {}));
|
|
39
|
-
})(circle || (circle = {}));
|
|
40
|
-
//# sourceMappingURL=bundle.js.map
|
|
1
|
+
import*as s from"./cctp/v1/attester.js";import*as t from"./cctp/v1/burn_message.js";import*as r from"./cctp/v1/burning_and_minting_paused.js";import*as c from"./cctp/v1/events.js";import*as m from"./cctp/v1/genesis.js";import*as e from"./cctp/v1/max_message_body_size.js";import*as o from"./cctp/v1/message.js";import*as p from"./cctp/v1/nonce.js";import*as i from"./cctp/v1/per_message_burn_limit.js";import*as a from"./cctp/v1/query.js";import*as n from"./cctp/v1/remote_token_messenger.js";import*as v from"./cctp/v1/sending_and_receiving_messages_paused.js";import*as _ from"./cctp/v1/signature_threshold.js";import*as f from"./cctp/v1/token_pair.js";import*as j from"./cctp/v1/tx.js";export var circle;!function(g){let u;!function(g){g.v1={...s,...t,...r,...c,...m,...e,...o,...p,...i,...a,...n,...v,..._,...f,...j}}(u=g.cctp||(g.cctp={}))}(circle||(circle={}));
|
|
@@ -1,63 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { BinaryReader, BinaryWriter } from '../../../binary.js';
|
|
3
|
-
import { isSet } from '../../../helpers.js';
|
|
4
|
-
import {} from '../../../json-safe.js';
|
|
5
|
-
function createBaseAttester() {
|
|
6
|
-
return {
|
|
7
|
-
attester: '',
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export const Attester = {
|
|
11
|
-
typeUrl: '/circle.cctp.v1.Attester',
|
|
12
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
13
|
-
if (message.attester !== '') {
|
|
14
|
-
writer.uint32(10).string(message.attester);
|
|
15
|
-
}
|
|
16
|
-
return writer;
|
|
17
|
-
},
|
|
18
|
-
decode(input, length) {
|
|
19
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
20
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
21
|
-
const message = createBaseAttester();
|
|
22
|
-
while (reader.pos < end) {
|
|
23
|
-
const tag = reader.uint32();
|
|
24
|
-
switch (tag >>> 3) {
|
|
25
|
-
case 1:
|
|
26
|
-
message.attester = reader.string();
|
|
27
|
-
break;
|
|
28
|
-
default:
|
|
29
|
-
reader.skipType(tag & 7);
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return message;
|
|
34
|
-
},
|
|
35
|
-
fromJSON(object) {
|
|
36
|
-
return {
|
|
37
|
-
attester: isSet(object.attester) ? String(object.attester) : '',
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
toJSON(message) {
|
|
41
|
-
const obj = {};
|
|
42
|
-
message.attester !== undefined && (obj.attester = message.attester);
|
|
43
|
-
return obj;
|
|
44
|
-
},
|
|
45
|
-
fromPartial(object) {
|
|
46
|
-
const message = createBaseAttester();
|
|
47
|
-
message.attester = object.attester ?? '';
|
|
48
|
-
return message;
|
|
49
|
-
},
|
|
50
|
-
fromProtoMsg(message) {
|
|
51
|
-
return Attester.decode(message.value);
|
|
52
|
-
},
|
|
53
|
-
toProto(message) {
|
|
54
|
-
return Attester.encode(message).finish();
|
|
55
|
-
},
|
|
56
|
-
toProtoMsg(message) {
|
|
57
|
-
return {
|
|
58
|
-
typeUrl: '/circle.cctp.v1.Attester',
|
|
59
|
-
value: Attester.encode(message).finish(),
|
|
60
|
-
};
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
//# sourceMappingURL=attester.js.map
|
|
1
|
+
import{BinaryReader as t,BinaryWriter as e}from"../../../binary.js";import{isSet as r}from"../../../helpers.js";import{}from"../../../json-safe.js";export const Attester={typeUrl:"/circle.cctp.v1.Attester",encode:(t,r=e.create())=>(""!==t.attester&&r.uint32(10).string(t.attester),r),decode(e,r){const s=e instanceof t?e:new t(e);let o=void 0===r?s.len:s.pos+r;const n={attester:""};for(;s.pos<o;){const t=s.uint32();if(t>>>3==1)n.attester=s.string();else s.skipType(7&t)}return n},fromJSON:t=>({attester:r(t.attester)?String(t.attester):""}),toJSON(t){const e={};return void 0!==t.attester&&(e.attester=t.attester),e},fromPartial(t){const e={attester:""};return e.attester=t.attester??"",e},fromProtoMsg:t=>Attester.decode(t.value),toProto:t=>Attester.encode(t).finish(),toProtoMsg:t=>({typeUrl:"/circle.cctp.v1.Attester",value:Attester.encode(t).finish()})};
|
|
@@ -1,117 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { BinaryReader, BinaryWriter } from '../../../binary.js';
|
|
3
|
-
import { isSet, bytesFromBase64, base64FromBytes } from '../../../helpers.js';
|
|
4
|
-
import {} from '../../../json-safe.js';
|
|
5
|
-
function createBaseBurnMessage() {
|
|
6
|
-
return {
|
|
7
|
-
version: 0,
|
|
8
|
-
burnToken: new Uint8Array(),
|
|
9
|
-
mintRecipient: new Uint8Array(),
|
|
10
|
-
amount: '',
|
|
11
|
-
messageSender: new Uint8Array(),
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export const BurnMessage = {
|
|
15
|
-
typeUrl: '/circle.cctp.v1.BurnMessage',
|
|
16
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
17
|
-
if (message.version !== 0) {
|
|
18
|
-
writer.uint32(8).uint32(message.version);
|
|
19
|
-
}
|
|
20
|
-
if (message.burnToken.length !== 0) {
|
|
21
|
-
writer.uint32(18).bytes(message.burnToken);
|
|
22
|
-
}
|
|
23
|
-
if (message.mintRecipient.length !== 0) {
|
|
24
|
-
writer.uint32(26).bytes(message.mintRecipient);
|
|
25
|
-
}
|
|
26
|
-
if (message.amount !== '') {
|
|
27
|
-
writer.uint32(34).string(message.amount);
|
|
28
|
-
}
|
|
29
|
-
if (message.messageSender.length !== 0) {
|
|
30
|
-
writer.uint32(42).bytes(message.messageSender);
|
|
31
|
-
}
|
|
32
|
-
return writer;
|
|
33
|
-
},
|
|
34
|
-
decode(input, length) {
|
|
35
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
36
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
37
|
-
const message = createBaseBurnMessage();
|
|
38
|
-
while (reader.pos < end) {
|
|
39
|
-
const tag = reader.uint32();
|
|
40
|
-
switch (tag >>> 3) {
|
|
41
|
-
case 1:
|
|
42
|
-
message.version = reader.uint32();
|
|
43
|
-
break;
|
|
44
|
-
case 2:
|
|
45
|
-
message.burnToken = reader.bytes();
|
|
46
|
-
break;
|
|
47
|
-
case 3:
|
|
48
|
-
message.mintRecipient = reader.bytes();
|
|
49
|
-
break;
|
|
50
|
-
case 4:
|
|
51
|
-
message.amount = reader.string();
|
|
52
|
-
break;
|
|
53
|
-
case 5:
|
|
54
|
-
message.messageSender = reader.bytes();
|
|
55
|
-
break;
|
|
56
|
-
default:
|
|
57
|
-
reader.skipType(tag & 7);
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return message;
|
|
62
|
-
},
|
|
63
|
-
fromJSON(object) {
|
|
64
|
-
return {
|
|
65
|
-
version: isSet(object.version) ? Number(object.version) : 0,
|
|
66
|
-
burnToken: isSet(object.burnToken)
|
|
67
|
-
? bytesFromBase64(object.burnToken)
|
|
68
|
-
: new Uint8Array(),
|
|
69
|
-
mintRecipient: isSet(object.mintRecipient)
|
|
70
|
-
? bytesFromBase64(object.mintRecipient)
|
|
71
|
-
: new Uint8Array(),
|
|
72
|
-
amount: isSet(object.amount) ? String(object.amount) : '',
|
|
73
|
-
messageSender: isSet(object.messageSender)
|
|
74
|
-
? bytesFromBase64(object.messageSender)
|
|
75
|
-
: new Uint8Array(),
|
|
76
|
-
};
|
|
77
|
-
},
|
|
78
|
-
toJSON(message) {
|
|
79
|
-
const obj = {};
|
|
80
|
-
message.version !== undefined &&
|
|
81
|
-
(obj.version = Math.round(message.version));
|
|
82
|
-
message.burnToken !== undefined &&
|
|
83
|
-
(obj.burnToken = base64FromBytes(message.burnToken !== undefined ? message.burnToken : new Uint8Array()));
|
|
84
|
-
message.mintRecipient !== undefined &&
|
|
85
|
-
(obj.mintRecipient = base64FromBytes(message.mintRecipient !== undefined
|
|
86
|
-
? message.mintRecipient
|
|
87
|
-
: new Uint8Array()));
|
|
88
|
-
message.amount !== undefined && (obj.amount = message.amount);
|
|
89
|
-
message.messageSender !== undefined &&
|
|
90
|
-
(obj.messageSender = base64FromBytes(message.messageSender !== undefined
|
|
91
|
-
? message.messageSender
|
|
92
|
-
: new Uint8Array()));
|
|
93
|
-
return obj;
|
|
94
|
-
},
|
|
95
|
-
fromPartial(object) {
|
|
96
|
-
const message = createBaseBurnMessage();
|
|
97
|
-
message.version = object.version ?? 0;
|
|
98
|
-
message.burnToken = object.burnToken ?? new Uint8Array();
|
|
99
|
-
message.mintRecipient = object.mintRecipient ?? new Uint8Array();
|
|
100
|
-
message.amount = object.amount ?? '';
|
|
101
|
-
message.messageSender = object.messageSender ?? new Uint8Array();
|
|
102
|
-
return message;
|
|
103
|
-
},
|
|
104
|
-
fromProtoMsg(message) {
|
|
105
|
-
return BurnMessage.decode(message.value);
|
|
106
|
-
},
|
|
107
|
-
toProto(message) {
|
|
108
|
-
return BurnMessage.encode(message).finish();
|
|
109
|
-
},
|
|
110
|
-
toProtoMsg(message) {
|
|
111
|
-
return {
|
|
112
|
-
typeUrl: '/circle.cctp.v1.BurnMessage',
|
|
113
|
-
value: BurnMessage.encode(message).finish(),
|
|
114
|
-
};
|
|
115
|
-
},
|
|
116
|
-
};
|
|
117
|
-
//# sourceMappingURL=burn_message.js.map
|
|
1
|
+
import{BinaryReader as e,BinaryWriter as n}from"../../../binary.js";import{isSet as r,bytesFromBase64 as t,base64FromBytes as i}from"../../../helpers.js";import{}from"../../../json-safe.js";function s(){return{version:0,burnToken:new Uint8Array,mintRecipient:new Uint8Array,amount:"",messageSender:new Uint8Array}}export const BurnMessage={typeUrl:"/circle.cctp.v1.BurnMessage",encode:(e,r=n.create())=>(0!==e.version&&r.uint32(8).uint32(e.version),0!==e.burnToken.length&&r.uint32(18).bytes(e.burnToken),0!==e.mintRecipient.length&&r.uint32(26).bytes(e.mintRecipient),""!==e.amount&&r.uint32(34).string(e.amount),0!==e.messageSender.length&&r.uint32(42).bytes(e.messageSender),r),decode(n,r){const t=n instanceof e?n:new e(n);let i=void 0===r?t.len:t.pos+r;const o=s();for(;t.pos<i;){const e=t.uint32();switch(e>>>3){case 1:o.version=t.uint32();break;case 2:o.burnToken=t.bytes();break;case 3:o.mintRecipient=t.bytes();break;case 4:o.amount=t.string();break;case 5:o.messageSender=t.bytes();break;default:t.skipType(7&e)}}return o},fromJSON:e=>({version:r(e.version)?Number(e.version):0,burnToken:r(e.burnToken)?t(e.burnToken):new Uint8Array,mintRecipient:r(e.mintRecipient)?t(e.mintRecipient):new Uint8Array,amount:r(e.amount)?String(e.amount):"",messageSender:r(e.messageSender)?t(e.messageSender):new Uint8Array}),toJSON(e){const n={};return void 0!==e.version&&(n.version=Math.round(e.version)),void 0!==e.burnToken&&(n.burnToken=i(void 0!==e.burnToken?e.burnToken:new Uint8Array)),void 0!==e.mintRecipient&&(n.mintRecipient=i(void 0!==e.mintRecipient?e.mintRecipient:new Uint8Array)),void 0!==e.amount&&(n.amount=e.amount),void 0!==e.messageSender&&(n.messageSender=i(void 0!==e.messageSender?e.messageSender:new Uint8Array)),n},fromPartial(e){const n=s();return n.version=e.version??0,n.burnToken=e.burnToken??new Uint8Array,n.mintRecipient=e.mintRecipient??new Uint8Array,n.amount=e.amount??"",n.messageSender=e.messageSender??new Uint8Array,n},fromProtoMsg:e=>BurnMessage.decode(e.value),toProto:e=>BurnMessage.encode(e).finish(),toProtoMsg:e=>({typeUrl:"/circle.cctp.v1.BurnMessage",value:BurnMessage.encode(e).finish()})};
|
|
@@ -1,63 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { BinaryReader, BinaryWriter } from '../../../binary.js';
|
|
3
|
-
import { isSet } from '../../../helpers.js';
|
|
4
|
-
import {} from '../../../json-safe.js';
|
|
5
|
-
function createBaseBurningAndMintingPaused() {
|
|
6
|
-
return {
|
|
7
|
-
paused: false,
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export const BurningAndMintingPaused = {
|
|
11
|
-
typeUrl: '/circle.cctp.v1.BurningAndMintingPaused',
|
|
12
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
13
|
-
if (message.paused === true) {
|
|
14
|
-
writer.uint32(8).bool(message.paused);
|
|
15
|
-
}
|
|
16
|
-
return writer;
|
|
17
|
-
},
|
|
18
|
-
decode(input, length) {
|
|
19
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
20
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
21
|
-
const message = createBaseBurningAndMintingPaused();
|
|
22
|
-
while (reader.pos < end) {
|
|
23
|
-
const tag = reader.uint32();
|
|
24
|
-
switch (tag >>> 3) {
|
|
25
|
-
case 1:
|
|
26
|
-
message.paused = reader.bool();
|
|
27
|
-
break;
|
|
28
|
-
default:
|
|
29
|
-
reader.skipType(tag & 7);
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return message;
|
|
34
|
-
},
|
|
35
|
-
fromJSON(object) {
|
|
36
|
-
return {
|
|
37
|
-
paused: isSet(object.paused) ? Boolean(object.paused) : false,
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
toJSON(message) {
|
|
41
|
-
const obj = {};
|
|
42
|
-
message.paused !== undefined && (obj.paused = message.paused);
|
|
43
|
-
return obj;
|
|
44
|
-
},
|
|
45
|
-
fromPartial(object) {
|
|
46
|
-
const message = createBaseBurningAndMintingPaused();
|
|
47
|
-
message.paused = object.paused ?? false;
|
|
48
|
-
return message;
|
|
49
|
-
},
|
|
50
|
-
fromProtoMsg(message) {
|
|
51
|
-
return BurningAndMintingPaused.decode(message.value);
|
|
52
|
-
},
|
|
53
|
-
toProto(message) {
|
|
54
|
-
return BurningAndMintingPaused.encode(message).finish();
|
|
55
|
-
},
|
|
56
|
-
toProtoMsg(message) {
|
|
57
|
-
return {
|
|
58
|
-
typeUrl: '/circle.cctp.v1.BurningAndMintingPaused',
|
|
59
|
-
value: BurningAndMintingPaused.encode(message).finish(),
|
|
60
|
-
};
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
//# sourceMappingURL=burning_and_minting_paused.js.map
|
|
1
|
+
import{BinaryReader as n,BinaryWriter as e}from"../../../binary.js";import{isSet as o}from"../../../helpers.js";import{}from"../../../json-safe.js";export const BurningAndMintingPaused={typeUrl:"/circle.cctp.v1.BurningAndMintingPaused",encode:(n,o=e.create())=>(!0===n.paused&&o.uint32(8).bool(n.paused),o),decode(e,o){const s=e instanceof n?e:new n(e);let i=void 0===o?s.len:s.pos+o;const t={paused:!1};for(;s.pos<i;){const n=s.uint32();if(n>>>3==1)t.paused=s.bool();else s.skipType(7&n)}return t},fromJSON:n=>({paused:!!o(n.paused)&&Boolean(n.paused)}),toJSON(n){const e={};return void 0!==n.paused&&(e.paused=n.paused),e},fromPartial(n){const e={paused:!1};return e.paused=n.paused??!1,e},fromProtoMsg:n=>BurningAndMintingPaused.decode(n.value),toProto:n=>BurningAndMintingPaused.encode(n).finish(),toProtoMsg:n=>({typeUrl:"/circle.cctp.v1.BurningAndMintingPaused",value:BurningAndMintingPaused.encode(n).finish()})};
|