@0xsequence/metadata 0.38.0 → 0.38.1
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.
|
@@ -27,7 +27,7 @@ function _extends() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/* eslint-disable */
|
|
30
|
-
// sequence-metadata v0.4.0
|
|
30
|
+
// sequence-metadata v0.4.0 3f6b0f4aa1a7b58488e9399c277fc17995d74f5a
|
|
31
31
|
// --
|
|
32
32
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
33
33
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -36,10 +36,19 @@ const WebRPCVersion = "v1"; // Schema version of your RIDL schema
|
|
|
36
36
|
|
|
37
37
|
const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema
|
|
38
38
|
|
|
39
|
-
const WebRPCSchemaHash = "
|
|
39
|
+
const WebRPCSchemaHash = "3f6b0f4aa1a7b58488e9399c277fc17995d74f5a"; //
|
|
40
40
|
// Types
|
|
41
41
|
//
|
|
42
42
|
|
|
43
|
+
exports.ContractType = void 0;
|
|
44
|
+
|
|
45
|
+
(function (ContractType) {
|
|
46
|
+
ContractType["UNKNOWN"] = "UNKNOWN";
|
|
47
|
+
ContractType["ERC20"] = "ERC20";
|
|
48
|
+
ContractType["ERC721"] = "ERC721";
|
|
49
|
+
ContractType["ERC1155"] = "ERC1155";
|
|
50
|
+
})(exports.ContractType || (exports.ContractType = {}));
|
|
51
|
+
|
|
43
52
|
exports.SwapType = void 0;
|
|
44
53
|
|
|
45
54
|
(function (SwapType) {
|
|
@@ -48,6 +57,13 @@ exports.SwapType = void 0;
|
|
|
48
57
|
SwapType["SELL"] = "SELL";
|
|
49
58
|
})(exports.SwapType || (exports.SwapType = {}));
|
|
50
59
|
|
|
60
|
+
exports.SortOrder = void 0;
|
|
61
|
+
|
|
62
|
+
(function (SortOrder) {
|
|
63
|
+
SortOrder["DESC"] = "DESC";
|
|
64
|
+
SortOrder["ASC"] = "ASC";
|
|
65
|
+
})(exports.SortOrder || (exports.SortOrder = {}));
|
|
66
|
+
|
|
51
67
|
//
|
|
52
68
|
// Client
|
|
53
69
|
//
|
|
@@ -107,6 +123,28 @@ class Metadata {
|
|
|
107
123
|
});
|
|
108
124
|
};
|
|
109
125
|
|
|
126
|
+
this.searchTokenMetadata = (args, headers) => {
|
|
127
|
+
return this.fetch(this.url('SearchTokenMetadata'), createHTTPRequest(args, headers)).then(res => {
|
|
128
|
+
return buildResponse(res).then(_data => {
|
|
129
|
+
return {
|
|
130
|
+
page: _data.page,
|
|
131
|
+
tokenMetadata: _data.tokenMetadata
|
|
132
|
+
};
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
this.searchTokenIDs = (args, headers) => {
|
|
138
|
+
return this.fetch(this.url('SearchTokenIDs'), createHTTPRequest(args, headers)).then(res => {
|
|
139
|
+
return buildResponse(res).then(_data => {
|
|
140
|
+
return {
|
|
141
|
+
page: _data.page,
|
|
142
|
+
tokenIds: _data.tokenIds
|
|
143
|
+
};
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
|
|
110
148
|
this.getContractInfo = (args, headers) => {
|
|
111
149
|
return this.fetch(this.url('GetContractInfo'), createHTTPRequest(args, headers)).then(res => {
|
|
112
150
|
return buildResponse(res).then(_data => {
|
|
@@ -27,7 +27,7 @@ function _extends() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/* eslint-disable */
|
|
30
|
-
// sequence-metadata v0.4.0
|
|
30
|
+
// sequence-metadata v0.4.0 3f6b0f4aa1a7b58488e9399c277fc17995d74f5a
|
|
31
31
|
// --
|
|
32
32
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
33
33
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -36,10 +36,19 @@ const WebRPCVersion = "v1"; // Schema version of your RIDL schema
|
|
|
36
36
|
|
|
37
37
|
const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema
|
|
38
38
|
|
|
39
|
-
const WebRPCSchemaHash = "
|
|
39
|
+
const WebRPCSchemaHash = "3f6b0f4aa1a7b58488e9399c277fc17995d74f5a"; //
|
|
40
40
|
// Types
|
|
41
41
|
//
|
|
42
42
|
|
|
43
|
+
exports.ContractType = void 0;
|
|
44
|
+
|
|
45
|
+
(function (ContractType) {
|
|
46
|
+
ContractType["UNKNOWN"] = "UNKNOWN";
|
|
47
|
+
ContractType["ERC20"] = "ERC20";
|
|
48
|
+
ContractType["ERC721"] = "ERC721";
|
|
49
|
+
ContractType["ERC1155"] = "ERC1155";
|
|
50
|
+
})(exports.ContractType || (exports.ContractType = {}));
|
|
51
|
+
|
|
43
52
|
exports.SwapType = void 0;
|
|
44
53
|
|
|
45
54
|
(function (SwapType) {
|
|
@@ -48,6 +57,13 @@ exports.SwapType = void 0;
|
|
|
48
57
|
SwapType["SELL"] = "SELL";
|
|
49
58
|
})(exports.SwapType || (exports.SwapType = {}));
|
|
50
59
|
|
|
60
|
+
exports.SortOrder = void 0;
|
|
61
|
+
|
|
62
|
+
(function (SortOrder) {
|
|
63
|
+
SortOrder["DESC"] = "DESC";
|
|
64
|
+
SortOrder["ASC"] = "ASC";
|
|
65
|
+
})(exports.SortOrder || (exports.SortOrder = {}));
|
|
66
|
+
|
|
51
67
|
//
|
|
52
68
|
// Client
|
|
53
69
|
//
|
|
@@ -107,6 +123,28 @@ class Metadata {
|
|
|
107
123
|
});
|
|
108
124
|
};
|
|
109
125
|
|
|
126
|
+
this.searchTokenMetadata = (args, headers) => {
|
|
127
|
+
return this.fetch(this.url('SearchTokenMetadata'), createHTTPRequest(args, headers)).then(res => {
|
|
128
|
+
return buildResponse(res).then(_data => {
|
|
129
|
+
return {
|
|
130
|
+
page: _data.page,
|
|
131
|
+
tokenMetadata: _data.tokenMetadata
|
|
132
|
+
};
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
this.searchTokenIDs = (args, headers) => {
|
|
138
|
+
return this.fetch(this.url('SearchTokenIDs'), createHTTPRequest(args, headers)).then(res => {
|
|
139
|
+
return buildResponse(res).then(_data => {
|
|
140
|
+
return {
|
|
141
|
+
page: _data.page,
|
|
142
|
+
tokenIds: _data.tokenIds
|
|
143
|
+
};
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
|
|
110
148
|
this.getContractInfo = (args, headers) => {
|
|
111
149
|
return this.fetch(this.url('GetContractInfo'), createHTTPRequest(args, headers)).then(res => {
|
|
112
150
|
return buildResponse(res).then(_data => {
|
|
@@ -19,7 +19,7 @@ function _extends() {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/* eslint-disable */
|
|
22
|
-
// sequence-metadata v0.4.0
|
|
22
|
+
// sequence-metadata v0.4.0 3f6b0f4aa1a7b58488e9399c277fc17995d74f5a
|
|
23
23
|
// --
|
|
24
24
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
25
25
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -28,10 +28,19 @@ const WebRPCVersion = "v1"; // Schema version of your RIDL schema
|
|
|
28
28
|
|
|
29
29
|
const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema
|
|
30
30
|
|
|
31
|
-
const WebRPCSchemaHash = "
|
|
31
|
+
const WebRPCSchemaHash = "3f6b0f4aa1a7b58488e9399c277fc17995d74f5a"; //
|
|
32
32
|
// Types
|
|
33
33
|
//
|
|
34
34
|
|
|
35
|
+
let ContractType;
|
|
36
|
+
|
|
37
|
+
(function (ContractType) {
|
|
38
|
+
ContractType["UNKNOWN"] = "UNKNOWN";
|
|
39
|
+
ContractType["ERC20"] = "ERC20";
|
|
40
|
+
ContractType["ERC721"] = "ERC721";
|
|
41
|
+
ContractType["ERC1155"] = "ERC1155";
|
|
42
|
+
})(ContractType || (ContractType = {}));
|
|
43
|
+
|
|
35
44
|
let SwapType;
|
|
36
45
|
|
|
37
46
|
(function (SwapType) {
|
|
@@ -40,6 +49,13 @@ let SwapType;
|
|
|
40
49
|
SwapType["SELL"] = "SELL";
|
|
41
50
|
})(SwapType || (SwapType = {}));
|
|
42
51
|
|
|
52
|
+
let SortOrder;
|
|
53
|
+
|
|
54
|
+
(function (SortOrder) {
|
|
55
|
+
SortOrder["DESC"] = "DESC";
|
|
56
|
+
SortOrder["ASC"] = "ASC";
|
|
57
|
+
})(SortOrder || (SortOrder = {}));
|
|
58
|
+
|
|
43
59
|
//
|
|
44
60
|
// Client
|
|
45
61
|
//
|
|
@@ -99,6 +115,28 @@ class Metadata {
|
|
|
99
115
|
});
|
|
100
116
|
};
|
|
101
117
|
|
|
118
|
+
this.searchTokenMetadata = (args, headers) => {
|
|
119
|
+
return this.fetch(this.url('SearchTokenMetadata'), createHTTPRequest(args, headers)).then(res => {
|
|
120
|
+
return buildResponse(res).then(_data => {
|
|
121
|
+
return {
|
|
122
|
+
page: _data.page,
|
|
123
|
+
tokenMetadata: _data.tokenMetadata
|
|
124
|
+
};
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
this.searchTokenIDs = (args, headers) => {
|
|
130
|
+
return this.fetch(this.url('SearchTokenIDs'), createHTTPRequest(args, headers)).then(res => {
|
|
131
|
+
return buildResponse(res).then(_data => {
|
|
132
|
+
return {
|
|
133
|
+
page: _data.page,
|
|
134
|
+
tokenIds: _data.tokenIds
|
|
135
|
+
};
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
|
|
102
140
|
this.getContractInfo = (args, headers) => {
|
|
103
141
|
return this.fetch(this.url('GetContractInfo'), createHTTPRequest(args, headers)).then(res => {
|
|
104
142
|
return buildResponse(res).then(_data => {
|
|
@@ -208,4 +246,4 @@ class SequenceMetadataClient extends Metadata {
|
|
|
208
246
|
|
|
209
247
|
}
|
|
210
248
|
|
|
211
|
-
export { Metadata, SequenceMetadataClient, SwapType, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
|
|
249
|
+
export { ContractType, Metadata, SequenceMetadataClient, SortOrder, SwapType, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
export declare const WebRPCVersion = "v1";
|
|
2
2
|
export declare const WebRPCSchemaVersion = "v0.4.0";
|
|
3
|
-
export declare const WebRPCSchemaHash = "
|
|
3
|
+
export declare const WebRPCSchemaHash = "3f6b0f4aa1a7b58488e9399c277fc17995d74f5a";
|
|
4
|
+
export declare enum ContractType {
|
|
5
|
+
UNKNOWN = "UNKNOWN",
|
|
6
|
+
ERC20 = "ERC20",
|
|
7
|
+
ERC721 = "ERC721",
|
|
8
|
+
ERC1155 = "ERC1155"
|
|
9
|
+
}
|
|
4
10
|
export declare enum SwapType {
|
|
5
11
|
UNKNOWN = "UNKNOWN",
|
|
6
12
|
BUY = "BUY",
|
|
7
13
|
SELL = "SELL"
|
|
8
14
|
}
|
|
15
|
+
export declare enum SortOrder {
|
|
16
|
+
DESC = "DESC",
|
|
17
|
+
ASC = "ASC"
|
|
18
|
+
}
|
|
9
19
|
export interface Version {
|
|
10
20
|
webrpcVersion: string;
|
|
11
21
|
schemaVersion: string;
|
|
@@ -23,6 +33,22 @@ export interface RuntimeStatus {
|
|
|
23
33
|
}
|
|
24
34
|
export interface RuntimeChecks {
|
|
25
35
|
}
|
|
36
|
+
export interface ContractIndex {
|
|
37
|
+
chainId: number;
|
|
38
|
+
address: string;
|
|
39
|
+
type: ContractType;
|
|
40
|
+
metadata: {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export interface TokenIndex {
|
|
45
|
+
chainId: number;
|
|
46
|
+
contractAddress: string;
|
|
47
|
+
tokenId: string;
|
|
48
|
+
metadata: {
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
26
52
|
export interface ContractInfo {
|
|
27
53
|
chainId: number;
|
|
28
54
|
address: string;
|
|
@@ -66,12 +92,22 @@ export interface GetNiftyswapUnitPricesRequest {
|
|
|
66
92
|
ids: Array<string>;
|
|
67
93
|
amounts: Array<string>;
|
|
68
94
|
}
|
|
95
|
+
export interface Page {
|
|
96
|
+
pageSize?: number;
|
|
97
|
+
page?: number;
|
|
98
|
+
}
|
|
99
|
+
export interface SortBy {
|
|
100
|
+
column: string;
|
|
101
|
+
order: SortOrder;
|
|
102
|
+
}
|
|
69
103
|
export interface Metadata {
|
|
70
104
|
ping(headers?: object): Promise<PingReturn>;
|
|
71
105
|
version(headers?: object): Promise<VersionReturn>;
|
|
72
106
|
runtimeStatus(headers?: object): Promise<RuntimeStatusReturn>;
|
|
73
107
|
getTokenMetadata(args: GetTokenMetadataArgs, headers?: object): Promise<GetTokenMetadataReturn>;
|
|
74
108
|
getTokenMetadataBatch(args: GetTokenMetadataBatchArgs, headers?: object): Promise<GetTokenMetadataBatchReturn>;
|
|
109
|
+
searchTokenMetadata(args: SearchTokenMetadataArgs, headers?: object): Promise<SearchTokenMetadataReturn>;
|
|
110
|
+
searchTokenIDs(args: SearchTokenIDsArgs, headers?: object): Promise<SearchTokenIDsReturn>;
|
|
75
111
|
getContractInfo(args: GetContractInfoArgs, headers?: object): Promise<GetContractInfoReturn>;
|
|
76
112
|
getContractInfoBatch(args: GetContractInfoBatchArgs, headers?: object): Promise<GetContractInfoBatchReturn>;
|
|
77
113
|
searchContractInfo(args: SearchContractInfoArgs, headers?: object): Promise<SearchContractInfoReturn>;
|
|
@@ -113,6 +149,26 @@ export interface GetTokenMetadataBatchReturn {
|
|
|
113
149
|
[key: string]: Array<TokenMetadata>;
|
|
114
150
|
};
|
|
115
151
|
}
|
|
152
|
+
export interface SearchTokenMetadataArgs {
|
|
153
|
+
chainID: string;
|
|
154
|
+
contractAddress: string;
|
|
155
|
+
filter: string;
|
|
156
|
+
page?: Page;
|
|
157
|
+
}
|
|
158
|
+
export interface SearchTokenMetadataReturn {
|
|
159
|
+
page: Page;
|
|
160
|
+
tokenMetadata: Array<TokenMetadata>;
|
|
161
|
+
}
|
|
162
|
+
export interface SearchTokenIDsArgs {
|
|
163
|
+
chainID: string;
|
|
164
|
+
contractAddress: string;
|
|
165
|
+
filter: string;
|
|
166
|
+
page?: Page;
|
|
167
|
+
}
|
|
168
|
+
export interface SearchTokenIDsReturn {
|
|
169
|
+
page: Page;
|
|
170
|
+
tokenIds: Array<string>;
|
|
171
|
+
}
|
|
116
172
|
export interface GetContractInfoArgs {
|
|
117
173
|
chainID: string;
|
|
118
174
|
contractAddress: string;
|
|
@@ -174,6 +230,8 @@ export declare class Metadata implements Metadata {
|
|
|
174
230
|
runtimeStatus: (headers?: object | undefined) => Promise<RuntimeStatusReturn>;
|
|
175
231
|
getTokenMetadata: (args: GetTokenMetadataArgs, headers?: object | undefined) => Promise<GetTokenMetadataReturn>;
|
|
176
232
|
getTokenMetadataBatch: (args: GetTokenMetadataBatchArgs, headers?: object | undefined) => Promise<GetTokenMetadataBatchReturn>;
|
|
233
|
+
searchTokenMetadata: (args: SearchTokenMetadataArgs, headers?: object | undefined) => Promise<SearchTokenMetadataReturn>;
|
|
234
|
+
searchTokenIDs: (args: SearchTokenIDsArgs, headers?: object | undefined) => Promise<SearchTokenIDsReturn>;
|
|
177
235
|
getContractInfo: (args: GetContractInfoArgs, headers?: object | undefined) => Promise<GetContractInfoReturn>;
|
|
178
236
|
getContractInfoBatch: (args: GetContractInfoBatchArgs, headers?: object | undefined) => Promise<GetContractInfoBatchReturn>;
|
|
179
237
|
searchContractInfo: (args: SearchContractInfoArgs, headers?: object | undefined) => Promise<SearchContractInfoReturn>;
|
package/package.json
CHANGED
package/src/metadata.gen.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// sequence-metadata v0.4.0
|
|
2
|
+
// sequence-metadata v0.4.0 3f6b0f4aa1a7b58488e9399c277fc17995d74f5a
|
|
3
3
|
// --
|
|
4
4
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
5
5
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -11,18 +11,30 @@ export const WebRPCVersion = "v1"
|
|
|
11
11
|
export const WebRPCSchemaVersion = "v0.4.0"
|
|
12
12
|
|
|
13
13
|
// Schema hash generated from your RIDL schema
|
|
14
|
-
export const WebRPCSchemaHash = "
|
|
14
|
+
export const WebRPCSchemaHash = "3f6b0f4aa1a7b58488e9399c277fc17995d74f5a"
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
//
|
|
18
18
|
// Types
|
|
19
19
|
//
|
|
20
|
+
export enum ContractType {
|
|
21
|
+
UNKNOWN = 'UNKNOWN',
|
|
22
|
+
ERC20 = 'ERC20',
|
|
23
|
+
ERC721 = 'ERC721',
|
|
24
|
+
ERC1155 = 'ERC1155'
|
|
25
|
+
}
|
|
26
|
+
|
|
20
27
|
export enum SwapType {
|
|
21
28
|
UNKNOWN = 'UNKNOWN',
|
|
22
29
|
BUY = 'BUY',
|
|
23
30
|
SELL = 'SELL'
|
|
24
31
|
}
|
|
25
32
|
|
|
33
|
+
export enum SortOrder {
|
|
34
|
+
DESC = 'DESC',
|
|
35
|
+
ASC = 'ASC'
|
|
36
|
+
}
|
|
37
|
+
|
|
26
38
|
export interface Version {
|
|
27
39
|
webrpcVersion: string
|
|
28
40
|
schemaVersion: string
|
|
@@ -43,6 +55,21 @@ export interface RuntimeStatus {
|
|
|
43
55
|
export interface RuntimeChecks {
|
|
44
56
|
}
|
|
45
57
|
|
|
58
|
+
export interface ContractIndex {
|
|
59
|
+
chainId: number
|
|
60
|
+
address: string
|
|
61
|
+
type: ContractType
|
|
62
|
+
metadata: {[key: string]: any}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface TokenIndex {
|
|
66
|
+
chainId: number
|
|
67
|
+
contractAddress: string
|
|
68
|
+
tokenId: string
|
|
69
|
+
metadata: {[key: string]: any}
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
|
|
46
73
|
export interface ContractInfo {
|
|
47
74
|
chainId: number
|
|
48
75
|
address: string
|
|
@@ -86,12 +113,24 @@ export interface GetNiftyswapUnitPricesRequest {
|
|
|
86
113
|
amounts: Array<string>
|
|
87
114
|
}
|
|
88
115
|
|
|
116
|
+
export interface Page {
|
|
117
|
+
pageSize?: number
|
|
118
|
+
page?: number
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface SortBy {
|
|
122
|
+
column: string
|
|
123
|
+
order: SortOrder
|
|
124
|
+
}
|
|
125
|
+
|
|
89
126
|
export interface Metadata {
|
|
90
127
|
ping(headers?: object): Promise<PingReturn>
|
|
91
128
|
version(headers?: object): Promise<VersionReturn>
|
|
92
129
|
runtimeStatus(headers?: object): Promise<RuntimeStatusReturn>
|
|
93
130
|
getTokenMetadata(args: GetTokenMetadataArgs, headers?: object): Promise<GetTokenMetadataReturn>
|
|
94
131
|
getTokenMetadataBatch(args: GetTokenMetadataBatchArgs, headers?: object): Promise<GetTokenMetadataBatchReturn>
|
|
132
|
+
searchTokenMetadata(args: SearchTokenMetadataArgs, headers?: object): Promise<SearchTokenMetadataReturn>
|
|
133
|
+
searchTokenIDs(args: SearchTokenIDsArgs, headers?: object): Promise<SearchTokenIDsReturn>
|
|
95
134
|
getContractInfo(args: GetContractInfoArgs, headers?: object): Promise<GetContractInfoReturn>
|
|
96
135
|
getContractInfoBatch(args: GetContractInfoBatchArgs, headers?: object): Promise<GetContractInfoBatchReturn>
|
|
97
136
|
searchContractInfo(args: SearchContractInfoArgs, headers?: object): Promise<SearchContractInfoReturn>
|
|
@@ -135,6 +174,28 @@ export interface GetTokenMetadataBatchArgs {
|
|
|
135
174
|
export interface GetTokenMetadataBatchReturn {
|
|
136
175
|
contractTokenMetadata: {[key: string]: Array<TokenMetadata>}
|
|
137
176
|
}
|
|
177
|
+
export interface SearchTokenMetadataArgs {
|
|
178
|
+
chainID: string
|
|
179
|
+
contractAddress: string
|
|
180
|
+
filter: string
|
|
181
|
+
page?: Page
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export interface SearchTokenMetadataReturn {
|
|
185
|
+
page: Page
|
|
186
|
+
tokenMetadata: Array<TokenMetadata>
|
|
187
|
+
}
|
|
188
|
+
export interface SearchTokenIDsArgs {
|
|
189
|
+
chainID: string
|
|
190
|
+
contractAddress: string
|
|
191
|
+
filter: string
|
|
192
|
+
page?: Page
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export interface SearchTokenIDsReturn {
|
|
196
|
+
page: Page
|
|
197
|
+
tokenIds: Array<string>
|
|
198
|
+
}
|
|
138
199
|
export interface GetContractInfoArgs {
|
|
139
200
|
chainID: string
|
|
140
201
|
contractAddress: string
|
|
@@ -266,6 +327,32 @@ export class Metadata implements Metadata {
|
|
|
266
327
|
})
|
|
267
328
|
}
|
|
268
329
|
|
|
330
|
+
searchTokenMetadata = (args: SearchTokenMetadataArgs, headers?: object): Promise<SearchTokenMetadataReturn> => {
|
|
331
|
+
return this.fetch(
|
|
332
|
+
this.url('SearchTokenMetadata'),
|
|
333
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
334
|
+
return buildResponse(res).then(_data => {
|
|
335
|
+
return {
|
|
336
|
+
page: <Page>(_data.page),
|
|
337
|
+
tokenMetadata: <Array<TokenMetadata>>(_data.tokenMetadata)
|
|
338
|
+
}
|
|
339
|
+
})
|
|
340
|
+
})
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
searchTokenIDs = (args: SearchTokenIDsArgs, headers?: object): Promise<SearchTokenIDsReturn> => {
|
|
344
|
+
return this.fetch(
|
|
345
|
+
this.url('SearchTokenIDs'),
|
|
346
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
347
|
+
return buildResponse(res).then(_data => {
|
|
348
|
+
return {
|
|
349
|
+
page: <Page>(_data.page),
|
|
350
|
+
tokenIds: <Array<string>>(_data.tokenIds)
|
|
351
|
+
}
|
|
352
|
+
})
|
|
353
|
+
})
|
|
354
|
+
}
|
|
355
|
+
|
|
269
356
|
getContractInfo = (args: GetContractInfoArgs, headers?: object): Promise<GetContractInfoReturn> => {
|
|
270
357
|
return this.fetch(
|
|
271
358
|
this.url('GetContractInfo'),
|