@iconlake/client 1.1.0 → 1.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iconlake/client",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "iconLake Typescript Client",
5
5
  "author": "iconLake",
6
6
  "license": "Apache-2.0",
package/types/amino.d.ts CHANGED
@@ -29,4 +29,14 @@ export declare function createIconlakeAminoConverters(): {
29
29
  fromAmino(object: any): import("./iconlake.icon/types/iconlake/icon/tx").MsgUpdateClass;
30
30
  toAmino(message: import("./iconlake.icon/types/iconlake/icon/tx").MsgUpdateClass): unknown;
31
31
  };
32
+ '/iconlake.icon.MsgUpdateCreator': {
33
+ aminoType: string;
34
+ fromAmino(object: any): import("./iconlake.icon/types/iconlake/icon/tx").MsgUpdateCreator;
35
+ toAmino(message: import("./iconlake.icon/types/iconlake/icon/tx").MsgUpdateCreator): unknown;
36
+ };
37
+ '/iconlake.icon.MsgDeleteCreator': {
38
+ aminoType: string;
39
+ fromAmino(object: any): import("./iconlake.icon/types/iconlake/icon/tx").MsgDeleteCreator;
40
+ toAmino(message: import("./iconlake.icon/types/iconlake/icon/tx").MsgDeleteCreator): unknown;
41
+ };
32
42
  };
@@ -4,14 +4,26 @@ import { EncodeObject, GeneratedType, OfflineSigner, Registry } from "@cosmjs/pr
4
4
  import { IgniteClient } from "../client";
5
5
  import { Api } from "./rest";
6
6
  import { MsgUpdateClass } from "./types/iconlake/icon/tx";
7
+ import { MsgUpdateCreator } from "./types/iconlake/icon/tx";
8
+ import { MsgDeleteCreator } from "./types/iconlake/icon/tx";
7
9
  import { MsgBurn } from "./types/iconlake/icon/tx";
8
10
  import { MsgMint } from "./types/iconlake/icon/tx";
9
- export { MsgUpdateClass, MsgBurn, MsgMint };
11
+ export { MsgUpdateClass, MsgUpdateCreator, MsgDeleteCreator, MsgBurn, MsgMint };
10
12
  type sendMsgUpdateClassParams = {
11
13
  value: MsgUpdateClass;
12
14
  fee?: StdFee;
13
15
  memo?: string;
14
16
  };
17
+ type sendMsgUpdateCreatorParams = {
18
+ value: MsgUpdateCreator;
19
+ fee?: StdFee;
20
+ memo?: string;
21
+ };
22
+ type sendMsgDeleteCreatorParams = {
23
+ value: MsgDeleteCreator;
24
+ fee?: StdFee;
25
+ memo?: string;
26
+ };
15
27
  type sendMsgBurnParams = {
16
28
  value: MsgBurn;
17
29
  fee?: StdFee;
@@ -25,6 +37,12 @@ type sendMsgMintParams = {
25
37
  type msgUpdateClassParams = {
26
38
  value: MsgUpdateClass;
27
39
  };
40
+ type msgUpdateCreatorParams = {
41
+ value: MsgUpdateCreator;
42
+ };
43
+ type msgDeleteCreatorParams = {
44
+ value: MsgDeleteCreator;
45
+ };
28
46
  type msgBurnParams = {
29
47
  value: MsgBurn;
30
48
  };
@@ -39,9 +57,13 @@ interface TxClientOptions {
39
57
  }
40
58
  export declare const txClient: ({ signer, prefix, addr }?: TxClientOptions) => {
41
59
  sendMsgUpdateClass({ value, fee, memo }: sendMsgUpdateClassParams): Promise<DeliverTxResponse>;
60
+ sendMsgUpdateCreator({ value, fee, memo }: sendMsgUpdateCreatorParams): Promise<DeliverTxResponse>;
61
+ sendMsgDeleteCreator({ value, fee, memo }: sendMsgDeleteCreatorParams): Promise<DeliverTxResponse>;
42
62
  sendMsgBurn({ value, fee, memo }: sendMsgBurnParams): Promise<DeliverTxResponse>;
43
63
  sendMsgMint({ value, fee, memo }: sendMsgMintParams): Promise<DeliverTxResponse>;
44
64
  msgUpdateClass({ value }: msgUpdateClassParams): EncodeObject;
65
+ msgUpdateCreator({ value }: msgUpdateCreatorParams): EncodeObject;
66
+ msgDeleteCreator({ value }: msgDeleteCreatorParams): EncodeObject;
45
67
  msgBurn({ value }: msgBurnParams): EncodeObject;
46
68
  msgMint({ value }: msgMintParams): EncodeObject;
47
69
  };
@@ -3,6 +3,17 @@ export interface IconClassData {
3
3
  /** @format int64 */
4
4
  create_time?: string;
5
5
  }
6
+ export interface IconCreator {
7
+ address?: string;
8
+ name?: string;
9
+ description?: string;
10
+ avatar?: string;
11
+ avatarHash?: string;
12
+ medias?: IconMedia[];
13
+ sex?: string;
14
+ birthday?: string;
15
+ location?: string;
16
+ }
6
17
  export interface IconIconData {
7
18
  author?: string;
8
19
  name?: string;
@@ -10,20 +21,34 @@ export interface IconIconData {
10
21
  /** @format int64 */
11
22
  create_time?: string;
12
23
  }
24
+ export interface IconMedia {
25
+ name?: string;
26
+ content?: string;
27
+ }
13
28
  export type IconMsgBurnResponse = object;
29
+ export type IconMsgDeleteCreatorResponse = object;
14
30
  export type IconMsgMintResponse = object;
15
31
  export type IconMsgUpdateClassResponse = object;
32
+ export type IconMsgUpdateCreatorResponse = object;
16
33
  /**
17
34
  * Params defines the parameters for the module.
18
35
  */
19
36
  export type IconParams = object;
20
- export interface IconQueryHashRequest {
21
- hash_type?: string;
22
- uri?: string;
37
+ export interface IconQueryCreatorsResponse {
38
+ creators?: IconCreator[];
39
+ /**
40
+ * PageResponse is to be embedded in gRPC response messages where the
41
+ * corresponding request message has used PageRequest.
42
+ *
43
+ * message SomeResponse {
44
+ * repeated Bar results = 1;
45
+ * PageResponse page = 2;
46
+ * }
47
+ */
48
+ pagination?: V1Beta1PageResponse;
23
49
  }
24
- export interface IconQueryHashResponse {
25
- graph_hash?: string;
26
- file_hash?: string;
50
+ export interface IconQueryGetCreatorResponse {
51
+ creator?: IconCreator;
27
52
  }
28
53
  /**
29
54
  * QueryParamsResponse is response type for the Query/Params RPC method.
@@ -338,11 +363,25 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
338
363
  * No description
339
364
  *
340
365
  * @tags Query
341
- * @name QueryHash
342
- * @summary Queries hash of a uri.
343
- * @request POST:/iconlake/icon/hash
366
+ * @name QueryCreator
367
+ * @summary Queries a list of Creator items.
368
+ * @request GET:/iconlake/icon/creator/{address}
344
369
  */
345
- queryHash: (body: IconQueryHashRequest, params?: RequestParams) => Promise<AxiosResponse<IconQueryHashResponse>>;
370
+ queryCreator: (address: string, params?: RequestParams) => Promise<AxiosResponse<IconQueryGetCreatorResponse>>;
371
+ /**
372
+ * No description
373
+ *
374
+ * @tags Query
375
+ * @name QueryCreators
376
+ * @request GET:/iconlake/icon/creators
377
+ */
378
+ queryCreators: (query?: {
379
+ "pagination.key"?: string;
380
+ "pagination.offset"?: string;
381
+ "pagination.limit"?: string;
382
+ "pagination.count_total"?: boolean;
383
+ "pagination.reverse"?: boolean;
384
+ }, params?: RequestParams) => Promise<AxiosResponse<IconQueryCreatorsResponse>>;
346
385
  /**
347
386
  * No description
348
387
  *
@@ -0,0 +1,120 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ import { Media } from "./media";
3
+ export declare const protobufPackage = "iconlake.icon";
4
+ export interface CreatorRaw {
5
+ address: Uint8Array;
6
+ name: string;
7
+ description: string;
8
+ avatar: string;
9
+ avatarHash: string;
10
+ medias: Media[];
11
+ sex: string;
12
+ birthday: string;
13
+ location: string;
14
+ }
15
+ export interface Creator {
16
+ address: string;
17
+ name: string;
18
+ description: string;
19
+ avatar: string;
20
+ avatarHash: string;
21
+ medias: Media[];
22
+ sex: string;
23
+ birthday: string;
24
+ location: string;
25
+ }
26
+ export declare const CreatorRaw: {
27
+ encode(message: CreatorRaw, writer?: _m0.Writer): _m0.Writer;
28
+ decode(input: _m0.Reader | Uint8Array, length?: number): CreatorRaw;
29
+ fromJSON(object: any): CreatorRaw;
30
+ toJSON(message: CreatorRaw): unknown;
31
+ fromPartial<I extends {
32
+ address?: Uint8Array;
33
+ name?: string;
34
+ description?: string;
35
+ avatar?: string;
36
+ avatarHash?: string;
37
+ medias?: {
38
+ name?: string;
39
+ content?: string;
40
+ }[];
41
+ sex?: string;
42
+ birthday?: string;
43
+ location?: string;
44
+ } & {
45
+ address?: Uint8Array;
46
+ name?: string;
47
+ description?: string;
48
+ avatar?: string;
49
+ avatarHash?: string;
50
+ medias?: {
51
+ name?: string;
52
+ content?: string;
53
+ }[] & ({
54
+ name?: string;
55
+ content?: string;
56
+ } & {
57
+ name?: string;
58
+ content?: string;
59
+ } & { [K in Exclude<keyof I["medias"][number], keyof Media>]: never; })[] & { [K_1 in Exclude<keyof I["medias"], keyof {
60
+ name?: string;
61
+ content?: string;
62
+ }[]>]: never; };
63
+ sex?: string;
64
+ birthday?: string;
65
+ location?: string;
66
+ } & { [K_2 in Exclude<keyof I, keyof CreatorRaw>]: never; }>(object: I): CreatorRaw;
67
+ };
68
+ export declare const Creator: {
69
+ encode(message: Creator, writer?: _m0.Writer): _m0.Writer;
70
+ decode(input: _m0.Reader | Uint8Array, length?: number): Creator;
71
+ fromJSON(object: any): Creator;
72
+ toJSON(message: Creator): unknown;
73
+ fromPartial<I extends {
74
+ address?: string;
75
+ name?: string;
76
+ description?: string;
77
+ avatar?: string;
78
+ avatarHash?: string;
79
+ medias?: {
80
+ name?: string;
81
+ content?: string;
82
+ }[];
83
+ sex?: string;
84
+ birthday?: string;
85
+ location?: string;
86
+ } & {
87
+ address?: string;
88
+ name?: string;
89
+ description?: string;
90
+ avatar?: string;
91
+ avatarHash?: string;
92
+ medias?: {
93
+ name?: string;
94
+ content?: string;
95
+ }[] & ({
96
+ name?: string;
97
+ content?: string;
98
+ } & {
99
+ name?: string;
100
+ content?: string;
101
+ } & { [K in Exclude<keyof I["medias"][number], keyof Media>]: never; })[] & { [K_1 in Exclude<keyof I["medias"], keyof {
102
+ name?: string;
103
+ content?: string;
104
+ }[]>]: never; };
105
+ sex?: string;
106
+ birthday?: string;
107
+ location?: string;
108
+ } & { [K_2 in Exclude<keyof I, keyof Creator>]: never; }>(object: I): Creator;
109
+ };
110
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
111
+ 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 {} ? {
112
+ [K in keyof T]?: DeepPartial<T[K]>;
113
+ } : Partial<T>;
114
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
115
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
116
+ [K in keyof P]: Exact<P[K], I[K]>;
117
+ } & {
118
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
119
+ };
120
+ export {};
@@ -1,9 +1,11 @@
1
1
  import _m0 from "protobufjs/minimal";
2
+ import { Creator } from "./creator";
2
3
  import { Params } from "./params";
3
4
  export declare const protobufPackage = "iconlake.icon";
4
5
  /** GenesisState defines the icon module's genesis state. */
5
6
  export interface GenesisState {
6
7
  params: Params | undefined;
8
+ creatorList: Creator[];
7
9
  }
8
10
  export declare const GenesisState: {
9
11
  encode(message: GenesisState, writer?: _m0.Writer): _m0.Writer;
@@ -12,9 +14,85 @@ export declare const GenesisState: {
12
14
  toJSON(message: GenesisState): unknown;
13
15
  fromPartial<I extends {
14
16
  params?: {};
17
+ creatorList?: {
18
+ address?: string;
19
+ name?: string;
20
+ description?: string;
21
+ avatar?: string;
22
+ avatarHash?: string;
23
+ medias?: {
24
+ name?: string;
25
+ content?: string;
26
+ }[];
27
+ sex?: string;
28
+ birthday?: string;
29
+ location?: string;
30
+ }[];
15
31
  } & {
16
32
  params?: {} & {} & { [K in Exclude<keyof I["params"], never>]: never; };
17
- } & { [K_1 in Exclude<keyof I, "params">]: never; }>(object: I): GenesisState;
33
+ creatorList?: {
34
+ address?: string;
35
+ name?: string;
36
+ description?: string;
37
+ avatar?: string;
38
+ avatarHash?: string;
39
+ medias?: {
40
+ name?: string;
41
+ content?: string;
42
+ }[];
43
+ sex?: string;
44
+ birthday?: string;
45
+ location?: string;
46
+ }[] & ({
47
+ address?: string;
48
+ name?: string;
49
+ description?: string;
50
+ avatar?: string;
51
+ avatarHash?: string;
52
+ medias?: {
53
+ name?: string;
54
+ content?: string;
55
+ }[];
56
+ sex?: string;
57
+ birthday?: string;
58
+ location?: string;
59
+ } & {
60
+ address?: string;
61
+ name?: string;
62
+ description?: string;
63
+ avatar?: string;
64
+ avatarHash?: string;
65
+ medias?: {
66
+ name?: string;
67
+ content?: string;
68
+ }[] & ({
69
+ name?: string;
70
+ content?: string;
71
+ } & {
72
+ name?: string;
73
+ content?: string;
74
+ } & { [K_1 in Exclude<keyof I["creatorList"][number]["medias"][number], keyof import("./media").Media>]: never; })[] & { [K_2 in Exclude<keyof I["creatorList"][number]["medias"], keyof {
75
+ name?: string;
76
+ content?: string;
77
+ }[]>]: never; };
78
+ sex?: string;
79
+ birthday?: string;
80
+ location?: string;
81
+ } & { [K_3 in Exclude<keyof I["creatorList"][number], keyof Creator>]: never; })[] & { [K_4 in Exclude<keyof I["creatorList"], keyof {
82
+ address?: string;
83
+ name?: string;
84
+ description?: string;
85
+ avatar?: string;
86
+ avatarHash?: string;
87
+ medias?: {
88
+ name?: string;
89
+ content?: string;
90
+ }[];
91
+ sex?: string;
92
+ birthday?: string;
93
+ location?: string;
94
+ }[]>]: never; };
95
+ } & { [K_5 in Exclude<keyof I, keyof GenesisState>]: never; }>(object: I): GenesisState;
18
96
  };
19
97
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
20
98
  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 {} ? {
@@ -0,0 +1,30 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "iconlake.icon";
3
+ export interface Media {
4
+ name: string;
5
+ content: string;
6
+ }
7
+ export declare const Media: {
8
+ encode(message: Media, writer?: _m0.Writer): _m0.Writer;
9
+ decode(input: _m0.Reader | Uint8Array, length?: number): Media;
10
+ fromJSON(object: any): Media;
11
+ toJSON(message: Media): unknown;
12
+ fromPartial<I extends {
13
+ name?: string;
14
+ content?: string;
15
+ } & {
16
+ name?: string;
17
+ content?: string;
18
+ } & { [K in Exclude<keyof I, keyof Media>]: never; }>(object: I): Media;
19
+ };
20
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
21
+ 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
+ [K in keyof T]?: DeepPartial<T[K]>;
23
+ } : Partial<T>;
24
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
25
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
26
+ [K in keyof P]: Exact<P[K], I[K]>;
27
+ } & {
28
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
29
+ };
30
+ export {};