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,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.7.0
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: cosmos-sdk/proto/cosmos/nft/v1beta1/query.proto
|
|
5
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.QueryClientImpl = exports.QueryClassesResponse = exports.QueryClassesRequest = exports.QueryClassResponse = exports.QueryClassRequest = exports.QueryNFTResponse = exports.QueryNFTRequest = exports.QueryNFTsResponse = exports.QueryNFTsRequest = exports.QuerySupplyResponse = exports.QuerySupplyRequest = exports.QueryOwnerResponse = exports.QueryOwnerRequest = exports.QueryBalanceResponse = exports.QueryBalanceRequest = exports.protobufPackage = void 0;
|
|
8
|
+
exports.QueryClientImpl = exports.QueryServiceName = exports.QueryClassesResponse = exports.QueryClassesRequest = exports.QueryClassResponse = exports.QueryClassRequest = exports.QueryNFTResponse = exports.QueryNFTRequest = exports.QueryNFTsResponse = exports.QueryNFTsRequest = exports.QuerySupplyResponse = exports.QuerySupplyRequest = exports.QueryOwnerResponse = exports.QueryOwnerRequest = exports.QueryBalanceResponse = exports.QueryBalanceRequest = exports.protobufPackage = void 0;
|
|
7
9
|
/* eslint-disable */
|
|
8
|
-
const
|
|
9
|
-
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
+
const binary_1 = require("cosmjs-types/binary");
|
|
10
11
|
const pagination_1 = require("cosmjs-types/cosmos/base/query/v1beta1/pagination");
|
|
11
12
|
const nft_1 = require("./nft");
|
|
12
13
|
exports.protobufPackage = "cosmos.nft.v1beta1";
|
|
@@ -14,7 +15,7 @@ function createBaseQueryBalanceRequest() {
|
|
|
14
15
|
return { classId: "", owner: "" };
|
|
15
16
|
}
|
|
16
17
|
exports.QueryBalanceRequest = {
|
|
17
|
-
encode(message, writer =
|
|
18
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
18
19
|
if (message.classId !== "") {
|
|
19
20
|
writer.uint32(10).string(message.classId);
|
|
20
21
|
}
|
|
@@ -24,106 +25,110 @@ exports.QueryBalanceRequest = {
|
|
|
24
25
|
return writer;
|
|
25
26
|
},
|
|
26
27
|
decode(input, length) {
|
|
27
|
-
const reader = input instanceof
|
|
28
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
28
29
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
29
30
|
const message = createBaseQueryBalanceRequest();
|
|
30
31
|
while (reader.pos < end) {
|
|
31
32
|
const tag = reader.uint32();
|
|
32
33
|
switch (tag >>> 3) {
|
|
33
|
-
case 1:
|
|
34
|
-
if (tag
|
|
34
|
+
case 1: {
|
|
35
|
+
if (tag !== 10) {
|
|
35
36
|
break;
|
|
36
37
|
}
|
|
37
38
|
message.classId = reader.string();
|
|
38
39
|
continue;
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
}
|
|
41
|
+
case 2: {
|
|
42
|
+
if (tag !== 18) {
|
|
41
43
|
break;
|
|
42
44
|
}
|
|
43
45
|
message.owner = reader.string();
|
|
44
46
|
continue;
|
|
47
|
+
}
|
|
45
48
|
}
|
|
46
|
-
if ((tag & 7)
|
|
49
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
47
50
|
break;
|
|
48
51
|
}
|
|
49
|
-
reader.
|
|
52
|
+
reader.skip(tag & 7);
|
|
50
53
|
}
|
|
51
54
|
return message;
|
|
52
55
|
},
|
|
53
56
|
fromJSON(object) {
|
|
54
57
|
return {
|
|
55
|
-
classId: isSet(object.classId) ? String(object.classId) : "",
|
|
56
|
-
owner: isSet(object.owner) ? String(object.owner) : "",
|
|
58
|
+
classId: isSet(object.classId) ? globalThis.String(object.classId) : "",
|
|
59
|
+
owner: isSet(object.owner) ? globalThis.String(object.owner) : "",
|
|
57
60
|
};
|
|
58
61
|
},
|
|
59
62
|
toJSON(message) {
|
|
60
63
|
const obj = {};
|
|
61
|
-
message.classId !==
|
|
62
|
-
|
|
64
|
+
if (message.classId !== "") {
|
|
65
|
+
obj.classId = message.classId;
|
|
66
|
+
}
|
|
67
|
+
if (message.owner !== "") {
|
|
68
|
+
obj.owner = message.owner;
|
|
69
|
+
}
|
|
63
70
|
return obj;
|
|
64
71
|
},
|
|
65
72
|
create(base) {
|
|
66
|
-
return exports.QueryBalanceRequest.fromPartial(base
|
|
73
|
+
return exports.QueryBalanceRequest.fromPartial(base ?? {});
|
|
67
74
|
},
|
|
68
75
|
fromPartial(object) {
|
|
69
|
-
var _a, _b;
|
|
70
76
|
const message = createBaseQueryBalanceRequest();
|
|
71
|
-
message.classId =
|
|
72
|
-
message.owner =
|
|
77
|
+
message.classId = object.classId ?? "";
|
|
78
|
+
message.owner = object.owner ?? "";
|
|
73
79
|
return message;
|
|
74
80
|
},
|
|
75
81
|
};
|
|
76
82
|
function createBaseQueryBalanceResponse() {
|
|
77
|
-
return { amount:
|
|
83
|
+
return { amount: 0 };
|
|
78
84
|
}
|
|
79
85
|
exports.QueryBalanceResponse = {
|
|
80
|
-
encode(message, writer =
|
|
81
|
-
if (
|
|
86
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
87
|
+
if (message.amount !== 0) {
|
|
82
88
|
writer.uint32(8).uint64(message.amount);
|
|
83
89
|
}
|
|
84
90
|
return writer;
|
|
85
91
|
},
|
|
86
92
|
decode(input, length) {
|
|
87
|
-
const reader = input instanceof
|
|
93
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
88
94
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
89
95
|
const message = createBaseQueryBalanceResponse();
|
|
90
96
|
while (reader.pos < end) {
|
|
91
97
|
const tag = reader.uint32();
|
|
92
98
|
switch (tag >>> 3) {
|
|
93
|
-
case 1:
|
|
94
|
-
if (tag
|
|
99
|
+
case 1: {
|
|
100
|
+
if (tag !== 8) {
|
|
95
101
|
break;
|
|
96
102
|
}
|
|
97
|
-
message.amount = reader.uint64();
|
|
103
|
+
message.amount = longToNumber(reader.uint64());
|
|
98
104
|
continue;
|
|
105
|
+
}
|
|
99
106
|
}
|
|
100
|
-
if ((tag & 7)
|
|
107
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
101
108
|
break;
|
|
102
109
|
}
|
|
103
|
-
reader.
|
|
110
|
+
reader.skip(tag & 7);
|
|
104
111
|
}
|
|
105
112
|
return message;
|
|
106
113
|
},
|
|
107
114
|
fromJSON(object) {
|
|
108
115
|
return {
|
|
109
|
-
amount: isSet(object.amount) ?
|
|
116
|
+
amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
|
|
110
117
|
};
|
|
111
118
|
},
|
|
112
119
|
toJSON(message) {
|
|
113
120
|
const obj = {};
|
|
114
|
-
message.amount !==
|
|
115
|
-
|
|
121
|
+
if (message.amount !== 0) {
|
|
122
|
+
obj.amount = Math.round(message.amount);
|
|
123
|
+
}
|
|
116
124
|
return obj;
|
|
117
125
|
},
|
|
118
126
|
create(base) {
|
|
119
|
-
return exports.QueryBalanceResponse.fromPartial(base
|
|
127
|
+
return exports.QueryBalanceResponse.fromPartial(base ?? {});
|
|
120
128
|
},
|
|
121
129
|
fromPartial(object) {
|
|
122
130
|
const message = createBaseQueryBalanceResponse();
|
|
123
|
-
message.amount =
|
|
124
|
-
object.amount !== undefined && object.amount !== null
|
|
125
|
-
? long_1.default.fromValue(object.amount)
|
|
126
|
-
: long_1.default.UZERO;
|
|
131
|
+
message.amount = object.amount ?? 0;
|
|
127
132
|
return message;
|
|
128
133
|
},
|
|
129
134
|
};
|
|
@@ -131,7 +136,7 @@ function createBaseQueryOwnerRequest() {
|
|
|
131
136
|
return { classId: "", id: "" };
|
|
132
137
|
}
|
|
133
138
|
exports.QueryOwnerRequest = {
|
|
134
|
-
encode(message, writer =
|
|
139
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
135
140
|
if (message.classId !== "") {
|
|
136
141
|
writer.uint32(10).string(message.classId);
|
|
137
142
|
}
|
|
@@ -141,52 +146,57 @@ exports.QueryOwnerRequest = {
|
|
|
141
146
|
return writer;
|
|
142
147
|
},
|
|
143
148
|
decode(input, length) {
|
|
144
|
-
const reader = input instanceof
|
|
149
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
145
150
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
146
151
|
const message = createBaseQueryOwnerRequest();
|
|
147
152
|
while (reader.pos < end) {
|
|
148
153
|
const tag = reader.uint32();
|
|
149
154
|
switch (tag >>> 3) {
|
|
150
|
-
case 1:
|
|
151
|
-
if (tag
|
|
155
|
+
case 1: {
|
|
156
|
+
if (tag !== 10) {
|
|
152
157
|
break;
|
|
153
158
|
}
|
|
154
159
|
message.classId = reader.string();
|
|
155
160
|
continue;
|
|
156
|
-
|
|
157
|
-
|
|
161
|
+
}
|
|
162
|
+
case 2: {
|
|
163
|
+
if (tag !== 18) {
|
|
158
164
|
break;
|
|
159
165
|
}
|
|
160
166
|
message.id = reader.string();
|
|
161
167
|
continue;
|
|
168
|
+
}
|
|
162
169
|
}
|
|
163
|
-
if ((tag & 7)
|
|
170
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
164
171
|
break;
|
|
165
172
|
}
|
|
166
|
-
reader.
|
|
173
|
+
reader.skip(tag & 7);
|
|
167
174
|
}
|
|
168
175
|
return message;
|
|
169
176
|
},
|
|
170
177
|
fromJSON(object) {
|
|
171
178
|
return {
|
|
172
|
-
classId: isSet(object.classId) ? String(object.classId) : "",
|
|
173
|
-
id: isSet(object.id) ? String(object.id) : "",
|
|
179
|
+
classId: isSet(object.classId) ? globalThis.String(object.classId) : "",
|
|
180
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
174
181
|
};
|
|
175
182
|
},
|
|
176
183
|
toJSON(message) {
|
|
177
184
|
const obj = {};
|
|
178
|
-
message.classId !==
|
|
179
|
-
|
|
185
|
+
if (message.classId !== "") {
|
|
186
|
+
obj.classId = message.classId;
|
|
187
|
+
}
|
|
188
|
+
if (message.id !== "") {
|
|
189
|
+
obj.id = message.id;
|
|
190
|
+
}
|
|
180
191
|
return obj;
|
|
181
192
|
},
|
|
182
193
|
create(base) {
|
|
183
|
-
return exports.QueryOwnerRequest.fromPartial(base
|
|
194
|
+
return exports.QueryOwnerRequest.fromPartial(base ?? {});
|
|
184
195
|
},
|
|
185
196
|
fromPartial(object) {
|
|
186
|
-
var _a, _b;
|
|
187
197
|
const message = createBaseQueryOwnerRequest();
|
|
188
|
-
message.classId =
|
|
189
|
-
message.id =
|
|
198
|
+
message.classId = object.classId ?? "";
|
|
199
|
+
message.id = object.id ?? "";
|
|
190
200
|
return message;
|
|
191
201
|
},
|
|
192
202
|
};
|
|
@@ -194,48 +204,52 @@ function createBaseQueryOwnerResponse() {
|
|
|
194
204
|
return { owner: "" };
|
|
195
205
|
}
|
|
196
206
|
exports.QueryOwnerResponse = {
|
|
197
|
-
encode(message, writer =
|
|
207
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
198
208
|
if (message.owner !== "") {
|
|
199
209
|
writer.uint32(10).string(message.owner);
|
|
200
210
|
}
|
|
201
211
|
return writer;
|
|
202
212
|
},
|
|
203
213
|
decode(input, length) {
|
|
204
|
-
const reader = input instanceof
|
|
214
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
205
215
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
206
216
|
const message = createBaseQueryOwnerResponse();
|
|
207
217
|
while (reader.pos < end) {
|
|
208
218
|
const tag = reader.uint32();
|
|
209
219
|
switch (tag >>> 3) {
|
|
210
|
-
case 1:
|
|
211
|
-
if (tag
|
|
220
|
+
case 1: {
|
|
221
|
+
if (tag !== 10) {
|
|
212
222
|
break;
|
|
213
223
|
}
|
|
214
224
|
message.owner = reader.string();
|
|
215
225
|
continue;
|
|
226
|
+
}
|
|
216
227
|
}
|
|
217
|
-
if ((tag & 7)
|
|
228
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
218
229
|
break;
|
|
219
230
|
}
|
|
220
|
-
reader.
|
|
231
|
+
reader.skip(tag & 7);
|
|
221
232
|
}
|
|
222
233
|
return message;
|
|
223
234
|
},
|
|
224
235
|
fromJSON(object) {
|
|
225
|
-
return {
|
|
236
|
+
return {
|
|
237
|
+
owner: isSet(object.owner) ? globalThis.String(object.owner) : "",
|
|
238
|
+
};
|
|
226
239
|
},
|
|
227
240
|
toJSON(message) {
|
|
228
241
|
const obj = {};
|
|
229
|
-
message.owner !==
|
|
242
|
+
if (message.owner !== "") {
|
|
243
|
+
obj.owner = message.owner;
|
|
244
|
+
}
|
|
230
245
|
return obj;
|
|
231
246
|
},
|
|
232
247
|
create(base) {
|
|
233
|
-
return exports.QueryOwnerResponse.fromPartial(base
|
|
248
|
+
return exports.QueryOwnerResponse.fromPartial(base ?? {});
|
|
234
249
|
},
|
|
235
250
|
fromPartial(object) {
|
|
236
|
-
var _a;
|
|
237
251
|
const message = createBaseQueryOwnerResponse();
|
|
238
|
-
message.owner =
|
|
252
|
+
message.owner = object.owner ?? "";
|
|
239
253
|
return message;
|
|
240
254
|
},
|
|
241
255
|
};
|
|
@@ -243,102 +257,105 @@ function createBaseQuerySupplyRequest() {
|
|
|
243
257
|
return { classId: "" };
|
|
244
258
|
}
|
|
245
259
|
exports.QuerySupplyRequest = {
|
|
246
|
-
encode(message, writer =
|
|
260
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
247
261
|
if (message.classId !== "") {
|
|
248
262
|
writer.uint32(10).string(message.classId);
|
|
249
263
|
}
|
|
250
264
|
return writer;
|
|
251
265
|
},
|
|
252
266
|
decode(input, length) {
|
|
253
|
-
const reader = input instanceof
|
|
267
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
254
268
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
255
269
|
const message = createBaseQuerySupplyRequest();
|
|
256
270
|
while (reader.pos < end) {
|
|
257
271
|
const tag = reader.uint32();
|
|
258
272
|
switch (tag >>> 3) {
|
|
259
|
-
case 1:
|
|
260
|
-
if (tag
|
|
273
|
+
case 1: {
|
|
274
|
+
if (tag !== 10) {
|
|
261
275
|
break;
|
|
262
276
|
}
|
|
263
277
|
message.classId = reader.string();
|
|
264
278
|
continue;
|
|
279
|
+
}
|
|
265
280
|
}
|
|
266
|
-
if ((tag & 7)
|
|
281
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
267
282
|
break;
|
|
268
283
|
}
|
|
269
|
-
reader.
|
|
284
|
+
reader.skip(tag & 7);
|
|
270
285
|
}
|
|
271
286
|
return message;
|
|
272
287
|
},
|
|
273
288
|
fromJSON(object) {
|
|
274
|
-
return {
|
|
289
|
+
return {
|
|
290
|
+
classId: isSet(object.classId) ? globalThis.String(object.classId) : "",
|
|
291
|
+
};
|
|
275
292
|
},
|
|
276
293
|
toJSON(message) {
|
|
277
294
|
const obj = {};
|
|
278
|
-
message.classId !==
|
|
295
|
+
if (message.classId !== "") {
|
|
296
|
+
obj.classId = message.classId;
|
|
297
|
+
}
|
|
279
298
|
return obj;
|
|
280
299
|
},
|
|
281
300
|
create(base) {
|
|
282
|
-
return exports.QuerySupplyRequest.fromPartial(base
|
|
301
|
+
return exports.QuerySupplyRequest.fromPartial(base ?? {});
|
|
283
302
|
},
|
|
284
303
|
fromPartial(object) {
|
|
285
|
-
var _a;
|
|
286
304
|
const message = createBaseQuerySupplyRequest();
|
|
287
|
-
message.classId =
|
|
305
|
+
message.classId = object.classId ?? "";
|
|
288
306
|
return message;
|
|
289
307
|
},
|
|
290
308
|
};
|
|
291
309
|
function createBaseQuerySupplyResponse() {
|
|
292
|
-
return { amount:
|
|
310
|
+
return { amount: 0 };
|
|
293
311
|
}
|
|
294
312
|
exports.QuerySupplyResponse = {
|
|
295
|
-
encode(message, writer =
|
|
296
|
-
if (
|
|
313
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
314
|
+
if (message.amount !== 0) {
|
|
297
315
|
writer.uint32(8).uint64(message.amount);
|
|
298
316
|
}
|
|
299
317
|
return writer;
|
|
300
318
|
},
|
|
301
319
|
decode(input, length) {
|
|
302
|
-
const reader = input instanceof
|
|
320
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
303
321
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
304
322
|
const message = createBaseQuerySupplyResponse();
|
|
305
323
|
while (reader.pos < end) {
|
|
306
324
|
const tag = reader.uint32();
|
|
307
325
|
switch (tag >>> 3) {
|
|
308
|
-
case 1:
|
|
309
|
-
if (tag
|
|
326
|
+
case 1: {
|
|
327
|
+
if (tag !== 8) {
|
|
310
328
|
break;
|
|
311
329
|
}
|
|
312
|
-
message.amount = reader.uint64();
|
|
330
|
+
message.amount = longToNumber(reader.uint64());
|
|
313
331
|
continue;
|
|
332
|
+
}
|
|
314
333
|
}
|
|
315
|
-
if ((tag & 7)
|
|
334
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
316
335
|
break;
|
|
317
336
|
}
|
|
318
|
-
reader.
|
|
337
|
+
reader.skip(tag & 7);
|
|
319
338
|
}
|
|
320
339
|
return message;
|
|
321
340
|
},
|
|
322
341
|
fromJSON(object) {
|
|
323
342
|
return {
|
|
324
|
-
amount: isSet(object.amount) ?
|
|
343
|
+
amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
|
|
325
344
|
};
|
|
326
345
|
},
|
|
327
346
|
toJSON(message) {
|
|
328
347
|
const obj = {};
|
|
329
|
-
message.amount !==
|
|
330
|
-
|
|
348
|
+
if (message.amount !== 0) {
|
|
349
|
+
obj.amount = Math.round(message.amount);
|
|
350
|
+
}
|
|
331
351
|
return obj;
|
|
332
352
|
},
|
|
333
353
|
create(base) {
|
|
334
|
-
return exports.QuerySupplyResponse.fromPartial(base
|
|
354
|
+
return exports.QuerySupplyResponse.fromPartial(base ?? {});
|
|
335
355
|
},
|
|
336
356
|
fromPartial(object) {
|
|
337
357
|
const message = createBaseQuerySupplyResponse();
|
|
338
|
-
message.amount =
|
|
339
|
-
object.amount !== undefined && object.amount !== null
|
|
340
|
-
? long_1.default.fromValue(object.amount)
|
|
341
|
-
: long_1.default.UZERO;
|
|
358
|
+
message.amount = object.amount ?? 0;
|
|
342
359
|
return message;
|
|
343
360
|
},
|
|
344
361
|
};
|
|
@@ -346,7 +363,7 @@ function createBaseQueryNFTsRequest() {
|
|
|
346
363
|
return { classId: "", owner: "", pagination: undefined };
|
|
347
364
|
}
|
|
348
365
|
exports.QueryNFTsRequest = {
|
|
349
|
-
encode(message, writer =
|
|
366
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
350
367
|
if (message.classId !== "") {
|
|
351
368
|
writer.uint32(10).string(message.classId);
|
|
352
369
|
}
|
|
@@ -359,42 +376,45 @@ exports.QueryNFTsRequest = {
|
|
|
359
376
|
return writer;
|
|
360
377
|
},
|
|
361
378
|
decode(input, length) {
|
|
362
|
-
const reader = input instanceof
|
|
379
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
363
380
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
364
381
|
const message = createBaseQueryNFTsRequest();
|
|
365
382
|
while (reader.pos < end) {
|
|
366
383
|
const tag = reader.uint32();
|
|
367
384
|
switch (tag >>> 3) {
|
|
368
|
-
case 1:
|
|
369
|
-
if (tag
|
|
385
|
+
case 1: {
|
|
386
|
+
if (tag !== 10) {
|
|
370
387
|
break;
|
|
371
388
|
}
|
|
372
389
|
message.classId = reader.string();
|
|
373
390
|
continue;
|
|
374
|
-
|
|
375
|
-
|
|
391
|
+
}
|
|
392
|
+
case 2: {
|
|
393
|
+
if (tag !== 18) {
|
|
376
394
|
break;
|
|
377
395
|
}
|
|
378
396
|
message.owner = reader.string();
|
|
379
397
|
continue;
|
|
380
|
-
|
|
381
|
-
|
|
398
|
+
}
|
|
399
|
+
case 3: {
|
|
400
|
+
if (tag !== 26) {
|
|
382
401
|
break;
|
|
383
402
|
}
|
|
384
403
|
message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
|
|
385
404
|
continue;
|
|
405
|
+
}
|
|
386
406
|
}
|
|
387
|
-
if ((tag & 7)
|
|
407
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
388
408
|
break;
|
|
389
409
|
}
|
|
390
|
-
reader.
|
|
410
|
+
reader.skip(tag & 7);
|
|
391
411
|
}
|
|
392
412
|
return message;
|
|
393
413
|
},
|
|
394
414
|
fromJSON(object) {
|
|
395
415
|
return {
|
|
396
|
-
classId: isSet(object.classId) ? String(object.classId) : "",
|
|
397
|
-
owner: isSet(object.owner) ? String(object.owner) : "",
|
|
416
|
+
classId: isSet(object.classId) ? globalThis.String(object.classId) : "",
|
|
417
|
+
owner: isSet(object.owner) ? globalThis.String(object.owner) : "",
|
|
398
418
|
pagination: isSet(object.pagination)
|
|
399
419
|
? pagination_1.PageRequest.fromJSON(object.pagination)
|
|
400
420
|
: undefined,
|
|
@@ -402,22 +422,24 @@ exports.QueryNFTsRequest = {
|
|
|
402
422
|
},
|
|
403
423
|
toJSON(message) {
|
|
404
424
|
const obj = {};
|
|
405
|
-
message.classId !==
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
425
|
+
if (message.classId !== "") {
|
|
426
|
+
obj.classId = message.classId;
|
|
427
|
+
}
|
|
428
|
+
if (message.owner !== "") {
|
|
429
|
+
obj.owner = message.owner;
|
|
430
|
+
}
|
|
431
|
+
if (message.pagination !== undefined) {
|
|
432
|
+
obj.pagination = pagination_1.PageRequest.toJSON(message.pagination);
|
|
433
|
+
}
|
|
411
434
|
return obj;
|
|
412
435
|
},
|
|
413
436
|
create(base) {
|
|
414
|
-
return exports.QueryNFTsRequest.fromPartial(base
|
|
437
|
+
return exports.QueryNFTsRequest.fromPartial(base ?? {});
|
|
415
438
|
},
|
|
416
439
|
fromPartial(object) {
|
|
417
|
-
var _a, _b;
|
|
418
440
|
const message = createBaseQueryNFTsRequest();
|
|
419
|
-
message.classId =
|
|
420
|
-
message.owner =
|
|
441
|
+
message.classId = object.classId ?? "";
|
|
442
|
+
message.owner = object.owner ?? "";
|
|
421
443
|
message.pagination =
|
|
422
444
|
object.pagination !== undefined && object.pagination !== null
|
|
423
445
|
? pagination_1.PageRequest.fromPartial(object.pagination)
|
|
@@ -429,7 +451,7 @@ function createBaseQueryNFTsResponse() {
|
|
|
429
451
|
return { nfts: [], pagination: undefined };
|
|
430
452
|
}
|
|
431
453
|
exports.QueryNFTsResponse = {
|
|
432
|
-
encode(message, writer =
|
|
454
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
433
455
|
for (const v of message.nfts) {
|
|
434
456
|
nft_1.NFT.encode(v, writer.uint32(10).fork()).ldelim();
|
|
435
457
|
}
|
|
@@ -439,35 +461,37 @@ exports.QueryNFTsResponse = {
|
|
|
439
461
|
return writer;
|
|
440
462
|
},
|
|
441
463
|
decode(input, length) {
|
|
442
|
-
const reader = input instanceof
|
|
464
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
443
465
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
444
466
|
const message = createBaseQueryNFTsResponse();
|
|
445
467
|
while (reader.pos < end) {
|
|
446
468
|
const tag = reader.uint32();
|
|
447
469
|
switch (tag >>> 3) {
|
|
448
|
-
case 1:
|
|
449
|
-
if (tag
|
|
470
|
+
case 1: {
|
|
471
|
+
if (tag !== 10) {
|
|
450
472
|
break;
|
|
451
473
|
}
|
|
452
474
|
message.nfts.push(nft_1.NFT.decode(reader, reader.uint32()));
|
|
453
475
|
continue;
|
|
454
|
-
|
|
455
|
-
|
|
476
|
+
}
|
|
477
|
+
case 2: {
|
|
478
|
+
if (tag !== 18) {
|
|
456
479
|
break;
|
|
457
480
|
}
|
|
458
481
|
message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
|
|
459
482
|
continue;
|
|
483
|
+
}
|
|
460
484
|
}
|
|
461
|
-
if ((tag & 7)
|
|
485
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
462
486
|
break;
|
|
463
487
|
}
|
|
464
|
-
reader.
|
|
488
|
+
reader.skip(tag & 7);
|
|
465
489
|
}
|
|
466
490
|
return message;
|
|
467
491
|
},
|
|
468
492
|
fromJSON(object) {
|
|
469
493
|
return {
|
|
470
|
-
nfts: Array.isArray(object
|
|
494
|
+
nfts: globalThis.Array.isArray(object?.nfts)
|
|
471
495
|
? object.nfts.map((e) => nft_1.NFT.fromJSON(e))
|
|
472
496
|
: [],
|
|
473
497
|
pagination: isSet(object.pagination)
|
|
@@ -477,25 +501,20 @@ exports.QueryNFTsResponse = {
|
|
|
477
501
|
},
|
|
478
502
|
toJSON(message) {
|
|
479
503
|
const obj = {};
|
|
480
|
-
if (message.nfts) {
|
|
481
|
-
obj.nfts = message.nfts.map((e) =>
|
|
504
|
+
if (message.nfts?.length) {
|
|
505
|
+
obj.nfts = message.nfts.map((e) => nft_1.NFT.toJSON(e));
|
|
482
506
|
}
|
|
483
|
-
|
|
484
|
-
obj.
|
|
507
|
+
if (message.pagination !== undefined) {
|
|
508
|
+
obj.pagination = pagination_1.PageResponse.toJSON(message.pagination);
|
|
485
509
|
}
|
|
486
|
-
message.pagination !== undefined &&
|
|
487
|
-
(obj.pagination = message.pagination
|
|
488
|
-
? pagination_1.PageResponse.toJSON(message.pagination)
|
|
489
|
-
: undefined);
|
|
490
510
|
return obj;
|
|
491
511
|
},
|
|
492
512
|
create(base) {
|
|
493
|
-
return exports.QueryNFTsResponse.fromPartial(base
|
|
513
|
+
return exports.QueryNFTsResponse.fromPartial(base ?? {});
|
|
494
514
|
},
|
|
495
515
|
fromPartial(object) {
|
|
496
|
-
var _a;
|
|
497
516
|
const message = createBaseQueryNFTsResponse();
|
|
498
|
-
message.nfts =
|
|
517
|
+
message.nfts = object.nfts?.map((e) => nft_1.NFT.fromPartial(e)) || [];
|
|
499
518
|
message.pagination =
|
|
500
519
|
object.pagination !== undefined && object.pagination !== null
|
|
501
520
|
? pagination_1.PageResponse.fromPartial(object.pagination)
|
|
@@ -507,7 +526,7 @@ function createBaseQueryNFTRequest() {
|
|
|
507
526
|
return { classId: "", id: "" };
|
|
508
527
|
}
|
|
509
528
|
exports.QueryNFTRequest = {
|
|
510
|
-
encode(message, writer =
|
|
529
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
511
530
|
if (message.classId !== "") {
|
|
512
531
|
writer.uint32(10).string(message.classId);
|
|
513
532
|
}
|
|
@@ -517,52 +536,57 @@ exports.QueryNFTRequest = {
|
|
|
517
536
|
return writer;
|
|
518
537
|
},
|
|
519
538
|
decode(input, length) {
|
|
520
|
-
const reader = input instanceof
|
|
539
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
521
540
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
522
541
|
const message = createBaseQueryNFTRequest();
|
|
523
542
|
while (reader.pos < end) {
|
|
524
543
|
const tag = reader.uint32();
|
|
525
544
|
switch (tag >>> 3) {
|
|
526
|
-
case 1:
|
|
527
|
-
if (tag
|
|
545
|
+
case 1: {
|
|
546
|
+
if (tag !== 10) {
|
|
528
547
|
break;
|
|
529
548
|
}
|
|
530
549
|
message.classId = reader.string();
|
|
531
550
|
continue;
|
|
532
|
-
|
|
533
|
-
|
|
551
|
+
}
|
|
552
|
+
case 2: {
|
|
553
|
+
if (tag !== 18) {
|
|
534
554
|
break;
|
|
535
555
|
}
|
|
536
556
|
message.id = reader.string();
|
|
537
557
|
continue;
|
|
558
|
+
}
|
|
538
559
|
}
|
|
539
|
-
if ((tag & 7)
|
|
560
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
540
561
|
break;
|
|
541
562
|
}
|
|
542
|
-
reader.
|
|
563
|
+
reader.skip(tag & 7);
|
|
543
564
|
}
|
|
544
565
|
return message;
|
|
545
566
|
},
|
|
546
567
|
fromJSON(object) {
|
|
547
568
|
return {
|
|
548
|
-
classId: isSet(object.classId) ? String(object.classId) : "",
|
|
549
|
-
id: isSet(object.id) ? String(object.id) : "",
|
|
569
|
+
classId: isSet(object.classId) ? globalThis.String(object.classId) : "",
|
|
570
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
550
571
|
};
|
|
551
572
|
},
|
|
552
573
|
toJSON(message) {
|
|
553
574
|
const obj = {};
|
|
554
|
-
message.classId !==
|
|
555
|
-
|
|
575
|
+
if (message.classId !== "") {
|
|
576
|
+
obj.classId = message.classId;
|
|
577
|
+
}
|
|
578
|
+
if (message.id !== "") {
|
|
579
|
+
obj.id = message.id;
|
|
580
|
+
}
|
|
556
581
|
return obj;
|
|
557
582
|
},
|
|
558
583
|
create(base) {
|
|
559
|
-
return exports.QueryNFTRequest.fromPartial(base
|
|
584
|
+
return exports.QueryNFTRequest.fromPartial(base ?? {});
|
|
560
585
|
},
|
|
561
586
|
fromPartial(object) {
|
|
562
|
-
var _a, _b;
|
|
563
587
|
const message = createBaseQueryNFTRequest();
|
|
564
|
-
message.classId =
|
|
565
|
-
message.id =
|
|
588
|
+
message.classId = object.classId ?? "";
|
|
589
|
+
message.id = object.id ?? "";
|
|
566
590
|
return message;
|
|
567
591
|
},
|
|
568
592
|
};
|
|
@@ -570,30 +594,31 @@ function createBaseQueryNFTResponse() {
|
|
|
570
594
|
return { nft: undefined };
|
|
571
595
|
}
|
|
572
596
|
exports.QueryNFTResponse = {
|
|
573
|
-
encode(message, writer =
|
|
597
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
574
598
|
if (message.nft !== undefined) {
|
|
575
599
|
nft_1.NFT.encode(message.nft, writer.uint32(10).fork()).ldelim();
|
|
576
600
|
}
|
|
577
601
|
return writer;
|
|
578
602
|
},
|
|
579
603
|
decode(input, length) {
|
|
580
|
-
const reader = input instanceof
|
|
604
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
581
605
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
582
606
|
const message = createBaseQueryNFTResponse();
|
|
583
607
|
while (reader.pos < end) {
|
|
584
608
|
const tag = reader.uint32();
|
|
585
609
|
switch (tag >>> 3) {
|
|
586
|
-
case 1:
|
|
587
|
-
if (tag
|
|
610
|
+
case 1: {
|
|
611
|
+
if (tag !== 10) {
|
|
588
612
|
break;
|
|
589
613
|
}
|
|
590
614
|
message.nft = nft_1.NFT.decode(reader, reader.uint32());
|
|
591
615
|
continue;
|
|
616
|
+
}
|
|
592
617
|
}
|
|
593
|
-
if ((tag & 7)
|
|
618
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
594
619
|
break;
|
|
595
620
|
}
|
|
596
|
-
reader.
|
|
621
|
+
reader.skip(tag & 7);
|
|
597
622
|
}
|
|
598
623
|
return message;
|
|
599
624
|
},
|
|
@@ -602,12 +627,13 @@ exports.QueryNFTResponse = {
|
|
|
602
627
|
},
|
|
603
628
|
toJSON(message) {
|
|
604
629
|
const obj = {};
|
|
605
|
-
message.nft !== undefined
|
|
606
|
-
|
|
630
|
+
if (message.nft !== undefined) {
|
|
631
|
+
obj.nft = nft_1.NFT.toJSON(message.nft);
|
|
632
|
+
}
|
|
607
633
|
return obj;
|
|
608
634
|
},
|
|
609
635
|
create(base) {
|
|
610
|
-
return exports.QueryNFTResponse.fromPartial(base
|
|
636
|
+
return exports.QueryNFTResponse.fromPartial(base ?? {});
|
|
611
637
|
},
|
|
612
638
|
fromPartial(object) {
|
|
613
639
|
const message = createBaseQueryNFTResponse();
|
|
@@ -622,48 +648,52 @@ function createBaseQueryClassRequest() {
|
|
|
622
648
|
return { classId: "" };
|
|
623
649
|
}
|
|
624
650
|
exports.QueryClassRequest = {
|
|
625
|
-
encode(message, writer =
|
|
651
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
626
652
|
if (message.classId !== "") {
|
|
627
653
|
writer.uint32(10).string(message.classId);
|
|
628
654
|
}
|
|
629
655
|
return writer;
|
|
630
656
|
},
|
|
631
657
|
decode(input, length) {
|
|
632
|
-
const reader = input instanceof
|
|
658
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
633
659
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
634
660
|
const message = createBaseQueryClassRequest();
|
|
635
661
|
while (reader.pos < end) {
|
|
636
662
|
const tag = reader.uint32();
|
|
637
663
|
switch (tag >>> 3) {
|
|
638
|
-
case 1:
|
|
639
|
-
if (tag
|
|
664
|
+
case 1: {
|
|
665
|
+
if (tag !== 10) {
|
|
640
666
|
break;
|
|
641
667
|
}
|
|
642
668
|
message.classId = reader.string();
|
|
643
669
|
continue;
|
|
670
|
+
}
|
|
644
671
|
}
|
|
645
|
-
if ((tag & 7)
|
|
672
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
646
673
|
break;
|
|
647
674
|
}
|
|
648
|
-
reader.
|
|
675
|
+
reader.skip(tag & 7);
|
|
649
676
|
}
|
|
650
677
|
return message;
|
|
651
678
|
},
|
|
652
679
|
fromJSON(object) {
|
|
653
|
-
return {
|
|
680
|
+
return {
|
|
681
|
+
classId: isSet(object.classId) ? globalThis.String(object.classId) : "",
|
|
682
|
+
};
|
|
654
683
|
},
|
|
655
684
|
toJSON(message) {
|
|
656
685
|
const obj = {};
|
|
657
|
-
message.classId !==
|
|
686
|
+
if (message.classId !== "") {
|
|
687
|
+
obj.classId = message.classId;
|
|
688
|
+
}
|
|
658
689
|
return obj;
|
|
659
690
|
},
|
|
660
691
|
create(base) {
|
|
661
|
-
return exports.QueryClassRequest.fromPartial(base
|
|
692
|
+
return exports.QueryClassRequest.fromPartial(base ?? {});
|
|
662
693
|
},
|
|
663
694
|
fromPartial(object) {
|
|
664
|
-
var _a;
|
|
665
695
|
const message = createBaseQueryClassRequest();
|
|
666
|
-
message.classId =
|
|
696
|
+
message.classId = object.classId ?? "";
|
|
667
697
|
return message;
|
|
668
698
|
},
|
|
669
699
|
};
|
|
@@ -671,30 +701,31 @@ function createBaseQueryClassResponse() {
|
|
|
671
701
|
return { class: undefined };
|
|
672
702
|
}
|
|
673
703
|
exports.QueryClassResponse = {
|
|
674
|
-
encode(message, writer =
|
|
704
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
675
705
|
if (message.class !== undefined) {
|
|
676
706
|
nft_1.Class.encode(message.class, writer.uint32(10).fork()).ldelim();
|
|
677
707
|
}
|
|
678
708
|
return writer;
|
|
679
709
|
},
|
|
680
710
|
decode(input, length) {
|
|
681
|
-
const reader = input instanceof
|
|
711
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
682
712
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
683
713
|
const message = createBaseQueryClassResponse();
|
|
684
714
|
while (reader.pos < end) {
|
|
685
715
|
const tag = reader.uint32();
|
|
686
716
|
switch (tag >>> 3) {
|
|
687
|
-
case 1:
|
|
688
|
-
if (tag
|
|
717
|
+
case 1: {
|
|
718
|
+
if (tag !== 10) {
|
|
689
719
|
break;
|
|
690
720
|
}
|
|
691
721
|
message.class = nft_1.Class.decode(reader, reader.uint32());
|
|
692
722
|
continue;
|
|
723
|
+
}
|
|
693
724
|
}
|
|
694
|
-
if ((tag & 7)
|
|
725
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
695
726
|
break;
|
|
696
727
|
}
|
|
697
|
-
reader.
|
|
728
|
+
reader.skip(tag & 7);
|
|
698
729
|
}
|
|
699
730
|
return message;
|
|
700
731
|
},
|
|
@@ -705,12 +736,13 @@ exports.QueryClassResponse = {
|
|
|
705
736
|
},
|
|
706
737
|
toJSON(message) {
|
|
707
738
|
const obj = {};
|
|
708
|
-
message.class !== undefined
|
|
709
|
-
|
|
739
|
+
if (message.class !== undefined) {
|
|
740
|
+
obj.class = nft_1.Class.toJSON(message.class);
|
|
741
|
+
}
|
|
710
742
|
return obj;
|
|
711
743
|
},
|
|
712
744
|
create(base) {
|
|
713
|
-
return exports.QueryClassResponse.fromPartial(base
|
|
745
|
+
return exports.QueryClassResponse.fromPartial(base ?? {});
|
|
714
746
|
},
|
|
715
747
|
fromPartial(object) {
|
|
716
748
|
const message = createBaseQueryClassResponse();
|
|
@@ -725,30 +757,31 @@ function createBaseQueryClassesRequest() {
|
|
|
725
757
|
return { pagination: undefined };
|
|
726
758
|
}
|
|
727
759
|
exports.QueryClassesRequest = {
|
|
728
|
-
encode(message, writer =
|
|
760
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
729
761
|
if (message.pagination !== undefined) {
|
|
730
762
|
pagination_1.PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
731
763
|
}
|
|
732
764
|
return writer;
|
|
733
765
|
},
|
|
734
766
|
decode(input, length) {
|
|
735
|
-
const reader = input instanceof
|
|
767
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
736
768
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
737
769
|
const message = createBaseQueryClassesRequest();
|
|
738
770
|
while (reader.pos < end) {
|
|
739
771
|
const tag = reader.uint32();
|
|
740
772
|
switch (tag >>> 3) {
|
|
741
|
-
case 1:
|
|
742
|
-
if (tag
|
|
773
|
+
case 1: {
|
|
774
|
+
if (tag !== 10) {
|
|
743
775
|
break;
|
|
744
776
|
}
|
|
745
777
|
message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
|
|
746
778
|
continue;
|
|
779
|
+
}
|
|
747
780
|
}
|
|
748
|
-
if ((tag & 7)
|
|
781
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
749
782
|
break;
|
|
750
783
|
}
|
|
751
|
-
reader.
|
|
784
|
+
reader.skip(tag & 7);
|
|
752
785
|
}
|
|
753
786
|
return message;
|
|
754
787
|
},
|
|
@@ -761,14 +794,13 @@ exports.QueryClassesRequest = {
|
|
|
761
794
|
},
|
|
762
795
|
toJSON(message) {
|
|
763
796
|
const obj = {};
|
|
764
|
-
message.pagination !== undefined
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
: undefined);
|
|
797
|
+
if (message.pagination !== undefined) {
|
|
798
|
+
obj.pagination = pagination_1.PageRequest.toJSON(message.pagination);
|
|
799
|
+
}
|
|
768
800
|
return obj;
|
|
769
801
|
},
|
|
770
802
|
create(base) {
|
|
771
|
-
return exports.QueryClassesRequest.fromPartial(base
|
|
803
|
+
return exports.QueryClassesRequest.fromPartial(base ?? {});
|
|
772
804
|
},
|
|
773
805
|
fromPartial(object) {
|
|
774
806
|
const message = createBaseQueryClassesRequest();
|
|
@@ -783,7 +815,7 @@ function createBaseQueryClassesResponse() {
|
|
|
783
815
|
return { classes: [], pagination: undefined };
|
|
784
816
|
}
|
|
785
817
|
exports.QueryClassesResponse = {
|
|
786
|
-
encode(message, writer =
|
|
818
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
787
819
|
for (const v of message.classes) {
|
|
788
820
|
nft_1.Class.encode(v, writer.uint32(10).fork()).ldelim();
|
|
789
821
|
}
|
|
@@ -793,35 +825,37 @@ exports.QueryClassesResponse = {
|
|
|
793
825
|
return writer;
|
|
794
826
|
},
|
|
795
827
|
decode(input, length) {
|
|
796
|
-
const reader = input instanceof
|
|
828
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
797
829
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
798
830
|
const message = createBaseQueryClassesResponse();
|
|
799
831
|
while (reader.pos < end) {
|
|
800
832
|
const tag = reader.uint32();
|
|
801
833
|
switch (tag >>> 3) {
|
|
802
|
-
case 1:
|
|
803
|
-
if (tag
|
|
834
|
+
case 1: {
|
|
835
|
+
if (tag !== 10) {
|
|
804
836
|
break;
|
|
805
837
|
}
|
|
806
838
|
message.classes.push(nft_1.Class.decode(reader, reader.uint32()));
|
|
807
839
|
continue;
|
|
808
|
-
|
|
809
|
-
|
|
840
|
+
}
|
|
841
|
+
case 2: {
|
|
842
|
+
if (tag !== 18) {
|
|
810
843
|
break;
|
|
811
844
|
}
|
|
812
845
|
message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
|
|
813
846
|
continue;
|
|
847
|
+
}
|
|
814
848
|
}
|
|
815
|
-
if ((tag & 7)
|
|
849
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
816
850
|
break;
|
|
817
851
|
}
|
|
818
|
-
reader.
|
|
852
|
+
reader.skip(tag & 7);
|
|
819
853
|
}
|
|
820
854
|
return message;
|
|
821
855
|
},
|
|
822
856
|
fromJSON(object) {
|
|
823
857
|
return {
|
|
824
|
-
classes: Array.isArray(object
|
|
858
|
+
classes: globalThis.Array.isArray(object?.classes)
|
|
825
859
|
? object.classes.map((e) => nft_1.Class.fromJSON(e))
|
|
826
860
|
: [],
|
|
827
861
|
pagination: isSet(object.pagination)
|
|
@@ -831,25 +865,20 @@ exports.QueryClassesResponse = {
|
|
|
831
865
|
},
|
|
832
866
|
toJSON(message) {
|
|
833
867
|
const obj = {};
|
|
834
|
-
if (message.classes) {
|
|
835
|
-
obj.classes = message.classes.map((e) =>
|
|
868
|
+
if (message.classes?.length) {
|
|
869
|
+
obj.classes = message.classes.map((e) => nft_1.Class.toJSON(e));
|
|
836
870
|
}
|
|
837
|
-
|
|
838
|
-
obj.
|
|
871
|
+
if (message.pagination !== undefined) {
|
|
872
|
+
obj.pagination = pagination_1.PageResponse.toJSON(message.pagination);
|
|
839
873
|
}
|
|
840
|
-
message.pagination !== undefined &&
|
|
841
|
-
(obj.pagination = message.pagination
|
|
842
|
-
? pagination_1.PageResponse.toJSON(message.pagination)
|
|
843
|
-
: undefined);
|
|
844
874
|
return obj;
|
|
845
875
|
},
|
|
846
876
|
create(base) {
|
|
847
|
-
return exports.QueryClassesResponse.fromPartial(base
|
|
877
|
+
return exports.QueryClassesResponse.fromPartial(base ?? {});
|
|
848
878
|
},
|
|
849
879
|
fromPartial(object) {
|
|
850
|
-
var _a;
|
|
851
880
|
const message = createBaseQueryClassesResponse();
|
|
852
|
-
message.classes =
|
|
881
|
+
message.classes = object.classes?.map((e) => nft_1.Class.fromPartial(e)) || [];
|
|
853
882
|
message.pagination =
|
|
854
883
|
object.pagination !== undefined && object.pagination !== null
|
|
855
884
|
? pagination_1.PageResponse.fromPartial(object.pagination)
|
|
@@ -857,9 +886,10 @@ exports.QueryClassesResponse = {
|
|
|
857
886
|
return message;
|
|
858
887
|
},
|
|
859
888
|
};
|
|
889
|
+
exports.QueryServiceName = "cosmos.nft.v1beta1.Query";
|
|
860
890
|
class QueryClientImpl {
|
|
861
891
|
constructor(rpc, opts) {
|
|
862
|
-
this.service =
|
|
892
|
+
this.service = opts?.service || exports.QueryServiceName;
|
|
863
893
|
this.rpc = rpc;
|
|
864
894
|
this.Balance = this.Balance.bind(this);
|
|
865
895
|
this.Owner = this.Owner.bind(this);
|
|
@@ -872,43 +902,49 @@ class QueryClientImpl {
|
|
|
872
902
|
Balance(request) {
|
|
873
903
|
const data = exports.QueryBalanceRequest.encode(request).finish();
|
|
874
904
|
const promise = this.rpc.request(this.service, "Balance", data);
|
|
875
|
-
return promise.then((data) => exports.QueryBalanceResponse.decode(
|
|
905
|
+
return promise.then((data) => exports.QueryBalanceResponse.decode(new binary_1.BinaryReader(data)));
|
|
876
906
|
}
|
|
877
907
|
Owner(request) {
|
|
878
908
|
const data = exports.QueryOwnerRequest.encode(request).finish();
|
|
879
909
|
const promise = this.rpc.request(this.service, "Owner", data);
|
|
880
|
-
return promise.then((data) => exports.QueryOwnerResponse.decode(
|
|
910
|
+
return promise.then((data) => exports.QueryOwnerResponse.decode(new binary_1.BinaryReader(data)));
|
|
881
911
|
}
|
|
882
912
|
Supply(request) {
|
|
883
913
|
const data = exports.QuerySupplyRequest.encode(request).finish();
|
|
884
914
|
const promise = this.rpc.request(this.service, "Supply", data);
|
|
885
|
-
return promise.then((data) => exports.QuerySupplyResponse.decode(
|
|
915
|
+
return promise.then((data) => exports.QuerySupplyResponse.decode(new binary_1.BinaryReader(data)));
|
|
886
916
|
}
|
|
887
917
|
NFTs(request) {
|
|
888
918
|
const data = exports.QueryNFTsRequest.encode(request).finish();
|
|
889
919
|
const promise = this.rpc.request(this.service, "NFTs", data);
|
|
890
|
-
return promise.then((data) => exports.QueryNFTsResponse.decode(
|
|
920
|
+
return promise.then((data) => exports.QueryNFTsResponse.decode(new binary_1.BinaryReader(data)));
|
|
891
921
|
}
|
|
892
922
|
NFT(request) {
|
|
893
923
|
const data = exports.QueryNFTRequest.encode(request).finish();
|
|
894
924
|
const promise = this.rpc.request(this.service, "NFT", data);
|
|
895
|
-
return promise.then((data) => exports.QueryNFTResponse.decode(
|
|
925
|
+
return promise.then((data) => exports.QueryNFTResponse.decode(new binary_1.BinaryReader(data)));
|
|
896
926
|
}
|
|
897
927
|
Class(request) {
|
|
898
928
|
const data = exports.QueryClassRequest.encode(request).finish();
|
|
899
929
|
const promise = this.rpc.request(this.service, "Class", data);
|
|
900
|
-
return promise.then((data) => exports.QueryClassResponse.decode(
|
|
930
|
+
return promise.then((data) => exports.QueryClassResponse.decode(new binary_1.BinaryReader(data)));
|
|
901
931
|
}
|
|
902
932
|
Classes(request) {
|
|
903
933
|
const data = exports.QueryClassesRequest.encode(request).finish();
|
|
904
934
|
const promise = this.rpc.request(this.service, "Classes", data);
|
|
905
|
-
return promise.then((data) => exports.QueryClassesResponse.decode(
|
|
935
|
+
return promise.then((data) => exports.QueryClassesResponse.decode(new binary_1.BinaryReader(data)));
|
|
906
936
|
}
|
|
907
937
|
}
|
|
908
938
|
exports.QueryClientImpl = QueryClientImpl;
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
939
|
+
function longToNumber(int64) {
|
|
940
|
+
const num = globalThis.Number(int64.toString());
|
|
941
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
942
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
943
|
+
}
|
|
944
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
945
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
946
|
+
}
|
|
947
|
+
return num;
|
|
912
948
|
}
|
|
913
949
|
function isSet(value) {
|
|
914
950
|
return value !== null && value !== undefined;
|