@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.
Files changed (213) hide show
  1. package/dist/address-hooks.d.ts +4 -3
  2. package/dist/address-hooks.js +1 -217
  3. package/dist/address-hooks.js.map +1 -1
  4. package/dist/codegen/agoric/bundle.js +1 -51
  5. package/dist/codegen/agoric/lien/genesis.js +1 -143
  6. package/dist/codegen/agoric/lien/lien.js +1 -87
  7. package/dist/codegen/agoric/swingset/genesis.js +1 -181
  8. package/dist/codegen/agoric/swingset/msgs.js +1 -700
  9. package/dist/codegen/agoric/swingset/query.js +1 -356
  10. package/dist/codegen/agoric/swingset/swingset.js +1 -816
  11. package/dist/codegen/agoric/vbank/genesis.js +1 -82
  12. package/dist/codegen/agoric/vbank/msgs.js +1 -2
  13. package/dist/codegen/agoric/vbank/query.js +1 -222
  14. package/dist/codegen/agoric/vbank/vbank.js +1 -237
  15. package/dist/codegen/agoric/vibc/msgs.js +1 -127
  16. package/dist/codegen/agoric/vlocalchain/vlocalchain.js +1 -307
  17. package/dist/codegen/agoric/vstorage/genesis.js +1 -138
  18. package/dist/codegen/agoric/vstorage/query.js +1 -441
  19. package/dist/codegen/agoric/vstorage/vstorage.js +1 -128
  20. package/dist/codegen/agoric/vtransfer/genesis.js +1 -70
  21. package/dist/codegen/amino/amino.js +1 -2
  22. package/dist/codegen/amino/bundle.js +1 -6
  23. package/dist/codegen/binary.js +1 -367
  24. package/dist/codegen/circle/bundle.d.ts +0 -506
  25. package/dist/codegen/circle/bundle.js +1 -40
  26. package/dist/codegen/circle/cctp/v1/attester.js +1 -63
  27. package/dist/codegen/circle/cctp/v1/burn_message.js +1 -117
  28. package/dist/codegen/circle/cctp/v1/burning_and_minting_paused.js +1 -63
  29. package/dist/codegen/circle/cctp/v1/events.js +1 -1612
  30. package/dist/codegen/circle/cctp/v1/genesis.js +1 -295
  31. package/dist/codegen/circle/cctp/v1/max_message_body_size.js +1 -69
  32. package/dist/codegen/circle/cctp/v1/message.js +1 -160
  33. package/dist/codegen/circle/cctp/v1/nonce.js +1 -80
  34. package/dist/codegen/circle/cctp/v1/per_message_burn_limit.js +1 -73
  35. package/dist/codegen/circle/cctp/v1/query.js +1 -2421
  36. package/dist/codegen/circle/cctp/v1/remote_token_messenger.js +1 -77
  37. package/dist/codegen/circle/cctp/v1/sending_and_receiving_messages_paused.js +1 -63
  38. package/dist/codegen/circle/cctp/v1/signature_threshold.js +1 -63
  39. package/dist/codegen/circle/cctp/v1/token_pair.js +1 -91
  40. package/dist/codegen/circle/cctp/v1/tx.d.ts +0 -998
  41. package/dist/codegen/circle/cctp/v1/tx.js +1 -3264
  42. package/dist/codegen/circle/cctp/v1/tx.js.map +1 -1
  43. package/dist/codegen/cosmos/auth/v1beta1/auth.js +1 -337
  44. package/dist/codegen/cosmos/auth/v1beta1/genesis.js +1 -86
  45. package/dist/codegen/cosmos/auth/v1beta1/query.js +1 -1113
  46. package/dist/codegen/cosmos/authz/v1beta1/authz.js +1 -334
  47. package/dist/codegen/cosmos/authz/v1beta1/event.js +1 -161
  48. package/dist/codegen/cosmos/authz/v1beta1/genesis.js +1 -71
  49. package/dist/codegen/cosmos/authz/v1beta1/query.js +1 -506
  50. package/dist/codegen/cosmos/authz/v1beta1/tx.js +1 -415
  51. package/dist/codegen/cosmos/bank/v1beta1/authz.js +1 -71
  52. package/dist/codegen/cosmos/bank/v1beta1/bank.js +1 -592
  53. package/dist/codegen/cosmos/bank/v1beta1/genesis.js +1 -196
  54. package/dist/codegen/cosmos/bank/v1beta1/query.js +1 -1347
  55. package/dist/codegen/cosmos/bank/v1beta1/tx.js +1 -267
  56. package/dist/codegen/cosmos/base/abci/v1beta1/abci.js +1 -1012
  57. package/dist/codegen/cosmos/base/node/v1beta1/query.js +1 -112
  58. package/dist/codegen/cosmos/base/query/v1beta1/pagination.js +1 -189
  59. package/dist/codegen/cosmos/base/reflection/v2alpha1/reflection.js +1 -1755
  60. package/dist/codegen/cosmos/base/v1beta1/coin.js +1 -257
  61. package/dist/codegen/cosmos/bundle.js +1 -249
  62. package/dist/codegen/cosmos/crypto/ed25519/keys.js +1 -123
  63. package/dist/codegen/cosmos/crypto/hd/v1/hd.js +1 -109
  64. package/dist/codegen/cosmos/crypto/keyring/v1/record.js +1 -367
  65. package/dist/codegen/cosmos/crypto/multisig/keys.js +1 -82
  66. package/dist/codegen/cosmos/crypto/multisig/v1beta1/multisig.js +1 -144
  67. package/dist/codegen/cosmos/crypto/secp256k1/keys.js +1 -123
  68. package/dist/codegen/cosmos/crypto/secp256r1/keys.js +1 -125
  69. package/dist/codegen/cosmos/distribution/v1beta1/distribution.js +1 -978
  70. package/dist/codegen/cosmos/distribution/v1beta1/genesis.js +1 -837
  71. package/dist/codegen/cosmos/distribution/v1beta1/query.js +1 -1207
  72. package/dist/codegen/cosmos/distribution/v1beta1/tx.js +1 -512
  73. package/dist/codegen/cosmos/feegrant/v1beta1/feegrant.js +1 -412
  74. package/dist/codegen/cosmos/feegrant/v1beta1/genesis.js +1 -71
  75. package/dist/codegen/cosmos/feegrant/v1beta1/query.js +1 -461
  76. package/dist/codegen/cosmos/feegrant/v1beta1/tx.js +1 -267
  77. package/dist/codegen/cosmos/gov/v1/genesis.js +1 -177
  78. package/dist/codegen/cosmos/gov/v1/gov.js +1 -928
  79. package/dist/codegen/cosmos/gov/v1/query.js +1 -1216
  80. package/dist/codegen/cosmos/gov/v1/tx.js +1 -730
  81. package/dist/codegen/cosmos/gov/v1beta1/genesis.js +1 -177
  82. package/dist/codegen/cosmos/gov/v1beta1/gov.js +1 -1003
  83. package/dist/codegen/cosmos/gov/v1beta1/query.js +1 -1216
  84. package/dist/codegen/cosmos/gov/v1beta1/tx.js +1 -578
  85. package/dist/codegen/cosmos/group/v1/events.js +1 -696
  86. package/dist/codegen/cosmos/group/v1/genesis.js +1 -190
  87. package/dist/codegen/cosmos/group/v1/query.js +1 -2096
  88. package/dist/codegen/cosmos/group/v1/tx.js +1 -2073
  89. package/dist/codegen/cosmos/group/v1/types.js +1 -1387
  90. package/dist/codegen/cosmos/mint/v1beta1/genesis.js +1 -82
  91. package/dist/codegen/cosmos/mint/v1beta1/mint.js +1 -211
  92. package/dist/codegen/cosmos/mint/v1beta1/query.js +1 -330
  93. package/dist/codegen/cosmos/msg/v1/msg.js +1 -2
  94. package/dist/codegen/cosmos/params/v1beta1/params.js +1 -171
  95. package/dist/codegen/cosmos/params/v1beta1/query.js +1 -327
  96. package/dist/codegen/cosmos/staking/v1beta1/authz.js +1 -240
  97. package/dist/codegen/cosmos/staking/v1beta1/genesis.js +1 -256
  98. package/dist/codegen/cosmos/staking/v1beta1/query.js +1 -2069
  99. package/dist/codegen/cosmos/staking/v1beta1/staking.js +1 -1915
  100. package/dist/codegen/cosmos/staking/v1beta1/tx.js +1 -968
  101. package/dist/codegen/cosmos/tx/signing/v1beta1/signing.js +1 -516
  102. package/dist/codegen/cosmos/tx/v1beta1/service.js +1 -975
  103. package/dist/codegen/cosmos/tx/v1beta1/tx.js +1 -1256
  104. package/dist/codegen/cosmos/upgrade/v1beta1/query.js +1 -592
  105. package/dist/codegen/cosmos/upgrade/v1beta1/tx.js +1 -228
  106. package/dist/codegen/cosmos/upgrade/v1beta1/upgrade.js +1 -352
  107. package/dist/codegen/cosmos/vesting/v1beta1/tx.js +1 -865
  108. package/dist/codegen/cosmos/vesting/v1beta1/vesting.js +1 -674
  109. package/dist/codegen/cosmos_proto/bundle.js +1 -6
  110. package/dist/codegen/cosmos_proto/cosmos.js +1 -208
  111. package/dist/codegen/gogoproto/bundle.js +1 -6
  112. package/dist/codegen/gogoproto/gogo.js +1 -2
  113. package/dist/codegen/google/api/annotations.js +1 -2
  114. package/dist/codegen/google/api/http.js +1 -319
  115. package/dist/codegen/google/bundle.js +1 -17
  116. package/dist/codegen/google/protobuf/any.js +1 -77
  117. package/dist/codegen/google/protobuf/descriptor.js +1 -3421
  118. package/dist/codegen/google/protobuf/duration.js +1 -79
  119. package/dist/codegen/google/protobuf/empty.js +1 -50
  120. package/dist/codegen/google/protobuf/timestamp.js +1 -79
  121. package/dist/codegen/helpers.js +1 -196
  122. package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/controller.js +1 -66
  123. package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/query.js +1 -243
  124. package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/tx.js +1 -314
  125. package/dist/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis.js +1 -503
  126. package/dist/codegen/ibc/applications/interchain_accounts/host/v1/host.js +1 -83
  127. package/dist/codegen/ibc/applications/interchain_accounts/host/v1/query.js +1 -114
  128. package/dist/codegen/ibc/applications/interchain_accounts/v1/account.js +1 -86
  129. package/dist/codegen/ibc/applications/interchain_accounts/v1/metadata.js +1 -119
  130. package/dist/codegen/ibc/applications/interchain_accounts/v1/packet.js +1 -190
  131. package/dist/codegen/ibc/applications/transfer/v1/authz.js +1 -178
  132. package/dist/codegen/ibc/applications/transfer/v1/genesis.js +1 -96
  133. package/dist/codegen/ibc/applications/transfer/v1/query.js +1 -634
  134. package/dist/codegen/ibc/applications/transfer/v1/transfer.js +1 -147
  135. package/dist/codegen/ibc/applications/transfer/v1/tx.js +1 -220
  136. package/dist/codegen/ibc/applications/transfer/v2/packet.js +1 -103
  137. package/dist/codegen/ibc/bundle.js +1 -142
  138. package/dist/codegen/ibc/core/channel/v1/channel.js +1 -845
  139. package/dist/codegen/ibc/core/channel/v1/genesis.js +1 -281
  140. package/dist/codegen/ibc/core/channel/v1/query.js +1 -2344
  141. package/dist/codegen/ibc/core/channel/v1/tx.js +1 -1745
  142. package/dist/codegen/ibc/core/client/v1/client.js +1 -583
  143. package/dist/codegen/ibc/core/client/v1/genesis.js +1 -301
  144. package/dist/codegen/ibc/core/client/v1/query.js +1 -1283
  145. package/dist/codegen/ibc/core/client/v1/tx.js +1 -587
  146. package/dist/codegen/ibc/core/commitment/v1/commitment.js +1 -259
  147. package/dist/codegen/ibc/core/connection/v1/connection.js +1 -678
  148. package/dist/codegen/ibc/core/connection/v1/genesis.js +1 -122
  149. package/dist/codegen/ibc/core/connection/v1/query.js +1 -952
  150. package/dist/codegen/ibc/core/connection/v1/tx.js +1 -843
  151. package/dist/codegen/ibc/lightclients/localhost/v1/localhost.js +1 -78
  152. package/dist/codegen/ibc/lightclients/solomachine/v1/solomachine.js +1 -1520
  153. package/dist/codegen/ibc/lightclients/solomachine/v2/solomachine.js +1 -1514
  154. package/dist/codegen/ibc/lightclients/tendermint/v1/tendermint.js +1 -628
  155. package/dist/codegen/icq/bundle.js +1 -17
  156. package/dist/codegen/icq/v1/genesis.js +1 -78
  157. package/dist/codegen/icq/v1/icq.js +1 -83
  158. package/dist/codegen/icq/v1/packet.js +1 -270
  159. package/dist/codegen/icq/v1/query.js +1 -114
  160. package/dist/codegen/icq/v1/tx.js +1 -124
  161. package/dist/codegen/ics23/bundle.js +1 -6
  162. package/dist/codegen/index.js +1 -23
  163. package/dist/codegen/json-safe.js +1 -8
  164. package/dist/codegen/proofs.js +1 -1436
  165. package/dist/codegen/stride/bundle.js +1 -71
  166. package/dist/codegen/stride/epochs/genesis.js +1 -227
  167. package/dist/codegen/stride/epochs/query.js +1 -398
  168. package/dist/codegen/stride/records/callbacks.js +1 -136
  169. package/dist/codegen/stride/records/genesis.js +1 -186
  170. package/dist/codegen/stride/records/params.js +1 -50
  171. package/dist/codegen/stride/records/query.js +1 -1552
  172. package/dist/codegen/stride/records/records.js +1 -939
  173. package/dist/codegen/stride/stakedym/genesis.js +1 -312
  174. package/dist/codegen/stride/stakedym/query.js +1 -887
  175. package/dist/codegen/stride/stakedym/stakedym.js +1 -909
  176. package/dist/codegen/stride/stakedym/tx.js +1 -1661
  177. package/dist/codegen/stride/stakeibc/address_unbonding.js +1 -135
  178. package/dist/codegen/stride/stakeibc/callbacks.js +1 -1191
  179. package/dist/codegen/stride/stakeibc/epoch_tracker.js +1 -115
  180. package/dist/codegen/stride/stakeibc/genesis.js +1 -135
  181. package/dist/codegen/stride/stakeibc/gov.js +1 -212
  182. package/dist/codegen/stride/stakeibc/host_zone.js +1 -544
  183. package/dist/codegen/stride/stakeibc/ica_account.js +1 -165
  184. package/dist/codegen/stride/stakeibc/packet.js +1 -113
  185. package/dist/codegen/stride/stakeibc/params.js +1 -317
  186. package/dist/codegen/stride/stakeibc/query.js +1 -1372
  187. package/dist/codegen/stride/stakeibc/trade_route.js +1 -377
  188. package/dist/codegen/stride/stakeibc/tx.js +1 -3392
  189. package/dist/codegen/stride/stakeibc/validator.js +1 -170
  190. package/dist/codegen/stride/staketia/genesis.js +1 -312
  191. package/dist/codegen/stride/staketia/query.js +1 -887
  192. package/dist/codegen/stride/staketia/staketia.js +1 -819
  193. package/dist/codegen/stride/staketia/tx.js +1 -1671
  194. package/dist/codegen/tendermint/abci/types.d.ts +264 -692
  195. package/dist/codegen/tendermint/abci/types.js +1 -4434
  196. package/dist/codegen/tendermint/abci/types.js.map +1 -1
  197. package/dist/codegen/tendermint/bundle.d.ts +0 -272
  198. package/dist/codegen/tendermint/bundle.js +1 -42
  199. package/dist/codegen/tendermint/crypto/keys.js +1 -85
  200. package/dist/codegen/tendermint/crypto/proof.js +1 -409
  201. package/dist/codegen/tendermint/libs/bits/types.js +1 -94
  202. package/dist/codegen/tendermint/p2p/types.js +1 -506
  203. package/dist/codegen/tendermint/types/block.js +1 -119
  204. package/dist/codegen/tendermint/types/evidence.js +1 -415
  205. package/dist/codegen/tendermint/types/params.js +1 -529
  206. package/dist/codegen/tendermint/types/types.js +1 -1534
  207. package/dist/codegen/tendermint/types/validator.js +1 -299
  208. package/dist/codegen/tendermint/version/types.js +1 -155
  209. package/dist/codegen/utf8.js +1 -138
  210. package/dist/codegen/varint.js +1 -409
  211. package/dist/helpers.js +1 -22
  212. package/dist/index.js +1 -6
  213. package/package.json +12 -10
@@ -1,409 +1 @@
1
- //@ts-nocheck
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 2008 Google Inc. All rights reserved.
8
- //
9
- // Redistribution and use in source and binary forms, with or without
10
- // modification, are permitted provided that the following conditions are
11
- // met:
12
- //
13
- // * Redistributions of source code must retain the above copyright
14
- // notice, this list of conditions and the following disclaimer.
15
- // * Redistributions in binary form must reproduce the above
16
- // copyright notice, this list of conditions and the following disclaimer
17
- // in the documentation and/or other materials provided with the
18
- // distribution.
19
- // * Neither the name of Google Inc. nor the names of its
20
- // contributors may be used to endorse or promote products derived from
21
- // this software without specific prior written permission.
22
- //
23
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
- //
35
- // Code generated by the Protocol Buffer compiler is owned by the owner
36
- // of the input file used when generating it. This code is not
37
- // standalone and requires a support library to be linked with it. This
38
- // support library is itself covered by the above license.
39
- /* eslint-disable prefer-const,@typescript-eslint/restrict-plus-operands */
40
- /**
41
- * Read a 64 bit varint as two JS numbers.
42
- *
43
- * Returns tuple:
44
- * [0]: low bits
45
- * [1]: high bits
46
- *
47
- * Copyright 2008 Google Inc. All rights reserved.
48
- *
49
- * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L175
50
- */
51
- export function varint64read() {
52
- let lowBits = 0;
53
- let highBits = 0;
54
- for (let shift = 0; shift < 28; shift += 7) {
55
- let b = this.buf[this.pos++];
56
- lowBits |= (b & 0x7f) << shift;
57
- if ((b & 0x80) == 0) {
58
- this.assertBounds();
59
- return [lowBits, highBits];
60
- }
61
- }
62
- let middleByte = this.buf[this.pos++];
63
- // last four bits of the first 32 bit number
64
- lowBits |= (middleByte & 0x0f) << 28;
65
- // 3 upper bits are part of the next 32 bit number
66
- highBits = (middleByte & 0x70) >> 4;
67
- if ((middleByte & 0x80) == 0) {
68
- this.assertBounds();
69
- return [lowBits, highBits];
70
- }
71
- for (let shift = 3; shift <= 31; shift += 7) {
72
- let b = this.buf[this.pos++];
73
- highBits |= (b & 0x7f) << shift;
74
- if ((b & 0x80) == 0) {
75
- this.assertBounds();
76
- return [lowBits, highBits];
77
- }
78
- }
79
- throw new Error('invalid varint');
80
- }
81
- /**
82
- * Write a 64 bit varint, given as two JS numbers, to the given bytes array.
83
- *
84
- * Copyright 2008 Google Inc. All rights reserved.
85
- *
86
- * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/writer.js#L344
87
- */
88
- export function varint64write(lo, hi, bytes) {
89
- for (let i = 0; i < 28; i = i + 7) {
90
- const shift = lo >>> i;
91
- const hasNext = !(shift >>> 7 == 0 && hi == 0);
92
- const byte = (hasNext ? shift | 0x80 : shift) & 0xff;
93
- bytes.push(byte);
94
- if (!hasNext) {
95
- return;
96
- }
97
- }
98
- const splitBits = ((lo >>> 28) & 0x0f) | ((hi & 0x07) << 4);
99
- const hasMoreBits = !(hi >> 3 == 0);
100
- bytes.push((hasMoreBits ? splitBits | 0x80 : splitBits) & 0xff);
101
- if (!hasMoreBits) {
102
- return;
103
- }
104
- for (let i = 3; i < 31; i = i + 7) {
105
- const shift = hi >>> i;
106
- const hasNext = !(shift >>> 7 == 0);
107
- const byte = (hasNext ? shift | 0x80 : shift) & 0xff;
108
- bytes.push(byte);
109
- if (!hasNext) {
110
- return;
111
- }
112
- }
113
- bytes.push((hi >>> 31) & 0x01);
114
- }
115
- // constants for binary math
116
- const TWO_PWR_32_DBL = 0x100000000;
117
- /**
118
- * Parse decimal string of 64 bit integer value as two JS numbers.
119
- *
120
- * Copyright 2008 Google Inc. All rights reserved.
121
- *
122
- * See https://github.com/protocolbuffers/protobuf-javascript/blob/a428c58273abad07c66071d9753bc4d1289de426/experimental/runtime/int64.js#L10
123
- */
124
- export function int64FromString(dec) {
125
- // Check for minus sign.
126
- const minus = dec[0] === '-';
127
- if (minus) {
128
- dec = dec.slice(1);
129
- }
130
- // Work 6 decimal digits at a time, acting like we're converting base 1e6
131
- // digits to binary. This is safe to do with floating point math because
132
- // Number.isSafeInteger(ALL_32_BITS * 1e6) == true.
133
- const base = 1e6;
134
- let lowBits = 0;
135
- let highBits = 0;
136
- function add1e6digit(begin, end) {
137
- // Note: Number('') is 0.
138
- const digit1e6 = Number(dec.slice(begin, end));
139
- highBits *= base;
140
- lowBits = lowBits * base + digit1e6;
141
- // Carry bits from lowBits to
142
- if (lowBits >= TWO_PWR_32_DBL) {
143
- highBits = highBits + ((lowBits / TWO_PWR_32_DBL) | 0);
144
- lowBits = lowBits % TWO_PWR_32_DBL;
145
- }
146
- }
147
- add1e6digit(-24, -18);
148
- add1e6digit(-18, -12);
149
- add1e6digit(-12, -6);
150
- add1e6digit(-6);
151
- return minus ? negate(lowBits, highBits) : newBits(lowBits, highBits);
152
- }
153
- /**
154
- * Losslessly converts a 64-bit signed integer in 32:32 split representation
155
- * into a decimal string.
156
- *
157
- * Copyright 2008 Google Inc. All rights reserved.
158
- *
159
- * See https://github.com/protocolbuffers/protobuf-javascript/blob/a428c58273abad07c66071d9753bc4d1289de426/experimental/runtime/int64.js#L10
160
- */
161
- export function int64ToString(lo, hi) {
162
- let bits = newBits(lo, hi);
163
- // If we're treating the input as a signed value and the high bit is set, do
164
- // a manual two's complement conversion before the decimal conversion.
165
- const negative = bits.hi & 0x80000000;
166
- if (negative) {
167
- bits = negate(bits.lo, bits.hi);
168
- }
169
- const result = uInt64ToString(bits.lo, bits.hi);
170
- return negative ? '-' + result : result;
171
- }
172
- /**
173
- * Losslessly converts a 64-bit unsigned integer in 32:32 split representation
174
- * into a decimal string.
175
- *
176
- * Copyright 2008 Google Inc. All rights reserved.
177
- *
178
- * See https://github.com/protocolbuffers/protobuf-javascript/blob/a428c58273abad07c66071d9753bc4d1289de426/experimental/runtime/int64.js#L10
179
- */
180
- export function uInt64ToString(lo, hi) {
181
- ({ lo, hi } = toUnsigned(lo, hi));
182
- // Skip the expensive conversion if the number is small enough to use the
183
- // built-in conversions.
184
- // Number.MAX_SAFE_INTEGER = 0x001FFFFF FFFFFFFF, thus any number with
185
- // highBits <= 0x1FFFFF can be safely expressed with a double and retain
186
- // integer precision.
187
- // Proven by: Number.isSafeInteger(0x1FFFFF * 2**32 + 0xFFFFFFFF) == true.
188
- if (hi <= 0x1fffff) {
189
- return String(TWO_PWR_32_DBL * hi + lo);
190
- }
191
- // What this code is doing is essentially converting the input number from
192
- // base-2 to base-1e7, which allows us to represent the 64-bit range with
193
- // only 3 (very large) digits. Those digits are then trivial to convert to
194
- // a base-10 string.
195
- // The magic numbers used here are -
196
- // 2^24 = 16777216 = (1,6777216) in base-1e7.
197
- // 2^48 = 281474976710656 = (2,8147497,6710656) in base-1e7.
198
- // Split 32:32 representation into 16:24:24 representation so our
199
- // intermediate digits don't overflow.
200
- const low = lo & 0xffffff;
201
- const mid = ((lo >>> 24) | (hi << 8)) & 0xffffff;
202
- const high = (hi >> 16) & 0xffff;
203
- // Assemble our three base-1e7 digits, ignoring carries. The maximum
204
- // value in a digit at this step is representable as a 48-bit integer, which
205
- // can be stored in a 64-bit floating point number.
206
- let digitA = low + mid * 6777216 + high * 6710656;
207
- let digitB = mid + high * 8147497;
208
- let digitC = high * 2;
209
- // Apply carries from A to B and from B to C.
210
- const base = 10000000;
211
- if (digitA >= base) {
212
- digitB += Math.floor(digitA / base);
213
- digitA %= base;
214
- }
215
- if (digitB >= base) {
216
- digitC += Math.floor(digitB / base);
217
- digitB %= base;
218
- }
219
- // If digitC is 0, then we should have returned in the trivial code path
220
- // at the top for non-safe integers. Given this, we can assume both digitB
221
- // and digitA need leading zeros.
222
- return (digitC.toString() +
223
- decimalFrom1e7WithLeadingZeros(digitB) +
224
- decimalFrom1e7WithLeadingZeros(digitA));
225
- }
226
- function toUnsigned(lo, hi) {
227
- return { lo: lo >>> 0, hi: hi >>> 0 };
228
- }
229
- function newBits(lo, hi) {
230
- return { lo: lo | 0, hi: hi | 0 };
231
- }
232
- /**
233
- * Returns two's compliment negation of input.
234
- * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#Signed_32-bit_integers
235
- */
236
- function negate(lowBits, highBits) {
237
- highBits = ~highBits;
238
- if (lowBits) {
239
- lowBits = ~lowBits + 1;
240
- }
241
- else {
242
- // If lowBits is 0, then bitwise-not is 0xFFFFFFFF,
243
- // adding 1 to that, results in 0x100000000, which leaves
244
- // the low bits 0x0 and simply adds one to the high bits.
245
- highBits += 1;
246
- }
247
- return newBits(lowBits, highBits);
248
- }
249
- /**
250
- * Returns decimal representation of digit1e7 with leading zeros.
251
- */
252
- const decimalFrom1e7WithLeadingZeros = (digit1e7) => {
253
- const partial = String(digit1e7);
254
- return '0000000'.slice(partial.length) + partial;
255
- };
256
- /**
257
- * Write a 32 bit varint, signed or unsigned. Same as `varint64write(0, value, bytes)`
258
- *
259
- * Copyright 2008 Google Inc. All rights reserved.
260
- *
261
- * See https://github.com/protocolbuffers/protobuf/blob/1b18833f4f2a2f681f4e4a25cdf3b0a43115ec26/js/binary/encoder.js#L144
262
- */
263
- export function varint32write(value, bytes) {
264
- if (value >= 0) {
265
- // write value as varint 32
266
- while (value > 0x7f) {
267
- bytes.push((value & 0x7f) | 0x80);
268
- value = value >>> 7;
269
- }
270
- bytes.push(value);
271
- }
272
- else {
273
- for (let i = 0; i < 9; i++) {
274
- bytes.push((value & 127) | 128);
275
- value = value >> 7;
276
- }
277
- bytes.push(1);
278
- }
279
- }
280
- /**
281
- * Read an unsigned 32 bit varint.
282
- *
283
- * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L220
284
- */
285
- export function varint32read() {
286
- let b = this.buf[this.pos++];
287
- let result = b & 0x7f;
288
- if ((b & 0x80) == 0) {
289
- this.assertBounds();
290
- return result;
291
- }
292
- b = this.buf[this.pos++];
293
- result |= (b & 0x7f) << 7;
294
- if ((b & 0x80) == 0) {
295
- this.assertBounds();
296
- return result;
297
- }
298
- b = this.buf[this.pos++];
299
- result |= (b & 0x7f) << 14;
300
- if ((b & 0x80) == 0) {
301
- this.assertBounds();
302
- return result;
303
- }
304
- b = this.buf[this.pos++];
305
- result |= (b & 0x7f) << 21;
306
- if ((b & 0x80) == 0) {
307
- this.assertBounds();
308
- return result;
309
- }
310
- // Extract only last 4 bits
311
- b = this.buf[this.pos++];
312
- result |= (b & 0x0f) << 28;
313
- for (let readBytes = 5; (b & 0x80) !== 0 && readBytes < 10; readBytes++)
314
- b = this.buf[this.pos++];
315
- if ((b & 0x80) != 0)
316
- throw new Error('invalid varint');
317
- this.assertBounds();
318
- // Result can have 32 bits, convert it to unsigned
319
- return result >>> 0;
320
- }
321
- /**
322
- * encode zig zag
323
- */
324
- export function zzEncode(lo, hi) {
325
- let mask = hi >> 31;
326
- hi = (((hi << 1) | (lo >>> 31)) ^ mask) >>> 0;
327
- lo = ((lo << 1) ^ mask) >>> 0;
328
- return [lo, hi];
329
- }
330
- /**
331
- * decode zig zag
332
- */
333
- export function zzDecode(lo, hi) {
334
- let mask = -(lo & 1);
335
- lo = (((lo >>> 1) | (hi << 31)) ^ mask) >>> 0;
336
- hi = ((hi >>> 1) ^ mask) >>> 0;
337
- return [lo, hi];
338
- }
339
- /**
340
- * unsigned int32 without moving pos.
341
- */
342
- export function readUInt32(buf, pos) {
343
- return ((buf[pos] | (buf[pos + 1] << 8) | (buf[pos + 2] << 16)) +
344
- buf[pos + 3] * 0x1000000);
345
- }
346
- /**
347
- * signed int32 without moving pos.
348
- */
349
- export function readInt32(buf, pos) {
350
- return ((buf[pos] | (buf[pos + 1] << 8) | (buf[pos + 2] << 16)) +
351
- (buf[pos + 3] << 24));
352
- }
353
- /**
354
- * writing varint32 to pos
355
- */
356
- export function writeVarint32(val, buf, pos) {
357
- while (val > 127) {
358
- buf[pos++] = (val & 127) | 128;
359
- val >>>= 7;
360
- }
361
- buf[pos] = val;
362
- }
363
- /**
364
- * writing varint64 to pos
365
- */
366
- export function writeVarint64(val, buf, pos) {
367
- while (val.hi) {
368
- buf[pos++] = (val.lo & 127) | 128;
369
- val.lo = ((val.lo >>> 7) | (val.hi << 25)) >>> 0;
370
- val.hi >>>= 7;
371
- }
372
- while (val.lo > 127) {
373
- buf[pos++] = (val.lo & 127) | 128;
374
- val.lo = val.lo >>> 7;
375
- }
376
- buf[pos++] = val.lo;
377
- }
378
- export function int64Length(lo, hi) {
379
- let part0 = lo, part1 = ((lo >>> 28) | (hi << 4)) >>> 0, part2 = hi >>> 24;
380
- return part2 === 0
381
- ? part1 === 0
382
- ? part0 < 16384
383
- ? part0 < 128
384
- ? 1
385
- : 2
386
- : part0 < 2097152
387
- ? 3
388
- : 4
389
- : part1 < 16384
390
- ? part1 < 128
391
- ? 5
392
- : 6
393
- : part1 < 2097152
394
- ? 7
395
- : 8
396
- : part2 < 128
397
- ? 9
398
- : 10;
399
- }
400
- export function writeFixed32(val, buf, pos) {
401
- buf[pos] = val & 255;
402
- buf[pos + 1] = (val >>> 8) & 255;
403
- buf[pos + 2] = (val >>> 16) & 255;
404
- buf[pos + 3] = val >>> 24;
405
- }
406
- export function writeByte(val, buf, pos) {
407
- buf[pos] = val & 255;
408
- }
409
- //# sourceMappingURL=varint.js.map
1
+ export function varint64read(){let t=0,r=0;for(let n=0;n<28;n+=7){let o=this.buf[this.pos++];if(t|=(127&o)<<n,!(128&o))return this.assertBounds(),[t,r]}let n=this.buf[this.pos++];if(t|=(15&n)<<28,r=(112&n)>>4,!(128&n))return this.assertBounds(),[t,r];for(let n=3;n<=31;n+=7){let o=this.buf[this.pos++];if(r|=(127&o)<<n,!(128&o))return this.assertBounds(),[t,r]}throw new Error("invalid varint")}export function varint64write(t,r,n){for(let o=0;o<28;o+=7){const i=t>>>o,e=!(i>>>7==0&&0==r),s=255&(e?128|i:i);if(n.push(s),!e)return}const o=t>>>28&15|(7&r)<<4,i=!!(r>>3);if(n.push(255&(i?128|o:o)),i){for(let t=3;t<31;t+=7){const o=r>>>t,i=!(o>>>7==0),e=255&(i?128|o:o);if(n.push(e),!i)return}n.push(r>>>31&1)}}const t=4294967296;export function int64FromString(o){const i="-"===o[0];i&&(o=o.slice(1));const e=1e6;let s=0,u=0;function f(r,n){const i=Number(o.slice(r,n));u*=e,s=s*e+i,s>=t&&(u+=s/t|0,s%=t)}return f(-24,-18),f(-18,-12),f(-12,-6),f(-6),i?n(s,u):r(s,u)}export function int64ToString(t,o){let i=r(t,o);const e=2147483648&i.hi;e&&(i=n(i.lo,i.hi));const s=uInt64ToString(i.lo,i.hi);return e?"-"+s:s}export function uInt64ToString(r,n){if(({lo:r,hi:n}=function(t,r){return{lo:t>>>0,hi:r>>>0}}(r,n)),n<=2097151)return String(t*n+r);const i=16777215&(r>>>24|n<<8),e=n>>16&65535;let s=(16777215&r)+6777216*i+6710656*e,u=i+8147497*e,f=2*e;const h=1e7;return s>=h&&(u+=Math.floor(s/h),s%=h),u>=h&&(f+=Math.floor(u/h),u%=h),f.toString()+o(u)+o(s)}function r(t,r){return{lo:0|t,hi:0|r}}function n(t,n){return n=~n,t?t=1+~t:n+=1,r(t,n)}const o=t=>{const r=String(t);return"0000000".slice(r.length)+r};export function varint32write(t,r){if(t>=0){for(;t>127;)r.push(127&t|128),t>>>=7;r.push(t)}else{for(let n=0;n<9;n++)r.push(127&t|128),t>>=7;r.push(1)}}export function varint32read(){let t=this.buf[this.pos++],r=127&t;if(!(128&t))return this.assertBounds(),r;if(t=this.buf[this.pos++],r|=(127&t)<<7,!(128&t))return this.assertBounds(),r;if(t=this.buf[this.pos++],r|=(127&t)<<14,!(128&t))return this.assertBounds(),r;if(t=this.buf[this.pos++],r|=(127&t)<<21,!(128&t))return this.assertBounds(),r;t=this.buf[this.pos++],r|=(15&t)<<28;for(let r=5;128&t&&r<10;r++)t=this.buf[this.pos++];if(128&t)throw new Error("invalid varint");return this.assertBounds(),r>>>0}export function zzEncode(t,r){let n=r>>31;return r=((r<<1|t>>>31)^n)>>>0,[t=(t<<1^n)>>>0,r]}export function zzDecode(t,r){let n=-(1&t);return[t=((t>>>1|r<<31)^n)>>>0,r=(r>>>1^n)>>>0]}export function readUInt32(t,r){return(t[r]|t[r+1]<<8|t[r+2]<<16)+16777216*t[r+3]}export function readInt32(t,r){return(t[r]|t[r+1]<<8|t[r+2]<<16)+(t[r+3]<<24)}export function writeVarint32(t,r,n){for(;t>127;)r[n++]=127&t|128,t>>>=7;r[n]=t}export function writeVarint64(t,r,n){for(;t.hi;)r[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)r[n++]=127&t.lo|128,t.lo=t.lo>>>7;r[n++]=t.lo}export function int64Length(t,r){let n=(t>>>28|r<<4)>>>0,o=r>>>24;return 0===o?0===n?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:o<128?9:10}export function writeFixed32(t,r,n){r[n]=255&t,r[n+1]=t>>>8&255,r[n+2]=t>>>16&255,r[n+3]=t>>>24}export function writeByte(t,r,n){r[n]=255&t}
package/dist/helpers.js CHANGED
@@ -1,22 +1 @@
1
- import { RequestQuery } from './codegen/tendermint/abci/types.js';
2
- export const typedJson = (typeStr, obj) => {
3
- return {
4
- '@type': typeStr,
5
- ...obj,
6
- };
7
- };
8
- const QUERY_REQ_TYPEURL_RE = /^\/(?<serviceName>\w+(?:\.\w+)*)\.Query(?<methodName>\w+)Request$/;
9
- export const typeUrlToGrpcPath = (typeUrl) => {
10
- const match = typeUrl.match(QUERY_REQ_TYPEURL_RE);
11
- if (!(match && match.groups)) {
12
- throw TypeError(`Invalid typeUrl: ${typeUrl}. Must be a Query Request.`);
13
- }
14
- const { serviceName, methodName } = match.groups;
15
- return `/${serviceName}.Query/${methodName}`;
16
- };
17
- export const toRequestQueryJson = (msg, opts = {}) => RequestQuery.toJSON(RequestQuery.fromPartial({
18
- path: typeUrlToGrpcPath(msg.typeUrl),
19
- data: msg.value,
20
- ...opts,
21
- }));
22
- //# sourceMappingURL=helpers.js.map
1
+ import{RequestQuery as e}from"./codegen/tendermint/abci/types.js";export const typedJson=(e,t)=>({"@type":e,...t});const t=/^\/(?<serviceName>\w+(?:\.\w+)*)\.Query(?<methodName>\w+)Request$/;export const typeUrlToGrpcPath=e=>{const r=e.match(t);if(!r||!r.groups)throw TypeError(`Invalid typeUrl: ${e}. Must be a Query Request.`);const{serviceName:o,methodName:s}=r.groups;return`/${o}.Query/${s}`};export const toRequestQueryJson=(t,r={})=>e.toJSON(e.fromPartial({path:typeUrlToGrpcPath(t.typeUrl),data:t.value,...r}));
package/dist/index.js CHANGED
@@ -1,6 +1 @@
1
- // Do not export codegen/index.js because it entrains multiple megabytes of module imports.
2
- // Instead we have the top level be relatively conservative, just things that are safe to import into a vat.
3
- // This can include all the types because those are free (never included in a JS bundle).
4
- export * from './codegen/json-safe.js';
5
- export * from './helpers.js';
6
- //# sourceMappingURL=index.js.map
1
+ export*from"./codegen/json-safe.js";export*from"./helpers.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/cosmic-proto",
3
- "version": "0.5.0-u19.2",
3
+ "version": "0.5.0-u20.0",
4
4
  "description": "Protobuf stubs for the Agoric cosmos-sdk module",
5
5
  "keywords": [],
6
6
  "author": "Agoric",
@@ -148,9 +148,9 @@
148
148
  "!CHANGELOG.md"
149
149
  ],
150
150
  "scripts": {
151
- "build": "tsc --project tsconfig.build.json",
151
+ "build": "tsc --project tsconfig.build.json && scripts/minify.cjs",
152
152
  "clean": "rimraf dist",
153
- "codegen": "./update-protos.sh && node scripts/codegen.cjs",
153
+ "codegen": "./update-protos.sh && scripts/codegen.cjs",
154
154
  "prepare": "npm run build",
155
155
  "lint-fix": "yarn lint:eslint --fix",
156
156
  "lint": "run-s --continue-on-error lint:*",
@@ -164,20 +164,22 @@
164
164
  "access": "public"
165
165
  },
166
166
  "devDependencies": {
167
- "@agoric/cosmos": "^0.35.0-u19.2",
167
+ "@agoric/cosmos": "^0.35.0-u20.0",
168
168
  "@ava/typescript": "^4.1.0",
169
169
  "@cosmology/telescope": "https://gitpkg.vercel.app/agoric-labs/telescope/packages/telescope?8d2c2f6ba637a5578eead09a7368dc41c262a9d0",
170
- "@endo/bundle-source": "^3.5.1",
171
- "@endo/import-bundle": "^1.3.3",
172
- "@endo/ses-ava": "^1.2.9",
170
+ "@endo/bundle-source": "^4.0.0",
171
+ "@endo/import-bundle": "^1.4.0",
172
+ "@endo/ses-ava": "^1.2.10",
173
173
  "ava": "^5.3.1",
174
+ "glob": "^4.5.3",
174
175
  "rimraf": "^5.0.0",
176
+ "terser": "^5.39.0",
175
177
  "tsd": "^0.31.1",
176
- "typescript": "~5.8.1-rc"
178
+ "typescript": "~5.8.2"
177
179
  },
178
180
  "dependencies": {
179
181
  "@endo/base64": "^1.0.9",
180
- "@endo/init": "^1.1.8",
182
+ "@endo/init": "^1.1.9",
181
183
  "bech32": "^2.0.0",
182
184
  "query-string": "^9.1.1"
183
185
  },
@@ -196,5 +198,5 @@
196
198
  "test/**/*.test.*"
197
199
  ]
198
200
  },
199
- "gitHead": "f0ae74b84cb6de3724bfdcd18b4bea7e8199dee1"
201
+ "gitHead": "8e4207fa19dabf76c1f91f8779b5b5b93570ecea"
200
202
  }