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