coreum-js 2.16.3 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main/client/index.js +15 -16
- package/dist/main/coreum/asset/ft/v1/authz.d.ts +38 -0
- package/dist/main/coreum/asset/ft/v1/authz.js +122 -0
- package/dist/main/coreum/asset/ft/v1/event.d.ts +52 -28
- package/dist/main/coreum/asset/ft/v1/event.js +744 -138
- package/dist/main/coreum/asset/ft/v1/genesis.d.ts +31 -21
- package/dist/main/coreum/asset/ft/v1/genesis.js +273 -62
- package/dist/main/coreum/asset/ft/v1/params.d.ts +12 -11
- package/dist/main/coreum/asset/ft/v1/params.js +37 -33
- package/dist/main/coreum/asset/ft/v1/query.d.ts +87 -127
- package/dist/main/coreum/asset/ft/v1/query.js +697 -217
- package/dist/main/coreum/asset/ft/v1/token.d.ts +17 -51
- package/dist/main/coreum/asset/ft/v1/token.js +276 -200
- package/dist/main/coreum/asset/ft/v1/tx.d.ts +30 -147
- package/dist/main/coreum/asset/ft/v1/tx.js +502 -386
- package/dist/main/coreum/asset/index.d.ts +2 -3
- package/dist/main/coreum/asset/nft/v1/authz.d.ts +33 -0
- package/dist/main/coreum/asset/nft/v1/authz.js +137 -0
- package/dist/main/coreum/asset/nft/v1/event.d.ts +35 -43
- package/dist/main/coreum/asset/nft/v1/event.js +475 -147
- package/dist/main/coreum/asset/nft/v1/genesis.d.ts +27 -36
- package/dist/main/coreum/asset/nft/v1/genesis.js +311 -119
- package/dist/main/coreum/asset/nft/v1/nft.d.ts +20 -26
- package/dist/main/coreum/asset/nft/v1/nft.js +139 -104
- package/dist/main/coreum/asset/nft/v1/params.d.ts +12 -12
- package/dist/main/coreum/asset/nft/v1/params.js +17 -20
- package/dist/main/coreum/asset/nft/v1/query.d.ts +110 -88
- package/dist/main/coreum/asset/nft/v1/query.js +1079 -185
- package/dist/main/coreum/asset/nft/v1/tx.d.ts +96 -70
- package/dist/main/coreum/asset/nft/v1/tx.js +865 -234
- package/dist/main/coreum/asset/nft/v1/types.d.ts +38 -11
- package/dist/main/coreum/asset/nft/v1/types.js +273 -45
- package/dist/main/coreum/customparams/v1/genesis.d.ts +12 -12
- package/dist/main/coreum/customparams/v1/genesis.js +26 -22
- package/dist/main/coreum/customparams/v1/params.d.ts +11 -11
- package/dist/main/coreum/customparams/v1/params.js +23 -20
- package/dist/main/coreum/customparams/v1/query.d.ts +14 -20
- package/dist/main/coreum/customparams/v1/query.js +35 -29
- package/dist/main/coreum/dex/index.d.ts +1 -0
- package/dist/main/coreum/dex/index.js +12 -0
- package/dist/main/coreum/dex/v1/event.d.ts +73 -0
- package/dist/main/coreum/dex/v1/event.js +470 -0
- package/dist/main/coreum/dex/v1/genesis.d.ts +49 -0
- package/dist/main/coreum/dex/v1/genesis.js +318 -0
- package/dist/main/coreum/dex/v1/order.d.ts +172 -0
- package/dist/main/coreum/dex/v1/order.js +1137 -0
- package/dist/main/coreum/dex/v1/params.d.ts +34 -0
- package/dist/main/coreum/dex/v1/params.js +139 -0
- package/dist/main/coreum/dex/v1/query.d.ts +133 -0
- package/dist/main/coreum/dex/v1/query.js +873 -0
- package/dist/main/coreum/dex/v1/tx.d.ts +102 -0
- package/dist/main/coreum/dex/v1/tx.js +521 -0
- package/dist/main/coreum/extensions/dex.d.ts +12 -0
- package/dist/main/coreum/extensions/dex.js +32 -0
- package/dist/main/coreum/extensions/ft.js +2 -1
- package/dist/main/coreum/extensions/nft.js +2 -1
- package/dist/main/coreum/extensions/nftbeta.js +2 -1
- package/dist/main/coreum/feemodel/v1/genesis.d.ts +13 -13
- package/dist/main/coreum/feemodel/v1/genesis.js +23 -24
- package/dist/main/coreum/feemodel/v1/params.d.ts +14 -21
- package/dist/main/coreum/feemodel/v1/params.js +113 -66
- package/dist/main/coreum/feemodel/v1/query.d.ts +30 -37
- package/dist/main/coreum/feemodel/v1/query.js +196 -43
- package/dist/main/coreum/index.d.ts +46 -0
- package/dist/main/coreum/index.js +58 -1
- package/dist/main/coreum/nft/index.d.ts +1 -2
- package/dist/main/coreum/nft/v1beta1/event.d.ts +23 -27
- package/dist/main/coreum/nft/v1beta1/event.js +103 -77
- package/dist/main/coreum/nft/v1beta1/genesis.d.ts +13 -19
- package/dist/main/coreum/nft/v1beta1/genesis.js +50 -52
- package/dist/main/coreum/nft/v1beta1/nft.d.ts +15 -22
- package/dist/main/coreum/nft/v1beta1/nft.js +111 -81
- package/dist/main/coreum/nft/v1beta1/query.d.ts +54 -124
- package/dist/main/coreum/nft/v1beta1/query.js +259 -223
- package/dist/main/coreum/nft/v1beta1/tx.d.ts +13 -19
- package/dist/main/coreum/nft/v1beta1/tx.js +54 -43
- package/dist/main/cosmos/extensions/bank.js +2 -1
- package/dist/main/cosmos/extensions/distribution.d.ts +4 -4
- package/dist/main/cosmos/extensions/distribution.js +11 -10
- package/dist/main/cosmos/extensions/gov.d.ts +13 -13
- package/dist/main/cosmos/extensions/gov.js +16 -9
- package/dist/main/cosmos/index.d.ts +8 -8
- package/dist/main/google/api/http.d.ts +2636 -6
- package/dist/main/google/api/http.js +18 -21
- package/dist/main/google/protobuf/any.d.ts +14 -2
- package/dist/main/google/protobuf/any.js +6 -7
- package/dist/main/google/protobuf/duration.d.ts +14 -2
- package/dist/main/google/protobuf/duration.js +3 -4
- package/dist/main/google/protobuf/timestamp.d.ts +14 -2
- package/dist/main/google/protobuf/timestamp.js +3 -4
- package/dist/main/index.js +7 -17
- package/dist/main/services/cosmostation.js +1 -1
- package/dist/main/tendermint/abci/types.d.ts +6360 -92
- package/dist/main/tendermint/abci/types.js +195 -235
- package/dist/main/tendermint/crypto/keys.d.ts +14 -2
- package/dist/main/tendermint/crypto/keys.js +3 -4
- package/dist/main/tendermint/crypto/proof.d.ts +152 -10
- package/dist/main/tendermint/crypto/proof.js +19 -24
- package/dist/main/tendermint/types/params.d.ts +196 -12
- package/dist/main/tendermint/types/params.js +15 -20
- package/dist/main/tendermint/types/types.d.ts +1744 -26
- package/dist/main/tendermint/types/types.js +62 -73
- package/dist/main/tendermint/types/validator.d.ts +230 -6
- package/dist/main/tendermint/types/validator.js +10 -13
- package/dist/main/tendermint/version/types.d.ts +28 -4
- package/dist/main/tendermint/version/types.js +6 -8
- package/dist/main/types/core.d.ts +2 -1
- package/dist/main/types/core.js +2 -0
- package/dist/main/utils/convertStringToAny.d.ts +0 -1
- package/dist/main/utils/nft.js +2 -1
- package/dist/main/wasm/v1/authz.d.ts +20 -75
- package/dist/main/wasm/v1/authz.js +129 -148
- package/dist/main/wasm/v1/extensions/wasm.js +2 -1
- package/dist/main/wasm/v1/genesis.d.ts +14 -34
- package/dist/main/wasm/v1/genesis.js +169 -140
- package/dist/main/wasm/v1/ibc.d.ts +13 -26
- package/dist/main/wasm/v1/ibc.js +91 -76
- package/dist/main/wasm/v1/index.d.ts +1 -2
- package/dist/main/wasm/v1/pagination.d.ts +40 -4
- package/dist/main/wasm/v1/pagination.js +9 -11
- package/dist/main/wasm/v1/proposal.d.ts +23 -106
- package/dist/main/wasm/v1/proposal.js +634 -465
- package/dist/main/wasm/v1/query.d.ts +35 -187
- package/dist/main/wasm/v1/query.js +370 -363
- package/dist/main/wasm/v1/tx.d.ts +37 -210
- package/dist/main/wasm/v1/tx.js +621 -497
- package/dist/main/wasm/v1/types.d.ts +19 -67
- package/dist/main/wasm/v1/types.js +224 -195
- package/dist/module/client/index.js +2 -1
- package/dist/module/coreum/asset/ft/v1/authz.d.ts +38 -0
- package/dist/module/coreum/asset/ft/v1/authz.js +119 -0
- package/dist/module/coreum/asset/ft/v1/event.d.ts +52 -28
- package/dist/module/coreum/asset/ft/v1/event.js +721 -109
- package/dist/module/coreum/asset/ft/v1/genesis.d.ts +31 -21
- package/dist/module/coreum/asset/ft/v1/genesis.js +266 -50
- package/dist/module/coreum/asset/ft/v1/params.d.ts +12 -11
- package/dist/module/coreum/asset/ft/v1/params.js +35 -27
- package/dist/module/coreum/asset/ft/v1/query.d.ts +87 -127
- package/dist/module/coreum/asset/ft/v1/query.js +672 -180
- package/dist/module/coreum/asset/ft/v1/token.d.ts +17 -51
- package/dist/module/coreum/asset/ft/v1/token.js +236 -152
- package/dist/module/coreum/asset/ft/v1/tx.d.ts +30 -147
- package/dist/module/coreum/asset/ft/v1/tx.js +437 -301
- package/dist/module/coreum/asset/index.d.ts +2 -3
- package/dist/module/coreum/asset/nft/v1/authz.d.ts +33 -0
- package/dist/module/coreum/asset/nft/v1/authz.js +134 -0
- package/dist/module/coreum/asset/nft/v1/event.d.ts +35 -43
- package/dist/module/coreum/asset/nft/v1/event.js +448 -112
- package/dist/module/coreum/asset/nft/v1/genesis.d.ts +27 -36
- package/dist/module/coreum/asset/nft/v1/genesis.js +299 -100
- package/dist/module/coreum/asset/nft/v1/nft.d.ts +20 -26
- package/dist/module/coreum/asset/nft/v1/nft.js +121 -81
- package/dist/module/coreum/asset/nft/v1/params.d.ts +12 -12
- package/dist/module/coreum/asset/nft/v1/params.js +16 -16
- package/dist/module/coreum/asset/nft/v1/query.d.ts +110 -88
- package/dist/module/coreum/asset/nft/v1/query.js +1057 -153
- package/dist/module/coreum/asset/nft/v1/tx.d.ts +96 -70
- package/dist/module/coreum/asset/nft/v1/tx.js +825 -184
- package/dist/module/coreum/asset/nft/v1/types.d.ts +38 -11
- package/dist/module/coreum/asset/nft/v1/types.js +269 -39
- package/dist/module/coreum/customparams/v1/genesis.d.ts +12 -12
- package/dist/module/coreum/customparams/v1/genesis.js +25 -18
- package/dist/module/coreum/customparams/v1/params.d.ts +11 -11
- package/dist/module/coreum/customparams/v1/params.js +21 -14
- package/dist/module/coreum/customparams/v1/query.d.ts +14 -20
- package/dist/module/coreum/customparams/v1/query.js +32 -23
- package/dist/module/coreum/dex/index.d.ts +1 -0
- package/dist/module/coreum/dex/index.js +9 -0
- package/dist/module/coreum/dex/v1/event.d.ts +73 -0
- package/dist/module/coreum/dex/v1/event.js +467 -0
- package/dist/module/coreum/dex/v1/genesis.d.ts +49 -0
- package/dist/module/coreum/dex/v1/genesis.js +315 -0
- package/dist/module/coreum/dex/v1/order.d.ts +172 -0
- package/dist/module/coreum/dex/v1/order.js +1128 -0
- package/dist/module/coreum/dex/v1/params.d.ts +34 -0
- package/dist/module/coreum/dex/v1/params.js +136 -0
- package/dist/module/coreum/dex/v1/query.d.ts +133 -0
- package/dist/module/coreum/dex/v1/query.js +871 -0
- package/dist/module/coreum/dex/v1/tx.d.ts +102 -0
- package/dist/module/coreum/dex/v1/tx.js +519 -0
- package/dist/module/coreum/extensions/dex.d.ts +12 -0
- package/dist/module/coreum/extensions/dex.js +28 -0
- package/dist/module/coreum/feemodel/v1/genesis.d.ts +13 -13
- package/dist/module/coreum/feemodel/v1/genesis.js +22 -20
- package/dist/module/coreum/feemodel/v1/params.d.ts +14 -21
- package/dist/module/coreum/feemodel/v1/params.js +105 -54
- package/dist/module/coreum/feemodel/v1/query.d.ts +30 -37
- package/dist/module/coreum/feemodel/v1/query.js +191 -35
- package/dist/module/coreum/index.d.ts +46 -0
- package/dist/module/coreum/index.js +57 -0
- package/dist/module/coreum/nft/index.d.ts +1 -2
- package/dist/module/coreum/nft/v1beta1/event.d.ts +23 -27
- package/dist/module/coreum/nft/v1beta1/event.js +90 -58
- package/dist/module/coreum/nft/v1beta1/genesis.d.ts +13 -19
- package/dist/module/coreum/nft/v1beta1/genesis.js +44 -41
- package/dist/module/coreum/nft/v1beta1/nft.d.ts +15 -22
- package/dist/module/coreum/nft/v1beta1/nft.js +99 -64
- package/dist/module/coreum/nft/v1beta1/query.d.ts +54 -124
- package/dist/module/coreum/nft/v1beta1/query.js +231 -183
- package/dist/module/coreum/nft/v1beta1/tx.d.ts +13 -19
- package/dist/module/coreum/nft/v1beta1/tx.js +47 -32
- package/dist/module/cosmos/extensions/distribution.d.ts +4 -4
- package/dist/module/cosmos/extensions/gov.d.ts +13 -13
- package/dist/module/cosmos/index.d.ts +8 -8
- package/dist/module/google/api/http.d.ts +2636 -6
- package/dist/module/google/protobuf/any.d.ts +14 -2
- package/dist/module/google/protobuf/duration.d.ts +14 -2
- package/dist/module/google/protobuf/timestamp.d.ts +14 -2
- package/dist/module/services/cosmostation.js +1 -1
- package/dist/module/tendermint/abci/types.d.ts +6360 -92
- package/dist/module/tendermint/crypto/keys.d.ts +14 -2
- package/dist/module/tendermint/crypto/proof.d.ts +152 -10
- package/dist/module/tendermint/types/params.d.ts +196 -12
- package/dist/module/tendermint/types/types.d.ts +1744 -26
- package/dist/module/tendermint/types/validator.d.ts +230 -6
- package/dist/module/tendermint/version/types.d.ts +28 -4
- package/dist/module/types/core.d.ts +2 -1
- package/dist/module/types/core.js +2 -0
- package/dist/module/utils/convertStringToAny.d.ts +0 -1
- package/dist/module/wasm/v1/authz.d.ts +20 -75
- package/dist/module/wasm/v1/authz.js +111 -119
- package/dist/module/wasm/v1/genesis.d.ts +14 -34
- package/dist/module/wasm/v1/genesis.js +161 -125
- package/dist/module/wasm/v1/ibc.d.ts +13 -26
- package/dist/module/wasm/v1/ibc.js +83 -62
- package/dist/module/wasm/v1/index.d.ts +1 -2
- package/dist/module/wasm/v1/pagination.d.ts +40 -4
- package/dist/module/wasm/v1/proposal.d.ts +23 -106
- package/dist/module/wasm/v1/proposal.js +562 -377
- package/dist/module/wasm/v1/query.d.ts +35 -187
- package/dist/module/wasm/v1/query.js +330 -301
- package/dist/module/wasm/v1/tx.d.ts +37 -210
- package/dist/module/wasm/v1/tx.js +551 -404
- package/dist/module/wasm/v1/types.d.ts +19 -67
- package/dist/module/wasm/v1/types.js +196 -156
- package/package.json +11 -10
|
@@ -1,13 +1,17 @@
|
|
|
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/genesis.proto
|
|
1
6
|
/* eslint-disable */
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { CodeInfo, ContractCodeHistoryEntry, ContractInfo, Model, Params } from "./types";
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
|
|
8
|
+
import { CodeInfo, ContractCodeHistoryEntry, ContractInfo, Model, Params, } from "./types";
|
|
5
9
|
export const protobufPackage = "cosmwasm.wasm.v1";
|
|
6
10
|
function createBaseGenesisState() {
|
|
7
11
|
return { params: undefined, codes: [], contracts: [], sequences: [] };
|
|
8
12
|
}
|
|
9
13
|
export const GenesisState = {
|
|
10
|
-
encode(message, writer =
|
|
14
|
+
encode(message, writer = new BinaryWriter()) {
|
|
11
15
|
if (message.params !== undefined) {
|
|
12
16
|
Params.encode(message.params, writer.uint32(10).fork()).ldelim();
|
|
13
17
|
}
|
|
@@ -23,72 +27,75 @@ export const GenesisState = {
|
|
|
23
27
|
return writer;
|
|
24
28
|
},
|
|
25
29
|
decode(input, length) {
|
|
26
|
-
const reader = input instanceof
|
|
30
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
27
31
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
28
32
|
const message = createBaseGenesisState();
|
|
29
33
|
while (reader.pos < end) {
|
|
30
34
|
const tag = reader.uint32();
|
|
31
35
|
switch (tag >>> 3) {
|
|
32
|
-
case 1:
|
|
36
|
+
case 1: {
|
|
33
37
|
if (tag !== 10) {
|
|
34
38
|
break;
|
|
35
39
|
}
|
|
36
40
|
message.params = Params.decode(reader, reader.uint32());
|
|
37
41
|
continue;
|
|
38
|
-
|
|
42
|
+
}
|
|
43
|
+
case 2: {
|
|
39
44
|
if (tag !== 18) {
|
|
40
45
|
break;
|
|
41
46
|
}
|
|
42
47
|
message.codes.push(Code.decode(reader, reader.uint32()));
|
|
43
48
|
continue;
|
|
44
|
-
|
|
49
|
+
}
|
|
50
|
+
case 3: {
|
|
45
51
|
if (tag !== 26) {
|
|
46
52
|
break;
|
|
47
53
|
}
|
|
48
54
|
message.contracts.push(Contract.decode(reader, reader.uint32()));
|
|
49
55
|
continue;
|
|
50
|
-
|
|
56
|
+
}
|
|
57
|
+
case 4: {
|
|
51
58
|
if (tag !== 34) {
|
|
52
59
|
break;
|
|
53
60
|
}
|
|
54
61
|
message.sequences.push(Sequence.decode(reader, reader.uint32()));
|
|
55
62
|
continue;
|
|
63
|
+
}
|
|
56
64
|
}
|
|
57
65
|
if ((tag & 7) === 4 || tag === 0) {
|
|
58
66
|
break;
|
|
59
67
|
}
|
|
60
|
-
reader.
|
|
68
|
+
reader.skip(tag & 7);
|
|
61
69
|
}
|
|
62
70
|
return message;
|
|
63
71
|
},
|
|
64
72
|
fromJSON(object) {
|
|
65
73
|
return {
|
|
66
74
|
params: isSet(object.params) ? Params.fromJSON(object.params) : undefined,
|
|
67
|
-
codes: Array.isArray(object?.codes)
|
|
68
|
-
|
|
69
|
-
|
|
75
|
+
codes: globalThis.Array.isArray(object?.codes)
|
|
76
|
+
? object.codes.map((e) => Code.fromJSON(e))
|
|
77
|
+
: [],
|
|
78
|
+
contracts: globalThis.Array.isArray(object?.contracts)
|
|
79
|
+
? object.contracts.map((e) => Contract.fromJSON(e))
|
|
80
|
+
: [],
|
|
81
|
+
sequences: globalThis.Array.isArray(object?.sequences)
|
|
82
|
+
? object.sequences.map((e) => Sequence.fromJSON(e))
|
|
83
|
+
: [],
|
|
70
84
|
};
|
|
71
85
|
},
|
|
72
86
|
toJSON(message) {
|
|
73
87
|
const obj = {};
|
|
74
|
-
message.params !== undefined
|
|
75
|
-
|
|
76
|
-
obj.codes = message.codes.map((e) => e ? Code.toJSON(e) : undefined);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
obj.codes = [];
|
|
80
|
-
}
|
|
81
|
-
if (message.contracts) {
|
|
82
|
-
obj.contracts = message.contracts.map((e) => e ? Contract.toJSON(e) : undefined);
|
|
88
|
+
if (message.params !== undefined) {
|
|
89
|
+
obj.params = Params.toJSON(message.params);
|
|
83
90
|
}
|
|
84
|
-
|
|
85
|
-
obj.
|
|
91
|
+
if (message.codes?.length) {
|
|
92
|
+
obj.codes = message.codes.map((e) => Code.toJSON(e));
|
|
86
93
|
}
|
|
87
|
-
if (message.
|
|
88
|
-
obj.
|
|
94
|
+
if (message.contracts?.length) {
|
|
95
|
+
obj.contracts = message.contracts.map((e) => Contract.toJSON(e));
|
|
89
96
|
}
|
|
90
|
-
|
|
91
|
-
obj.sequences =
|
|
97
|
+
if (message.sequences?.length) {
|
|
98
|
+
obj.sequences = message.sequences.map((e) => Sequence.toJSON(e));
|
|
92
99
|
}
|
|
93
100
|
return obj;
|
|
94
101
|
},
|
|
@@ -97,20 +104,28 @@ export const GenesisState = {
|
|
|
97
104
|
},
|
|
98
105
|
fromPartial(object) {
|
|
99
106
|
const message = createBaseGenesisState();
|
|
100
|
-
message.params =
|
|
101
|
-
|
|
102
|
-
|
|
107
|
+
message.params =
|
|
108
|
+
object.params !== undefined && object.params !== null
|
|
109
|
+
? Params.fromPartial(object.params)
|
|
110
|
+
: undefined;
|
|
103
111
|
message.codes = object.codes?.map((e) => Code.fromPartial(e)) || [];
|
|
104
|
-
message.contracts =
|
|
105
|
-
|
|
112
|
+
message.contracts =
|
|
113
|
+
object.contracts?.map((e) => Contract.fromPartial(e)) || [];
|
|
114
|
+
message.sequences =
|
|
115
|
+
object.sequences?.map((e) => Sequence.fromPartial(e)) || [];
|
|
106
116
|
return message;
|
|
107
117
|
},
|
|
108
118
|
};
|
|
109
119
|
function createBaseCode() {
|
|
110
|
-
return {
|
|
120
|
+
return {
|
|
121
|
+
codeId: 0,
|
|
122
|
+
codeInfo: undefined,
|
|
123
|
+
codeBytes: new Uint8Array(0),
|
|
124
|
+
pinned: false,
|
|
125
|
+
};
|
|
111
126
|
}
|
|
112
127
|
export const Code = {
|
|
113
|
-
encode(message, writer =
|
|
128
|
+
encode(message, writer = new BinaryWriter()) {
|
|
114
129
|
if (message.codeId !== 0) {
|
|
115
130
|
writer.uint32(8).uint64(message.codeId);
|
|
116
131
|
}
|
|
@@ -120,65 +135,80 @@ export const Code = {
|
|
|
120
135
|
if (message.codeBytes.length !== 0) {
|
|
121
136
|
writer.uint32(26).bytes(message.codeBytes);
|
|
122
137
|
}
|
|
123
|
-
if (message.pinned
|
|
138
|
+
if (message.pinned !== false) {
|
|
124
139
|
writer.uint32(32).bool(message.pinned);
|
|
125
140
|
}
|
|
126
141
|
return writer;
|
|
127
142
|
},
|
|
128
143
|
decode(input, length) {
|
|
129
|
-
const reader = input instanceof
|
|
144
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
130
145
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
131
146
|
const message = createBaseCode();
|
|
132
147
|
while (reader.pos < end) {
|
|
133
148
|
const tag = reader.uint32();
|
|
134
149
|
switch (tag >>> 3) {
|
|
135
|
-
case 1:
|
|
150
|
+
case 1: {
|
|
136
151
|
if (tag !== 8) {
|
|
137
152
|
break;
|
|
138
153
|
}
|
|
139
154
|
message.codeId = longToNumber(reader.uint64());
|
|
140
155
|
continue;
|
|
141
|
-
|
|
156
|
+
}
|
|
157
|
+
case 2: {
|
|
142
158
|
if (tag !== 18) {
|
|
143
159
|
break;
|
|
144
160
|
}
|
|
145
161
|
message.codeInfo = CodeInfo.decode(reader, reader.uint32());
|
|
146
162
|
continue;
|
|
147
|
-
|
|
163
|
+
}
|
|
164
|
+
case 3: {
|
|
148
165
|
if (tag !== 26) {
|
|
149
166
|
break;
|
|
150
167
|
}
|
|
151
168
|
message.codeBytes = reader.bytes();
|
|
152
169
|
continue;
|
|
153
|
-
|
|
170
|
+
}
|
|
171
|
+
case 4: {
|
|
154
172
|
if (tag !== 32) {
|
|
155
173
|
break;
|
|
156
174
|
}
|
|
157
175
|
message.pinned = reader.bool();
|
|
158
176
|
continue;
|
|
177
|
+
}
|
|
159
178
|
}
|
|
160
179
|
if ((tag & 7) === 4 || tag === 0) {
|
|
161
180
|
break;
|
|
162
181
|
}
|
|
163
|
-
reader.
|
|
182
|
+
reader.skip(tag & 7);
|
|
164
183
|
}
|
|
165
184
|
return message;
|
|
166
185
|
},
|
|
167
186
|
fromJSON(object) {
|
|
168
187
|
return {
|
|
169
|
-
codeId: isSet(object.codeId) ? Number(object.codeId) : 0,
|
|
170
|
-
codeInfo: isSet(object.codeInfo)
|
|
171
|
-
|
|
172
|
-
|
|
188
|
+
codeId: isSet(object.codeId) ? globalThis.Number(object.codeId) : 0,
|
|
189
|
+
codeInfo: isSet(object.codeInfo)
|
|
190
|
+
? CodeInfo.fromJSON(object.codeInfo)
|
|
191
|
+
: undefined,
|
|
192
|
+
codeBytes: isSet(object.codeBytes)
|
|
193
|
+
? bytesFromBase64(object.codeBytes)
|
|
194
|
+
: new Uint8Array(0),
|
|
195
|
+
pinned: isSet(object.pinned) ? globalThis.Boolean(object.pinned) : false,
|
|
173
196
|
};
|
|
174
197
|
},
|
|
175
198
|
toJSON(message) {
|
|
176
199
|
const obj = {};
|
|
177
|
-
message.codeId !==
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
200
|
+
if (message.codeId !== 0) {
|
|
201
|
+
obj.codeId = Math.round(message.codeId);
|
|
202
|
+
}
|
|
203
|
+
if (message.codeInfo !== undefined) {
|
|
204
|
+
obj.codeInfo = CodeInfo.toJSON(message.codeInfo);
|
|
205
|
+
}
|
|
206
|
+
if (message.codeBytes.length !== 0) {
|
|
207
|
+
obj.codeBytes = base64FromBytes(message.codeBytes);
|
|
208
|
+
}
|
|
209
|
+
if (message.pinned !== false) {
|
|
210
|
+
obj.pinned = message.pinned;
|
|
211
|
+
}
|
|
182
212
|
return obj;
|
|
183
213
|
},
|
|
184
214
|
create(base) {
|
|
@@ -187,19 +217,25 @@ export const Code = {
|
|
|
187
217
|
fromPartial(object) {
|
|
188
218
|
const message = createBaseCode();
|
|
189
219
|
message.codeId = object.codeId ?? 0;
|
|
190
|
-
message.codeInfo =
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
220
|
+
message.codeInfo =
|
|
221
|
+
object.codeInfo !== undefined && object.codeInfo !== null
|
|
222
|
+
? CodeInfo.fromPartial(object.codeInfo)
|
|
223
|
+
: undefined;
|
|
224
|
+
message.codeBytes = object.codeBytes ?? new Uint8Array(0);
|
|
194
225
|
message.pinned = object.pinned ?? false;
|
|
195
226
|
return message;
|
|
196
227
|
},
|
|
197
228
|
};
|
|
198
229
|
function createBaseContract() {
|
|
199
|
-
return {
|
|
230
|
+
return {
|
|
231
|
+
contractAddress: "",
|
|
232
|
+
contractInfo: undefined,
|
|
233
|
+
contractState: [],
|
|
234
|
+
contractCodeHistory: [],
|
|
235
|
+
};
|
|
200
236
|
}
|
|
201
237
|
export const Contract = {
|
|
202
|
-
encode(message, writer =
|
|
238
|
+
encode(message, writer = new BinaryWriter()) {
|
|
203
239
|
if (message.contractAddress !== "") {
|
|
204
240
|
writer.uint32(10).string(message.contractAddress);
|
|
205
241
|
}
|
|
@@ -215,72 +251,77 @@ export const Contract = {
|
|
|
215
251
|
return writer;
|
|
216
252
|
},
|
|
217
253
|
decode(input, length) {
|
|
218
|
-
const reader = input instanceof
|
|
254
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
219
255
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
220
256
|
const message = createBaseContract();
|
|
221
257
|
while (reader.pos < end) {
|
|
222
258
|
const tag = reader.uint32();
|
|
223
259
|
switch (tag >>> 3) {
|
|
224
|
-
case 1:
|
|
260
|
+
case 1: {
|
|
225
261
|
if (tag !== 10) {
|
|
226
262
|
break;
|
|
227
263
|
}
|
|
228
264
|
message.contractAddress = reader.string();
|
|
229
265
|
continue;
|
|
230
|
-
|
|
266
|
+
}
|
|
267
|
+
case 2: {
|
|
231
268
|
if (tag !== 18) {
|
|
232
269
|
break;
|
|
233
270
|
}
|
|
234
271
|
message.contractInfo = ContractInfo.decode(reader, reader.uint32());
|
|
235
272
|
continue;
|
|
236
|
-
|
|
273
|
+
}
|
|
274
|
+
case 3: {
|
|
237
275
|
if (tag !== 26) {
|
|
238
276
|
break;
|
|
239
277
|
}
|
|
240
278
|
message.contractState.push(Model.decode(reader, reader.uint32()));
|
|
241
279
|
continue;
|
|
242
|
-
|
|
280
|
+
}
|
|
281
|
+
case 4: {
|
|
243
282
|
if (tag !== 34) {
|
|
244
283
|
break;
|
|
245
284
|
}
|
|
246
285
|
message.contractCodeHistory.push(ContractCodeHistoryEntry.decode(reader, reader.uint32()));
|
|
247
286
|
continue;
|
|
287
|
+
}
|
|
248
288
|
}
|
|
249
289
|
if ((tag & 7) === 4 || tag === 0) {
|
|
250
290
|
break;
|
|
251
291
|
}
|
|
252
|
-
reader.
|
|
292
|
+
reader.skip(tag & 7);
|
|
253
293
|
}
|
|
254
294
|
return message;
|
|
255
295
|
},
|
|
256
296
|
fromJSON(object) {
|
|
257
297
|
return {
|
|
258
|
-
contractAddress: isSet(object.contractAddress)
|
|
259
|
-
|
|
260
|
-
|
|
298
|
+
contractAddress: isSet(object.contractAddress)
|
|
299
|
+
? globalThis.String(object.contractAddress)
|
|
300
|
+
: "",
|
|
301
|
+
contractInfo: isSet(object.contractInfo)
|
|
302
|
+
? ContractInfo.fromJSON(object.contractInfo)
|
|
303
|
+
: undefined,
|
|
304
|
+
contractState: globalThis.Array.isArray(object?.contractState)
|
|
261
305
|
? object.contractState.map((e) => Model.fromJSON(e))
|
|
262
306
|
: [],
|
|
263
|
-
contractCodeHistory: Array.isArray(object?.contractCodeHistory)
|
|
307
|
+
contractCodeHistory: globalThis.Array.isArray(object?.contractCodeHistory)
|
|
264
308
|
? object.contractCodeHistory.map((e) => ContractCodeHistoryEntry.fromJSON(e))
|
|
265
309
|
: [],
|
|
266
310
|
};
|
|
267
311
|
},
|
|
268
312
|
toJSON(message) {
|
|
269
313
|
const obj = {};
|
|
270
|
-
message.contractAddress !==
|
|
271
|
-
|
|
272
|
-
(obj.contractInfo = message.contractInfo ? ContractInfo.toJSON(message.contractInfo) : undefined);
|
|
273
|
-
if (message.contractState) {
|
|
274
|
-
obj.contractState = message.contractState.map((e) => e ? Model.toJSON(e) : undefined);
|
|
314
|
+
if (message.contractAddress !== "") {
|
|
315
|
+
obj.contractAddress = message.contractAddress;
|
|
275
316
|
}
|
|
276
|
-
|
|
277
|
-
obj.
|
|
317
|
+
if (message.contractInfo !== undefined) {
|
|
318
|
+
obj.contractInfo = ContractInfo.toJSON(message.contractInfo);
|
|
278
319
|
}
|
|
279
|
-
if (message.
|
|
280
|
-
obj.
|
|
320
|
+
if (message.contractState?.length) {
|
|
321
|
+
obj.contractState = message.contractState.map((e) => Model.toJSON(e));
|
|
281
322
|
}
|
|
282
|
-
|
|
283
|
-
obj.contractCodeHistory =
|
|
323
|
+
if (message.contractCodeHistory?.length) {
|
|
324
|
+
obj.contractCodeHistory = message.contractCodeHistory.map((e) => ContractCodeHistoryEntry.toJSON(e));
|
|
284
325
|
}
|
|
285
326
|
return obj;
|
|
286
327
|
},
|
|
@@ -290,19 +331,22 @@ export const Contract = {
|
|
|
290
331
|
fromPartial(object) {
|
|
291
332
|
const message = createBaseContract();
|
|
292
333
|
message.contractAddress = object.contractAddress ?? "";
|
|
293
|
-
message.contractInfo =
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
message.
|
|
334
|
+
message.contractInfo =
|
|
335
|
+
object.contractInfo !== undefined && object.contractInfo !== null
|
|
336
|
+
? ContractInfo.fromPartial(object.contractInfo)
|
|
337
|
+
: undefined;
|
|
338
|
+
message.contractState =
|
|
339
|
+
object.contractState?.map((e) => Model.fromPartial(e)) || [];
|
|
340
|
+
message.contractCodeHistory =
|
|
341
|
+
object.contractCodeHistory?.map((e) => ContractCodeHistoryEntry.fromPartial(e)) || [];
|
|
298
342
|
return message;
|
|
299
343
|
},
|
|
300
344
|
};
|
|
301
345
|
function createBaseSequence() {
|
|
302
|
-
return { idKey: new Uint8Array(), value: 0 };
|
|
346
|
+
return { idKey: new Uint8Array(0), value: 0 };
|
|
303
347
|
}
|
|
304
348
|
export const Sequence = {
|
|
305
|
-
encode(message, writer =
|
|
349
|
+
encode(message, writer = new BinaryWriter()) {
|
|
306
350
|
if (message.idKey.length !== 0) {
|
|
307
351
|
writer.uint32(10).bytes(message.idKey);
|
|
308
352
|
}
|
|
@@ -312,43 +356,50 @@ export const Sequence = {
|
|
|
312
356
|
return writer;
|
|
313
357
|
},
|
|
314
358
|
decode(input, length) {
|
|
315
|
-
const reader = input instanceof
|
|
359
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
316
360
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
317
361
|
const message = createBaseSequence();
|
|
318
362
|
while (reader.pos < end) {
|
|
319
363
|
const tag = reader.uint32();
|
|
320
364
|
switch (tag >>> 3) {
|
|
321
|
-
case 1:
|
|
365
|
+
case 1: {
|
|
322
366
|
if (tag !== 10) {
|
|
323
367
|
break;
|
|
324
368
|
}
|
|
325
369
|
message.idKey = reader.bytes();
|
|
326
370
|
continue;
|
|
327
|
-
|
|
371
|
+
}
|
|
372
|
+
case 2: {
|
|
328
373
|
if (tag !== 16) {
|
|
329
374
|
break;
|
|
330
375
|
}
|
|
331
376
|
message.value = longToNumber(reader.uint64());
|
|
332
377
|
continue;
|
|
378
|
+
}
|
|
333
379
|
}
|
|
334
380
|
if ((tag & 7) === 4 || tag === 0) {
|
|
335
381
|
break;
|
|
336
382
|
}
|
|
337
|
-
reader.
|
|
383
|
+
reader.skip(tag & 7);
|
|
338
384
|
}
|
|
339
385
|
return message;
|
|
340
386
|
},
|
|
341
387
|
fromJSON(object) {
|
|
342
388
|
return {
|
|
343
|
-
idKey: isSet(object.idKey)
|
|
344
|
-
|
|
389
|
+
idKey: isSet(object.idKey)
|
|
390
|
+
? bytesFromBase64(object.idKey)
|
|
391
|
+
: new Uint8Array(0),
|
|
392
|
+
value: isSet(object.value) ? globalThis.Number(object.value) : 0,
|
|
345
393
|
};
|
|
346
394
|
},
|
|
347
395
|
toJSON(message) {
|
|
348
396
|
const obj = {};
|
|
349
|
-
message.idKey !==
|
|
350
|
-
|
|
351
|
-
|
|
397
|
+
if (message.idKey.length !== 0) {
|
|
398
|
+
obj.idKey = base64FromBytes(message.idKey);
|
|
399
|
+
}
|
|
400
|
+
if (message.value !== 0) {
|
|
401
|
+
obj.value = Math.round(message.value);
|
|
402
|
+
}
|
|
352
403
|
return obj;
|
|
353
404
|
},
|
|
354
405
|
create(base) {
|
|
@@ -356,32 +407,17 @@ export const Sequence = {
|
|
|
356
407
|
},
|
|
357
408
|
fromPartial(object) {
|
|
358
409
|
const message = createBaseSequence();
|
|
359
|
-
message.idKey = object.idKey ?? new Uint8Array();
|
|
410
|
+
message.idKey = object.idKey ?? new Uint8Array(0);
|
|
360
411
|
message.value = object.value ?? 0;
|
|
361
412
|
return message;
|
|
362
413
|
},
|
|
363
414
|
};
|
|
364
|
-
var tsProtoGlobalThis = (() => {
|
|
365
|
-
if (typeof globalThis !== "undefined") {
|
|
366
|
-
return globalThis;
|
|
367
|
-
}
|
|
368
|
-
if (typeof self !== "undefined") {
|
|
369
|
-
return self;
|
|
370
|
-
}
|
|
371
|
-
if (typeof window !== "undefined") {
|
|
372
|
-
return window;
|
|
373
|
-
}
|
|
374
|
-
if (typeof global !== "undefined") {
|
|
375
|
-
return global;
|
|
376
|
-
}
|
|
377
|
-
throw "Unable to locate global object";
|
|
378
|
-
})();
|
|
379
415
|
function bytesFromBase64(b64) {
|
|
380
|
-
if (
|
|
381
|
-
return Uint8Array.from(
|
|
416
|
+
if (globalThis.Buffer) {
|
|
417
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
382
418
|
}
|
|
383
419
|
else {
|
|
384
|
-
const bin =
|
|
420
|
+
const bin = globalThis.atob(b64);
|
|
385
421
|
const arr = new Uint8Array(bin.length);
|
|
386
422
|
for (let i = 0; i < bin.length; ++i) {
|
|
387
423
|
arr[i] = bin.charCodeAt(i);
|
|
@@ -390,26 +426,26 @@ function bytesFromBase64(b64) {
|
|
|
390
426
|
}
|
|
391
427
|
}
|
|
392
428
|
function base64FromBytes(arr) {
|
|
393
|
-
if (
|
|
394
|
-
return
|
|
429
|
+
if (globalThis.Buffer) {
|
|
430
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
395
431
|
}
|
|
396
432
|
else {
|
|
397
433
|
const bin = [];
|
|
398
434
|
arr.forEach((byte) => {
|
|
399
|
-
bin.push(String.fromCharCode(byte));
|
|
435
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
400
436
|
});
|
|
401
|
-
return
|
|
437
|
+
return globalThis.btoa(bin.join(""));
|
|
402
438
|
}
|
|
403
439
|
}
|
|
404
|
-
function longToNumber(
|
|
405
|
-
|
|
406
|
-
|
|
440
|
+
function longToNumber(int64) {
|
|
441
|
+
const num = globalThis.Number(int64.toString());
|
|
442
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
443
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
407
444
|
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
_m0.configure();
|
|
445
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
446
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
447
|
+
}
|
|
448
|
+
return num;
|
|
413
449
|
}
|
|
414
450
|
function isSet(value) {
|
|
415
451
|
return value !== null && value !== undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
|
|
2
2
|
export declare const protobufPackage = "cosmwasm.wasm.v1";
|
|
3
3
|
/** MsgIBCSend */
|
|
4
4
|
export interface MsgIBCSend {
|
|
@@ -29,32 +29,11 @@ export interface MsgIBCSendResponse {
|
|
|
29
29
|
export interface MsgIBCCloseChannel {
|
|
30
30
|
channel: string;
|
|
31
31
|
}
|
|
32
|
-
export declare const MsgIBCSend:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
fromJSON(object: any): MsgIBCSend;
|
|
36
|
-
toJSON(message: MsgIBCSend): unknown;
|
|
37
|
-
create<I extends Exact<DeepPartial<MsgIBCSend>, I>>(base?: I): MsgIBCSend;
|
|
38
|
-
fromPartial<I extends Exact<DeepPartial<MsgIBCSend>, I>>(object: I): MsgIBCSend;
|
|
39
|
-
};
|
|
40
|
-
export declare const MsgIBCSendResponse: {
|
|
41
|
-
encode(message: MsgIBCSendResponse, writer?: _m0.Writer): _m0.Writer;
|
|
42
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): MsgIBCSendResponse;
|
|
43
|
-
fromJSON(object: any): MsgIBCSendResponse;
|
|
44
|
-
toJSON(message: MsgIBCSendResponse): unknown;
|
|
45
|
-
create<I extends Exact<DeepPartial<MsgIBCSendResponse>, I>>(base?: I): MsgIBCSendResponse;
|
|
46
|
-
fromPartial<I extends Exact<DeepPartial<MsgIBCSendResponse>, I>>(object: I): MsgIBCSendResponse;
|
|
47
|
-
};
|
|
48
|
-
export declare const MsgIBCCloseChannel: {
|
|
49
|
-
encode(message: MsgIBCCloseChannel, writer?: _m0.Writer): _m0.Writer;
|
|
50
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): MsgIBCCloseChannel;
|
|
51
|
-
fromJSON(object: any): MsgIBCCloseChannel;
|
|
52
|
-
toJSON(message: MsgIBCCloseChannel): unknown;
|
|
53
|
-
create<I extends Exact<DeepPartial<MsgIBCCloseChannel>, I>>(base?: I): MsgIBCCloseChannel;
|
|
54
|
-
fromPartial<I extends Exact<DeepPartial<MsgIBCCloseChannel>, I>>(object: I): MsgIBCCloseChannel;
|
|
55
|
-
};
|
|
32
|
+
export declare const MsgIBCSend: MessageFns<MsgIBCSend>;
|
|
33
|
+
export declare const MsgIBCSendResponse: MessageFns<MsgIBCSendResponse>;
|
|
34
|
+
export declare const MsgIBCCloseChannel: MessageFns<MsgIBCCloseChannel>;
|
|
56
35
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
57
|
-
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
36
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
58
37
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
59
38
|
} : Partial<T>;
|
|
60
39
|
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
@@ -63,4 +42,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
|
63
42
|
} & {
|
|
64
43
|
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
65
44
|
};
|
|
45
|
+
export interface MessageFns<T> {
|
|
46
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
47
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
48
|
+
fromJSON(object: any): T;
|
|
49
|
+
toJSON(message: T): unknown;
|
|
50
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
51
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
52
|
+
}
|
|
66
53
|
export {};
|