@iconlake/client 0.1.12 → 0.1.13
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/index.iife.js +4 -4
- package/dist/index.js +4 -4
- package/dist/index.mjs +4514 -3939
- package/dist/index.umd.js +4 -4
- package/package.json +1 -1
- package/types/iconlake.drop/types/iconlake/drop/info.d.ts +17 -0
- package/types/iconlake.drop/types.d.ts +2 -1
- package/types/iconlake.icon/rest.d.ts +280 -1
- package/types/iconlake.icon/types/cosmos/nft/v1beta1/nft.d.ts +104 -0
- package/types/iconlake.icon/types/cosmos/nft/v1beta1/query.d.ts +527 -0
- package/types/iconlake.icon/types/google/protobuf/any.d.ts +143 -0
- package/types/iconlake.icon/types/iconlake/icon/class_data.d.ts +20 -3
- package/types/iconlake.icon/types/iconlake/icon/icon_data.d.ts +26 -3
- package/types/iconlake.icon/types/iconlake/icon/query.d.ts +402 -1
- package/types/iconlake.icon/types/iconlake/icon/tx.d.ts +7 -20
- package/types/iconlake.icon/types.d.ts +7 -1
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination";
|
|
3
|
+
import { Class, NFT } from "./nft";
|
|
4
|
+
export declare const protobufPackage = "cosmos.nft.v1beta1";
|
|
5
|
+
/** QueryBalanceRequest is the request type for the Query/Balance RPC method */
|
|
6
|
+
export interface QueryBalanceRequest {
|
|
7
|
+
/** class_id associated with the nft */
|
|
8
|
+
classId: string;
|
|
9
|
+
/** owner is the owner address of the nft */
|
|
10
|
+
owner: string;
|
|
11
|
+
}
|
|
12
|
+
/** QueryBalanceResponse is the response type for the Query/Balance RPC method */
|
|
13
|
+
export interface QueryBalanceResponse {
|
|
14
|
+
/** amount is the number of all NFTs of a given class owned by the owner */
|
|
15
|
+
amount: number;
|
|
16
|
+
}
|
|
17
|
+
/** QueryOwnerRequest is the request type for the Query/Owner RPC method */
|
|
18
|
+
export interface QueryOwnerRequest {
|
|
19
|
+
/** class_id associated with the nft */
|
|
20
|
+
classId: string;
|
|
21
|
+
/** id is a unique identifier of the NFT */
|
|
22
|
+
id: string;
|
|
23
|
+
}
|
|
24
|
+
/** QueryOwnerResponse is the response type for the Query/Owner RPC method */
|
|
25
|
+
export interface QueryOwnerResponse {
|
|
26
|
+
/** owner is the owner address of the nft */
|
|
27
|
+
owner: string;
|
|
28
|
+
}
|
|
29
|
+
/** QuerySupplyRequest is the request type for the Query/Supply RPC method */
|
|
30
|
+
export interface QuerySupplyRequest {
|
|
31
|
+
/** class_id associated with the nft */
|
|
32
|
+
classId: string;
|
|
33
|
+
}
|
|
34
|
+
/** QuerySupplyResponse is the response type for the Query/Supply RPC method */
|
|
35
|
+
export interface QuerySupplyResponse {
|
|
36
|
+
/** amount is the number of all NFTs from the given class */
|
|
37
|
+
amount: number;
|
|
38
|
+
}
|
|
39
|
+
/** QueryNFTstRequest is the request type for the Query/NFTs RPC method */
|
|
40
|
+
export interface QueryNFTsRequest {
|
|
41
|
+
/** class_id associated with the nft */
|
|
42
|
+
classId: string;
|
|
43
|
+
/** owner is the owner address of the nft */
|
|
44
|
+
owner: string;
|
|
45
|
+
/** pagination defines an optional pagination for the request. */
|
|
46
|
+
pagination: PageRequest | undefined;
|
|
47
|
+
}
|
|
48
|
+
/** QueryNFTsResponse is the response type for the Query/NFTs RPC methods */
|
|
49
|
+
export interface QueryNFTsResponse {
|
|
50
|
+
/** NFT defines the NFT */
|
|
51
|
+
nfts: NFT[];
|
|
52
|
+
/** pagination defines the pagination in the response. */
|
|
53
|
+
pagination: PageResponse | undefined;
|
|
54
|
+
}
|
|
55
|
+
/** QueryNFTRequest is the request type for the Query/NFT RPC method */
|
|
56
|
+
export interface QueryNFTRequest {
|
|
57
|
+
/** class_id associated with the nft */
|
|
58
|
+
classId: string;
|
|
59
|
+
/** id is a unique identifier of the NFT */
|
|
60
|
+
id: string;
|
|
61
|
+
}
|
|
62
|
+
/** QueryNFTResponse is the response type for the Query/NFT RPC method */
|
|
63
|
+
export interface QueryNFTResponse {
|
|
64
|
+
/** owner is the owner address of the nft */
|
|
65
|
+
nft: NFT | undefined;
|
|
66
|
+
}
|
|
67
|
+
/** QueryClassRequest is the request type for the Query/Class RPC method */
|
|
68
|
+
export interface QueryClassRequest {
|
|
69
|
+
/** class_id associated with the nft */
|
|
70
|
+
classId: string;
|
|
71
|
+
}
|
|
72
|
+
/** QueryClassResponse is the response type for the Query/Class RPC method */
|
|
73
|
+
export interface QueryClassResponse {
|
|
74
|
+
/** class defines the class of the nft type. */
|
|
75
|
+
class: Class | undefined;
|
|
76
|
+
}
|
|
77
|
+
/** QueryClassesRequest is the request type for the Query/Classes RPC method */
|
|
78
|
+
export interface QueryClassesRequest {
|
|
79
|
+
/** pagination defines an optional pagination for the request. */
|
|
80
|
+
pagination: PageRequest | undefined;
|
|
81
|
+
}
|
|
82
|
+
/** QueryClassesResponse is the response type for the Query/Classes RPC method */
|
|
83
|
+
export interface QueryClassesResponse {
|
|
84
|
+
/** class defines the class of the nft type. */
|
|
85
|
+
classes: Class[];
|
|
86
|
+
/** pagination defines the pagination in the response. */
|
|
87
|
+
pagination: PageResponse | undefined;
|
|
88
|
+
}
|
|
89
|
+
export declare const QueryBalanceRequest: {
|
|
90
|
+
encode(message: QueryBalanceRequest, writer?: _m0.Writer): _m0.Writer;
|
|
91
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryBalanceRequest;
|
|
92
|
+
fromJSON(object: any): QueryBalanceRequest;
|
|
93
|
+
toJSON(message: QueryBalanceRequest): unknown;
|
|
94
|
+
fromPartial<I extends {
|
|
95
|
+
classId?: string;
|
|
96
|
+
owner?: string;
|
|
97
|
+
} & {
|
|
98
|
+
classId?: string;
|
|
99
|
+
owner?: string;
|
|
100
|
+
} & { [K in Exclude<keyof I, keyof QueryBalanceRequest>]: never; }>(object: I): QueryBalanceRequest;
|
|
101
|
+
};
|
|
102
|
+
export declare const QueryBalanceResponse: {
|
|
103
|
+
encode(message: QueryBalanceResponse, writer?: _m0.Writer): _m0.Writer;
|
|
104
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryBalanceResponse;
|
|
105
|
+
fromJSON(object: any): QueryBalanceResponse;
|
|
106
|
+
toJSON(message: QueryBalanceResponse): unknown;
|
|
107
|
+
fromPartial<I extends {
|
|
108
|
+
amount?: number;
|
|
109
|
+
} & {
|
|
110
|
+
amount?: number;
|
|
111
|
+
} & { [K in Exclude<keyof I, "amount">]: never; }>(object: I): QueryBalanceResponse;
|
|
112
|
+
};
|
|
113
|
+
export declare const QueryOwnerRequest: {
|
|
114
|
+
encode(message: QueryOwnerRequest, writer?: _m0.Writer): _m0.Writer;
|
|
115
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryOwnerRequest;
|
|
116
|
+
fromJSON(object: any): QueryOwnerRequest;
|
|
117
|
+
toJSON(message: QueryOwnerRequest): unknown;
|
|
118
|
+
fromPartial<I extends {
|
|
119
|
+
classId?: string;
|
|
120
|
+
id?: string;
|
|
121
|
+
} & {
|
|
122
|
+
classId?: string;
|
|
123
|
+
id?: string;
|
|
124
|
+
} & { [K in Exclude<keyof I, keyof QueryOwnerRequest>]: never; }>(object: I): QueryOwnerRequest;
|
|
125
|
+
};
|
|
126
|
+
export declare const QueryOwnerResponse: {
|
|
127
|
+
encode(message: QueryOwnerResponse, writer?: _m0.Writer): _m0.Writer;
|
|
128
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryOwnerResponse;
|
|
129
|
+
fromJSON(object: any): QueryOwnerResponse;
|
|
130
|
+
toJSON(message: QueryOwnerResponse): unknown;
|
|
131
|
+
fromPartial<I extends {
|
|
132
|
+
owner?: string;
|
|
133
|
+
} & {
|
|
134
|
+
owner?: string;
|
|
135
|
+
} & { [K in Exclude<keyof I, "owner">]: never; }>(object: I): QueryOwnerResponse;
|
|
136
|
+
};
|
|
137
|
+
export declare const QuerySupplyRequest: {
|
|
138
|
+
encode(message: QuerySupplyRequest, writer?: _m0.Writer): _m0.Writer;
|
|
139
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QuerySupplyRequest;
|
|
140
|
+
fromJSON(object: any): QuerySupplyRequest;
|
|
141
|
+
toJSON(message: QuerySupplyRequest): unknown;
|
|
142
|
+
fromPartial<I extends {
|
|
143
|
+
classId?: string;
|
|
144
|
+
} & {
|
|
145
|
+
classId?: string;
|
|
146
|
+
} & { [K in Exclude<keyof I, "classId">]: never; }>(object: I): QuerySupplyRequest;
|
|
147
|
+
};
|
|
148
|
+
export declare const QuerySupplyResponse: {
|
|
149
|
+
encode(message: QuerySupplyResponse, writer?: _m0.Writer): _m0.Writer;
|
|
150
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QuerySupplyResponse;
|
|
151
|
+
fromJSON(object: any): QuerySupplyResponse;
|
|
152
|
+
toJSON(message: QuerySupplyResponse): unknown;
|
|
153
|
+
fromPartial<I extends {
|
|
154
|
+
amount?: number;
|
|
155
|
+
} & {
|
|
156
|
+
amount?: number;
|
|
157
|
+
} & { [K in Exclude<keyof I, "amount">]: never; }>(object: I): QuerySupplyResponse;
|
|
158
|
+
};
|
|
159
|
+
export declare const QueryNFTsRequest: {
|
|
160
|
+
encode(message: QueryNFTsRequest, writer?: _m0.Writer): _m0.Writer;
|
|
161
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryNFTsRequest;
|
|
162
|
+
fromJSON(object: any): QueryNFTsRequest;
|
|
163
|
+
toJSON(message: QueryNFTsRequest): unknown;
|
|
164
|
+
fromPartial<I extends {
|
|
165
|
+
classId?: string;
|
|
166
|
+
owner?: string;
|
|
167
|
+
pagination?: {
|
|
168
|
+
key?: Uint8Array;
|
|
169
|
+
offset?: number;
|
|
170
|
+
limit?: number;
|
|
171
|
+
countTotal?: boolean;
|
|
172
|
+
reverse?: boolean;
|
|
173
|
+
};
|
|
174
|
+
} & {
|
|
175
|
+
classId?: string;
|
|
176
|
+
owner?: string;
|
|
177
|
+
pagination?: {
|
|
178
|
+
key?: Uint8Array;
|
|
179
|
+
offset?: number;
|
|
180
|
+
limit?: number;
|
|
181
|
+
countTotal?: boolean;
|
|
182
|
+
reverse?: boolean;
|
|
183
|
+
} & {
|
|
184
|
+
key?: Uint8Array;
|
|
185
|
+
offset?: number;
|
|
186
|
+
limit?: number;
|
|
187
|
+
countTotal?: boolean;
|
|
188
|
+
reverse?: boolean;
|
|
189
|
+
} & { [K in Exclude<keyof I["pagination"], keyof PageRequest>]: never; };
|
|
190
|
+
} & { [K_1 in Exclude<keyof I, keyof QueryNFTsRequest>]: never; }>(object: I): QueryNFTsRequest;
|
|
191
|
+
};
|
|
192
|
+
export declare const QueryNFTsResponse: {
|
|
193
|
+
encode(message: QueryNFTsResponse, writer?: _m0.Writer): _m0.Writer;
|
|
194
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryNFTsResponse;
|
|
195
|
+
fromJSON(object: any): QueryNFTsResponse;
|
|
196
|
+
toJSON(message: QueryNFTsResponse): unknown;
|
|
197
|
+
fromPartial<I extends {
|
|
198
|
+
nfts?: {
|
|
199
|
+
classId?: string;
|
|
200
|
+
id?: string;
|
|
201
|
+
uri?: string;
|
|
202
|
+
uriHash?: string;
|
|
203
|
+
data?: {
|
|
204
|
+
typeUrl?: string;
|
|
205
|
+
value?: Uint8Array;
|
|
206
|
+
};
|
|
207
|
+
}[];
|
|
208
|
+
pagination?: {
|
|
209
|
+
nextKey?: Uint8Array;
|
|
210
|
+
total?: number;
|
|
211
|
+
};
|
|
212
|
+
} & {
|
|
213
|
+
nfts?: {
|
|
214
|
+
classId?: string;
|
|
215
|
+
id?: string;
|
|
216
|
+
uri?: string;
|
|
217
|
+
uriHash?: string;
|
|
218
|
+
data?: {
|
|
219
|
+
typeUrl?: string;
|
|
220
|
+
value?: Uint8Array;
|
|
221
|
+
};
|
|
222
|
+
}[] & ({
|
|
223
|
+
classId?: string;
|
|
224
|
+
id?: string;
|
|
225
|
+
uri?: string;
|
|
226
|
+
uriHash?: string;
|
|
227
|
+
data?: {
|
|
228
|
+
typeUrl?: string;
|
|
229
|
+
value?: Uint8Array;
|
|
230
|
+
};
|
|
231
|
+
} & {
|
|
232
|
+
classId?: string;
|
|
233
|
+
id?: string;
|
|
234
|
+
uri?: string;
|
|
235
|
+
uriHash?: string;
|
|
236
|
+
data?: {
|
|
237
|
+
typeUrl?: string;
|
|
238
|
+
value?: Uint8Array;
|
|
239
|
+
} & {
|
|
240
|
+
typeUrl?: string;
|
|
241
|
+
value?: Uint8Array;
|
|
242
|
+
} & { [K in Exclude<keyof I["nfts"][number]["data"], keyof import("../../../google/protobuf/any").Any>]: never; };
|
|
243
|
+
} & { [K_1 in Exclude<keyof I["nfts"][number], keyof NFT>]: never; })[] & { [K_2 in Exclude<keyof I["nfts"], keyof {
|
|
244
|
+
classId?: string;
|
|
245
|
+
id?: string;
|
|
246
|
+
uri?: string;
|
|
247
|
+
uriHash?: string;
|
|
248
|
+
data?: {
|
|
249
|
+
typeUrl?: string;
|
|
250
|
+
value?: Uint8Array;
|
|
251
|
+
};
|
|
252
|
+
}[]>]: never; };
|
|
253
|
+
pagination?: {
|
|
254
|
+
nextKey?: Uint8Array;
|
|
255
|
+
total?: number;
|
|
256
|
+
} & {
|
|
257
|
+
nextKey?: Uint8Array;
|
|
258
|
+
total?: number;
|
|
259
|
+
} & { [K_3 in Exclude<keyof I["pagination"], keyof PageResponse>]: never; };
|
|
260
|
+
} & { [K_4 in Exclude<keyof I, keyof QueryNFTsResponse>]: never; }>(object: I): QueryNFTsResponse;
|
|
261
|
+
};
|
|
262
|
+
export declare const QueryNFTRequest: {
|
|
263
|
+
encode(message: QueryNFTRequest, writer?: _m0.Writer): _m0.Writer;
|
|
264
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryNFTRequest;
|
|
265
|
+
fromJSON(object: any): QueryNFTRequest;
|
|
266
|
+
toJSON(message: QueryNFTRequest): unknown;
|
|
267
|
+
fromPartial<I extends {
|
|
268
|
+
classId?: string;
|
|
269
|
+
id?: string;
|
|
270
|
+
} & {
|
|
271
|
+
classId?: string;
|
|
272
|
+
id?: string;
|
|
273
|
+
} & { [K in Exclude<keyof I, keyof QueryNFTRequest>]: never; }>(object: I): QueryNFTRequest;
|
|
274
|
+
};
|
|
275
|
+
export declare const QueryNFTResponse: {
|
|
276
|
+
encode(message: QueryNFTResponse, writer?: _m0.Writer): _m0.Writer;
|
|
277
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryNFTResponse;
|
|
278
|
+
fromJSON(object: any): QueryNFTResponse;
|
|
279
|
+
toJSON(message: QueryNFTResponse): unknown;
|
|
280
|
+
fromPartial<I extends {
|
|
281
|
+
nft?: {
|
|
282
|
+
classId?: string;
|
|
283
|
+
id?: string;
|
|
284
|
+
uri?: string;
|
|
285
|
+
uriHash?: string;
|
|
286
|
+
data?: {
|
|
287
|
+
typeUrl?: string;
|
|
288
|
+
value?: Uint8Array;
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
} & {
|
|
292
|
+
nft?: {
|
|
293
|
+
classId?: string;
|
|
294
|
+
id?: string;
|
|
295
|
+
uri?: string;
|
|
296
|
+
uriHash?: string;
|
|
297
|
+
data?: {
|
|
298
|
+
typeUrl?: string;
|
|
299
|
+
value?: Uint8Array;
|
|
300
|
+
};
|
|
301
|
+
} & {
|
|
302
|
+
classId?: string;
|
|
303
|
+
id?: string;
|
|
304
|
+
uri?: string;
|
|
305
|
+
uriHash?: string;
|
|
306
|
+
data?: {
|
|
307
|
+
typeUrl?: string;
|
|
308
|
+
value?: Uint8Array;
|
|
309
|
+
} & {
|
|
310
|
+
typeUrl?: string;
|
|
311
|
+
value?: Uint8Array;
|
|
312
|
+
} & { [K in Exclude<keyof I["nft"]["data"], keyof import("../../../google/protobuf/any").Any>]: never; };
|
|
313
|
+
} & { [K_1 in Exclude<keyof I["nft"], keyof NFT>]: never; };
|
|
314
|
+
} & { [K_2 in Exclude<keyof I, "nft">]: never; }>(object: I): QueryNFTResponse;
|
|
315
|
+
};
|
|
316
|
+
export declare const QueryClassRequest: {
|
|
317
|
+
encode(message: QueryClassRequest, writer?: _m0.Writer): _m0.Writer;
|
|
318
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryClassRequest;
|
|
319
|
+
fromJSON(object: any): QueryClassRequest;
|
|
320
|
+
toJSON(message: QueryClassRequest): unknown;
|
|
321
|
+
fromPartial<I extends {
|
|
322
|
+
classId?: string;
|
|
323
|
+
} & {
|
|
324
|
+
classId?: string;
|
|
325
|
+
} & { [K in Exclude<keyof I, "classId">]: never; }>(object: I): QueryClassRequest;
|
|
326
|
+
};
|
|
327
|
+
export declare const QueryClassResponse: {
|
|
328
|
+
encode(message: QueryClassResponse, writer?: _m0.Writer): _m0.Writer;
|
|
329
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryClassResponse;
|
|
330
|
+
fromJSON(object: any): QueryClassResponse;
|
|
331
|
+
toJSON(message: QueryClassResponse): unknown;
|
|
332
|
+
fromPartial<I extends {
|
|
333
|
+
class?: {
|
|
334
|
+
id?: string;
|
|
335
|
+
name?: string;
|
|
336
|
+
symbol?: string;
|
|
337
|
+
description?: string;
|
|
338
|
+
uri?: string;
|
|
339
|
+
uriHash?: string;
|
|
340
|
+
data?: {
|
|
341
|
+
typeUrl?: string;
|
|
342
|
+
value?: Uint8Array;
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
} & {
|
|
346
|
+
class?: {
|
|
347
|
+
id?: string;
|
|
348
|
+
name?: string;
|
|
349
|
+
symbol?: string;
|
|
350
|
+
description?: string;
|
|
351
|
+
uri?: string;
|
|
352
|
+
uriHash?: string;
|
|
353
|
+
data?: {
|
|
354
|
+
typeUrl?: string;
|
|
355
|
+
value?: Uint8Array;
|
|
356
|
+
};
|
|
357
|
+
} & {
|
|
358
|
+
id?: string;
|
|
359
|
+
name?: string;
|
|
360
|
+
symbol?: string;
|
|
361
|
+
description?: string;
|
|
362
|
+
uri?: string;
|
|
363
|
+
uriHash?: string;
|
|
364
|
+
data?: {
|
|
365
|
+
typeUrl?: string;
|
|
366
|
+
value?: Uint8Array;
|
|
367
|
+
} & {
|
|
368
|
+
typeUrl?: string;
|
|
369
|
+
value?: Uint8Array;
|
|
370
|
+
} & { [K in Exclude<keyof I["class"]["data"], keyof import("../../../google/protobuf/any").Any>]: never; };
|
|
371
|
+
} & { [K_1 in Exclude<keyof I["class"], keyof Class>]: never; };
|
|
372
|
+
} & { [K_2 in Exclude<keyof I, "class">]: never; }>(object: I): QueryClassResponse;
|
|
373
|
+
};
|
|
374
|
+
export declare const QueryClassesRequest: {
|
|
375
|
+
encode(message: QueryClassesRequest, writer?: _m0.Writer): _m0.Writer;
|
|
376
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryClassesRequest;
|
|
377
|
+
fromJSON(object: any): QueryClassesRequest;
|
|
378
|
+
toJSON(message: QueryClassesRequest): unknown;
|
|
379
|
+
fromPartial<I extends {
|
|
380
|
+
pagination?: {
|
|
381
|
+
key?: Uint8Array;
|
|
382
|
+
offset?: number;
|
|
383
|
+
limit?: number;
|
|
384
|
+
countTotal?: boolean;
|
|
385
|
+
reverse?: boolean;
|
|
386
|
+
};
|
|
387
|
+
} & {
|
|
388
|
+
pagination?: {
|
|
389
|
+
key?: Uint8Array;
|
|
390
|
+
offset?: number;
|
|
391
|
+
limit?: number;
|
|
392
|
+
countTotal?: boolean;
|
|
393
|
+
reverse?: boolean;
|
|
394
|
+
} & {
|
|
395
|
+
key?: Uint8Array;
|
|
396
|
+
offset?: number;
|
|
397
|
+
limit?: number;
|
|
398
|
+
countTotal?: boolean;
|
|
399
|
+
reverse?: boolean;
|
|
400
|
+
} & { [K in Exclude<keyof I["pagination"], keyof PageRequest>]: never; };
|
|
401
|
+
} & { [K_1 in Exclude<keyof I, "pagination">]: never; }>(object: I): QueryClassesRequest;
|
|
402
|
+
};
|
|
403
|
+
export declare const QueryClassesResponse: {
|
|
404
|
+
encode(message: QueryClassesResponse, writer?: _m0.Writer): _m0.Writer;
|
|
405
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryClassesResponse;
|
|
406
|
+
fromJSON(object: any): QueryClassesResponse;
|
|
407
|
+
toJSON(message: QueryClassesResponse): unknown;
|
|
408
|
+
fromPartial<I extends {
|
|
409
|
+
classes?: {
|
|
410
|
+
id?: string;
|
|
411
|
+
name?: string;
|
|
412
|
+
symbol?: string;
|
|
413
|
+
description?: string;
|
|
414
|
+
uri?: string;
|
|
415
|
+
uriHash?: string;
|
|
416
|
+
data?: {
|
|
417
|
+
typeUrl?: string;
|
|
418
|
+
value?: Uint8Array;
|
|
419
|
+
};
|
|
420
|
+
}[];
|
|
421
|
+
pagination?: {
|
|
422
|
+
nextKey?: Uint8Array;
|
|
423
|
+
total?: number;
|
|
424
|
+
};
|
|
425
|
+
} & {
|
|
426
|
+
classes?: {
|
|
427
|
+
id?: string;
|
|
428
|
+
name?: string;
|
|
429
|
+
symbol?: string;
|
|
430
|
+
description?: string;
|
|
431
|
+
uri?: string;
|
|
432
|
+
uriHash?: string;
|
|
433
|
+
data?: {
|
|
434
|
+
typeUrl?: string;
|
|
435
|
+
value?: Uint8Array;
|
|
436
|
+
};
|
|
437
|
+
}[] & ({
|
|
438
|
+
id?: string;
|
|
439
|
+
name?: string;
|
|
440
|
+
symbol?: string;
|
|
441
|
+
description?: string;
|
|
442
|
+
uri?: string;
|
|
443
|
+
uriHash?: string;
|
|
444
|
+
data?: {
|
|
445
|
+
typeUrl?: string;
|
|
446
|
+
value?: Uint8Array;
|
|
447
|
+
};
|
|
448
|
+
} & {
|
|
449
|
+
id?: string;
|
|
450
|
+
name?: string;
|
|
451
|
+
symbol?: string;
|
|
452
|
+
description?: string;
|
|
453
|
+
uri?: string;
|
|
454
|
+
uriHash?: string;
|
|
455
|
+
data?: {
|
|
456
|
+
typeUrl?: string;
|
|
457
|
+
value?: Uint8Array;
|
|
458
|
+
} & {
|
|
459
|
+
typeUrl?: string;
|
|
460
|
+
value?: Uint8Array;
|
|
461
|
+
} & { [K in Exclude<keyof I["classes"][number]["data"], keyof import("../../../google/protobuf/any").Any>]: never; };
|
|
462
|
+
} & { [K_1 in Exclude<keyof I["classes"][number], keyof Class>]: never; })[] & { [K_2 in Exclude<keyof I["classes"], keyof {
|
|
463
|
+
id?: string;
|
|
464
|
+
name?: string;
|
|
465
|
+
symbol?: string;
|
|
466
|
+
description?: string;
|
|
467
|
+
uri?: string;
|
|
468
|
+
uriHash?: string;
|
|
469
|
+
data?: {
|
|
470
|
+
typeUrl?: string;
|
|
471
|
+
value?: Uint8Array;
|
|
472
|
+
};
|
|
473
|
+
}[]>]: never; };
|
|
474
|
+
pagination?: {
|
|
475
|
+
nextKey?: Uint8Array;
|
|
476
|
+
total?: number;
|
|
477
|
+
} & {
|
|
478
|
+
nextKey?: Uint8Array;
|
|
479
|
+
total?: number;
|
|
480
|
+
} & { [K_3 in Exclude<keyof I["pagination"], keyof PageResponse>]: never; };
|
|
481
|
+
} & { [K_4 in Exclude<keyof I, keyof QueryClassesResponse>]: never; }>(object: I): QueryClassesResponse;
|
|
482
|
+
};
|
|
483
|
+
/** Query defines the gRPC querier service. */
|
|
484
|
+
export interface Query {
|
|
485
|
+
/** Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 */
|
|
486
|
+
Balance(request: QueryBalanceRequest): Promise<QueryBalanceResponse>;
|
|
487
|
+
/** Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 */
|
|
488
|
+
Owner(request: QueryOwnerRequest): Promise<QueryOwnerResponse>;
|
|
489
|
+
/** Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. */
|
|
490
|
+
Supply(request: QuerySupplyRequest): Promise<QuerySupplyResponse>;
|
|
491
|
+
/**
|
|
492
|
+
* NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in
|
|
493
|
+
* ERC721Enumerable
|
|
494
|
+
*/
|
|
495
|
+
NFTs(request: QueryNFTsRequest): Promise<QueryNFTsResponse>;
|
|
496
|
+
/** NFT queries an NFT based on its class and id. */
|
|
497
|
+
NFT(request: QueryNFTRequest): Promise<QueryNFTResponse>;
|
|
498
|
+
/** Class queries an NFT class based on its id */
|
|
499
|
+
Class(request: QueryClassRequest): Promise<QueryClassResponse>;
|
|
500
|
+
/** Classes queries all NFT classes */
|
|
501
|
+
Classes(request: QueryClassesRequest): Promise<QueryClassesResponse>;
|
|
502
|
+
}
|
|
503
|
+
export declare class QueryClientImpl implements Query {
|
|
504
|
+
private readonly rpc;
|
|
505
|
+
constructor(rpc: Rpc);
|
|
506
|
+
Balance(request: QueryBalanceRequest): Promise<QueryBalanceResponse>;
|
|
507
|
+
Owner(request: QueryOwnerRequest): Promise<QueryOwnerResponse>;
|
|
508
|
+
Supply(request: QuerySupplyRequest): Promise<QuerySupplyResponse>;
|
|
509
|
+
NFTs(request: QueryNFTsRequest): Promise<QueryNFTsResponse>;
|
|
510
|
+
NFT(request: QueryNFTRequest): Promise<QueryNFTResponse>;
|
|
511
|
+
Class(request: QueryClassRequest): Promise<QueryClassResponse>;
|
|
512
|
+
Classes(request: QueryClassesRequest): Promise<QueryClassesResponse>;
|
|
513
|
+
}
|
|
514
|
+
interface Rpc {
|
|
515
|
+
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
516
|
+
}
|
|
517
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
518
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
519
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
520
|
+
} : Partial<T>;
|
|
521
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
522
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
523
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
524
|
+
} & {
|
|
525
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
526
|
+
};
|
|
527
|
+
export {};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "google.protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* `Any` contains an arbitrary serialized protocol buffer message along with a
|
|
5
|
+
* URL that describes the type of the serialized message.
|
|
6
|
+
*
|
|
7
|
+
* Protobuf library provides support to pack/unpack Any values in the form
|
|
8
|
+
* of utility functions or additional generated methods of the Any type.
|
|
9
|
+
*
|
|
10
|
+
* Example 1: Pack and unpack a message in C++.
|
|
11
|
+
*
|
|
12
|
+
* Foo foo = ...;
|
|
13
|
+
* Any any;
|
|
14
|
+
* any.PackFrom(foo);
|
|
15
|
+
* ...
|
|
16
|
+
* if (any.UnpackTo(&foo)) {
|
|
17
|
+
* ...
|
|
18
|
+
* }
|
|
19
|
+
*
|
|
20
|
+
* Example 2: Pack and unpack a message in Java.
|
|
21
|
+
*
|
|
22
|
+
* Foo foo = ...;
|
|
23
|
+
* Any any = Any.pack(foo);
|
|
24
|
+
* ...
|
|
25
|
+
* if (any.is(Foo.class)) {
|
|
26
|
+
* foo = any.unpack(Foo.class);
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* Example 3: Pack and unpack a message in Python.
|
|
30
|
+
*
|
|
31
|
+
* foo = Foo(...)
|
|
32
|
+
* any = Any()
|
|
33
|
+
* any.Pack(foo)
|
|
34
|
+
* ...
|
|
35
|
+
* if any.Is(Foo.DESCRIPTOR):
|
|
36
|
+
* any.Unpack(foo)
|
|
37
|
+
* ...
|
|
38
|
+
*
|
|
39
|
+
* Example 4: Pack and unpack a message in Go
|
|
40
|
+
*
|
|
41
|
+
* foo := &pb.Foo{...}
|
|
42
|
+
* any, err := anypb.New(foo)
|
|
43
|
+
* if err != nil {
|
|
44
|
+
* ...
|
|
45
|
+
* }
|
|
46
|
+
* ...
|
|
47
|
+
* foo := &pb.Foo{}
|
|
48
|
+
* if err := any.UnmarshalTo(foo); err != nil {
|
|
49
|
+
* ...
|
|
50
|
+
* }
|
|
51
|
+
*
|
|
52
|
+
* The pack methods provided by protobuf library will by default use
|
|
53
|
+
* 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
|
54
|
+
* methods only use the fully qualified type name after the last '/'
|
|
55
|
+
* in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
|
56
|
+
* name "y.z".
|
|
57
|
+
*
|
|
58
|
+
* JSON
|
|
59
|
+
* ====
|
|
60
|
+
* The JSON representation of an `Any` value uses the regular
|
|
61
|
+
* representation of the deserialized, embedded message, with an
|
|
62
|
+
* additional field `@type` which contains the type URL. Example:
|
|
63
|
+
*
|
|
64
|
+
* package google.profile;
|
|
65
|
+
* message Person {
|
|
66
|
+
* string first_name = 1;
|
|
67
|
+
* string last_name = 2;
|
|
68
|
+
* }
|
|
69
|
+
*
|
|
70
|
+
* {
|
|
71
|
+
* "@type": "type.googleapis.com/google.profile.Person",
|
|
72
|
+
* "firstName": <string>,
|
|
73
|
+
* "lastName": <string>
|
|
74
|
+
* }
|
|
75
|
+
*
|
|
76
|
+
* If the embedded message type is well-known and has a custom JSON
|
|
77
|
+
* representation, that representation will be embedded adding a field
|
|
78
|
+
* `value` which holds the custom JSON in addition to the `@type`
|
|
79
|
+
* field. Example (for message [google.protobuf.Duration][]):
|
|
80
|
+
*
|
|
81
|
+
* {
|
|
82
|
+
* "@type": "type.googleapis.com/google.protobuf.Duration",
|
|
83
|
+
* "value": "1.212s"
|
|
84
|
+
* }
|
|
85
|
+
*/
|
|
86
|
+
export interface Any {
|
|
87
|
+
/**
|
|
88
|
+
* A URL/resource name that uniquely identifies the type of the serialized
|
|
89
|
+
* protocol buffer message. This string must contain at least
|
|
90
|
+
* one "/" character. The last segment of the URL's path must represent
|
|
91
|
+
* the fully qualified name of the type (as in
|
|
92
|
+
* `path/google.protobuf.Duration`). The name should be in a canonical form
|
|
93
|
+
* (e.g., leading "." is not accepted).
|
|
94
|
+
*
|
|
95
|
+
* In practice, teams usually precompile into the binary all types that they
|
|
96
|
+
* expect it to use in the context of Any. However, for URLs which use the
|
|
97
|
+
* scheme `http`, `https`, or no scheme, one can optionally set up a type
|
|
98
|
+
* server that maps type URLs to message definitions as follows:
|
|
99
|
+
*
|
|
100
|
+
* * If no scheme is provided, `https` is assumed.
|
|
101
|
+
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
|
102
|
+
* value in binary format, or produce an error.
|
|
103
|
+
* * Applications are allowed to cache lookup results based on the
|
|
104
|
+
* URL, or have them precompiled into a binary to avoid any
|
|
105
|
+
* lookup. Therefore, binary compatibility needs to be preserved
|
|
106
|
+
* on changes to types. (Use versioned type names to manage
|
|
107
|
+
* breaking changes.)
|
|
108
|
+
*
|
|
109
|
+
* Note: this functionality is not currently available in the official
|
|
110
|
+
* protobuf release, and it is not used for type URLs beginning with
|
|
111
|
+
* type.googleapis.com.
|
|
112
|
+
*
|
|
113
|
+
* Schemes other than `http`, `https` (or the empty scheme) might be
|
|
114
|
+
* used with implementation specific semantics.
|
|
115
|
+
*/
|
|
116
|
+
typeUrl: string;
|
|
117
|
+
/** Must be a valid serialized protocol buffer of the above specified type. */
|
|
118
|
+
value: Uint8Array;
|
|
119
|
+
}
|
|
120
|
+
export declare const Any: {
|
|
121
|
+
encode(message: Any, writer?: _m0.Writer): _m0.Writer;
|
|
122
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Any;
|
|
123
|
+
fromJSON(object: any): Any;
|
|
124
|
+
toJSON(message: Any): unknown;
|
|
125
|
+
fromPartial<I extends {
|
|
126
|
+
typeUrl?: string;
|
|
127
|
+
value?: Uint8Array;
|
|
128
|
+
} & {
|
|
129
|
+
typeUrl?: string;
|
|
130
|
+
value?: Uint8Array;
|
|
131
|
+
} & { [K in Exclude<keyof I, keyof Any>]: never; }>(object: I): Any;
|
|
132
|
+
};
|
|
133
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
134
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
135
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
136
|
+
} : Partial<T>;
|
|
137
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
138
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
139
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
140
|
+
} & {
|
|
141
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
142
|
+
};
|
|
143
|
+
export {};
|