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