coreum-js 2.16.3 → 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 +15 -16
- 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 -28
- package/dist/main/coreum/asset/ft/v1/event.js +744 -138
- package/dist/main/coreum/asset/ft/v1/genesis.d.ts +31 -21
- package/dist/main/coreum/asset/ft/v1/genesis.js +273 -62
- package/dist/main/coreum/asset/ft/v1/params.d.ts +12 -11
- package/dist/main/coreum/asset/ft/v1/params.js +37 -33
- package/dist/main/coreum/asset/ft/v1/query.d.ts +87 -127
- package/dist/main/coreum/asset/ft/v1/query.js +697 -217
- package/dist/main/coreum/asset/ft/v1/token.d.ts +17 -51
- package/dist/main/coreum/asset/ft/v1/token.js +276 -200
- package/dist/main/coreum/asset/ft/v1/tx.d.ts +30 -147
- 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 -43
- package/dist/main/coreum/asset/nft/v1/event.js +475 -147
- package/dist/main/coreum/asset/nft/v1/genesis.d.ts +27 -36
- package/dist/main/coreum/asset/nft/v1/genesis.js +311 -119
- package/dist/main/coreum/asset/nft/v1/nft.d.ts +20 -26
- package/dist/main/coreum/asset/nft/v1/nft.js +139 -104
- package/dist/main/coreum/asset/nft/v1/params.d.ts +12 -12
- package/dist/main/coreum/asset/nft/v1/params.js +17 -20
- package/dist/main/coreum/asset/nft/v1/query.d.ts +110 -88
- package/dist/main/coreum/asset/nft/v1/query.js +1079 -185
- package/dist/main/coreum/asset/nft/v1/tx.d.ts +96 -70
- package/dist/main/coreum/asset/nft/v1/tx.js +865 -234
- package/dist/main/coreum/asset/nft/v1/types.d.ts +38 -11
- package/dist/main/coreum/asset/nft/v1/types.js +273 -45
- package/dist/main/coreum/customparams/v1/genesis.d.ts +12 -12
- package/dist/main/coreum/customparams/v1/genesis.js +26 -22
- package/dist/main/coreum/customparams/v1/params.d.ts +11 -11
- package/dist/main/coreum/customparams/v1/params.js +23 -20
- package/dist/main/coreum/customparams/v1/query.d.ts +14 -20
- 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/extensions/ft.js +2 -1
- package/dist/main/coreum/extensions/nft.js +2 -1
- package/dist/main/coreum/extensions/nftbeta.js +2 -1
- package/dist/main/coreum/feemodel/v1/genesis.d.ts +13 -13
- package/dist/main/coreum/feemodel/v1/genesis.js +23 -24
- package/dist/main/coreum/feemodel/v1/params.d.ts +14 -21
- package/dist/main/coreum/feemodel/v1/params.js +113 -66
- package/dist/main/coreum/feemodel/v1/query.d.ts +30 -37
- 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 -27
- package/dist/main/coreum/nft/v1beta1/event.js +103 -77
- package/dist/main/coreum/nft/v1beta1/genesis.d.ts +13 -19
- package/dist/main/coreum/nft/v1beta1/genesis.js +50 -52
- package/dist/main/coreum/nft/v1beta1/nft.d.ts +15 -22
- package/dist/main/coreum/nft/v1beta1/nft.js +111 -81
- package/dist/main/coreum/nft/v1beta1/query.d.ts +54 -124
- package/dist/main/coreum/nft/v1beta1/query.js +259 -223
- package/dist/main/coreum/nft/v1beta1/tx.d.ts +13 -19
- package/dist/main/coreum/nft/v1beta1/tx.js +54 -43
- package/dist/main/cosmos/extensions/bank.js +2 -1
- package/dist/main/cosmos/extensions/distribution.d.ts +4 -4
- package/dist/main/cosmos/extensions/distribution.js +11 -10
- package/dist/main/cosmos/extensions/gov.d.ts +13 -13
- package/dist/main/cosmos/extensions/gov.js +16 -9
- package/dist/main/cosmos/index.d.ts +8 -8
- package/dist/main/google/api/http.d.ts +2636 -6
- package/dist/main/google/api/http.js +18 -21
- package/dist/main/google/protobuf/any.d.ts +14 -2
- package/dist/main/google/protobuf/any.js +6 -7
- package/dist/main/google/protobuf/duration.d.ts +14 -2
- package/dist/main/google/protobuf/duration.js +3 -4
- package/dist/main/google/protobuf/timestamp.d.ts +14 -2
- package/dist/main/google/protobuf/timestamp.js +3 -4
- package/dist/main/index.js +7 -17
- package/dist/main/services/cosmostation.js +1 -1
- package/dist/main/tendermint/abci/types.d.ts +6360 -92
- package/dist/main/tendermint/abci/types.js +195 -235
- package/dist/main/tendermint/crypto/keys.d.ts +14 -2
- package/dist/main/tendermint/crypto/keys.js +3 -4
- package/dist/main/tendermint/crypto/proof.d.ts +152 -10
- package/dist/main/tendermint/crypto/proof.js +19 -24
- package/dist/main/tendermint/types/params.d.ts +196 -12
- package/dist/main/tendermint/types/params.js +15 -20
- package/dist/main/tendermint/types/types.d.ts +1744 -26
- package/dist/main/tendermint/types/types.js +62 -73
- package/dist/main/tendermint/types/validator.d.ts +230 -6
- package/dist/main/tendermint/types/validator.js +10 -13
- package/dist/main/tendermint/version/types.d.ts +28 -4
- 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/utils/convertStringToAny.d.ts +0 -1
- package/dist/main/utils/nft.js +2 -1
- package/dist/main/wasm/v1/authz.d.ts +20 -75
- package/dist/main/wasm/v1/authz.js +129 -148
- package/dist/main/wasm/v1/extensions/wasm.js +2 -1
- package/dist/main/wasm/v1/genesis.d.ts +14 -34
- package/dist/main/wasm/v1/genesis.js +169 -140
- package/dist/main/wasm/v1/ibc.d.ts +13 -26
- 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.d.ts +40 -4
- package/dist/main/wasm/v1/pagination.js +9 -11
- package/dist/main/wasm/v1/proposal.d.ts +23 -106
- package/dist/main/wasm/v1/proposal.js +634 -465
- package/dist/main/wasm/v1/query.d.ts +35 -187
- package/dist/main/wasm/v1/query.js +370 -363
- package/dist/main/wasm/v1/tx.d.ts +37 -210
- package/dist/main/wasm/v1/tx.js +621 -497
- package/dist/main/wasm/v1/types.d.ts +19 -67
- package/dist/main/wasm/v1/types.js +224 -195
- package/dist/module/client/index.js +2 -1
- 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 -28
- package/dist/module/coreum/asset/ft/v1/event.js +721 -109
- package/dist/module/coreum/asset/ft/v1/genesis.d.ts +31 -21
- package/dist/module/coreum/asset/ft/v1/genesis.js +266 -50
- package/dist/module/coreum/asset/ft/v1/params.d.ts +12 -11
- package/dist/module/coreum/asset/ft/v1/params.js +35 -27
- package/dist/module/coreum/asset/ft/v1/query.d.ts +87 -127
- package/dist/module/coreum/asset/ft/v1/query.js +672 -180
- package/dist/module/coreum/asset/ft/v1/token.d.ts +17 -51
- package/dist/module/coreum/asset/ft/v1/token.js +236 -152
- package/dist/module/coreum/asset/ft/v1/tx.d.ts +30 -147
- 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 -43
- package/dist/module/coreum/asset/nft/v1/event.js +448 -112
- package/dist/module/coreum/asset/nft/v1/genesis.d.ts +27 -36
- package/dist/module/coreum/asset/nft/v1/genesis.js +299 -100
- package/dist/module/coreum/asset/nft/v1/nft.d.ts +20 -26
- package/dist/module/coreum/asset/nft/v1/nft.js +121 -81
- package/dist/module/coreum/asset/nft/v1/params.d.ts +12 -12
- package/dist/module/coreum/asset/nft/v1/params.js +16 -16
- package/dist/module/coreum/asset/nft/v1/query.d.ts +110 -88
- package/dist/module/coreum/asset/nft/v1/query.js +1057 -153
- package/dist/module/coreum/asset/nft/v1/tx.d.ts +96 -70
- package/dist/module/coreum/asset/nft/v1/tx.js +825 -184
- package/dist/module/coreum/asset/nft/v1/types.d.ts +38 -11
- package/dist/module/coreum/asset/nft/v1/types.js +269 -39
- package/dist/module/coreum/customparams/v1/genesis.d.ts +12 -12
- package/dist/module/coreum/customparams/v1/genesis.js +25 -18
- package/dist/module/coreum/customparams/v1/params.d.ts +11 -11
- package/dist/module/coreum/customparams/v1/params.js +21 -14
- package/dist/module/coreum/customparams/v1/query.d.ts +14 -20
- 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 -13
- package/dist/module/coreum/feemodel/v1/genesis.js +22 -20
- package/dist/module/coreum/feemodel/v1/params.d.ts +14 -21
- package/dist/module/coreum/feemodel/v1/params.js +105 -54
- package/dist/module/coreum/feemodel/v1/query.d.ts +30 -37
- 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 -27
- package/dist/module/coreum/nft/v1beta1/event.js +90 -58
- package/dist/module/coreum/nft/v1beta1/genesis.d.ts +13 -19
- package/dist/module/coreum/nft/v1beta1/genesis.js +44 -41
- package/dist/module/coreum/nft/v1beta1/nft.d.ts +15 -22
- package/dist/module/coreum/nft/v1beta1/nft.js +99 -64
- package/dist/module/coreum/nft/v1beta1/query.d.ts +54 -124
- package/dist/module/coreum/nft/v1beta1/query.js +231 -183
- package/dist/module/coreum/nft/v1beta1/tx.d.ts +13 -19
- 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/google/api/http.d.ts +2636 -6
- package/dist/module/google/protobuf/any.d.ts +14 -2
- package/dist/module/google/protobuf/duration.d.ts +14 -2
- package/dist/module/google/protobuf/timestamp.d.ts +14 -2
- package/dist/module/services/cosmostation.js +1 -1
- package/dist/module/tendermint/abci/types.d.ts +6360 -92
- package/dist/module/tendermint/crypto/keys.d.ts +14 -2
- package/dist/module/tendermint/crypto/proof.d.ts +152 -10
- package/dist/module/tendermint/types/params.d.ts +196 -12
- package/dist/module/tendermint/types/types.d.ts +1744 -26
- package/dist/module/tendermint/types/validator.d.ts +230 -6
- package/dist/module/tendermint/version/types.d.ts +28 -4
- package/dist/module/types/core.d.ts +2 -1
- package/dist/module/types/core.js +2 -0
- package/dist/module/utils/convertStringToAny.d.ts +0 -1
- package/dist/module/wasm/v1/authz.d.ts +20 -75
- package/dist/module/wasm/v1/authz.js +111 -119
- package/dist/module/wasm/v1/genesis.d.ts +14 -34
- package/dist/module/wasm/v1/genesis.js +161 -125
- package/dist/module/wasm/v1/ibc.d.ts +13 -26
- package/dist/module/wasm/v1/ibc.js +83 -62
- package/dist/module/wasm/v1/index.d.ts +1 -2
- package/dist/module/wasm/v1/pagination.d.ts +40 -4
- package/dist/module/wasm/v1/proposal.d.ts +23 -106
- package/dist/module/wasm/v1/proposal.js +562 -377
- package/dist/module/wasm/v1/query.d.ts +35 -187
- package/dist/module/wasm/v1/query.js +330 -301
- package/dist/module/wasm/v1/tx.d.ts +37 -210
- package/dist/module/wasm/v1/tx.js +551 -404
- package/dist/module/wasm/v1/types.d.ts +19 -67
- package/dist/module/wasm/v1/types.js +196 -156
- package/package.json +11 -10
package/dist/main/wasm/v1/tx.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.7.0
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: wasmd/proto/cosmwasm/wasm/v1/tx.proto
|
|
5
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.MsgClientImpl = exports.MsgStoreAndInstantiateContractResponse = exports.MsgStoreAndInstantiateContract = exports.MsgUnpinCodesResponse = exports.MsgUnpinCodes = exports.MsgPinCodesResponse = exports.MsgPinCodes = exports.MsgSudoContractResponse = exports.MsgSudoContract = exports.MsgUpdateParamsResponse = exports.MsgUpdateParams = exports.MsgUpdateInstantiateConfigResponse = exports.MsgUpdateInstantiateConfig = exports.MsgClearAdminResponse = exports.MsgClearAdmin = exports.MsgUpdateAdminResponse = exports.MsgUpdateAdmin = exports.MsgMigrateContractResponse = exports.MsgMigrateContract = exports.MsgExecuteContractResponse = exports.MsgExecuteContract = exports.MsgInstantiateContract2Response = exports.MsgInstantiateContract2 = exports.MsgInstantiateContractResponse = exports.MsgInstantiateContract = exports.MsgStoreCodeResponse = exports.MsgStoreCode = exports.protobufPackage = void 0;
|
|
8
|
+
exports.MsgClientImpl = exports.MsgServiceName = exports.MsgStoreAndInstantiateContractResponse = exports.MsgStoreAndInstantiateContract = exports.MsgUnpinCodesResponse = exports.MsgUnpinCodes = exports.MsgPinCodesResponse = exports.MsgPinCodes = exports.MsgSudoContractResponse = exports.MsgSudoContract = exports.MsgUpdateParamsResponse = exports.MsgUpdateParams = exports.MsgUpdateInstantiateConfigResponse = exports.MsgUpdateInstantiateConfig = exports.MsgClearAdminResponse = exports.MsgClearAdmin = exports.MsgUpdateAdminResponse = exports.MsgUpdateAdmin = exports.MsgMigrateContractResponse = exports.MsgMigrateContract = exports.MsgExecuteContractResponse = exports.MsgExecuteContract = exports.MsgInstantiateContract2Response = exports.MsgInstantiateContract2 = exports.MsgInstantiateContractResponse = exports.MsgInstantiateContract = exports.MsgStoreCodeResponse = exports.MsgStoreCode = exports.protobufPackage = void 0;
|
|
7
9
|
/* eslint-disable */
|
|
8
|
-
const
|
|
9
|
-
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
+
const binary_1 = require("cosmjs-types/binary");
|
|
10
11
|
const coin_1 = require("cosmjs-types/cosmos/base/v1beta1/coin");
|
|
11
12
|
const types_1 = require("./types");
|
|
12
13
|
exports.protobufPackage = "cosmwasm.wasm.v1";
|
|
13
14
|
function createBaseMsgStoreCode() {
|
|
14
15
|
return {
|
|
15
16
|
sender: "",
|
|
16
|
-
wasmByteCode: new Uint8Array(),
|
|
17
|
+
wasmByteCode: new Uint8Array(0),
|
|
17
18
|
instantiatePermission: undefined,
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
21
|
exports.MsgStoreCode = {
|
|
21
|
-
encode(message, writer =
|
|
22
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
22
23
|
if (message.sender !== "") {
|
|
23
24
|
writer.uint32(10).string(message.sender);
|
|
24
25
|
}
|
|
@@ -31,44 +32,47 @@ exports.MsgStoreCode = {
|
|
|
31
32
|
return writer;
|
|
32
33
|
},
|
|
33
34
|
decode(input, length) {
|
|
34
|
-
const reader = input instanceof
|
|
35
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
35
36
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
36
37
|
const message = createBaseMsgStoreCode();
|
|
37
38
|
while (reader.pos < end) {
|
|
38
39
|
const tag = reader.uint32();
|
|
39
40
|
switch (tag >>> 3) {
|
|
40
|
-
case 1:
|
|
41
|
+
case 1: {
|
|
41
42
|
if (tag !== 10) {
|
|
42
43
|
break;
|
|
43
44
|
}
|
|
44
45
|
message.sender = reader.string();
|
|
45
46
|
continue;
|
|
46
|
-
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
47
49
|
if (tag !== 18) {
|
|
48
50
|
break;
|
|
49
51
|
}
|
|
50
52
|
message.wasmByteCode = reader.bytes();
|
|
51
53
|
continue;
|
|
52
|
-
|
|
54
|
+
}
|
|
55
|
+
case 5: {
|
|
53
56
|
if (tag !== 42) {
|
|
54
57
|
break;
|
|
55
58
|
}
|
|
56
59
|
message.instantiatePermission = types_1.AccessConfig.decode(reader, reader.uint32());
|
|
57
60
|
continue;
|
|
61
|
+
}
|
|
58
62
|
}
|
|
59
63
|
if ((tag & 7) === 4 || tag === 0) {
|
|
60
64
|
break;
|
|
61
65
|
}
|
|
62
|
-
reader.
|
|
66
|
+
reader.skip(tag & 7);
|
|
63
67
|
}
|
|
64
68
|
return message;
|
|
65
69
|
},
|
|
66
70
|
fromJSON(object) {
|
|
67
71
|
return {
|
|
68
|
-
sender: isSet(object.sender) ? String(object.sender) : "",
|
|
72
|
+
sender: isSet(object.sender) ? globalThis.String(object.sender) : "",
|
|
69
73
|
wasmByteCode: isSet(object.wasmByteCode)
|
|
70
74
|
? bytesFromBase64(object.wasmByteCode)
|
|
71
|
-
: new Uint8Array(),
|
|
75
|
+
: new Uint8Array(0),
|
|
72
76
|
instantiatePermission: isSet(object.instantiatePermission)
|
|
73
77
|
? types_1.AccessConfig.fromJSON(object.instantiatePermission)
|
|
74
78
|
: undefined,
|
|
@@ -76,25 +80,24 @@ exports.MsgStoreCode = {
|
|
|
76
80
|
},
|
|
77
81
|
toJSON(message) {
|
|
78
82
|
const obj = {};
|
|
79
|
-
message.sender !==
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
if (message.sender !== "") {
|
|
84
|
+
obj.sender = message.sender;
|
|
85
|
+
}
|
|
86
|
+
if (message.wasmByteCode.length !== 0) {
|
|
87
|
+
obj.wasmByteCode = base64FromBytes(message.wasmByteCode);
|
|
88
|
+
}
|
|
89
|
+
if (message.instantiatePermission !== undefined) {
|
|
90
|
+
obj.instantiatePermission = types_1.AccessConfig.toJSON(message.instantiatePermission);
|
|
91
|
+
}
|
|
88
92
|
return obj;
|
|
89
93
|
},
|
|
90
94
|
create(base) {
|
|
91
|
-
return exports.MsgStoreCode.fromPartial(base
|
|
95
|
+
return exports.MsgStoreCode.fromPartial(base ?? {});
|
|
92
96
|
},
|
|
93
97
|
fromPartial(object) {
|
|
94
|
-
var _a, _b;
|
|
95
98
|
const message = createBaseMsgStoreCode();
|
|
96
|
-
message.sender =
|
|
97
|
-
message.wasmByteCode =
|
|
99
|
+
message.sender = object.sender ?? "";
|
|
100
|
+
message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(0);
|
|
98
101
|
message.instantiatePermission =
|
|
99
102
|
object.instantiatePermission !== undefined &&
|
|
100
103
|
object.instantiatePermission !== null
|
|
@@ -104,10 +107,10 @@ exports.MsgStoreCode = {
|
|
|
104
107
|
},
|
|
105
108
|
};
|
|
106
109
|
function createBaseMsgStoreCodeResponse() {
|
|
107
|
-
return { codeId: 0, checksum: new Uint8Array() };
|
|
110
|
+
return { codeId: 0, checksum: new Uint8Array(0) };
|
|
108
111
|
}
|
|
109
112
|
exports.MsgStoreCodeResponse = {
|
|
110
|
-
encode(message, writer =
|
|
113
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
111
114
|
if (message.codeId !== 0) {
|
|
112
115
|
writer.uint32(8).uint64(message.codeId);
|
|
113
116
|
}
|
|
@@ -117,55 +120,59 @@ exports.MsgStoreCodeResponse = {
|
|
|
117
120
|
return writer;
|
|
118
121
|
},
|
|
119
122
|
decode(input, length) {
|
|
120
|
-
const reader = input instanceof
|
|
123
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
121
124
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
122
125
|
const message = createBaseMsgStoreCodeResponse();
|
|
123
126
|
while (reader.pos < end) {
|
|
124
127
|
const tag = reader.uint32();
|
|
125
128
|
switch (tag >>> 3) {
|
|
126
|
-
case 1:
|
|
129
|
+
case 1: {
|
|
127
130
|
if (tag !== 8) {
|
|
128
131
|
break;
|
|
129
132
|
}
|
|
130
133
|
message.codeId = longToNumber(reader.uint64());
|
|
131
134
|
continue;
|
|
132
|
-
|
|
135
|
+
}
|
|
136
|
+
case 2: {
|
|
133
137
|
if (tag !== 18) {
|
|
134
138
|
break;
|
|
135
139
|
}
|
|
136
140
|
message.checksum = reader.bytes();
|
|
137
141
|
continue;
|
|
142
|
+
}
|
|
138
143
|
}
|
|
139
144
|
if ((tag & 7) === 4 || tag === 0) {
|
|
140
145
|
break;
|
|
141
146
|
}
|
|
142
|
-
reader.
|
|
147
|
+
reader.skip(tag & 7);
|
|
143
148
|
}
|
|
144
149
|
return message;
|
|
145
150
|
},
|
|
146
151
|
fromJSON(object) {
|
|
147
152
|
return {
|
|
148
|
-
codeId: isSet(object.codeId) ? Number(object.codeId) : 0,
|
|
153
|
+
codeId: isSet(object.codeId) ? globalThis.Number(object.codeId) : 0,
|
|
149
154
|
checksum: isSet(object.checksum)
|
|
150
155
|
? bytesFromBase64(object.checksum)
|
|
151
|
-
: new Uint8Array(),
|
|
156
|
+
: new Uint8Array(0),
|
|
152
157
|
};
|
|
153
158
|
},
|
|
154
159
|
toJSON(message) {
|
|
155
160
|
const obj = {};
|
|
156
|
-
message.codeId !==
|
|
157
|
-
|
|
158
|
-
|
|
161
|
+
if (message.codeId !== 0) {
|
|
162
|
+
obj.codeId = Math.round(message.codeId);
|
|
163
|
+
}
|
|
164
|
+
if (message.checksum.length !== 0) {
|
|
165
|
+
obj.checksum = base64FromBytes(message.checksum);
|
|
166
|
+
}
|
|
159
167
|
return obj;
|
|
160
168
|
},
|
|
161
169
|
create(base) {
|
|
162
|
-
return exports.MsgStoreCodeResponse.fromPartial(base
|
|
170
|
+
return exports.MsgStoreCodeResponse.fromPartial(base ?? {});
|
|
163
171
|
},
|
|
164
172
|
fromPartial(object) {
|
|
165
|
-
var _a, _b;
|
|
166
173
|
const message = createBaseMsgStoreCodeResponse();
|
|
167
|
-
message.codeId =
|
|
168
|
-
message.checksum =
|
|
174
|
+
message.codeId = object.codeId ?? 0;
|
|
175
|
+
message.checksum = object.checksum ?? new Uint8Array(0);
|
|
169
176
|
return message;
|
|
170
177
|
},
|
|
171
178
|
};
|
|
@@ -175,12 +182,12 @@ function createBaseMsgInstantiateContract() {
|
|
|
175
182
|
admin: "",
|
|
176
183
|
codeId: 0,
|
|
177
184
|
label: "",
|
|
178
|
-
msg: new Uint8Array(),
|
|
185
|
+
msg: new Uint8Array(0),
|
|
179
186
|
funds: [],
|
|
180
187
|
};
|
|
181
188
|
}
|
|
182
189
|
exports.MsgInstantiateContract = {
|
|
183
|
-
encode(message, writer =
|
|
190
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
184
191
|
if (message.sender !== "") {
|
|
185
192
|
writer.uint32(10).string(message.sender);
|
|
186
193
|
}
|
|
@@ -202,104 +209,115 @@ exports.MsgInstantiateContract = {
|
|
|
202
209
|
return writer;
|
|
203
210
|
},
|
|
204
211
|
decode(input, length) {
|
|
205
|
-
const reader = input instanceof
|
|
212
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
206
213
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
207
214
|
const message = createBaseMsgInstantiateContract();
|
|
208
215
|
while (reader.pos < end) {
|
|
209
216
|
const tag = reader.uint32();
|
|
210
217
|
switch (tag >>> 3) {
|
|
211
|
-
case 1:
|
|
218
|
+
case 1: {
|
|
212
219
|
if (tag !== 10) {
|
|
213
220
|
break;
|
|
214
221
|
}
|
|
215
222
|
message.sender = reader.string();
|
|
216
223
|
continue;
|
|
217
|
-
|
|
224
|
+
}
|
|
225
|
+
case 2: {
|
|
218
226
|
if (tag !== 18) {
|
|
219
227
|
break;
|
|
220
228
|
}
|
|
221
229
|
message.admin = reader.string();
|
|
222
230
|
continue;
|
|
223
|
-
|
|
231
|
+
}
|
|
232
|
+
case 3: {
|
|
224
233
|
if (tag !== 24) {
|
|
225
234
|
break;
|
|
226
235
|
}
|
|
227
236
|
message.codeId = longToNumber(reader.uint64());
|
|
228
237
|
continue;
|
|
229
|
-
|
|
238
|
+
}
|
|
239
|
+
case 4: {
|
|
230
240
|
if (tag !== 34) {
|
|
231
241
|
break;
|
|
232
242
|
}
|
|
233
243
|
message.label = reader.string();
|
|
234
244
|
continue;
|
|
235
|
-
|
|
245
|
+
}
|
|
246
|
+
case 5: {
|
|
236
247
|
if (tag !== 42) {
|
|
237
248
|
break;
|
|
238
249
|
}
|
|
239
250
|
message.msg = reader.bytes();
|
|
240
251
|
continue;
|
|
241
|
-
|
|
252
|
+
}
|
|
253
|
+
case 6: {
|
|
242
254
|
if (tag !== 50) {
|
|
243
255
|
break;
|
|
244
256
|
}
|
|
245
257
|
message.funds.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
246
258
|
continue;
|
|
259
|
+
}
|
|
247
260
|
}
|
|
248
261
|
if ((tag & 7) === 4 || tag === 0) {
|
|
249
262
|
break;
|
|
250
263
|
}
|
|
251
|
-
reader.
|
|
264
|
+
reader.skip(tag & 7);
|
|
252
265
|
}
|
|
253
266
|
return message;
|
|
254
267
|
},
|
|
255
268
|
fromJSON(object) {
|
|
256
269
|
return {
|
|
257
|
-
sender: isSet(object.sender) ? String(object.sender) : "",
|
|
258
|
-
admin: isSet(object.admin) ? String(object.admin) : "",
|
|
259
|
-
codeId: isSet(object.codeId) ? Number(object.codeId) : 0,
|
|
260
|
-
label: isSet(object.label) ? String(object.label) : "",
|
|
261
|
-
msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(),
|
|
262
|
-
funds: Array.isArray(object
|
|
270
|
+
sender: isSet(object.sender) ? globalThis.String(object.sender) : "",
|
|
271
|
+
admin: isSet(object.admin) ? globalThis.String(object.admin) : "",
|
|
272
|
+
codeId: isSet(object.codeId) ? globalThis.Number(object.codeId) : 0,
|
|
273
|
+
label: isSet(object.label) ? globalThis.String(object.label) : "",
|
|
274
|
+
msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(0),
|
|
275
|
+
funds: globalThis.Array.isArray(object?.funds)
|
|
263
276
|
? object.funds.map((e) => coin_1.Coin.fromJSON(e))
|
|
264
277
|
: [],
|
|
265
278
|
};
|
|
266
279
|
},
|
|
267
280
|
toJSON(message) {
|
|
268
281
|
const obj = {};
|
|
269
|
-
message.sender !==
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
message.
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
if (message.
|
|
276
|
-
obj.
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
obj.
|
|
282
|
+
if (message.sender !== "") {
|
|
283
|
+
obj.sender = message.sender;
|
|
284
|
+
}
|
|
285
|
+
if (message.admin !== "") {
|
|
286
|
+
obj.admin = message.admin;
|
|
287
|
+
}
|
|
288
|
+
if (message.codeId !== 0) {
|
|
289
|
+
obj.codeId = Math.round(message.codeId);
|
|
290
|
+
}
|
|
291
|
+
if (message.label !== "") {
|
|
292
|
+
obj.label = message.label;
|
|
293
|
+
}
|
|
294
|
+
if (message.msg.length !== 0) {
|
|
295
|
+
obj.msg = base64FromBytes(message.msg);
|
|
296
|
+
}
|
|
297
|
+
if (message.funds?.length) {
|
|
298
|
+
obj.funds = message.funds.map((e) => coin_1.Coin.toJSON(e));
|
|
280
299
|
}
|
|
281
300
|
return obj;
|
|
282
301
|
},
|
|
283
302
|
create(base) {
|
|
284
|
-
return exports.MsgInstantiateContract.fromPartial(base
|
|
303
|
+
return exports.MsgInstantiateContract.fromPartial(base ?? {});
|
|
285
304
|
},
|
|
286
305
|
fromPartial(object) {
|
|
287
|
-
var _a, _b, _c, _d, _e, _f;
|
|
288
306
|
const message = createBaseMsgInstantiateContract();
|
|
289
|
-
message.sender =
|
|
290
|
-
message.admin =
|
|
291
|
-
message.codeId =
|
|
292
|
-
message.label =
|
|
293
|
-
message.msg =
|
|
294
|
-
message.funds =
|
|
307
|
+
message.sender = object.sender ?? "";
|
|
308
|
+
message.admin = object.admin ?? "";
|
|
309
|
+
message.codeId = object.codeId ?? 0;
|
|
310
|
+
message.label = object.label ?? "";
|
|
311
|
+
message.msg = object.msg ?? new Uint8Array(0);
|
|
312
|
+
message.funds = object.funds?.map((e) => coin_1.Coin.fromPartial(e)) || [];
|
|
295
313
|
return message;
|
|
296
314
|
},
|
|
297
315
|
};
|
|
298
316
|
function createBaseMsgInstantiateContractResponse() {
|
|
299
|
-
return { address: "", data: new Uint8Array() };
|
|
317
|
+
return { address: "", data: new Uint8Array(0) };
|
|
300
318
|
}
|
|
301
319
|
exports.MsgInstantiateContractResponse = {
|
|
302
|
-
encode(message, writer =
|
|
320
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
303
321
|
if (message.address !== "") {
|
|
304
322
|
writer.uint32(10).string(message.address);
|
|
305
323
|
}
|
|
@@ -309,55 +327,59 @@ exports.MsgInstantiateContractResponse = {
|
|
|
309
327
|
return writer;
|
|
310
328
|
},
|
|
311
329
|
decode(input, length) {
|
|
312
|
-
const reader = input instanceof
|
|
330
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
313
331
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
314
332
|
const message = createBaseMsgInstantiateContractResponse();
|
|
315
333
|
while (reader.pos < end) {
|
|
316
334
|
const tag = reader.uint32();
|
|
317
335
|
switch (tag >>> 3) {
|
|
318
|
-
case 1:
|
|
336
|
+
case 1: {
|
|
319
337
|
if (tag !== 10) {
|
|
320
338
|
break;
|
|
321
339
|
}
|
|
322
340
|
message.address = reader.string();
|
|
323
341
|
continue;
|
|
324
|
-
|
|
342
|
+
}
|
|
343
|
+
case 2: {
|
|
325
344
|
if (tag !== 18) {
|
|
326
345
|
break;
|
|
327
346
|
}
|
|
328
347
|
message.data = reader.bytes();
|
|
329
348
|
continue;
|
|
349
|
+
}
|
|
330
350
|
}
|
|
331
351
|
if ((tag & 7) === 4 || tag === 0) {
|
|
332
352
|
break;
|
|
333
353
|
}
|
|
334
|
-
reader.
|
|
354
|
+
reader.skip(tag & 7);
|
|
335
355
|
}
|
|
336
356
|
return message;
|
|
337
357
|
},
|
|
338
358
|
fromJSON(object) {
|
|
339
359
|
return {
|
|
340
|
-
address: isSet(object.address) ? String(object.address) : "",
|
|
360
|
+
address: isSet(object.address) ? globalThis.String(object.address) : "",
|
|
341
361
|
data: isSet(object.data)
|
|
342
362
|
? bytesFromBase64(object.data)
|
|
343
|
-
: new Uint8Array(),
|
|
363
|
+
: new Uint8Array(0),
|
|
344
364
|
};
|
|
345
365
|
},
|
|
346
366
|
toJSON(message) {
|
|
347
367
|
const obj = {};
|
|
348
|
-
message.address !==
|
|
349
|
-
|
|
350
|
-
|
|
368
|
+
if (message.address !== "") {
|
|
369
|
+
obj.address = message.address;
|
|
370
|
+
}
|
|
371
|
+
if (message.data.length !== 0) {
|
|
372
|
+
obj.data = base64FromBytes(message.data);
|
|
373
|
+
}
|
|
351
374
|
return obj;
|
|
352
375
|
},
|
|
353
376
|
create(base) {
|
|
354
|
-
return exports.MsgInstantiateContractResponse.fromPartial(base
|
|
377
|
+
return exports.MsgInstantiateContractResponse.fromPartial(base ?? {});
|
|
355
378
|
},
|
|
356
379
|
fromPartial(object) {
|
|
357
|
-
var _a, _b;
|
|
358
380
|
const message = createBaseMsgInstantiateContractResponse();
|
|
359
|
-
message.address =
|
|
360
|
-
message.data =
|
|
381
|
+
message.address = object.address ?? "";
|
|
382
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
361
383
|
return message;
|
|
362
384
|
},
|
|
363
385
|
};
|
|
@@ -367,14 +389,14 @@ function createBaseMsgInstantiateContract2() {
|
|
|
367
389
|
admin: "",
|
|
368
390
|
codeId: 0,
|
|
369
391
|
label: "",
|
|
370
|
-
msg: new Uint8Array(),
|
|
392
|
+
msg: new Uint8Array(0),
|
|
371
393
|
funds: [],
|
|
372
|
-
salt: new Uint8Array(),
|
|
394
|
+
salt: new Uint8Array(0),
|
|
373
395
|
fixMsg: false,
|
|
374
396
|
};
|
|
375
397
|
}
|
|
376
398
|
exports.MsgInstantiateContract2 = {
|
|
377
|
-
encode(message, writer =
|
|
399
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
378
400
|
if (message.sender !== "") {
|
|
379
401
|
writer.uint32(10).string(message.sender);
|
|
380
402
|
}
|
|
@@ -396,131 +418,147 @@ exports.MsgInstantiateContract2 = {
|
|
|
396
418
|
if (message.salt.length !== 0) {
|
|
397
419
|
writer.uint32(58).bytes(message.salt);
|
|
398
420
|
}
|
|
399
|
-
if (message.fixMsg
|
|
421
|
+
if (message.fixMsg !== false) {
|
|
400
422
|
writer.uint32(64).bool(message.fixMsg);
|
|
401
423
|
}
|
|
402
424
|
return writer;
|
|
403
425
|
},
|
|
404
426
|
decode(input, length) {
|
|
405
|
-
const reader = input instanceof
|
|
427
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
406
428
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
407
429
|
const message = createBaseMsgInstantiateContract2();
|
|
408
430
|
while (reader.pos < end) {
|
|
409
431
|
const tag = reader.uint32();
|
|
410
432
|
switch (tag >>> 3) {
|
|
411
|
-
case 1:
|
|
433
|
+
case 1: {
|
|
412
434
|
if (tag !== 10) {
|
|
413
435
|
break;
|
|
414
436
|
}
|
|
415
437
|
message.sender = reader.string();
|
|
416
438
|
continue;
|
|
417
|
-
|
|
439
|
+
}
|
|
440
|
+
case 2: {
|
|
418
441
|
if (tag !== 18) {
|
|
419
442
|
break;
|
|
420
443
|
}
|
|
421
444
|
message.admin = reader.string();
|
|
422
445
|
continue;
|
|
423
|
-
|
|
446
|
+
}
|
|
447
|
+
case 3: {
|
|
424
448
|
if (tag !== 24) {
|
|
425
449
|
break;
|
|
426
450
|
}
|
|
427
451
|
message.codeId = longToNumber(reader.uint64());
|
|
428
452
|
continue;
|
|
429
|
-
|
|
453
|
+
}
|
|
454
|
+
case 4: {
|
|
430
455
|
if (tag !== 34) {
|
|
431
456
|
break;
|
|
432
457
|
}
|
|
433
458
|
message.label = reader.string();
|
|
434
459
|
continue;
|
|
435
|
-
|
|
460
|
+
}
|
|
461
|
+
case 5: {
|
|
436
462
|
if (tag !== 42) {
|
|
437
463
|
break;
|
|
438
464
|
}
|
|
439
465
|
message.msg = reader.bytes();
|
|
440
466
|
continue;
|
|
441
|
-
|
|
467
|
+
}
|
|
468
|
+
case 6: {
|
|
442
469
|
if (tag !== 50) {
|
|
443
470
|
break;
|
|
444
471
|
}
|
|
445
472
|
message.funds.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
446
473
|
continue;
|
|
447
|
-
|
|
474
|
+
}
|
|
475
|
+
case 7: {
|
|
448
476
|
if (tag !== 58) {
|
|
449
477
|
break;
|
|
450
478
|
}
|
|
451
479
|
message.salt = reader.bytes();
|
|
452
480
|
continue;
|
|
453
|
-
|
|
481
|
+
}
|
|
482
|
+
case 8: {
|
|
454
483
|
if (tag !== 64) {
|
|
455
484
|
break;
|
|
456
485
|
}
|
|
457
486
|
message.fixMsg = reader.bool();
|
|
458
487
|
continue;
|
|
488
|
+
}
|
|
459
489
|
}
|
|
460
490
|
if ((tag & 7) === 4 || tag === 0) {
|
|
461
491
|
break;
|
|
462
492
|
}
|
|
463
|
-
reader.
|
|
493
|
+
reader.skip(tag & 7);
|
|
464
494
|
}
|
|
465
495
|
return message;
|
|
466
496
|
},
|
|
467
497
|
fromJSON(object) {
|
|
468
498
|
return {
|
|
469
|
-
sender: isSet(object.sender) ? String(object.sender) : "",
|
|
470
|
-
admin: isSet(object.admin) ? String(object.admin) : "",
|
|
471
|
-
codeId: isSet(object.codeId) ? Number(object.codeId) : 0,
|
|
472
|
-
label: isSet(object.label) ? String(object.label) : "",
|
|
473
|
-
msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(),
|
|
474
|
-
funds: Array.isArray(object
|
|
499
|
+
sender: isSet(object.sender) ? globalThis.String(object.sender) : "",
|
|
500
|
+
admin: isSet(object.admin) ? globalThis.String(object.admin) : "",
|
|
501
|
+
codeId: isSet(object.codeId) ? globalThis.Number(object.codeId) : 0,
|
|
502
|
+
label: isSet(object.label) ? globalThis.String(object.label) : "",
|
|
503
|
+
msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(0),
|
|
504
|
+
funds: globalThis.Array.isArray(object?.funds)
|
|
475
505
|
? object.funds.map((e) => coin_1.Coin.fromJSON(e))
|
|
476
506
|
: [],
|
|
477
507
|
salt: isSet(object.salt)
|
|
478
508
|
? bytesFromBase64(object.salt)
|
|
479
|
-
: new Uint8Array(),
|
|
480
|
-
fixMsg: isSet(object.fixMsg) ? Boolean(object.fixMsg) : false,
|
|
509
|
+
: new Uint8Array(0),
|
|
510
|
+
fixMsg: isSet(object.fixMsg) ? globalThis.Boolean(object.fixMsg) : false,
|
|
481
511
|
};
|
|
482
512
|
},
|
|
483
513
|
toJSON(message) {
|
|
484
514
|
const obj = {};
|
|
485
|
-
message.sender !==
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
message.
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
if (message.
|
|
492
|
-
obj.
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
obj.
|
|
496
|
-
}
|
|
497
|
-
message.
|
|
498
|
-
|
|
499
|
-
|
|
515
|
+
if (message.sender !== "") {
|
|
516
|
+
obj.sender = message.sender;
|
|
517
|
+
}
|
|
518
|
+
if (message.admin !== "") {
|
|
519
|
+
obj.admin = message.admin;
|
|
520
|
+
}
|
|
521
|
+
if (message.codeId !== 0) {
|
|
522
|
+
obj.codeId = Math.round(message.codeId);
|
|
523
|
+
}
|
|
524
|
+
if (message.label !== "") {
|
|
525
|
+
obj.label = message.label;
|
|
526
|
+
}
|
|
527
|
+
if (message.msg.length !== 0) {
|
|
528
|
+
obj.msg = base64FromBytes(message.msg);
|
|
529
|
+
}
|
|
530
|
+
if (message.funds?.length) {
|
|
531
|
+
obj.funds = message.funds.map((e) => coin_1.Coin.toJSON(e));
|
|
532
|
+
}
|
|
533
|
+
if (message.salt.length !== 0) {
|
|
534
|
+
obj.salt = base64FromBytes(message.salt);
|
|
535
|
+
}
|
|
536
|
+
if (message.fixMsg !== false) {
|
|
537
|
+
obj.fixMsg = message.fixMsg;
|
|
538
|
+
}
|
|
500
539
|
return obj;
|
|
501
540
|
},
|
|
502
541
|
create(base) {
|
|
503
|
-
return exports.MsgInstantiateContract2.fromPartial(base
|
|
542
|
+
return exports.MsgInstantiateContract2.fromPartial(base ?? {});
|
|
504
543
|
},
|
|
505
544
|
fromPartial(object) {
|
|
506
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
507
545
|
const message = createBaseMsgInstantiateContract2();
|
|
508
|
-
message.sender =
|
|
509
|
-
message.admin =
|
|
510
|
-
message.codeId =
|
|
511
|
-
message.label =
|
|
512
|
-
message.msg =
|
|
513
|
-
message.funds =
|
|
514
|
-
message.salt =
|
|
515
|
-
message.fixMsg =
|
|
546
|
+
message.sender = object.sender ?? "";
|
|
547
|
+
message.admin = object.admin ?? "";
|
|
548
|
+
message.codeId = object.codeId ?? 0;
|
|
549
|
+
message.label = object.label ?? "";
|
|
550
|
+
message.msg = object.msg ?? new Uint8Array(0);
|
|
551
|
+
message.funds = object.funds?.map((e) => coin_1.Coin.fromPartial(e)) || [];
|
|
552
|
+
message.salt = object.salt ?? new Uint8Array(0);
|
|
553
|
+
message.fixMsg = object.fixMsg ?? false;
|
|
516
554
|
return message;
|
|
517
555
|
},
|
|
518
556
|
};
|
|
519
557
|
function createBaseMsgInstantiateContract2Response() {
|
|
520
|
-
return { address: "", data: new Uint8Array() };
|
|
558
|
+
return { address: "", data: new Uint8Array(0) };
|
|
521
559
|
}
|
|
522
560
|
exports.MsgInstantiateContract2Response = {
|
|
523
|
-
encode(message, writer =
|
|
561
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
524
562
|
if (message.address !== "") {
|
|
525
563
|
writer.uint32(10).string(message.address);
|
|
526
564
|
}
|
|
@@ -530,63 +568,67 @@ exports.MsgInstantiateContract2Response = {
|
|
|
530
568
|
return writer;
|
|
531
569
|
},
|
|
532
570
|
decode(input, length) {
|
|
533
|
-
const reader = input instanceof
|
|
571
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
534
572
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
535
573
|
const message = createBaseMsgInstantiateContract2Response();
|
|
536
574
|
while (reader.pos < end) {
|
|
537
575
|
const tag = reader.uint32();
|
|
538
576
|
switch (tag >>> 3) {
|
|
539
|
-
case 1:
|
|
577
|
+
case 1: {
|
|
540
578
|
if (tag !== 10) {
|
|
541
579
|
break;
|
|
542
580
|
}
|
|
543
581
|
message.address = reader.string();
|
|
544
582
|
continue;
|
|
545
|
-
|
|
583
|
+
}
|
|
584
|
+
case 2: {
|
|
546
585
|
if (tag !== 18) {
|
|
547
586
|
break;
|
|
548
587
|
}
|
|
549
588
|
message.data = reader.bytes();
|
|
550
589
|
continue;
|
|
590
|
+
}
|
|
551
591
|
}
|
|
552
592
|
if ((tag & 7) === 4 || tag === 0) {
|
|
553
593
|
break;
|
|
554
594
|
}
|
|
555
|
-
reader.
|
|
595
|
+
reader.skip(tag & 7);
|
|
556
596
|
}
|
|
557
597
|
return message;
|
|
558
598
|
},
|
|
559
599
|
fromJSON(object) {
|
|
560
600
|
return {
|
|
561
|
-
address: isSet(object.address) ? String(object.address) : "",
|
|
601
|
+
address: isSet(object.address) ? globalThis.String(object.address) : "",
|
|
562
602
|
data: isSet(object.data)
|
|
563
603
|
? bytesFromBase64(object.data)
|
|
564
|
-
: new Uint8Array(),
|
|
604
|
+
: new Uint8Array(0),
|
|
565
605
|
};
|
|
566
606
|
},
|
|
567
607
|
toJSON(message) {
|
|
568
608
|
const obj = {};
|
|
569
|
-
message.address !==
|
|
570
|
-
|
|
571
|
-
|
|
609
|
+
if (message.address !== "") {
|
|
610
|
+
obj.address = message.address;
|
|
611
|
+
}
|
|
612
|
+
if (message.data.length !== 0) {
|
|
613
|
+
obj.data = base64FromBytes(message.data);
|
|
614
|
+
}
|
|
572
615
|
return obj;
|
|
573
616
|
},
|
|
574
617
|
create(base) {
|
|
575
|
-
return exports.MsgInstantiateContract2Response.fromPartial(base
|
|
618
|
+
return exports.MsgInstantiateContract2Response.fromPartial(base ?? {});
|
|
576
619
|
},
|
|
577
620
|
fromPartial(object) {
|
|
578
|
-
var _a, _b;
|
|
579
621
|
const message = createBaseMsgInstantiateContract2Response();
|
|
580
|
-
message.address =
|
|
581
|
-
message.data =
|
|
622
|
+
message.address = object.address ?? "";
|
|
623
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
582
624
|
return message;
|
|
583
625
|
},
|
|
584
626
|
};
|
|
585
627
|
function createBaseMsgExecuteContract() {
|
|
586
|
-
return { sender: "", contract: "", msg: new Uint8Array(), funds: [] };
|
|
628
|
+
return { sender: "", contract: "", msg: new Uint8Array(0), funds: [] };
|
|
587
629
|
}
|
|
588
630
|
exports.MsgExecuteContract = {
|
|
589
|
-
encode(message, writer =
|
|
631
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
590
632
|
if (message.sender !== "") {
|
|
591
633
|
writer.uint32(10).string(message.sender);
|
|
592
634
|
}
|
|
@@ -602,109 +644,117 @@ exports.MsgExecuteContract = {
|
|
|
602
644
|
return writer;
|
|
603
645
|
},
|
|
604
646
|
decode(input, length) {
|
|
605
|
-
const reader = input instanceof
|
|
647
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
606
648
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
607
649
|
const message = createBaseMsgExecuteContract();
|
|
608
650
|
while (reader.pos < end) {
|
|
609
651
|
const tag = reader.uint32();
|
|
610
652
|
switch (tag >>> 3) {
|
|
611
|
-
case 1:
|
|
653
|
+
case 1: {
|
|
612
654
|
if (tag !== 10) {
|
|
613
655
|
break;
|
|
614
656
|
}
|
|
615
657
|
message.sender = reader.string();
|
|
616
658
|
continue;
|
|
617
|
-
|
|
659
|
+
}
|
|
660
|
+
case 2: {
|
|
618
661
|
if (tag !== 18) {
|
|
619
662
|
break;
|
|
620
663
|
}
|
|
621
664
|
message.contract = reader.string();
|
|
622
665
|
continue;
|
|
623
|
-
|
|
666
|
+
}
|
|
667
|
+
case 3: {
|
|
624
668
|
if (tag !== 26) {
|
|
625
669
|
break;
|
|
626
670
|
}
|
|
627
671
|
message.msg = reader.bytes();
|
|
628
672
|
continue;
|
|
629
|
-
|
|
673
|
+
}
|
|
674
|
+
case 5: {
|
|
630
675
|
if (tag !== 42) {
|
|
631
676
|
break;
|
|
632
677
|
}
|
|
633
678
|
message.funds.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
634
679
|
continue;
|
|
680
|
+
}
|
|
635
681
|
}
|
|
636
682
|
if ((tag & 7) === 4 || tag === 0) {
|
|
637
683
|
break;
|
|
638
684
|
}
|
|
639
|
-
reader.
|
|
685
|
+
reader.skip(tag & 7);
|
|
640
686
|
}
|
|
641
687
|
return message;
|
|
642
688
|
},
|
|
643
689
|
fromJSON(object) {
|
|
644
690
|
return {
|
|
645
|
-
sender: isSet(object.sender) ? String(object.sender) : "",
|
|
646
|
-
contract: isSet(object.contract)
|
|
647
|
-
|
|
648
|
-
|
|
691
|
+
sender: isSet(object.sender) ? globalThis.String(object.sender) : "",
|
|
692
|
+
contract: isSet(object.contract)
|
|
693
|
+
? globalThis.String(object.contract)
|
|
694
|
+
: "",
|
|
695
|
+
msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(0),
|
|
696
|
+
funds: globalThis.Array.isArray(object?.funds)
|
|
649
697
|
? object.funds.map((e) => coin_1.Coin.fromJSON(e))
|
|
650
698
|
: [],
|
|
651
699
|
};
|
|
652
700
|
},
|
|
653
701
|
toJSON(message) {
|
|
654
702
|
const obj = {};
|
|
655
|
-
message.sender !==
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
obj.funds = message.funds.map((e) => (e ? coin_1.Coin.toJSON(e) : undefined));
|
|
703
|
+
if (message.sender !== "") {
|
|
704
|
+
obj.sender = message.sender;
|
|
705
|
+
}
|
|
706
|
+
if (message.contract !== "") {
|
|
707
|
+
obj.contract = message.contract;
|
|
661
708
|
}
|
|
662
|
-
|
|
663
|
-
obj.
|
|
709
|
+
if (message.msg.length !== 0) {
|
|
710
|
+
obj.msg = base64FromBytes(message.msg);
|
|
711
|
+
}
|
|
712
|
+
if (message.funds?.length) {
|
|
713
|
+
obj.funds = message.funds.map((e) => coin_1.Coin.toJSON(e));
|
|
664
714
|
}
|
|
665
715
|
return obj;
|
|
666
716
|
},
|
|
667
717
|
create(base) {
|
|
668
|
-
return exports.MsgExecuteContract.fromPartial(base
|
|
718
|
+
return exports.MsgExecuteContract.fromPartial(base ?? {});
|
|
669
719
|
},
|
|
670
720
|
fromPartial(object) {
|
|
671
|
-
var _a, _b, _c, _d;
|
|
672
721
|
const message = createBaseMsgExecuteContract();
|
|
673
|
-
message.sender =
|
|
674
|
-
message.contract =
|
|
675
|
-
message.msg =
|
|
676
|
-
message.funds =
|
|
722
|
+
message.sender = object.sender ?? "";
|
|
723
|
+
message.contract = object.contract ?? "";
|
|
724
|
+
message.msg = object.msg ?? new Uint8Array(0);
|
|
725
|
+
message.funds = object.funds?.map((e) => coin_1.Coin.fromPartial(e)) || [];
|
|
677
726
|
return message;
|
|
678
727
|
},
|
|
679
728
|
};
|
|
680
729
|
function createBaseMsgExecuteContractResponse() {
|
|
681
|
-
return { data: new Uint8Array() };
|
|
730
|
+
return { data: new Uint8Array(0) };
|
|
682
731
|
}
|
|
683
732
|
exports.MsgExecuteContractResponse = {
|
|
684
|
-
encode(message, writer =
|
|
733
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
685
734
|
if (message.data.length !== 0) {
|
|
686
735
|
writer.uint32(10).bytes(message.data);
|
|
687
736
|
}
|
|
688
737
|
return writer;
|
|
689
738
|
},
|
|
690
739
|
decode(input, length) {
|
|
691
|
-
const reader = input instanceof
|
|
740
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
692
741
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
693
742
|
const message = createBaseMsgExecuteContractResponse();
|
|
694
743
|
while (reader.pos < end) {
|
|
695
744
|
const tag = reader.uint32();
|
|
696
745
|
switch (tag >>> 3) {
|
|
697
|
-
case 1:
|
|
746
|
+
case 1: {
|
|
698
747
|
if (tag !== 10) {
|
|
699
748
|
break;
|
|
700
749
|
}
|
|
701
750
|
message.data = reader.bytes();
|
|
702
751
|
continue;
|
|
752
|
+
}
|
|
703
753
|
}
|
|
704
754
|
if ((tag & 7) === 4 || tag === 0) {
|
|
705
755
|
break;
|
|
706
756
|
}
|
|
707
|
-
reader.
|
|
757
|
+
reader.skip(tag & 7);
|
|
708
758
|
}
|
|
709
759
|
return message;
|
|
710
760
|
},
|
|
@@ -712,30 +762,30 @@ exports.MsgExecuteContractResponse = {
|
|
|
712
762
|
return {
|
|
713
763
|
data: isSet(object.data)
|
|
714
764
|
? bytesFromBase64(object.data)
|
|
715
|
-
: new Uint8Array(),
|
|
765
|
+
: new Uint8Array(0),
|
|
716
766
|
};
|
|
717
767
|
},
|
|
718
768
|
toJSON(message) {
|
|
719
769
|
const obj = {};
|
|
720
|
-
message.data !==
|
|
721
|
-
|
|
770
|
+
if (message.data.length !== 0) {
|
|
771
|
+
obj.data = base64FromBytes(message.data);
|
|
772
|
+
}
|
|
722
773
|
return obj;
|
|
723
774
|
},
|
|
724
775
|
create(base) {
|
|
725
|
-
return exports.MsgExecuteContractResponse.fromPartial(base
|
|
776
|
+
return exports.MsgExecuteContractResponse.fromPartial(base ?? {});
|
|
726
777
|
},
|
|
727
778
|
fromPartial(object) {
|
|
728
|
-
var _a;
|
|
729
779
|
const message = createBaseMsgExecuteContractResponse();
|
|
730
|
-
message.data =
|
|
780
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
731
781
|
return message;
|
|
732
782
|
},
|
|
733
783
|
};
|
|
734
784
|
function createBaseMsgMigrateContract() {
|
|
735
|
-
return { sender: "", contract: "", codeId: 0, msg: new Uint8Array() };
|
|
785
|
+
return { sender: "", contract: "", codeId: 0, msg: new Uint8Array(0) };
|
|
736
786
|
}
|
|
737
787
|
exports.MsgMigrateContract = {
|
|
738
|
-
encode(message, writer =
|
|
788
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
739
789
|
if (message.sender !== "") {
|
|
740
790
|
writer.uint32(10).string(message.sender);
|
|
741
791
|
}
|
|
@@ -751,102 +801,115 @@ exports.MsgMigrateContract = {
|
|
|
751
801
|
return writer;
|
|
752
802
|
},
|
|
753
803
|
decode(input, length) {
|
|
754
|
-
const reader = input instanceof
|
|
804
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
755
805
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
756
806
|
const message = createBaseMsgMigrateContract();
|
|
757
807
|
while (reader.pos < end) {
|
|
758
808
|
const tag = reader.uint32();
|
|
759
809
|
switch (tag >>> 3) {
|
|
760
|
-
case 1:
|
|
810
|
+
case 1: {
|
|
761
811
|
if (tag !== 10) {
|
|
762
812
|
break;
|
|
763
813
|
}
|
|
764
814
|
message.sender = reader.string();
|
|
765
815
|
continue;
|
|
766
|
-
|
|
816
|
+
}
|
|
817
|
+
case 2: {
|
|
767
818
|
if (tag !== 18) {
|
|
768
819
|
break;
|
|
769
820
|
}
|
|
770
821
|
message.contract = reader.string();
|
|
771
822
|
continue;
|
|
772
|
-
|
|
823
|
+
}
|
|
824
|
+
case 3: {
|
|
773
825
|
if (tag !== 24) {
|
|
774
826
|
break;
|
|
775
827
|
}
|
|
776
828
|
message.codeId = longToNumber(reader.uint64());
|
|
777
829
|
continue;
|
|
778
|
-
|
|
830
|
+
}
|
|
831
|
+
case 4: {
|
|
779
832
|
if (tag !== 34) {
|
|
780
833
|
break;
|
|
781
834
|
}
|
|
782
835
|
message.msg = reader.bytes();
|
|
783
836
|
continue;
|
|
837
|
+
}
|
|
784
838
|
}
|
|
785
839
|
if ((tag & 7) === 4 || tag === 0) {
|
|
786
840
|
break;
|
|
787
841
|
}
|
|
788
|
-
reader.
|
|
842
|
+
reader.skip(tag & 7);
|
|
789
843
|
}
|
|
790
844
|
return message;
|
|
791
845
|
},
|
|
792
846
|
fromJSON(object) {
|
|
793
847
|
return {
|
|
794
|
-
sender: isSet(object.sender) ? String(object.sender) : "",
|
|
795
|
-
contract: isSet(object.contract)
|
|
796
|
-
|
|
797
|
-
|
|
848
|
+
sender: isSet(object.sender) ? globalThis.String(object.sender) : "",
|
|
849
|
+
contract: isSet(object.contract)
|
|
850
|
+
? globalThis.String(object.contract)
|
|
851
|
+
: "",
|
|
852
|
+
codeId: isSet(object.codeId) ? globalThis.Number(object.codeId) : 0,
|
|
853
|
+
msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(0),
|
|
798
854
|
};
|
|
799
855
|
},
|
|
800
856
|
toJSON(message) {
|
|
801
857
|
const obj = {};
|
|
802
|
-
message.sender !==
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
message.
|
|
806
|
-
|
|
858
|
+
if (message.sender !== "") {
|
|
859
|
+
obj.sender = message.sender;
|
|
860
|
+
}
|
|
861
|
+
if (message.contract !== "") {
|
|
862
|
+
obj.contract = message.contract;
|
|
863
|
+
}
|
|
864
|
+
if (message.codeId !== 0) {
|
|
865
|
+
obj.codeId = Math.round(message.codeId);
|
|
866
|
+
}
|
|
867
|
+
if (message.msg.length !== 0) {
|
|
868
|
+
obj.msg = base64FromBytes(message.msg);
|
|
869
|
+
}
|
|
807
870
|
return obj;
|
|
808
871
|
},
|
|
809
872
|
create(base) {
|
|
810
|
-
return exports.MsgMigrateContract.fromPartial(base
|
|
873
|
+
return exports.MsgMigrateContract.fromPartial(base ?? {});
|
|
811
874
|
},
|
|
812
875
|
fromPartial(object) {
|
|
813
|
-
var _a, _b, _c, _d;
|
|
814
876
|
const message = createBaseMsgMigrateContract();
|
|
815
|
-
message.sender =
|
|
816
|
-
message.contract =
|
|
817
|
-
message.codeId =
|
|
818
|
-
message.msg =
|
|
877
|
+
message.sender = object.sender ?? "";
|
|
878
|
+
message.contract = object.contract ?? "";
|
|
879
|
+
message.codeId = object.codeId ?? 0;
|
|
880
|
+
message.msg = object.msg ?? new Uint8Array(0);
|
|
819
881
|
return message;
|
|
820
882
|
},
|
|
821
883
|
};
|
|
822
884
|
function createBaseMsgMigrateContractResponse() {
|
|
823
|
-
return { data: new Uint8Array() };
|
|
885
|
+
return { data: new Uint8Array(0) };
|
|
824
886
|
}
|
|
825
887
|
exports.MsgMigrateContractResponse = {
|
|
826
|
-
encode(message, writer =
|
|
888
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
827
889
|
if (message.data.length !== 0) {
|
|
828
890
|
writer.uint32(10).bytes(message.data);
|
|
829
891
|
}
|
|
830
892
|
return writer;
|
|
831
893
|
},
|
|
832
894
|
decode(input, length) {
|
|
833
|
-
const reader = input instanceof
|
|
895
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
834
896
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
835
897
|
const message = createBaseMsgMigrateContractResponse();
|
|
836
898
|
while (reader.pos < end) {
|
|
837
899
|
const tag = reader.uint32();
|
|
838
900
|
switch (tag >>> 3) {
|
|
839
|
-
case 1:
|
|
901
|
+
case 1: {
|
|
840
902
|
if (tag !== 10) {
|
|
841
903
|
break;
|
|
842
904
|
}
|
|
843
905
|
message.data = reader.bytes();
|
|
844
906
|
continue;
|
|
907
|
+
}
|
|
845
908
|
}
|
|
846
909
|
if ((tag & 7) === 4 || tag === 0) {
|
|
847
910
|
break;
|
|
848
911
|
}
|
|
849
|
-
reader.
|
|
912
|
+
reader.skip(tag & 7);
|
|
850
913
|
}
|
|
851
914
|
return message;
|
|
852
915
|
},
|
|
@@ -854,22 +917,22 @@ exports.MsgMigrateContractResponse = {
|
|
|
854
917
|
return {
|
|
855
918
|
data: isSet(object.data)
|
|
856
919
|
? bytesFromBase64(object.data)
|
|
857
|
-
: new Uint8Array(),
|
|
920
|
+
: new Uint8Array(0),
|
|
858
921
|
};
|
|
859
922
|
},
|
|
860
923
|
toJSON(message) {
|
|
861
924
|
const obj = {};
|
|
862
|
-
message.data !==
|
|
863
|
-
|
|
925
|
+
if (message.data.length !== 0) {
|
|
926
|
+
obj.data = base64FromBytes(message.data);
|
|
927
|
+
}
|
|
864
928
|
return obj;
|
|
865
929
|
},
|
|
866
930
|
create(base) {
|
|
867
|
-
return exports.MsgMigrateContractResponse.fromPartial(base
|
|
931
|
+
return exports.MsgMigrateContractResponse.fromPartial(base ?? {});
|
|
868
932
|
},
|
|
869
933
|
fromPartial(object) {
|
|
870
|
-
var _a;
|
|
871
934
|
const message = createBaseMsgMigrateContractResponse();
|
|
872
|
-
message.data =
|
|
935
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
873
936
|
return message;
|
|
874
937
|
},
|
|
875
938
|
};
|
|
@@ -877,7 +940,7 @@ function createBaseMsgUpdateAdmin() {
|
|
|
877
940
|
return { sender: "", newAdmin: "", contract: "" };
|
|
878
941
|
}
|
|
879
942
|
exports.MsgUpdateAdmin = {
|
|
880
|
-
encode(message, writer =
|
|
943
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
881
944
|
if (message.sender !== "") {
|
|
882
945
|
writer.uint32(10).string(message.sender);
|
|
883
946
|
}
|
|
@@ -890,61 +953,73 @@ exports.MsgUpdateAdmin = {
|
|
|
890
953
|
return writer;
|
|
891
954
|
},
|
|
892
955
|
decode(input, length) {
|
|
893
|
-
const reader = input instanceof
|
|
956
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
894
957
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
895
958
|
const message = createBaseMsgUpdateAdmin();
|
|
896
959
|
while (reader.pos < end) {
|
|
897
960
|
const tag = reader.uint32();
|
|
898
961
|
switch (tag >>> 3) {
|
|
899
|
-
case 1:
|
|
962
|
+
case 1: {
|
|
900
963
|
if (tag !== 10) {
|
|
901
964
|
break;
|
|
902
965
|
}
|
|
903
966
|
message.sender = reader.string();
|
|
904
967
|
continue;
|
|
905
|
-
|
|
968
|
+
}
|
|
969
|
+
case 2: {
|
|
906
970
|
if (tag !== 18) {
|
|
907
971
|
break;
|
|
908
972
|
}
|
|
909
973
|
message.newAdmin = reader.string();
|
|
910
974
|
continue;
|
|
911
|
-
|
|
975
|
+
}
|
|
976
|
+
case 3: {
|
|
912
977
|
if (tag !== 26) {
|
|
913
978
|
break;
|
|
914
979
|
}
|
|
915
980
|
message.contract = reader.string();
|
|
916
981
|
continue;
|
|
982
|
+
}
|
|
917
983
|
}
|
|
918
984
|
if ((tag & 7) === 4 || tag === 0) {
|
|
919
985
|
break;
|
|
920
986
|
}
|
|
921
|
-
reader.
|
|
987
|
+
reader.skip(tag & 7);
|
|
922
988
|
}
|
|
923
989
|
return message;
|
|
924
990
|
},
|
|
925
991
|
fromJSON(object) {
|
|
926
992
|
return {
|
|
927
|
-
sender: isSet(object.sender) ? String(object.sender) : "",
|
|
928
|
-
newAdmin: isSet(object.newAdmin)
|
|
929
|
-
|
|
993
|
+
sender: isSet(object.sender) ? globalThis.String(object.sender) : "",
|
|
994
|
+
newAdmin: isSet(object.newAdmin)
|
|
995
|
+
? globalThis.String(object.newAdmin)
|
|
996
|
+
: "",
|
|
997
|
+
contract: isSet(object.contract)
|
|
998
|
+
? globalThis.String(object.contract)
|
|
999
|
+
: "",
|
|
930
1000
|
};
|
|
931
1001
|
},
|
|
932
1002
|
toJSON(message) {
|
|
933
1003
|
const obj = {};
|
|
934
|
-
message.sender !==
|
|
935
|
-
|
|
936
|
-
|
|
1004
|
+
if (message.sender !== "") {
|
|
1005
|
+
obj.sender = message.sender;
|
|
1006
|
+
}
|
|
1007
|
+
if (message.newAdmin !== "") {
|
|
1008
|
+
obj.newAdmin = message.newAdmin;
|
|
1009
|
+
}
|
|
1010
|
+
if (message.contract !== "") {
|
|
1011
|
+
obj.contract = message.contract;
|
|
1012
|
+
}
|
|
937
1013
|
return obj;
|
|
938
1014
|
},
|
|
939
1015
|
create(base) {
|
|
940
|
-
return exports.MsgUpdateAdmin.fromPartial(base
|
|
1016
|
+
return exports.MsgUpdateAdmin.fromPartial(base ?? {});
|
|
941
1017
|
},
|
|
942
1018
|
fromPartial(object) {
|
|
943
|
-
var _a, _b, _c;
|
|
944
1019
|
const message = createBaseMsgUpdateAdmin();
|
|
945
|
-
message.sender =
|
|
946
|
-
message.newAdmin =
|
|
947
|
-
message.contract =
|
|
1020
|
+
message.sender = object.sender ?? "";
|
|
1021
|
+
message.newAdmin = object.newAdmin ?? "";
|
|
1022
|
+
message.contract = object.contract ?? "";
|
|
948
1023
|
return message;
|
|
949
1024
|
},
|
|
950
1025
|
};
|
|
@@ -952,11 +1027,11 @@ function createBaseMsgUpdateAdminResponse() {
|
|
|
952
1027
|
return {};
|
|
953
1028
|
}
|
|
954
1029
|
exports.MsgUpdateAdminResponse = {
|
|
955
|
-
encode(_, writer =
|
|
1030
|
+
encode(_, writer = new binary_1.BinaryWriter()) {
|
|
956
1031
|
return writer;
|
|
957
1032
|
},
|
|
958
1033
|
decode(input, length) {
|
|
959
|
-
const reader = input instanceof
|
|
1034
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
960
1035
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
961
1036
|
const message = createBaseMsgUpdateAdminResponse();
|
|
962
1037
|
while (reader.pos < end) {
|
|
@@ -966,7 +1041,7 @@ exports.MsgUpdateAdminResponse = {
|
|
|
966
1041
|
if ((tag & 7) === 4 || tag === 0) {
|
|
967
1042
|
break;
|
|
968
1043
|
}
|
|
969
|
-
reader.
|
|
1044
|
+
reader.skip(tag & 7);
|
|
970
1045
|
}
|
|
971
1046
|
return message;
|
|
972
1047
|
},
|
|
@@ -978,7 +1053,7 @@ exports.MsgUpdateAdminResponse = {
|
|
|
978
1053
|
return obj;
|
|
979
1054
|
},
|
|
980
1055
|
create(base) {
|
|
981
|
-
return exports.MsgUpdateAdminResponse.fromPartial(base
|
|
1056
|
+
return exports.MsgUpdateAdminResponse.fromPartial(base ?? {});
|
|
982
1057
|
},
|
|
983
1058
|
fromPartial(_) {
|
|
984
1059
|
const message = createBaseMsgUpdateAdminResponse();
|
|
@@ -989,7 +1064,7 @@ function createBaseMsgClearAdmin() {
|
|
|
989
1064
|
return { sender: "", contract: "" };
|
|
990
1065
|
}
|
|
991
1066
|
exports.MsgClearAdmin = {
|
|
992
|
-
encode(message, writer =
|
|
1067
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
993
1068
|
if (message.sender !== "") {
|
|
994
1069
|
writer.uint32(10).string(message.sender);
|
|
995
1070
|
}
|
|
@@ -999,52 +1074,59 @@ exports.MsgClearAdmin = {
|
|
|
999
1074
|
return writer;
|
|
1000
1075
|
},
|
|
1001
1076
|
decode(input, length) {
|
|
1002
|
-
const reader = input instanceof
|
|
1077
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1003
1078
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1004
1079
|
const message = createBaseMsgClearAdmin();
|
|
1005
1080
|
while (reader.pos < end) {
|
|
1006
1081
|
const tag = reader.uint32();
|
|
1007
1082
|
switch (tag >>> 3) {
|
|
1008
|
-
case 1:
|
|
1083
|
+
case 1: {
|
|
1009
1084
|
if (tag !== 10) {
|
|
1010
1085
|
break;
|
|
1011
1086
|
}
|
|
1012
1087
|
message.sender = reader.string();
|
|
1013
1088
|
continue;
|
|
1014
|
-
|
|
1089
|
+
}
|
|
1090
|
+
case 3: {
|
|
1015
1091
|
if (tag !== 26) {
|
|
1016
1092
|
break;
|
|
1017
1093
|
}
|
|
1018
1094
|
message.contract = reader.string();
|
|
1019
1095
|
continue;
|
|
1096
|
+
}
|
|
1020
1097
|
}
|
|
1021
1098
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1022
1099
|
break;
|
|
1023
1100
|
}
|
|
1024
|
-
reader.
|
|
1101
|
+
reader.skip(tag & 7);
|
|
1025
1102
|
}
|
|
1026
1103
|
return message;
|
|
1027
1104
|
},
|
|
1028
1105
|
fromJSON(object) {
|
|
1029
1106
|
return {
|
|
1030
|
-
sender: isSet(object.sender) ? String(object.sender) : "",
|
|
1031
|
-
contract: isSet(object.contract)
|
|
1107
|
+
sender: isSet(object.sender) ? globalThis.String(object.sender) : "",
|
|
1108
|
+
contract: isSet(object.contract)
|
|
1109
|
+
? globalThis.String(object.contract)
|
|
1110
|
+
: "",
|
|
1032
1111
|
};
|
|
1033
1112
|
},
|
|
1034
1113
|
toJSON(message) {
|
|
1035
1114
|
const obj = {};
|
|
1036
|
-
message.sender !==
|
|
1037
|
-
|
|
1115
|
+
if (message.sender !== "") {
|
|
1116
|
+
obj.sender = message.sender;
|
|
1117
|
+
}
|
|
1118
|
+
if (message.contract !== "") {
|
|
1119
|
+
obj.contract = message.contract;
|
|
1120
|
+
}
|
|
1038
1121
|
return obj;
|
|
1039
1122
|
},
|
|
1040
1123
|
create(base) {
|
|
1041
|
-
return exports.MsgClearAdmin.fromPartial(base
|
|
1124
|
+
return exports.MsgClearAdmin.fromPartial(base ?? {});
|
|
1042
1125
|
},
|
|
1043
1126
|
fromPartial(object) {
|
|
1044
|
-
var _a, _b;
|
|
1045
1127
|
const message = createBaseMsgClearAdmin();
|
|
1046
|
-
message.sender =
|
|
1047
|
-
message.contract =
|
|
1128
|
+
message.sender = object.sender ?? "";
|
|
1129
|
+
message.contract = object.contract ?? "";
|
|
1048
1130
|
return message;
|
|
1049
1131
|
},
|
|
1050
1132
|
};
|
|
@@ -1052,11 +1134,11 @@ function createBaseMsgClearAdminResponse() {
|
|
|
1052
1134
|
return {};
|
|
1053
1135
|
}
|
|
1054
1136
|
exports.MsgClearAdminResponse = {
|
|
1055
|
-
encode(_, writer =
|
|
1137
|
+
encode(_, writer = new binary_1.BinaryWriter()) {
|
|
1056
1138
|
return writer;
|
|
1057
1139
|
},
|
|
1058
1140
|
decode(input, length) {
|
|
1059
|
-
const reader = input instanceof
|
|
1141
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1060
1142
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1061
1143
|
const message = createBaseMsgClearAdminResponse();
|
|
1062
1144
|
while (reader.pos < end) {
|
|
@@ -1066,7 +1148,7 @@ exports.MsgClearAdminResponse = {
|
|
|
1066
1148
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1067
1149
|
break;
|
|
1068
1150
|
}
|
|
1069
|
-
reader.
|
|
1151
|
+
reader.skip(tag & 7);
|
|
1070
1152
|
}
|
|
1071
1153
|
return message;
|
|
1072
1154
|
},
|
|
@@ -1078,7 +1160,7 @@ exports.MsgClearAdminResponse = {
|
|
|
1078
1160
|
return obj;
|
|
1079
1161
|
},
|
|
1080
1162
|
create(base) {
|
|
1081
|
-
return exports.MsgClearAdminResponse.fromPartial(base
|
|
1163
|
+
return exports.MsgClearAdminResponse.fromPartial(base ?? {});
|
|
1082
1164
|
},
|
|
1083
1165
|
fromPartial(_) {
|
|
1084
1166
|
const message = createBaseMsgClearAdminResponse();
|
|
@@ -1089,7 +1171,7 @@ function createBaseMsgUpdateInstantiateConfig() {
|
|
|
1089
1171
|
return { sender: "", codeId: 0, newInstantiatePermission: undefined };
|
|
1090
1172
|
}
|
|
1091
1173
|
exports.MsgUpdateInstantiateConfig = {
|
|
1092
|
-
encode(message, writer =
|
|
1174
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
1093
1175
|
if (message.sender !== "") {
|
|
1094
1176
|
writer.uint32(10).string(message.sender);
|
|
1095
1177
|
}
|
|
@@ -1102,42 +1184,45 @@ exports.MsgUpdateInstantiateConfig = {
|
|
|
1102
1184
|
return writer;
|
|
1103
1185
|
},
|
|
1104
1186
|
decode(input, length) {
|
|
1105
|
-
const reader = input instanceof
|
|
1187
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1106
1188
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1107
1189
|
const message = createBaseMsgUpdateInstantiateConfig();
|
|
1108
1190
|
while (reader.pos < end) {
|
|
1109
1191
|
const tag = reader.uint32();
|
|
1110
1192
|
switch (tag >>> 3) {
|
|
1111
|
-
case 1:
|
|
1193
|
+
case 1: {
|
|
1112
1194
|
if (tag !== 10) {
|
|
1113
1195
|
break;
|
|
1114
1196
|
}
|
|
1115
1197
|
message.sender = reader.string();
|
|
1116
1198
|
continue;
|
|
1117
|
-
|
|
1199
|
+
}
|
|
1200
|
+
case 2: {
|
|
1118
1201
|
if (tag !== 16) {
|
|
1119
1202
|
break;
|
|
1120
1203
|
}
|
|
1121
1204
|
message.codeId = longToNumber(reader.uint64());
|
|
1122
1205
|
continue;
|
|
1123
|
-
|
|
1206
|
+
}
|
|
1207
|
+
case 3: {
|
|
1124
1208
|
if (tag !== 26) {
|
|
1125
1209
|
break;
|
|
1126
1210
|
}
|
|
1127
1211
|
message.newInstantiatePermission = types_1.AccessConfig.decode(reader, reader.uint32());
|
|
1128
1212
|
continue;
|
|
1213
|
+
}
|
|
1129
1214
|
}
|
|
1130
1215
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1131
1216
|
break;
|
|
1132
1217
|
}
|
|
1133
|
-
reader.
|
|
1218
|
+
reader.skip(tag & 7);
|
|
1134
1219
|
}
|
|
1135
1220
|
return message;
|
|
1136
1221
|
},
|
|
1137
1222
|
fromJSON(object) {
|
|
1138
1223
|
return {
|
|
1139
|
-
sender: isSet(object.sender) ? String(object.sender) : "",
|
|
1140
|
-
codeId: isSet(object.codeId) ? Number(object.codeId) : 0,
|
|
1224
|
+
sender: isSet(object.sender) ? globalThis.String(object.sender) : "",
|
|
1225
|
+
codeId: isSet(object.codeId) ? globalThis.Number(object.codeId) : 0,
|
|
1141
1226
|
newInstantiatePermission: isSet(object.newInstantiatePermission)
|
|
1142
1227
|
? types_1.AccessConfig.fromJSON(object.newInstantiatePermission)
|
|
1143
1228
|
: undefined,
|
|
@@ -1145,22 +1230,24 @@ exports.MsgUpdateInstantiateConfig = {
|
|
|
1145
1230
|
},
|
|
1146
1231
|
toJSON(message) {
|
|
1147
1232
|
const obj = {};
|
|
1148
|
-
message.sender !==
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1233
|
+
if (message.sender !== "") {
|
|
1234
|
+
obj.sender = message.sender;
|
|
1235
|
+
}
|
|
1236
|
+
if (message.codeId !== 0) {
|
|
1237
|
+
obj.codeId = Math.round(message.codeId);
|
|
1238
|
+
}
|
|
1239
|
+
if (message.newInstantiatePermission !== undefined) {
|
|
1240
|
+
obj.newInstantiatePermission = types_1.AccessConfig.toJSON(message.newInstantiatePermission);
|
|
1241
|
+
}
|
|
1154
1242
|
return obj;
|
|
1155
1243
|
},
|
|
1156
1244
|
create(base) {
|
|
1157
|
-
return exports.MsgUpdateInstantiateConfig.fromPartial(base
|
|
1245
|
+
return exports.MsgUpdateInstantiateConfig.fromPartial(base ?? {});
|
|
1158
1246
|
},
|
|
1159
1247
|
fromPartial(object) {
|
|
1160
|
-
var _a, _b;
|
|
1161
1248
|
const message = createBaseMsgUpdateInstantiateConfig();
|
|
1162
|
-
message.sender =
|
|
1163
|
-
message.codeId =
|
|
1249
|
+
message.sender = object.sender ?? "";
|
|
1250
|
+
message.codeId = object.codeId ?? 0;
|
|
1164
1251
|
message.newInstantiatePermission =
|
|
1165
1252
|
object.newInstantiatePermission !== undefined &&
|
|
1166
1253
|
object.newInstantiatePermission !== null
|
|
@@ -1173,11 +1260,11 @@ function createBaseMsgUpdateInstantiateConfigResponse() {
|
|
|
1173
1260
|
return {};
|
|
1174
1261
|
}
|
|
1175
1262
|
exports.MsgUpdateInstantiateConfigResponse = {
|
|
1176
|
-
encode(_, writer =
|
|
1263
|
+
encode(_, writer = new binary_1.BinaryWriter()) {
|
|
1177
1264
|
return writer;
|
|
1178
1265
|
},
|
|
1179
1266
|
decode(input, length) {
|
|
1180
|
-
const reader = input instanceof
|
|
1267
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1181
1268
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1182
1269
|
const message = createBaseMsgUpdateInstantiateConfigResponse();
|
|
1183
1270
|
while (reader.pos < end) {
|
|
@@ -1187,7 +1274,7 @@ exports.MsgUpdateInstantiateConfigResponse = {
|
|
|
1187
1274
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1188
1275
|
break;
|
|
1189
1276
|
}
|
|
1190
|
-
reader.
|
|
1277
|
+
reader.skip(tag & 7);
|
|
1191
1278
|
}
|
|
1192
1279
|
return message;
|
|
1193
1280
|
},
|
|
@@ -1199,7 +1286,7 @@ exports.MsgUpdateInstantiateConfigResponse = {
|
|
|
1199
1286
|
return obj;
|
|
1200
1287
|
},
|
|
1201
1288
|
create(base) {
|
|
1202
|
-
return exports.MsgUpdateInstantiateConfigResponse.fromPartial(base
|
|
1289
|
+
return exports.MsgUpdateInstantiateConfigResponse.fromPartial(base ?? {});
|
|
1203
1290
|
},
|
|
1204
1291
|
fromPartial(_) {
|
|
1205
1292
|
const message = createBaseMsgUpdateInstantiateConfigResponse();
|
|
@@ -1210,7 +1297,7 @@ function createBaseMsgUpdateParams() {
|
|
|
1210
1297
|
return { authority: "", params: undefined };
|
|
1211
1298
|
}
|
|
1212
1299
|
exports.MsgUpdateParams = {
|
|
1213
|
-
encode(message, writer =
|
|
1300
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
1214
1301
|
if (message.authority !== "") {
|
|
1215
1302
|
writer.uint32(10).string(message.authority);
|
|
1216
1303
|
}
|
|
@@ -1220,52 +1307,58 @@ exports.MsgUpdateParams = {
|
|
|
1220
1307
|
return writer;
|
|
1221
1308
|
},
|
|
1222
1309
|
decode(input, length) {
|
|
1223
|
-
const reader = input instanceof
|
|
1310
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1224
1311
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1225
1312
|
const message = createBaseMsgUpdateParams();
|
|
1226
1313
|
while (reader.pos < end) {
|
|
1227
1314
|
const tag = reader.uint32();
|
|
1228
1315
|
switch (tag >>> 3) {
|
|
1229
|
-
case 1:
|
|
1316
|
+
case 1: {
|
|
1230
1317
|
if (tag !== 10) {
|
|
1231
1318
|
break;
|
|
1232
1319
|
}
|
|
1233
1320
|
message.authority = reader.string();
|
|
1234
1321
|
continue;
|
|
1235
|
-
|
|
1322
|
+
}
|
|
1323
|
+
case 2: {
|
|
1236
1324
|
if (tag !== 18) {
|
|
1237
1325
|
break;
|
|
1238
1326
|
}
|
|
1239
1327
|
message.params = types_1.Params.decode(reader, reader.uint32());
|
|
1240
1328
|
continue;
|
|
1329
|
+
}
|
|
1241
1330
|
}
|
|
1242
1331
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1243
1332
|
break;
|
|
1244
1333
|
}
|
|
1245
|
-
reader.
|
|
1334
|
+
reader.skip(tag & 7);
|
|
1246
1335
|
}
|
|
1247
1336
|
return message;
|
|
1248
1337
|
},
|
|
1249
1338
|
fromJSON(object) {
|
|
1250
1339
|
return {
|
|
1251
|
-
authority: isSet(object.authority)
|
|
1340
|
+
authority: isSet(object.authority)
|
|
1341
|
+
? globalThis.String(object.authority)
|
|
1342
|
+
: "",
|
|
1252
1343
|
params: isSet(object.params) ? types_1.Params.fromJSON(object.params) : undefined,
|
|
1253
1344
|
};
|
|
1254
1345
|
},
|
|
1255
1346
|
toJSON(message) {
|
|
1256
1347
|
const obj = {};
|
|
1257
|
-
message.authority !==
|
|
1258
|
-
|
|
1259
|
-
|
|
1348
|
+
if (message.authority !== "") {
|
|
1349
|
+
obj.authority = message.authority;
|
|
1350
|
+
}
|
|
1351
|
+
if (message.params !== undefined) {
|
|
1352
|
+
obj.params = types_1.Params.toJSON(message.params);
|
|
1353
|
+
}
|
|
1260
1354
|
return obj;
|
|
1261
1355
|
},
|
|
1262
1356
|
create(base) {
|
|
1263
|
-
return exports.MsgUpdateParams.fromPartial(base
|
|
1357
|
+
return exports.MsgUpdateParams.fromPartial(base ?? {});
|
|
1264
1358
|
},
|
|
1265
1359
|
fromPartial(object) {
|
|
1266
|
-
var _a;
|
|
1267
1360
|
const message = createBaseMsgUpdateParams();
|
|
1268
|
-
message.authority =
|
|
1361
|
+
message.authority = object.authority ?? "";
|
|
1269
1362
|
message.params =
|
|
1270
1363
|
object.params !== undefined && object.params !== null
|
|
1271
1364
|
? types_1.Params.fromPartial(object.params)
|
|
@@ -1277,11 +1370,11 @@ function createBaseMsgUpdateParamsResponse() {
|
|
|
1277
1370
|
return {};
|
|
1278
1371
|
}
|
|
1279
1372
|
exports.MsgUpdateParamsResponse = {
|
|
1280
|
-
encode(_, writer =
|
|
1373
|
+
encode(_, writer = new binary_1.BinaryWriter()) {
|
|
1281
1374
|
return writer;
|
|
1282
1375
|
},
|
|
1283
1376
|
decode(input, length) {
|
|
1284
|
-
const reader = input instanceof
|
|
1377
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1285
1378
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1286
1379
|
const message = createBaseMsgUpdateParamsResponse();
|
|
1287
1380
|
while (reader.pos < end) {
|
|
@@ -1291,7 +1384,7 @@ exports.MsgUpdateParamsResponse = {
|
|
|
1291
1384
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1292
1385
|
break;
|
|
1293
1386
|
}
|
|
1294
|
-
reader.
|
|
1387
|
+
reader.skip(tag & 7);
|
|
1295
1388
|
}
|
|
1296
1389
|
return message;
|
|
1297
1390
|
},
|
|
@@ -1303,7 +1396,7 @@ exports.MsgUpdateParamsResponse = {
|
|
|
1303
1396
|
return obj;
|
|
1304
1397
|
},
|
|
1305
1398
|
create(base) {
|
|
1306
|
-
return exports.MsgUpdateParamsResponse.fromPartial(base
|
|
1399
|
+
return exports.MsgUpdateParamsResponse.fromPartial(base ?? {});
|
|
1307
1400
|
},
|
|
1308
1401
|
fromPartial(_) {
|
|
1309
1402
|
const message = createBaseMsgUpdateParamsResponse();
|
|
@@ -1311,10 +1404,10 @@ exports.MsgUpdateParamsResponse = {
|
|
|
1311
1404
|
},
|
|
1312
1405
|
};
|
|
1313
1406
|
function createBaseMsgSudoContract() {
|
|
1314
|
-
return { authority: "", contract: "", msg: new Uint8Array() };
|
|
1407
|
+
return { authority: "", contract: "", msg: new Uint8Array(0) };
|
|
1315
1408
|
}
|
|
1316
1409
|
exports.MsgSudoContract = {
|
|
1317
|
-
encode(message, writer =
|
|
1410
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
1318
1411
|
if (message.authority !== "") {
|
|
1319
1412
|
writer.uint32(10).string(message.authority);
|
|
1320
1413
|
}
|
|
@@ -1327,93 +1420,105 @@ exports.MsgSudoContract = {
|
|
|
1327
1420
|
return writer;
|
|
1328
1421
|
},
|
|
1329
1422
|
decode(input, length) {
|
|
1330
|
-
const reader = input instanceof
|
|
1423
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1331
1424
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1332
1425
|
const message = createBaseMsgSudoContract();
|
|
1333
1426
|
while (reader.pos < end) {
|
|
1334
1427
|
const tag = reader.uint32();
|
|
1335
1428
|
switch (tag >>> 3) {
|
|
1336
|
-
case 1:
|
|
1429
|
+
case 1: {
|
|
1337
1430
|
if (tag !== 10) {
|
|
1338
1431
|
break;
|
|
1339
1432
|
}
|
|
1340
1433
|
message.authority = reader.string();
|
|
1341
1434
|
continue;
|
|
1342
|
-
|
|
1435
|
+
}
|
|
1436
|
+
case 2: {
|
|
1343
1437
|
if (tag !== 18) {
|
|
1344
1438
|
break;
|
|
1345
1439
|
}
|
|
1346
1440
|
message.contract = reader.string();
|
|
1347
1441
|
continue;
|
|
1348
|
-
|
|
1442
|
+
}
|
|
1443
|
+
case 3: {
|
|
1349
1444
|
if (tag !== 26) {
|
|
1350
1445
|
break;
|
|
1351
1446
|
}
|
|
1352
1447
|
message.msg = reader.bytes();
|
|
1353
1448
|
continue;
|
|
1449
|
+
}
|
|
1354
1450
|
}
|
|
1355
1451
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1356
1452
|
break;
|
|
1357
1453
|
}
|
|
1358
|
-
reader.
|
|
1454
|
+
reader.skip(tag & 7);
|
|
1359
1455
|
}
|
|
1360
1456
|
return message;
|
|
1361
1457
|
},
|
|
1362
1458
|
fromJSON(object) {
|
|
1363
1459
|
return {
|
|
1364
|
-
authority: isSet(object.authority)
|
|
1365
|
-
|
|
1366
|
-
|
|
1460
|
+
authority: isSet(object.authority)
|
|
1461
|
+
? globalThis.String(object.authority)
|
|
1462
|
+
: "",
|
|
1463
|
+
contract: isSet(object.contract)
|
|
1464
|
+
? globalThis.String(object.contract)
|
|
1465
|
+
: "",
|
|
1466
|
+
msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(0),
|
|
1367
1467
|
};
|
|
1368
1468
|
},
|
|
1369
1469
|
toJSON(message) {
|
|
1370
1470
|
const obj = {};
|
|
1371
|
-
message.authority !==
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1471
|
+
if (message.authority !== "") {
|
|
1472
|
+
obj.authority = message.authority;
|
|
1473
|
+
}
|
|
1474
|
+
if (message.contract !== "") {
|
|
1475
|
+
obj.contract = message.contract;
|
|
1476
|
+
}
|
|
1477
|
+
if (message.msg.length !== 0) {
|
|
1478
|
+
obj.msg = base64FromBytes(message.msg);
|
|
1479
|
+
}
|
|
1375
1480
|
return obj;
|
|
1376
1481
|
},
|
|
1377
1482
|
create(base) {
|
|
1378
|
-
return exports.MsgSudoContract.fromPartial(base
|
|
1483
|
+
return exports.MsgSudoContract.fromPartial(base ?? {});
|
|
1379
1484
|
},
|
|
1380
1485
|
fromPartial(object) {
|
|
1381
|
-
var _a, _b, _c;
|
|
1382
1486
|
const message = createBaseMsgSudoContract();
|
|
1383
|
-
message.authority =
|
|
1384
|
-
message.contract =
|
|
1385
|
-
message.msg =
|
|
1487
|
+
message.authority = object.authority ?? "";
|
|
1488
|
+
message.contract = object.contract ?? "";
|
|
1489
|
+
message.msg = object.msg ?? new Uint8Array(0);
|
|
1386
1490
|
return message;
|
|
1387
1491
|
},
|
|
1388
1492
|
};
|
|
1389
1493
|
function createBaseMsgSudoContractResponse() {
|
|
1390
|
-
return { data: new Uint8Array() };
|
|
1494
|
+
return { data: new Uint8Array(0) };
|
|
1391
1495
|
}
|
|
1392
1496
|
exports.MsgSudoContractResponse = {
|
|
1393
|
-
encode(message, writer =
|
|
1497
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
1394
1498
|
if (message.data.length !== 0) {
|
|
1395
1499
|
writer.uint32(10).bytes(message.data);
|
|
1396
1500
|
}
|
|
1397
1501
|
return writer;
|
|
1398
1502
|
},
|
|
1399
1503
|
decode(input, length) {
|
|
1400
|
-
const reader = input instanceof
|
|
1504
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1401
1505
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1402
1506
|
const message = createBaseMsgSudoContractResponse();
|
|
1403
1507
|
while (reader.pos < end) {
|
|
1404
1508
|
const tag = reader.uint32();
|
|
1405
1509
|
switch (tag >>> 3) {
|
|
1406
|
-
case 1:
|
|
1510
|
+
case 1: {
|
|
1407
1511
|
if (tag !== 10) {
|
|
1408
1512
|
break;
|
|
1409
1513
|
}
|
|
1410
1514
|
message.data = reader.bytes();
|
|
1411
1515
|
continue;
|
|
1516
|
+
}
|
|
1412
1517
|
}
|
|
1413
1518
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1414
1519
|
break;
|
|
1415
1520
|
}
|
|
1416
|
-
reader.
|
|
1521
|
+
reader.skip(tag & 7);
|
|
1417
1522
|
}
|
|
1418
1523
|
return message;
|
|
1419
1524
|
},
|
|
@@ -1421,22 +1526,22 @@ exports.MsgSudoContractResponse = {
|
|
|
1421
1526
|
return {
|
|
1422
1527
|
data: isSet(object.data)
|
|
1423
1528
|
? bytesFromBase64(object.data)
|
|
1424
|
-
: new Uint8Array(),
|
|
1529
|
+
: new Uint8Array(0),
|
|
1425
1530
|
};
|
|
1426
1531
|
},
|
|
1427
1532
|
toJSON(message) {
|
|
1428
1533
|
const obj = {};
|
|
1429
|
-
message.data !==
|
|
1430
|
-
|
|
1534
|
+
if (message.data.length !== 0) {
|
|
1535
|
+
obj.data = base64FromBytes(message.data);
|
|
1536
|
+
}
|
|
1431
1537
|
return obj;
|
|
1432
1538
|
},
|
|
1433
1539
|
create(base) {
|
|
1434
|
-
return exports.MsgSudoContractResponse.fromPartial(base
|
|
1540
|
+
return exports.MsgSudoContractResponse.fromPartial(base ?? {});
|
|
1435
1541
|
},
|
|
1436
1542
|
fromPartial(object) {
|
|
1437
|
-
var _a;
|
|
1438
1543
|
const message = createBaseMsgSudoContractResponse();
|
|
1439
|
-
message.data =
|
|
1544
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
1440
1545
|
return message;
|
|
1441
1546
|
},
|
|
1442
1547
|
};
|
|
@@ -1444,7 +1549,7 @@ function createBaseMsgPinCodes() {
|
|
|
1444
1549
|
return { authority: "", codeIds: [] };
|
|
1445
1550
|
}
|
|
1446
1551
|
exports.MsgPinCodes = {
|
|
1447
|
-
encode(message, writer =
|
|
1552
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
1448
1553
|
if (message.authority !== "") {
|
|
1449
1554
|
writer.uint32(10).string(message.authority);
|
|
1450
1555
|
}
|
|
@@ -1456,19 +1561,20 @@ exports.MsgPinCodes = {
|
|
|
1456
1561
|
return writer;
|
|
1457
1562
|
},
|
|
1458
1563
|
decode(input, length) {
|
|
1459
|
-
const reader = input instanceof
|
|
1564
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1460
1565
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1461
1566
|
const message = createBaseMsgPinCodes();
|
|
1462
1567
|
while (reader.pos < end) {
|
|
1463
1568
|
const tag = reader.uint32();
|
|
1464
1569
|
switch (tag >>> 3) {
|
|
1465
|
-
case 1:
|
|
1570
|
+
case 1: {
|
|
1466
1571
|
if (tag !== 10) {
|
|
1467
1572
|
break;
|
|
1468
1573
|
}
|
|
1469
1574
|
message.authority = reader.string();
|
|
1470
1575
|
continue;
|
|
1471
|
-
|
|
1576
|
+
}
|
|
1577
|
+
case 2: {
|
|
1472
1578
|
if (tag === 16) {
|
|
1473
1579
|
message.codeIds.push(longToNumber(reader.uint64()));
|
|
1474
1580
|
continue;
|
|
@@ -1481,41 +1587,42 @@ exports.MsgPinCodes = {
|
|
|
1481
1587
|
continue;
|
|
1482
1588
|
}
|
|
1483
1589
|
break;
|
|
1590
|
+
}
|
|
1484
1591
|
}
|
|
1485
1592
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1486
1593
|
break;
|
|
1487
1594
|
}
|
|
1488
|
-
reader.
|
|
1595
|
+
reader.skip(tag & 7);
|
|
1489
1596
|
}
|
|
1490
1597
|
return message;
|
|
1491
1598
|
},
|
|
1492
1599
|
fromJSON(object) {
|
|
1493
1600
|
return {
|
|
1494
|
-
authority: isSet(object.authority)
|
|
1495
|
-
|
|
1496
|
-
|
|
1601
|
+
authority: isSet(object.authority)
|
|
1602
|
+
? globalThis.String(object.authority)
|
|
1603
|
+
: "",
|
|
1604
|
+
codeIds: globalThis.Array.isArray(object?.codeIds)
|
|
1605
|
+
? object.codeIds.map((e) => globalThis.Number(e))
|
|
1497
1606
|
: [],
|
|
1498
1607
|
};
|
|
1499
1608
|
},
|
|
1500
1609
|
toJSON(message) {
|
|
1501
1610
|
const obj = {};
|
|
1502
|
-
message.authority !==
|
|
1503
|
-
|
|
1504
|
-
obj.codeIds = message.codeIds.map((e) => Math.round(e));
|
|
1611
|
+
if (message.authority !== "") {
|
|
1612
|
+
obj.authority = message.authority;
|
|
1505
1613
|
}
|
|
1506
|
-
|
|
1507
|
-
obj.codeIds =
|
|
1614
|
+
if (message.codeIds?.length) {
|
|
1615
|
+
obj.codeIds = message.codeIds.map((e) => Math.round(e));
|
|
1508
1616
|
}
|
|
1509
1617
|
return obj;
|
|
1510
1618
|
},
|
|
1511
1619
|
create(base) {
|
|
1512
|
-
return exports.MsgPinCodes.fromPartial(base
|
|
1620
|
+
return exports.MsgPinCodes.fromPartial(base ?? {});
|
|
1513
1621
|
},
|
|
1514
1622
|
fromPartial(object) {
|
|
1515
|
-
var _a, _b;
|
|
1516
1623
|
const message = createBaseMsgPinCodes();
|
|
1517
|
-
message.authority =
|
|
1518
|
-
message.codeIds =
|
|
1624
|
+
message.authority = object.authority ?? "";
|
|
1625
|
+
message.codeIds = object.codeIds?.map((e) => e) || [];
|
|
1519
1626
|
return message;
|
|
1520
1627
|
},
|
|
1521
1628
|
};
|
|
@@ -1523,11 +1630,11 @@ function createBaseMsgPinCodesResponse() {
|
|
|
1523
1630
|
return {};
|
|
1524
1631
|
}
|
|
1525
1632
|
exports.MsgPinCodesResponse = {
|
|
1526
|
-
encode(_, writer =
|
|
1633
|
+
encode(_, writer = new binary_1.BinaryWriter()) {
|
|
1527
1634
|
return writer;
|
|
1528
1635
|
},
|
|
1529
1636
|
decode(input, length) {
|
|
1530
|
-
const reader = input instanceof
|
|
1637
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1531
1638
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1532
1639
|
const message = createBaseMsgPinCodesResponse();
|
|
1533
1640
|
while (reader.pos < end) {
|
|
@@ -1537,7 +1644,7 @@ exports.MsgPinCodesResponse = {
|
|
|
1537
1644
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1538
1645
|
break;
|
|
1539
1646
|
}
|
|
1540
|
-
reader.
|
|
1647
|
+
reader.skip(tag & 7);
|
|
1541
1648
|
}
|
|
1542
1649
|
return message;
|
|
1543
1650
|
},
|
|
@@ -1549,7 +1656,7 @@ exports.MsgPinCodesResponse = {
|
|
|
1549
1656
|
return obj;
|
|
1550
1657
|
},
|
|
1551
1658
|
create(base) {
|
|
1552
|
-
return exports.MsgPinCodesResponse.fromPartial(base
|
|
1659
|
+
return exports.MsgPinCodesResponse.fromPartial(base ?? {});
|
|
1553
1660
|
},
|
|
1554
1661
|
fromPartial(_) {
|
|
1555
1662
|
const message = createBaseMsgPinCodesResponse();
|
|
@@ -1560,7 +1667,7 @@ function createBaseMsgUnpinCodes() {
|
|
|
1560
1667
|
return { authority: "", codeIds: [] };
|
|
1561
1668
|
}
|
|
1562
1669
|
exports.MsgUnpinCodes = {
|
|
1563
|
-
encode(message, writer =
|
|
1670
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
1564
1671
|
if (message.authority !== "") {
|
|
1565
1672
|
writer.uint32(10).string(message.authority);
|
|
1566
1673
|
}
|
|
@@ -1572,19 +1679,20 @@ exports.MsgUnpinCodes = {
|
|
|
1572
1679
|
return writer;
|
|
1573
1680
|
},
|
|
1574
1681
|
decode(input, length) {
|
|
1575
|
-
const reader = input instanceof
|
|
1682
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1576
1683
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1577
1684
|
const message = createBaseMsgUnpinCodes();
|
|
1578
1685
|
while (reader.pos < end) {
|
|
1579
1686
|
const tag = reader.uint32();
|
|
1580
1687
|
switch (tag >>> 3) {
|
|
1581
|
-
case 1:
|
|
1688
|
+
case 1: {
|
|
1582
1689
|
if (tag !== 10) {
|
|
1583
1690
|
break;
|
|
1584
1691
|
}
|
|
1585
1692
|
message.authority = reader.string();
|
|
1586
1693
|
continue;
|
|
1587
|
-
|
|
1694
|
+
}
|
|
1695
|
+
case 2: {
|
|
1588
1696
|
if (tag === 16) {
|
|
1589
1697
|
message.codeIds.push(longToNumber(reader.uint64()));
|
|
1590
1698
|
continue;
|
|
@@ -1597,41 +1705,42 @@ exports.MsgUnpinCodes = {
|
|
|
1597
1705
|
continue;
|
|
1598
1706
|
}
|
|
1599
1707
|
break;
|
|
1708
|
+
}
|
|
1600
1709
|
}
|
|
1601
1710
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1602
1711
|
break;
|
|
1603
1712
|
}
|
|
1604
|
-
reader.
|
|
1713
|
+
reader.skip(tag & 7);
|
|
1605
1714
|
}
|
|
1606
1715
|
return message;
|
|
1607
1716
|
},
|
|
1608
1717
|
fromJSON(object) {
|
|
1609
1718
|
return {
|
|
1610
|
-
authority: isSet(object.authority)
|
|
1611
|
-
|
|
1612
|
-
|
|
1719
|
+
authority: isSet(object.authority)
|
|
1720
|
+
? globalThis.String(object.authority)
|
|
1721
|
+
: "",
|
|
1722
|
+
codeIds: globalThis.Array.isArray(object?.codeIds)
|
|
1723
|
+
? object.codeIds.map((e) => globalThis.Number(e))
|
|
1613
1724
|
: [],
|
|
1614
1725
|
};
|
|
1615
1726
|
},
|
|
1616
1727
|
toJSON(message) {
|
|
1617
1728
|
const obj = {};
|
|
1618
|
-
message.authority !==
|
|
1619
|
-
|
|
1620
|
-
obj.codeIds = message.codeIds.map((e) => Math.round(e));
|
|
1729
|
+
if (message.authority !== "") {
|
|
1730
|
+
obj.authority = message.authority;
|
|
1621
1731
|
}
|
|
1622
|
-
|
|
1623
|
-
obj.codeIds =
|
|
1732
|
+
if (message.codeIds?.length) {
|
|
1733
|
+
obj.codeIds = message.codeIds.map((e) => Math.round(e));
|
|
1624
1734
|
}
|
|
1625
1735
|
return obj;
|
|
1626
1736
|
},
|
|
1627
1737
|
create(base) {
|
|
1628
|
-
return exports.MsgUnpinCodes.fromPartial(base
|
|
1738
|
+
return exports.MsgUnpinCodes.fromPartial(base ?? {});
|
|
1629
1739
|
},
|
|
1630
1740
|
fromPartial(object) {
|
|
1631
|
-
var _a, _b;
|
|
1632
1741
|
const message = createBaseMsgUnpinCodes();
|
|
1633
|
-
message.authority =
|
|
1634
|
-
message.codeIds =
|
|
1742
|
+
message.authority = object.authority ?? "";
|
|
1743
|
+
message.codeIds = object.codeIds?.map((e) => e) || [];
|
|
1635
1744
|
return message;
|
|
1636
1745
|
},
|
|
1637
1746
|
};
|
|
@@ -1639,11 +1748,11 @@ function createBaseMsgUnpinCodesResponse() {
|
|
|
1639
1748
|
return {};
|
|
1640
1749
|
}
|
|
1641
1750
|
exports.MsgUnpinCodesResponse = {
|
|
1642
|
-
encode(_, writer =
|
|
1751
|
+
encode(_, writer = new binary_1.BinaryWriter()) {
|
|
1643
1752
|
return writer;
|
|
1644
1753
|
},
|
|
1645
1754
|
decode(input, length) {
|
|
1646
|
-
const reader = input instanceof
|
|
1755
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1647
1756
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1648
1757
|
const message = createBaseMsgUnpinCodesResponse();
|
|
1649
1758
|
while (reader.pos < end) {
|
|
@@ -1653,7 +1762,7 @@ exports.MsgUnpinCodesResponse = {
|
|
|
1653
1762
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1654
1763
|
break;
|
|
1655
1764
|
}
|
|
1656
|
-
reader.
|
|
1765
|
+
reader.skip(tag & 7);
|
|
1657
1766
|
}
|
|
1658
1767
|
return message;
|
|
1659
1768
|
},
|
|
@@ -1665,7 +1774,7 @@ exports.MsgUnpinCodesResponse = {
|
|
|
1665
1774
|
return obj;
|
|
1666
1775
|
},
|
|
1667
1776
|
create(base) {
|
|
1668
|
-
return exports.MsgUnpinCodesResponse.fromPartial(base
|
|
1777
|
+
return exports.MsgUnpinCodesResponse.fromPartial(base ?? {});
|
|
1669
1778
|
},
|
|
1670
1779
|
fromPartial(_) {
|
|
1671
1780
|
const message = createBaseMsgUnpinCodesResponse();
|
|
@@ -1675,20 +1784,20 @@ exports.MsgUnpinCodesResponse = {
|
|
|
1675
1784
|
function createBaseMsgStoreAndInstantiateContract() {
|
|
1676
1785
|
return {
|
|
1677
1786
|
authority: "",
|
|
1678
|
-
wasmByteCode: new Uint8Array(),
|
|
1787
|
+
wasmByteCode: new Uint8Array(0),
|
|
1679
1788
|
instantiatePermission: undefined,
|
|
1680
1789
|
unpinCode: false,
|
|
1681
1790
|
admin: "",
|
|
1682
1791
|
label: "",
|
|
1683
|
-
msg: new Uint8Array(),
|
|
1792
|
+
msg: new Uint8Array(0),
|
|
1684
1793
|
funds: [],
|
|
1685
1794
|
source: "",
|
|
1686
1795
|
builder: "",
|
|
1687
|
-
codeHash: new Uint8Array(),
|
|
1796
|
+
codeHash: new Uint8Array(0),
|
|
1688
1797
|
};
|
|
1689
1798
|
}
|
|
1690
1799
|
exports.MsgStoreAndInstantiateContract = {
|
|
1691
|
-
encode(message, writer =
|
|
1800
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
1692
1801
|
if (message.authority !== "") {
|
|
1693
1802
|
writer.uint32(10).string(message.authority);
|
|
1694
1803
|
}
|
|
@@ -1698,7 +1807,7 @@ exports.MsgStoreAndInstantiateContract = {
|
|
|
1698
1807
|
if (message.instantiatePermission !== undefined) {
|
|
1699
1808
|
types_1.AccessConfig.encode(message.instantiatePermission, writer.uint32(34).fork()).ldelim();
|
|
1700
1809
|
}
|
|
1701
|
-
if (message.unpinCode
|
|
1810
|
+
if (message.unpinCode !== false) {
|
|
1702
1811
|
writer.uint32(40).bool(message.unpinCode);
|
|
1703
1812
|
}
|
|
1704
1813
|
if (message.admin !== "") {
|
|
@@ -1725,166 +1834,191 @@ exports.MsgStoreAndInstantiateContract = {
|
|
|
1725
1834
|
return writer;
|
|
1726
1835
|
},
|
|
1727
1836
|
decode(input, length) {
|
|
1728
|
-
const reader = input instanceof
|
|
1837
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1729
1838
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1730
1839
|
const message = createBaseMsgStoreAndInstantiateContract();
|
|
1731
1840
|
while (reader.pos < end) {
|
|
1732
1841
|
const tag = reader.uint32();
|
|
1733
1842
|
switch (tag >>> 3) {
|
|
1734
|
-
case 1:
|
|
1843
|
+
case 1: {
|
|
1735
1844
|
if (tag !== 10) {
|
|
1736
1845
|
break;
|
|
1737
1846
|
}
|
|
1738
1847
|
message.authority = reader.string();
|
|
1739
1848
|
continue;
|
|
1740
|
-
|
|
1849
|
+
}
|
|
1850
|
+
case 3: {
|
|
1741
1851
|
if (tag !== 26) {
|
|
1742
1852
|
break;
|
|
1743
1853
|
}
|
|
1744
1854
|
message.wasmByteCode = reader.bytes();
|
|
1745
1855
|
continue;
|
|
1746
|
-
|
|
1856
|
+
}
|
|
1857
|
+
case 4: {
|
|
1747
1858
|
if (tag !== 34) {
|
|
1748
1859
|
break;
|
|
1749
1860
|
}
|
|
1750
1861
|
message.instantiatePermission = types_1.AccessConfig.decode(reader, reader.uint32());
|
|
1751
1862
|
continue;
|
|
1752
|
-
|
|
1863
|
+
}
|
|
1864
|
+
case 5: {
|
|
1753
1865
|
if (tag !== 40) {
|
|
1754
1866
|
break;
|
|
1755
1867
|
}
|
|
1756
1868
|
message.unpinCode = reader.bool();
|
|
1757
1869
|
continue;
|
|
1758
|
-
|
|
1870
|
+
}
|
|
1871
|
+
case 6: {
|
|
1759
1872
|
if (tag !== 50) {
|
|
1760
1873
|
break;
|
|
1761
1874
|
}
|
|
1762
1875
|
message.admin = reader.string();
|
|
1763
1876
|
continue;
|
|
1764
|
-
|
|
1877
|
+
}
|
|
1878
|
+
case 7: {
|
|
1765
1879
|
if (tag !== 58) {
|
|
1766
1880
|
break;
|
|
1767
1881
|
}
|
|
1768
1882
|
message.label = reader.string();
|
|
1769
1883
|
continue;
|
|
1770
|
-
|
|
1884
|
+
}
|
|
1885
|
+
case 8: {
|
|
1771
1886
|
if (tag !== 66) {
|
|
1772
1887
|
break;
|
|
1773
1888
|
}
|
|
1774
1889
|
message.msg = reader.bytes();
|
|
1775
1890
|
continue;
|
|
1776
|
-
|
|
1891
|
+
}
|
|
1892
|
+
case 9: {
|
|
1777
1893
|
if (tag !== 74) {
|
|
1778
1894
|
break;
|
|
1779
1895
|
}
|
|
1780
1896
|
message.funds.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
1781
1897
|
continue;
|
|
1782
|
-
|
|
1898
|
+
}
|
|
1899
|
+
case 10: {
|
|
1783
1900
|
if (tag !== 82) {
|
|
1784
1901
|
break;
|
|
1785
1902
|
}
|
|
1786
1903
|
message.source = reader.string();
|
|
1787
1904
|
continue;
|
|
1788
|
-
|
|
1905
|
+
}
|
|
1906
|
+
case 11: {
|
|
1789
1907
|
if (tag !== 90) {
|
|
1790
1908
|
break;
|
|
1791
1909
|
}
|
|
1792
1910
|
message.builder = reader.string();
|
|
1793
1911
|
continue;
|
|
1794
|
-
|
|
1912
|
+
}
|
|
1913
|
+
case 12: {
|
|
1795
1914
|
if (tag !== 98) {
|
|
1796
1915
|
break;
|
|
1797
1916
|
}
|
|
1798
1917
|
message.codeHash = reader.bytes();
|
|
1799
1918
|
continue;
|
|
1919
|
+
}
|
|
1800
1920
|
}
|
|
1801
1921
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1802
1922
|
break;
|
|
1803
1923
|
}
|
|
1804
|
-
reader.
|
|
1924
|
+
reader.skip(tag & 7);
|
|
1805
1925
|
}
|
|
1806
1926
|
return message;
|
|
1807
1927
|
},
|
|
1808
1928
|
fromJSON(object) {
|
|
1809
1929
|
return {
|
|
1810
|
-
authority: isSet(object.authority)
|
|
1930
|
+
authority: isSet(object.authority)
|
|
1931
|
+
? globalThis.String(object.authority)
|
|
1932
|
+
: "",
|
|
1811
1933
|
wasmByteCode: isSet(object.wasmByteCode)
|
|
1812
1934
|
? bytesFromBase64(object.wasmByteCode)
|
|
1813
|
-
: new Uint8Array(),
|
|
1935
|
+
: new Uint8Array(0),
|
|
1814
1936
|
instantiatePermission: isSet(object.instantiatePermission)
|
|
1815
1937
|
? types_1.AccessConfig.fromJSON(object.instantiatePermission)
|
|
1816
1938
|
: undefined,
|
|
1817
|
-
unpinCode: isSet(object.unpinCode)
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1939
|
+
unpinCode: isSet(object.unpinCode)
|
|
1940
|
+
? globalThis.Boolean(object.unpinCode)
|
|
1941
|
+
: false,
|
|
1942
|
+
admin: isSet(object.admin) ? globalThis.String(object.admin) : "",
|
|
1943
|
+
label: isSet(object.label) ? globalThis.String(object.label) : "",
|
|
1944
|
+
msg: isSet(object.msg)
|
|
1945
|
+
? bytesFromBase64(object.msg)
|
|
1946
|
+
: new Uint8Array(0),
|
|
1947
|
+
funds: globalThis.Array.isArray(object?.funds)
|
|
1822
1948
|
? object.funds.map((e) => coin_1.Coin.fromJSON(e))
|
|
1823
1949
|
: [],
|
|
1824
|
-
source: isSet(object.source) ? String(object.source) : "",
|
|
1825
|
-
builder: isSet(object.builder) ? String(object.builder) : "",
|
|
1950
|
+
source: isSet(object.source) ? globalThis.String(object.source) : "",
|
|
1951
|
+
builder: isSet(object.builder) ? globalThis.String(object.builder) : "",
|
|
1826
1952
|
codeHash: isSet(object.codeHash)
|
|
1827
1953
|
? bytesFromBase64(object.codeHash)
|
|
1828
|
-
: new Uint8Array(),
|
|
1954
|
+
: new Uint8Array(0),
|
|
1829
1955
|
};
|
|
1830
1956
|
},
|
|
1831
1957
|
toJSON(message) {
|
|
1832
1958
|
const obj = {};
|
|
1833
|
-
message.authority !==
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
message.unpinCode !==
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
message.
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1959
|
+
if (message.authority !== "") {
|
|
1960
|
+
obj.authority = message.authority;
|
|
1961
|
+
}
|
|
1962
|
+
if (message.wasmByteCode.length !== 0) {
|
|
1963
|
+
obj.wasmByteCode = base64FromBytes(message.wasmByteCode);
|
|
1964
|
+
}
|
|
1965
|
+
if (message.instantiatePermission !== undefined) {
|
|
1966
|
+
obj.instantiatePermission = types_1.AccessConfig.toJSON(message.instantiatePermission);
|
|
1967
|
+
}
|
|
1968
|
+
if (message.unpinCode !== false) {
|
|
1969
|
+
obj.unpinCode = message.unpinCode;
|
|
1970
|
+
}
|
|
1971
|
+
if (message.admin !== "") {
|
|
1972
|
+
obj.admin = message.admin;
|
|
1973
|
+
}
|
|
1974
|
+
if (message.label !== "") {
|
|
1975
|
+
obj.label = message.label;
|
|
1976
|
+
}
|
|
1977
|
+
if (message.msg.length !== 0) {
|
|
1978
|
+
obj.msg = base64FromBytes(message.msg);
|
|
1979
|
+
}
|
|
1980
|
+
if (message.funds?.length) {
|
|
1981
|
+
obj.funds = message.funds.map((e) => coin_1.Coin.toJSON(e));
|
|
1982
|
+
}
|
|
1983
|
+
if (message.source !== "") {
|
|
1984
|
+
obj.source = message.source;
|
|
1985
|
+
}
|
|
1986
|
+
if (message.builder !== "") {
|
|
1987
|
+
obj.builder = message.builder;
|
|
1988
|
+
}
|
|
1989
|
+
if (message.codeHash.length !== 0) {
|
|
1990
|
+
obj.codeHash = base64FromBytes(message.codeHash);
|
|
1991
|
+
}
|
|
1857
1992
|
return obj;
|
|
1858
1993
|
},
|
|
1859
1994
|
create(base) {
|
|
1860
|
-
return exports.MsgStoreAndInstantiateContract.fromPartial(base
|
|
1995
|
+
return exports.MsgStoreAndInstantiateContract.fromPartial(base ?? {});
|
|
1861
1996
|
},
|
|
1862
1997
|
fromPartial(object) {
|
|
1863
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1864
1998
|
const message = createBaseMsgStoreAndInstantiateContract();
|
|
1865
|
-
message.authority =
|
|
1866
|
-
message.wasmByteCode =
|
|
1999
|
+
message.authority = object.authority ?? "";
|
|
2000
|
+
message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(0);
|
|
1867
2001
|
message.instantiatePermission =
|
|
1868
2002
|
object.instantiatePermission !== undefined &&
|
|
1869
2003
|
object.instantiatePermission !== null
|
|
1870
2004
|
? types_1.AccessConfig.fromPartial(object.instantiatePermission)
|
|
1871
2005
|
: undefined;
|
|
1872
|
-
message.unpinCode =
|
|
1873
|
-
message.admin =
|
|
1874
|
-
message.label =
|
|
1875
|
-
message.msg =
|
|
1876
|
-
message.funds =
|
|
1877
|
-
message.source =
|
|
1878
|
-
message.builder =
|
|
1879
|
-
message.codeHash =
|
|
2006
|
+
message.unpinCode = object.unpinCode ?? false;
|
|
2007
|
+
message.admin = object.admin ?? "";
|
|
2008
|
+
message.label = object.label ?? "";
|
|
2009
|
+
message.msg = object.msg ?? new Uint8Array(0);
|
|
2010
|
+
message.funds = object.funds?.map((e) => coin_1.Coin.fromPartial(e)) || [];
|
|
2011
|
+
message.source = object.source ?? "";
|
|
2012
|
+
message.builder = object.builder ?? "";
|
|
2013
|
+
message.codeHash = object.codeHash ?? new Uint8Array(0);
|
|
1880
2014
|
return message;
|
|
1881
2015
|
},
|
|
1882
2016
|
};
|
|
1883
2017
|
function createBaseMsgStoreAndInstantiateContractResponse() {
|
|
1884
|
-
return { address: "", data: new Uint8Array() };
|
|
2018
|
+
return { address: "", data: new Uint8Array(0) };
|
|
1885
2019
|
}
|
|
1886
2020
|
exports.MsgStoreAndInstantiateContractResponse = {
|
|
1887
|
-
encode(message, writer =
|
|
2021
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
1888
2022
|
if (message.address !== "") {
|
|
1889
2023
|
writer.uint32(10).string(message.address);
|
|
1890
2024
|
}
|
|
@@ -1894,61 +2028,66 @@ exports.MsgStoreAndInstantiateContractResponse = {
|
|
|
1894
2028
|
return writer;
|
|
1895
2029
|
},
|
|
1896
2030
|
decode(input, length) {
|
|
1897
|
-
const reader = input instanceof
|
|
2031
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1898
2032
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1899
2033
|
const message = createBaseMsgStoreAndInstantiateContractResponse();
|
|
1900
2034
|
while (reader.pos < end) {
|
|
1901
2035
|
const tag = reader.uint32();
|
|
1902
2036
|
switch (tag >>> 3) {
|
|
1903
|
-
case 1:
|
|
2037
|
+
case 1: {
|
|
1904
2038
|
if (tag !== 10) {
|
|
1905
2039
|
break;
|
|
1906
2040
|
}
|
|
1907
2041
|
message.address = reader.string();
|
|
1908
2042
|
continue;
|
|
1909
|
-
|
|
2043
|
+
}
|
|
2044
|
+
case 2: {
|
|
1910
2045
|
if (tag !== 18) {
|
|
1911
2046
|
break;
|
|
1912
2047
|
}
|
|
1913
2048
|
message.data = reader.bytes();
|
|
1914
2049
|
continue;
|
|
2050
|
+
}
|
|
1915
2051
|
}
|
|
1916
2052
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1917
2053
|
break;
|
|
1918
2054
|
}
|
|
1919
|
-
reader.
|
|
2055
|
+
reader.skip(tag & 7);
|
|
1920
2056
|
}
|
|
1921
2057
|
return message;
|
|
1922
2058
|
},
|
|
1923
2059
|
fromJSON(object) {
|
|
1924
2060
|
return {
|
|
1925
|
-
address: isSet(object.address) ? String(object.address) : "",
|
|
2061
|
+
address: isSet(object.address) ? globalThis.String(object.address) : "",
|
|
1926
2062
|
data: isSet(object.data)
|
|
1927
2063
|
? bytesFromBase64(object.data)
|
|
1928
|
-
: new Uint8Array(),
|
|
2064
|
+
: new Uint8Array(0),
|
|
1929
2065
|
};
|
|
1930
2066
|
},
|
|
1931
2067
|
toJSON(message) {
|
|
1932
2068
|
const obj = {};
|
|
1933
|
-
message.address !==
|
|
1934
|
-
|
|
1935
|
-
|
|
2069
|
+
if (message.address !== "") {
|
|
2070
|
+
obj.address = message.address;
|
|
2071
|
+
}
|
|
2072
|
+
if (message.data.length !== 0) {
|
|
2073
|
+
obj.data = base64FromBytes(message.data);
|
|
2074
|
+
}
|
|
1936
2075
|
return obj;
|
|
1937
2076
|
},
|
|
1938
2077
|
create(base) {
|
|
1939
|
-
return exports.MsgStoreAndInstantiateContractResponse.fromPartial(base
|
|
2078
|
+
return exports.MsgStoreAndInstantiateContractResponse.fromPartial(base ?? {});
|
|
1940
2079
|
},
|
|
1941
2080
|
fromPartial(object) {
|
|
1942
|
-
var _a, _b;
|
|
1943
2081
|
const message = createBaseMsgStoreAndInstantiateContractResponse();
|
|
1944
|
-
message.address =
|
|
1945
|
-
message.data =
|
|
2082
|
+
message.address = object.address ?? "";
|
|
2083
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
1946
2084
|
return message;
|
|
1947
2085
|
},
|
|
1948
2086
|
};
|
|
2087
|
+
exports.MsgServiceName = "cosmwasm.wasm.v1.Msg";
|
|
1949
2088
|
class MsgClientImpl {
|
|
1950
2089
|
constructor(rpc, opts) {
|
|
1951
|
-
this.service =
|
|
2090
|
+
this.service = opts?.service || exports.MsgServiceName;
|
|
1952
2091
|
this.rpc = rpc;
|
|
1953
2092
|
this.StoreCode = this.StoreCode.bind(this);
|
|
1954
2093
|
this.InstantiateContract = this.InstantiateContract.bind(this);
|
|
@@ -1968,91 +2107,76 @@ class MsgClientImpl {
|
|
|
1968
2107
|
StoreCode(request) {
|
|
1969
2108
|
const data = exports.MsgStoreCode.encode(request).finish();
|
|
1970
2109
|
const promise = this.rpc.request(this.service, "StoreCode", data);
|
|
1971
|
-
return promise.then((data) => exports.MsgStoreCodeResponse.decode(
|
|
2110
|
+
return promise.then((data) => exports.MsgStoreCodeResponse.decode(new binary_1.BinaryReader(data)));
|
|
1972
2111
|
}
|
|
1973
2112
|
InstantiateContract(request) {
|
|
1974
2113
|
const data = exports.MsgInstantiateContract.encode(request).finish();
|
|
1975
2114
|
const promise = this.rpc.request(this.service, "InstantiateContract", data);
|
|
1976
|
-
return promise.then((data) => exports.MsgInstantiateContractResponse.decode(
|
|
2115
|
+
return promise.then((data) => exports.MsgInstantiateContractResponse.decode(new binary_1.BinaryReader(data)));
|
|
1977
2116
|
}
|
|
1978
2117
|
InstantiateContract2(request) {
|
|
1979
2118
|
const data = exports.MsgInstantiateContract2.encode(request).finish();
|
|
1980
2119
|
const promise = this.rpc.request(this.service, "InstantiateContract2", data);
|
|
1981
|
-
return promise.then((data) => exports.MsgInstantiateContract2Response.decode(
|
|
2120
|
+
return promise.then((data) => exports.MsgInstantiateContract2Response.decode(new binary_1.BinaryReader(data)));
|
|
1982
2121
|
}
|
|
1983
2122
|
ExecuteContract(request) {
|
|
1984
2123
|
const data = exports.MsgExecuteContract.encode(request).finish();
|
|
1985
2124
|
const promise = this.rpc.request(this.service, "ExecuteContract", data);
|
|
1986
|
-
return promise.then((data) => exports.MsgExecuteContractResponse.decode(
|
|
2125
|
+
return promise.then((data) => exports.MsgExecuteContractResponse.decode(new binary_1.BinaryReader(data)));
|
|
1987
2126
|
}
|
|
1988
2127
|
MigrateContract(request) {
|
|
1989
2128
|
const data = exports.MsgMigrateContract.encode(request).finish();
|
|
1990
2129
|
const promise = this.rpc.request(this.service, "MigrateContract", data);
|
|
1991
|
-
return promise.then((data) => exports.MsgMigrateContractResponse.decode(
|
|
2130
|
+
return promise.then((data) => exports.MsgMigrateContractResponse.decode(new binary_1.BinaryReader(data)));
|
|
1992
2131
|
}
|
|
1993
2132
|
UpdateAdmin(request) {
|
|
1994
2133
|
const data = exports.MsgUpdateAdmin.encode(request).finish();
|
|
1995
2134
|
const promise = this.rpc.request(this.service, "UpdateAdmin", data);
|
|
1996
|
-
return promise.then((data) => exports.MsgUpdateAdminResponse.decode(
|
|
2135
|
+
return promise.then((data) => exports.MsgUpdateAdminResponse.decode(new binary_1.BinaryReader(data)));
|
|
1997
2136
|
}
|
|
1998
2137
|
ClearAdmin(request) {
|
|
1999
2138
|
const data = exports.MsgClearAdmin.encode(request).finish();
|
|
2000
2139
|
const promise = this.rpc.request(this.service, "ClearAdmin", data);
|
|
2001
|
-
return promise.then((data) => exports.MsgClearAdminResponse.decode(
|
|
2140
|
+
return promise.then((data) => exports.MsgClearAdminResponse.decode(new binary_1.BinaryReader(data)));
|
|
2002
2141
|
}
|
|
2003
2142
|
UpdateInstantiateConfig(request) {
|
|
2004
2143
|
const data = exports.MsgUpdateInstantiateConfig.encode(request).finish();
|
|
2005
2144
|
const promise = this.rpc.request(this.service, "UpdateInstantiateConfig", data);
|
|
2006
|
-
return promise.then((data) => exports.MsgUpdateInstantiateConfigResponse.decode(
|
|
2145
|
+
return promise.then((data) => exports.MsgUpdateInstantiateConfigResponse.decode(new binary_1.BinaryReader(data)));
|
|
2007
2146
|
}
|
|
2008
2147
|
UpdateParams(request) {
|
|
2009
2148
|
const data = exports.MsgUpdateParams.encode(request).finish();
|
|
2010
2149
|
const promise = this.rpc.request(this.service, "UpdateParams", data);
|
|
2011
|
-
return promise.then((data) => exports.MsgUpdateParamsResponse.decode(
|
|
2150
|
+
return promise.then((data) => exports.MsgUpdateParamsResponse.decode(new binary_1.BinaryReader(data)));
|
|
2012
2151
|
}
|
|
2013
2152
|
SudoContract(request) {
|
|
2014
2153
|
const data = exports.MsgSudoContract.encode(request).finish();
|
|
2015
2154
|
const promise = this.rpc.request(this.service, "SudoContract", data);
|
|
2016
|
-
return promise.then((data) => exports.MsgSudoContractResponse.decode(
|
|
2155
|
+
return promise.then((data) => exports.MsgSudoContractResponse.decode(new binary_1.BinaryReader(data)));
|
|
2017
2156
|
}
|
|
2018
2157
|
PinCodes(request) {
|
|
2019
2158
|
const data = exports.MsgPinCodes.encode(request).finish();
|
|
2020
2159
|
const promise = this.rpc.request(this.service, "PinCodes", data);
|
|
2021
|
-
return promise.then((data) => exports.MsgPinCodesResponse.decode(
|
|
2160
|
+
return promise.then((data) => exports.MsgPinCodesResponse.decode(new binary_1.BinaryReader(data)));
|
|
2022
2161
|
}
|
|
2023
2162
|
UnpinCodes(request) {
|
|
2024
2163
|
const data = exports.MsgUnpinCodes.encode(request).finish();
|
|
2025
2164
|
const promise = this.rpc.request(this.service, "UnpinCodes", data);
|
|
2026
|
-
return promise.then((data) => exports.MsgUnpinCodesResponse.decode(
|
|
2165
|
+
return promise.then((data) => exports.MsgUnpinCodesResponse.decode(new binary_1.BinaryReader(data)));
|
|
2027
2166
|
}
|
|
2028
2167
|
StoreAndInstantiateContract(request) {
|
|
2029
2168
|
const data = exports.MsgStoreAndInstantiateContract.encode(request).finish();
|
|
2030
2169
|
const promise = this.rpc.request(this.service, "StoreAndInstantiateContract", data);
|
|
2031
|
-
return promise.then((data) => exports.MsgStoreAndInstantiateContractResponse.decode(
|
|
2170
|
+
return promise.then((data) => exports.MsgStoreAndInstantiateContractResponse.decode(new binary_1.BinaryReader(data)));
|
|
2032
2171
|
}
|
|
2033
2172
|
}
|
|
2034
2173
|
exports.MsgClientImpl = MsgClientImpl;
|
|
2035
|
-
var tsProtoGlobalThis = (() => {
|
|
2036
|
-
if (typeof globalThis !== "undefined") {
|
|
2037
|
-
return globalThis;
|
|
2038
|
-
}
|
|
2039
|
-
if (typeof self !== "undefined") {
|
|
2040
|
-
return self;
|
|
2041
|
-
}
|
|
2042
|
-
if (typeof window !== "undefined") {
|
|
2043
|
-
return window;
|
|
2044
|
-
}
|
|
2045
|
-
if (typeof global !== "undefined") {
|
|
2046
|
-
return global;
|
|
2047
|
-
}
|
|
2048
|
-
throw "Unable to locate global object";
|
|
2049
|
-
})();
|
|
2050
2174
|
function bytesFromBase64(b64) {
|
|
2051
|
-
if (
|
|
2052
|
-
return Uint8Array.from(
|
|
2175
|
+
if (globalThis.Buffer) {
|
|
2176
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
2053
2177
|
}
|
|
2054
2178
|
else {
|
|
2055
|
-
const bin =
|
|
2179
|
+
const bin = globalThis.atob(b64);
|
|
2056
2180
|
const arr = new Uint8Array(bin.length);
|
|
2057
2181
|
for (let i = 0; i < bin.length; ++i) {
|
|
2058
2182
|
arr[i] = bin.charCodeAt(i);
|
|
@@ -2061,26 +2185,26 @@ function bytesFromBase64(b64) {
|
|
|
2061
2185
|
}
|
|
2062
2186
|
}
|
|
2063
2187
|
function base64FromBytes(arr) {
|
|
2064
|
-
if (
|
|
2065
|
-
return
|
|
2188
|
+
if (globalThis.Buffer) {
|
|
2189
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
2066
2190
|
}
|
|
2067
2191
|
else {
|
|
2068
2192
|
const bin = [];
|
|
2069
2193
|
arr.forEach((byte) => {
|
|
2070
|
-
bin.push(String.fromCharCode(byte));
|
|
2194
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
2071
2195
|
});
|
|
2072
|
-
return
|
|
2196
|
+
return globalThis.btoa(bin.join(""));
|
|
2073
2197
|
}
|
|
2074
2198
|
}
|
|
2075
|
-
function longToNumber(
|
|
2076
|
-
|
|
2077
|
-
|
|
2199
|
+
function longToNumber(int64) {
|
|
2200
|
+
const num = globalThis.Number(int64.toString());
|
|
2201
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
2202
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
2078
2203
|
}
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
minimal_1.default.configure();
|
|
2204
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
2205
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
2206
|
+
}
|
|
2207
|
+
return num;
|
|
2084
2208
|
}
|
|
2085
2209
|
function isSet(value) {
|
|
2086
2210
|
return value !== null && value !== undefined;
|