@iconlake/client 0.1.11 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iconlake/client",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "iconLake Typescript Client",
5
5
  "author": "iconLake",
6
6
  "license": "Apache-2.0",
@@ -3,25 +3,25 @@ import { DeliverTxResponse } from "@cosmjs/stargate";
3
3
  import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/proto-signing";
4
4
  import { IgniteClient } from "../client";
5
5
  import { Api } from "./rest";
6
- import { MsgInit } from "./types/iconlake/drop/tx";
7
6
  import { MsgMint } from "./types/iconlake/drop/tx";
8
- export { MsgInit, MsgMint };
9
- type sendMsgInitParams = {
10
- value: MsgInit;
11
- fee?: StdFee;
12
- memo?: string;
13
- };
7
+ import { MsgInit } from "./types/iconlake/drop/tx";
8
+ export { MsgMint, MsgInit };
14
9
  type sendMsgMintParams = {
15
10
  value: MsgMint;
16
11
  fee?: StdFee;
17
12
  memo?: string;
18
13
  };
19
- type msgInitParams = {
14
+ type sendMsgInitParams = {
20
15
  value: MsgInit;
16
+ fee?: StdFee;
17
+ memo?: string;
21
18
  };
22
19
  type msgMintParams = {
23
20
  value: MsgMint;
24
21
  };
22
+ type msgInitParams = {
23
+ value: MsgInit;
24
+ };
25
25
  export declare const registry: Registry;
26
26
  interface TxClientOptions {
27
27
  addr: string;
@@ -29,10 +29,10 @@ interface TxClientOptions {
29
29
  signer?: OfflineSigner;
30
30
  }
31
31
  export declare const txClient: ({ signer, prefix, addr }?: TxClientOptions) => {
32
- sendMsgInit({ value, fee, memo }: sendMsgInitParams): Promise<DeliverTxResponse>;
33
32
  sendMsgMint({ value, fee, memo }: sendMsgMintParams): Promise<DeliverTxResponse>;
34
- msgInit({ value }: msgInitParams): EncodeObject;
33
+ sendMsgInit({ value, fee, memo }: sendMsgInitParams): Promise<DeliverTxResponse>;
35
34
  msgMint({ value }: msgMintParams): EncodeObject;
35
+ msgInit({ value }: msgInitParams): EncodeObject;
36
36
  };
37
37
  interface QueryClientOptions {
38
38
  addr: string;
@@ -4,6 +4,10 @@ export interface Info {
4
4
  address: string;
5
5
  lastMintTime: number;
6
6
  }
7
+ export interface InfoRaw {
8
+ accAddress: Uint8Array;
9
+ lastMintTime: number;
10
+ }
7
11
  export declare const Info: {
8
12
  encode(message: Info, writer?: _m0.Writer): _m0.Writer;
9
13
  decode(input: _m0.Reader | Uint8Array, length?: number): Info;
@@ -17,6 +21,19 @@ export declare const Info: {
17
21
  lastMintTime?: number;
18
22
  } & { [K in Exclude<keyof I, keyof Info>]: never; }>(object: I): Info;
19
23
  };
24
+ export declare const InfoRaw: {
25
+ encode(message: InfoRaw, writer?: _m0.Writer): _m0.Writer;
26
+ decode(input: _m0.Reader | Uint8Array, length?: number): InfoRaw;
27
+ fromJSON(object: any): InfoRaw;
28
+ toJSON(message: InfoRaw): unknown;
29
+ fromPartial<I extends {
30
+ accAddress?: Uint8Array;
31
+ lastMintTime?: number;
32
+ } & {
33
+ accAddress?: Uint8Array;
34
+ lastMintTime?: number;
35
+ } & { [K in Exclude<keyof I, keyof InfoRaw>]: never; }>(object: I): InfoRaw;
36
+ };
20
37
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
21
38
  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 {} ? {
22
39
  [K in keyof T]?: DeepPartial<T[K]>;
@@ -1,3 +1,4 @@
1
1
  import { Info } from "./types/iconlake/drop/info";
2
+ import { InfoRaw } from "./types/iconlake/drop/info";
2
3
  import { Params } from "./types/iconlake/drop/params";
3
- export { Info, Params, };
4
+ export { Info, InfoRaw, Params, };
@@ -4,15 +4,24 @@ import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/pr
4
4
  import { IgniteClient } from "../client";
5
5
  import { Api } from "./rest";
6
6
  import { MsgMint } from "./types/iconlake/icon/tx";
7
- export { MsgMint };
7
+ import { MsgUpdateClass } from "./types/iconlake/icon/tx";
8
+ export { MsgMint, MsgUpdateClass };
8
9
  type sendMsgMintParams = {
9
10
  value: MsgMint;
10
11
  fee?: StdFee;
11
12
  memo?: string;
12
13
  };
14
+ type sendMsgUpdateClassParams = {
15
+ value: MsgUpdateClass;
16
+ fee?: StdFee;
17
+ memo?: string;
18
+ };
13
19
  type msgMintParams = {
14
20
  value: MsgMint;
15
21
  };
22
+ type msgUpdateClassParams = {
23
+ value: MsgUpdateClass;
24
+ };
16
25
  export declare const registry: Registry;
17
26
  interface TxClientOptions {
18
27
  addr: string;
@@ -21,7 +30,9 @@ interface TxClientOptions {
21
30
  }
22
31
  export declare const txClient: ({ signer, prefix, addr }?: TxClientOptions) => {
23
32
  sendMsgMint({ value, fee, memo }: sendMsgMintParams): Promise<DeliverTxResponse>;
33
+ sendMsgUpdateClass({ value, fee, memo }: sendMsgUpdateClassParams): Promise<DeliverTxResponse>;
24
34
  msgMint({ value }: msgMintParams): EncodeObject;
35
+ msgUpdateClass({ value }: msgUpdateClassParams): EncodeObject;
25
36
  };
26
37
  interface QueryClientOptions {
27
38
  addr: string;
@@ -1,10 +1,17 @@
1
+ export interface IconClassData {
2
+ author?: string;
3
+ /** @format int64 */
4
+ createTime?: string;
5
+ }
1
6
  export interface IconIconData {
2
7
  author?: string;
3
8
  name?: string;
4
9
  description?: string;
10
+ /** @format int64 */
5
11
  createTime?: string;
6
12
  }
7
13
  export type IconMsgMintResponse = object;
14
+ export type IconMsgUpdateClassResponse = object;
8
15
  /**
9
16
  * Params defines the parameters for the module.
10
17
  */
@@ -24,7 +31,165 @@ export interface IconQueryParamsResponse {
24
31
  /** params holds all the parameters of this module. */
25
32
  params?: IconParams;
26
33
  }
34
+ export interface IconlakeiconClass {
35
+ id?: string;
36
+ name?: string;
37
+ symbol?: string;
38
+ description?: string;
39
+ uri?: string;
40
+ uriHash?: string;
41
+ data?: IconClassData;
42
+ }
43
+ export interface IconlakeiconNFT {
44
+ classId?: string;
45
+ id?: string;
46
+ uri?: string;
47
+ uriHash?: string;
48
+ data?: IconIconData;
49
+ }
50
+ export interface IconlakeiconQueryClassResponse {
51
+ class?: IconlakeiconClass;
52
+ }
53
+ export interface IconlakeiconQueryClassesResponse {
54
+ classes?: IconlakeiconClass[];
55
+ /**
56
+ * PageResponse is to be embedded in gRPC response messages where the
57
+ * corresponding request message has used PageRequest.
58
+ *
59
+ * message SomeResponse {
60
+ * repeated Bar results = 1;
61
+ * PageResponse page = 2;
62
+ * }
63
+ */
64
+ pagination?: V1Beta1PageResponse;
65
+ }
66
+ export interface IconlakeiconQueryNFTResponse {
67
+ nft?: IconlakeiconNFT;
68
+ }
69
+ export interface IconlakeiconQueryNFTsResponse {
70
+ nfts?: IconlakeiconNFT[];
71
+ /**
72
+ * PageResponse is to be embedded in gRPC response messages where the
73
+ * corresponding request message has used PageRequest.
74
+ *
75
+ * message SomeResponse {
76
+ * repeated Bar results = 1;
77
+ * PageResponse page = 2;
78
+ * }
79
+ */
80
+ pagination?: V1Beta1PageResponse;
81
+ }
82
+ /**
83
+ * `Any` contains an arbitrary serialized protocol buffer message along with a
84
+ URL that describes the type of the serialized message.
85
+
86
+ Protobuf library provides support to pack/unpack Any values in the form
87
+ of utility functions or additional generated methods of the Any type.
88
+
89
+ Example 1: Pack and unpack a message in C++.
90
+
91
+ Foo foo = ...;
92
+ Any any;
93
+ any.PackFrom(foo);
94
+ ...
95
+ if (any.UnpackTo(&foo)) {
96
+ ...
97
+ }
98
+
99
+ Example 2: Pack and unpack a message in Java.
100
+
101
+ Foo foo = ...;
102
+ Any any = Any.pack(foo);
103
+ ...
104
+ if (any.is(Foo.class)) {
105
+ foo = any.unpack(Foo.class);
106
+ }
107
+
108
+ Example 3: Pack and unpack a message in Python.
109
+
110
+ foo = Foo(...)
111
+ any = Any()
112
+ any.Pack(foo)
113
+ ...
114
+ if any.Is(Foo.DESCRIPTOR):
115
+ any.Unpack(foo)
116
+ ...
117
+
118
+ Example 4: Pack and unpack a message in Go
119
+
120
+ foo := &pb.Foo{...}
121
+ any, err := anypb.New(foo)
122
+ if err != nil {
123
+ ...
124
+ }
125
+ ...
126
+ foo := &pb.Foo{}
127
+ if err := any.UnmarshalTo(foo); err != nil {
128
+ ...
129
+ }
130
+
131
+ The pack methods provided by protobuf library will by default use
132
+ 'type.googleapis.com/full.type.name' as the type URL and the unpack
133
+ methods only use the fully qualified type name after the last '/'
134
+ in the type URL, for example "foo.bar.com/x/y.z" will yield type
135
+ name "y.z".
136
+
137
+
138
+ JSON
139
+ ====
140
+ The JSON representation of an `Any` value uses the regular
141
+ representation of the deserialized, embedded message, with an
142
+ additional field `@type` which contains the type URL. Example:
143
+
144
+ package google.profile;
145
+ message Person {
146
+ string first_name = 1;
147
+ string last_name = 2;
148
+ }
149
+
150
+ {
151
+ "@type": "type.googleapis.com/google.profile.Person",
152
+ "firstName": <string>,
153
+ "lastName": <string>
154
+ }
155
+
156
+ If the embedded message type is well-known and has a custom JSON
157
+ representation, that representation will be embedded adding a field
158
+ `value` which holds the custom JSON in addition to the `@type`
159
+ field. Example (for message [google.protobuf.Duration][]):
160
+
161
+ {
162
+ "@type": "type.googleapis.com/google.protobuf.Duration",
163
+ "value": "1.212s"
164
+ }
165
+ */
27
166
  export interface ProtobufAny {
167
+ /**
168
+ * A URL/resource name that uniquely identifies the type of the serialized
169
+ * protocol buffer message. This string must contain at least
170
+ * one "/" character. The last segment of the URL's path must represent
171
+ * the fully qualified name of the type (as in
172
+ * `path/google.protobuf.Duration`). The name should be in a canonical form
173
+ * (e.g., leading "." is not accepted).
174
+ *
175
+ * In practice, teams usually precompile into the binary all types that they
176
+ * expect it to use in the context of Any. However, for URLs which use the
177
+ * scheme `http`, `https`, or no scheme, one can optionally set up a type
178
+ * server that maps type URLs to message definitions as follows:
179
+ * * If no scheme is provided, `https` is assumed.
180
+ * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
181
+ * value in binary format, or produce an error.
182
+ * * Applications are allowed to cache lookup results based on the
183
+ * URL, or have them precompiled into a binary to avoid any
184
+ * lookup. Therefore, binary compatibility needs to be preserved
185
+ * on changes to types. (Use versioned type names to manage
186
+ * breaking changes.)
187
+ * Note: this functionality is not currently available in the official
188
+ * protobuf release, and it is not used for type URLs beginning with
189
+ * type.googleapis.com.
190
+ * Schemes other than `http`, `https` (or the empty scheme) might be
191
+ * used with implementation specific semantics.
192
+ */
28
193
  "@type"?: string;
29
194
  }
30
195
  export interface RpcStatus {
@@ -33,6 +198,71 @@ export interface RpcStatus {
33
198
  message?: string;
34
199
  details?: ProtobufAny[];
35
200
  }
201
+ /**
202
+ * message SomeRequest {
203
+ Foo some_parameter = 1;
204
+ PageRequest pagination = 2;
205
+ }
206
+ */
207
+ export interface V1Beta1PageRequest {
208
+ /**
209
+ * key is a value returned in PageResponse.next_key to begin
210
+ * querying the next page most efficiently. Only one of offset or key
211
+ * should be set.
212
+ * @format byte
213
+ */
214
+ key?: string;
215
+ /**
216
+ * offset is a numeric offset that can be used when key is unavailable.
217
+ * It is less efficient than using key. Only one of offset or key should
218
+ * be set.
219
+ * @format uint64
220
+ */
221
+ offset?: string;
222
+ /**
223
+ * limit is the total number of results to be returned in the result page.
224
+ * If left empty it will default to a value to be set by each app.
225
+ * @format uint64
226
+ */
227
+ limit?: string;
228
+ /**
229
+ * count_total is set to true to indicate that the result set should include
230
+ * a count of the total number of items available for pagination in UIs.
231
+ * count_total is only respected when offset is used. It is ignored when key
232
+ * is set.
233
+ */
234
+ count_total?: boolean;
235
+ /**
236
+ * reverse is set to true if results are to be returned in the descending order.
237
+ *
238
+ * Since: cosmos-sdk 0.43
239
+ */
240
+ reverse?: boolean;
241
+ }
242
+ /**
243
+ * PageResponse is to be embedded in gRPC response messages where the
244
+ corresponding request message has used PageRequest.
245
+
246
+ message SomeResponse {
247
+ repeated Bar results = 1;
248
+ PageResponse page = 2;
249
+ }
250
+ */
251
+ export interface V1Beta1PageResponse {
252
+ /**
253
+ * next_key is the key to be passed to PageRequest.key to
254
+ * query the next page most efficiently. It will be empty if
255
+ * there are no more results.
256
+ * @format byte
257
+ */
258
+ next_key?: string;
259
+ /**
260
+ * total is total number of results available if PageRequest.count_total
261
+ * was set, its value is undefined otherwise
262
+ * @format uint64
263
+ */
264
+ total?: string;
265
+ }
36
266
  import { AxiosInstance, AxiosRequestConfig, AxiosResponse, ResponseType } from "axios";
37
267
  export type QueryParamsType = Record<string | number, any>;
38
268
  export interface FullRequestParams extends Omit<AxiosRequestConfig, "data" | "params" | "url" | "responseType"> {
@@ -77,15 +307,65 @@ export declare class HttpClient<SecurityDataType = unknown> {
77
307
  * @version version not set
78
308
  */
79
309
  export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
310
+ /**
311
+ * No description
312
+ *
313
+ * @tags Query
314
+ * @name QueryClass
315
+ * @summary Queries a class info.
316
+ * @request GET:/iconlake/icon/class/{id}
317
+ */
318
+ queryClass: (id: string, params?: RequestParams) => Promise<AxiosResponse<IconlakeiconQueryClassResponse>>;
319
+ /**
320
+ * No description
321
+ *
322
+ * @tags Query
323
+ * @name QueryClasses
324
+ * @summary Queries a list of Class items.
325
+ * @request GET:/iconlake/icon/classes
326
+ */
327
+ queryClasses: (query?: {
328
+ "pagination.key"?: string;
329
+ "pagination.offset"?: string;
330
+ "pagination.limit"?: string;
331
+ "pagination.count_total"?: boolean;
332
+ "pagination.reverse"?: boolean;
333
+ }, params?: RequestParams) => Promise<AxiosResponse<IconlakeiconQueryClassesResponse>>;
80
334
  /**
81
335
  * No description
82
336
  *
83
337
  * @tags Query
84
338
  * @name QueryHash
85
- * @summary Queries a list of Hash items.
339
+ * @summary Queries hash of a uri.
86
340
  * @request POST:/iconlake/icon/hash
87
341
  */
88
342
  queryHash: (body: IconQueryHashRequest, params?: RequestParams) => Promise<AxiosResponse<IconQueryHashResponse>>;
343
+ /**
344
+ * No description
345
+ *
346
+ * @tags Query
347
+ * @name QueryNft
348
+ * @summary Queries a NFT info.
349
+ * @request GET:/iconlake/icon/nft/{classId}/{id}
350
+ */
351
+ queryNFT: (classId: string, id: string, params?: RequestParams) => Promise<AxiosResponse<IconlakeiconQueryNFTResponse>>;
352
+ /**
353
+ * No description
354
+ *
355
+ * @tags Query
356
+ * @name QueryNfTs
357
+ * @summary Queries a list of NFTs of a class.
358
+ * @request GET:/iconlake/icon/nfts
359
+ */
360
+ queryNFTs: (query?: {
361
+ class_id?: string;
362
+ owner?: string;
363
+ "pagination.key"?: string;
364
+ "pagination.offset"?: string;
365
+ "pagination.limit"?: string;
366
+ "pagination.count_total"?: boolean;
367
+ "pagination.reverse"?: boolean;
368
+ }, params?: RequestParams) => Promise<AxiosResponse<IconlakeiconQueryNFTsResponse>>;
89
369
  /**
90
370
  * No description
91
371
  *
@@ -0,0 +1,104 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ import { Any } from "../../../google/protobuf/any";
3
+ export declare const protobufPackage = "cosmos.nft.v1beta1";
4
+ /** Class defines the class of the nft type. */
5
+ export interface Class {
6
+ /** id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 */
7
+ id: string;
8
+ /** name defines the human-readable name of the NFT classification. Optional */
9
+ name: string;
10
+ /** symbol is an abbreviated name for nft classification. Optional */
11
+ symbol: string;
12
+ /** description is a brief description of nft classification. Optional */
13
+ description: string;
14
+ /** uri for the class metadata stored off chain. It can define schema for Class and NFT `Data` attributes. Optional */
15
+ uri: string;
16
+ /** uri_hash is a hash of the document pointed by uri. Optional */
17
+ uriHash: string;
18
+ /** data is the app specific metadata of the NFT class. Optional */
19
+ data: Any | undefined;
20
+ }
21
+ /** NFT defines the NFT. */
22
+ export interface NFT {
23
+ /** class_id associated with the NFT, similar to the contract address of ERC721 */
24
+ classId: string;
25
+ /** id is a unique identifier of the NFT */
26
+ id: string;
27
+ /** uri for the NFT metadata stored off chain */
28
+ uri: string;
29
+ /** uri_hash is a hash of the document pointed by uri */
30
+ uriHash: string;
31
+ /** data is an app specific data of the NFT. Optional */
32
+ data: Any | undefined;
33
+ }
34
+ export declare const Class: {
35
+ encode(message: Class, writer?: _m0.Writer): _m0.Writer;
36
+ decode(input: _m0.Reader | Uint8Array, length?: number): Class;
37
+ fromJSON(object: any): Class;
38
+ toJSON(message: Class): unknown;
39
+ fromPartial<I extends {
40
+ id?: string;
41
+ name?: string;
42
+ symbol?: string;
43
+ description?: string;
44
+ uri?: string;
45
+ uriHash?: string;
46
+ data?: {
47
+ typeUrl?: string;
48
+ value?: Uint8Array;
49
+ };
50
+ } & {
51
+ id?: string;
52
+ name?: string;
53
+ symbol?: string;
54
+ description?: string;
55
+ uri?: string;
56
+ uriHash?: string;
57
+ data?: {
58
+ typeUrl?: string;
59
+ value?: Uint8Array;
60
+ } & {
61
+ typeUrl?: string;
62
+ value?: Uint8Array;
63
+ } & { [K in Exclude<keyof I["data"], keyof Any>]: never; };
64
+ } & { [K_1 in Exclude<keyof I, keyof Class>]: never; }>(object: I): Class;
65
+ };
66
+ export declare const NFT: {
67
+ encode(message: NFT, writer?: _m0.Writer): _m0.Writer;
68
+ decode(input: _m0.Reader | Uint8Array, length?: number): NFT;
69
+ fromJSON(object: any): NFT;
70
+ toJSON(message: NFT): unknown;
71
+ fromPartial<I extends {
72
+ classId?: string;
73
+ id?: string;
74
+ uri?: string;
75
+ uriHash?: string;
76
+ data?: {
77
+ typeUrl?: string;
78
+ value?: Uint8Array;
79
+ };
80
+ } & {
81
+ classId?: string;
82
+ id?: string;
83
+ uri?: string;
84
+ uriHash?: string;
85
+ data?: {
86
+ typeUrl?: string;
87
+ value?: Uint8Array;
88
+ } & {
89
+ typeUrl?: string;
90
+ value?: Uint8Array;
91
+ } & { [K in Exclude<keyof I["data"], keyof Any>]: never; };
92
+ } & { [K_1 in Exclude<keyof I, keyof NFT>]: never; }>(object: I): NFT;
93
+ };
94
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
95
+ 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 {} ? {
96
+ [K in keyof T]?: DeepPartial<T[K]>;
97
+ } : Partial<T>;
98
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
99
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
100
+ [K in keyof P]: Exact<P[K], I[K]>;
101
+ } & {
102
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
103
+ };
104
+ export {};