coreum-js 2.16.2 → 2.17.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/main/client/index.js +16 -17
- package/dist/main/coreum/asset/ft/v1/authz.d.ts +38 -0
- package/dist/main/coreum/asset/ft/v1/authz.js +122 -0
- package/dist/main/coreum/asset/ft/v1/event.d.ts +52 -120
- package/dist/main/coreum/asset/ft/v1/event.js +744 -138
- package/dist/main/coreum/asset/ft/v1/genesis.d.ts +31 -517
- package/dist/main/coreum/asset/ft/v1/genesis.js +273 -62
- package/dist/main/coreum/asset/ft/v1/params.d.ts +12 -63
- package/dist/main/coreum/asset/ft/v1/params.js +37 -33
- package/dist/main/coreum/asset/ft/v1/query.d.ts +86 -1950
- package/dist/main/coreum/asset/ft/v1/query.js +697 -217
- package/dist/main/coreum/asset/ft/v1/token.d.ts +17 -249
- package/dist/main/coreum/asset/ft/v1/token.js +273 -197
- package/dist/main/coreum/asset/ft/v1/tx.d.ts +30 -755
- package/dist/main/coreum/asset/ft/v1/tx.js +502 -386
- package/dist/main/coreum/asset/index.d.ts +2 -3
- package/dist/main/coreum/asset/nft/v1/authz.d.ts +33 -0
- package/dist/main/coreum/asset/nft/v1/authz.js +137 -0
- package/dist/main/coreum/asset/nft/v1/event.d.ts +35 -147
- package/dist/main/coreum/asset/nft/v1/event.js +475 -147
- package/dist/main/coreum/asset/nft/v1/genesis.d.ts +27 -286
- package/dist/main/coreum/asset/nft/v1/genesis.js +311 -119
- package/dist/main/coreum/asset/nft/v1/nft.d.ts +20 -108
- package/dist/main/coreum/asset/nft/v1/nft.js +136 -101
- package/dist/main/coreum/asset/nft/v1/params.d.ts +12 -38
- package/dist/main/coreum/asset/nft/v1/params.js +17 -20
- package/dist/main/coreum/asset/nft/v1/query.d.ts +110 -706
- package/dist/main/coreum/asset/nft/v1/query.js +1079 -185
- package/dist/main/coreum/asset/nft/v1/tx.d.ts +96 -266
- package/dist/main/coreum/asset/nft/v1/tx.js +865 -234
- package/dist/main/coreum/asset/nft/v1/types.d.ts +38 -19
- package/dist/main/coreum/asset/nft/v1/types.js +273 -45
- package/dist/main/coreum/customparams/v1/genesis.d.ts +12 -32
- package/dist/main/coreum/customparams/v1/genesis.js +26 -22
- package/dist/main/coreum/customparams/v1/params.d.ts +11 -19
- package/dist/main/coreum/customparams/v1/params.js +23 -20
- package/dist/main/coreum/customparams/v1/query.d.ts +14 -40
- package/dist/main/coreum/customparams/v1/query.js +35 -29
- package/dist/main/coreum/dex/index.d.ts +1 -0
- package/dist/main/coreum/dex/index.js +12 -0
- package/dist/main/coreum/dex/v1/event.d.ts +73 -0
- package/dist/main/coreum/dex/v1/event.js +470 -0
- package/dist/main/coreum/dex/v1/genesis.d.ts +49 -0
- package/dist/main/coreum/dex/v1/genesis.js +318 -0
- package/dist/main/coreum/dex/v1/order.d.ts +172 -0
- package/dist/main/coreum/dex/v1/order.js +1137 -0
- package/dist/main/coreum/dex/v1/params.d.ts +34 -0
- package/dist/main/coreum/dex/v1/params.js +139 -0
- package/dist/main/coreum/dex/v1/query.d.ts +133 -0
- package/dist/main/coreum/dex/v1/query.js +873 -0
- package/dist/main/coreum/dex/v1/tx.d.ts +102 -0
- package/dist/main/coreum/dex/v1/tx.js +521 -0
- package/dist/main/coreum/extensions/dex.d.ts +12 -0
- package/dist/main/coreum/extensions/dex.js +32 -0
- package/dist/main/coreum/feemodel/v1/genesis.d.ts +13 -233
- package/dist/main/coreum/feemodel/v1/genesis.js +23 -24
- package/dist/main/coreum/feemodel/v1/params.d.ts +14 -337
- package/dist/main/coreum/feemodel/v1/params.js +113 -66
- package/dist/main/coreum/feemodel/v1/query.d.ts +30 -261
- package/dist/main/coreum/feemodel/v1/query.js +196 -43
- package/dist/main/coreum/index.d.ts +46 -0
- package/dist/main/coreum/index.js +58 -1
- package/dist/main/coreum/nft/index.d.ts +1 -2
- package/dist/main/coreum/nft/v1beta1/event.d.ts +23 -79
- package/dist/main/coreum/nft/v1beta1/event.js +103 -77
- package/dist/main/coreum/nft/v1beta1/genesis.d.ts +13 -435
- package/dist/main/coreum/nft/v1beta1/genesis.js +50 -52
- package/dist/main/coreum/nft/v1beta1/nft.d.ts +15 -114
- package/dist/main/coreum/nft/v1beta1/nft.js +111 -81
- package/dist/main/coreum/nft/v1beta1/query.d.ts +54 -1628
- package/dist/main/coreum/nft/v1beta1/query.js +259 -223
- package/dist/main/coreum/nft/v1beta1/tx.d.ts +13 -39
- package/dist/main/coreum/nft/v1beta1/tx.js +54 -43
- package/dist/main/cosmos/extensions/distribution.d.ts +4 -4
- package/dist/main/cosmos/extensions/distribution.js +9 -9
- package/dist/main/cosmos/extensions/gov.d.ts +13 -13
- package/dist/main/cosmos/extensions/gov.js +14 -8
- package/dist/main/cosmos/index.d.ts +8 -8
- package/dist/main/google/api/http.js +18 -21
- package/dist/main/google/protobuf/any.js +3 -4
- package/dist/main/google/protobuf/duration.js +3 -4
- package/dist/main/google/protobuf/timestamp.js +3 -4
- package/dist/main/services/cosmostation.js +1 -1
- package/dist/main/tendermint/abci/types.js +183 -223
- package/dist/main/tendermint/crypto/keys.js +3 -4
- package/dist/main/tendermint/crypto/proof.js +19 -24
- package/dist/main/tendermint/types/params.js +15 -20
- package/dist/main/tendermint/types/types.js +57 -68
- package/dist/main/tendermint/types/validator.js +10 -13
- package/dist/main/tendermint/version/types.js +6 -8
- package/dist/main/types/core.d.ts +2 -1
- package/dist/main/types/core.js +2 -0
- package/dist/main/wasm/v1/authz.d.ts +20 -471
- package/dist/main/wasm/v1/authz.js +129 -148
- package/dist/main/wasm/v1/genesis.d.ts +14 -1020
- package/dist/main/wasm/v1/genesis.js +169 -140
- package/dist/main/wasm/v1/ibc.d.ts +13 -62
- package/dist/main/wasm/v1/ibc.js +91 -76
- package/dist/main/wasm/v1/index.d.ts +1 -2
- package/dist/main/wasm/v1/pagination.js +9 -11
- package/dist/main/wasm/v1/proposal.d.ts +23 -720
- package/dist/main/wasm/v1/proposal.js +634 -465
- package/dist/main/wasm/v1/query.d.ts +35 -1201
- package/dist/main/wasm/v1/query.js +370 -363
- package/dist/main/wasm/v1/tx.d.ts +37 -788
- package/dist/main/wasm/v1/tx.js +621 -497
- package/dist/main/wasm/v1/types.d.ts +19 -297
- package/dist/main/wasm/v1/types.js +219 -190
- package/dist/module/client/index.js +4 -3
- package/dist/module/coreum/asset/ft/v1/authz.d.ts +38 -0
- package/dist/module/coreum/asset/ft/v1/authz.js +119 -0
- package/dist/module/coreum/asset/ft/v1/event.d.ts +52 -120
- package/dist/module/coreum/asset/ft/v1/event.js +721 -109
- package/dist/module/coreum/asset/ft/v1/genesis.d.ts +31 -517
- package/dist/module/coreum/asset/ft/v1/genesis.js +266 -50
- package/dist/module/coreum/asset/ft/v1/params.d.ts +12 -63
- package/dist/module/coreum/asset/ft/v1/params.js +35 -27
- package/dist/module/coreum/asset/ft/v1/query.d.ts +86 -1950
- package/dist/module/coreum/asset/ft/v1/query.js +672 -180
- package/dist/module/coreum/asset/ft/v1/token.d.ts +17 -249
- package/dist/module/coreum/asset/ft/v1/token.js +236 -152
- package/dist/module/coreum/asset/ft/v1/tx.d.ts +30 -755
- package/dist/module/coreum/asset/ft/v1/tx.js +437 -301
- package/dist/module/coreum/asset/index.d.ts +2 -3
- package/dist/module/coreum/asset/nft/v1/authz.d.ts +33 -0
- package/dist/module/coreum/asset/nft/v1/authz.js +134 -0
- package/dist/module/coreum/asset/nft/v1/event.d.ts +35 -147
- package/dist/module/coreum/asset/nft/v1/event.js +448 -112
- package/dist/module/coreum/asset/nft/v1/genesis.d.ts +27 -286
- package/dist/module/coreum/asset/nft/v1/genesis.js +299 -100
- package/dist/module/coreum/asset/nft/v1/nft.d.ts +20 -108
- package/dist/module/coreum/asset/nft/v1/nft.js +121 -81
- package/dist/module/coreum/asset/nft/v1/params.d.ts +12 -38
- package/dist/module/coreum/asset/nft/v1/params.js +16 -16
- package/dist/module/coreum/asset/nft/v1/query.d.ts +110 -706
- package/dist/module/coreum/asset/nft/v1/query.js +1057 -153
- package/dist/module/coreum/asset/nft/v1/tx.d.ts +96 -266
- package/dist/module/coreum/asset/nft/v1/tx.js +825 -184
- package/dist/module/coreum/asset/nft/v1/types.d.ts +38 -19
- package/dist/module/coreum/asset/nft/v1/types.js +269 -39
- package/dist/module/coreum/customparams/v1/genesis.d.ts +12 -32
- package/dist/module/coreum/customparams/v1/genesis.js +25 -18
- package/dist/module/coreum/customparams/v1/params.d.ts +11 -19
- package/dist/module/coreum/customparams/v1/params.js +21 -14
- package/dist/module/coreum/customparams/v1/query.d.ts +14 -40
- package/dist/module/coreum/customparams/v1/query.js +32 -23
- package/dist/module/coreum/dex/index.d.ts +1 -0
- package/dist/module/coreum/dex/index.js +9 -0
- package/dist/module/coreum/dex/v1/event.d.ts +73 -0
- package/dist/module/coreum/dex/v1/event.js +467 -0
- package/dist/module/coreum/dex/v1/genesis.d.ts +49 -0
- package/dist/module/coreum/dex/v1/genesis.js +315 -0
- package/dist/module/coreum/dex/v1/order.d.ts +172 -0
- package/dist/module/coreum/dex/v1/order.js +1128 -0
- package/dist/module/coreum/dex/v1/params.d.ts +34 -0
- package/dist/module/coreum/dex/v1/params.js +136 -0
- package/dist/module/coreum/dex/v1/query.d.ts +133 -0
- package/dist/module/coreum/dex/v1/query.js +871 -0
- package/dist/module/coreum/dex/v1/tx.d.ts +102 -0
- package/dist/module/coreum/dex/v1/tx.js +519 -0
- package/dist/module/coreum/extensions/dex.d.ts +12 -0
- package/dist/module/coreum/extensions/dex.js +28 -0
- package/dist/module/coreum/feemodel/v1/genesis.d.ts +13 -233
- package/dist/module/coreum/feemodel/v1/genesis.js +22 -20
- package/dist/module/coreum/feemodel/v1/params.d.ts +14 -337
- package/dist/module/coreum/feemodel/v1/params.js +105 -54
- package/dist/module/coreum/feemodel/v1/query.d.ts +30 -261
- package/dist/module/coreum/feemodel/v1/query.js +191 -35
- package/dist/module/coreum/index.d.ts +46 -0
- package/dist/module/coreum/index.js +57 -0
- package/dist/module/coreum/nft/index.d.ts +1 -2
- package/dist/module/coreum/nft/v1beta1/event.d.ts +23 -79
- package/dist/module/coreum/nft/v1beta1/event.js +90 -58
- package/dist/module/coreum/nft/v1beta1/genesis.d.ts +13 -435
- package/dist/module/coreum/nft/v1beta1/genesis.js +44 -41
- package/dist/module/coreum/nft/v1beta1/nft.d.ts +15 -114
- package/dist/module/coreum/nft/v1beta1/nft.js +99 -64
- package/dist/module/coreum/nft/v1beta1/query.d.ts +54 -1628
- package/dist/module/coreum/nft/v1beta1/query.js +231 -183
- package/dist/module/coreum/nft/v1beta1/tx.d.ts +13 -39
- package/dist/module/coreum/nft/v1beta1/tx.js +47 -32
- package/dist/module/cosmos/extensions/distribution.d.ts +4 -4
- package/dist/module/cosmos/extensions/gov.d.ts +13 -13
- package/dist/module/cosmos/index.d.ts +8 -8
- package/dist/module/services/cosmostation.js +1 -1
- package/dist/module/types/core.d.ts +2 -1
- package/dist/module/types/core.js +2 -0
- package/dist/module/wasm/v1/authz.d.ts +20 -471
- package/dist/module/wasm/v1/authz.js +111 -119
- package/dist/module/wasm/v1/genesis.d.ts +14 -1020
- package/dist/module/wasm/v1/genesis.js +161 -125
- package/dist/module/wasm/v1/ibc.d.ts +13 -62
- package/dist/module/wasm/v1/ibc.js +83 -62
- package/dist/module/wasm/v1/index.d.ts +1 -2
- package/dist/module/wasm/v1/proposal.d.ts +23 -720
- package/dist/module/wasm/v1/proposal.js +562 -377
- package/dist/module/wasm/v1/query.d.ts +35 -1201
- package/dist/module/wasm/v1/query.js +330 -301
- package/dist/module/wasm/v1/tx.d.ts +37 -788
- package/dist/module/wasm/v1/tx.js +551 -404
- package/dist/module/wasm/v1/types.d.ts +19 -297
- package/dist/module/wasm/v1/types.js +196 -156
- package/package.json +11 -10
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.0
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: wasmd/proto/cosmwasm/wasm/v1/types.proto
|
|
1
6
|
/* eslint-disable */
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { Any } from "../../google/protobuf/any";
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
|
|
8
|
+
import { Any } from "cosmjs-types/google/protobuf/any";
|
|
5
9
|
export const protobufPackage = "cosmwasm.wasm.v1";
|
|
6
10
|
/** AccessType permission types */
|
|
7
11
|
export var AccessType;
|
|
@@ -113,30 +117,31 @@ function createBaseAccessTypeParam() {
|
|
|
113
117
|
return { value: 0 };
|
|
114
118
|
}
|
|
115
119
|
export const AccessTypeParam = {
|
|
116
|
-
encode(message, writer =
|
|
120
|
+
encode(message, writer = new BinaryWriter()) {
|
|
117
121
|
if (message.value !== 0) {
|
|
118
122
|
writer.uint32(8).int32(message.value);
|
|
119
123
|
}
|
|
120
124
|
return writer;
|
|
121
125
|
},
|
|
122
126
|
decode(input, length) {
|
|
123
|
-
const reader = input instanceof
|
|
127
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
124
128
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
125
129
|
const message = createBaseAccessTypeParam();
|
|
126
130
|
while (reader.pos < end) {
|
|
127
131
|
const tag = reader.uint32();
|
|
128
132
|
switch (tag >>> 3) {
|
|
129
|
-
case 1:
|
|
133
|
+
case 1: {
|
|
130
134
|
if (tag !== 8) {
|
|
131
135
|
break;
|
|
132
136
|
}
|
|
133
137
|
message.value = reader.int32();
|
|
134
138
|
continue;
|
|
139
|
+
}
|
|
135
140
|
}
|
|
136
141
|
if ((tag & 7) === 4 || tag === 0) {
|
|
137
142
|
break;
|
|
138
143
|
}
|
|
139
|
-
reader.
|
|
144
|
+
reader.skip(tag & 7);
|
|
140
145
|
}
|
|
141
146
|
return message;
|
|
142
147
|
},
|
|
@@ -147,8 +152,9 @@ export const AccessTypeParam = {
|
|
|
147
152
|
},
|
|
148
153
|
toJSON(message) {
|
|
149
154
|
const obj = {};
|
|
150
|
-
message.value !==
|
|
151
|
-
|
|
155
|
+
if (message.value !== 0) {
|
|
156
|
+
obj.value = accessTypeToJSON(message.value);
|
|
157
|
+
}
|
|
152
158
|
return obj;
|
|
153
159
|
},
|
|
154
160
|
create(base) {
|
|
@@ -164,7 +170,7 @@ function createBaseAccessConfig() {
|
|
|
164
170
|
return { permission: 0, address: "", addresses: [] };
|
|
165
171
|
}
|
|
166
172
|
export const AccessConfig = {
|
|
167
|
-
encode(message, writer =
|
|
173
|
+
encode(message, writer = new BinaryWriter()) {
|
|
168
174
|
if (message.permission !== 0) {
|
|
169
175
|
writer.uint32(8).int32(message.permission);
|
|
170
176
|
}
|
|
@@ -177,35 +183,38 @@ export const AccessConfig = {
|
|
|
177
183
|
return writer;
|
|
178
184
|
},
|
|
179
185
|
decode(input, length) {
|
|
180
|
-
const reader = input instanceof
|
|
186
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
181
187
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
182
188
|
const message = createBaseAccessConfig();
|
|
183
189
|
while (reader.pos < end) {
|
|
184
190
|
const tag = reader.uint32();
|
|
185
191
|
switch (tag >>> 3) {
|
|
186
|
-
case 1:
|
|
192
|
+
case 1: {
|
|
187
193
|
if (tag !== 8) {
|
|
188
194
|
break;
|
|
189
195
|
}
|
|
190
196
|
message.permission = reader.int32();
|
|
191
197
|
continue;
|
|
192
|
-
|
|
198
|
+
}
|
|
199
|
+
case 2: {
|
|
193
200
|
if (tag !== 18) {
|
|
194
201
|
break;
|
|
195
202
|
}
|
|
196
203
|
message.address = reader.string();
|
|
197
204
|
continue;
|
|
198
|
-
|
|
205
|
+
}
|
|
206
|
+
case 3: {
|
|
199
207
|
if (tag !== 26) {
|
|
200
208
|
break;
|
|
201
209
|
}
|
|
202
210
|
message.addresses.push(reader.string());
|
|
203
211
|
continue;
|
|
212
|
+
}
|
|
204
213
|
}
|
|
205
214
|
if ((tag & 7) === 4 || tag === 0) {
|
|
206
215
|
break;
|
|
207
216
|
}
|
|
208
|
-
reader.
|
|
217
|
+
reader.skip(tag & 7);
|
|
209
218
|
}
|
|
210
219
|
return message;
|
|
211
220
|
},
|
|
@@ -214,22 +223,22 @@ export const AccessConfig = {
|
|
|
214
223
|
permission: isSet(object.permission)
|
|
215
224
|
? accessTypeFromJSON(object.permission)
|
|
216
225
|
: 0,
|
|
217
|
-
address: isSet(object.address) ? String(object.address) : "",
|
|
218
|
-
addresses: Array.isArray(object?.addresses)
|
|
219
|
-
? object.addresses.map((e) => String(e))
|
|
226
|
+
address: isSet(object.address) ? globalThis.String(object.address) : "",
|
|
227
|
+
addresses: globalThis.Array.isArray(object?.addresses)
|
|
228
|
+
? object.addresses.map((e) => globalThis.String(e))
|
|
220
229
|
: [],
|
|
221
230
|
};
|
|
222
231
|
},
|
|
223
232
|
toJSON(message) {
|
|
224
233
|
const obj = {};
|
|
225
|
-
message.permission !==
|
|
226
|
-
|
|
227
|
-
message.address !== undefined && (obj.address = message.address);
|
|
228
|
-
if (message.addresses) {
|
|
229
|
-
obj.addresses = message.addresses.map((e) => e);
|
|
234
|
+
if (message.permission !== 0) {
|
|
235
|
+
obj.permission = accessTypeToJSON(message.permission);
|
|
230
236
|
}
|
|
231
|
-
|
|
232
|
-
obj.
|
|
237
|
+
if (message.address !== "") {
|
|
238
|
+
obj.address = message.address;
|
|
239
|
+
}
|
|
240
|
+
if (message.addresses?.length) {
|
|
241
|
+
obj.addresses = message.addresses;
|
|
233
242
|
}
|
|
234
243
|
return obj;
|
|
235
244
|
},
|
|
@@ -248,7 +257,7 @@ function createBaseParams() {
|
|
|
248
257
|
return { codeUploadAccess: undefined, instantiateDefaultPermission: 0 };
|
|
249
258
|
}
|
|
250
259
|
export const Params = {
|
|
251
|
-
encode(message, writer =
|
|
260
|
+
encode(message, writer = new BinaryWriter()) {
|
|
252
261
|
if (message.codeUploadAccess !== undefined) {
|
|
253
262
|
AccessConfig.encode(message.codeUploadAccess, writer.uint32(10).fork()).ldelim();
|
|
254
263
|
}
|
|
@@ -258,29 +267,31 @@ export const Params = {
|
|
|
258
267
|
return writer;
|
|
259
268
|
},
|
|
260
269
|
decode(input, length) {
|
|
261
|
-
const reader = input instanceof
|
|
270
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
262
271
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
263
272
|
const message = createBaseParams();
|
|
264
273
|
while (reader.pos < end) {
|
|
265
274
|
const tag = reader.uint32();
|
|
266
275
|
switch (tag >>> 3) {
|
|
267
|
-
case 1:
|
|
276
|
+
case 1: {
|
|
268
277
|
if (tag !== 10) {
|
|
269
278
|
break;
|
|
270
279
|
}
|
|
271
280
|
message.codeUploadAccess = AccessConfig.decode(reader, reader.uint32());
|
|
272
281
|
continue;
|
|
273
|
-
|
|
282
|
+
}
|
|
283
|
+
case 2: {
|
|
274
284
|
if (tag !== 16) {
|
|
275
285
|
break;
|
|
276
286
|
}
|
|
277
287
|
message.instantiateDefaultPermission = reader.int32();
|
|
278
288
|
continue;
|
|
289
|
+
}
|
|
279
290
|
}
|
|
280
291
|
if ((tag & 7) === 4 || tag === 0) {
|
|
281
292
|
break;
|
|
282
293
|
}
|
|
283
|
-
reader.
|
|
294
|
+
reader.skip(tag & 7);
|
|
284
295
|
}
|
|
285
296
|
return message;
|
|
286
297
|
},
|
|
@@ -296,12 +307,12 @@ export const Params = {
|
|
|
296
307
|
},
|
|
297
308
|
toJSON(message) {
|
|
298
309
|
const obj = {};
|
|
299
|
-
message.codeUploadAccess !== undefined
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
310
|
+
if (message.codeUploadAccess !== undefined) {
|
|
311
|
+
obj.codeUploadAccess = AccessConfig.toJSON(message.codeUploadAccess);
|
|
312
|
+
}
|
|
313
|
+
if (message.instantiateDefaultPermission !== 0) {
|
|
314
|
+
obj.instantiateDefaultPermission = accessTypeToJSON(message.instantiateDefaultPermission);
|
|
315
|
+
}
|
|
305
316
|
return obj;
|
|
306
317
|
},
|
|
307
318
|
create(base) {
|
|
@@ -320,13 +331,13 @@ export const Params = {
|
|
|
320
331
|
};
|
|
321
332
|
function createBaseCodeInfo() {
|
|
322
333
|
return {
|
|
323
|
-
codeHash: new Uint8Array(),
|
|
334
|
+
codeHash: new Uint8Array(0),
|
|
324
335
|
creator: "",
|
|
325
336
|
instantiateConfig: undefined,
|
|
326
337
|
};
|
|
327
338
|
}
|
|
328
339
|
export const CodeInfo = {
|
|
329
|
-
encode(message, writer =
|
|
340
|
+
encode(message, writer = new BinaryWriter()) {
|
|
330
341
|
if (message.codeHash.length !== 0) {
|
|
331
342
|
writer.uint32(10).bytes(message.codeHash);
|
|
332
343
|
}
|
|
@@ -339,35 +350,38 @@ export const CodeInfo = {
|
|
|
339
350
|
return writer;
|
|
340
351
|
},
|
|
341
352
|
decode(input, length) {
|
|
342
|
-
const reader = input instanceof
|
|
353
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
343
354
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
344
355
|
const message = createBaseCodeInfo();
|
|
345
356
|
while (reader.pos < end) {
|
|
346
357
|
const tag = reader.uint32();
|
|
347
358
|
switch (tag >>> 3) {
|
|
348
|
-
case 1:
|
|
359
|
+
case 1: {
|
|
349
360
|
if (tag !== 10) {
|
|
350
361
|
break;
|
|
351
362
|
}
|
|
352
363
|
message.codeHash = reader.bytes();
|
|
353
364
|
continue;
|
|
354
|
-
|
|
365
|
+
}
|
|
366
|
+
case 2: {
|
|
355
367
|
if (tag !== 18) {
|
|
356
368
|
break;
|
|
357
369
|
}
|
|
358
370
|
message.creator = reader.string();
|
|
359
371
|
continue;
|
|
360
|
-
|
|
372
|
+
}
|
|
373
|
+
case 5: {
|
|
361
374
|
if (tag !== 42) {
|
|
362
375
|
break;
|
|
363
376
|
}
|
|
364
377
|
message.instantiateConfig = AccessConfig.decode(reader, reader.uint32());
|
|
365
378
|
continue;
|
|
379
|
+
}
|
|
366
380
|
}
|
|
367
381
|
if ((tag & 7) === 4 || tag === 0) {
|
|
368
382
|
break;
|
|
369
383
|
}
|
|
370
|
-
reader.
|
|
384
|
+
reader.skip(tag & 7);
|
|
371
385
|
}
|
|
372
386
|
return message;
|
|
373
387
|
},
|
|
@@ -375,8 +389,8 @@ export const CodeInfo = {
|
|
|
375
389
|
return {
|
|
376
390
|
codeHash: isSet(object.codeHash)
|
|
377
391
|
? bytesFromBase64(object.codeHash)
|
|
378
|
-
: new Uint8Array(),
|
|
379
|
-
creator: isSet(object.creator) ? String(object.creator) : "",
|
|
392
|
+
: new Uint8Array(0),
|
|
393
|
+
creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
|
|
380
394
|
instantiateConfig: isSet(object.instantiateConfig)
|
|
381
395
|
? AccessConfig.fromJSON(object.instantiateConfig)
|
|
382
396
|
: undefined,
|
|
@@ -384,13 +398,15 @@ export const CodeInfo = {
|
|
|
384
398
|
},
|
|
385
399
|
toJSON(message) {
|
|
386
400
|
const obj = {};
|
|
387
|
-
message.codeHash !==
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
message.
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
401
|
+
if (message.codeHash.length !== 0) {
|
|
402
|
+
obj.codeHash = base64FromBytes(message.codeHash);
|
|
403
|
+
}
|
|
404
|
+
if (message.creator !== "") {
|
|
405
|
+
obj.creator = message.creator;
|
|
406
|
+
}
|
|
407
|
+
if (message.instantiateConfig !== undefined) {
|
|
408
|
+
obj.instantiateConfig = AccessConfig.toJSON(message.instantiateConfig);
|
|
409
|
+
}
|
|
394
410
|
return obj;
|
|
395
411
|
},
|
|
396
412
|
create(base) {
|
|
@@ -398,7 +414,7 @@ export const CodeInfo = {
|
|
|
398
414
|
},
|
|
399
415
|
fromPartial(object) {
|
|
400
416
|
const message = createBaseCodeInfo();
|
|
401
|
-
message.codeHash = object.codeHash ?? new Uint8Array();
|
|
417
|
+
message.codeHash = object.codeHash ?? new Uint8Array(0);
|
|
402
418
|
message.creator = object.creator ?? "";
|
|
403
419
|
message.instantiateConfig =
|
|
404
420
|
object.instantiateConfig !== undefined &&
|
|
@@ -420,7 +436,7 @@ function createBaseContractInfo() {
|
|
|
420
436
|
};
|
|
421
437
|
}
|
|
422
438
|
export const ContractInfo = {
|
|
423
|
-
encode(message, writer =
|
|
439
|
+
encode(message, writer = new BinaryWriter()) {
|
|
424
440
|
if (message.codeId !== 0) {
|
|
425
441
|
writer.uint32(8).uint64(message.codeId);
|
|
426
442
|
}
|
|
@@ -445,72 +461,81 @@ export const ContractInfo = {
|
|
|
445
461
|
return writer;
|
|
446
462
|
},
|
|
447
463
|
decode(input, length) {
|
|
448
|
-
const reader = input instanceof
|
|
464
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
449
465
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
450
466
|
const message = createBaseContractInfo();
|
|
451
467
|
while (reader.pos < end) {
|
|
452
468
|
const tag = reader.uint32();
|
|
453
469
|
switch (tag >>> 3) {
|
|
454
|
-
case 1:
|
|
470
|
+
case 1: {
|
|
455
471
|
if (tag !== 8) {
|
|
456
472
|
break;
|
|
457
473
|
}
|
|
458
474
|
message.codeId = longToNumber(reader.uint64());
|
|
459
475
|
continue;
|
|
460
|
-
|
|
476
|
+
}
|
|
477
|
+
case 2: {
|
|
461
478
|
if (tag !== 18) {
|
|
462
479
|
break;
|
|
463
480
|
}
|
|
464
481
|
message.creator = reader.string();
|
|
465
482
|
continue;
|
|
466
|
-
|
|
483
|
+
}
|
|
484
|
+
case 3: {
|
|
467
485
|
if (tag !== 26) {
|
|
468
486
|
break;
|
|
469
487
|
}
|
|
470
488
|
message.admin = reader.string();
|
|
471
489
|
continue;
|
|
472
|
-
|
|
490
|
+
}
|
|
491
|
+
case 4: {
|
|
473
492
|
if (tag !== 34) {
|
|
474
493
|
break;
|
|
475
494
|
}
|
|
476
495
|
message.label = reader.string();
|
|
477
496
|
continue;
|
|
478
|
-
|
|
497
|
+
}
|
|
498
|
+
case 5: {
|
|
479
499
|
if (tag !== 42) {
|
|
480
500
|
break;
|
|
481
501
|
}
|
|
482
502
|
message.created = AbsoluteTxPosition.decode(reader, reader.uint32());
|
|
483
503
|
continue;
|
|
484
|
-
|
|
504
|
+
}
|
|
505
|
+
case 6: {
|
|
485
506
|
if (tag !== 50) {
|
|
486
507
|
break;
|
|
487
508
|
}
|
|
488
509
|
message.ibcPortId = reader.string();
|
|
489
510
|
continue;
|
|
490
|
-
|
|
511
|
+
}
|
|
512
|
+
case 7: {
|
|
491
513
|
if (tag !== 58) {
|
|
492
514
|
break;
|
|
493
515
|
}
|
|
494
516
|
message.extension = Any.decode(reader, reader.uint32());
|
|
495
517
|
continue;
|
|
518
|
+
}
|
|
496
519
|
}
|
|
497
520
|
if ((tag & 7) === 4 || tag === 0) {
|
|
498
521
|
break;
|
|
499
522
|
}
|
|
500
|
-
reader.
|
|
523
|
+
reader.skip(tag & 7);
|
|
501
524
|
}
|
|
502
525
|
return message;
|
|
503
526
|
},
|
|
504
527
|
fromJSON(object) {
|
|
505
528
|
return {
|
|
506
|
-
codeId: isSet(object.codeId) ? Number(object.codeId) : 0,
|
|
507
|
-
creator: isSet(object.creator) ? String(object.creator) : "",
|
|
508
|
-
admin: isSet(object.admin) ? String(object.admin) : "",
|
|
509
|
-
label: isSet(object.label) ? String(object.label) : "",
|
|
529
|
+
codeId: isSet(object.codeId) ? globalThis.Number(object.codeId) : 0,
|
|
530
|
+
creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
|
|
531
|
+
admin: isSet(object.admin) ? globalThis.String(object.admin) : "",
|
|
532
|
+
label: isSet(object.label) ? globalThis.String(object.label) : "",
|
|
510
533
|
created: isSet(object.created)
|
|
511
534
|
? AbsoluteTxPosition.fromJSON(object.created)
|
|
512
535
|
: undefined,
|
|
513
|
-
ibcPortId: isSet(object.ibcPortId)
|
|
536
|
+
ibcPortId: isSet(object.ibcPortId)
|
|
537
|
+
? globalThis.String(object.ibcPortId)
|
|
538
|
+
: "",
|
|
514
539
|
extension: isSet(object.extension)
|
|
515
540
|
? Any.fromJSON(object.extension)
|
|
516
541
|
: undefined,
|
|
@@ -518,19 +543,27 @@ export const ContractInfo = {
|
|
|
518
543
|
},
|
|
519
544
|
toJSON(message) {
|
|
520
545
|
const obj = {};
|
|
521
|
-
message.codeId !==
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
message.
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
message.
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
546
|
+
if (message.codeId !== 0) {
|
|
547
|
+
obj.codeId = Math.round(message.codeId);
|
|
548
|
+
}
|
|
549
|
+
if (message.creator !== "") {
|
|
550
|
+
obj.creator = message.creator;
|
|
551
|
+
}
|
|
552
|
+
if (message.admin !== "") {
|
|
553
|
+
obj.admin = message.admin;
|
|
554
|
+
}
|
|
555
|
+
if (message.label !== "") {
|
|
556
|
+
obj.label = message.label;
|
|
557
|
+
}
|
|
558
|
+
if (message.created !== undefined) {
|
|
559
|
+
obj.created = AbsoluteTxPosition.toJSON(message.created);
|
|
560
|
+
}
|
|
561
|
+
if (message.ibcPortId !== "") {
|
|
562
|
+
obj.ibcPortId = message.ibcPortId;
|
|
563
|
+
}
|
|
564
|
+
if (message.extension !== undefined) {
|
|
565
|
+
obj.extension = Any.toJSON(message.extension);
|
|
566
|
+
}
|
|
534
567
|
return obj;
|
|
535
568
|
},
|
|
536
569
|
create(base) {
|
|
@@ -555,10 +588,15 @@ export const ContractInfo = {
|
|
|
555
588
|
},
|
|
556
589
|
};
|
|
557
590
|
function createBaseContractCodeHistoryEntry() {
|
|
558
|
-
return {
|
|
591
|
+
return {
|
|
592
|
+
operation: 0,
|
|
593
|
+
codeId: 0,
|
|
594
|
+
updated: undefined,
|
|
595
|
+
msg: new Uint8Array(0),
|
|
596
|
+
};
|
|
559
597
|
}
|
|
560
598
|
export const ContractCodeHistoryEntry = {
|
|
561
|
-
encode(message, writer =
|
|
599
|
+
encode(message, writer = new BinaryWriter()) {
|
|
562
600
|
if (message.operation !== 0) {
|
|
563
601
|
writer.uint32(8).int32(message.operation);
|
|
564
602
|
}
|
|
@@ -574,41 +612,45 @@ export const ContractCodeHistoryEntry = {
|
|
|
574
612
|
return writer;
|
|
575
613
|
},
|
|
576
614
|
decode(input, length) {
|
|
577
|
-
const reader = input instanceof
|
|
615
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
578
616
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
579
617
|
const message = createBaseContractCodeHistoryEntry();
|
|
580
618
|
while (reader.pos < end) {
|
|
581
619
|
const tag = reader.uint32();
|
|
582
620
|
switch (tag >>> 3) {
|
|
583
|
-
case 1:
|
|
621
|
+
case 1: {
|
|
584
622
|
if (tag !== 8) {
|
|
585
623
|
break;
|
|
586
624
|
}
|
|
587
625
|
message.operation = reader.int32();
|
|
588
626
|
continue;
|
|
589
|
-
|
|
627
|
+
}
|
|
628
|
+
case 2: {
|
|
590
629
|
if (tag !== 16) {
|
|
591
630
|
break;
|
|
592
631
|
}
|
|
593
632
|
message.codeId = longToNumber(reader.uint64());
|
|
594
633
|
continue;
|
|
595
|
-
|
|
634
|
+
}
|
|
635
|
+
case 3: {
|
|
596
636
|
if (tag !== 26) {
|
|
597
637
|
break;
|
|
598
638
|
}
|
|
599
639
|
message.updated = AbsoluteTxPosition.decode(reader, reader.uint32());
|
|
600
640
|
continue;
|
|
601
|
-
|
|
641
|
+
}
|
|
642
|
+
case 4: {
|
|
602
643
|
if (tag !== 34) {
|
|
603
644
|
break;
|
|
604
645
|
}
|
|
605
646
|
message.msg = reader.bytes();
|
|
606
647
|
continue;
|
|
648
|
+
}
|
|
607
649
|
}
|
|
608
650
|
if ((tag & 7) === 4 || tag === 0) {
|
|
609
651
|
break;
|
|
610
652
|
}
|
|
611
|
-
reader.
|
|
653
|
+
reader.skip(tag & 7);
|
|
612
654
|
}
|
|
613
655
|
return message;
|
|
614
656
|
},
|
|
@@ -617,24 +659,27 @@ export const ContractCodeHistoryEntry = {
|
|
|
617
659
|
operation: isSet(object.operation)
|
|
618
660
|
? contractCodeHistoryOperationTypeFromJSON(object.operation)
|
|
619
661
|
: 0,
|
|
620
|
-
codeId: isSet(object.codeId) ? Number(object.codeId) : 0,
|
|
662
|
+
codeId: isSet(object.codeId) ? globalThis.Number(object.codeId) : 0,
|
|
621
663
|
updated: isSet(object.updated)
|
|
622
664
|
? AbsoluteTxPosition.fromJSON(object.updated)
|
|
623
665
|
: undefined,
|
|
624
|
-
msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(),
|
|
666
|
+
msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(0),
|
|
625
667
|
};
|
|
626
668
|
},
|
|
627
669
|
toJSON(message) {
|
|
628
670
|
const obj = {};
|
|
629
|
-
message.operation !==
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
message.
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
671
|
+
if (message.operation !== 0) {
|
|
672
|
+
obj.operation = contractCodeHistoryOperationTypeToJSON(message.operation);
|
|
673
|
+
}
|
|
674
|
+
if (message.codeId !== 0) {
|
|
675
|
+
obj.codeId = Math.round(message.codeId);
|
|
676
|
+
}
|
|
677
|
+
if (message.updated !== undefined) {
|
|
678
|
+
obj.updated = AbsoluteTxPosition.toJSON(message.updated);
|
|
679
|
+
}
|
|
680
|
+
if (message.msg.length !== 0) {
|
|
681
|
+
obj.msg = base64FromBytes(message.msg);
|
|
682
|
+
}
|
|
638
683
|
return obj;
|
|
639
684
|
},
|
|
640
685
|
create(base) {
|
|
@@ -648,7 +693,7 @@ export const ContractCodeHistoryEntry = {
|
|
|
648
693
|
object.updated !== undefined && object.updated !== null
|
|
649
694
|
? AbsoluteTxPosition.fromPartial(object.updated)
|
|
650
695
|
: undefined;
|
|
651
|
-
message.msg = object.msg ?? new Uint8Array();
|
|
696
|
+
message.msg = object.msg ?? new Uint8Array(0);
|
|
652
697
|
return message;
|
|
653
698
|
},
|
|
654
699
|
};
|
|
@@ -656,7 +701,7 @@ function createBaseAbsoluteTxPosition() {
|
|
|
656
701
|
return { blockHeight: 0, txIndex: 0 };
|
|
657
702
|
}
|
|
658
703
|
export const AbsoluteTxPosition = {
|
|
659
|
-
encode(message, writer =
|
|
704
|
+
encode(message, writer = new BinaryWriter()) {
|
|
660
705
|
if (message.blockHeight !== 0) {
|
|
661
706
|
writer.uint32(8).uint64(message.blockHeight);
|
|
662
707
|
}
|
|
@@ -666,44 +711,50 @@ export const AbsoluteTxPosition = {
|
|
|
666
711
|
return writer;
|
|
667
712
|
},
|
|
668
713
|
decode(input, length) {
|
|
669
|
-
const reader = input instanceof
|
|
714
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
670
715
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
671
716
|
const message = createBaseAbsoluteTxPosition();
|
|
672
717
|
while (reader.pos < end) {
|
|
673
718
|
const tag = reader.uint32();
|
|
674
719
|
switch (tag >>> 3) {
|
|
675
|
-
case 1:
|
|
720
|
+
case 1: {
|
|
676
721
|
if (tag !== 8) {
|
|
677
722
|
break;
|
|
678
723
|
}
|
|
679
724
|
message.blockHeight = longToNumber(reader.uint64());
|
|
680
725
|
continue;
|
|
681
|
-
|
|
726
|
+
}
|
|
727
|
+
case 2: {
|
|
682
728
|
if (tag !== 16) {
|
|
683
729
|
break;
|
|
684
730
|
}
|
|
685
731
|
message.txIndex = longToNumber(reader.uint64());
|
|
686
732
|
continue;
|
|
733
|
+
}
|
|
687
734
|
}
|
|
688
735
|
if ((tag & 7) === 4 || tag === 0) {
|
|
689
736
|
break;
|
|
690
737
|
}
|
|
691
|
-
reader.
|
|
738
|
+
reader.skip(tag & 7);
|
|
692
739
|
}
|
|
693
740
|
return message;
|
|
694
741
|
},
|
|
695
742
|
fromJSON(object) {
|
|
696
743
|
return {
|
|
697
|
-
blockHeight: isSet(object.blockHeight)
|
|
698
|
-
|
|
744
|
+
blockHeight: isSet(object.blockHeight)
|
|
745
|
+
? globalThis.Number(object.blockHeight)
|
|
746
|
+
: 0,
|
|
747
|
+
txIndex: isSet(object.txIndex) ? globalThis.Number(object.txIndex) : 0,
|
|
699
748
|
};
|
|
700
749
|
},
|
|
701
750
|
toJSON(message) {
|
|
702
751
|
const obj = {};
|
|
703
|
-
message.blockHeight !==
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
752
|
+
if (message.blockHeight !== 0) {
|
|
753
|
+
obj.blockHeight = Math.round(message.blockHeight);
|
|
754
|
+
}
|
|
755
|
+
if (message.txIndex !== 0) {
|
|
756
|
+
obj.txIndex = Math.round(message.txIndex);
|
|
757
|
+
}
|
|
707
758
|
return obj;
|
|
708
759
|
},
|
|
709
760
|
create(base) {
|
|
@@ -717,10 +768,10 @@ export const AbsoluteTxPosition = {
|
|
|
717
768
|
},
|
|
718
769
|
};
|
|
719
770
|
function createBaseModel() {
|
|
720
|
-
return { key: new Uint8Array(), value: new Uint8Array() };
|
|
771
|
+
return { key: new Uint8Array(0), value: new Uint8Array(0) };
|
|
721
772
|
}
|
|
722
773
|
export const Model = {
|
|
723
|
-
encode(message, writer =
|
|
774
|
+
encode(message, writer = new BinaryWriter()) {
|
|
724
775
|
if (message.key.length !== 0) {
|
|
725
776
|
writer.uint32(10).bytes(message.key);
|
|
726
777
|
}
|
|
@@ -730,46 +781,50 @@ export const Model = {
|
|
|
730
781
|
return writer;
|
|
731
782
|
},
|
|
732
783
|
decode(input, length) {
|
|
733
|
-
const reader = input instanceof
|
|
784
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
734
785
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
735
786
|
const message = createBaseModel();
|
|
736
787
|
while (reader.pos < end) {
|
|
737
788
|
const tag = reader.uint32();
|
|
738
789
|
switch (tag >>> 3) {
|
|
739
|
-
case 1:
|
|
790
|
+
case 1: {
|
|
740
791
|
if (tag !== 10) {
|
|
741
792
|
break;
|
|
742
793
|
}
|
|
743
794
|
message.key = reader.bytes();
|
|
744
795
|
continue;
|
|
745
|
-
|
|
796
|
+
}
|
|
797
|
+
case 2: {
|
|
746
798
|
if (tag !== 18) {
|
|
747
799
|
break;
|
|
748
800
|
}
|
|
749
801
|
message.value = reader.bytes();
|
|
750
802
|
continue;
|
|
803
|
+
}
|
|
751
804
|
}
|
|
752
805
|
if ((tag & 7) === 4 || tag === 0) {
|
|
753
806
|
break;
|
|
754
807
|
}
|
|
755
|
-
reader.
|
|
808
|
+
reader.skip(tag & 7);
|
|
756
809
|
}
|
|
757
810
|
return message;
|
|
758
811
|
},
|
|
759
812
|
fromJSON(object) {
|
|
760
813
|
return {
|
|
761
|
-
key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),
|
|
814
|
+
key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0),
|
|
762
815
|
value: isSet(object.value)
|
|
763
816
|
? bytesFromBase64(object.value)
|
|
764
|
-
: new Uint8Array(),
|
|
817
|
+
: new Uint8Array(0),
|
|
765
818
|
};
|
|
766
819
|
},
|
|
767
820
|
toJSON(message) {
|
|
768
821
|
const obj = {};
|
|
769
|
-
message.key !==
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
822
|
+
if (message.key.length !== 0) {
|
|
823
|
+
obj.key = base64FromBytes(message.key);
|
|
824
|
+
}
|
|
825
|
+
if (message.value.length !== 0) {
|
|
826
|
+
obj.value = base64FromBytes(message.value);
|
|
827
|
+
}
|
|
773
828
|
return obj;
|
|
774
829
|
},
|
|
775
830
|
create(base) {
|
|
@@ -777,32 +832,17 @@ export const Model = {
|
|
|
777
832
|
},
|
|
778
833
|
fromPartial(object) {
|
|
779
834
|
const message = createBaseModel();
|
|
780
|
-
message.key = object.key ?? new Uint8Array();
|
|
781
|
-
message.value = object.value ?? new Uint8Array();
|
|
835
|
+
message.key = object.key ?? new Uint8Array(0);
|
|
836
|
+
message.value = object.value ?? new Uint8Array(0);
|
|
782
837
|
return message;
|
|
783
838
|
},
|
|
784
839
|
};
|
|
785
|
-
var tsProtoGlobalThis = (() => {
|
|
786
|
-
if (typeof globalThis !== "undefined") {
|
|
787
|
-
return globalThis;
|
|
788
|
-
}
|
|
789
|
-
if (typeof self !== "undefined") {
|
|
790
|
-
return self;
|
|
791
|
-
}
|
|
792
|
-
if (typeof window !== "undefined") {
|
|
793
|
-
return window;
|
|
794
|
-
}
|
|
795
|
-
if (typeof global !== "undefined") {
|
|
796
|
-
return global;
|
|
797
|
-
}
|
|
798
|
-
throw "Unable to locate global object";
|
|
799
|
-
})();
|
|
800
840
|
function bytesFromBase64(b64) {
|
|
801
|
-
if (
|
|
802
|
-
return Uint8Array.from(
|
|
841
|
+
if (globalThis.Buffer) {
|
|
842
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
803
843
|
}
|
|
804
844
|
else {
|
|
805
|
-
const bin =
|
|
845
|
+
const bin = globalThis.atob(b64);
|
|
806
846
|
const arr = new Uint8Array(bin.length);
|
|
807
847
|
for (let i = 0; i < bin.length; ++i) {
|
|
808
848
|
arr[i] = bin.charCodeAt(i);
|
|
@@ -811,26 +851,26 @@ function bytesFromBase64(b64) {
|
|
|
811
851
|
}
|
|
812
852
|
}
|
|
813
853
|
function base64FromBytes(arr) {
|
|
814
|
-
if (
|
|
815
|
-
return
|
|
854
|
+
if (globalThis.Buffer) {
|
|
855
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
816
856
|
}
|
|
817
857
|
else {
|
|
818
858
|
const bin = [];
|
|
819
859
|
arr.forEach((byte) => {
|
|
820
|
-
bin.push(String.fromCharCode(byte));
|
|
860
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
821
861
|
});
|
|
822
|
-
return
|
|
862
|
+
return globalThis.btoa(bin.join(""));
|
|
823
863
|
}
|
|
824
864
|
}
|
|
825
|
-
function longToNumber(
|
|
826
|
-
|
|
827
|
-
|
|
865
|
+
function longToNumber(int64) {
|
|
866
|
+
const num = globalThis.Number(int64.toString());
|
|
867
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
868
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
828
869
|
}
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
_m0.configure();
|
|
870
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
871
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
872
|
+
}
|
|
873
|
+
return num;
|
|
834
874
|
}
|
|
835
875
|
function isSet(value) {
|
|
836
876
|
return value !== null && value !== undefined;
|