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