@0xsequence/marketplace 2.3.16 → 2.3.18
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/0xsequence-marketplace.cjs.d.ts +2 -2
- package/dist/0xsequence-marketplace.cjs.js +15 -6
- package/package.json +1 -1
- package/src/marketplace.gen.ts +1432 -798
- package/dist/0xsequence-marketplace.cjs.dev.js +0 -1261
- package/dist/0xsequence-marketplace.cjs.prod.js +0 -1261
- package/dist/0xsequence-marketplace.esm.js +0 -1201
- package/dist/declarations/src/index.d.ts +0 -8
- package/dist/declarations/src/marketplace.gen.d.ts +0 -1077
package/src/marketplace.gen.ts
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// marketplace-api
|
|
2
|
+
// marketplace-api 6b46374337129883386b9668e652237c3b31eda1
|
|
3
3
|
// --
|
|
4
4
|
// Code generated by webrpc-gen@v0.25.4 with typescript generator. DO NOT EDIT.
|
|
5
5
|
//
|
|
6
6
|
// webrpc-gen -schema=marketplace.ridl -target=typescript -client -out=./clients/marketplace.gen.ts
|
|
7
7
|
|
|
8
|
-
export const WebrpcHeader =
|
|
8
|
+
export const WebrpcHeader = 'Webrpc'
|
|
9
9
|
|
|
10
|
-
export const WebrpcHeaderValue =
|
|
10
|
+
export const WebrpcHeaderValue =
|
|
11
|
+
'webrpc@v0.25.4;gen-typescript@v0.17.0;marketplace-api@v0.0.0-6b46374337129883386b9668e652237c3b31eda1'
|
|
11
12
|
|
|
12
13
|
// WebRPC description and code-gen version
|
|
13
|
-
export const WebRPCVersion =
|
|
14
|
+
export const WebRPCVersion = 'v1'
|
|
14
15
|
|
|
15
16
|
// Schema version of your RIDL schema
|
|
16
|
-
export const WebRPCSchemaVersion =
|
|
17
|
+
export const WebRPCSchemaVersion = ''
|
|
17
18
|
|
|
18
19
|
// Schema hash generated from your RIDL schema
|
|
19
|
-
export const WebRPCSchemaHash =
|
|
20
|
+
export const WebRPCSchemaHash = '6b46374337129883386b9668e652237c3b31eda1'
|
|
20
21
|
|
|
21
22
|
type WebrpcGenVersions = {
|
|
22
|
-
webrpcGenVersion: string
|
|
23
|
-
codeGenName: string
|
|
24
|
-
codeGenVersion: string
|
|
25
|
-
schemaName: string
|
|
26
|
-
schemaVersion: string
|
|
27
|
-
}
|
|
23
|
+
webrpcGenVersion: string
|
|
24
|
+
codeGenName: string
|
|
25
|
+
codeGenVersion: string
|
|
26
|
+
schemaName: string
|
|
27
|
+
schemaVersion: string
|
|
28
|
+
}
|
|
28
29
|
|
|
29
30
|
export function VersionFromHeader(headers: Headers): WebrpcGenVersions {
|
|
30
|
-
const headerValue = headers.get(WebrpcHeader)
|
|
31
|
+
const headerValue = headers.get(WebrpcHeader)
|
|
31
32
|
if (!headerValue) {
|
|
32
33
|
return {
|
|
33
|
-
webrpcGenVersion:
|
|
34
|
-
codeGenName:
|
|
35
|
-
codeGenVersion:
|
|
36
|
-
schemaName:
|
|
37
|
-
schemaVersion:
|
|
38
|
-
}
|
|
34
|
+
webrpcGenVersion: '',
|
|
35
|
+
codeGenName: '',
|
|
36
|
+
codeGenVersion: '',
|
|
37
|
+
schemaName: '',
|
|
38
|
+
schemaVersion: ''
|
|
39
|
+
}
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
return parseWebrpcGenVersions(headerValue)
|
|
42
|
+
return parseWebrpcGenVersions(headerValue)
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
function parseWebrpcGenVersions(header: string): WebrpcGenVersions {
|
|
45
|
-
const versions = header.split(
|
|
46
|
+
const versions = header.split(';')
|
|
46
47
|
if (versions.length < 3) {
|
|
47
48
|
return {
|
|
48
|
-
webrpcGenVersion:
|
|
49
|
-
codeGenName:
|
|
50
|
-
codeGenVersion:
|
|
51
|
-
schemaName:
|
|
52
|
-
schemaVersion:
|
|
53
|
-
}
|
|
49
|
+
webrpcGenVersion: '',
|
|
50
|
+
codeGenName: '',
|
|
51
|
+
codeGenVersion: '',
|
|
52
|
+
schemaName: '',
|
|
53
|
+
schemaVersion: ''
|
|
54
|
+
}
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
const [_, webrpcGenVersion] = versions[0]!.split(
|
|
57
|
-
const [codeGenName, codeGenVersion] = versions[1]!.split(
|
|
58
|
-
const [schemaName, schemaVersion] = versions[2]!.split(
|
|
57
|
+
const [_, webrpcGenVersion] = versions[0]!.split('@')
|
|
58
|
+
const [codeGenName, codeGenVersion] = versions[1]!.split('@')
|
|
59
|
+
const [schemaName, schemaVersion] = versions[2]!.split('@')
|
|
59
60
|
|
|
60
61
|
return {
|
|
61
|
-
webrpcGenVersion: webrpcGenVersion ??
|
|
62
|
-
codeGenName: codeGenName ??
|
|
63
|
-
codeGenVersion: codeGenVersion ??
|
|
64
|
-
schemaName: schemaName ??
|
|
65
|
-
schemaVersion: schemaVersion ??
|
|
66
|
-
}
|
|
62
|
+
webrpcGenVersion: webrpcGenVersion ?? '',
|
|
63
|
+
codeGenName: codeGenName ?? '',
|
|
64
|
+
codeGenVersion: codeGenVersion ?? '',
|
|
65
|
+
schemaName: schemaName ?? '',
|
|
66
|
+
schemaVersion: schemaVersion ?? ''
|
|
67
|
+
}
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
//
|
|
70
71
|
// Types
|
|
71
72
|
//
|
|
72
73
|
|
|
73
|
-
|
|
74
74
|
export interface TokenMetadata {
|
|
75
75
|
tokenId: string
|
|
76
76
|
name: string
|
|
@@ -78,8 +78,8 @@ export interface TokenMetadata {
|
|
|
78
78
|
image?: string
|
|
79
79
|
video?: string
|
|
80
80
|
audio?: string
|
|
81
|
-
properties?: {[key: string]: any}
|
|
82
|
-
attributes: Array<{[key: string]: any}>
|
|
81
|
+
properties?: { [key: string]: any }
|
|
82
|
+
attributes: Array<{ [key: string]: any }>
|
|
83
83
|
image_data?: string
|
|
84
84
|
external_url?: string
|
|
85
85
|
background_color?: string
|
|
@@ -104,8 +104,8 @@ export interface Asset {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
export enum SortOrder {
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
ASC = 'ASC',
|
|
108
|
+
DESC = 'DESC'
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
export enum PropertyType {
|
|
@@ -181,10 +181,6 @@ export enum CollectionPriority {
|
|
|
181
181
|
export enum CollectionStatus {
|
|
182
182
|
unknown = 'unknown',
|
|
183
183
|
created = 'created',
|
|
184
|
-
syncing_contract_metadata = 'syncing_contract_metadata',
|
|
185
|
-
synced_contract_metadata = 'synced_contract_metadata',
|
|
186
|
-
syncing_tokens = 'syncing_tokens',
|
|
187
|
-
synced_tokens = 'synced_tokens',
|
|
188
184
|
syncing_orders = 'syncing_orders',
|
|
189
185
|
active = 'active',
|
|
190
186
|
failed = 'failed',
|
|
@@ -198,12 +194,30 @@ export enum ProjectStatus {
|
|
|
198
194
|
inactive = 'inactive'
|
|
199
195
|
}
|
|
200
196
|
|
|
197
|
+
export enum ItemsContractStatus {
|
|
198
|
+
unknown = 'unknown',
|
|
199
|
+
created = 'created',
|
|
200
|
+
syncing_contract_metadata = 'syncing_contract_metadata',
|
|
201
|
+
synced_contract_metadata = 'synced_contract_metadata',
|
|
202
|
+
syncing_tokens = 'syncing_tokens',
|
|
203
|
+
synced_tokens = 'synced_tokens',
|
|
204
|
+
active = 'active',
|
|
205
|
+
inactive = 'inactive',
|
|
206
|
+
incompatible_type = 'incompatible_type'
|
|
207
|
+
}
|
|
208
|
+
|
|
201
209
|
export enum CollectibleStatus {
|
|
202
210
|
unknown = 'unknown',
|
|
203
211
|
active = 'active',
|
|
204
212
|
inactive = 'inactive'
|
|
205
213
|
}
|
|
206
214
|
|
|
215
|
+
export enum CollectibleSource {
|
|
216
|
+
unknown = 'unknown',
|
|
217
|
+
indexer = 'indexer',
|
|
218
|
+
manual = 'manual'
|
|
219
|
+
}
|
|
220
|
+
|
|
207
221
|
export enum CurrencyStatus {
|
|
208
222
|
unknown = 'unknown',
|
|
209
223
|
created = 'created',
|
|
@@ -237,19 +251,19 @@ export enum TransactionCrypto {
|
|
|
237
251
|
|
|
238
252
|
export enum TransactionNFTCheckoutProvider {
|
|
239
253
|
unknown = 'unknown',
|
|
240
|
-
|
|
241
|
-
|
|
254
|
+
transak = 'transak',
|
|
255
|
+
sardine = 'sardine'
|
|
242
256
|
}
|
|
243
257
|
|
|
244
258
|
export enum TransactionOnRampProvider {
|
|
245
259
|
unknown = 'unknown',
|
|
246
|
-
|
|
247
|
-
|
|
260
|
+
transak = 'transak',
|
|
261
|
+
sardine = 'sardine'
|
|
248
262
|
}
|
|
249
263
|
|
|
250
264
|
export enum TransactionSwapProvider {
|
|
251
265
|
unknown = 'unknown',
|
|
252
|
-
|
|
266
|
+
lifi = 'lifi'
|
|
253
267
|
}
|
|
254
268
|
|
|
255
269
|
export enum ExecuteType {
|
|
@@ -268,6 +282,22 @@ export enum ActivityAction {
|
|
|
268
282
|
transfer = 'transfer'
|
|
269
283
|
}
|
|
270
284
|
|
|
285
|
+
export enum PrimarySaleContractStatus {
|
|
286
|
+
unknown = 'unknown',
|
|
287
|
+
created = 'created',
|
|
288
|
+
syncing_items = 'syncing_items',
|
|
289
|
+
active = 'active',
|
|
290
|
+
inactive = 'inactive',
|
|
291
|
+
incompatible_type = 'incompatible_type',
|
|
292
|
+
failed = 'failed'
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export enum PrimarySaleItemDetailType {
|
|
296
|
+
unknown = 'unknown',
|
|
297
|
+
global = 'global',
|
|
298
|
+
individual = 'individual'
|
|
299
|
+
}
|
|
300
|
+
|
|
271
301
|
export interface Page {
|
|
272
302
|
page: number
|
|
273
303
|
pageSize: number
|
|
@@ -376,7 +406,7 @@ export interface Collection {
|
|
|
376
406
|
}
|
|
377
407
|
|
|
378
408
|
export interface CollectionConfig {
|
|
379
|
-
lastSynced: {[key: string]: CollectionLastSynced}
|
|
409
|
+
lastSynced: { [key: string]: CollectionLastSynced }
|
|
380
410
|
collectiblesSynced: string
|
|
381
411
|
activitiesSynced: string
|
|
382
412
|
activitiesSyncedContinuity: string
|
|
@@ -397,12 +427,22 @@ export interface Project {
|
|
|
397
427
|
deletedAt?: string
|
|
398
428
|
}
|
|
399
429
|
|
|
400
|
-
export interface
|
|
430
|
+
export interface ItemsContract {
|
|
431
|
+
status: ItemsContractStatus
|
|
401
432
|
chainId: number
|
|
402
433
|
contractAddress: string
|
|
434
|
+
contractType: ContractType
|
|
435
|
+
lastSynced: string
|
|
436
|
+
createdAt: string
|
|
437
|
+
updatedAt: string
|
|
438
|
+
deletedAt?: string
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
export interface Collectible {
|
|
403
442
|
status: CollectibleStatus
|
|
404
443
|
tokenId: string
|
|
405
444
|
decimals: number
|
|
445
|
+
source: CollectibleSource
|
|
406
446
|
createdAt: string
|
|
407
447
|
updatedAt: string
|
|
408
448
|
deletedAt?: string
|
|
@@ -519,6 +559,53 @@ export interface Activity {
|
|
|
519
559
|
deletedAt?: string
|
|
520
560
|
}
|
|
521
561
|
|
|
562
|
+
export interface PrimarySaleContract {
|
|
563
|
+
chainId: number
|
|
564
|
+
contractAddress: string
|
|
565
|
+
collectionAddress: string
|
|
566
|
+
contractType: ContractType
|
|
567
|
+
currencyAddress: string
|
|
568
|
+
priceDecimals: number
|
|
569
|
+
status: PrimarySaleContractStatus
|
|
570
|
+
lastSynced: string
|
|
571
|
+
createdAt: string
|
|
572
|
+
updatedAt: string
|
|
573
|
+
deletedAt?: string
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
export interface PrimarySaleItem {
|
|
577
|
+
itemAddress: string
|
|
578
|
+
contractType: ContractType
|
|
579
|
+
tokenId: string
|
|
580
|
+
itemType: PrimarySaleItemDetailType
|
|
581
|
+
startDate: string
|
|
582
|
+
endDate: string
|
|
583
|
+
currencyAddress: string
|
|
584
|
+
priceDecimals: number
|
|
585
|
+
priceAmount: string
|
|
586
|
+
priceAmountFormatted: string
|
|
587
|
+
supply: string
|
|
588
|
+
createdAt: string
|
|
589
|
+
updatedAt: string
|
|
590
|
+
deletedAt?: string
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
export interface CollectiblePrimarySaleItem {
|
|
594
|
+
metadata: TokenMetadata
|
|
595
|
+
primarySaleItem: PrimarySaleItem
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
export interface PrimarySaleItemsFilter {
|
|
599
|
+
includeEmpty: boolean
|
|
600
|
+
searchText?: string
|
|
601
|
+
properties?: Array<PropertyFilter>
|
|
602
|
+
detailTypes?: Array<PrimarySaleItemDetailType>
|
|
603
|
+
startDateAfter?: string
|
|
604
|
+
startDateBefore?: string
|
|
605
|
+
endDateAfter?: string
|
|
606
|
+
endDateBefore?: string
|
|
607
|
+
}
|
|
608
|
+
|
|
522
609
|
export interface Admin {
|
|
523
610
|
createCollection(args: CreateCollectionArgs, headers?: object, signal?: AbortSignal): Promise<CreateCollectionReturn>
|
|
524
611
|
getCollection(args: GetCollectionArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectionReturn>
|
|
@@ -529,141 +616,264 @@ export interface Admin {
|
|
|
529
616
|
* determine what should happen here
|
|
530
617
|
*/
|
|
531
618
|
syncCollection(args: SyncCollectionArgs, headers?: object, signal?: AbortSignal): Promise<SyncCollectionReturn>
|
|
619
|
+
createPrimarySaleContract(
|
|
620
|
+
args: CreatePrimarySaleContractArgs,
|
|
621
|
+
headers?: object,
|
|
622
|
+
signal?: AbortSignal
|
|
623
|
+
): Promise<CreatePrimarySaleContractReturn>
|
|
624
|
+
deletePrimarySaleContract(
|
|
625
|
+
args: DeletePrimarySaleContractArgs,
|
|
626
|
+
headers?: object,
|
|
627
|
+
signal?: AbortSignal
|
|
628
|
+
): Promise<DeletePrimarySaleContractReturn>
|
|
532
629
|
createCurrency(args: CreateCurrencyArgs, headers?: object, signal?: AbortSignal): Promise<CreateCurrencyReturn>
|
|
533
630
|
createCurrencies(args: CreateCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise<CreateCurrenciesReturn>
|
|
534
631
|
updateCurrency(args: UpdateCurrencyArgs, headers?: object, signal?: AbortSignal): Promise<UpdateCurrencyReturn>
|
|
535
|
-
listCurrencies(headers?: object, signal?: AbortSignal): Promise<ListCurrenciesReturn>
|
|
632
|
+
listCurrencies(args: ListCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise<ListCurrenciesReturn>
|
|
536
633
|
deleteCurrency(args: DeleteCurrencyArgs, headers?: object, signal?: AbortSignal): Promise<DeleteCurrencyReturn>
|
|
634
|
+
/**
|
|
635
|
+
* This for manual adding of non minted ERC1155 tokens, it's used for purposes of Shop.
|
|
636
|
+
*/
|
|
637
|
+
addCollectibles(args: AddCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise<AddCollectiblesReturn>
|
|
537
638
|
}
|
|
538
639
|
|
|
539
640
|
export interface CreateCollectionArgs {
|
|
641
|
+
chainId: string
|
|
540
642
|
projectId: number
|
|
541
643
|
contractAddress: string
|
|
542
644
|
}
|
|
543
645
|
|
|
544
646
|
export interface CreateCollectionReturn {
|
|
545
|
-
collection: Collection
|
|
647
|
+
collection: Collection
|
|
546
648
|
}
|
|
547
649
|
export interface GetCollectionArgs {
|
|
650
|
+
chainId: string
|
|
548
651
|
projectId: number
|
|
549
652
|
contractAddress: string
|
|
550
653
|
}
|
|
551
654
|
|
|
552
655
|
export interface GetCollectionReturn {
|
|
553
|
-
collection: Collection
|
|
656
|
+
collection: Collection
|
|
554
657
|
}
|
|
555
658
|
export interface UpdateCollectionArgs {
|
|
659
|
+
chainId: string
|
|
556
660
|
collection: Collection
|
|
557
661
|
}
|
|
558
662
|
|
|
559
663
|
export interface UpdateCollectionReturn {
|
|
560
|
-
collection: Collection
|
|
664
|
+
collection: Collection
|
|
561
665
|
}
|
|
562
666
|
export interface ListCollectionsArgs {
|
|
667
|
+
chainId: string
|
|
563
668
|
projectId: number
|
|
564
669
|
page?: Page
|
|
565
670
|
}
|
|
566
671
|
|
|
567
672
|
export interface ListCollectionsReturn {
|
|
568
673
|
collections: Array<Collection>
|
|
569
|
-
page?: Page
|
|
674
|
+
page?: Page
|
|
570
675
|
}
|
|
571
676
|
export interface DeleteCollectionArgs {
|
|
677
|
+
chainId: string
|
|
572
678
|
projectId: number
|
|
573
679
|
contractAddress: string
|
|
574
680
|
}
|
|
575
681
|
|
|
576
682
|
export interface DeleteCollectionReturn {
|
|
577
|
-
collection: Collection
|
|
683
|
+
collection: Collection
|
|
578
684
|
}
|
|
579
685
|
export interface SyncCollectionArgs {
|
|
580
|
-
|
|
686
|
+
chainId: string
|
|
581
687
|
contractAddress: string
|
|
582
688
|
}
|
|
583
689
|
|
|
584
|
-
export interface SyncCollectionReturn {
|
|
585
|
-
|
|
690
|
+
export interface SyncCollectionReturn {}
|
|
691
|
+
export interface CreatePrimarySaleContractArgs {
|
|
692
|
+
chainId: string
|
|
693
|
+
projectId: number
|
|
694
|
+
primarySaleContractAddress: string
|
|
695
|
+
itemsContractAddress: string
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
export interface CreatePrimarySaleContractReturn {
|
|
699
|
+
primarySaleContract: PrimarySaleContract
|
|
700
|
+
}
|
|
701
|
+
export interface DeletePrimarySaleContractArgs {
|
|
702
|
+
chainId: string
|
|
703
|
+
projectId: number
|
|
704
|
+
primarySaleContractAddress: string
|
|
586
705
|
}
|
|
706
|
+
|
|
707
|
+
export interface DeletePrimarySaleContractReturn {}
|
|
587
708
|
export interface CreateCurrencyArgs {
|
|
709
|
+
chainId: string
|
|
588
710
|
currency: Currency
|
|
589
711
|
}
|
|
590
712
|
|
|
591
713
|
export interface CreateCurrencyReturn {
|
|
592
|
-
currency: Currency
|
|
714
|
+
currency: Currency
|
|
593
715
|
}
|
|
594
716
|
export interface CreateCurrenciesArgs {
|
|
717
|
+
chainId: string
|
|
595
718
|
currencies: Array<Currency>
|
|
596
719
|
}
|
|
597
720
|
|
|
598
721
|
export interface CreateCurrenciesReturn {
|
|
599
|
-
currency: {[key: string]: Currency}
|
|
722
|
+
currency: { [key: string]: Currency }
|
|
600
723
|
}
|
|
601
724
|
export interface UpdateCurrencyArgs {
|
|
725
|
+
chainId: string
|
|
602
726
|
currency: Currency
|
|
603
727
|
}
|
|
604
728
|
|
|
605
729
|
export interface UpdateCurrencyReturn {
|
|
606
|
-
currency: Currency
|
|
730
|
+
currency: Currency
|
|
607
731
|
}
|
|
608
732
|
export interface ListCurrenciesArgs {
|
|
733
|
+
chainId: string
|
|
609
734
|
}
|
|
610
735
|
|
|
611
736
|
export interface ListCurrenciesReturn {
|
|
612
|
-
currencies: Array<Currency>
|
|
737
|
+
currencies: Array<Currency>
|
|
613
738
|
}
|
|
614
739
|
export interface DeleteCurrencyArgs {
|
|
615
|
-
chainId:
|
|
740
|
+
chainId: string
|
|
616
741
|
contractAddress: string
|
|
617
742
|
}
|
|
618
743
|
|
|
619
744
|
export interface DeleteCurrencyReturn {
|
|
620
|
-
currency: Currency
|
|
745
|
+
currency: Currency
|
|
621
746
|
}
|
|
747
|
+
export interface AddCollectiblesArgs {
|
|
748
|
+
chainId: string
|
|
749
|
+
itemsContractAddress: string
|
|
750
|
+
tokenIds: Array<string>
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
export interface AddCollectiblesReturn {}
|
|
622
754
|
|
|
623
755
|
export interface Marketplace {
|
|
624
|
-
listCurrencies(headers?: object, signal?: AbortSignal): Promise<ListCurrenciesReturn>
|
|
756
|
+
listCurrencies(args: ListCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise<ListCurrenciesReturn>
|
|
625
757
|
getCollectionDetail(args: GetCollectionDetailArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectionDetailReturn>
|
|
626
758
|
getCollectible(args: GetCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectibleReturn>
|
|
627
|
-
getLowestPriceOfferForCollectible(
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
759
|
+
getLowestPriceOfferForCollectible(
|
|
760
|
+
args: GetLowestPriceOfferForCollectibleArgs,
|
|
761
|
+
headers?: object,
|
|
762
|
+
signal?: AbortSignal
|
|
763
|
+
): Promise<GetLowestPriceOfferForCollectibleReturn>
|
|
764
|
+
getHighestPriceOfferForCollectible(
|
|
765
|
+
args: GetHighestPriceOfferForCollectibleArgs,
|
|
766
|
+
headers?: object,
|
|
767
|
+
signal?: AbortSignal
|
|
768
|
+
): Promise<GetHighestPriceOfferForCollectibleReturn>
|
|
769
|
+
getLowestPriceListingForCollectible(
|
|
770
|
+
args: GetLowestPriceListingForCollectibleArgs,
|
|
771
|
+
headers?: object,
|
|
772
|
+
signal?: AbortSignal
|
|
773
|
+
): Promise<GetLowestPriceListingForCollectibleReturn>
|
|
774
|
+
getHighestPriceListingForCollectible(
|
|
775
|
+
args: GetHighestPriceListingForCollectibleArgs,
|
|
776
|
+
headers?: object,
|
|
777
|
+
signal?: AbortSignal
|
|
778
|
+
): Promise<GetHighestPriceListingForCollectibleReturn>
|
|
779
|
+
listListingsForCollectible(
|
|
780
|
+
args: ListListingsForCollectibleArgs,
|
|
781
|
+
headers?: object,
|
|
782
|
+
signal?: AbortSignal
|
|
783
|
+
): Promise<ListListingsForCollectibleReturn>
|
|
784
|
+
listOffersForCollectible(
|
|
785
|
+
args: ListOffersForCollectibleArgs,
|
|
786
|
+
headers?: object,
|
|
787
|
+
signal?: AbortSignal
|
|
788
|
+
): Promise<ListOffersForCollectibleReturn>
|
|
789
|
+
listListings(args: ListListingsArgs, headers?: object, signal?: AbortSignal): Promise<ListListingsReturn>
|
|
790
|
+
listOffers(args: ListOffersArgs, headers?: object, signal?: AbortSignal): Promise<ListOffersReturn>
|
|
791
|
+
getCountOfListingsForCollectible(
|
|
792
|
+
args: GetCountOfListingsForCollectibleArgs,
|
|
793
|
+
headers?: object,
|
|
794
|
+
signal?: AbortSignal
|
|
795
|
+
): Promise<GetCountOfListingsForCollectibleReturn>
|
|
796
|
+
getCountOfOffersForCollectible(
|
|
797
|
+
args: GetCountOfOffersForCollectibleArgs,
|
|
798
|
+
headers?: object,
|
|
799
|
+
signal?: AbortSignal
|
|
800
|
+
): Promise<GetCountOfOffersForCollectibleReturn>
|
|
635
801
|
/**
|
|
636
802
|
* @deprecated Please use GetLowestPriceOfferForCollectible instead.
|
|
637
803
|
*/
|
|
638
|
-
getCollectibleLowestOffer(
|
|
804
|
+
getCollectibleLowestOffer(
|
|
805
|
+
args: GetCollectibleLowestOfferArgs,
|
|
806
|
+
headers?: object,
|
|
807
|
+
signal?: AbortSignal
|
|
808
|
+
): Promise<GetCollectibleLowestOfferReturn>
|
|
639
809
|
/**
|
|
640
810
|
* @deprecated Please use GetHighestPriceOfferForCollectible instead.
|
|
641
811
|
*/
|
|
642
|
-
getCollectibleHighestOffer(
|
|
812
|
+
getCollectibleHighestOffer(
|
|
813
|
+
args: GetCollectibleHighestOfferArgs,
|
|
814
|
+
headers?: object,
|
|
815
|
+
signal?: AbortSignal
|
|
816
|
+
): Promise<GetCollectibleHighestOfferReturn>
|
|
643
817
|
/**
|
|
644
818
|
* @deprecated Please use GetLowestPriceListingForCollectible instead.
|
|
645
819
|
*/
|
|
646
|
-
getCollectibleLowestListing(
|
|
820
|
+
getCollectibleLowestListing(
|
|
821
|
+
args: GetCollectibleLowestListingArgs,
|
|
822
|
+
headers?: object,
|
|
823
|
+
signal?: AbortSignal
|
|
824
|
+
): Promise<GetCollectibleLowestListingReturn>
|
|
647
825
|
/**
|
|
648
826
|
* @deprecated Please use GetHighestPriceListingForCollectible instead.
|
|
649
827
|
*/
|
|
650
|
-
getCollectibleHighestListing(
|
|
828
|
+
getCollectibleHighestListing(
|
|
829
|
+
args: GetCollectibleHighestListingArgs,
|
|
830
|
+
headers?: object,
|
|
831
|
+
signal?: AbortSignal
|
|
832
|
+
): Promise<GetCollectibleHighestListingReturn>
|
|
651
833
|
/**
|
|
652
834
|
* @deprecated Please use ListListingsForCollectible instead.
|
|
653
835
|
*/
|
|
654
|
-
listCollectibleListings(
|
|
836
|
+
listCollectibleListings(
|
|
837
|
+
args: ListCollectibleListingsArgs,
|
|
838
|
+
headers?: object,
|
|
839
|
+
signal?: AbortSignal
|
|
840
|
+
): Promise<ListCollectibleListingsReturn>
|
|
655
841
|
/**
|
|
656
842
|
* @deprecated Please use ListOffersForCollectible instead.
|
|
657
843
|
*/
|
|
658
|
-
listCollectibleOffers(
|
|
844
|
+
listCollectibleOffers(
|
|
845
|
+
args: ListCollectibleOffersArgs,
|
|
846
|
+
headers?: object,
|
|
847
|
+
signal?: AbortSignal
|
|
848
|
+
): Promise<ListCollectibleOffersReturn>
|
|
659
849
|
/**
|
|
660
850
|
* checkout process
|
|
661
851
|
*/
|
|
662
|
-
generateBuyTransaction(
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
852
|
+
generateBuyTransaction(
|
|
853
|
+
args: GenerateBuyTransactionArgs,
|
|
854
|
+
headers?: object,
|
|
855
|
+
signal?: AbortSignal
|
|
856
|
+
): Promise<GenerateBuyTransactionReturn>
|
|
857
|
+
generateSellTransaction(
|
|
858
|
+
args: GenerateSellTransactionArgs,
|
|
859
|
+
headers?: object,
|
|
860
|
+
signal?: AbortSignal
|
|
861
|
+
): Promise<GenerateSellTransactionReturn>
|
|
862
|
+
generateListingTransaction(
|
|
863
|
+
args: GenerateListingTransactionArgs,
|
|
864
|
+
headers?: object,
|
|
865
|
+
signal?: AbortSignal
|
|
866
|
+
): Promise<GenerateListingTransactionReturn>
|
|
867
|
+
generateOfferTransaction(
|
|
868
|
+
args: GenerateOfferTransactionArgs,
|
|
869
|
+
headers?: object,
|
|
870
|
+
signal?: AbortSignal
|
|
871
|
+
): Promise<GenerateOfferTransactionReturn>
|
|
872
|
+
generateCancelTransaction(
|
|
873
|
+
args: GenerateCancelTransactionArgs,
|
|
874
|
+
headers?: object,
|
|
875
|
+
signal?: AbortSignal
|
|
876
|
+
): Promise<GenerateCancelTransactionReturn>
|
|
667
877
|
/**
|
|
668
878
|
* only used in a case of external transactions ( when we create off-chain transactions ) for instance opensea market
|
|
669
879
|
*/
|
|
@@ -672,79 +882,134 @@ export interface Marketplace {
|
|
|
672
882
|
* list of collectibles with best order for each collectible, by default this only returns collectibles with an order
|
|
673
883
|
*/
|
|
674
884
|
listCollectibles(args: ListCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectiblesReturn>
|
|
675
|
-
getCountOfAllCollectibles(
|
|
676
|
-
|
|
885
|
+
getCountOfAllCollectibles(
|
|
886
|
+
args: GetCountOfAllCollectiblesArgs,
|
|
887
|
+
headers?: object,
|
|
888
|
+
signal?: AbortSignal
|
|
889
|
+
): Promise<GetCountOfAllCollectiblesReturn>
|
|
890
|
+
getCountOfFilteredCollectibles(
|
|
891
|
+
args: GetCountOfFilteredCollectiblesArgs,
|
|
892
|
+
headers?: object,
|
|
893
|
+
signal?: AbortSignal
|
|
894
|
+
): Promise<GetCountOfFilteredCollectiblesReturn>
|
|
677
895
|
getFloorOrder(args: GetFloorOrderArgs, headers?: object, signal?: AbortSignal): Promise<GetFloorOrderReturn>
|
|
678
|
-
listCollectionActivities(
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
896
|
+
listCollectionActivities(
|
|
897
|
+
args: ListCollectionActivitiesArgs,
|
|
898
|
+
headers?: object,
|
|
899
|
+
signal?: AbortSignal
|
|
900
|
+
): Promise<ListCollectionActivitiesReturn>
|
|
901
|
+
listCollectibleActivities(
|
|
902
|
+
args: ListCollectibleActivitiesArgs,
|
|
903
|
+
headers?: object,
|
|
904
|
+
signal?: AbortSignal
|
|
905
|
+
): Promise<ListCollectibleActivitiesReturn>
|
|
906
|
+
listCollectiblesWithLowestListing(
|
|
907
|
+
args: ListCollectiblesWithLowestListingArgs,
|
|
908
|
+
headers?: object,
|
|
909
|
+
signal?: AbortSignal
|
|
910
|
+
): Promise<ListCollectiblesWithLowestListingReturn>
|
|
911
|
+
listCollectiblesWithHighestOffer(
|
|
912
|
+
args: ListCollectiblesWithHighestOfferArgs,
|
|
913
|
+
headers?: object,
|
|
914
|
+
signal?: AbortSignal
|
|
915
|
+
): Promise<ListCollectiblesWithHighestOfferReturn>
|
|
682
916
|
syncOrder(args: SyncOrderArgs, headers?: object, signal?: AbortSignal): Promise<SyncOrderReturn>
|
|
683
917
|
syncOrders(args: SyncOrdersArgs, headers?: object, signal?: AbortSignal): Promise<SyncOrdersReturn>
|
|
684
918
|
getOrders(args: GetOrdersArgs, headers?: object, signal?: AbortSignal): Promise<GetOrdersReturn>
|
|
685
|
-
checkoutOptionsMarketplace(
|
|
686
|
-
|
|
687
|
-
|
|
919
|
+
checkoutOptionsMarketplace(
|
|
920
|
+
args: CheckoutOptionsMarketplaceArgs,
|
|
921
|
+
headers?: object,
|
|
922
|
+
signal?: AbortSignal
|
|
923
|
+
): Promise<CheckoutOptionsMarketplaceReturn>
|
|
924
|
+
checkoutOptionsSalesContract(
|
|
925
|
+
args: CheckoutOptionsSalesContractArgs,
|
|
926
|
+
headers?: object,
|
|
927
|
+
signal?: AbortSignal
|
|
928
|
+
): Promise<CheckoutOptionsSalesContractReturn>
|
|
929
|
+
supportedMarketplaces(
|
|
930
|
+
args: SupportedMarketplacesArgs,
|
|
931
|
+
headers?: object,
|
|
932
|
+
signal?: AbortSignal
|
|
933
|
+
): Promise<SupportedMarketplacesReturn>
|
|
934
|
+
getPrimarySaleItem(args: GetPrimarySaleItemArgs, headers?: object, signal?: AbortSignal): Promise<GetPrimarySaleItemReturn>
|
|
935
|
+
listPrimarySaleItems(
|
|
936
|
+
args: ListPrimarySaleItemsArgs,
|
|
937
|
+
headers?: object,
|
|
938
|
+
signal?: AbortSignal
|
|
939
|
+
): Promise<ListPrimarySaleItemsReturn>
|
|
940
|
+
getCountOfPrimarySaleItems(
|
|
941
|
+
args: GetCountOfPrimarySaleItemsArgs,
|
|
942
|
+
headers?: object,
|
|
943
|
+
signal?: AbortSignal
|
|
944
|
+
): Promise<GetCountOfPrimarySaleItemsReturn>
|
|
688
945
|
}
|
|
689
946
|
|
|
690
947
|
export interface ListCurrenciesArgs {
|
|
948
|
+
chainId: string
|
|
691
949
|
}
|
|
692
950
|
|
|
693
951
|
export interface ListCurrenciesReturn {
|
|
694
|
-
currencies: Array<Currency>
|
|
952
|
+
currencies: Array<Currency>
|
|
695
953
|
}
|
|
696
954
|
export interface GetCollectionDetailArgs {
|
|
955
|
+
chainId: string
|
|
697
956
|
contractAddress: string
|
|
698
957
|
}
|
|
699
958
|
|
|
700
959
|
export interface GetCollectionDetailReturn {
|
|
701
|
-
collection: Collection
|
|
960
|
+
collection: Collection
|
|
702
961
|
}
|
|
703
962
|
export interface GetCollectibleArgs {
|
|
963
|
+
chainId: string
|
|
704
964
|
contractAddress: string
|
|
705
965
|
tokenId: string
|
|
706
966
|
}
|
|
707
967
|
|
|
708
968
|
export interface GetCollectibleReturn {
|
|
709
|
-
metadata: TokenMetadata
|
|
969
|
+
metadata: TokenMetadata
|
|
710
970
|
}
|
|
711
971
|
export interface GetLowestPriceOfferForCollectibleArgs {
|
|
972
|
+
chainId: string
|
|
712
973
|
contractAddress: string
|
|
713
974
|
tokenId: string
|
|
714
975
|
filter?: OrderFilter
|
|
715
976
|
}
|
|
716
977
|
|
|
717
978
|
export interface GetLowestPriceOfferForCollectibleReturn {
|
|
718
|
-
order: Order
|
|
979
|
+
order: Order
|
|
719
980
|
}
|
|
720
981
|
export interface GetHighestPriceOfferForCollectibleArgs {
|
|
982
|
+
chainId: string
|
|
721
983
|
contractAddress: string
|
|
722
984
|
tokenId: string
|
|
723
985
|
filter?: OrderFilter
|
|
724
986
|
}
|
|
725
987
|
|
|
726
988
|
export interface GetHighestPriceOfferForCollectibleReturn {
|
|
727
|
-
order: Order
|
|
989
|
+
order: Order
|
|
728
990
|
}
|
|
729
991
|
export interface GetLowestPriceListingForCollectibleArgs {
|
|
992
|
+
chainId: string
|
|
730
993
|
contractAddress: string
|
|
731
994
|
tokenId: string
|
|
732
995
|
filter?: OrderFilter
|
|
733
996
|
}
|
|
734
997
|
|
|
735
998
|
export interface GetLowestPriceListingForCollectibleReturn {
|
|
736
|
-
order: Order
|
|
999
|
+
order: Order
|
|
737
1000
|
}
|
|
738
1001
|
export interface GetHighestPriceListingForCollectibleArgs {
|
|
1002
|
+
chainId: string
|
|
739
1003
|
contractAddress: string
|
|
740
1004
|
tokenId: string
|
|
741
1005
|
filter?: OrderFilter
|
|
742
1006
|
}
|
|
743
1007
|
|
|
744
1008
|
export interface GetHighestPriceListingForCollectibleReturn {
|
|
745
|
-
order: Order
|
|
1009
|
+
order: Order
|
|
746
1010
|
}
|
|
747
1011
|
export interface ListListingsForCollectibleArgs {
|
|
1012
|
+
chainId: string
|
|
748
1013
|
contractAddress: string
|
|
749
1014
|
tokenId: string
|
|
750
1015
|
filter?: OrderFilter
|
|
@@ -753,9 +1018,10 @@ export interface ListListingsForCollectibleArgs {
|
|
|
753
1018
|
|
|
754
1019
|
export interface ListListingsForCollectibleReturn {
|
|
755
1020
|
listings: Array<Order>
|
|
756
|
-
page?: Page
|
|
1021
|
+
page?: Page
|
|
757
1022
|
}
|
|
758
1023
|
export interface ListOffersForCollectibleArgs {
|
|
1024
|
+
chainId: string
|
|
759
1025
|
contractAddress: string
|
|
760
1026
|
tokenId: string
|
|
761
1027
|
filter?: OrderFilter
|
|
@@ -764,63 +1030,92 @@ export interface ListOffersForCollectibleArgs {
|
|
|
764
1030
|
|
|
765
1031
|
export interface ListOffersForCollectibleReturn {
|
|
766
1032
|
offers: Array<Order>
|
|
767
|
-
page?: Page
|
|
1033
|
+
page?: Page
|
|
1034
|
+
}
|
|
1035
|
+
export interface ListListingsArgs {
|
|
1036
|
+
chainId: string
|
|
1037
|
+
contractAddress: string
|
|
1038
|
+
filter?: OrderFilter
|
|
1039
|
+
page?: Page
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
export interface ListListingsReturn {
|
|
1043
|
+
listings: Array<Order>
|
|
1044
|
+
page?: Page
|
|
1045
|
+
}
|
|
1046
|
+
export interface ListOffersArgs {
|
|
1047
|
+
chainId: string
|
|
1048
|
+
contractAddress: string
|
|
1049
|
+
filter?: OrderFilter
|
|
1050
|
+
page?: Page
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
export interface ListOffersReturn {
|
|
1054
|
+
offers: Array<Order>
|
|
1055
|
+
page?: Page
|
|
768
1056
|
}
|
|
769
1057
|
export interface GetCountOfListingsForCollectibleArgs {
|
|
1058
|
+
chainId: string
|
|
770
1059
|
contractAddress: string
|
|
771
1060
|
tokenId: string
|
|
772
1061
|
filter?: OrderFilter
|
|
773
1062
|
}
|
|
774
1063
|
|
|
775
1064
|
export interface GetCountOfListingsForCollectibleReturn {
|
|
776
|
-
count: number
|
|
1065
|
+
count: number
|
|
777
1066
|
}
|
|
778
1067
|
export interface GetCountOfOffersForCollectibleArgs {
|
|
1068
|
+
chainId: string
|
|
779
1069
|
contractAddress: string
|
|
780
1070
|
tokenId: string
|
|
781
1071
|
filter?: OrderFilter
|
|
782
1072
|
}
|
|
783
1073
|
|
|
784
1074
|
export interface GetCountOfOffersForCollectibleReturn {
|
|
785
|
-
count: number
|
|
1075
|
+
count: number
|
|
786
1076
|
}
|
|
787
1077
|
export interface GetCollectibleLowestOfferArgs {
|
|
1078
|
+
chainId: string
|
|
788
1079
|
contractAddress: string
|
|
789
1080
|
tokenId: string
|
|
790
1081
|
filter?: OrderFilter
|
|
791
1082
|
}
|
|
792
1083
|
|
|
793
1084
|
export interface GetCollectibleLowestOfferReturn {
|
|
794
|
-
order?: Order
|
|
1085
|
+
order?: Order
|
|
795
1086
|
}
|
|
796
1087
|
export interface GetCollectibleHighestOfferArgs {
|
|
1088
|
+
chainId: string
|
|
797
1089
|
contractAddress: string
|
|
798
1090
|
tokenId: string
|
|
799
1091
|
filter?: OrderFilter
|
|
800
1092
|
}
|
|
801
1093
|
|
|
802
1094
|
export interface GetCollectibleHighestOfferReturn {
|
|
803
|
-
order?: Order
|
|
1095
|
+
order?: Order
|
|
804
1096
|
}
|
|
805
1097
|
export interface GetCollectibleLowestListingArgs {
|
|
1098
|
+
chainId: string
|
|
806
1099
|
contractAddress: string
|
|
807
1100
|
tokenId: string
|
|
808
1101
|
filter?: OrderFilter
|
|
809
1102
|
}
|
|
810
1103
|
|
|
811
1104
|
export interface GetCollectibleLowestListingReturn {
|
|
812
|
-
order?: Order
|
|
1105
|
+
order?: Order
|
|
813
1106
|
}
|
|
814
1107
|
export interface GetCollectibleHighestListingArgs {
|
|
1108
|
+
chainId: string
|
|
815
1109
|
contractAddress: string
|
|
816
1110
|
tokenId: string
|
|
817
1111
|
filter?: OrderFilter
|
|
818
1112
|
}
|
|
819
1113
|
|
|
820
1114
|
export interface GetCollectibleHighestListingReturn {
|
|
821
|
-
order?: Order
|
|
1115
|
+
order?: Order
|
|
822
1116
|
}
|
|
823
1117
|
export interface ListCollectibleListingsArgs {
|
|
1118
|
+
chainId: string
|
|
824
1119
|
contractAddress: string
|
|
825
1120
|
tokenId: string
|
|
826
1121
|
filter?: OrderFilter
|
|
@@ -829,9 +1124,10 @@ export interface ListCollectibleListingsArgs {
|
|
|
829
1124
|
|
|
830
1125
|
export interface ListCollectibleListingsReturn {
|
|
831
1126
|
listings: Array<Order>
|
|
832
|
-
page?: Page
|
|
1127
|
+
page?: Page
|
|
833
1128
|
}
|
|
834
1129
|
export interface ListCollectibleOffersArgs {
|
|
1130
|
+
chainId: string
|
|
835
1131
|
contractAddress: string
|
|
836
1132
|
tokenId: string
|
|
837
1133
|
filter?: OrderFilter
|
|
@@ -840,9 +1136,10 @@ export interface ListCollectibleOffersArgs {
|
|
|
840
1136
|
|
|
841
1137
|
export interface ListCollectibleOffersReturn {
|
|
842
1138
|
offers: Array<Order>
|
|
843
|
-
page?: Page
|
|
1139
|
+
page?: Page
|
|
844
1140
|
}
|
|
845
1141
|
export interface GenerateBuyTransactionArgs {
|
|
1142
|
+
chainId: string
|
|
846
1143
|
collectionAddress: string
|
|
847
1144
|
buyer: string
|
|
848
1145
|
marketplace: MarketplaceKind
|
|
@@ -852,9 +1149,10 @@ export interface GenerateBuyTransactionArgs {
|
|
|
852
1149
|
}
|
|
853
1150
|
|
|
854
1151
|
export interface GenerateBuyTransactionReturn {
|
|
855
|
-
steps: Array<Step>
|
|
1152
|
+
steps: Array<Step>
|
|
856
1153
|
}
|
|
857
1154
|
export interface GenerateSellTransactionArgs {
|
|
1155
|
+
chainId: string
|
|
858
1156
|
collectionAddress: string
|
|
859
1157
|
seller: string
|
|
860
1158
|
marketplace: MarketplaceKind
|
|
@@ -864,9 +1162,10 @@ export interface GenerateSellTransactionArgs {
|
|
|
864
1162
|
}
|
|
865
1163
|
|
|
866
1164
|
export interface GenerateSellTransactionReturn {
|
|
867
|
-
steps: Array<Step>
|
|
1165
|
+
steps: Array<Step>
|
|
868
1166
|
}
|
|
869
1167
|
export interface GenerateListingTransactionArgs {
|
|
1168
|
+
chainId: string
|
|
870
1169
|
collectionAddress: string
|
|
871
1170
|
owner: string
|
|
872
1171
|
contractType: ContractType
|
|
@@ -876,9 +1175,10 @@ export interface GenerateListingTransactionArgs {
|
|
|
876
1175
|
}
|
|
877
1176
|
|
|
878
1177
|
export interface GenerateListingTransactionReturn {
|
|
879
|
-
steps: Array<Step>
|
|
1178
|
+
steps: Array<Step>
|
|
880
1179
|
}
|
|
881
1180
|
export interface GenerateOfferTransactionArgs {
|
|
1181
|
+
chainId: string
|
|
882
1182
|
collectionAddress: string
|
|
883
1183
|
maker: string
|
|
884
1184
|
contractType: ContractType
|
|
@@ -888,9 +1188,10 @@ export interface GenerateOfferTransactionArgs {
|
|
|
888
1188
|
}
|
|
889
1189
|
|
|
890
1190
|
export interface GenerateOfferTransactionReturn {
|
|
891
|
-
steps: Array<Step>
|
|
1191
|
+
steps: Array<Step>
|
|
892
1192
|
}
|
|
893
1193
|
export interface GenerateCancelTransactionArgs {
|
|
1194
|
+
chainId: string
|
|
894
1195
|
collectionAddress: string
|
|
895
1196
|
maker: string
|
|
896
1197
|
marketplace: MarketplaceKind
|
|
@@ -898,9 +1199,10 @@ export interface GenerateCancelTransactionArgs {
|
|
|
898
1199
|
}
|
|
899
1200
|
|
|
900
1201
|
export interface GenerateCancelTransactionReturn {
|
|
901
|
-
steps: Array<Step>
|
|
1202
|
+
steps: Array<Step>
|
|
902
1203
|
}
|
|
903
1204
|
export interface ExecuteArgs {
|
|
1205
|
+
chainId: string
|
|
904
1206
|
signature: string
|
|
905
1207
|
method: string
|
|
906
1208
|
endpoint: string
|
|
@@ -909,9 +1211,10 @@ export interface ExecuteArgs {
|
|
|
909
1211
|
}
|
|
910
1212
|
|
|
911
1213
|
export interface ExecuteReturn {
|
|
912
|
-
orderId: string
|
|
1214
|
+
orderId: string
|
|
913
1215
|
}
|
|
914
1216
|
export interface ListCollectiblesArgs {
|
|
1217
|
+
chainId: string
|
|
915
1218
|
side: OrderSide
|
|
916
1219
|
contractAddress: string
|
|
917
1220
|
filter?: CollectiblesFilter
|
|
@@ -920,42 +1223,47 @@ export interface ListCollectiblesArgs {
|
|
|
920
1223
|
|
|
921
1224
|
export interface ListCollectiblesReturn {
|
|
922
1225
|
collectibles: Array<CollectibleOrder>
|
|
923
|
-
page?: Page
|
|
1226
|
+
page?: Page
|
|
924
1227
|
}
|
|
925
1228
|
export interface GetCountOfAllCollectiblesArgs {
|
|
1229
|
+
chainId: string
|
|
926
1230
|
contractAddress: string
|
|
927
1231
|
}
|
|
928
1232
|
|
|
929
1233
|
export interface GetCountOfAllCollectiblesReturn {
|
|
930
|
-
count: number
|
|
1234
|
+
count: number
|
|
931
1235
|
}
|
|
932
1236
|
export interface GetCountOfFilteredCollectiblesArgs {
|
|
1237
|
+
chainId: string
|
|
933
1238
|
side: OrderSide
|
|
934
1239
|
contractAddress: string
|
|
935
1240
|
filter?: CollectiblesFilter
|
|
936
1241
|
}
|
|
937
1242
|
|
|
938
1243
|
export interface GetCountOfFilteredCollectiblesReturn {
|
|
939
|
-
count: number
|
|
1244
|
+
count: number
|
|
940
1245
|
}
|
|
941
1246
|
export interface GetFloorOrderArgs {
|
|
1247
|
+
chainId: string
|
|
942
1248
|
contractAddress: string
|
|
943
1249
|
filter?: CollectiblesFilter
|
|
944
1250
|
}
|
|
945
1251
|
|
|
946
1252
|
export interface GetFloorOrderReturn {
|
|
947
|
-
collectible: CollectibleOrder
|
|
1253
|
+
collectible: CollectibleOrder
|
|
948
1254
|
}
|
|
949
1255
|
export interface ListCollectionActivitiesArgs {
|
|
1256
|
+
chainId: string
|
|
950
1257
|
contractAddress: string
|
|
951
1258
|
page?: Page
|
|
952
1259
|
}
|
|
953
1260
|
|
|
954
1261
|
export interface ListCollectionActivitiesReturn {
|
|
955
1262
|
activities: Array<Activity>
|
|
956
|
-
page?: Page
|
|
1263
|
+
page?: Page
|
|
957
1264
|
}
|
|
958
1265
|
export interface ListCollectibleActivitiesArgs {
|
|
1266
|
+
chainId: string
|
|
959
1267
|
contractAddress: string
|
|
960
1268
|
tokenId: string
|
|
961
1269
|
page?: Page
|
|
@@ -963,9 +1271,10 @@ export interface ListCollectibleActivitiesArgs {
|
|
|
963
1271
|
|
|
964
1272
|
export interface ListCollectibleActivitiesReturn {
|
|
965
1273
|
activities: Array<Activity>
|
|
966
|
-
page?: Page
|
|
1274
|
+
page?: Page
|
|
967
1275
|
}
|
|
968
1276
|
export interface ListCollectiblesWithLowestListingArgs {
|
|
1277
|
+
chainId: string
|
|
969
1278
|
contractAddress: string
|
|
970
1279
|
filter?: CollectiblesFilter
|
|
971
1280
|
page?: Page
|
|
@@ -973,9 +1282,10 @@ export interface ListCollectiblesWithLowestListingArgs {
|
|
|
973
1282
|
|
|
974
1283
|
export interface ListCollectiblesWithLowestListingReturn {
|
|
975
1284
|
collectibles: Array<CollectibleOrder>
|
|
976
|
-
page?: Page
|
|
1285
|
+
page?: Page
|
|
977
1286
|
}
|
|
978
1287
|
export interface ListCollectiblesWithHighestOfferArgs {
|
|
1288
|
+
chainId: string
|
|
979
1289
|
contractAddress: string
|
|
980
1290
|
filter?: CollectiblesFilter
|
|
981
1291
|
page?: Page
|
|
@@ -983,39 +1293,42 @@ export interface ListCollectiblesWithHighestOfferArgs {
|
|
|
983
1293
|
|
|
984
1294
|
export interface ListCollectiblesWithHighestOfferReturn {
|
|
985
1295
|
collectibles: Array<CollectibleOrder>
|
|
986
|
-
page?: Page
|
|
1296
|
+
page?: Page
|
|
987
1297
|
}
|
|
988
1298
|
export interface SyncOrderArgs {
|
|
1299
|
+
chainId: string
|
|
989
1300
|
order: Order
|
|
990
1301
|
}
|
|
991
1302
|
|
|
992
|
-
export interface SyncOrderReturn {
|
|
993
|
-
}
|
|
1303
|
+
export interface SyncOrderReturn {}
|
|
994
1304
|
export interface SyncOrdersArgs {
|
|
1305
|
+
chainId: string
|
|
995
1306
|
orders: Array<Order>
|
|
996
1307
|
}
|
|
997
1308
|
|
|
998
|
-
export interface SyncOrdersReturn {
|
|
999
|
-
}
|
|
1309
|
+
export interface SyncOrdersReturn {}
|
|
1000
1310
|
export interface GetOrdersArgs {
|
|
1311
|
+
chainId: string
|
|
1001
1312
|
input: Array<GetOrdersInput>
|
|
1002
1313
|
page?: Page
|
|
1003
1314
|
}
|
|
1004
1315
|
|
|
1005
1316
|
export interface GetOrdersReturn {
|
|
1006
1317
|
orders: Array<Order>
|
|
1007
|
-
page?: Page
|
|
1318
|
+
page?: Page
|
|
1008
1319
|
}
|
|
1009
1320
|
export interface CheckoutOptionsMarketplaceArgs {
|
|
1321
|
+
chainId: string
|
|
1010
1322
|
wallet: string
|
|
1011
1323
|
orders: Array<CheckoutOptionsMarketplaceOrder>
|
|
1012
1324
|
additionalFee: number
|
|
1013
1325
|
}
|
|
1014
1326
|
|
|
1015
1327
|
export interface CheckoutOptionsMarketplaceReturn {
|
|
1016
|
-
options: CheckoutOptions
|
|
1328
|
+
options: CheckoutOptions
|
|
1017
1329
|
}
|
|
1018
1330
|
export interface CheckoutOptionsSalesContractArgs {
|
|
1331
|
+
chainId: string
|
|
1019
1332
|
wallet: string
|
|
1020
1333
|
contractAddress: string
|
|
1021
1334
|
collectionAddress: string
|
|
@@ -1023,17 +1336,45 @@ export interface CheckoutOptionsSalesContractArgs {
|
|
|
1023
1336
|
}
|
|
1024
1337
|
|
|
1025
1338
|
export interface CheckoutOptionsSalesContractReturn {
|
|
1026
|
-
options: CheckoutOptions
|
|
1339
|
+
options: CheckoutOptions
|
|
1027
1340
|
}
|
|
1028
1341
|
export interface SupportedMarketplacesArgs {
|
|
1342
|
+
chainId: string
|
|
1029
1343
|
}
|
|
1030
1344
|
|
|
1031
1345
|
export interface SupportedMarketplacesReturn {
|
|
1032
|
-
marketplaces: Array<MarketplaceKind>
|
|
1346
|
+
marketplaces: Array<MarketplaceKind>
|
|
1347
|
+
}
|
|
1348
|
+
export interface GetPrimarySaleItemArgs {
|
|
1349
|
+
chainId: string
|
|
1350
|
+
primarySaleContractAddress: string
|
|
1351
|
+
tokenId: string
|
|
1033
1352
|
}
|
|
1034
1353
|
|
|
1354
|
+
export interface GetPrimarySaleItemReturn {
|
|
1355
|
+
item: CollectiblePrimarySaleItem
|
|
1356
|
+
}
|
|
1357
|
+
export interface ListPrimarySaleItemsArgs {
|
|
1358
|
+
chainId: string
|
|
1359
|
+
primarySaleContractAddress: string
|
|
1360
|
+
filter?: PrimarySaleItemsFilter
|
|
1361
|
+
page?: Page
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
export interface ListPrimarySaleItemsReturn {
|
|
1365
|
+
primarySaleItems: Array<CollectiblePrimarySaleItem>
|
|
1366
|
+
page?: Page
|
|
1367
|
+
}
|
|
1368
|
+
export interface GetCountOfPrimarySaleItemsArgs {
|
|
1369
|
+
chainId: string
|
|
1370
|
+
primarySaleContractAddress: string
|
|
1371
|
+
filter?: PrimarySaleItemsFilter
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
export interface GetCountOfPrimarySaleItemsReturn {
|
|
1375
|
+
count: number
|
|
1376
|
+
}
|
|
1035
1377
|
|
|
1036
|
-
|
|
1037
1378
|
//
|
|
1038
1379
|
// Client
|
|
1039
1380
|
//
|
|
@@ -1050,163 +1391,219 @@ export class Admin implements Admin {
|
|
|
1050
1391
|
private url(name: string): string {
|
|
1051
1392
|
return this.hostname + this.path + name
|
|
1052
1393
|
}
|
|
1053
|
-
|
|
1394
|
+
|
|
1054
1395
|
createCollection = (args: CreateCollectionArgs, headers?: object, signal?: AbortSignal): Promise<CreateCollectionReturn> => {
|
|
1055
|
-
return this.fetch(
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1396
|
+
return this.fetch(this.url('CreateCollection'), createHTTPRequest(args, headers, signal)).then(
|
|
1397
|
+
res => {
|
|
1398
|
+
return buildResponse(res).then(_data => {
|
|
1399
|
+
return {
|
|
1400
|
+
collection: <Collection>_data.collection
|
|
1401
|
+
}
|
|
1402
|
+
})
|
|
1403
|
+
},
|
|
1404
|
+
error => {
|
|
1405
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1406
|
+
}
|
|
1407
|
+
)
|
|
1066
1408
|
}
|
|
1067
|
-
|
|
1409
|
+
|
|
1068
1410
|
getCollection = (args: GetCollectionArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectionReturn> => {
|
|
1069
|
-
return this.fetch(
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1411
|
+
return this.fetch(this.url('GetCollection'), createHTTPRequest(args, headers, signal)).then(
|
|
1412
|
+
res => {
|
|
1413
|
+
return buildResponse(res).then(_data => {
|
|
1414
|
+
return {
|
|
1415
|
+
collection: <Collection>_data.collection
|
|
1416
|
+
}
|
|
1417
|
+
})
|
|
1418
|
+
},
|
|
1419
|
+
error => {
|
|
1420
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1421
|
+
}
|
|
1422
|
+
)
|
|
1080
1423
|
}
|
|
1081
|
-
|
|
1424
|
+
|
|
1082
1425
|
updateCollection = (args: UpdateCollectionArgs, headers?: object, signal?: AbortSignal): Promise<UpdateCollectionReturn> => {
|
|
1083
|
-
return this.fetch(
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1426
|
+
return this.fetch(this.url('UpdateCollection'), createHTTPRequest(args, headers, signal)).then(
|
|
1427
|
+
res => {
|
|
1428
|
+
return buildResponse(res).then(_data => {
|
|
1429
|
+
return {
|
|
1430
|
+
collection: <Collection>_data.collection
|
|
1431
|
+
}
|
|
1432
|
+
})
|
|
1433
|
+
},
|
|
1434
|
+
error => {
|
|
1435
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1436
|
+
}
|
|
1437
|
+
)
|
|
1094
1438
|
}
|
|
1095
|
-
|
|
1439
|
+
|
|
1096
1440
|
listCollections = (args: ListCollectionsArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectionsReturn> => {
|
|
1097
|
-
return this.fetch(
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1441
|
+
return this.fetch(this.url('ListCollections'), createHTTPRequest(args, headers, signal)).then(
|
|
1442
|
+
res => {
|
|
1443
|
+
return buildResponse(res).then(_data => {
|
|
1444
|
+
return {
|
|
1445
|
+
collections: <Array<Collection>>_data.collections,
|
|
1446
|
+
page: <Page>_data.page
|
|
1447
|
+
}
|
|
1448
|
+
})
|
|
1449
|
+
},
|
|
1450
|
+
error => {
|
|
1451
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1452
|
+
}
|
|
1453
|
+
)
|
|
1109
1454
|
}
|
|
1110
|
-
|
|
1455
|
+
|
|
1111
1456
|
deleteCollection = (args: DeleteCollectionArgs, headers?: object, signal?: AbortSignal): Promise<DeleteCollectionReturn> => {
|
|
1112
|
-
return this.fetch(
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1457
|
+
return this.fetch(this.url('DeleteCollection'), createHTTPRequest(args, headers, signal)).then(
|
|
1458
|
+
res => {
|
|
1459
|
+
return buildResponse(res).then(_data => {
|
|
1460
|
+
return {
|
|
1461
|
+
collection: <Collection>_data.collection
|
|
1462
|
+
}
|
|
1463
|
+
})
|
|
1464
|
+
},
|
|
1465
|
+
error => {
|
|
1466
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1467
|
+
}
|
|
1468
|
+
)
|
|
1123
1469
|
}
|
|
1124
|
-
|
|
1470
|
+
|
|
1125
1471
|
syncCollection = (args: SyncCollectionArgs, headers?: object, signal?: AbortSignal): Promise<SyncCollectionReturn> => {
|
|
1126
|
-
return this.fetch(
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1472
|
+
return this.fetch(this.url('SyncCollection'), createHTTPRequest(args, headers, signal)).then(
|
|
1473
|
+
res => {
|
|
1474
|
+
return buildResponse(res).then(_data => {
|
|
1475
|
+
return {}
|
|
1476
|
+
})
|
|
1477
|
+
},
|
|
1478
|
+
error => {
|
|
1479
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1480
|
+
}
|
|
1481
|
+
)
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
createPrimarySaleContract = (
|
|
1485
|
+
args: CreatePrimarySaleContractArgs,
|
|
1486
|
+
headers?: object,
|
|
1487
|
+
signal?: AbortSignal
|
|
1488
|
+
): Promise<CreatePrimarySaleContractReturn> => {
|
|
1489
|
+
return this.fetch(this.url('CreatePrimarySaleContract'), createHTTPRequest(args, headers, signal)).then(
|
|
1490
|
+
res => {
|
|
1491
|
+
return buildResponse(res).then(_data => {
|
|
1492
|
+
return {
|
|
1493
|
+
primarySaleContract: <PrimarySaleContract>_data.primarySaleContract
|
|
1494
|
+
}
|
|
1495
|
+
})
|
|
1496
|
+
},
|
|
1497
|
+
error => {
|
|
1498
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1499
|
+
}
|
|
1500
|
+
)
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
deletePrimarySaleContract = (
|
|
1504
|
+
args: DeletePrimarySaleContractArgs,
|
|
1505
|
+
headers?: object,
|
|
1506
|
+
signal?: AbortSignal
|
|
1507
|
+
): Promise<DeletePrimarySaleContractReturn> => {
|
|
1508
|
+
return this.fetch(this.url('DeletePrimarySaleContract'), createHTTPRequest(args, headers, signal)).then(
|
|
1509
|
+
res => {
|
|
1510
|
+
return buildResponse(res).then(_data => {
|
|
1511
|
+
return {}
|
|
1512
|
+
})
|
|
1513
|
+
},
|
|
1514
|
+
error => {
|
|
1515
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1516
|
+
}
|
|
1517
|
+
)
|
|
1137
1518
|
}
|
|
1138
|
-
|
|
1519
|
+
|
|
1139
1520
|
createCurrency = (args: CreateCurrencyArgs, headers?: object, signal?: AbortSignal): Promise<CreateCurrencyReturn> => {
|
|
1140
|
-
return this.fetch(
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1521
|
+
return this.fetch(this.url('CreateCurrency'), createHTTPRequest(args, headers, signal)).then(
|
|
1522
|
+
res => {
|
|
1523
|
+
return buildResponse(res).then(_data => {
|
|
1524
|
+
return {
|
|
1525
|
+
currency: <Currency>_data.currency
|
|
1526
|
+
}
|
|
1527
|
+
})
|
|
1528
|
+
},
|
|
1529
|
+
error => {
|
|
1530
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1531
|
+
}
|
|
1532
|
+
)
|
|
1151
1533
|
}
|
|
1152
|
-
|
|
1534
|
+
|
|
1153
1535
|
createCurrencies = (args: CreateCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise<CreateCurrenciesReturn> => {
|
|
1154
|
-
return this.fetch(
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1536
|
+
return this.fetch(this.url('CreateCurrencies'), createHTTPRequest(args, headers, signal)).then(
|
|
1537
|
+
res => {
|
|
1538
|
+
return buildResponse(res).then(_data => {
|
|
1539
|
+
return {
|
|
1540
|
+
currency: <{ [key: string]: Currency }>_data.currency
|
|
1541
|
+
}
|
|
1542
|
+
})
|
|
1543
|
+
},
|
|
1544
|
+
error => {
|
|
1545
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1546
|
+
}
|
|
1547
|
+
)
|
|
1165
1548
|
}
|
|
1166
|
-
|
|
1549
|
+
|
|
1167
1550
|
updateCurrency = (args: UpdateCurrencyArgs, headers?: object, signal?: AbortSignal): Promise<UpdateCurrencyReturn> => {
|
|
1168
|
-
return this.fetch(
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1551
|
+
return this.fetch(this.url('UpdateCurrency'), createHTTPRequest(args, headers, signal)).then(
|
|
1552
|
+
res => {
|
|
1553
|
+
return buildResponse(res).then(_data => {
|
|
1554
|
+
return {
|
|
1555
|
+
currency: <Currency>_data.currency
|
|
1556
|
+
}
|
|
1557
|
+
})
|
|
1558
|
+
},
|
|
1559
|
+
error => {
|
|
1560
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1561
|
+
}
|
|
1562
|
+
)
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
listCurrencies = (args: ListCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise<ListCurrenciesReturn> => {
|
|
1566
|
+
return this.fetch(this.url('ListCurrencies'), createHTTPRequest(args, headers, signal)).then(
|
|
1567
|
+
res => {
|
|
1568
|
+
return buildResponse(res).then(_data => {
|
|
1569
|
+
return {
|
|
1570
|
+
currencies: <Array<Currency>>_data.currencies
|
|
1571
|
+
}
|
|
1572
|
+
})
|
|
1573
|
+
},
|
|
1574
|
+
error => {
|
|
1575
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1576
|
+
}
|
|
1577
|
+
)
|
|
1194
1578
|
}
|
|
1195
|
-
|
|
1579
|
+
|
|
1196
1580
|
deleteCurrency = (args: DeleteCurrencyArgs, headers?: object, signal?: AbortSignal): Promise<DeleteCurrencyReturn> => {
|
|
1197
|
-
return this.fetch(
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1581
|
+
return this.fetch(this.url('DeleteCurrency'), createHTTPRequest(args, headers, signal)).then(
|
|
1582
|
+
res => {
|
|
1583
|
+
return buildResponse(res).then(_data => {
|
|
1584
|
+
return {
|
|
1585
|
+
currency: <Currency>_data.currency
|
|
1586
|
+
}
|
|
1587
|
+
})
|
|
1588
|
+
},
|
|
1589
|
+
error => {
|
|
1590
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1591
|
+
}
|
|
1592
|
+
)
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
addCollectibles = (args: AddCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise<AddCollectiblesReturn> => {
|
|
1596
|
+
return this.fetch(this.url('AddCollectibles'), createHTTPRequest(args, headers, signal)).then(
|
|
1597
|
+
res => {
|
|
1598
|
+
return buildResponse(res).then(_data => {
|
|
1599
|
+
return {}
|
|
1600
|
+
})
|
|
1601
|
+
},
|
|
1602
|
+
error => {
|
|
1603
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1604
|
+
}
|
|
1605
|
+
)
|
|
1208
1606
|
}
|
|
1209
|
-
|
|
1210
1607
|
}
|
|
1211
1608
|
export class Marketplace implements Marketplace {
|
|
1212
1609
|
protected hostname: string
|
|
@@ -1221,537 +1618,777 @@ export class Marketplace implements Marketplace {
|
|
|
1221
1618
|
private url(name: string): string {
|
|
1222
1619
|
return this.hostname + this.path + name
|
|
1223
1620
|
}
|
|
1224
|
-
|
|
1225
|
-
listCurrencies = (headers?: object, signal?: AbortSignal): Promise<ListCurrenciesReturn> => {
|
|
1226
|
-
return this.fetch(
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
getCollectionDetail = (
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1621
|
+
|
|
1622
|
+
listCurrencies = (args: ListCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise<ListCurrenciesReturn> => {
|
|
1623
|
+
return this.fetch(this.url('ListCurrencies'), createHTTPRequest(args, headers, signal)).then(
|
|
1624
|
+
res => {
|
|
1625
|
+
return buildResponse(res).then(_data => {
|
|
1626
|
+
return {
|
|
1627
|
+
currencies: <Array<Currency>>_data.currencies
|
|
1628
|
+
}
|
|
1629
|
+
})
|
|
1630
|
+
},
|
|
1631
|
+
error => {
|
|
1632
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1633
|
+
}
|
|
1634
|
+
)
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
getCollectionDetail = (
|
|
1638
|
+
args: GetCollectionDetailArgs,
|
|
1639
|
+
headers?: object,
|
|
1640
|
+
signal?: AbortSignal
|
|
1641
|
+
): Promise<GetCollectionDetailReturn> => {
|
|
1642
|
+
return this.fetch(this.url('GetCollectionDetail'), createHTTPRequest(args, headers, signal)).then(
|
|
1643
|
+
res => {
|
|
1644
|
+
return buildResponse(res).then(_data => {
|
|
1645
|
+
return {
|
|
1646
|
+
collection: <Collection>_data.collection
|
|
1647
|
+
}
|
|
1648
|
+
})
|
|
1649
|
+
},
|
|
1650
|
+
error => {
|
|
1651
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1652
|
+
}
|
|
1653
|
+
)
|
|
1252
1654
|
}
|
|
1253
|
-
|
|
1655
|
+
|
|
1254
1656
|
getCollectible = (args: GetCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectibleReturn> => {
|
|
1255
|
-
return this.fetch(
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
}
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
return {
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1657
|
+
return this.fetch(this.url('GetCollectible'), createHTTPRequest(args, headers, signal)).then(
|
|
1658
|
+
res => {
|
|
1659
|
+
return buildResponse(res).then(_data => {
|
|
1660
|
+
return {
|
|
1661
|
+
metadata: <TokenMetadata>_data.metadata
|
|
1662
|
+
}
|
|
1663
|
+
})
|
|
1664
|
+
},
|
|
1665
|
+
error => {
|
|
1666
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1667
|
+
}
|
|
1668
|
+
)
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
getLowestPriceOfferForCollectible = (
|
|
1672
|
+
args: GetLowestPriceOfferForCollectibleArgs,
|
|
1673
|
+
headers?: object,
|
|
1674
|
+
signal?: AbortSignal
|
|
1675
|
+
): Promise<GetLowestPriceOfferForCollectibleReturn> => {
|
|
1676
|
+
return this.fetch(this.url('GetLowestPriceOfferForCollectible'), createHTTPRequest(args, headers, signal)).then(
|
|
1677
|
+
res => {
|
|
1678
|
+
return buildResponse(res).then(_data => {
|
|
1679
|
+
return {
|
|
1680
|
+
order: <Order>_data.order
|
|
1681
|
+
}
|
|
1682
|
+
})
|
|
1683
|
+
},
|
|
1684
|
+
error => {
|
|
1685
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1686
|
+
}
|
|
1687
|
+
)
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
getHighestPriceOfferForCollectible = (
|
|
1691
|
+
args: GetHighestPriceOfferForCollectibleArgs,
|
|
1692
|
+
headers?: object,
|
|
1693
|
+
signal?: AbortSignal
|
|
1694
|
+
): Promise<GetHighestPriceOfferForCollectibleReturn> => {
|
|
1695
|
+
return this.fetch(this.url('GetHighestPriceOfferForCollectible'), createHTTPRequest(args, headers, signal)).then(
|
|
1696
|
+
res => {
|
|
1697
|
+
return buildResponse(res).then(_data => {
|
|
1698
|
+
return {
|
|
1699
|
+
order: <Order>_data.order
|
|
1700
|
+
}
|
|
1701
|
+
})
|
|
1702
|
+
},
|
|
1703
|
+
error => {
|
|
1704
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1705
|
+
}
|
|
1706
|
+
)
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
getLowestPriceListingForCollectible = (
|
|
1710
|
+
args: GetLowestPriceListingForCollectibleArgs,
|
|
1711
|
+
headers?: object,
|
|
1712
|
+
signal?: AbortSignal
|
|
1713
|
+
): Promise<GetLowestPriceListingForCollectibleReturn> => {
|
|
1714
|
+
return this.fetch(this.url('GetLowestPriceListingForCollectible'), createHTTPRequest(args, headers, signal)).then(
|
|
1715
|
+
res => {
|
|
1716
|
+
return buildResponse(res).then(_data => {
|
|
1717
|
+
return {
|
|
1718
|
+
order: <Order>_data.order
|
|
1719
|
+
}
|
|
1720
|
+
})
|
|
1721
|
+
},
|
|
1722
|
+
error => {
|
|
1723
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1724
|
+
}
|
|
1725
|
+
)
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
getHighestPriceListingForCollectible = (
|
|
1729
|
+
args: GetHighestPriceListingForCollectibleArgs,
|
|
1730
|
+
headers?: object,
|
|
1731
|
+
signal?: AbortSignal
|
|
1732
|
+
): Promise<GetHighestPriceListingForCollectibleReturn> => {
|
|
1733
|
+
return this.fetch(this.url('GetHighestPriceListingForCollectible'), createHTTPRequest(args, headers, signal)).then(
|
|
1734
|
+
res => {
|
|
1735
|
+
return buildResponse(res).then(_data => {
|
|
1736
|
+
return {
|
|
1737
|
+
order: <Order>_data.order
|
|
1738
|
+
}
|
|
1739
|
+
})
|
|
1740
|
+
},
|
|
1741
|
+
error => {
|
|
1742
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1743
|
+
}
|
|
1744
|
+
)
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
listListingsForCollectible = (
|
|
1748
|
+
args: ListListingsForCollectibleArgs,
|
|
1749
|
+
headers?: object,
|
|
1750
|
+
signal?: AbortSignal
|
|
1751
|
+
): Promise<ListListingsForCollectibleReturn> => {
|
|
1752
|
+
return this.fetch(this.url('ListListingsForCollectible'), createHTTPRequest(args, headers, signal)).then(
|
|
1753
|
+
res => {
|
|
1754
|
+
return buildResponse(res).then(_data => {
|
|
1755
|
+
return {
|
|
1756
|
+
listings: <Array<Order>>_data.listings,
|
|
1757
|
+
page: <Page>_data.page
|
|
1758
|
+
}
|
|
1759
|
+
})
|
|
1760
|
+
},
|
|
1761
|
+
error => {
|
|
1762
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1763
|
+
}
|
|
1764
|
+
)
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
listOffersForCollectible = (
|
|
1768
|
+
args: ListOffersForCollectibleArgs,
|
|
1769
|
+
headers?: object,
|
|
1770
|
+
signal?: AbortSignal
|
|
1771
|
+
): Promise<ListOffersForCollectibleReturn> => {
|
|
1772
|
+
return this.fetch(this.url('ListOffersForCollectible'), createHTTPRequest(args, headers, signal)).then(
|
|
1773
|
+
res => {
|
|
1774
|
+
return buildResponse(res).then(_data => {
|
|
1775
|
+
return {
|
|
1776
|
+
offers: <Array<Order>>_data.offers,
|
|
1777
|
+
page: <Page>_data.page
|
|
1778
|
+
}
|
|
1779
|
+
})
|
|
1780
|
+
},
|
|
1781
|
+
error => {
|
|
1782
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1783
|
+
}
|
|
1784
|
+
)
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
listListings = (args: ListListingsArgs, headers?: object, signal?: AbortSignal): Promise<ListListingsReturn> => {
|
|
1788
|
+
return this.fetch(this.url('ListListings'), createHTTPRequest(args, headers, signal)).then(
|
|
1789
|
+
res => {
|
|
1790
|
+
return buildResponse(res).then(_data => {
|
|
1791
|
+
return {
|
|
1792
|
+
listings: <Array<Order>>_data.listings,
|
|
1793
|
+
page: <Page>_data.page
|
|
1794
|
+
}
|
|
1795
|
+
})
|
|
1796
|
+
},
|
|
1797
|
+
error => {
|
|
1798
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1799
|
+
}
|
|
1800
|
+
)
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
listOffers = (args: ListOffersArgs, headers?: object, signal?: AbortSignal): Promise<ListOffersReturn> => {
|
|
1804
|
+
return this.fetch(this.url('ListOffers'), createHTTPRequest(args, headers, signal)).then(
|
|
1805
|
+
res => {
|
|
1806
|
+
return buildResponse(res).then(_data => {
|
|
1807
|
+
return {
|
|
1808
|
+
offers: <Array<Order>>_data.offers,
|
|
1809
|
+
page: <Page>_data.page
|
|
1810
|
+
}
|
|
1811
|
+
})
|
|
1812
|
+
},
|
|
1813
|
+
error => {
|
|
1814
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1815
|
+
}
|
|
1816
|
+
)
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
getCountOfListingsForCollectible = (
|
|
1820
|
+
args: GetCountOfListingsForCollectibleArgs,
|
|
1821
|
+
headers?: object,
|
|
1822
|
+
signal?: AbortSignal
|
|
1823
|
+
): Promise<GetCountOfListingsForCollectibleReturn> => {
|
|
1824
|
+
return this.fetch(this.url('GetCountOfListingsForCollectible'), createHTTPRequest(args, headers, signal)).then(
|
|
1825
|
+
res => {
|
|
1826
|
+
return buildResponse(res).then(_data => {
|
|
1827
|
+
return {
|
|
1828
|
+
count: <number>_data.count
|
|
1829
|
+
}
|
|
1830
|
+
})
|
|
1831
|
+
},
|
|
1832
|
+
error => {
|
|
1833
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1834
|
+
}
|
|
1835
|
+
)
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
getCountOfOffersForCollectible = (
|
|
1839
|
+
args: GetCountOfOffersForCollectibleArgs,
|
|
1840
|
+
headers?: object,
|
|
1841
|
+
signal?: AbortSignal
|
|
1842
|
+
): Promise<GetCountOfOffersForCollectibleReturn> => {
|
|
1843
|
+
return this.fetch(this.url('GetCountOfOffersForCollectible'), createHTTPRequest(args, headers, signal)).then(
|
|
1844
|
+
res => {
|
|
1845
|
+
return buildResponse(res).then(_data => {
|
|
1846
|
+
return {
|
|
1847
|
+
count: <number>_data.count
|
|
1848
|
+
}
|
|
1849
|
+
})
|
|
1850
|
+
},
|
|
1851
|
+
error => {
|
|
1852
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1853
|
+
}
|
|
1854
|
+
)
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
getCollectibleLowestOffer = (
|
|
1858
|
+
args: GetCollectibleLowestOfferArgs,
|
|
1859
|
+
headers?: object,
|
|
1860
|
+
signal?: AbortSignal
|
|
1861
|
+
): Promise<GetCollectibleLowestOfferReturn> => {
|
|
1862
|
+
return this.fetch(this.url('GetCollectibleLowestOffer'), createHTTPRequest(args, headers, signal)).then(
|
|
1863
|
+
res => {
|
|
1864
|
+
return buildResponse(res).then(_data => {
|
|
1865
|
+
return {
|
|
1866
|
+
order: <Order>_data.order
|
|
1867
|
+
}
|
|
1868
|
+
})
|
|
1869
|
+
},
|
|
1870
|
+
error => {
|
|
1871
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1872
|
+
}
|
|
1873
|
+
)
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
getCollectibleHighestOffer = (
|
|
1877
|
+
args: GetCollectibleHighestOfferArgs,
|
|
1878
|
+
headers?: object,
|
|
1879
|
+
signal?: AbortSignal
|
|
1880
|
+
): Promise<GetCollectibleHighestOfferReturn> => {
|
|
1881
|
+
return this.fetch(this.url('GetCollectibleHighestOffer'), createHTTPRequest(args, headers, signal)).then(
|
|
1882
|
+
res => {
|
|
1883
|
+
return buildResponse(res).then(_data => {
|
|
1884
|
+
return {
|
|
1885
|
+
order: <Order>_data.order
|
|
1886
|
+
}
|
|
1887
|
+
})
|
|
1888
|
+
},
|
|
1889
|
+
error => {
|
|
1890
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1891
|
+
}
|
|
1892
|
+
)
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
getCollectibleLowestListing = (
|
|
1896
|
+
args: GetCollectibleLowestListingArgs,
|
|
1897
|
+
headers?: object,
|
|
1898
|
+
signal?: AbortSignal
|
|
1899
|
+
): Promise<GetCollectibleLowestListingReturn> => {
|
|
1900
|
+
return this.fetch(this.url('GetCollectibleLowestListing'), createHTTPRequest(args, headers, signal)).then(
|
|
1901
|
+
res => {
|
|
1902
|
+
return buildResponse(res).then(_data => {
|
|
1903
|
+
return {
|
|
1904
|
+
order: <Order>_data.order
|
|
1905
|
+
}
|
|
1906
|
+
})
|
|
1907
|
+
},
|
|
1908
|
+
error => {
|
|
1909
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1910
|
+
}
|
|
1911
|
+
)
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
getCollectibleHighestListing = (
|
|
1915
|
+
args: GetCollectibleHighestListingArgs,
|
|
1916
|
+
headers?: object,
|
|
1917
|
+
signal?: AbortSignal
|
|
1918
|
+
): Promise<GetCollectibleHighestListingReturn> => {
|
|
1919
|
+
return this.fetch(this.url('GetCollectibleHighestListing'), createHTTPRequest(args, headers, signal)).then(
|
|
1920
|
+
res => {
|
|
1921
|
+
return buildResponse(res).then(_data => {
|
|
1922
|
+
return {
|
|
1923
|
+
order: <Order>_data.order
|
|
1924
|
+
}
|
|
1925
|
+
})
|
|
1926
|
+
},
|
|
1927
|
+
error => {
|
|
1928
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1929
|
+
}
|
|
1930
|
+
)
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
listCollectibleListings = (
|
|
1934
|
+
args: ListCollectibleListingsArgs,
|
|
1935
|
+
headers?: object,
|
|
1936
|
+
signal?: AbortSignal
|
|
1937
|
+
): Promise<ListCollectibleListingsReturn> => {
|
|
1938
|
+
return this.fetch(this.url('ListCollectibleListings'), createHTTPRequest(args, headers, signal)).then(
|
|
1939
|
+
res => {
|
|
1940
|
+
return buildResponse(res).then(_data => {
|
|
1941
|
+
return {
|
|
1942
|
+
listings: <Array<Order>>_data.listings,
|
|
1943
|
+
page: <Page>_data.page
|
|
1944
|
+
}
|
|
1945
|
+
})
|
|
1946
|
+
},
|
|
1947
|
+
error => {
|
|
1948
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1949
|
+
}
|
|
1950
|
+
)
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
listCollectibleOffers = (
|
|
1954
|
+
args: ListCollectibleOffersArgs,
|
|
1955
|
+
headers?: object,
|
|
1956
|
+
signal?: AbortSignal
|
|
1957
|
+
): Promise<ListCollectibleOffersReturn> => {
|
|
1958
|
+
return this.fetch(this.url('ListCollectibleOffers'), createHTTPRequest(args, headers, signal)).then(
|
|
1959
|
+
res => {
|
|
1960
|
+
return buildResponse(res).then(_data => {
|
|
1961
|
+
return {
|
|
1962
|
+
offers: <Array<Order>>_data.offers,
|
|
1963
|
+
page: <Page>_data.page
|
|
1964
|
+
}
|
|
1965
|
+
})
|
|
1966
|
+
},
|
|
1967
|
+
error => {
|
|
1968
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1969
|
+
}
|
|
1970
|
+
)
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
generateBuyTransaction = (
|
|
1974
|
+
args: GenerateBuyTransactionArgs,
|
|
1975
|
+
headers?: object,
|
|
1976
|
+
signal?: AbortSignal
|
|
1977
|
+
): Promise<GenerateBuyTransactionReturn> => {
|
|
1978
|
+
return this.fetch(this.url('GenerateBuyTransaction'), createHTTPRequest(args, headers, signal)).then(
|
|
1979
|
+
res => {
|
|
1980
|
+
return buildResponse(res).then(_data => {
|
|
1981
|
+
return {
|
|
1982
|
+
steps: <Array<Step>>_data.steps
|
|
1983
|
+
}
|
|
1984
|
+
})
|
|
1985
|
+
},
|
|
1986
|
+
error => {
|
|
1987
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1988
|
+
}
|
|
1989
|
+
)
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
generateSellTransaction = (
|
|
1993
|
+
args: GenerateSellTransactionArgs,
|
|
1994
|
+
headers?: object,
|
|
1995
|
+
signal?: AbortSignal
|
|
1996
|
+
): Promise<GenerateSellTransactionReturn> => {
|
|
1997
|
+
return this.fetch(this.url('GenerateSellTransaction'), createHTTPRequest(args, headers, signal)).then(
|
|
1998
|
+
res => {
|
|
1999
|
+
return buildResponse(res).then(_data => {
|
|
2000
|
+
return {
|
|
2001
|
+
steps: <Array<Step>>_data.steps
|
|
2002
|
+
}
|
|
2003
|
+
})
|
|
2004
|
+
},
|
|
2005
|
+
error => {
|
|
2006
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2007
|
+
}
|
|
2008
|
+
)
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
generateListingTransaction = (
|
|
2012
|
+
args: GenerateListingTransactionArgs,
|
|
2013
|
+
headers?: object,
|
|
2014
|
+
signal?: AbortSignal
|
|
2015
|
+
): Promise<GenerateListingTransactionReturn> => {
|
|
2016
|
+
return this.fetch(this.url('GenerateListingTransaction'), createHTTPRequest(args, headers, signal)).then(
|
|
2017
|
+
res => {
|
|
2018
|
+
return buildResponse(res).then(_data => {
|
|
2019
|
+
return {
|
|
2020
|
+
steps: <Array<Step>>_data.steps
|
|
2021
|
+
}
|
|
2022
|
+
})
|
|
2023
|
+
},
|
|
2024
|
+
error => {
|
|
2025
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2026
|
+
}
|
|
2027
|
+
)
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
generateOfferTransaction = (
|
|
2031
|
+
args: GenerateOfferTransactionArgs,
|
|
2032
|
+
headers?: object,
|
|
2033
|
+
signal?: AbortSignal
|
|
2034
|
+
): Promise<GenerateOfferTransactionReturn> => {
|
|
2035
|
+
return this.fetch(this.url('GenerateOfferTransaction'), createHTTPRequest(args, headers, signal)).then(
|
|
2036
|
+
res => {
|
|
2037
|
+
return buildResponse(res).then(_data => {
|
|
2038
|
+
return {
|
|
2039
|
+
steps: <Array<Step>>_data.steps
|
|
2040
|
+
}
|
|
2041
|
+
})
|
|
2042
|
+
},
|
|
2043
|
+
error => {
|
|
2044
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2045
|
+
}
|
|
2046
|
+
)
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
generateCancelTransaction = (
|
|
2050
|
+
args: GenerateCancelTransactionArgs,
|
|
2051
|
+
headers?: object,
|
|
2052
|
+
signal?: AbortSignal
|
|
2053
|
+
): Promise<GenerateCancelTransactionReturn> => {
|
|
2054
|
+
return this.fetch(this.url('GenerateCancelTransaction'), createHTTPRequest(args, headers, signal)).then(
|
|
2055
|
+
res => {
|
|
2056
|
+
return buildResponse(res).then(_data => {
|
|
2057
|
+
return {
|
|
2058
|
+
steps: <Array<Step>>_data.steps
|
|
2059
|
+
}
|
|
2060
|
+
})
|
|
2061
|
+
},
|
|
2062
|
+
error => {
|
|
2063
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2064
|
+
}
|
|
2065
|
+
)
|
|
1536
2066
|
}
|
|
1537
|
-
|
|
2067
|
+
|
|
1538
2068
|
execute = (args: ExecuteArgs, headers?: object, signal?: AbortSignal): Promise<ExecuteReturn> => {
|
|
1539
|
-
return this.fetch(
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
2069
|
+
return this.fetch(this.url('Execute'), createHTTPRequest(args, headers, signal)).then(
|
|
2070
|
+
res => {
|
|
2071
|
+
return buildResponse(res).then(_data => {
|
|
2072
|
+
return {
|
|
2073
|
+
orderId: <string>_data.orderId
|
|
2074
|
+
}
|
|
2075
|
+
})
|
|
2076
|
+
},
|
|
2077
|
+
error => {
|
|
2078
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2079
|
+
}
|
|
2080
|
+
)
|
|
1550
2081
|
}
|
|
1551
|
-
|
|
2082
|
+
|
|
1552
2083
|
listCollectibles = (args: ListCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectiblesReturn> => {
|
|
1553
|
-
return this.fetch(
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
}
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
2084
|
+
return this.fetch(this.url('ListCollectibles'), createHTTPRequest(args, headers, signal)).then(
|
|
2085
|
+
res => {
|
|
2086
|
+
return buildResponse(res).then(_data => {
|
|
2087
|
+
return {
|
|
2088
|
+
collectibles: <Array<CollectibleOrder>>_data.collectibles,
|
|
2089
|
+
page: <Page>_data.page
|
|
2090
|
+
}
|
|
2091
|
+
})
|
|
2092
|
+
},
|
|
2093
|
+
error => {
|
|
2094
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2095
|
+
}
|
|
2096
|
+
)
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
getCountOfAllCollectibles = (
|
|
2100
|
+
args: GetCountOfAllCollectiblesArgs,
|
|
2101
|
+
headers?: object,
|
|
2102
|
+
signal?: AbortSignal
|
|
2103
|
+
): Promise<GetCountOfAllCollectiblesReturn> => {
|
|
2104
|
+
return this.fetch(this.url('GetCountOfAllCollectibles'), createHTTPRequest(args, headers, signal)).then(
|
|
2105
|
+
res => {
|
|
2106
|
+
return buildResponse(res).then(_data => {
|
|
2107
|
+
return {
|
|
2108
|
+
count: <number>_data.count
|
|
2109
|
+
}
|
|
2110
|
+
})
|
|
2111
|
+
},
|
|
2112
|
+
error => {
|
|
2113
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2114
|
+
}
|
|
2115
|
+
)
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
getCountOfFilteredCollectibles = (
|
|
2119
|
+
args: GetCountOfFilteredCollectiblesArgs,
|
|
2120
|
+
headers?: object,
|
|
2121
|
+
signal?: AbortSignal
|
|
2122
|
+
): Promise<GetCountOfFilteredCollectiblesReturn> => {
|
|
2123
|
+
return this.fetch(this.url('GetCountOfFilteredCollectibles'), createHTTPRequest(args, headers, signal)).then(
|
|
2124
|
+
res => {
|
|
2125
|
+
return buildResponse(res).then(_data => {
|
|
2126
|
+
return {
|
|
2127
|
+
count: <number>_data.count
|
|
2128
|
+
}
|
|
2129
|
+
})
|
|
2130
|
+
},
|
|
2131
|
+
error => {
|
|
2132
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2133
|
+
}
|
|
2134
|
+
)
|
|
1593
2135
|
}
|
|
1594
|
-
|
|
2136
|
+
|
|
1595
2137
|
getFloorOrder = (args: GetFloorOrderArgs, headers?: object, signal?: AbortSignal): Promise<GetFloorOrderReturn> => {
|
|
1596
|
-
return this.fetch(
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
}
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
return this.fetch(
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
2138
|
+
return this.fetch(this.url('GetFloorOrder'), createHTTPRequest(args, headers, signal)).then(
|
|
2139
|
+
res => {
|
|
2140
|
+
return buildResponse(res).then(_data => {
|
|
2141
|
+
return {
|
|
2142
|
+
collectible: <CollectibleOrder>_data.collectible
|
|
2143
|
+
}
|
|
2144
|
+
})
|
|
2145
|
+
},
|
|
2146
|
+
error => {
|
|
2147
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2148
|
+
}
|
|
2149
|
+
)
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
listCollectionActivities = (
|
|
2153
|
+
args: ListCollectionActivitiesArgs,
|
|
2154
|
+
headers?: object,
|
|
2155
|
+
signal?: AbortSignal
|
|
2156
|
+
): Promise<ListCollectionActivitiesReturn> => {
|
|
2157
|
+
return this.fetch(this.url('ListCollectionActivities'), createHTTPRequest(args, headers, signal)).then(
|
|
2158
|
+
res => {
|
|
2159
|
+
return buildResponse(res).then(_data => {
|
|
2160
|
+
return {
|
|
2161
|
+
activities: <Array<Activity>>_data.activities,
|
|
2162
|
+
page: <Page>_data.page
|
|
2163
|
+
}
|
|
2164
|
+
})
|
|
2165
|
+
},
|
|
2166
|
+
error => {
|
|
2167
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2168
|
+
}
|
|
2169
|
+
)
|
|
2170
|
+
}
|
|
2171
|
+
|
|
2172
|
+
listCollectibleActivities = (
|
|
2173
|
+
args: ListCollectibleActivitiesArgs,
|
|
2174
|
+
headers?: object,
|
|
2175
|
+
signal?: AbortSignal
|
|
2176
|
+
): Promise<ListCollectibleActivitiesReturn> => {
|
|
2177
|
+
return this.fetch(this.url('ListCollectibleActivities'), createHTTPRequest(args, headers, signal)).then(
|
|
2178
|
+
res => {
|
|
2179
|
+
return buildResponse(res).then(_data => {
|
|
2180
|
+
return {
|
|
2181
|
+
activities: <Array<Activity>>_data.activities,
|
|
2182
|
+
page: <Page>_data.page
|
|
2183
|
+
}
|
|
2184
|
+
})
|
|
2185
|
+
},
|
|
2186
|
+
error => {
|
|
2187
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2188
|
+
}
|
|
2189
|
+
)
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2192
|
+
listCollectiblesWithLowestListing = (
|
|
2193
|
+
args: ListCollectiblesWithLowestListingArgs,
|
|
2194
|
+
headers?: object,
|
|
2195
|
+
signal?: AbortSignal
|
|
2196
|
+
): Promise<ListCollectiblesWithLowestListingReturn> => {
|
|
2197
|
+
return this.fetch(this.url('ListCollectiblesWithLowestListing'), createHTTPRequest(args, headers, signal)).then(
|
|
2198
|
+
res => {
|
|
2199
|
+
return buildResponse(res).then(_data => {
|
|
2200
|
+
return {
|
|
2201
|
+
collectibles: <Array<CollectibleOrder>>_data.collectibles,
|
|
2202
|
+
page: <Page>_data.page
|
|
2203
|
+
}
|
|
2204
|
+
})
|
|
2205
|
+
},
|
|
2206
|
+
error => {
|
|
2207
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2208
|
+
}
|
|
2209
|
+
)
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
listCollectiblesWithHighestOffer = (
|
|
2213
|
+
args: ListCollectiblesWithHighestOfferArgs,
|
|
2214
|
+
headers?: object,
|
|
2215
|
+
signal?: AbortSignal
|
|
2216
|
+
): Promise<ListCollectiblesWithHighestOfferReturn> => {
|
|
2217
|
+
return this.fetch(this.url('ListCollectiblesWithHighestOffer'), createHTTPRequest(args, headers, signal)).then(
|
|
2218
|
+
res => {
|
|
2219
|
+
return buildResponse(res).then(_data => {
|
|
2220
|
+
return {
|
|
2221
|
+
collectibles: <Array<CollectibleOrder>>_data.collectibles,
|
|
2222
|
+
page: <Page>_data.page
|
|
2223
|
+
}
|
|
2224
|
+
})
|
|
2225
|
+
},
|
|
2226
|
+
error => {
|
|
2227
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2228
|
+
}
|
|
2229
|
+
)
|
|
1667
2230
|
}
|
|
1668
|
-
|
|
2231
|
+
|
|
1669
2232
|
syncOrder = (args: SyncOrderArgs, headers?: object, signal?: AbortSignal): Promise<SyncOrderReturn> => {
|
|
1670
|
-
return this.fetch(
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
}
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
2233
|
+
return this.fetch(this.url('SyncOrder'), createHTTPRequest(args, headers, signal)).then(
|
|
2234
|
+
res => {
|
|
2235
|
+
return buildResponse(res).then(_data => {
|
|
2236
|
+
return {}
|
|
2237
|
+
})
|
|
2238
|
+
},
|
|
2239
|
+
error => {
|
|
2240
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2241
|
+
}
|
|
2242
|
+
)
|
|
1679
2243
|
}
|
|
1680
|
-
|
|
2244
|
+
|
|
1681
2245
|
syncOrders = (args: SyncOrdersArgs, headers?: object, signal?: AbortSignal): Promise<SyncOrdersReturn> => {
|
|
1682
|
-
return this.fetch(
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
2246
|
+
return this.fetch(this.url('SyncOrders'), createHTTPRequest(args, headers, signal)).then(
|
|
2247
|
+
res => {
|
|
2248
|
+
return buildResponse(res).then(_data => {
|
|
2249
|
+
return {}
|
|
2250
|
+
})
|
|
2251
|
+
},
|
|
2252
|
+
error => {
|
|
2253
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2254
|
+
}
|
|
2255
|
+
)
|
|
1691
2256
|
}
|
|
1692
|
-
|
|
2257
|
+
|
|
1693
2258
|
getOrders = (args: GetOrdersArgs, headers?: object, signal?: AbortSignal): Promise<GetOrdersReturn> => {
|
|
1694
|
-
return this.fetch(
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
2259
|
+
return this.fetch(this.url('GetOrders'), createHTTPRequest(args, headers, signal)).then(
|
|
2260
|
+
res => {
|
|
2261
|
+
return buildResponse(res).then(_data => {
|
|
2262
|
+
return {
|
|
2263
|
+
orders: <Array<Order>>_data.orders,
|
|
2264
|
+
page: <Page>_data.page
|
|
2265
|
+
}
|
|
2266
|
+
})
|
|
2267
|
+
},
|
|
2268
|
+
error => {
|
|
2269
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2270
|
+
}
|
|
2271
|
+
)
|
|
2272
|
+
}
|
|
2273
|
+
|
|
2274
|
+
checkoutOptionsMarketplace = (
|
|
2275
|
+
args: CheckoutOptionsMarketplaceArgs,
|
|
2276
|
+
headers?: object,
|
|
2277
|
+
signal?: AbortSignal
|
|
2278
|
+
): Promise<CheckoutOptionsMarketplaceReturn> => {
|
|
2279
|
+
return this.fetch(this.url('CheckoutOptionsMarketplace'), createHTTPRequest(args, headers, signal)).then(
|
|
2280
|
+
res => {
|
|
2281
|
+
return buildResponse(res).then(_data => {
|
|
2282
|
+
return {
|
|
2283
|
+
options: <CheckoutOptions>_data.options
|
|
2284
|
+
}
|
|
2285
|
+
})
|
|
2286
|
+
},
|
|
2287
|
+
error => {
|
|
2288
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2289
|
+
}
|
|
2290
|
+
)
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
checkoutOptionsSalesContract = (
|
|
2294
|
+
args: CheckoutOptionsSalesContractArgs,
|
|
2295
|
+
headers?: object,
|
|
2296
|
+
signal?: AbortSignal
|
|
2297
|
+
): Promise<CheckoutOptionsSalesContractReturn> => {
|
|
2298
|
+
return this.fetch(this.url('CheckoutOptionsSalesContract'), createHTTPRequest(args, headers, signal)).then(
|
|
2299
|
+
res => {
|
|
2300
|
+
return buildResponse(res).then(_data => {
|
|
2301
|
+
return {
|
|
2302
|
+
options: <CheckoutOptions>_data.options
|
|
2303
|
+
}
|
|
2304
|
+
})
|
|
2305
|
+
},
|
|
2306
|
+
error => {
|
|
2307
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2308
|
+
}
|
|
2309
|
+
)
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
supportedMarketplaces = (
|
|
2313
|
+
args: SupportedMarketplacesArgs,
|
|
2314
|
+
headers?: object,
|
|
2315
|
+
signal?: AbortSignal
|
|
2316
|
+
): Promise<SupportedMarketplacesReturn> => {
|
|
2317
|
+
return this.fetch(this.url('SupportedMarketplaces'), createHTTPRequest(args, headers, signal)).then(
|
|
2318
|
+
res => {
|
|
2319
|
+
return buildResponse(res).then(_data => {
|
|
2320
|
+
return {
|
|
2321
|
+
marketplaces: <Array<MarketplaceKind>>_data.marketplaces
|
|
2322
|
+
}
|
|
2323
|
+
})
|
|
2324
|
+
},
|
|
2325
|
+
error => {
|
|
2326
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2327
|
+
}
|
|
2328
|
+
)
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
getPrimarySaleItem = (
|
|
2332
|
+
args: GetPrimarySaleItemArgs,
|
|
2333
|
+
headers?: object,
|
|
2334
|
+
signal?: AbortSignal
|
|
2335
|
+
): Promise<GetPrimarySaleItemReturn> => {
|
|
2336
|
+
return this.fetch(this.url('GetPrimarySaleItem'), createHTTPRequest(args, headers, signal)).then(
|
|
2337
|
+
res => {
|
|
2338
|
+
return buildResponse(res).then(_data => {
|
|
2339
|
+
return {
|
|
2340
|
+
item: <CollectiblePrimarySaleItem>_data.item
|
|
2341
|
+
}
|
|
2342
|
+
})
|
|
2343
|
+
},
|
|
2344
|
+
error => {
|
|
2345
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2346
|
+
}
|
|
2347
|
+
)
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
listPrimarySaleItems = (
|
|
2351
|
+
args: ListPrimarySaleItemsArgs,
|
|
2352
|
+
headers?: object,
|
|
2353
|
+
signal?: AbortSignal
|
|
2354
|
+
): Promise<ListPrimarySaleItemsReturn> => {
|
|
2355
|
+
return this.fetch(this.url('ListPrimarySaleItems'), createHTTPRequest(args, headers, signal)).then(
|
|
2356
|
+
res => {
|
|
2357
|
+
return buildResponse(res).then(_data => {
|
|
2358
|
+
return {
|
|
2359
|
+
primarySaleItems: <Array<CollectiblePrimarySaleItem>>_data.primarySaleItems,
|
|
2360
|
+
page: <Page>_data.page
|
|
2361
|
+
}
|
|
2362
|
+
})
|
|
2363
|
+
},
|
|
2364
|
+
error => {
|
|
2365
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2366
|
+
}
|
|
2367
|
+
)
|
|
2368
|
+
}
|
|
2369
|
+
|
|
2370
|
+
getCountOfPrimarySaleItems = (
|
|
2371
|
+
args: GetCountOfPrimarySaleItemsArgs,
|
|
2372
|
+
headers?: object,
|
|
2373
|
+
signal?: AbortSignal
|
|
2374
|
+
): Promise<GetCountOfPrimarySaleItemsReturn> => {
|
|
2375
|
+
return this.fetch(this.url('GetCountOfPrimarySaleItems'), createHTTPRequest(args, headers, signal)).then(
|
|
2376
|
+
res => {
|
|
2377
|
+
return buildResponse(res).then(_data => {
|
|
2378
|
+
return {
|
|
2379
|
+
count: <number>_data.count
|
|
2380
|
+
}
|
|
2381
|
+
})
|
|
2382
|
+
},
|
|
2383
|
+
error => {
|
|
2384
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2385
|
+
}
|
|
2386
|
+
)
|
|
1749
2387
|
}
|
|
1750
|
-
|
|
1751
2388
|
}
|
|
1752
2389
|
|
|
1753
|
-
|
|
1754
|
-
const reqHeaders: {[key: string]: string} = { ...headers, 'Content-Type': 'application/json' }
|
|
2390
|
+
const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => {
|
|
2391
|
+
const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' }
|
|
1755
2392
|
reqHeaders[WebrpcHeader] = WebrpcHeaderValue
|
|
1756
2393
|
|
|
1757
2394
|
return {
|
|
@@ -1767,18 +2404,18 @@ const buildResponse = (res: Response): Promise<any> => {
|
|
|
1767
2404
|
let data
|
|
1768
2405
|
try {
|
|
1769
2406
|
data = JSON.parse(text)
|
|
1770
|
-
} catch(error) {
|
|
2407
|
+
} catch (error) {
|
|
1771
2408
|
let message = ''
|
|
1772
|
-
if (error instanceof Error)
|
|
2409
|
+
if (error instanceof Error) {
|
|
1773
2410
|
message = error.message
|
|
1774
2411
|
}
|
|
1775
2412
|
throw WebrpcBadResponseError.new({
|
|
1776
2413
|
status: res.status,
|
|
1777
|
-
cause: `JSON.parse(): ${message}: response text: ${text}`
|
|
1778
|
-
)
|
|
2414
|
+
cause: `JSON.parse(): ${message}: response text: ${text}`
|
|
2415
|
+
})
|
|
1779
2416
|
}
|
|
1780
2417
|
if (!res.ok) {
|
|
1781
|
-
const code: number =
|
|
2418
|
+
const code: number = typeof data.code === 'number' ? data.code : 0
|
|
1782
2419
|
throw (webrpcErrorByCode[code] || WebrpcError).new(data)
|
|
1783
2420
|
}
|
|
1784
2421
|
return data
|
|
@@ -1960,7 +2597,6 @@ export class WebrpcStreamFinishedError extends WebrpcError {
|
|
|
1960
2597
|
}
|
|
1961
2598
|
}
|
|
1962
2599
|
|
|
1963
|
-
|
|
1964
2600
|
// Schema errors
|
|
1965
2601
|
|
|
1966
2602
|
export class UnauthorizedError extends WebrpcError {
|
|
@@ -2119,7 +2755,6 @@ export class NotImplementedError extends WebrpcError {
|
|
|
2119
2755
|
}
|
|
2120
2756
|
}
|
|
2121
2757
|
|
|
2122
|
-
|
|
2123
2758
|
export enum errors {
|
|
2124
2759
|
WebrpcEndpoint = 'WebrpcEndpoint',
|
|
2125
2760
|
WebrpcRequestFailed = 'WebrpcRequestFailed',
|
|
@@ -2143,7 +2778,7 @@ export enum errors {
|
|
|
2143
2778
|
ProjectNotFound = 'ProjectNotFound',
|
|
2144
2779
|
InvalidTier = 'InvalidTier',
|
|
2145
2780
|
ProjectLimitReached = 'ProjectLimitReached',
|
|
2146
|
-
NotImplemented = 'NotImplemented'
|
|
2781
|
+
NotImplemented = 'NotImplemented'
|
|
2147
2782
|
}
|
|
2148
2783
|
|
|
2149
2784
|
export enum WebrpcErrorCodes {
|
|
@@ -2169,7 +2804,7 @@ export enum WebrpcErrorCodes {
|
|
|
2169
2804
|
ProjectNotFound = 3002,
|
|
2170
2805
|
InvalidTier = 3003,
|
|
2171
2806
|
ProjectLimitReached = 3005,
|
|
2172
|
-
NotImplemented = 9999
|
|
2807
|
+
NotImplemented = 9999
|
|
2173
2808
|
}
|
|
2174
2809
|
|
|
2175
2810
|
export const webrpcErrorByCode: { [code: number]: any } = {
|
|
@@ -2195,8 +2830,7 @@ export const webrpcErrorByCode: { [code: number]: any } = {
|
|
|
2195
2830
|
[3002]: ProjectNotFoundError,
|
|
2196
2831
|
[3003]: InvalidTierError,
|
|
2197
2832
|
[3005]: ProjectLimitReachedError,
|
|
2198
|
-
[9999]: NotImplementedError
|
|
2833
|
+
[9999]: NotImplementedError
|
|
2199
2834
|
}
|
|
2200
2835
|
|
|
2201
2836
|
export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response>
|
|
2202
|
-
|