@0xsequence/metadata 0.43.12 → 0.43.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.
@@ -18,7 +18,7 @@ function _extends() {
18
18
  }
19
19
 
20
20
  /* eslint-disable */
21
- // sequence-metadata v0.4.0 7632f016690db407e9764f41fecac1fb81a37493
21
+ // sequence-metadata v0.4.0 5d87d77b951c5d197544d97d75241bf3d02679d9
22
22
  // --
23
23
  // Code generated by webrpc-gen@v0.10.x-dev with typescript generator. DO NOT EDIT.
24
24
  //
@@ -31,7 +31,7 @@ const WebRPCVersion = "v1";
31
31
  const WebRPCSchemaVersion = "v0.4.0";
32
32
 
33
33
  // Schema hash generated from your RIDL schema
34
- const WebRPCSchemaHash = "7632f016690db407e9764f41fecac1fb81a37493";
34
+ const WebRPCSchemaHash = "5d87d77b951c5d197544d97d75241bf3d02679d9";
35
35
 
36
36
  //
37
37
  // Types
@@ -189,6 +189,16 @@ class Metadata {
189
189
  });
190
190
  });
191
191
  };
192
+ this.searchMetadata = (args, headers) => {
193
+ return this.fetch(this.url('SearchMetadata'), createHTTPRequest(args, headers)).then(res => {
194
+ return buildResponse(res).then(_data => {
195
+ return {
196
+ tokenMetadata: _data.tokenMetadata,
197
+ contractInfo: _data.contractInfo
198
+ };
199
+ });
200
+ });
201
+ };
192
202
  this.getNiftyswapTokenQuantity = (args, headers) => {
193
203
  return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers)).then(res => {
194
204
  return buildResponse(res).then(_data => {
@@ -207,6 +217,15 @@ class Metadata {
207
217
  });
208
218
  });
209
219
  };
220
+ this.getNiftyswapUnitPricesWithQuantities = (args, headers) => {
221
+ return this.fetch(this.url('GetNiftyswapUnitPricesWithQuantities'), createHTTPRequest(args, headers)).then(res => {
222
+ return buildResponse(res).then(_data => {
223
+ return {
224
+ prices: _data.prices
225
+ };
226
+ });
227
+ });
228
+ };
210
229
  this.hostname = hostname;
211
230
  this.fetch = (input, init) => fetch(input, init);
212
231
  }
@@ -18,7 +18,7 @@ function _extends() {
18
18
  }
19
19
 
20
20
  /* eslint-disable */
21
- // sequence-metadata v0.4.0 7632f016690db407e9764f41fecac1fb81a37493
21
+ // sequence-metadata v0.4.0 5d87d77b951c5d197544d97d75241bf3d02679d9
22
22
  // --
23
23
  // Code generated by webrpc-gen@v0.10.x-dev with typescript generator. DO NOT EDIT.
24
24
  //
@@ -31,7 +31,7 @@ const WebRPCVersion = "v1";
31
31
  const WebRPCSchemaVersion = "v0.4.0";
32
32
 
33
33
  // Schema hash generated from your RIDL schema
34
- const WebRPCSchemaHash = "7632f016690db407e9764f41fecac1fb81a37493";
34
+ const WebRPCSchemaHash = "5d87d77b951c5d197544d97d75241bf3d02679d9";
35
35
 
36
36
  //
37
37
  // Types
@@ -189,6 +189,16 @@ class Metadata {
189
189
  });
190
190
  });
191
191
  };
192
+ this.searchMetadata = (args, headers) => {
193
+ return this.fetch(this.url('SearchMetadata'), createHTTPRequest(args, headers)).then(res => {
194
+ return buildResponse(res).then(_data => {
195
+ return {
196
+ tokenMetadata: _data.tokenMetadata,
197
+ contractInfo: _data.contractInfo
198
+ };
199
+ });
200
+ });
201
+ };
192
202
  this.getNiftyswapTokenQuantity = (args, headers) => {
193
203
  return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers)).then(res => {
194
204
  return buildResponse(res).then(_data => {
@@ -207,6 +217,15 @@ class Metadata {
207
217
  });
208
218
  });
209
219
  };
220
+ this.getNiftyswapUnitPricesWithQuantities = (args, headers) => {
221
+ return this.fetch(this.url('GetNiftyswapUnitPricesWithQuantities'), createHTTPRequest(args, headers)).then(res => {
222
+ return buildResponse(res).then(_data => {
223
+ return {
224
+ prices: _data.prices
225
+ };
226
+ });
227
+ });
228
+ };
210
229
  this.hostname = hostname;
211
230
  this.fetch = (input, init) => fetch(input, init);
212
231
  }
@@ -14,7 +14,7 @@ function _extends() {
14
14
  }
15
15
 
16
16
  /* eslint-disable */
17
- // sequence-metadata v0.4.0 7632f016690db407e9764f41fecac1fb81a37493
17
+ // sequence-metadata v0.4.0 5d87d77b951c5d197544d97d75241bf3d02679d9
18
18
  // --
19
19
  // Code generated by webrpc-gen@v0.10.x-dev with typescript generator. DO NOT EDIT.
20
20
  //
@@ -27,7 +27,7 @@ const WebRPCVersion = "v1";
27
27
  const WebRPCSchemaVersion = "v0.4.0";
28
28
 
29
29
  // Schema hash generated from your RIDL schema
30
- const WebRPCSchemaHash = "7632f016690db407e9764f41fecac1fb81a37493";
30
+ const WebRPCSchemaHash = "5d87d77b951c5d197544d97d75241bf3d02679d9";
31
31
 
32
32
  //
33
33
  // Types
@@ -185,6 +185,16 @@ class Metadata {
185
185
  });
186
186
  });
187
187
  };
188
+ this.searchMetadata = (args, headers) => {
189
+ return this.fetch(this.url('SearchMetadata'), createHTTPRequest(args, headers)).then(res => {
190
+ return buildResponse(res).then(_data => {
191
+ return {
192
+ tokenMetadata: _data.tokenMetadata,
193
+ contractInfo: _data.contractInfo
194
+ };
195
+ });
196
+ });
197
+ };
188
198
  this.getNiftyswapTokenQuantity = (args, headers) => {
189
199
  return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers)).then(res => {
190
200
  return buildResponse(res).then(_data => {
@@ -203,6 +213,15 @@ class Metadata {
203
213
  });
204
214
  });
205
215
  };
216
+ this.getNiftyswapUnitPricesWithQuantities = (args, headers) => {
217
+ return this.fetch(this.url('GetNiftyswapUnitPricesWithQuantities'), createHTTPRequest(args, headers)).then(res => {
218
+ return buildResponse(res).then(_data => {
219
+ return {
220
+ prices: _data.prices
221
+ };
222
+ });
223
+ });
224
+ };
206
225
  this.hostname = hostname;
207
226
  this.fetch = (input, init) => fetch(input, init);
208
227
  }
@@ -1,6 +1,6 @@
1
1
  export declare const WebRPCVersion = "v1";
2
2
  export declare const WebRPCSchemaVersion = "v0.4.0";
3
- export declare const WebRPCSchemaHash = "7632f016690db407e9764f41fecac1fb81a37493";
3
+ export declare const WebRPCSchemaHash = "5d87d77b951c5d197544d97d75241bf3d02679d9";
4
4
  export declare enum ContractType {
5
5
  UNKNOWN = "UNKNOWN",
6
6
  ERC20 = "ERC20",
@@ -117,6 +117,11 @@ export interface GetNiftyswapUnitPricesRequest {
117
117
  ids: Array<string>;
118
118
  amounts: Array<string>;
119
119
  }
120
+ export interface GetNiftyswapUnitPricesResponse {
121
+ unitPrice: string;
122
+ unitAmount: string;
123
+ availableAmount: string;
124
+ }
120
125
  export interface Page {
121
126
  pageSize?: number;
122
127
  page?: number;
@@ -139,8 +144,10 @@ export interface Metadata {
139
144
  getContractInfoBatch(args: GetContractInfoBatchArgs, headers?: object): Promise<GetContractInfoBatchReturn>;
140
145
  searchContractInfo(args: SearchContractInfoArgs, headers?: object): Promise<SearchContractInfoReturn>;
141
146
  searchContractInfoBatch(args: SearchContractInfoBatchArgs, headers?: object): Promise<SearchContractInfoBatchReturn>;
147
+ searchMetadata(args: SearchMetadataArgs, headers?: object): Promise<SearchMetadataReturn>;
142
148
  getNiftyswapTokenQuantity(args: GetNiftyswapTokenQuantityArgs, headers?: object): Promise<GetNiftyswapTokenQuantityReturn>;
143
149
  getNiftyswapUnitPrices(args: GetNiftyswapUnitPricesArgs, headers?: object): Promise<GetNiftyswapUnitPricesReturn>;
150
+ getNiftyswapUnitPricesWithQuantities(args: GetNiftyswapUnitPricesWithQuantitiesArgs, headers?: object): Promise<GetNiftyswapUnitPricesWithQuantitiesReturn>;
144
151
  }
145
152
  export interface PingArgs {
146
153
  }
@@ -244,6 +251,13 @@ export interface SearchContractInfoBatchReturn {
244
251
  [key: string]: Array<ContractInfo>;
245
252
  };
246
253
  }
254
+ export interface SearchMetadataArgs {
255
+ filter: string;
256
+ }
257
+ export interface SearchMetadataReturn {
258
+ tokenMetadata: Array<TokenMetadata>;
259
+ contractInfo: Array<ContractInfo>;
260
+ }
247
261
  export interface GetNiftyswapTokenQuantityArgs {
248
262
  chainID: string;
249
263
  contractAddress: string;
@@ -265,6 +279,17 @@ export interface GetNiftyswapUnitPricesReturn {
265
279
  [key: string]: string;
266
280
  };
267
281
  }
282
+ export interface GetNiftyswapUnitPricesWithQuantitiesArgs {
283
+ chainID: string;
284
+ contractAddress: string;
285
+ req: GetNiftyswapUnitPricesRequest;
286
+ fresh: boolean;
287
+ }
288
+ export interface GetNiftyswapUnitPricesWithQuantitiesReturn {
289
+ prices: {
290
+ [key: string]: GetNiftyswapUnitPricesResponse;
291
+ };
292
+ }
268
293
  export declare class Metadata implements Metadata {
269
294
  protected hostname: string;
270
295
  protected fetch: Fetch;
@@ -284,8 +309,10 @@ export declare class Metadata implements Metadata {
284
309
  getContractInfoBatch: (args: GetContractInfoBatchArgs, headers?: object | undefined) => Promise<GetContractInfoBatchReturn>;
285
310
  searchContractInfo: (args: SearchContractInfoArgs, headers?: object | undefined) => Promise<SearchContractInfoReturn>;
286
311
  searchContractInfoBatch: (args: SearchContractInfoBatchArgs, headers?: object | undefined) => Promise<SearchContractInfoBatchReturn>;
312
+ searchMetadata: (args: SearchMetadataArgs, headers?: object | undefined) => Promise<SearchMetadataReturn>;
287
313
  getNiftyswapTokenQuantity: (args: GetNiftyswapTokenQuantityArgs, headers?: object | undefined) => Promise<GetNiftyswapTokenQuantityReturn>;
288
314
  getNiftyswapUnitPrices: (args: GetNiftyswapUnitPricesArgs, headers?: object | undefined) => Promise<GetNiftyswapUnitPricesReturn>;
315
+ getNiftyswapUnitPricesWithQuantities: (args: GetNiftyswapUnitPricesWithQuantitiesArgs, headers?: object | undefined) => Promise<GetNiftyswapUnitPricesWithQuantitiesReturn>;
289
316
  }
290
317
  export interface WebRPCError extends Error {
291
318
  code: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/metadata",
3
- "version": "0.43.12",
3
+ "version": "0.43.13",
4
4
  "description": "metadata sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/metadata",
6
6
  "source": "src/index.ts",
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
- // sequence-metadata v0.4.0 7632f016690db407e9764f41fecac1fb81a37493
2
+ // sequence-metadata v0.4.0 5d87d77b951c5d197544d97d75241bf3d02679d9
3
3
  // --
4
4
  // Code generated by webrpc-gen@v0.10.x-dev with typescript generator. DO NOT EDIT.
5
5
  //
@@ -12,7 +12,7 @@ export const WebRPCVersion = "v1"
12
12
  export const WebRPCSchemaVersion = "v0.4.0"
13
13
 
14
14
  // Schema hash generated from your RIDL schema
15
- export const WebRPCSchemaHash = "7632f016690db407e9764f41fecac1fb81a37493"
15
+ export const WebRPCSchemaHash = "5d87d77b951c5d197544d97d75241bf3d02679d9"
16
16
 
17
17
  //
18
18
  // Types
@@ -24,20 +24,17 @@ export enum ContractType {
24
24
  ERC721 = 'ERC721',
25
25
  ERC1155 = 'ERC1155'
26
26
  }
27
-
28
27
  export enum PropertyType {
29
28
  INT = 'INT',
30
29
  STRING = 'STRING',
31
30
  ARRAY = 'ARRAY',
32
31
  GENERIC = 'GENERIC'
33
32
  }
34
-
35
33
  export enum SwapType {
36
34
  UNKNOWN = 'UNKNOWN',
37
35
  BUY = 'BUY',
38
36
  SELL = 'SELL'
39
37
  }
40
-
41
38
  export enum SortOrder {
42
39
  DESC = 'DESC',
43
40
  ASC = 'ASC'
@@ -72,6 +69,7 @@ export interface ContractIndex {
72
69
  deployed: boolean
73
70
  bytecodeHash: string
74
71
  notFound: boolean
72
+
75
73
  }
76
74
 
77
75
  export interface TokenIndex {
@@ -94,7 +92,8 @@ export interface ContractInfo {
94
92
  logoURI: string
95
93
  deployed: boolean
96
94
  bytecodeHash: string
97
- extensions: ContractInfoExtensions
95
+ extensions: ContractInfoExtensions
96
+
98
97
  }
99
98
 
100
99
  export interface ContractInfoExtensions {
@@ -142,6 +141,12 @@ export interface GetNiftyswapUnitPricesRequest {
142
141
  amounts: Array<string>
143
142
  }
144
143
 
144
+ export interface GetNiftyswapUnitPricesResponse {
145
+ unitPrice: string
146
+ unitAmount: string
147
+ availableAmount: string
148
+ }
149
+
145
150
  export interface Page {
146
151
  pageSize?: number
147
152
  page?: number
@@ -166,8 +171,10 @@ export interface Metadata {
166
171
  getContractInfoBatch(args: GetContractInfoBatchArgs, headers?: object): Promise<GetContractInfoBatchReturn>
167
172
  searchContractInfo(args: SearchContractInfoArgs, headers?: object): Promise<SearchContractInfoReturn>
168
173
  searchContractInfoBatch(args: SearchContractInfoBatchArgs, headers?: object): Promise<SearchContractInfoBatchReturn>
174
+ searchMetadata(args: SearchMetadataArgs, headers?: object): Promise<SearchMetadataReturn>
169
175
  getNiftyswapTokenQuantity(args: GetNiftyswapTokenQuantityArgs, headers?: object): Promise<GetNiftyswapTokenQuantityReturn>
170
176
  getNiftyswapUnitPrices(args: GetNiftyswapUnitPricesArgs, headers?: object): Promise<GetNiftyswapUnitPricesReturn>
177
+ getNiftyswapUnitPricesWithQuantities(args: GetNiftyswapUnitPricesWithQuantitiesArgs, headers?: object): Promise<GetNiftyswapUnitPricesWithQuantitiesReturn>
171
178
  }
172
179
 
173
180
  export interface PingArgs {
@@ -275,6 +282,14 @@ export interface SearchContractInfoBatchArgs {
275
282
  export interface SearchContractInfoBatchReturn {
276
283
  contractInfoByChain: {[key: string]: Array<ContractInfo>}
277
284
  }
285
+ export interface SearchMetadataArgs {
286
+ filter: string
287
+ }
288
+
289
+ export interface SearchMetadataReturn {
290
+ tokenMetadata: Array<TokenMetadata>
291
+ contractInfo: Array<ContractInfo>
292
+ }
278
293
  export interface GetNiftyswapTokenQuantityArgs {
279
294
  chainID: string
280
295
  contractAddress: string
@@ -294,6 +309,16 @@ export interface GetNiftyswapUnitPricesArgs {
294
309
  export interface GetNiftyswapUnitPricesReturn {
295
310
  prices: {[key: string]: string}
296
311
  }
312
+ export interface GetNiftyswapUnitPricesWithQuantitiesArgs {
313
+ chainID: string
314
+ contractAddress: string
315
+ req: GetNiftyswapUnitPricesRequest
316
+ fresh: boolean
317
+ }
318
+
319
+ export interface GetNiftyswapUnitPricesWithQuantitiesReturn {
320
+ prices: {[key: string]: GetNiftyswapUnitPricesResponse}
321
+ }
297
322
 
298
323
 
299
324
 
@@ -475,6 +500,19 @@ export class Metadata implements Metadata {
475
500
  })
476
501
  }
477
502
 
503
+ searchMetadata = (args: SearchMetadataArgs, headers?: object): Promise<SearchMetadataReturn> => {
504
+ return this.fetch(
505
+ this.url('SearchMetadata'),
506
+ createHTTPRequest(args, headers)).then((res) => {
507
+ return buildResponse(res).then(_data => {
508
+ return {
509
+ tokenMetadata: <Array<TokenMetadata>>(_data.tokenMetadata),
510
+ contractInfo: <Array<ContractInfo>>(_data.contractInfo)
511
+ }
512
+ })
513
+ })
514
+ }
515
+
478
516
  getNiftyswapTokenQuantity = (args: GetNiftyswapTokenQuantityArgs, headers?: object): Promise<GetNiftyswapTokenQuantityReturn> => {
479
517
  return this.fetch(
480
518
  this.url('GetNiftyswapTokenQuantity'),
@@ -499,6 +537,18 @@ export class Metadata implements Metadata {
499
537
  })
500
538
  }
501
539
 
540
+ getNiftyswapUnitPricesWithQuantities = (args: GetNiftyswapUnitPricesWithQuantitiesArgs, headers?: object): Promise<GetNiftyswapUnitPricesWithQuantitiesReturn> => {
541
+ return this.fetch(
542
+ this.url('GetNiftyswapUnitPricesWithQuantities'),
543
+ createHTTPRequest(args, headers)).then((res) => {
544
+ return buildResponse(res).then(_data => {
545
+ return {
546
+ prices: <{[key: string]: GetNiftyswapUnitPricesResponse}>(_data.prices)
547
+ }
548
+ })
549
+ })
550
+ }
551
+
502
552
  }
503
553
 
504
554