coreum-js 2.16.3 → 2.17.1
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 +2 -0
- package/dist/main/coreum/dex/index.js +11 -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 +2 -0
- package/dist/module/coreum/dex/index.js +8 -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
|
@@ -1,12 +1,13 @@
|
|
|
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/proposal.proto
|
|
5
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
8
|
exports.StoreAndInstantiateContractProposal = exports.UpdateInstantiateConfigProposal = exports.AccessConfigUpdate = exports.UnpinCodesProposal = exports.PinCodesProposal = exports.ClearAdminProposal = exports.UpdateAdminProposal = exports.ExecuteContractProposal = exports.SudoContractProposal = exports.MigrateContractProposal = exports.InstantiateContract2Proposal = exports.InstantiateContractProposal = exports.StoreCodeProposal = 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";
|
|
@@ -15,16 +16,16 @@ function createBaseStoreCodeProposal() {
|
|
|
15
16
|
title: "",
|
|
16
17
|
description: "",
|
|
17
18
|
runAs: "",
|
|
18
|
-
wasmByteCode: new Uint8Array(),
|
|
19
|
+
wasmByteCode: new Uint8Array(0),
|
|
19
20
|
instantiatePermission: undefined,
|
|
20
21
|
unpinCode: false,
|
|
21
22
|
source: "",
|
|
22
23
|
builder: "",
|
|
23
|
-
codeHash: new Uint8Array(),
|
|
24
|
+
codeHash: new Uint8Array(0),
|
|
24
25
|
};
|
|
25
26
|
}
|
|
26
27
|
exports.StoreCodeProposal = {
|
|
27
|
-
encode(message, writer =
|
|
28
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
28
29
|
if (message.title !== "") {
|
|
29
30
|
writer.uint32(10).string(message.title);
|
|
30
31
|
}
|
|
@@ -40,7 +41,7 @@ exports.StoreCodeProposal = {
|
|
|
40
41
|
if (message.instantiatePermission !== undefined) {
|
|
41
42
|
types_1.AccessConfig.encode(message.instantiatePermission, writer.uint32(58).fork()).ldelim();
|
|
42
43
|
}
|
|
43
|
-
if (message.unpinCode
|
|
44
|
+
if (message.unpinCode !== false) {
|
|
44
45
|
writer.uint32(64).bool(message.unpinCode);
|
|
45
46
|
}
|
|
46
47
|
if (message.source !== "") {
|
|
@@ -55,133 +56,155 @@ exports.StoreCodeProposal = {
|
|
|
55
56
|
return writer;
|
|
56
57
|
},
|
|
57
58
|
decode(input, length) {
|
|
58
|
-
const reader = input instanceof
|
|
59
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
59
60
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
60
61
|
const message = createBaseStoreCodeProposal();
|
|
61
62
|
while (reader.pos < end) {
|
|
62
63
|
const tag = reader.uint32();
|
|
63
64
|
switch (tag >>> 3) {
|
|
64
|
-
case 1:
|
|
65
|
+
case 1: {
|
|
65
66
|
if (tag !== 10) {
|
|
66
67
|
break;
|
|
67
68
|
}
|
|
68
69
|
message.title = reader.string();
|
|
69
70
|
continue;
|
|
70
|
-
|
|
71
|
+
}
|
|
72
|
+
case 2: {
|
|
71
73
|
if (tag !== 18) {
|
|
72
74
|
break;
|
|
73
75
|
}
|
|
74
76
|
message.description = reader.string();
|
|
75
77
|
continue;
|
|
76
|
-
|
|
78
|
+
}
|
|
79
|
+
case 3: {
|
|
77
80
|
if (tag !== 26) {
|
|
78
81
|
break;
|
|
79
82
|
}
|
|
80
83
|
message.runAs = reader.string();
|
|
81
84
|
continue;
|
|
82
|
-
|
|
85
|
+
}
|
|
86
|
+
case 4: {
|
|
83
87
|
if (tag !== 34) {
|
|
84
88
|
break;
|
|
85
89
|
}
|
|
86
90
|
message.wasmByteCode = reader.bytes();
|
|
87
91
|
continue;
|
|
88
|
-
|
|
92
|
+
}
|
|
93
|
+
case 7: {
|
|
89
94
|
if (tag !== 58) {
|
|
90
95
|
break;
|
|
91
96
|
}
|
|
92
97
|
message.instantiatePermission = types_1.AccessConfig.decode(reader, reader.uint32());
|
|
93
98
|
continue;
|
|
94
|
-
|
|
99
|
+
}
|
|
100
|
+
case 8: {
|
|
95
101
|
if (tag !== 64) {
|
|
96
102
|
break;
|
|
97
103
|
}
|
|
98
104
|
message.unpinCode = reader.bool();
|
|
99
105
|
continue;
|
|
100
|
-
|
|
106
|
+
}
|
|
107
|
+
case 9: {
|
|
101
108
|
if (tag !== 74) {
|
|
102
109
|
break;
|
|
103
110
|
}
|
|
104
111
|
message.source = reader.string();
|
|
105
112
|
continue;
|
|
106
|
-
|
|
113
|
+
}
|
|
114
|
+
case 10: {
|
|
107
115
|
if (tag !== 82) {
|
|
108
116
|
break;
|
|
109
117
|
}
|
|
110
118
|
message.builder = reader.string();
|
|
111
119
|
continue;
|
|
112
|
-
|
|
120
|
+
}
|
|
121
|
+
case 11: {
|
|
113
122
|
if (tag !== 90) {
|
|
114
123
|
break;
|
|
115
124
|
}
|
|
116
125
|
message.codeHash = reader.bytes();
|
|
117
126
|
continue;
|
|
127
|
+
}
|
|
118
128
|
}
|
|
119
129
|
if ((tag & 7) === 4 || tag === 0) {
|
|
120
130
|
break;
|
|
121
131
|
}
|
|
122
|
-
reader.
|
|
132
|
+
reader.skip(tag & 7);
|
|
123
133
|
}
|
|
124
134
|
return message;
|
|
125
135
|
},
|
|
126
136
|
fromJSON(object) {
|
|
127
137
|
return {
|
|
128
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
129
|
-
description: isSet(object.description)
|
|
130
|
-
|
|
138
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
139
|
+
description: isSet(object.description)
|
|
140
|
+
? globalThis.String(object.description)
|
|
141
|
+
: "",
|
|
142
|
+
runAs: isSet(object.runAs) ? globalThis.String(object.runAs) : "",
|
|
131
143
|
wasmByteCode: isSet(object.wasmByteCode)
|
|
132
144
|
? bytesFromBase64(object.wasmByteCode)
|
|
133
|
-
: new Uint8Array(),
|
|
145
|
+
: new Uint8Array(0),
|
|
134
146
|
instantiatePermission: isSet(object.instantiatePermission)
|
|
135
147
|
? types_1.AccessConfig.fromJSON(object.instantiatePermission)
|
|
136
148
|
: undefined,
|
|
137
|
-
unpinCode: isSet(object.unpinCode)
|
|
138
|
-
|
|
139
|
-
|
|
149
|
+
unpinCode: isSet(object.unpinCode)
|
|
150
|
+
? globalThis.Boolean(object.unpinCode)
|
|
151
|
+
: false,
|
|
152
|
+
source: isSet(object.source) ? globalThis.String(object.source) : "",
|
|
153
|
+
builder: isSet(object.builder) ? globalThis.String(object.builder) : "",
|
|
140
154
|
codeHash: isSet(object.codeHash)
|
|
141
155
|
? bytesFromBase64(object.codeHash)
|
|
142
|
-
: new Uint8Array(),
|
|
156
|
+
: new Uint8Array(0),
|
|
143
157
|
};
|
|
144
158
|
},
|
|
145
159
|
toJSON(message) {
|
|
146
160
|
const obj = {};
|
|
147
|
-
message.title !==
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
message.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
message.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
message.
|
|
163
|
-
|
|
161
|
+
if (message.title !== "") {
|
|
162
|
+
obj.title = message.title;
|
|
163
|
+
}
|
|
164
|
+
if (message.description !== "") {
|
|
165
|
+
obj.description = message.description;
|
|
166
|
+
}
|
|
167
|
+
if (message.runAs !== "") {
|
|
168
|
+
obj.runAs = message.runAs;
|
|
169
|
+
}
|
|
170
|
+
if (message.wasmByteCode.length !== 0) {
|
|
171
|
+
obj.wasmByteCode = base64FromBytes(message.wasmByteCode);
|
|
172
|
+
}
|
|
173
|
+
if (message.instantiatePermission !== undefined) {
|
|
174
|
+
obj.instantiatePermission = types_1.AccessConfig.toJSON(message.instantiatePermission);
|
|
175
|
+
}
|
|
176
|
+
if (message.unpinCode !== false) {
|
|
177
|
+
obj.unpinCode = message.unpinCode;
|
|
178
|
+
}
|
|
179
|
+
if (message.source !== "") {
|
|
180
|
+
obj.source = message.source;
|
|
181
|
+
}
|
|
182
|
+
if (message.builder !== "") {
|
|
183
|
+
obj.builder = message.builder;
|
|
184
|
+
}
|
|
185
|
+
if (message.codeHash.length !== 0) {
|
|
186
|
+
obj.codeHash = base64FromBytes(message.codeHash);
|
|
187
|
+
}
|
|
164
188
|
return obj;
|
|
165
189
|
},
|
|
166
190
|
create(base) {
|
|
167
|
-
return exports.StoreCodeProposal.fromPartial(base
|
|
191
|
+
return exports.StoreCodeProposal.fromPartial(base ?? {});
|
|
168
192
|
},
|
|
169
193
|
fromPartial(object) {
|
|
170
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
171
194
|
const message = createBaseStoreCodeProposal();
|
|
172
|
-
message.title =
|
|
173
|
-
message.description =
|
|
174
|
-
message.runAs =
|
|
175
|
-
message.wasmByteCode =
|
|
195
|
+
message.title = object.title ?? "";
|
|
196
|
+
message.description = object.description ?? "";
|
|
197
|
+
message.runAs = object.runAs ?? "";
|
|
198
|
+
message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(0);
|
|
176
199
|
message.instantiatePermission =
|
|
177
200
|
object.instantiatePermission !== undefined &&
|
|
178
201
|
object.instantiatePermission !== null
|
|
179
202
|
? types_1.AccessConfig.fromPartial(object.instantiatePermission)
|
|
180
203
|
: undefined;
|
|
181
|
-
message.unpinCode =
|
|
182
|
-
message.source =
|
|
183
|
-
message.builder =
|
|
184
|
-
message.codeHash =
|
|
204
|
+
message.unpinCode = object.unpinCode ?? false;
|
|
205
|
+
message.source = object.source ?? "";
|
|
206
|
+
message.builder = object.builder ?? "";
|
|
207
|
+
message.codeHash = object.codeHash ?? new Uint8Array(0);
|
|
185
208
|
return message;
|
|
186
209
|
},
|
|
187
210
|
};
|
|
@@ -193,12 +216,12 @@ function createBaseInstantiateContractProposal() {
|
|
|
193
216
|
admin: "",
|
|
194
217
|
codeId: 0,
|
|
195
218
|
label: "",
|
|
196
|
-
msg: new Uint8Array(),
|
|
219
|
+
msg: new Uint8Array(0),
|
|
197
220
|
funds: [],
|
|
198
221
|
};
|
|
199
222
|
}
|
|
200
223
|
exports.InstantiateContractProposal = {
|
|
201
|
-
encode(message, writer =
|
|
224
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
202
225
|
if (message.title !== "") {
|
|
203
226
|
writer.uint32(10).string(message.title);
|
|
204
227
|
}
|
|
@@ -226,115 +249,135 @@ exports.InstantiateContractProposal = {
|
|
|
226
249
|
return writer;
|
|
227
250
|
},
|
|
228
251
|
decode(input, length) {
|
|
229
|
-
const reader = input instanceof
|
|
252
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
230
253
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
231
254
|
const message = createBaseInstantiateContractProposal();
|
|
232
255
|
while (reader.pos < end) {
|
|
233
256
|
const tag = reader.uint32();
|
|
234
257
|
switch (tag >>> 3) {
|
|
235
|
-
case 1:
|
|
258
|
+
case 1: {
|
|
236
259
|
if (tag !== 10) {
|
|
237
260
|
break;
|
|
238
261
|
}
|
|
239
262
|
message.title = reader.string();
|
|
240
263
|
continue;
|
|
241
|
-
|
|
264
|
+
}
|
|
265
|
+
case 2: {
|
|
242
266
|
if (tag !== 18) {
|
|
243
267
|
break;
|
|
244
268
|
}
|
|
245
269
|
message.description = reader.string();
|
|
246
270
|
continue;
|
|
247
|
-
|
|
271
|
+
}
|
|
272
|
+
case 3: {
|
|
248
273
|
if (tag !== 26) {
|
|
249
274
|
break;
|
|
250
275
|
}
|
|
251
276
|
message.runAs = reader.string();
|
|
252
277
|
continue;
|
|
253
|
-
|
|
278
|
+
}
|
|
279
|
+
case 4: {
|
|
254
280
|
if (tag !== 34) {
|
|
255
281
|
break;
|
|
256
282
|
}
|
|
257
283
|
message.admin = reader.string();
|
|
258
284
|
continue;
|
|
259
|
-
|
|
285
|
+
}
|
|
286
|
+
case 5: {
|
|
260
287
|
if (tag !== 40) {
|
|
261
288
|
break;
|
|
262
289
|
}
|
|
263
290
|
message.codeId = longToNumber(reader.uint64());
|
|
264
291
|
continue;
|
|
265
|
-
|
|
292
|
+
}
|
|
293
|
+
case 6: {
|
|
266
294
|
if (tag !== 50) {
|
|
267
295
|
break;
|
|
268
296
|
}
|
|
269
297
|
message.label = reader.string();
|
|
270
298
|
continue;
|
|
271
|
-
|
|
299
|
+
}
|
|
300
|
+
case 7: {
|
|
272
301
|
if (tag !== 58) {
|
|
273
302
|
break;
|
|
274
303
|
}
|
|
275
304
|
message.msg = reader.bytes();
|
|
276
305
|
continue;
|
|
277
|
-
|
|
306
|
+
}
|
|
307
|
+
case 8: {
|
|
278
308
|
if (tag !== 66) {
|
|
279
309
|
break;
|
|
280
310
|
}
|
|
281
311
|
message.funds.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
282
312
|
continue;
|
|
313
|
+
}
|
|
283
314
|
}
|
|
284
315
|
if ((tag & 7) === 4 || tag === 0) {
|
|
285
316
|
break;
|
|
286
317
|
}
|
|
287
|
-
reader.
|
|
318
|
+
reader.skip(tag & 7);
|
|
288
319
|
}
|
|
289
320
|
return message;
|
|
290
321
|
},
|
|
291
322
|
fromJSON(object) {
|
|
292
323
|
return {
|
|
293
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
294
|
-
description: isSet(object.description)
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
324
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
325
|
+
description: isSet(object.description)
|
|
326
|
+
? globalThis.String(object.description)
|
|
327
|
+
: "",
|
|
328
|
+
runAs: isSet(object.runAs) ? globalThis.String(object.runAs) : "",
|
|
329
|
+
admin: isSet(object.admin) ? globalThis.String(object.admin) : "",
|
|
330
|
+
codeId: isSet(object.codeId) ? globalThis.Number(object.codeId) : 0,
|
|
331
|
+
label: isSet(object.label) ? globalThis.String(object.label) : "",
|
|
332
|
+
msg: isSet(object.msg)
|
|
333
|
+
? bytesFromBase64(object.msg)
|
|
334
|
+
: new Uint8Array(0),
|
|
335
|
+
funds: globalThis.Array.isArray(object?.funds)
|
|
301
336
|
? object.funds.map((e) => coin_1.Coin.fromJSON(e))
|
|
302
337
|
: [],
|
|
303
338
|
};
|
|
304
339
|
},
|
|
305
340
|
toJSON(message) {
|
|
306
341
|
const obj = {};
|
|
307
|
-
message.title !==
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
message.
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
message.
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
if (message.
|
|
317
|
-
obj.
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
obj.
|
|
342
|
+
if (message.title !== "") {
|
|
343
|
+
obj.title = message.title;
|
|
344
|
+
}
|
|
345
|
+
if (message.description !== "") {
|
|
346
|
+
obj.description = message.description;
|
|
347
|
+
}
|
|
348
|
+
if (message.runAs !== "") {
|
|
349
|
+
obj.runAs = message.runAs;
|
|
350
|
+
}
|
|
351
|
+
if (message.admin !== "") {
|
|
352
|
+
obj.admin = message.admin;
|
|
353
|
+
}
|
|
354
|
+
if (message.codeId !== 0) {
|
|
355
|
+
obj.codeId = Math.round(message.codeId);
|
|
356
|
+
}
|
|
357
|
+
if (message.label !== "") {
|
|
358
|
+
obj.label = message.label;
|
|
359
|
+
}
|
|
360
|
+
if (message.msg.length !== 0) {
|
|
361
|
+
obj.msg = base64FromBytes(message.msg);
|
|
362
|
+
}
|
|
363
|
+
if (message.funds?.length) {
|
|
364
|
+
obj.funds = message.funds.map((e) => coin_1.Coin.toJSON(e));
|
|
321
365
|
}
|
|
322
366
|
return obj;
|
|
323
367
|
},
|
|
324
368
|
create(base) {
|
|
325
|
-
return exports.InstantiateContractProposal.fromPartial(base
|
|
369
|
+
return exports.InstantiateContractProposal.fromPartial(base ?? {});
|
|
326
370
|
},
|
|
327
371
|
fromPartial(object) {
|
|
328
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
329
372
|
const message = createBaseInstantiateContractProposal();
|
|
330
|
-
message.title =
|
|
331
|
-
message.description =
|
|
332
|
-
message.runAs =
|
|
333
|
-
message.admin =
|
|
334
|
-
message.codeId =
|
|
335
|
-
message.label =
|
|
336
|
-
message.msg =
|
|
337
|
-
message.funds =
|
|
373
|
+
message.title = object.title ?? "";
|
|
374
|
+
message.description = object.description ?? "";
|
|
375
|
+
message.runAs = object.runAs ?? "";
|
|
376
|
+
message.admin = object.admin ?? "";
|
|
377
|
+
message.codeId = object.codeId ?? 0;
|
|
378
|
+
message.label = object.label ?? "";
|
|
379
|
+
message.msg = object.msg ?? new Uint8Array(0);
|
|
380
|
+
message.funds = object.funds?.map((e) => coin_1.Coin.fromPartial(e)) || [];
|
|
338
381
|
return message;
|
|
339
382
|
},
|
|
340
383
|
};
|
|
@@ -346,14 +389,14 @@ function createBaseInstantiateContract2Proposal() {
|
|
|
346
389
|
admin: "",
|
|
347
390
|
codeId: 0,
|
|
348
391
|
label: "",
|
|
349
|
-
msg: new Uint8Array(),
|
|
392
|
+
msg: new Uint8Array(0),
|
|
350
393
|
funds: [],
|
|
351
|
-
salt: new Uint8Array(),
|
|
394
|
+
salt: new Uint8Array(0),
|
|
352
395
|
fixMsg: false,
|
|
353
396
|
};
|
|
354
397
|
}
|
|
355
398
|
exports.InstantiateContract2Proposal = {
|
|
356
|
-
encode(message, writer =
|
|
399
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
357
400
|
if (message.title !== "") {
|
|
358
401
|
writer.uint32(10).string(message.title);
|
|
359
402
|
}
|
|
@@ -381,142 +424,169 @@ exports.InstantiateContract2Proposal = {
|
|
|
381
424
|
if (message.salt.length !== 0) {
|
|
382
425
|
writer.uint32(74).bytes(message.salt);
|
|
383
426
|
}
|
|
384
|
-
if (message.fixMsg
|
|
427
|
+
if (message.fixMsg !== false) {
|
|
385
428
|
writer.uint32(80).bool(message.fixMsg);
|
|
386
429
|
}
|
|
387
430
|
return writer;
|
|
388
431
|
},
|
|
389
432
|
decode(input, length) {
|
|
390
|
-
const reader = input instanceof
|
|
433
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
391
434
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
392
435
|
const message = createBaseInstantiateContract2Proposal();
|
|
393
436
|
while (reader.pos < end) {
|
|
394
437
|
const tag = reader.uint32();
|
|
395
438
|
switch (tag >>> 3) {
|
|
396
|
-
case 1:
|
|
439
|
+
case 1: {
|
|
397
440
|
if (tag !== 10) {
|
|
398
441
|
break;
|
|
399
442
|
}
|
|
400
443
|
message.title = reader.string();
|
|
401
444
|
continue;
|
|
402
|
-
|
|
445
|
+
}
|
|
446
|
+
case 2: {
|
|
403
447
|
if (tag !== 18) {
|
|
404
448
|
break;
|
|
405
449
|
}
|
|
406
450
|
message.description = reader.string();
|
|
407
451
|
continue;
|
|
408
|
-
|
|
452
|
+
}
|
|
453
|
+
case 3: {
|
|
409
454
|
if (tag !== 26) {
|
|
410
455
|
break;
|
|
411
456
|
}
|
|
412
457
|
message.runAs = reader.string();
|
|
413
458
|
continue;
|
|
414
|
-
|
|
459
|
+
}
|
|
460
|
+
case 4: {
|
|
415
461
|
if (tag !== 34) {
|
|
416
462
|
break;
|
|
417
463
|
}
|
|
418
464
|
message.admin = reader.string();
|
|
419
465
|
continue;
|
|
420
|
-
|
|
466
|
+
}
|
|
467
|
+
case 5: {
|
|
421
468
|
if (tag !== 40) {
|
|
422
469
|
break;
|
|
423
470
|
}
|
|
424
471
|
message.codeId = longToNumber(reader.uint64());
|
|
425
472
|
continue;
|
|
426
|
-
|
|
473
|
+
}
|
|
474
|
+
case 6: {
|
|
427
475
|
if (tag !== 50) {
|
|
428
476
|
break;
|
|
429
477
|
}
|
|
430
478
|
message.label = reader.string();
|
|
431
479
|
continue;
|
|
432
|
-
|
|
480
|
+
}
|
|
481
|
+
case 7: {
|
|
433
482
|
if (tag !== 58) {
|
|
434
483
|
break;
|
|
435
484
|
}
|
|
436
485
|
message.msg = reader.bytes();
|
|
437
486
|
continue;
|
|
438
|
-
|
|
487
|
+
}
|
|
488
|
+
case 8: {
|
|
439
489
|
if (tag !== 66) {
|
|
440
490
|
break;
|
|
441
491
|
}
|
|
442
492
|
message.funds.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
443
493
|
continue;
|
|
444
|
-
|
|
494
|
+
}
|
|
495
|
+
case 9: {
|
|
445
496
|
if (tag !== 74) {
|
|
446
497
|
break;
|
|
447
498
|
}
|
|
448
499
|
message.salt = reader.bytes();
|
|
449
500
|
continue;
|
|
450
|
-
|
|
501
|
+
}
|
|
502
|
+
case 10: {
|
|
451
503
|
if (tag !== 80) {
|
|
452
504
|
break;
|
|
453
505
|
}
|
|
454
506
|
message.fixMsg = reader.bool();
|
|
455
507
|
continue;
|
|
508
|
+
}
|
|
456
509
|
}
|
|
457
510
|
if ((tag & 7) === 4 || tag === 0) {
|
|
458
511
|
break;
|
|
459
512
|
}
|
|
460
|
-
reader.
|
|
513
|
+
reader.skip(tag & 7);
|
|
461
514
|
}
|
|
462
515
|
return message;
|
|
463
516
|
},
|
|
464
517
|
fromJSON(object) {
|
|
465
518
|
return {
|
|
466
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
467
|
-
description: isSet(object.description)
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
519
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
520
|
+
description: isSet(object.description)
|
|
521
|
+
? globalThis.String(object.description)
|
|
522
|
+
: "",
|
|
523
|
+
runAs: isSet(object.runAs) ? globalThis.String(object.runAs) : "",
|
|
524
|
+
admin: isSet(object.admin) ? globalThis.String(object.admin) : "",
|
|
525
|
+
codeId: isSet(object.codeId) ? globalThis.Number(object.codeId) : 0,
|
|
526
|
+
label: isSet(object.label) ? globalThis.String(object.label) : "",
|
|
527
|
+
msg: isSet(object.msg)
|
|
528
|
+
? bytesFromBase64(object.msg)
|
|
529
|
+
: new Uint8Array(0),
|
|
530
|
+
funds: globalThis.Array.isArray(object?.funds)
|
|
474
531
|
? object.funds.map((e) => coin_1.Coin.fromJSON(e))
|
|
475
532
|
: [],
|
|
476
533
|
salt: isSet(object.salt)
|
|
477
534
|
? bytesFromBase64(object.salt)
|
|
478
|
-
: new Uint8Array(),
|
|
479
|
-
fixMsg: isSet(object.fixMsg)
|
|
535
|
+
: new Uint8Array(0),
|
|
536
|
+
fixMsg: isSet(object.fixMsg)
|
|
537
|
+
? globalThis.Boolean(object.fixMsg)
|
|
538
|
+
: false,
|
|
480
539
|
};
|
|
481
540
|
},
|
|
482
541
|
toJSON(message) {
|
|
483
542
|
const obj = {};
|
|
484
|
-
message.title !==
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
message.
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
message.
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
if (message.
|
|
494
|
-
obj.
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
obj.
|
|
498
|
-
}
|
|
499
|
-
message.
|
|
500
|
-
|
|
501
|
-
|
|
543
|
+
if (message.title !== "") {
|
|
544
|
+
obj.title = message.title;
|
|
545
|
+
}
|
|
546
|
+
if (message.description !== "") {
|
|
547
|
+
obj.description = message.description;
|
|
548
|
+
}
|
|
549
|
+
if (message.runAs !== "") {
|
|
550
|
+
obj.runAs = message.runAs;
|
|
551
|
+
}
|
|
552
|
+
if (message.admin !== "") {
|
|
553
|
+
obj.admin = message.admin;
|
|
554
|
+
}
|
|
555
|
+
if (message.codeId !== 0) {
|
|
556
|
+
obj.codeId = Math.round(message.codeId);
|
|
557
|
+
}
|
|
558
|
+
if (message.label !== "") {
|
|
559
|
+
obj.label = message.label;
|
|
560
|
+
}
|
|
561
|
+
if (message.msg.length !== 0) {
|
|
562
|
+
obj.msg = base64FromBytes(message.msg);
|
|
563
|
+
}
|
|
564
|
+
if (message.funds?.length) {
|
|
565
|
+
obj.funds = message.funds.map((e) => coin_1.Coin.toJSON(e));
|
|
566
|
+
}
|
|
567
|
+
if (message.salt.length !== 0) {
|
|
568
|
+
obj.salt = base64FromBytes(message.salt);
|
|
569
|
+
}
|
|
570
|
+
if (message.fixMsg !== false) {
|
|
571
|
+
obj.fixMsg = message.fixMsg;
|
|
572
|
+
}
|
|
502
573
|
return obj;
|
|
503
574
|
},
|
|
504
575
|
create(base) {
|
|
505
|
-
return exports.InstantiateContract2Proposal.fromPartial(base
|
|
576
|
+
return exports.InstantiateContract2Proposal.fromPartial(base ?? {});
|
|
506
577
|
},
|
|
507
578
|
fromPartial(object) {
|
|
508
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
509
579
|
const message = createBaseInstantiateContract2Proposal();
|
|
510
|
-
message.title =
|
|
511
|
-
message.description =
|
|
512
|
-
message.runAs =
|
|
513
|
-
message.admin =
|
|
514
|
-
message.codeId =
|
|
515
|
-
message.label =
|
|
516
|
-
message.msg =
|
|
517
|
-
message.funds =
|
|
518
|
-
message.salt =
|
|
519
|
-
message.fixMsg =
|
|
580
|
+
message.title = object.title ?? "";
|
|
581
|
+
message.description = object.description ?? "";
|
|
582
|
+
message.runAs = object.runAs ?? "";
|
|
583
|
+
message.admin = object.admin ?? "";
|
|
584
|
+
message.codeId = object.codeId ?? 0;
|
|
585
|
+
message.label = object.label ?? "";
|
|
586
|
+
message.msg = object.msg ?? new Uint8Array(0);
|
|
587
|
+
message.funds = object.funds?.map((e) => coin_1.Coin.fromPartial(e)) || [];
|
|
588
|
+
message.salt = object.salt ?? new Uint8Array(0);
|
|
589
|
+
message.fixMsg = object.fixMsg ?? false;
|
|
520
590
|
return message;
|
|
521
591
|
},
|
|
522
592
|
};
|
|
@@ -526,11 +596,11 @@ function createBaseMigrateContractProposal() {
|
|
|
526
596
|
description: "",
|
|
527
597
|
contract: "",
|
|
528
598
|
codeId: 0,
|
|
529
|
-
msg: new Uint8Array(),
|
|
599
|
+
msg: new Uint8Array(0),
|
|
530
600
|
};
|
|
531
601
|
}
|
|
532
602
|
exports.MigrateContractProposal = {
|
|
533
|
-
encode(message, writer =
|
|
603
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
534
604
|
if (message.title !== "") {
|
|
535
605
|
writer.uint32(10).string(message.title);
|
|
536
606
|
}
|
|
@@ -549,89 +619,105 @@ exports.MigrateContractProposal = {
|
|
|
549
619
|
return writer;
|
|
550
620
|
},
|
|
551
621
|
decode(input, length) {
|
|
552
|
-
const reader = input instanceof
|
|
622
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
553
623
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
554
624
|
const message = createBaseMigrateContractProposal();
|
|
555
625
|
while (reader.pos < end) {
|
|
556
626
|
const tag = reader.uint32();
|
|
557
627
|
switch (tag >>> 3) {
|
|
558
|
-
case 1:
|
|
628
|
+
case 1: {
|
|
559
629
|
if (tag !== 10) {
|
|
560
630
|
break;
|
|
561
631
|
}
|
|
562
632
|
message.title = reader.string();
|
|
563
633
|
continue;
|
|
564
|
-
|
|
634
|
+
}
|
|
635
|
+
case 2: {
|
|
565
636
|
if (tag !== 18) {
|
|
566
637
|
break;
|
|
567
638
|
}
|
|
568
639
|
message.description = reader.string();
|
|
569
640
|
continue;
|
|
570
|
-
|
|
641
|
+
}
|
|
642
|
+
case 4: {
|
|
571
643
|
if (tag !== 34) {
|
|
572
644
|
break;
|
|
573
645
|
}
|
|
574
646
|
message.contract = reader.string();
|
|
575
647
|
continue;
|
|
576
|
-
|
|
648
|
+
}
|
|
649
|
+
case 5: {
|
|
577
650
|
if (tag !== 40) {
|
|
578
651
|
break;
|
|
579
652
|
}
|
|
580
653
|
message.codeId = longToNumber(reader.uint64());
|
|
581
654
|
continue;
|
|
582
|
-
|
|
655
|
+
}
|
|
656
|
+
case 6: {
|
|
583
657
|
if (tag !== 50) {
|
|
584
658
|
break;
|
|
585
659
|
}
|
|
586
660
|
message.msg = reader.bytes();
|
|
587
661
|
continue;
|
|
662
|
+
}
|
|
588
663
|
}
|
|
589
664
|
if ((tag & 7) === 4 || tag === 0) {
|
|
590
665
|
break;
|
|
591
666
|
}
|
|
592
|
-
reader.
|
|
667
|
+
reader.skip(tag & 7);
|
|
593
668
|
}
|
|
594
669
|
return message;
|
|
595
670
|
},
|
|
596
671
|
fromJSON(object) {
|
|
597
672
|
return {
|
|
598
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
599
|
-
description: isSet(object.description)
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
673
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
674
|
+
description: isSet(object.description)
|
|
675
|
+
? globalThis.String(object.description)
|
|
676
|
+
: "",
|
|
677
|
+
contract: isSet(object.contract)
|
|
678
|
+
? globalThis.String(object.contract)
|
|
679
|
+
: "",
|
|
680
|
+
codeId: isSet(object.codeId) ? globalThis.Number(object.codeId) : 0,
|
|
681
|
+
msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(0),
|
|
603
682
|
};
|
|
604
683
|
},
|
|
605
684
|
toJSON(message) {
|
|
606
685
|
const obj = {};
|
|
607
|
-
message.title !==
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
message.
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
686
|
+
if (message.title !== "") {
|
|
687
|
+
obj.title = message.title;
|
|
688
|
+
}
|
|
689
|
+
if (message.description !== "") {
|
|
690
|
+
obj.description = message.description;
|
|
691
|
+
}
|
|
692
|
+
if (message.contract !== "") {
|
|
693
|
+
obj.contract = message.contract;
|
|
694
|
+
}
|
|
695
|
+
if (message.codeId !== 0) {
|
|
696
|
+
obj.codeId = Math.round(message.codeId);
|
|
697
|
+
}
|
|
698
|
+
if (message.msg.length !== 0) {
|
|
699
|
+
obj.msg = base64FromBytes(message.msg);
|
|
700
|
+
}
|
|
614
701
|
return obj;
|
|
615
702
|
},
|
|
616
703
|
create(base) {
|
|
617
|
-
return exports.MigrateContractProposal.fromPartial(base
|
|
704
|
+
return exports.MigrateContractProposal.fromPartial(base ?? {});
|
|
618
705
|
},
|
|
619
706
|
fromPartial(object) {
|
|
620
|
-
var _a, _b, _c, _d, _e;
|
|
621
707
|
const message = createBaseMigrateContractProposal();
|
|
622
|
-
message.title =
|
|
623
|
-
message.description =
|
|
624
|
-
message.contract =
|
|
625
|
-
message.codeId =
|
|
626
|
-
message.msg =
|
|
708
|
+
message.title = object.title ?? "";
|
|
709
|
+
message.description = object.description ?? "";
|
|
710
|
+
message.contract = object.contract ?? "";
|
|
711
|
+
message.codeId = object.codeId ?? 0;
|
|
712
|
+
message.msg = object.msg ?? new Uint8Array(0);
|
|
627
713
|
return message;
|
|
628
714
|
},
|
|
629
715
|
};
|
|
630
716
|
function createBaseSudoContractProposal() {
|
|
631
|
-
return { title: "", description: "", contract: "", msg: new Uint8Array() };
|
|
717
|
+
return { title: "", description: "", contract: "", msg: new Uint8Array(0) };
|
|
632
718
|
}
|
|
633
719
|
exports.SudoContractProposal = {
|
|
634
|
-
encode(message, writer =
|
|
720
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
635
721
|
if (message.title !== "") {
|
|
636
722
|
writer.uint32(10).string(message.title);
|
|
637
723
|
}
|
|
@@ -647,72 +733,85 @@ exports.SudoContractProposal = {
|
|
|
647
733
|
return writer;
|
|
648
734
|
},
|
|
649
735
|
decode(input, length) {
|
|
650
|
-
const reader = input instanceof
|
|
736
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
651
737
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
652
738
|
const message = createBaseSudoContractProposal();
|
|
653
739
|
while (reader.pos < end) {
|
|
654
740
|
const tag = reader.uint32();
|
|
655
741
|
switch (tag >>> 3) {
|
|
656
|
-
case 1:
|
|
742
|
+
case 1: {
|
|
657
743
|
if (tag !== 10) {
|
|
658
744
|
break;
|
|
659
745
|
}
|
|
660
746
|
message.title = reader.string();
|
|
661
747
|
continue;
|
|
662
|
-
|
|
748
|
+
}
|
|
749
|
+
case 2: {
|
|
663
750
|
if (tag !== 18) {
|
|
664
751
|
break;
|
|
665
752
|
}
|
|
666
753
|
message.description = reader.string();
|
|
667
754
|
continue;
|
|
668
|
-
|
|
755
|
+
}
|
|
756
|
+
case 3: {
|
|
669
757
|
if (tag !== 26) {
|
|
670
758
|
break;
|
|
671
759
|
}
|
|
672
760
|
message.contract = reader.string();
|
|
673
761
|
continue;
|
|
674
|
-
|
|
762
|
+
}
|
|
763
|
+
case 4: {
|
|
675
764
|
if (tag !== 34) {
|
|
676
765
|
break;
|
|
677
766
|
}
|
|
678
767
|
message.msg = reader.bytes();
|
|
679
768
|
continue;
|
|
769
|
+
}
|
|
680
770
|
}
|
|
681
771
|
if ((tag & 7) === 4 || tag === 0) {
|
|
682
772
|
break;
|
|
683
773
|
}
|
|
684
|
-
reader.
|
|
774
|
+
reader.skip(tag & 7);
|
|
685
775
|
}
|
|
686
776
|
return message;
|
|
687
777
|
},
|
|
688
778
|
fromJSON(object) {
|
|
689
779
|
return {
|
|
690
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
691
|
-
description: isSet(object.description)
|
|
692
|
-
|
|
693
|
-
|
|
780
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
781
|
+
description: isSet(object.description)
|
|
782
|
+
? globalThis.String(object.description)
|
|
783
|
+
: "",
|
|
784
|
+
contract: isSet(object.contract)
|
|
785
|
+
? globalThis.String(object.contract)
|
|
786
|
+
: "",
|
|
787
|
+
msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(0),
|
|
694
788
|
};
|
|
695
789
|
},
|
|
696
790
|
toJSON(message) {
|
|
697
791
|
const obj = {};
|
|
698
|
-
message.title !==
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
message.
|
|
702
|
-
|
|
703
|
-
|
|
792
|
+
if (message.title !== "") {
|
|
793
|
+
obj.title = message.title;
|
|
794
|
+
}
|
|
795
|
+
if (message.description !== "") {
|
|
796
|
+
obj.description = message.description;
|
|
797
|
+
}
|
|
798
|
+
if (message.contract !== "") {
|
|
799
|
+
obj.contract = message.contract;
|
|
800
|
+
}
|
|
801
|
+
if (message.msg.length !== 0) {
|
|
802
|
+
obj.msg = base64FromBytes(message.msg);
|
|
803
|
+
}
|
|
704
804
|
return obj;
|
|
705
805
|
},
|
|
706
806
|
create(base) {
|
|
707
|
-
return exports.SudoContractProposal.fromPartial(base
|
|
807
|
+
return exports.SudoContractProposal.fromPartial(base ?? {});
|
|
708
808
|
},
|
|
709
809
|
fromPartial(object) {
|
|
710
|
-
var _a, _b, _c, _d;
|
|
711
810
|
const message = createBaseSudoContractProposal();
|
|
712
|
-
message.title =
|
|
713
|
-
message.description =
|
|
714
|
-
message.contract =
|
|
715
|
-
message.msg =
|
|
811
|
+
message.title = object.title ?? "";
|
|
812
|
+
message.description = object.description ?? "";
|
|
813
|
+
message.contract = object.contract ?? "";
|
|
814
|
+
message.msg = object.msg ?? new Uint8Array(0);
|
|
716
815
|
return message;
|
|
717
816
|
},
|
|
718
817
|
};
|
|
@@ -722,12 +821,12 @@ function createBaseExecuteContractProposal() {
|
|
|
722
821
|
description: "",
|
|
723
822
|
runAs: "",
|
|
724
823
|
contract: "",
|
|
725
|
-
msg: new Uint8Array(),
|
|
824
|
+
msg: new Uint8Array(0),
|
|
726
825
|
funds: [],
|
|
727
826
|
};
|
|
728
827
|
}
|
|
729
828
|
exports.ExecuteContractProposal = {
|
|
730
|
-
encode(message, writer =
|
|
829
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
731
830
|
if (message.title !== "") {
|
|
732
831
|
writer.uint32(10).string(message.title);
|
|
733
832
|
}
|
|
@@ -749,97 +848,111 @@ exports.ExecuteContractProposal = {
|
|
|
749
848
|
return writer;
|
|
750
849
|
},
|
|
751
850
|
decode(input, length) {
|
|
752
|
-
const reader = input instanceof
|
|
851
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
753
852
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
754
853
|
const message = createBaseExecuteContractProposal();
|
|
755
854
|
while (reader.pos < end) {
|
|
756
855
|
const tag = reader.uint32();
|
|
757
856
|
switch (tag >>> 3) {
|
|
758
|
-
case 1:
|
|
857
|
+
case 1: {
|
|
759
858
|
if (tag !== 10) {
|
|
760
859
|
break;
|
|
761
860
|
}
|
|
762
861
|
message.title = reader.string();
|
|
763
862
|
continue;
|
|
764
|
-
|
|
863
|
+
}
|
|
864
|
+
case 2: {
|
|
765
865
|
if (tag !== 18) {
|
|
766
866
|
break;
|
|
767
867
|
}
|
|
768
868
|
message.description = reader.string();
|
|
769
869
|
continue;
|
|
770
|
-
|
|
870
|
+
}
|
|
871
|
+
case 3: {
|
|
771
872
|
if (tag !== 26) {
|
|
772
873
|
break;
|
|
773
874
|
}
|
|
774
875
|
message.runAs = reader.string();
|
|
775
876
|
continue;
|
|
776
|
-
|
|
877
|
+
}
|
|
878
|
+
case 4: {
|
|
777
879
|
if (tag !== 34) {
|
|
778
880
|
break;
|
|
779
881
|
}
|
|
780
882
|
message.contract = reader.string();
|
|
781
883
|
continue;
|
|
782
|
-
|
|
884
|
+
}
|
|
885
|
+
case 5: {
|
|
783
886
|
if (tag !== 42) {
|
|
784
887
|
break;
|
|
785
888
|
}
|
|
786
889
|
message.msg = reader.bytes();
|
|
787
890
|
continue;
|
|
788
|
-
|
|
891
|
+
}
|
|
892
|
+
case 6: {
|
|
789
893
|
if (tag !== 50) {
|
|
790
894
|
break;
|
|
791
895
|
}
|
|
792
896
|
message.funds.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
793
897
|
continue;
|
|
898
|
+
}
|
|
794
899
|
}
|
|
795
900
|
if ((tag & 7) === 4 || tag === 0) {
|
|
796
901
|
break;
|
|
797
902
|
}
|
|
798
|
-
reader.
|
|
903
|
+
reader.skip(tag & 7);
|
|
799
904
|
}
|
|
800
905
|
return message;
|
|
801
906
|
},
|
|
802
907
|
fromJSON(object) {
|
|
803
908
|
return {
|
|
804
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
805
|
-
description: isSet(object.description)
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
909
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
910
|
+
description: isSet(object.description)
|
|
911
|
+
? globalThis.String(object.description)
|
|
912
|
+
: "",
|
|
913
|
+
runAs: isSet(object.runAs) ? globalThis.String(object.runAs) : "",
|
|
914
|
+
contract: isSet(object.contract)
|
|
915
|
+
? globalThis.String(object.contract)
|
|
916
|
+
: "",
|
|
917
|
+
msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(0),
|
|
918
|
+
funds: globalThis.Array.isArray(object?.funds)
|
|
810
919
|
? object.funds.map((e) => coin_1.Coin.fromJSON(e))
|
|
811
920
|
: [],
|
|
812
921
|
};
|
|
813
922
|
},
|
|
814
923
|
toJSON(message) {
|
|
815
924
|
const obj = {};
|
|
816
|
-
message.title !==
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
message.
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
925
|
+
if (message.title !== "") {
|
|
926
|
+
obj.title = message.title;
|
|
927
|
+
}
|
|
928
|
+
if (message.description !== "") {
|
|
929
|
+
obj.description = message.description;
|
|
930
|
+
}
|
|
931
|
+
if (message.runAs !== "") {
|
|
932
|
+
obj.runAs = message.runAs;
|
|
933
|
+
}
|
|
934
|
+
if (message.contract !== "") {
|
|
935
|
+
obj.contract = message.contract;
|
|
936
|
+
}
|
|
937
|
+
if (message.msg.length !== 0) {
|
|
938
|
+
obj.msg = base64FromBytes(message.msg);
|
|
939
|
+
}
|
|
940
|
+
if (message.funds?.length) {
|
|
941
|
+
obj.funds = message.funds.map((e) => coin_1.Coin.toJSON(e));
|
|
828
942
|
}
|
|
829
943
|
return obj;
|
|
830
944
|
},
|
|
831
945
|
create(base) {
|
|
832
|
-
return exports.ExecuteContractProposal.fromPartial(base
|
|
946
|
+
return exports.ExecuteContractProposal.fromPartial(base ?? {});
|
|
833
947
|
},
|
|
834
948
|
fromPartial(object) {
|
|
835
|
-
var _a, _b, _c, _d, _e, _f;
|
|
836
949
|
const message = createBaseExecuteContractProposal();
|
|
837
|
-
message.title =
|
|
838
|
-
message.description =
|
|
839
|
-
message.runAs =
|
|
840
|
-
message.contract =
|
|
841
|
-
message.msg =
|
|
842
|
-
message.funds =
|
|
950
|
+
message.title = object.title ?? "";
|
|
951
|
+
message.description = object.description ?? "";
|
|
952
|
+
message.runAs = object.runAs ?? "";
|
|
953
|
+
message.contract = object.contract ?? "";
|
|
954
|
+
message.msg = object.msg ?? new Uint8Array(0);
|
|
955
|
+
message.funds = object.funds?.map((e) => coin_1.Coin.fromPartial(e)) || [];
|
|
843
956
|
return message;
|
|
844
957
|
},
|
|
845
958
|
};
|
|
@@ -847,7 +960,7 @@ function createBaseUpdateAdminProposal() {
|
|
|
847
960
|
return { title: "", description: "", newAdmin: "", contract: "" };
|
|
848
961
|
}
|
|
849
962
|
exports.UpdateAdminProposal = {
|
|
850
|
-
encode(message, writer =
|
|
963
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
851
964
|
if (message.title !== "") {
|
|
852
965
|
writer.uint32(10).string(message.title);
|
|
853
966
|
}
|
|
@@ -863,71 +976,87 @@ exports.UpdateAdminProposal = {
|
|
|
863
976
|
return writer;
|
|
864
977
|
},
|
|
865
978
|
decode(input, length) {
|
|
866
|
-
const reader = input instanceof
|
|
979
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
867
980
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
868
981
|
const message = createBaseUpdateAdminProposal();
|
|
869
982
|
while (reader.pos < end) {
|
|
870
983
|
const tag = reader.uint32();
|
|
871
984
|
switch (tag >>> 3) {
|
|
872
|
-
case 1:
|
|
985
|
+
case 1: {
|
|
873
986
|
if (tag !== 10) {
|
|
874
987
|
break;
|
|
875
988
|
}
|
|
876
989
|
message.title = reader.string();
|
|
877
990
|
continue;
|
|
878
|
-
|
|
991
|
+
}
|
|
992
|
+
case 2: {
|
|
879
993
|
if (tag !== 18) {
|
|
880
994
|
break;
|
|
881
995
|
}
|
|
882
996
|
message.description = reader.string();
|
|
883
997
|
continue;
|
|
884
|
-
|
|
998
|
+
}
|
|
999
|
+
case 3: {
|
|
885
1000
|
if (tag !== 26) {
|
|
886
1001
|
break;
|
|
887
1002
|
}
|
|
888
1003
|
message.newAdmin = reader.string();
|
|
889
1004
|
continue;
|
|
890
|
-
|
|
1005
|
+
}
|
|
1006
|
+
case 4: {
|
|
891
1007
|
if (tag !== 34) {
|
|
892
1008
|
break;
|
|
893
1009
|
}
|
|
894
1010
|
message.contract = reader.string();
|
|
895
1011
|
continue;
|
|
1012
|
+
}
|
|
896
1013
|
}
|
|
897
1014
|
if ((tag & 7) === 4 || tag === 0) {
|
|
898
1015
|
break;
|
|
899
1016
|
}
|
|
900
|
-
reader.
|
|
1017
|
+
reader.skip(tag & 7);
|
|
901
1018
|
}
|
|
902
1019
|
return message;
|
|
903
1020
|
},
|
|
904
1021
|
fromJSON(object) {
|
|
905
1022
|
return {
|
|
906
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
907
|
-
description: isSet(object.description)
|
|
908
|
-
|
|
909
|
-
|
|
1023
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
1024
|
+
description: isSet(object.description)
|
|
1025
|
+
? globalThis.String(object.description)
|
|
1026
|
+
: "",
|
|
1027
|
+
newAdmin: isSet(object.newAdmin)
|
|
1028
|
+
? globalThis.String(object.newAdmin)
|
|
1029
|
+
: "",
|
|
1030
|
+
contract: isSet(object.contract)
|
|
1031
|
+
? globalThis.String(object.contract)
|
|
1032
|
+
: "",
|
|
910
1033
|
};
|
|
911
1034
|
},
|
|
912
1035
|
toJSON(message) {
|
|
913
1036
|
const obj = {};
|
|
914
|
-
message.title !==
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
message.
|
|
918
|
-
|
|
1037
|
+
if (message.title !== "") {
|
|
1038
|
+
obj.title = message.title;
|
|
1039
|
+
}
|
|
1040
|
+
if (message.description !== "") {
|
|
1041
|
+
obj.description = message.description;
|
|
1042
|
+
}
|
|
1043
|
+
if (message.newAdmin !== "") {
|
|
1044
|
+
obj.newAdmin = message.newAdmin;
|
|
1045
|
+
}
|
|
1046
|
+
if (message.contract !== "") {
|
|
1047
|
+
obj.contract = message.contract;
|
|
1048
|
+
}
|
|
919
1049
|
return obj;
|
|
920
1050
|
},
|
|
921
1051
|
create(base) {
|
|
922
|
-
return exports.UpdateAdminProposal.fromPartial(base
|
|
1052
|
+
return exports.UpdateAdminProposal.fromPartial(base ?? {});
|
|
923
1053
|
},
|
|
924
1054
|
fromPartial(object) {
|
|
925
|
-
var _a, _b, _c, _d;
|
|
926
1055
|
const message = createBaseUpdateAdminProposal();
|
|
927
|
-
message.title =
|
|
928
|
-
message.description =
|
|
929
|
-
message.newAdmin =
|
|
930
|
-
message.contract =
|
|
1056
|
+
message.title = object.title ?? "";
|
|
1057
|
+
message.description = object.description ?? "";
|
|
1058
|
+
message.newAdmin = object.newAdmin ?? "";
|
|
1059
|
+
message.contract = object.contract ?? "";
|
|
931
1060
|
return message;
|
|
932
1061
|
},
|
|
933
1062
|
};
|
|
@@ -935,7 +1064,7 @@ function createBaseClearAdminProposal() {
|
|
|
935
1064
|
return { title: "", description: "", contract: "" };
|
|
936
1065
|
}
|
|
937
1066
|
exports.ClearAdminProposal = {
|
|
938
|
-
encode(message, writer =
|
|
1067
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
939
1068
|
if (message.title !== "") {
|
|
940
1069
|
writer.uint32(10).string(message.title);
|
|
941
1070
|
}
|
|
@@ -948,62 +1077,73 @@ exports.ClearAdminProposal = {
|
|
|
948
1077
|
return writer;
|
|
949
1078
|
},
|
|
950
1079
|
decode(input, length) {
|
|
951
|
-
const reader = input instanceof
|
|
1080
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
952
1081
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
953
1082
|
const message = createBaseClearAdminProposal();
|
|
954
1083
|
while (reader.pos < end) {
|
|
955
1084
|
const tag = reader.uint32();
|
|
956
1085
|
switch (tag >>> 3) {
|
|
957
|
-
case 1:
|
|
1086
|
+
case 1: {
|
|
958
1087
|
if (tag !== 10) {
|
|
959
1088
|
break;
|
|
960
1089
|
}
|
|
961
1090
|
message.title = reader.string();
|
|
962
1091
|
continue;
|
|
963
|
-
|
|
1092
|
+
}
|
|
1093
|
+
case 2: {
|
|
964
1094
|
if (tag !== 18) {
|
|
965
1095
|
break;
|
|
966
1096
|
}
|
|
967
1097
|
message.description = reader.string();
|
|
968
1098
|
continue;
|
|
969
|
-
|
|
1099
|
+
}
|
|
1100
|
+
case 3: {
|
|
970
1101
|
if (tag !== 26) {
|
|
971
1102
|
break;
|
|
972
1103
|
}
|
|
973
1104
|
message.contract = reader.string();
|
|
974
1105
|
continue;
|
|
1106
|
+
}
|
|
975
1107
|
}
|
|
976
1108
|
if ((tag & 7) === 4 || tag === 0) {
|
|
977
1109
|
break;
|
|
978
1110
|
}
|
|
979
|
-
reader.
|
|
1111
|
+
reader.skip(tag & 7);
|
|
980
1112
|
}
|
|
981
1113
|
return message;
|
|
982
1114
|
},
|
|
983
1115
|
fromJSON(object) {
|
|
984
1116
|
return {
|
|
985
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
986
|
-
description: isSet(object.description)
|
|
987
|
-
|
|
1117
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
1118
|
+
description: isSet(object.description)
|
|
1119
|
+
? globalThis.String(object.description)
|
|
1120
|
+
: "",
|
|
1121
|
+
contract: isSet(object.contract)
|
|
1122
|
+
? globalThis.String(object.contract)
|
|
1123
|
+
: "",
|
|
988
1124
|
};
|
|
989
1125
|
},
|
|
990
1126
|
toJSON(message) {
|
|
991
1127
|
const obj = {};
|
|
992
|
-
message.title !==
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
message.
|
|
1128
|
+
if (message.title !== "") {
|
|
1129
|
+
obj.title = message.title;
|
|
1130
|
+
}
|
|
1131
|
+
if (message.description !== "") {
|
|
1132
|
+
obj.description = message.description;
|
|
1133
|
+
}
|
|
1134
|
+
if (message.contract !== "") {
|
|
1135
|
+
obj.contract = message.contract;
|
|
1136
|
+
}
|
|
996
1137
|
return obj;
|
|
997
1138
|
},
|
|
998
1139
|
create(base) {
|
|
999
|
-
return exports.ClearAdminProposal.fromPartial(base
|
|
1140
|
+
return exports.ClearAdminProposal.fromPartial(base ?? {});
|
|
1000
1141
|
},
|
|
1001
1142
|
fromPartial(object) {
|
|
1002
|
-
var _a, _b, _c;
|
|
1003
1143
|
const message = createBaseClearAdminProposal();
|
|
1004
|
-
message.title =
|
|
1005
|
-
message.description =
|
|
1006
|
-
message.contract =
|
|
1144
|
+
message.title = object.title ?? "";
|
|
1145
|
+
message.description = object.description ?? "";
|
|
1146
|
+
message.contract = object.contract ?? "";
|
|
1007
1147
|
return message;
|
|
1008
1148
|
},
|
|
1009
1149
|
};
|
|
@@ -1011,7 +1151,7 @@ function createBasePinCodesProposal() {
|
|
|
1011
1151
|
return { title: "", description: "", codeIds: [] };
|
|
1012
1152
|
}
|
|
1013
1153
|
exports.PinCodesProposal = {
|
|
1014
|
-
encode(message, writer =
|
|
1154
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
1015
1155
|
if (message.title !== "") {
|
|
1016
1156
|
writer.uint32(10).string(message.title);
|
|
1017
1157
|
}
|
|
@@ -1026,25 +1166,27 @@ exports.PinCodesProposal = {
|
|
|
1026
1166
|
return writer;
|
|
1027
1167
|
},
|
|
1028
1168
|
decode(input, length) {
|
|
1029
|
-
const reader = input instanceof
|
|
1169
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1030
1170
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1031
1171
|
const message = createBasePinCodesProposal();
|
|
1032
1172
|
while (reader.pos < end) {
|
|
1033
1173
|
const tag = reader.uint32();
|
|
1034
1174
|
switch (tag >>> 3) {
|
|
1035
|
-
case 1:
|
|
1175
|
+
case 1: {
|
|
1036
1176
|
if (tag !== 10) {
|
|
1037
1177
|
break;
|
|
1038
1178
|
}
|
|
1039
1179
|
message.title = reader.string();
|
|
1040
1180
|
continue;
|
|
1041
|
-
|
|
1181
|
+
}
|
|
1182
|
+
case 2: {
|
|
1042
1183
|
if (tag !== 18) {
|
|
1043
1184
|
break;
|
|
1044
1185
|
}
|
|
1045
1186
|
message.description = reader.string();
|
|
1046
1187
|
continue;
|
|
1047
|
-
|
|
1188
|
+
}
|
|
1189
|
+
case 3: {
|
|
1048
1190
|
if (tag === 24) {
|
|
1049
1191
|
message.codeIds.push(longToNumber(reader.uint64()));
|
|
1050
1192
|
continue;
|
|
@@ -1057,45 +1199,47 @@ exports.PinCodesProposal = {
|
|
|
1057
1199
|
continue;
|
|
1058
1200
|
}
|
|
1059
1201
|
break;
|
|
1202
|
+
}
|
|
1060
1203
|
}
|
|
1061
1204
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1062
1205
|
break;
|
|
1063
1206
|
}
|
|
1064
|
-
reader.
|
|
1207
|
+
reader.skip(tag & 7);
|
|
1065
1208
|
}
|
|
1066
1209
|
return message;
|
|
1067
1210
|
},
|
|
1068
1211
|
fromJSON(object) {
|
|
1069
1212
|
return {
|
|
1070
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
1071
|
-
description: isSet(object.description)
|
|
1072
|
-
|
|
1073
|
-
|
|
1213
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
1214
|
+
description: isSet(object.description)
|
|
1215
|
+
? globalThis.String(object.description)
|
|
1216
|
+
: "",
|
|
1217
|
+
codeIds: globalThis.Array.isArray(object?.codeIds)
|
|
1218
|
+
? object.codeIds.map((e) => globalThis.Number(e))
|
|
1074
1219
|
: [],
|
|
1075
1220
|
};
|
|
1076
1221
|
},
|
|
1077
1222
|
toJSON(message) {
|
|
1078
1223
|
const obj = {};
|
|
1079
|
-
message.title !==
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
if (message.
|
|
1083
|
-
obj.
|
|
1224
|
+
if (message.title !== "") {
|
|
1225
|
+
obj.title = message.title;
|
|
1226
|
+
}
|
|
1227
|
+
if (message.description !== "") {
|
|
1228
|
+
obj.description = message.description;
|
|
1084
1229
|
}
|
|
1085
|
-
|
|
1086
|
-
obj.codeIds =
|
|
1230
|
+
if (message.codeIds?.length) {
|
|
1231
|
+
obj.codeIds = message.codeIds.map((e) => Math.round(e));
|
|
1087
1232
|
}
|
|
1088
1233
|
return obj;
|
|
1089
1234
|
},
|
|
1090
1235
|
create(base) {
|
|
1091
|
-
return exports.PinCodesProposal.fromPartial(base
|
|
1236
|
+
return exports.PinCodesProposal.fromPartial(base ?? {});
|
|
1092
1237
|
},
|
|
1093
1238
|
fromPartial(object) {
|
|
1094
|
-
var _a, _b, _c;
|
|
1095
1239
|
const message = createBasePinCodesProposal();
|
|
1096
|
-
message.title =
|
|
1097
|
-
message.description =
|
|
1098
|
-
message.codeIds =
|
|
1240
|
+
message.title = object.title ?? "";
|
|
1241
|
+
message.description = object.description ?? "";
|
|
1242
|
+
message.codeIds = object.codeIds?.map((e) => e) || [];
|
|
1099
1243
|
return message;
|
|
1100
1244
|
},
|
|
1101
1245
|
};
|
|
@@ -1103,7 +1247,7 @@ function createBaseUnpinCodesProposal() {
|
|
|
1103
1247
|
return { title: "", description: "", codeIds: [] };
|
|
1104
1248
|
}
|
|
1105
1249
|
exports.UnpinCodesProposal = {
|
|
1106
|
-
encode(message, writer =
|
|
1250
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
1107
1251
|
if (message.title !== "") {
|
|
1108
1252
|
writer.uint32(10).string(message.title);
|
|
1109
1253
|
}
|
|
@@ -1118,25 +1262,27 @@ exports.UnpinCodesProposal = {
|
|
|
1118
1262
|
return writer;
|
|
1119
1263
|
},
|
|
1120
1264
|
decode(input, length) {
|
|
1121
|
-
const reader = input instanceof
|
|
1265
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1122
1266
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1123
1267
|
const message = createBaseUnpinCodesProposal();
|
|
1124
1268
|
while (reader.pos < end) {
|
|
1125
1269
|
const tag = reader.uint32();
|
|
1126
1270
|
switch (tag >>> 3) {
|
|
1127
|
-
case 1:
|
|
1271
|
+
case 1: {
|
|
1128
1272
|
if (tag !== 10) {
|
|
1129
1273
|
break;
|
|
1130
1274
|
}
|
|
1131
1275
|
message.title = reader.string();
|
|
1132
1276
|
continue;
|
|
1133
|
-
|
|
1277
|
+
}
|
|
1278
|
+
case 2: {
|
|
1134
1279
|
if (tag !== 18) {
|
|
1135
1280
|
break;
|
|
1136
1281
|
}
|
|
1137
1282
|
message.description = reader.string();
|
|
1138
1283
|
continue;
|
|
1139
|
-
|
|
1284
|
+
}
|
|
1285
|
+
case 3: {
|
|
1140
1286
|
if (tag === 24) {
|
|
1141
1287
|
message.codeIds.push(longToNumber(reader.uint64()));
|
|
1142
1288
|
continue;
|
|
@@ -1149,45 +1295,47 @@ exports.UnpinCodesProposal = {
|
|
|
1149
1295
|
continue;
|
|
1150
1296
|
}
|
|
1151
1297
|
break;
|
|
1298
|
+
}
|
|
1152
1299
|
}
|
|
1153
1300
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1154
1301
|
break;
|
|
1155
1302
|
}
|
|
1156
|
-
reader.
|
|
1303
|
+
reader.skip(tag & 7);
|
|
1157
1304
|
}
|
|
1158
1305
|
return message;
|
|
1159
1306
|
},
|
|
1160
1307
|
fromJSON(object) {
|
|
1161
1308
|
return {
|
|
1162
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
1163
|
-
description: isSet(object.description)
|
|
1164
|
-
|
|
1165
|
-
|
|
1309
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
1310
|
+
description: isSet(object.description)
|
|
1311
|
+
? globalThis.String(object.description)
|
|
1312
|
+
: "",
|
|
1313
|
+
codeIds: globalThis.Array.isArray(object?.codeIds)
|
|
1314
|
+
? object.codeIds.map((e) => globalThis.Number(e))
|
|
1166
1315
|
: [],
|
|
1167
1316
|
};
|
|
1168
1317
|
},
|
|
1169
1318
|
toJSON(message) {
|
|
1170
1319
|
const obj = {};
|
|
1171
|
-
message.title !==
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
if (message.
|
|
1175
|
-
obj.
|
|
1320
|
+
if (message.title !== "") {
|
|
1321
|
+
obj.title = message.title;
|
|
1322
|
+
}
|
|
1323
|
+
if (message.description !== "") {
|
|
1324
|
+
obj.description = message.description;
|
|
1176
1325
|
}
|
|
1177
|
-
|
|
1178
|
-
obj.codeIds =
|
|
1326
|
+
if (message.codeIds?.length) {
|
|
1327
|
+
obj.codeIds = message.codeIds.map((e) => Math.round(e));
|
|
1179
1328
|
}
|
|
1180
1329
|
return obj;
|
|
1181
1330
|
},
|
|
1182
1331
|
create(base) {
|
|
1183
|
-
return exports.UnpinCodesProposal.fromPartial(base
|
|
1332
|
+
return exports.UnpinCodesProposal.fromPartial(base ?? {});
|
|
1184
1333
|
},
|
|
1185
1334
|
fromPartial(object) {
|
|
1186
|
-
var _a, _b, _c;
|
|
1187
1335
|
const message = createBaseUnpinCodesProposal();
|
|
1188
|
-
message.title =
|
|
1189
|
-
message.description =
|
|
1190
|
-
message.codeIds =
|
|
1336
|
+
message.title = object.title ?? "";
|
|
1337
|
+
message.description = object.description ?? "";
|
|
1338
|
+
message.codeIds = object.codeIds?.map((e) => e) || [];
|
|
1191
1339
|
return message;
|
|
1192
1340
|
},
|
|
1193
1341
|
};
|
|
@@ -1195,7 +1343,7 @@ function createBaseAccessConfigUpdate() {
|
|
|
1195
1343
|
return { codeId: 0, instantiatePermission: undefined };
|
|
1196
1344
|
}
|
|
1197
1345
|
exports.AccessConfigUpdate = {
|
|
1198
|
-
encode(message, writer =
|
|
1346
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
1199
1347
|
if (message.codeId !== 0) {
|
|
1200
1348
|
writer.uint32(8).uint64(message.codeId);
|
|
1201
1349
|
}
|
|
@@ -1205,35 +1353,37 @@ exports.AccessConfigUpdate = {
|
|
|
1205
1353
|
return writer;
|
|
1206
1354
|
},
|
|
1207
1355
|
decode(input, length) {
|
|
1208
|
-
const reader = input instanceof
|
|
1356
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1209
1357
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1210
1358
|
const message = createBaseAccessConfigUpdate();
|
|
1211
1359
|
while (reader.pos < end) {
|
|
1212
1360
|
const tag = reader.uint32();
|
|
1213
1361
|
switch (tag >>> 3) {
|
|
1214
|
-
case 1:
|
|
1362
|
+
case 1: {
|
|
1215
1363
|
if (tag !== 8) {
|
|
1216
1364
|
break;
|
|
1217
1365
|
}
|
|
1218
1366
|
message.codeId = longToNumber(reader.uint64());
|
|
1219
1367
|
continue;
|
|
1220
|
-
|
|
1368
|
+
}
|
|
1369
|
+
case 2: {
|
|
1221
1370
|
if (tag !== 18) {
|
|
1222
1371
|
break;
|
|
1223
1372
|
}
|
|
1224
1373
|
message.instantiatePermission = types_1.AccessConfig.decode(reader, reader.uint32());
|
|
1225
1374
|
continue;
|
|
1375
|
+
}
|
|
1226
1376
|
}
|
|
1227
1377
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1228
1378
|
break;
|
|
1229
1379
|
}
|
|
1230
|
-
reader.
|
|
1380
|
+
reader.skip(tag & 7);
|
|
1231
1381
|
}
|
|
1232
1382
|
return message;
|
|
1233
1383
|
},
|
|
1234
1384
|
fromJSON(object) {
|
|
1235
1385
|
return {
|
|
1236
|
-
codeId: isSet(object.codeId) ? Number(object.codeId) : 0,
|
|
1386
|
+
codeId: isSet(object.codeId) ? globalThis.Number(object.codeId) : 0,
|
|
1237
1387
|
instantiatePermission: isSet(object.instantiatePermission)
|
|
1238
1388
|
? types_1.AccessConfig.fromJSON(object.instantiatePermission)
|
|
1239
1389
|
: undefined,
|
|
@@ -1241,20 +1391,20 @@ exports.AccessConfigUpdate = {
|
|
|
1241
1391
|
},
|
|
1242
1392
|
toJSON(message) {
|
|
1243
1393
|
const obj = {};
|
|
1244
|
-
message.codeId !==
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1394
|
+
if (message.codeId !== 0) {
|
|
1395
|
+
obj.codeId = Math.round(message.codeId);
|
|
1396
|
+
}
|
|
1397
|
+
if (message.instantiatePermission !== undefined) {
|
|
1398
|
+
obj.instantiatePermission = types_1.AccessConfig.toJSON(message.instantiatePermission);
|
|
1399
|
+
}
|
|
1249
1400
|
return obj;
|
|
1250
1401
|
},
|
|
1251
1402
|
create(base) {
|
|
1252
|
-
return exports.AccessConfigUpdate.fromPartial(base
|
|
1403
|
+
return exports.AccessConfigUpdate.fromPartial(base ?? {});
|
|
1253
1404
|
},
|
|
1254
1405
|
fromPartial(object) {
|
|
1255
|
-
var _a;
|
|
1256
1406
|
const message = createBaseAccessConfigUpdate();
|
|
1257
|
-
message.codeId =
|
|
1407
|
+
message.codeId = object.codeId ?? 0;
|
|
1258
1408
|
message.instantiatePermission =
|
|
1259
1409
|
object.instantiatePermission !== undefined &&
|
|
1260
1410
|
object.instantiatePermission !== null
|
|
@@ -1267,7 +1417,7 @@ function createBaseUpdateInstantiateConfigProposal() {
|
|
|
1267
1417
|
return { title: "", description: "", accessConfigUpdates: [] };
|
|
1268
1418
|
}
|
|
1269
1419
|
exports.UpdateInstantiateConfigProposal = {
|
|
1270
|
-
encode(message, writer =
|
|
1420
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
1271
1421
|
if (message.title !== "") {
|
|
1272
1422
|
writer.uint32(10).string(message.title);
|
|
1273
1423
|
}
|
|
@@ -1280,70 +1430,74 @@ exports.UpdateInstantiateConfigProposal = {
|
|
|
1280
1430
|
return writer;
|
|
1281
1431
|
},
|
|
1282
1432
|
decode(input, length) {
|
|
1283
|
-
const reader = input instanceof
|
|
1433
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1284
1434
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1285
1435
|
const message = createBaseUpdateInstantiateConfigProposal();
|
|
1286
1436
|
while (reader.pos < end) {
|
|
1287
1437
|
const tag = reader.uint32();
|
|
1288
1438
|
switch (tag >>> 3) {
|
|
1289
|
-
case 1:
|
|
1439
|
+
case 1: {
|
|
1290
1440
|
if (tag !== 10) {
|
|
1291
1441
|
break;
|
|
1292
1442
|
}
|
|
1293
1443
|
message.title = reader.string();
|
|
1294
1444
|
continue;
|
|
1295
|
-
|
|
1445
|
+
}
|
|
1446
|
+
case 2: {
|
|
1296
1447
|
if (tag !== 18) {
|
|
1297
1448
|
break;
|
|
1298
1449
|
}
|
|
1299
1450
|
message.description = reader.string();
|
|
1300
1451
|
continue;
|
|
1301
|
-
|
|
1452
|
+
}
|
|
1453
|
+
case 3: {
|
|
1302
1454
|
if (tag !== 26) {
|
|
1303
1455
|
break;
|
|
1304
1456
|
}
|
|
1305
1457
|
message.accessConfigUpdates.push(exports.AccessConfigUpdate.decode(reader, reader.uint32()));
|
|
1306
1458
|
continue;
|
|
1459
|
+
}
|
|
1307
1460
|
}
|
|
1308
1461
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1309
1462
|
break;
|
|
1310
1463
|
}
|
|
1311
|
-
reader.
|
|
1464
|
+
reader.skip(tag & 7);
|
|
1312
1465
|
}
|
|
1313
1466
|
return message;
|
|
1314
1467
|
},
|
|
1315
1468
|
fromJSON(object) {
|
|
1316
1469
|
return {
|
|
1317
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
1318
|
-
description: isSet(object.description)
|
|
1319
|
-
|
|
1470
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
1471
|
+
description: isSet(object.description)
|
|
1472
|
+
? globalThis.String(object.description)
|
|
1473
|
+
: "",
|
|
1474
|
+
accessConfigUpdates: globalThis.Array.isArray(object?.accessConfigUpdates)
|
|
1320
1475
|
? object.accessConfigUpdates.map((e) => exports.AccessConfigUpdate.fromJSON(e))
|
|
1321
1476
|
: [],
|
|
1322
1477
|
};
|
|
1323
1478
|
},
|
|
1324
1479
|
toJSON(message) {
|
|
1325
1480
|
const obj = {};
|
|
1326
|
-
message.title !==
|
|
1327
|
-
|
|
1328
|
-
(obj.description = message.description);
|
|
1329
|
-
if (message.accessConfigUpdates) {
|
|
1330
|
-
obj.accessConfigUpdates = message.accessConfigUpdates.map((e) => e ? exports.AccessConfigUpdate.toJSON(e) : undefined);
|
|
1481
|
+
if (message.title !== "") {
|
|
1482
|
+
obj.title = message.title;
|
|
1331
1483
|
}
|
|
1332
|
-
|
|
1333
|
-
obj.
|
|
1484
|
+
if (message.description !== "") {
|
|
1485
|
+
obj.description = message.description;
|
|
1486
|
+
}
|
|
1487
|
+
if (message.accessConfigUpdates?.length) {
|
|
1488
|
+
obj.accessConfigUpdates = message.accessConfigUpdates.map((e) => exports.AccessConfigUpdate.toJSON(e));
|
|
1334
1489
|
}
|
|
1335
1490
|
return obj;
|
|
1336
1491
|
},
|
|
1337
1492
|
create(base) {
|
|
1338
|
-
return exports.UpdateInstantiateConfigProposal.fromPartial(base
|
|
1493
|
+
return exports.UpdateInstantiateConfigProposal.fromPartial(base ?? {});
|
|
1339
1494
|
},
|
|
1340
1495
|
fromPartial(object) {
|
|
1341
|
-
var _a, _b, _c;
|
|
1342
1496
|
const message = createBaseUpdateInstantiateConfigProposal();
|
|
1343
|
-
message.title =
|
|
1344
|
-
message.description =
|
|
1497
|
+
message.title = object.title ?? "";
|
|
1498
|
+
message.description = object.description ?? "";
|
|
1345
1499
|
message.accessConfigUpdates =
|
|
1346
|
-
|
|
1500
|
+
object.accessConfigUpdates?.map((e) => exports.AccessConfigUpdate.fromPartial(e)) || [];
|
|
1347
1501
|
return message;
|
|
1348
1502
|
},
|
|
1349
1503
|
};
|
|
@@ -1352,20 +1506,20 @@ function createBaseStoreAndInstantiateContractProposal() {
|
|
|
1352
1506
|
title: "",
|
|
1353
1507
|
description: "",
|
|
1354
1508
|
runAs: "",
|
|
1355
|
-
wasmByteCode: new Uint8Array(),
|
|
1509
|
+
wasmByteCode: new Uint8Array(0),
|
|
1356
1510
|
instantiatePermission: undefined,
|
|
1357
1511
|
unpinCode: false,
|
|
1358
1512
|
admin: "",
|
|
1359
1513
|
label: "",
|
|
1360
|
-
msg: new Uint8Array(),
|
|
1514
|
+
msg: new Uint8Array(0),
|
|
1361
1515
|
funds: [],
|
|
1362
1516
|
source: "",
|
|
1363
1517
|
builder: "",
|
|
1364
|
-
codeHash: new Uint8Array(),
|
|
1518
|
+
codeHash: new Uint8Array(0),
|
|
1365
1519
|
};
|
|
1366
1520
|
}
|
|
1367
1521
|
exports.StoreAndInstantiateContractProposal = {
|
|
1368
|
-
encode(message, writer =
|
|
1522
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
1369
1523
|
if (message.title !== "") {
|
|
1370
1524
|
writer.uint32(10).string(message.title);
|
|
1371
1525
|
}
|
|
@@ -1381,7 +1535,7 @@ exports.StoreAndInstantiateContractProposal = {
|
|
|
1381
1535
|
if (message.instantiatePermission !== undefined) {
|
|
1382
1536
|
types_1.AccessConfig.encode(message.instantiatePermission, writer.uint32(42).fork()).ldelim();
|
|
1383
1537
|
}
|
|
1384
|
-
if (message.unpinCode
|
|
1538
|
+
if (message.unpinCode !== false) {
|
|
1385
1539
|
writer.uint32(48).bool(message.unpinCode);
|
|
1386
1540
|
}
|
|
1387
1541
|
if (message.admin !== "") {
|
|
@@ -1408,201 +1562,216 @@ exports.StoreAndInstantiateContractProposal = {
|
|
|
1408
1562
|
return writer;
|
|
1409
1563
|
},
|
|
1410
1564
|
decode(input, length) {
|
|
1411
|
-
const reader = input instanceof
|
|
1565
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1412
1566
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1413
1567
|
const message = createBaseStoreAndInstantiateContractProposal();
|
|
1414
1568
|
while (reader.pos < end) {
|
|
1415
1569
|
const tag = reader.uint32();
|
|
1416
1570
|
switch (tag >>> 3) {
|
|
1417
|
-
case 1:
|
|
1571
|
+
case 1: {
|
|
1418
1572
|
if (tag !== 10) {
|
|
1419
1573
|
break;
|
|
1420
1574
|
}
|
|
1421
1575
|
message.title = reader.string();
|
|
1422
1576
|
continue;
|
|
1423
|
-
|
|
1577
|
+
}
|
|
1578
|
+
case 2: {
|
|
1424
1579
|
if (tag !== 18) {
|
|
1425
1580
|
break;
|
|
1426
1581
|
}
|
|
1427
1582
|
message.description = reader.string();
|
|
1428
1583
|
continue;
|
|
1429
|
-
|
|
1584
|
+
}
|
|
1585
|
+
case 3: {
|
|
1430
1586
|
if (tag !== 26) {
|
|
1431
1587
|
break;
|
|
1432
1588
|
}
|
|
1433
1589
|
message.runAs = reader.string();
|
|
1434
1590
|
continue;
|
|
1435
|
-
|
|
1591
|
+
}
|
|
1592
|
+
case 4: {
|
|
1436
1593
|
if (tag !== 34) {
|
|
1437
1594
|
break;
|
|
1438
1595
|
}
|
|
1439
1596
|
message.wasmByteCode = reader.bytes();
|
|
1440
1597
|
continue;
|
|
1441
|
-
|
|
1598
|
+
}
|
|
1599
|
+
case 5: {
|
|
1442
1600
|
if (tag !== 42) {
|
|
1443
1601
|
break;
|
|
1444
1602
|
}
|
|
1445
1603
|
message.instantiatePermission = types_1.AccessConfig.decode(reader, reader.uint32());
|
|
1446
1604
|
continue;
|
|
1447
|
-
|
|
1605
|
+
}
|
|
1606
|
+
case 6: {
|
|
1448
1607
|
if (tag !== 48) {
|
|
1449
1608
|
break;
|
|
1450
1609
|
}
|
|
1451
1610
|
message.unpinCode = reader.bool();
|
|
1452
1611
|
continue;
|
|
1453
|
-
|
|
1612
|
+
}
|
|
1613
|
+
case 7: {
|
|
1454
1614
|
if (tag !== 58) {
|
|
1455
1615
|
break;
|
|
1456
1616
|
}
|
|
1457
1617
|
message.admin = reader.string();
|
|
1458
1618
|
continue;
|
|
1459
|
-
|
|
1619
|
+
}
|
|
1620
|
+
case 8: {
|
|
1460
1621
|
if (tag !== 66) {
|
|
1461
1622
|
break;
|
|
1462
1623
|
}
|
|
1463
1624
|
message.label = reader.string();
|
|
1464
1625
|
continue;
|
|
1465
|
-
|
|
1626
|
+
}
|
|
1627
|
+
case 9: {
|
|
1466
1628
|
if (tag !== 74) {
|
|
1467
1629
|
break;
|
|
1468
1630
|
}
|
|
1469
1631
|
message.msg = reader.bytes();
|
|
1470
1632
|
continue;
|
|
1471
|
-
|
|
1633
|
+
}
|
|
1634
|
+
case 10: {
|
|
1472
1635
|
if (tag !== 82) {
|
|
1473
1636
|
break;
|
|
1474
1637
|
}
|
|
1475
1638
|
message.funds.push(coin_1.Coin.decode(reader, reader.uint32()));
|
|
1476
1639
|
continue;
|
|
1477
|
-
|
|
1640
|
+
}
|
|
1641
|
+
case 11: {
|
|
1478
1642
|
if (tag !== 90) {
|
|
1479
1643
|
break;
|
|
1480
1644
|
}
|
|
1481
1645
|
message.source = reader.string();
|
|
1482
1646
|
continue;
|
|
1483
|
-
|
|
1647
|
+
}
|
|
1648
|
+
case 12: {
|
|
1484
1649
|
if (tag !== 98) {
|
|
1485
1650
|
break;
|
|
1486
1651
|
}
|
|
1487
1652
|
message.builder = reader.string();
|
|
1488
1653
|
continue;
|
|
1489
|
-
|
|
1654
|
+
}
|
|
1655
|
+
case 13: {
|
|
1490
1656
|
if (tag !== 106) {
|
|
1491
1657
|
break;
|
|
1492
1658
|
}
|
|
1493
1659
|
message.codeHash = reader.bytes();
|
|
1494
1660
|
continue;
|
|
1661
|
+
}
|
|
1495
1662
|
}
|
|
1496
1663
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1497
1664
|
break;
|
|
1498
1665
|
}
|
|
1499
|
-
reader.
|
|
1666
|
+
reader.skip(tag & 7);
|
|
1500
1667
|
}
|
|
1501
1668
|
return message;
|
|
1502
1669
|
},
|
|
1503
1670
|
fromJSON(object) {
|
|
1504
1671
|
return {
|
|
1505
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
1506
|
-
description: isSet(object.description)
|
|
1507
|
-
|
|
1672
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
1673
|
+
description: isSet(object.description)
|
|
1674
|
+
? globalThis.String(object.description)
|
|
1675
|
+
: "",
|
|
1676
|
+
runAs: isSet(object.runAs) ? globalThis.String(object.runAs) : "",
|
|
1508
1677
|
wasmByteCode: isSet(object.wasmByteCode)
|
|
1509
1678
|
? bytesFromBase64(object.wasmByteCode)
|
|
1510
|
-
: new Uint8Array(),
|
|
1679
|
+
: new Uint8Array(0),
|
|
1511
1680
|
instantiatePermission: isSet(object.instantiatePermission)
|
|
1512
1681
|
? types_1.AccessConfig.fromJSON(object.instantiatePermission)
|
|
1513
1682
|
: undefined,
|
|
1514
|
-
unpinCode: isSet(object.unpinCode)
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1683
|
+
unpinCode: isSet(object.unpinCode)
|
|
1684
|
+
? globalThis.Boolean(object.unpinCode)
|
|
1685
|
+
: false,
|
|
1686
|
+
admin: isSet(object.admin) ? globalThis.String(object.admin) : "",
|
|
1687
|
+
label: isSet(object.label) ? globalThis.String(object.label) : "",
|
|
1688
|
+
msg: isSet(object.msg)
|
|
1689
|
+
? bytesFromBase64(object.msg)
|
|
1690
|
+
: new Uint8Array(0),
|
|
1691
|
+
funds: globalThis.Array.isArray(object?.funds)
|
|
1519
1692
|
? object.funds.map((e) => coin_1.Coin.fromJSON(e))
|
|
1520
1693
|
: [],
|
|
1521
|
-
source: isSet(object.source) ? String(object.source) : "",
|
|
1522
|
-
builder: isSet(object.builder) ? String(object.builder) : "",
|
|
1694
|
+
source: isSet(object.source) ? globalThis.String(object.source) : "",
|
|
1695
|
+
builder: isSet(object.builder) ? globalThis.String(object.builder) : "",
|
|
1523
1696
|
codeHash: isSet(object.codeHash)
|
|
1524
1697
|
? bytesFromBase64(object.codeHash)
|
|
1525
|
-
: new Uint8Array(),
|
|
1698
|
+
: new Uint8Array(0),
|
|
1526
1699
|
};
|
|
1527
1700
|
},
|
|
1528
1701
|
toJSON(message) {
|
|
1529
1702
|
const obj = {};
|
|
1530
|
-
message.title !==
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
message.
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
message.
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
message.
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
message.
|
|
1555
|
-
|
|
1556
|
-
|
|
1703
|
+
if (message.title !== "") {
|
|
1704
|
+
obj.title = message.title;
|
|
1705
|
+
}
|
|
1706
|
+
if (message.description !== "") {
|
|
1707
|
+
obj.description = message.description;
|
|
1708
|
+
}
|
|
1709
|
+
if (message.runAs !== "") {
|
|
1710
|
+
obj.runAs = message.runAs;
|
|
1711
|
+
}
|
|
1712
|
+
if (message.wasmByteCode.length !== 0) {
|
|
1713
|
+
obj.wasmByteCode = base64FromBytes(message.wasmByteCode);
|
|
1714
|
+
}
|
|
1715
|
+
if (message.instantiatePermission !== undefined) {
|
|
1716
|
+
obj.instantiatePermission = types_1.AccessConfig.toJSON(message.instantiatePermission);
|
|
1717
|
+
}
|
|
1718
|
+
if (message.unpinCode !== false) {
|
|
1719
|
+
obj.unpinCode = message.unpinCode;
|
|
1720
|
+
}
|
|
1721
|
+
if (message.admin !== "") {
|
|
1722
|
+
obj.admin = message.admin;
|
|
1723
|
+
}
|
|
1724
|
+
if (message.label !== "") {
|
|
1725
|
+
obj.label = message.label;
|
|
1726
|
+
}
|
|
1727
|
+
if (message.msg.length !== 0) {
|
|
1728
|
+
obj.msg = base64FromBytes(message.msg);
|
|
1729
|
+
}
|
|
1730
|
+
if (message.funds?.length) {
|
|
1731
|
+
obj.funds = message.funds.map((e) => coin_1.Coin.toJSON(e));
|
|
1732
|
+
}
|
|
1733
|
+
if (message.source !== "") {
|
|
1734
|
+
obj.source = message.source;
|
|
1735
|
+
}
|
|
1736
|
+
if (message.builder !== "") {
|
|
1737
|
+
obj.builder = message.builder;
|
|
1738
|
+
}
|
|
1739
|
+
if (message.codeHash.length !== 0) {
|
|
1740
|
+
obj.codeHash = base64FromBytes(message.codeHash);
|
|
1741
|
+
}
|
|
1557
1742
|
return obj;
|
|
1558
1743
|
},
|
|
1559
1744
|
create(base) {
|
|
1560
|
-
return exports.StoreAndInstantiateContractProposal.fromPartial(base
|
|
1745
|
+
return exports.StoreAndInstantiateContractProposal.fromPartial(base ?? {});
|
|
1561
1746
|
},
|
|
1562
1747
|
fromPartial(object) {
|
|
1563
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1564
1748
|
const message = createBaseStoreAndInstantiateContractProposal();
|
|
1565
|
-
message.title =
|
|
1566
|
-
message.description =
|
|
1567
|
-
message.runAs =
|
|
1568
|
-
message.wasmByteCode =
|
|
1749
|
+
message.title = object.title ?? "";
|
|
1750
|
+
message.description = object.description ?? "";
|
|
1751
|
+
message.runAs = object.runAs ?? "";
|
|
1752
|
+
message.wasmByteCode = object.wasmByteCode ?? new Uint8Array(0);
|
|
1569
1753
|
message.instantiatePermission =
|
|
1570
1754
|
object.instantiatePermission !== undefined &&
|
|
1571
1755
|
object.instantiatePermission !== null
|
|
1572
1756
|
? types_1.AccessConfig.fromPartial(object.instantiatePermission)
|
|
1573
1757
|
: undefined;
|
|
1574
|
-
message.unpinCode =
|
|
1575
|
-
message.admin =
|
|
1576
|
-
message.label =
|
|
1577
|
-
message.msg =
|
|
1578
|
-
message.funds =
|
|
1579
|
-
message.source =
|
|
1580
|
-
message.builder =
|
|
1581
|
-
message.codeHash =
|
|
1758
|
+
message.unpinCode = object.unpinCode ?? false;
|
|
1759
|
+
message.admin = object.admin ?? "";
|
|
1760
|
+
message.label = object.label ?? "";
|
|
1761
|
+
message.msg = object.msg ?? new Uint8Array(0);
|
|
1762
|
+
message.funds = object.funds?.map((e) => coin_1.Coin.fromPartial(e)) || [];
|
|
1763
|
+
message.source = object.source ?? "";
|
|
1764
|
+
message.builder = object.builder ?? "";
|
|
1765
|
+
message.codeHash = object.codeHash ?? new Uint8Array(0);
|
|
1582
1766
|
return message;
|
|
1583
1767
|
},
|
|
1584
1768
|
};
|
|
1585
|
-
var tsProtoGlobalThis = (() => {
|
|
1586
|
-
if (typeof globalThis !== "undefined") {
|
|
1587
|
-
return globalThis;
|
|
1588
|
-
}
|
|
1589
|
-
if (typeof self !== "undefined") {
|
|
1590
|
-
return self;
|
|
1591
|
-
}
|
|
1592
|
-
if (typeof window !== "undefined") {
|
|
1593
|
-
return window;
|
|
1594
|
-
}
|
|
1595
|
-
if (typeof global !== "undefined") {
|
|
1596
|
-
return global;
|
|
1597
|
-
}
|
|
1598
|
-
throw "Unable to locate global object";
|
|
1599
|
-
})();
|
|
1600
1769
|
function bytesFromBase64(b64) {
|
|
1601
|
-
if (
|
|
1602
|
-
return Uint8Array.from(
|
|
1770
|
+
if (globalThis.Buffer) {
|
|
1771
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
1603
1772
|
}
|
|
1604
1773
|
else {
|
|
1605
|
-
const bin =
|
|
1774
|
+
const bin = globalThis.atob(b64);
|
|
1606
1775
|
const arr = new Uint8Array(bin.length);
|
|
1607
1776
|
for (let i = 0; i < bin.length; ++i) {
|
|
1608
1777
|
arr[i] = bin.charCodeAt(i);
|
|
@@ -1611,26 +1780,26 @@ function bytesFromBase64(b64) {
|
|
|
1611
1780
|
}
|
|
1612
1781
|
}
|
|
1613
1782
|
function base64FromBytes(arr) {
|
|
1614
|
-
if (
|
|
1615
|
-
return
|
|
1783
|
+
if (globalThis.Buffer) {
|
|
1784
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
1616
1785
|
}
|
|
1617
1786
|
else {
|
|
1618
1787
|
const bin = [];
|
|
1619
1788
|
arr.forEach((byte) => {
|
|
1620
|
-
bin.push(String.fromCharCode(byte));
|
|
1789
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
1621
1790
|
});
|
|
1622
|
-
return
|
|
1791
|
+
return globalThis.btoa(bin.join(""));
|
|
1623
1792
|
}
|
|
1624
1793
|
}
|
|
1625
|
-
function longToNumber(
|
|
1626
|
-
|
|
1627
|
-
|
|
1794
|
+
function longToNumber(int64) {
|
|
1795
|
+
const num = globalThis.Number(int64.toString());
|
|
1796
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
1797
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1628
1798
|
}
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
minimal_1.default.configure();
|
|
1799
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
1800
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
1801
|
+
}
|
|
1802
|
+
return num;
|
|
1634
1803
|
}
|
|
1635
1804
|
function isSet(value) {
|
|
1636
1805
|
return value !== null && value !== undefined;
|