@0xsequence/marketplace 2.3.9 → 2.3.10
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/src/marketplace.gen.ts
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// marketplace-api
|
|
2
|
+
// marketplace-api 5ba59124a7011c1864106b759b26b60a6f55a062
|
|
3
3
|
// --
|
|
4
|
-
// Code generated by webrpc-gen@v0.25.
|
|
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 =
|
|
11
|
-
'webrpc@v0.25.1;gen-typescript@v0.17.0;marketplace-api@v0.0.0-7ab3354385f317680dd861e82a18aa351d8579d5'
|
|
10
|
+
export const WebrpcHeaderValue = "webrpc@v0.25.4;gen-typescript@v0.17.0;marketplace-api@v0.0.0-5ba59124a7011c1864106b759b26b60a6f55a062"
|
|
12
11
|
|
|
13
12
|
// WebRPC description and code-gen version
|
|
14
|
-
export const WebRPCVersion =
|
|
13
|
+
export const WebRPCVersion = "v1"
|
|
15
14
|
|
|
16
15
|
// Schema version of your RIDL schema
|
|
17
|
-
export const WebRPCSchemaVersion =
|
|
16
|
+
export const WebRPCSchemaVersion = ""
|
|
18
17
|
|
|
19
18
|
// Schema hash generated from your RIDL schema
|
|
20
|
-
export const WebRPCSchemaHash =
|
|
19
|
+
export const WebRPCSchemaHash = "5ba59124a7011c1864106b759b26b60a6f55a062"
|
|
21
20
|
|
|
22
21
|
type WebrpcGenVersions = {
|
|
23
|
-
webrpcGenVersion: string
|
|
24
|
-
codeGenName: string
|
|
25
|
-
codeGenVersion: string
|
|
26
|
-
schemaName: string
|
|
27
|
-
schemaVersion: string
|
|
28
|
-
}
|
|
22
|
+
webrpcGenVersion: string;
|
|
23
|
+
codeGenName: string;
|
|
24
|
+
codeGenVersion: string;
|
|
25
|
+
schemaName: string;
|
|
26
|
+
schemaVersion: string;
|
|
27
|
+
};
|
|
29
28
|
|
|
30
29
|
export function VersionFromHeader(headers: Headers): WebrpcGenVersions {
|
|
31
|
-
const headerValue = headers.get(WebrpcHeader)
|
|
30
|
+
const headerValue = headers.get(WebrpcHeader);
|
|
32
31
|
if (!headerValue) {
|
|
33
32
|
return {
|
|
34
|
-
webrpcGenVersion:
|
|
35
|
-
codeGenName:
|
|
36
|
-
codeGenVersion:
|
|
37
|
-
schemaName:
|
|
38
|
-
schemaVersion:
|
|
39
|
-
}
|
|
33
|
+
webrpcGenVersion: "",
|
|
34
|
+
codeGenName: "",
|
|
35
|
+
codeGenVersion: "",
|
|
36
|
+
schemaName: "",
|
|
37
|
+
schemaVersion: "",
|
|
38
|
+
};
|
|
40
39
|
}
|
|
41
40
|
|
|
42
|
-
return parseWebrpcGenVersions(headerValue)
|
|
41
|
+
return parseWebrpcGenVersions(headerValue);
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
function parseWebrpcGenVersions(header: string): WebrpcGenVersions {
|
|
46
|
-
const versions = header.split(
|
|
45
|
+
const versions = header.split(";");
|
|
47
46
|
if (versions.length < 3) {
|
|
48
47
|
return {
|
|
49
|
-
webrpcGenVersion:
|
|
50
|
-
codeGenName:
|
|
51
|
-
codeGenVersion:
|
|
52
|
-
schemaName:
|
|
53
|
-
schemaVersion:
|
|
54
|
-
}
|
|
48
|
+
webrpcGenVersion: "",
|
|
49
|
+
codeGenName: "",
|
|
50
|
+
codeGenVersion: "",
|
|
51
|
+
schemaName: "",
|
|
52
|
+
schemaVersion: "",
|
|
53
|
+
};
|
|
55
54
|
}
|
|
56
55
|
|
|
57
|
-
const [_, webrpcGenVersion] = versions[0]!.split(
|
|
58
|
-
const [codeGenName, codeGenVersion] = versions[1]!.split(
|
|
59
|
-
const [schemaName, schemaVersion] = versions[2]!.split(
|
|
56
|
+
const [_, webrpcGenVersion] = versions[0]!.split("@");
|
|
57
|
+
const [codeGenName, codeGenVersion] = versions[1]!.split("@");
|
|
58
|
+
const [schemaName, schemaVersion] = versions[2]!.split("@");
|
|
60
59
|
|
|
61
60
|
return {
|
|
62
|
-
webrpcGenVersion: webrpcGenVersion ??
|
|
63
|
-
codeGenName: codeGenName ??
|
|
64
|
-
codeGenVersion: codeGenVersion ??
|
|
65
|
-
schemaName: schemaName ??
|
|
66
|
-
schemaVersion: schemaVersion ??
|
|
67
|
-
}
|
|
61
|
+
webrpcGenVersion: webrpcGenVersion ?? "",
|
|
62
|
+
codeGenName: codeGenName ?? "",
|
|
63
|
+
codeGenVersion: codeGenVersion ?? "",
|
|
64
|
+
schemaName: schemaName ?? "",
|
|
65
|
+
schemaVersion: schemaVersion ?? "",
|
|
66
|
+
};
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
//
|
|
71
70
|
// Types
|
|
72
71
|
//
|
|
73
72
|
|
|
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?: {
|
|
82
|
-
attributes: Array<{
|
|
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
|
|
@@ -126,7 +126,8 @@ export enum MarketplaceKind {
|
|
|
126
126
|
x2y2 = 'x2y2',
|
|
127
127
|
alienswap = 'alienswap',
|
|
128
128
|
payment_processor = 'payment_processor',
|
|
129
|
-
mintify = 'mintify'
|
|
129
|
+
mintify = 'mintify',
|
|
130
|
+
magic_eden = 'magic_eden'
|
|
130
131
|
}
|
|
131
132
|
|
|
132
133
|
export enum OrderbookKind {
|
|
@@ -182,8 +183,6 @@ export enum CollectionStatus {
|
|
|
182
183
|
created = 'created',
|
|
183
184
|
syncing_contract_metadata = 'syncing_contract_metadata',
|
|
184
185
|
synced_contract_metadata = 'synced_contract_metadata',
|
|
185
|
-
syncing_metadata = 'syncing_metadata',
|
|
186
|
-
synced_metadata = 'synced_metadata',
|
|
187
186
|
syncing_tokens = 'syncing_tokens',
|
|
188
187
|
synced_tokens = 'synced_tokens',
|
|
189
188
|
syncing_orders = 'syncing_orders',
|
|
@@ -377,7 +376,7 @@ export interface Collection {
|
|
|
377
376
|
}
|
|
378
377
|
|
|
379
378
|
export interface CollectionConfig {
|
|
380
|
-
lastSynced: {
|
|
379
|
+
lastSynced: {[key: string]: CollectionLastSynced}
|
|
381
380
|
collectiblesSynced: string
|
|
382
381
|
activitiesSynced: string
|
|
383
382
|
activitiesSyncedContinuity: string
|
|
@@ -543,7 +542,7 @@ export interface CreateCollectionArgs {
|
|
|
543
542
|
}
|
|
544
543
|
|
|
545
544
|
export interface CreateCollectionReturn {
|
|
546
|
-
collection: Collection
|
|
545
|
+
collection: Collection
|
|
547
546
|
}
|
|
548
547
|
export interface GetCollectionArgs {
|
|
549
548
|
projectId: number
|
|
@@ -551,14 +550,14 @@ export interface GetCollectionArgs {
|
|
|
551
550
|
}
|
|
552
551
|
|
|
553
552
|
export interface GetCollectionReturn {
|
|
554
|
-
collection: Collection
|
|
553
|
+
collection: Collection
|
|
555
554
|
}
|
|
556
555
|
export interface UpdateCollectionArgs {
|
|
557
556
|
collection: Collection
|
|
558
557
|
}
|
|
559
558
|
|
|
560
559
|
export interface UpdateCollectionReturn {
|
|
561
|
-
collection: Collection
|
|
560
|
+
collection: Collection
|
|
562
561
|
}
|
|
563
562
|
export interface ListCollectionsArgs {
|
|
564
563
|
projectId: number
|
|
@@ -567,7 +566,7 @@ export interface ListCollectionsArgs {
|
|
|
567
566
|
|
|
568
567
|
export interface ListCollectionsReturn {
|
|
569
568
|
collections: Array<Collection>
|
|
570
|
-
page?: Page
|
|
569
|
+
page?: Page
|
|
571
570
|
}
|
|
572
571
|
export interface DeleteCollectionArgs {
|
|
573
572
|
projectId: number
|
|
@@ -575,7 +574,7 @@ export interface DeleteCollectionArgs {
|
|
|
575
574
|
}
|
|
576
575
|
|
|
577
576
|
export interface DeleteCollectionReturn {
|
|
578
|
-
collection: Collection
|
|
577
|
+
collection: Collection
|
|
579
578
|
}
|
|
580
579
|
export interface SyncCollectionArgs {
|
|
581
580
|
projectId: number
|
|
@@ -583,33 +582,34 @@ export interface SyncCollectionArgs {
|
|
|
583
582
|
}
|
|
584
583
|
|
|
585
584
|
export interface SyncCollectionReturn {
|
|
586
|
-
collection: Collection
|
|
585
|
+
collection: Collection
|
|
587
586
|
}
|
|
588
587
|
export interface CreateCurrencyArgs {
|
|
589
588
|
currency: Currency
|
|
590
589
|
}
|
|
591
590
|
|
|
592
591
|
export interface CreateCurrencyReturn {
|
|
593
|
-
currency: Currency
|
|
592
|
+
currency: Currency
|
|
594
593
|
}
|
|
595
594
|
export interface CreateCurrenciesArgs {
|
|
596
595
|
currencies: Array<Currency>
|
|
597
596
|
}
|
|
598
597
|
|
|
599
598
|
export interface CreateCurrenciesReturn {
|
|
600
|
-
currency: {
|
|
599
|
+
currency: {[key: string]: Currency}
|
|
601
600
|
}
|
|
602
601
|
export interface UpdateCurrencyArgs {
|
|
603
602
|
currency: Currency
|
|
604
603
|
}
|
|
605
604
|
|
|
606
605
|
export interface UpdateCurrencyReturn {
|
|
607
|
-
currency: Currency
|
|
606
|
+
currency: Currency
|
|
607
|
+
}
|
|
608
|
+
export interface ListCurrenciesArgs {
|
|
608
609
|
}
|
|
609
|
-
export interface ListCurrenciesArgs {}
|
|
610
610
|
|
|
611
611
|
export interface ListCurrenciesReturn {
|
|
612
|
-
currencies: Array<Currency>
|
|
612
|
+
currencies: Array<Currency>
|
|
613
613
|
}
|
|
614
614
|
export interface DeleteCurrencyArgs {
|
|
615
615
|
chainId: number
|
|
@@ -617,129 +617,53 @@ export interface DeleteCurrencyArgs {
|
|
|
617
617
|
}
|
|
618
618
|
|
|
619
619
|
export interface DeleteCurrencyReturn {
|
|
620
|
-
currency: Currency
|
|
620
|
+
currency: Currency
|
|
621
621
|
}
|
|
622
622
|
|
|
623
623
|
export interface Marketplace {
|
|
624
624
|
listCurrencies(headers?: object, signal?: AbortSignal): Promise<ListCurrenciesReturn>
|
|
625
625
|
getCollectionDetail(args: GetCollectionDetailArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectionDetailReturn>
|
|
626
626
|
getCollectible(args: GetCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectibleReturn>
|
|
627
|
-
getLowestPriceOfferForCollectible(
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
): Promise<
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
signal?: AbortSignal
|
|
636
|
-
): Promise<GetHighestPriceOfferForCollectibleReturn>
|
|
637
|
-
getLowestPriceListingForCollectible(
|
|
638
|
-
args: GetLowestPriceListingForCollectibleArgs,
|
|
639
|
-
headers?: object,
|
|
640
|
-
signal?: AbortSignal
|
|
641
|
-
): Promise<GetLowestPriceListingForCollectibleReturn>
|
|
642
|
-
getHighestPriceListingForCollectible(
|
|
643
|
-
args: GetHighestPriceListingForCollectibleArgs,
|
|
644
|
-
headers?: object,
|
|
645
|
-
signal?: AbortSignal
|
|
646
|
-
): Promise<GetHighestPriceListingForCollectibleReturn>
|
|
647
|
-
listListingsForCollectible(
|
|
648
|
-
args: ListListingsForCollectibleArgs,
|
|
649
|
-
headers?: object,
|
|
650
|
-
signal?: AbortSignal
|
|
651
|
-
): Promise<ListListingsForCollectibleReturn>
|
|
652
|
-
listOffersForCollectible(
|
|
653
|
-
args: ListOffersForCollectibleArgs,
|
|
654
|
-
headers?: object,
|
|
655
|
-
signal?: AbortSignal
|
|
656
|
-
): Promise<ListOffersForCollectibleReturn>
|
|
657
|
-
getCountOfListingsForCollectible(
|
|
658
|
-
args: GetCountOfListingsForCollectibleArgs,
|
|
659
|
-
headers?: object,
|
|
660
|
-
signal?: AbortSignal
|
|
661
|
-
): Promise<GetCountOfListingsForCollectibleReturn>
|
|
662
|
-
getCountOfOffersForCollectible(
|
|
663
|
-
args: GetCountOfOffersForCollectibleArgs,
|
|
664
|
-
headers?: object,
|
|
665
|
-
signal?: AbortSignal
|
|
666
|
-
): Promise<GetCountOfOffersForCollectibleReturn>
|
|
627
|
+
getLowestPriceOfferForCollectible(args: GetLowestPriceOfferForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetLowestPriceOfferForCollectibleReturn>
|
|
628
|
+
getHighestPriceOfferForCollectible(args: GetHighestPriceOfferForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetHighestPriceOfferForCollectibleReturn>
|
|
629
|
+
getLowestPriceListingForCollectible(args: GetLowestPriceListingForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetLowestPriceListingForCollectibleReturn>
|
|
630
|
+
getHighestPriceListingForCollectible(args: GetHighestPriceListingForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetHighestPriceListingForCollectibleReturn>
|
|
631
|
+
listListingsForCollectible(args: ListListingsForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<ListListingsForCollectibleReturn>
|
|
632
|
+
listOffersForCollectible(args: ListOffersForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<ListOffersForCollectibleReturn>
|
|
633
|
+
getCountOfListingsForCollectible(args: GetCountOfListingsForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetCountOfListingsForCollectibleReturn>
|
|
634
|
+
getCountOfOffersForCollectible(args: GetCountOfOffersForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetCountOfOffersForCollectibleReturn>
|
|
667
635
|
/**
|
|
668
636
|
* @deprecated Please use GetLowestPriceOfferForCollectible instead.
|
|
669
637
|
*/
|
|
670
|
-
getCollectibleLowestOffer(
|
|
671
|
-
args: GetCollectibleLowestOfferArgs,
|
|
672
|
-
headers?: object,
|
|
673
|
-
signal?: AbortSignal
|
|
674
|
-
): Promise<GetCollectibleLowestOfferReturn>
|
|
638
|
+
getCollectibleLowestOffer(args: GetCollectibleLowestOfferArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectibleLowestOfferReturn>
|
|
675
639
|
/**
|
|
676
640
|
* @deprecated Please use GetHighestPriceOfferForCollectible instead.
|
|
677
641
|
*/
|
|
678
|
-
getCollectibleHighestOffer(
|
|
679
|
-
args: GetCollectibleHighestOfferArgs,
|
|
680
|
-
headers?: object,
|
|
681
|
-
signal?: AbortSignal
|
|
682
|
-
): Promise<GetCollectibleHighestOfferReturn>
|
|
642
|
+
getCollectibleHighestOffer(args: GetCollectibleHighestOfferArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectibleHighestOfferReturn>
|
|
683
643
|
/**
|
|
684
644
|
* @deprecated Please use GetLowestPriceListingForCollectible instead.
|
|
685
645
|
*/
|
|
686
|
-
getCollectibleLowestListing(
|
|
687
|
-
args: GetCollectibleLowestListingArgs,
|
|
688
|
-
headers?: object,
|
|
689
|
-
signal?: AbortSignal
|
|
690
|
-
): Promise<GetCollectibleLowestListingReturn>
|
|
646
|
+
getCollectibleLowestListing(args: GetCollectibleLowestListingArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectibleLowestListingReturn>
|
|
691
647
|
/**
|
|
692
648
|
* @deprecated Please use GetHighestPriceListingForCollectible instead.
|
|
693
649
|
*/
|
|
694
|
-
getCollectibleHighestListing(
|
|
695
|
-
args: GetCollectibleHighestListingArgs,
|
|
696
|
-
headers?: object,
|
|
697
|
-
signal?: AbortSignal
|
|
698
|
-
): Promise<GetCollectibleHighestListingReturn>
|
|
650
|
+
getCollectibleHighestListing(args: GetCollectibleHighestListingArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectibleHighestListingReturn>
|
|
699
651
|
/**
|
|
700
652
|
* @deprecated Please use ListListingsForCollectible instead.
|
|
701
653
|
*/
|
|
702
|
-
listCollectibleListings(
|
|
703
|
-
args: ListCollectibleListingsArgs,
|
|
704
|
-
headers?: object,
|
|
705
|
-
signal?: AbortSignal
|
|
706
|
-
): Promise<ListCollectibleListingsReturn>
|
|
654
|
+
listCollectibleListings(args: ListCollectibleListingsArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectibleListingsReturn>
|
|
707
655
|
/**
|
|
708
656
|
* @deprecated Please use ListOffersForCollectible instead.
|
|
709
657
|
*/
|
|
710
|
-
listCollectibleOffers(
|
|
711
|
-
args: ListCollectibleOffersArgs,
|
|
712
|
-
headers?: object,
|
|
713
|
-
signal?: AbortSignal
|
|
714
|
-
): Promise<ListCollectibleOffersReturn>
|
|
658
|
+
listCollectibleOffers(args: ListCollectibleOffersArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectibleOffersReturn>
|
|
715
659
|
/**
|
|
716
660
|
* checkout process
|
|
717
661
|
*/
|
|
718
|
-
generateBuyTransaction(
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
): Promise<
|
|
723
|
-
generateSellTransaction(
|
|
724
|
-
args: GenerateSellTransactionArgs,
|
|
725
|
-
headers?: object,
|
|
726
|
-
signal?: AbortSignal
|
|
727
|
-
): Promise<GenerateSellTransactionReturn>
|
|
728
|
-
generateListingTransaction(
|
|
729
|
-
args: GenerateListingTransactionArgs,
|
|
730
|
-
headers?: object,
|
|
731
|
-
signal?: AbortSignal
|
|
732
|
-
): Promise<GenerateListingTransactionReturn>
|
|
733
|
-
generateOfferTransaction(
|
|
734
|
-
args: GenerateOfferTransactionArgs,
|
|
735
|
-
headers?: object,
|
|
736
|
-
signal?: AbortSignal
|
|
737
|
-
): Promise<GenerateOfferTransactionReturn>
|
|
738
|
-
generateCancelTransaction(
|
|
739
|
-
args: GenerateCancelTransactionArgs,
|
|
740
|
-
headers?: object,
|
|
741
|
-
signal?: AbortSignal
|
|
742
|
-
): Promise<GenerateCancelTransactionReturn>
|
|
662
|
+
generateBuyTransaction(args: GenerateBuyTransactionArgs, headers?: object, signal?: AbortSignal): Promise<GenerateBuyTransactionReturn>
|
|
663
|
+
generateSellTransaction(args: GenerateSellTransactionArgs, headers?: object, signal?: AbortSignal): Promise<GenerateSellTransactionReturn>
|
|
664
|
+
generateListingTransaction(args: GenerateListingTransactionArgs, headers?: object, signal?: AbortSignal): Promise<GenerateListingTransactionReturn>
|
|
665
|
+
generateOfferTransaction(args: GenerateOfferTransactionArgs, headers?: object, signal?: AbortSignal): Promise<GenerateOfferTransactionReturn>
|
|
666
|
+
generateCancelTransaction(args: GenerateCancelTransactionArgs, headers?: object, signal?: AbortSignal): Promise<GenerateCancelTransactionReturn>
|
|
743
667
|
/**
|
|
744
668
|
* only used in a case of external transactions ( when we create off-chain transactions ) for instance opensea market
|
|
745
669
|
*/
|
|
@@ -748,63 +672,33 @@ export interface Marketplace {
|
|
|
748
672
|
* list of collectibles with best order for each collectible, by default this only returns collectibles with an order
|
|
749
673
|
*/
|
|
750
674
|
listCollectibles(args: ListCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectiblesReturn>
|
|
751
|
-
getCountOfAllCollectibles(
|
|
752
|
-
|
|
753
|
-
headers?: object,
|
|
754
|
-
signal?: AbortSignal
|
|
755
|
-
): Promise<GetCountOfAllCollectiblesReturn>
|
|
756
|
-
getCountOfFilteredCollectibles(
|
|
757
|
-
args: GetCountOfFilteredCollectiblesArgs,
|
|
758
|
-
headers?: object,
|
|
759
|
-
signal?: AbortSignal
|
|
760
|
-
): Promise<GetCountOfFilteredCollectiblesReturn>
|
|
675
|
+
getCountOfAllCollectibles(args: GetCountOfAllCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise<GetCountOfAllCollectiblesReturn>
|
|
676
|
+
getCountOfFilteredCollectibles(args: GetCountOfFilteredCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise<GetCountOfFilteredCollectiblesReturn>
|
|
761
677
|
getFloorOrder(args: GetFloorOrderArgs, headers?: object, signal?: AbortSignal): Promise<GetFloorOrderReturn>
|
|
762
|
-
listCollectionActivities(
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
): Promise<ListCollectionActivitiesReturn>
|
|
767
|
-
listCollectibleActivities(
|
|
768
|
-
args: ListCollectibleActivitiesArgs,
|
|
769
|
-
headers?: object,
|
|
770
|
-
signal?: AbortSignal
|
|
771
|
-
): Promise<ListCollectibleActivitiesReturn>
|
|
772
|
-
listCollectiblesWithLowestListing(
|
|
773
|
-
args: ListCollectiblesWithLowestListingArgs,
|
|
774
|
-
headers?: object,
|
|
775
|
-
signal?: AbortSignal
|
|
776
|
-
): Promise<ListCollectiblesWithLowestListingReturn>
|
|
777
|
-
listCollectiblesWithHighestOffer(
|
|
778
|
-
args: ListCollectiblesWithHighestOfferArgs,
|
|
779
|
-
headers?: object,
|
|
780
|
-
signal?: AbortSignal
|
|
781
|
-
): Promise<ListCollectiblesWithHighestOfferReturn>
|
|
678
|
+
listCollectionActivities(args: ListCollectionActivitiesArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectionActivitiesReturn>
|
|
679
|
+
listCollectibleActivities(args: ListCollectibleActivitiesArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectibleActivitiesReturn>
|
|
680
|
+
listCollectiblesWithLowestListing(args: ListCollectiblesWithLowestListingArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectiblesWithLowestListingReturn>
|
|
681
|
+
listCollectiblesWithHighestOffer(args: ListCollectiblesWithHighestOfferArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectiblesWithHighestOfferReturn>
|
|
782
682
|
syncOrder(args: SyncOrderArgs, headers?: object, signal?: AbortSignal): Promise<SyncOrderReturn>
|
|
783
683
|
syncOrders(args: SyncOrdersArgs, headers?: object, signal?: AbortSignal): Promise<SyncOrdersReturn>
|
|
784
684
|
getOrders(args: GetOrdersArgs, headers?: object, signal?: AbortSignal): Promise<GetOrdersReturn>
|
|
785
|
-
checkoutOptionsMarketplace(
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
signal?: AbortSignal
|
|
789
|
-
): Promise<CheckoutOptionsMarketplaceReturn>
|
|
790
|
-
checkoutOptionsSalesContract(
|
|
791
|
-
args: CheckoutOptionsSalesContractArgs,
|
|
792
|
-
headers?: object,
|
|
793
|
-
signal?: AbortSignal
|
|
794
|
-
): Promise<CheckoutOptionsSalesContractReturn>
|
|
685
|
+
checkoutOptionsMarketplace(args: CheckoutOptionsMarketplaceArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsMarketplaceReturn>
|
|
686
|
+
checkoutOptionsSalesContract(args: CheckoutOptionsSalesContractArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsSalesContractReturn>
|
|
687
|
+
supportedMarketplaces(headers?: object, signal?: AbortSignal): Promise<SupportedMarketplacesReturn>
|
|
795
688
|
}
|
|
796
689
|
|
|
797
|
-
export interface ListCurrenciesArgs {
|
|
690
|
+
export interface ListCurrenciesArgs {
|
|
691
|
+
}
|
|
798
692
|
|
|
799
693
|
export interface ListCurrenciesReturn {
|
|
800
|
-
currencies: Array<Currency>
|
|
694
|
+
currencies: Array<Currency>
|
|
801
695
|
}
|
|
802
696
|
export interface GetCollectionDetailArgs {
|
|
803
697
|
contractAddress: string
|
|
804
698
|
}
|
|
805
699
|
|
|
806
700
|
export interface GetCollectionDetailReturn {
|
|
807
|
-
collection: Collection
|
|
701
|
+
collection: Collection
|
|
808
702
|
}
|
|
809
703
|
export interface GetCollectibleArgs {
|
|
810
704
|
contractAddress: string
|
|
@@ -812,7 +706,7 @@ export interface GetCollectibleArgs {
|
|
|
812
706
|
}
|
|
813
707
|
|
|
814
708
|
export interface GetCollectibleReturn {
|
|
815
|
-
metadata: TokenMetadata
|
|
709
|
+
metadata: TokenMetadata
|
|
816
710
|
}
|
|
817
711
|
export interface GetLowestPriceOfferForCollectibleArgs {
|
|
818
712
|
contractAddress: string
|
|
@@ -821,7 +715,7 @@ export interface GetLowestPriceOfferForCollectibleArgs {
|
|
|
821
715
|
}
|
|
822
716
|
|
|
823
717
|
export interface GetLowestPriceOfferForCollectibleReturn {
|
|
824
|
-
order: Order
|
|
718
|
+
order: Order
|
|
825
719
|
}
|
|
826
720
|
export interface GetHighestPriceOfferForCollectibleArgs {
|
|
827
721
|
contractAddress: string
|
|
@@ -830,7 +724,7 @@ export interface GetHighestPriceOfferForCollectibleArgs {
|
|
|
830
724
|
}
|
|
831
725
|
|
|
832
726
|
export interface GetHighestPriceOfferForCollectibleReturn {
|
|
833
|
-
order: Order
|
|
727
|
+
order: Order
|
|
834
728
|
}
|
|
835
729
|
export interface GetLowestPriceListingForCollectibleArgs {
|
|
836
730
|
contractAddress: string
|
|
@@ -839,7 +733,7 @@ export interface GetLowestPriceListingForCollectibleArgs {
|
|
|
839
733
|
}
|
|
840
734
|
|
|
841
735
|
export interface GetLowestPriceListingForCollectibleReturn {
|
|
842
|
-
order: Order
|
|
736
|
+
order: Order
|
|
843
737
|
}
|
|
844
738
|
export interface GetHighestPriceListingForCollectibleArgs {
|
|
845
739
|
contractAddress: string
|
|
@@ -848,7 +742,7 @@ export interface GetHighestPriceListingForCollectibleArgs {
|
|
|
848
742
|
}
|
|
849
743
|
|
|
850
744
|
export interface GetHighestPriceListingForCollectibleReturn {
|
|
851
|
-
order: Order
|
|
745
|
+
order: Order
|
|
852
746
|
}
|
|
853
747
|
export interface ListListingsForCollectibleArgs {
|
|
854
748
|
contractAddress: string
|
|
@@ -859,7 +753,7 @@ export interface ListListingsForCollectibleArgs {
|
|
|
859
753
|
|
|
860
754
|
export interface ListListingsForCollectibleReturn {
|
|
861
755
|
listings: Array<Order>
|
|
862
|
-
page?: Page
|
|
756
|
+
page?: Page
|
|
863
757
|
}
|
|
864
758
|
export interface ListOffersForCollectibleArgs {
|
|
865
759
|
contractAddress: string
|
|
@@ -870,7 +764,7 @@ export interface ListOffersForCollectibleArgs {
|
|
|
870
764
|
|
|
871
765
|
export interface ListOffersForCollectibleReturn {
|
|
872
766
|
offers: Array<Order>
|
|
873
|
-
page?: Page
|
|
767
|
+
page?: Page
|
|
874
768
|
}
|
|
875
769
|
export interface GetCountOfListingsForCollectibleArgs {
|
|
876
770
|
contractAddress: string
|
|
@@ -879,7 +773,7 @@ export interface GetCountOfListingsForCollectibleArgs {
|
|
|
879
773
|
}
|
|
880
774
|
|
|
881
775
|
export interface GetCountOfListingsForCollectibleReturn {
|
|
882
|
-
count: number
|
|
776
|
+
count: number
|
|
883
777
|
}
|
|
884
778
|
export interface GetCountOfOffersForCollectibleArgs {
|
|
885
779
|
contractAddress: string
|
|
@@ -888,7 +782,7 @@ export interface GetCountOfOffersForCollectibleArgs {
|
|
|
888
782
|
}
|
|
889
783
|
|
|
890
784
|
export interface GetCountOfOffersForCollectibleReturn {
|
|
891
|
-
count: number
|
|
785
|
+
count: number
|
|
892
786
|
}
|
|
893
787
|
export interface GetCollectibleLowestOfferArgs {
|
|
894
788
|
contractAddress: string
|
|
@@ -897,7 +791,7 @@ export interface GetCollectibleLowestOfferArgs {
|
|
|
897
791
|
}
|
|
898
792
|
|
|
899
793
|
export interface GetCollectibleLowestOfferReturn {
|
|
900
|
-
order?: Order
|
|
794
|
+
order?: Order
|
|
901
795
|
}
|
|
902
796
|
export interface GetCollectibleHighestOfferArgs {
|
|
903
797
|
contractAddress: string
|
|
@@ -906,7 +800,7 @@ export interface GetCollectibleHighestOfferArgs {
|
|
|
906
800
|
}
|
|
907
801
|
|
|
908
802
|
export interface GetCollectibleHighestOfferReturn {
|
|
909
|
-
order?: Order
|
|
803
|
+
order?: Order
|
|
910
804
|
}
|
|
911
805
|
export interface GetCollectibleLowestListingArgs {
|
|
912
806
|
contractAddress: string
|
|
@@ -915,7 +809,7 @@ export interface GetCollectibleLowestListingArgs {
|
|
|
915
809
|
}
|
|
916
810
|
|
|
917
811
|
export interface GetCollectibleLowestListingReturn {
|
|
918
|
-
order?: Order
|
|
812
|
+
order?: Order
|
|
919
813
|
}
|
|
920
814
|
export interface GetCollectibleHighestListingArgs {
|
|
921
815
|
contractAddress: string
|
|
@@ -924,7 +818,7 @@ export interface GetCollectibleHighestListingArgs {
|
|
|
924
818
|
}
|
|
925
819
|
|
|
926
820
|
export interface GetCollectibleHighestListingReturn {
|
|
927
|
-
order?: Order
|
|
821
|
+
order?: Order
|
|
928
822
|
}
|
|
929
823
|
export interface ListCollectibleListingsArgs {
|
|
930
824
|
contractAddress: string
|
|
@@ -935,7 +829,7 @@ export interface ListCollectibleListingsArgs {
|
|
|
935
829
|
|
|
936
830
|
export interface ListCollectibleListingsReturn {
|
|
937
831
|
listings: Array<Order>
|
|
938
|
-
page?: Page
|
|
832
|
+
page?: Page
|
|
939
833
|
}
|
|
940
834
|
export interface ListCollectibleOffersArgs {
|
|
941
835
|
contractAddress: string
|
|
@@ -946,7 +840,7 @@ export interface ListCollectibleOffersArgs {
|
|
|
946
840
|
|
|
947
841
|
export interface ListCollectibleOffersReturn {
|
|
948
842
|
offers: Array<Order>
|
|
949
|
-
page?: Page
|
|
843
|
+
page?: Page
|
|
950
844
|
}
|
|
951
845
|
export interface GenerateBuyTransactionArgs {
|
|
952
846
|
collectionAddress: string
|
|
@@ -958,7 +852,7 @@ export interface GenerateBuyTransactionArgs {
|
|
|
958
852
|
}
|
|
959
853
|
|
|
960
854
|
export interface GenerateBuyTransactionReturn {
|
|
961
|
-
steps: Array<Step>
|
|
855
|
+
steps: Array<Step>
|
|
962
856
|
}
|
|
963
857
|
export interface GenerateSellTransactionArgs {
|
|
964
858
|
collectionAddress: string
|
|
@@ -970,7 +864,7 @@ export interface GenerateSellTransactionArgs {
|
|
|
970
864
|
}
|
|
971
865
|
|
|
972
866
|
export interface GenerateSellTransactionReturn {
|
|
973
|
-
steps: Array<Step>
|
|
867
|
+
steps: Array<Step>
|
|
974
868
|
}
|
|
975
869
|
export interface GenerateListingTransactionArgs {
|
|
976
870
|
collectionAddress: string
|
|
@@ -982,7 +876,7 @@ export interface GenerateListingTransactionArgs {
|
|
|
982
876
|
}
|
|
983
877
|
|
|
984
878
|
export interface GenerateListingTransactionReturn {
|
|
985
|
-
steps: Array<Step>
|
|
879
|
+
steps: Array<Step>
|
|
986
880
|
}
|
|
987
881
|
export interface GenerateOfferTransactionArgs {
|
|
988
882
|
collectionAddress: string
|
|
@@ -994,7 +888,7 @@ export interface GenerateOfferTransactionArgs {
|
|
|
994
888
|
}
|
|
995
889
|
|
|
996
890
|
export interface GenerateOfferTransactionReturn {
|
|
997
|
-
steps: Array<Step>
|
|
891
|
+
steps: Array<Step>
|
|
998
892
|
}
|
|
999
893
|
export interface GenerateCancelTransactionArgs {
|
|
1000
894
|
collectionAddress: string
|
|
@@ -1004,7 +898,7 @@ export interface GenerateCancelTransactionArgs {
|
|
|
1004
898
|
}
|
|
1005
899
|
|
|
1006
900
|
export interface GenerateCancelTransactionReturn {
|
|
1007
|
-
steps: Array<Step>
|
|
901
|
+
steps: Array<Step>
|
|
1008
902
|
}
|
|
1009
903
|
export interface ExecuteArgs {
|
|
1010
904
|
signature: string
|
|
@@ -1015,7 +909,7 @@ export interface ExecuteArgs {
|
|
|
1015
909
|
}
|
|
1016
910
|
|
|
1017
911
|
export interface ExecuteReturn {
|
|
1018
|
-
orderId: string
|
|
912
|
+
orderId: string
|
|
1019
913
|
}
|
|
1020
914
|
export interface ListCollectiblesArgs {
|
|
1021
915
|
side: OrderSide
|
|
@@ -1026,14 +920,14 @@ export interface ListCollectiblesArgs {
|
|
|
1026
920
|
|
|
1027
921
|
export interface ListCollectiblesReturn {
|
|
1028
922
|
collectibles: Array<CollectibleOrder>
|
|
1029
|
-
page?: Page
|
|
923
|
+
page?: Page
|
|
1030
924
|
}
|
|
1031
925
|
export interface GetCountOfAllCollectiblesArgs {
|
|
1032
926
|
contractAddress: string
|
|
1033
927
|
}
|
|
1034
928
|
|
|
1035
929
|
export interface GetCountOfAllCollectiblesReturn {
|
|
1036
|
-
count: number
|
|
930
|
+
count: number
|
|
1037
931
|
}
|
|
1038
932
|
export interface GetCountOfFilteredCollectiblesArgs {
|
|
1039
933
|
side: OrderSide
|
|
@@ -1042,7 +936,7 @@ export interface GetCountOfFilteredCollectiblesArgs {
|
|
|
1042
936
|
}
|
|
1043
937
|
|
|
1044
938
|
export interface GetCountOfFilteredCollectiblesReturn {
|
|
1045
|
-
count: number
|
|
939
|
+
count: number
|
|
1046
940
|
}
|
|
1047
941
|
export interface GetFloorOrderArgs {
|
|
1048
942
|
contractAddress: string
|
|
@@ -1050,7 +944,7 @@ export interface GetFloorOrderArgs {
|
|
|
1050
944
|
}
|
|
1051
945
|
|
|
1052
946
|
export interface GetFloorOrderReturn {
|
|
1053
|
-
collectible: CollectibleOrder
|
|
947
|
+
collectible: CollectibleOrder
|
|
1054
948
|
}
|
|
1055
949
|
export interface ListCollectionActivitiesArgs {
|
|
1056
950
|
contractAddress: string
|
|
@@ -1059,7 +953,7 @@ export interface ListCollectionActivitiesArgs {
|
|
|
1059
953
|
|
|
1060
954
|
export interface ListCollectionActivitiesReturn {
|
|
1061
955
|
activities: Array<Activity>
|
|
1062
|
-
page?: Page
|
|
956
|
+
page?: Page
|
|
1063
957
|
}
|
|
1064
958
|
export interface ListCollectibleActivitiesArgs {
|
|
1065
959
|
contractAddress: string
|
|
@@ -1069,7 +963,7 @@ export interface ListCollectibleActivitiesArgs {
|
|
|
1069
963
|
|
|
1070
964
|
export interface ListCollectibleActivitiesReturn {
|
|
1071
965
|
activities: Array<Activity>
|
|
1072
|
-
page?: Page
|
|
966
|
+
page?: Page
|
|
1073
967
|
}
|
|
1074
968
|
export interface ListCollectiblesWithLowestListingArgs {
|
|
1075
969
|
contractAddress: string
|
|
@@ -1079,7 +973,7 @@ export interface ListCollectiblesWithLowestListingArgs {
|
|
|
1079
973
|
|
|
1080
974
|
export interface ListCollectiblesWithLowestListingReturn {
|
|
1081
975
|
collectibles: Array<CollectibleOrder>
|
|
1082
|
-
page?: Page
|
|
976
|
+
page?: Page
|
|
1083
977
|
}
|
|
1084
978
|
export interface ListCollectiblesWithHighestOfferArgs {
|
|
1085
979
|
contractAddress: string
|
|
@@ -1089,18 +983,20 @@ export interface ListCollectiblesWithHighestOfferArgs {
|
|
|
1089
983
|
|
|
1090
984
|
export interface ListCollectiblesWithHighestOfferReturn {
|
|
1091
985
|
collectibles: Array<CollectibleOrder>
|
|
1092
|
-
page?: Page
|
|
986
|
+
page?: Page
|
|
1093
987
|
}
|
|
1094
988
|
export interface SyncOrderArgs {
|
|
1095
989
|
order: Order
|
|
1096
990
|
}
|
|
1097
991
|
|
|
1098
|
-
export interface SyncOrderReturn {
|
|
992
|
+
export interface SyncOrderReturn {
|
|
993
|
+
}
|
|
1099
994
|
export interface SyncOrdersArgs {
|
|
1100
995
|
orders: Array<Order>
|
|
1101
996
|
}
|
|
1102
997
|
|
|
1103
|
-
export interface SyncOrdersReturn {
|
|
998
|
+
export interface SyncOrdersReturn {
|
|
999
|
+
}
|
|
1104
1000
|
export interface GetOrdersArgs {
|
|
1105
1001
|
input: Array<GetOrdersInput>
|
|
1106
1002
|
page?: Page
|
|
@@ -1108,7 +1004,7 @@ export interface GetOrdersArgs {
|
|
|
1108
1004
|
|
|
1109
1005
|
export interface GetOrdersReturn {
|
|
1110
1006
|
orders: Array<Order>
|
|
1111
|
-
page?: Page
|
|
1007
|
+
page?: Page
|
|
1112
1008
|
}
|
|
1113
1009
|
export interface CheckoutOptionsMarketplaceArgs {
|
|
1114
1010
|
wallet: string
|
|
@@ -1117,7 +1013,7 @@ export interface CheckoutOptionsMarketplaceArgs {
|
|
|
1117
1013
|
}
|
|
1118
1014
|
|
|
1119
1015
|
export interface CheckoutOptionsMarketplaceReturn {
|
|
1120
|
-
options: CheckoutOptions
|
|
1016
|
+
options: CheckoutOptions
|
|
1121
1017
|
}
|
|
1122
1018
|
export interface CheckoutOptionsSalesContractArgs {
|
|
1123
1019
|
wallet: string
|
|
@@ -1127,9 +1023,17 @@ export interface CheckoutOptionsSalesContractArgs {
|
|
|
1127
1023
|
}
|
|
1128
1024
|
|
|
1129
1025
|
export interface CheckoutOptionsSalesContractReturn {
|
|
1130
|
-
options: CheckoutOptions
|
|
1026
|
+
options: CheckoutOptions
|
|
1027
|
+
}
|
|
1028
|
+
export interface SupportedMarketplacesArgs {
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
export interface SupportedMarketplacesReturn {
|
|
1032
|
+
marketplaces: Array<MarketplaceKind>
|
|
1131
1033
|
}
|
|
1132
1034
|
|
|
1035
|
+
|
|
1036
|
+
|
|
1133
1037
|
//
|
|
1134
1038
|
// Client
|
|
1135
1039
|
//
|
|
@@ -1146,172 +1050,163 @@ export class Admin implements Admin {
|
|
|
1146
1050
|
private url(name: string): string {
|
|
1147
1051
|
return this.hostname + this.path + name
|
|
1148
1052
|
}
|
|
1149
|
-
|
|
1053
|
+
|
|
1150
1054
|
createCollection = (args: CreateCollectionArgs, headers?: object, signal?: AbortSignal): Promise<CreateCollectionReturn> => {
|
|
1151
|
-
return this.fetch(
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
}
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
)
|
|
1055
|
+
return this.fetch(
|
|
1056
|
+
this.url('CreateCollection'),
|
|
1057
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1058
|
+
return buildResponse(res).then(_data => {
|
|
1059
|
+
return {
|
|
1060
|
+
collection: <Collection>(_data.collection),
|
|
1061
|
+
}
|
|
1062
|
+
})
|
|
1063
|
+
}, (error) => {
|
|
1064
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1065
|
+
})
|
|
1163
1066
|
}
|
|
1164
|
-
|
|
1067
|
+
|
|
1165
1068
|
getCollection = (args: GetCollectionArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectionReturn> => {
|
|
1166
|
-
return this.fetch(
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
)
|
|
1069
|
+
return this.fetch(
|
|
1070
|
+
this.url('GetCollection'),
|
|
1071
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1072
|
+
return buildResponse(res).then(_data => {
|
|
1073
|
+
return {
|
|
1074
|
+
collection: <Collection>(_data.collection),
|
|
1075
|
+
}
|
|
1076
|
+
})
|
|
1077
|
+
}, (error) => {
|
|
1078
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1079
|
+
})
|
|
1178
1080
|
}
|
|
1179
|
-
|
|
1081
|
+
|
|
1180
1082
|
updateCollection = (args: UpdateCollectionArgs, headers?: object, signal?: AbortSignal): Promise<UpdateCollectionReturn> => {
|
|
1181
|
-
return this.fetch(
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
)
|
|
1083
|
+
return this.fetch(
|
|
1084
|
+
this.url('UpdateCollection'),
|
|
1085
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1086
|
+
return buildResponse(res).then(_data => {
|
|
1087
|
+
return {
|
|
1088
|
+
collection: <Collection>(_data.collection),
|
|
1089
|
+
}
|
|
1090
|
+
})
|
|
1091
|
+
}, (error) => {
|
|
1092
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1093
|
+
})
|
|
1193
1094
|
}
|
|
1194
|
-
|
|
1095
|
+
|
|
1195
1096
|
listCollections = (args: ListCollectionsArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectionsReturn> => {
|
|
1196
|
-
return this.fetch(
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
)
|
|
1097
|
+
return this.fetch(
|
|
1098
|
+
this.url('ListCollections'),
|
|
1099
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1100
|
+
return buildResponse(res).then(_data => {
|
|
1101
|
+
return {
|
|
1102
|
+
collections: <Array<Collection>>(_data.collections),
|
|
1103
|
+
page: <Page>(_data.page),
|
|
1104
|
+
}
|
|
1105
|
+
})
|
|
1106
|
+
}, (error) => {
|
|
1107
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1108
|
+
})
|
|
1209
1109
|
}
|
|
1210
|
-
|
|
1110
|
+
|
|
1211
1111
|
deleteCollection = (args: DeleteCollectionArgs, headers?: object, signal?: AbortSignal): Promise<DeleteCollectionReturn> => {
|
|
1212
|
-
return this.fetch(
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
)
|
|
1112
|
+
return this.fetch(
|
|
1113
|
+
this.url('DeleteCollection'),
|
|
1114
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1115
|
+
return buildResponse(res).then(_data => {
|
|
1116
|
+
return {
|
|
1117
|
+
collection: <Collection>(_data.collection),
|
|
1118
|
+
}
|
|
1119
|
+
})
|
|
1120
|
+
}, (error) => {
|
|
1121
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1122
|
+
})
|
|
1224
1123
|
}
|
|
1225
|
-
|
|
1124
|
+
|
|
1226
1125
|
syncCollection = (args: SyncCollectionArgs, headers?: object, signal?: AbortSignal): Promise<SyncCollectionReturn> => {
|
|
1227
|
-
return this.fetch(
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
)
|
|
1126
|
+
return this.fetch(
|
|
1127
|
+
this.url('SyncCollection'),
|
|
1128
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1129
|
+
return buildResponse(res).then(_data => {
|
|
1130
|
+
return {
|
|
1131
|
+
collection: <Collection>(_data.collection),
|
|
1132
|
+
}
|
|
1133
|
+
})
|
|
1134
|
+
}, (error) => {
|
|
1135
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1136
|
+
})
|
|
1239
1137
|
}
|
|
1240
|
-
|
|
1138
|
+
|
|
1241
1139
|
createCurrency = (args: CreateCurrencyArgs, headers?: object, signal?: AbortSignal): Promise<CreateCurrencyReturn> => {
|
|
1242
|
-
return this.fetch(
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
}
|
|
1249
|
-
}
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
)
|
|
1140
|
+
return this.fetch(
|
|
1141
|
+
this.url('CreateCurrency'),
|
|
1142
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1143
|
+
return buildResponse(res).then(_data => {
|
|
1144
|
+
return {
|
|
1145
|
+
currency: <Currency>(_data.currency),
|
|
1146
|
+
}
|
|
1147
|
+
})
|
|
1148
|
+
}, (error) => {
|
|
1149
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1150
|
+
})
|
|
1254
1151
|
}
|
|
1255
|
-
|
|
1152
|
+
|
|
1256
1153
|
createCurrencies = (args: CreateCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise<CreateCurrenciesReturn> => {
|
|
1257
|
-
return this.fetch(
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
)
|
|
1154
|
+
return this.fetch(
|
|
1155
|
+
this.url('CreateCurrencies'),
|
|
1156
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1157
|
+
return buildResponse(res).then(_data => {
|
|
1158
|
+
return {
|
|
1159
|
+
currency: <{[key: string]: Currency}>(_data.currency),
|
|
1160
|
+
}
|
|
1161
|
+
})
|
|
1162
|
+
}, (error) => {
|
|
1163
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1164
|
+
})
|
|
1269
1165
|
}
|
|
1270
|
-
|
|
1166
|
+
|
|
1271
1167
|
updateCurrency = (args: UpdateCurrencyArgs, headers?: object, signal?: AbortSignal): Promise<UpdateCurrencyReturn> => {
|
|
1272
|
-
return this.fetch(
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
)
|
|
1168
|
+
return this.fetch(
|
|
1169
|
+
this.url('UpdateCurrency'),
|
|
1170
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1171
|
+
return buildResponse(res).then(_data => {
|
|
1172
|
+
return {
|
|
1173
|
+
currency: <Currency>(_data.currency),
|
|
1174
|
+
}
|
|
1175
|
+
})
|
|
1176
|
+
}, (error) => {
|
|
1177
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1178
|
+
})
|
|
1284
1179
|
}
|
|
1285
|
-
|
|
1180
|
+
|
|
1286
1181
|
listCurrencies = (headers?: object, signal?: AbortSignal): Promise<ListCurrenciesReturn> => {
|
|
1287
|
-
return this.fetch(
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
}
|
|
1298
|
-
)
|
|
1182
|
+
return this.fetch(
|
|
1183
|
+
this.url('ListCurrencies'),
|
|
1184
|
+
createHTTPRequest({}, headers, signal)
|
|
1185
|
+
).then((res) => {
|
|
1186
|
+
return buildResponse(res).then(_data => {
|
|
1187
|
+
return {
|
|
1188
|
+
currencies: <Array<Currency>>(_data.currencies),
|
|
1189
|
+
}
|
|
1190
|
+
})
|
|
1191
|
+
}, (error) => {
|
|
1192
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1193
|
+
})
|
|
1299
1194
|
}
|
|
1300
|
-
|
|
1195
|
+
|
|
1301
1196
|
deleteCurrency = (args: DeleteCurrencyArgs, headers?: object, signal?: AbortSignal): Promise<DeleteCurrencyReturn> => {
|
|
1302
|
-
return this.fetch(
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
}
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
)
|
|
1197
|
+
return this.fetch(
|
|
1198
|
+
this.url('DeleteCurrency'),
|
|
1199
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1200
|
+
return buildResponse(res).then(_data => {
|
|
1201
|
+
return {
|
|
1202
|
+
currency: <Currency>(_data.currency),
|
|
1203
|
+
}
|
|
1204
|
+
})
|
|
1205
|
+
}, (error) => {
|
|
1206
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1207
|
+
})
|
|
1314
1208
|
}
|
|
1209
|
+
|
|
1315
1210
|
}
|
|
1316
1211
|
export class Marketplace implements Marketplace {
|
|
1317
1212
|
protected hostname: string
|
|
@@ -1326,668 +1221,537 @@ export class Marketplace implements Marketplace {
|
|
|
1326
1221
|
private url(name: string): string {
|
|
1327
1222
|
return this.hostname + this.path + name
|
|
1328
1223
|
}
|
|
1329
|
-
|
|
1224
|
+
|
|
1330
1225
|
listCurrencies = (headers?: object, signal?: AbortSignal): Promise<ListCurrenciesReturn> => {
|
|
1331
|
-
return this.fetch(
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
}
|
|
1342
|
-
)
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
getCollectionDetail = (
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
},
|
|
1358
|
-
error => {
|
|
1359
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1360
|
-
}
|
|
1361
|
-
)
|
|
1226
|
+
return this.fetch(
|
|
1227
|
+
this.url('ListCurrencies'),
|
|
1228
|
+
createHTTPRequest({}, headers, signal)
|
|
1229
|
+
).then((res) => {
|
|
1230
|
+
return buildResponse(res).then(_data => {
|
|
1231
|
+
return {
|
|
1232
|
+
currencies: <Array<Currency>>(_data.currencies),
|
|
1233
|
+
}
|
|
1234
|
+
})
|
|
1235
|
+
}, (error) => {
|
|
1236
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1237
|
+
})
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
getCollectionDetail = (args: GetCollectionDetailArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectionDetailReturn> => {
|
|
1241
|
+
return this.fetch(
|
|
1242
|
+
this.url('GetCollectionDetail'),
|
|
1243
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1244
|
+
return buildResponse(res).then(_data => {
|
|
1245
|
+
return {
|
|
1246
|
+
collection: <Collection>(_data.collection),
|
|
1247
|
+
}
|
|
1248
|
+
})
|
|
1249
|
+
}, (error) => {
|
|
1250
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1251
|
+
})
|
|
1362
1252
|
}
|
|
1363
|
-
|
|
1253
|
+
|
|
1364
1254
|
getCollectible = (args: GetCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectibleReturn> => {
|
|
1365
|
-
return this.fetch(
|
|
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
|
-
res => {
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
error
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
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
|
-
res => {
|
|
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
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
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
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
res => {
|
|
1597
|
-
return
|
|
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
|
-
generateBuyTransaction = (
|
|
1650
|
-
args: GenerateBuyTransactionArgs,
|
|
1651
|
-
headers?: object,
|
|
1652
|
-
signal?: AbortSignal
|
|
1653
|
-
): Promise<GenerateBuyTransactionReturn> => {
|
|
1654
|
-
return this.fetch(this.url('GenerateBuyTransaction'), createHTTPRequest(args, headers, signal)).then(
|
|
1655
|
-
res => {
|
|
1656
|
-
return buildResponse(res).then(_data => {
|
|
1657
|
-
return {
|
|
1658
|
-
steps: <Array<Step>>_data.steps
|
|
1659
|
-
}
|
|
1660
|
-
})
|
|
1661
|
-
},
|
|
1662
|
-
error => {
|
|
1663
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1664
|
-
}
|
|
1665
|
-
)
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
generateSellTransaction = (
|
|
1669
|
-
args: GenerateSellTransactionArgs,
|
|
1670
|
-
headers?: object,
|
|
1671
|
-
signal?: AbortSignal
|
|
1672
|
-
): Promise<GenerateSellTransactionReturn> => {
|
|
1673
|
-
return this.fetch(this.url('GenerateSellTransaction'), createHTTPRequest(args, headers, signal)).then(
|
|
1674
|
-
res => {
|
|
1675
|
-
return buildResponse(res).then(_data => {
|
|
1676
|
-
return {
|
|
1677
|
-
steps: <Array<Step>>_data.steps
|
|
1678
|
-
}
|
|
1679
|
-
})
|
|
1680
|
-
},
|
|
1681
|
-
error => {
|
|
1682
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1683
|
-
}
|
|
1684
|
-
)
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
generateListingTransaction = (
|
|
1688
|
-
args: GenerateListingTransactionArgs,
|
|
1689
|
-
headers?: object,
|
|
1690
|
-
signal?: AbortSignal
|
|
1691
|
-
): Promise<GenerateListingTransactionReturn> => {
|
|
1692
|
-
return this.fetch(this.url('GenerateListingTransaction'), createHTTPRequest(args, headers, signal)).then(
|
|
1693
|
-
res => {
|
|
1694
|
-
return buildResponse(res).then(_data => {
|
|
1695
|
-
return {
|
|
1696
|
-
steps: <Array<Step>>_data.steps
|
|
1697
|
-
}
|
|
1698
|
-
})
|
|
1699
|
-
},
|
|
1700
|
-
error => {
|
|
1701
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1702
|
-
}
|
|
1703
|
-
)
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
|
-
generateOfferTransaction = (
|
|
1707
|
-
args: GenerateOfferTransactionArgs,
|
|
1708
|
-
headers?: object,
|
|
1709
|
-
signal?: AbortSignal
|
|
1710
|
-
): Promise<GenerateOfferTransactionReturn> => {
|
|
1711
|
-
return this.fetch(this.url('GenerateOfferTransaction'), createHTTPRequest(args, headers, signal)).then(
|
|
1712
|
-
res => {
|
|
1713
|
-
return buildResponse(res).then(_data => {
|
|
1714
|
-
return {
|
|
1715
|
-
steps: <Array<Step>>_data.steps
|
|
1716
|
-
}
|
|
1717
|
-
})
|
|
1718
|
-
},
|
|
1719
|
-
error => {
|
|
1720
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1721
|
-
}
|
|
1722
|
-
)
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
generateCancelTransaction = (
|
|
1726
|
-
args: GenerateCancelTransactionArgs,
|
|
1727
|
-
headers?: object,
|
|
1728
|
-
signal?: AbortSignal
|
|
1729
|
-
): Promise<GenerateCancelTransactionReturn> => {
|
|
1730
|
-
return this.fetch(this.url('GenerateCancelTransaction'), createHTTPRequest(args, headers, signal)).then(
|
|
1731
|
-
res => {
|
|
1732
|
-
return buildResponse(res).then(_data => {
|
|
1733
|
-
return {
|
|
1734
|
-
steps: <Array<Step>>_data.steps
|
|
1735
|
-
}
|
|
1736
|
-
})
|
|
1737
|
-
},
|
|
1738
|
-
error => {
|
|
1739
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1740
|
-
}
|
|
1741
|
-
)
|
|
1255
|
+
return this.fetch(
|
|
1256
|
+
this.url('GetCollectible'),
|
|
1257
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1258
|
+
return buildResponse(res).then(_data => {
|
|
1259
|
+
return {
|
|
1260
|
+
metadata: <TokenMetadata>(_data.metadata),
|
|
1261
|
+
}
|
|
1262
|
+
})
|
|
1263
|
+
}, (error) => {
|
|
1264
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1265
|
+
})
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
getLowestPriceOfferForCollectible = (args: GetLowestPriceOfferForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetLowestPriceOfferForCollectibleReturn> => {
|
|
1269
|
+
return this.fetch(
|
|
1270
|
+
this.url('GetLowestPriceOfferForCollectible'),
|
|
1271
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1272
|
+
return buildResponse(res).then(_data => {
|
|
1273
|
+
return {
|
|
1274
|
+
order: <Order>(_data.order),
|
|
1275
|
+
}
|
|
1276
|
+
})
|
|
1277
|
+
}, (error) => {
|
|
1278
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1279
|
+
})
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
getHighestPriceOfferForCollectible = (args: GetHighestPriceOfferForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetHighestPriceOfferForCollectibleReturn> => {
|
|
1283
|
+
return this.fetch(
|
|
1284
|
+
this.url('GetHighestPriceOfferForCollectible'),
|
|
1285
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1286
|
+
return buildResponse(res).then(_data => {
|
|
1287
|
+
return {
|
|
1288
|
+
order: <Order>(_data.order),
|
|
1289
|
+
}
|
|
1290
|
+
})
|
|
1291
|
+
}, (error) => {
|
|
1292
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1293
|
+
})
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
getLowestPriceListingForCollectible = (args: GetLowestPriceListingForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetLowestPriceListingForCollectibleReturn> => {
|
|
1297
|
+
return this.fetch(
|
|
1298
|
+
this.url('GetLowestPriceListingForCollectible'),
|
|
1299
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1300
|
+
return buildResponse(res).then(_data => {
|
|
1301
|
+
return {
|
|
1302
|
+
order: <Order>(_data.order),
|
|
1303
|
+
}
|
|
1304
|
+
})
|
|
1305
|
+
}, (error) => {
|
|
1306
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1307
|
+
})
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
getHighestPriceListingForCollectible = (args: GetHighestPriceListingForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetHighestPriceListingForCollectibleReturn> => {
|
|
1311
|
+
return this.fetch(
|
|
1312
|
+
this.url('GetHighestPriceListingForCollectible'),
|
|
1313
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1314
|
+
return buildResponse(res).then(_data => {
|
|
1315
|
+
return {
|
|
1316
|
+
order: <Order>(_data.order),
|
|
1317
|
+
}
|
|
1318
|
+
})
|
|
1319
|
+
}, (error) => {
|
|
1320
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1321
|
+
})
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
listListingsForCollectible = (args: ListListingsForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<ListListingsForCollectibleReturn> => {
|
|
1325
|
+
return this.fetch(
|
|
1326
|
+
this.url('ListListingsForCollectible'),
|
|
1327
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1328
|
+
return buildResponse(res).then(_data => {
|
|
1329
|
+
return {
|
|
1330
|
+
listings: <Array<Order>>(_data.listings),
|
|
1331
|
+
page: <Page>(_data.page),
|
|
1332
|
+
}
|
|
1333
|
+
})
|
|
1334
|
+
}, (error) => {
|
|
1335
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1336
|
+
})
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
listOffersForCollectible = (args: ListOffersForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<ListOffersForCollectibleReturn> => {
|
|
1340
|
+
return this.fetch(
|
|
1341
|
+
this.url('ListOffersForCollectible'),
|
|
1342
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1343
|
+
return buildResponse(res).then(_data => {
|
|
1344
|
+
return {
|
|
1345
|
+
offers: <Array<Order>>(_data.offers),
|
|
1346
|
+
page: <Page>(_data.page),
|
|
1347
|
+
}
|
|
1348
|
+
})
|
|
1349
|
+
}, (error) => {
|
|
1350
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1351
|
+
})
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
getCountOfListingsForCollectible = (args: GetCountOfListingsForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetCountOfListingsForCollectibleReturn> => {
|
|
1355
|
+
return this.fetch(
|
|
1356
|
+
this.url('GetCountOfListingsForCollectible'),
|
|
1357
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1358
|
+
return buildResponse(res).then(_data => {
|
|
1359
|
+
return {
|
|
1360
|
+
count: <number>(_data.count),
|
|
1361
|
+
}
|
|
1362
|
+
})
|
|
1363
|
+
}, (error) => {
|
|
1364
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1365
|
+
})
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
getCountOfOffersForCollectible = (args: GetCountOfOffersForCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetCountOfOffersForCollectibleReturn> => {
|
|
1369
|
+
return this.fetch(
|
|
1370
|
+
this.url('GetCountOfOffersForCollectible'),
|
|
1371
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1372
|
+
return buildResponse(res).then(_data => {
|
|
1373
|
+
return {
|
|
1374
|
+
count: <number>(_data.count),
|
|
1375
|
+
}
|
|
1376
|
+
})
|
|
1377
|
+
}, (error) => {
|
|
1378
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1379
|
+
})
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
getCollectibleLowestOffer = (args: GetCollectibleLowestOfferArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectibleLowestOfferReturn> => {
|
|
1383
|
+
return this.fetch(
|
|
1384
|
+
this.url('GetCollectibleLowestOffer'),
|
|
1385
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1386
|
+
return buildResponse(res).then(_data => {
|
|
1387
|
+
return {
|
|
1388
|
+
order: <Order>(_data.order),
|
|
1389
|
+
}
|
|
1390
|
+
})
|
|
1391
|
+
}, (error) => {
|
|
1392
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1393
|
+
})
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
getCollectibleHighestOffer = (args: GetCollectibleHighestOfferArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectibleHighestOfferReturn> => {
|
|
1397
|
+
return this.fetch(
|
|
1398
|
+
this.url('GetCollectibleHighestOffer'),
|
|
1399
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1400
|
+
return buildResponse(res).then(_data => {
|
|
1401
|
+
return {
|
|
1402
|
+
order: <Order>(_data.order),
|
|
1403
|
+
}
|
|
1404
|
+
})
|
|
1405
|
+
}, (error) => {
|
|
1406
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1407
|
+
})
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
getCollectibleLowestListing = (args: GetCollectibleLowestListingArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectibleLowestListingReturn> => {
|
|
1411
|
+
return this.fetch(
|
|
1412
|
+
this.url('GetCollectibleLowestListing'),
|
|
1413
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1414
|
+
return buildResponse(res).then(_data => {
|
|
1415
|
+
return {
|
|
1416
|
+
order: <Order>(_data.order),
|
|
1417
|
+
}
|
|
1418
|
+
})
|
|
1419
|
+
}, (error) => {
|
|
1420
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1421
|
+
})
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
getCollectibleHighestListing = (args: GetCollectibleHighestListingArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectibleHighestListingReturn> => {
|
|
1425
|
+
return this.fetch(
|
|
1426
|
+
this.url('GetCollectibleHighestListing'),
|
|
1427
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1428
|
+
return buildResponse(res).then(_data => {
|
|
1429
|
+
return {
|
|
1430
|
+
order: <Order>(_data.order),
|
|
1431
|
+
}
|
|
1432
|
+
})
|
|
1433
|
+
}, (error) => {
|
|
1434
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1435
|
+
})
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
listCollectibleListings = (args: ListCollectibleListingsArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectibleListingsReturn> => {
|
|
1439
|
+
return this.fetch(
|
|
1440
|
+
this.url('ListCollectibleListings'),
|
|
1441
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1442
|
+
return buildResponse(res).then(_data => {
|
|
1443
|
+
return {
|
|
1444
|
+
listings: <Array<Order>>(_data.listings),
|
|
1445
|
+
page: <Page>(_data.page),
|
|
1446
|
+
}
|
|
1447
|
+
})
|
|
1448
|
+
}, (error) => {
|
|
1449
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1450
|
+
})
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
listCollectibleOffers = (args: ListCollectibleOffersArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectibleOffersReturn> => {
|
|
1454
|
+
return this.fetch(
|
|
1455
|
+
this.url('ListCollectibleOffers'),
|
|
1456
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1457
|
+
return buildResponse(res).then(_data => {
|
|
1458
|
+
return {
|
|
1459
|
+
offers: <Array<Order>>(_data.offers),
|
|
1460
|
+
page: <Page>(_data.page),
|
|
1461
|
+
}
|
|
1462
|
+
})
|
|
1463
|
+
}, (error) => {
|
|
1464
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1465
|
+
})
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
generateBuyTransaction = (args: GenerateBuyTransactionArgs, headers?: object, signal?: AbortSignal): Promise<GenerateBuyTransactionReturn> => {
|
|
1469
|
+
return this.fetch(
|
|
1470
|
+
this.url('GenerateBuyTransaction'),
|
|
1471
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1472
|
+
return buildResponse(res).then(_data => {
|
|
1473
|
+
return {
|
|
1474
|
+
steps: <Array<Step>>(_data.steps),
|
|
1475
|
+
}
|
|
1476
|
+
})
|
|
1477
|
+
}, (error) => {
|
|
1478
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1479
|
+
})
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
generateSellTransaction = (args: GenerateSellTransactionArgs, headers?: object, signal?: AbortSignal): Promise<GenerateSellTransactionReturn> => {
|
|
1483
|
+
return this.fetch(
|
|
1484
|
+
this.url('GenerateSellTransaction'),
|
|
1485
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1486
|
+
return buildResponse(res).then(_data => {
|
|
1487
|
+
return {
|
|
1488
|
+
steps: <Array<Step>>(_data.steps),
|
|
1489
|
+
}
|
|
1490
|
+
})
|
|
1491
|
+
}, (error) => {
|
|
1492
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1493
|
+
})
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
generateListingTransaction = (args: GenerateListingTransactionArgs, headers?: object, signal?: AbortSignal): Promise<GenerateListingTransactionReturn> => {
|
|
1497
|
+
return this.fetch(
|
|
1498
|
+
this.url('GenerateListingTransaction'),
|
|
1499
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1500
|
+
return buildResponse(res).then(_data => {
|
|
1501
|
+
return {
|
|
1502
|
+
steps: <Array<Step>>(_data.steps),
|
|
1503
|
+
}
|
|
1504
|
+
})
|
|
1505
|
+
}, (error) => {
|
|
1506
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1507
|
+
})
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
generateOfferTransaction = (args: GenerateOfferTransactionArgs, headers?: object, signal?: AbortSignal): Promise<GenerateOfferTransactionReturn> => {
|
|
1511
|
+
return this.fetch(
|
|
1512
|
+
this.url('GenerateOfferTransaction'),
|
|
1513
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1514
|
+
return buildResponse(res).then(_data => {
|
|
1515
|
+
return {
|
|
1516
|
+
steps: <Array<Step>>(_data.steps),
|
|
1517
|
+
}
|
|
1518
|
+
})
|
|
1519
|
+
}, (error) => {
|
|
1520
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1521
|
+
})
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
generateCancelTransaction = (args: GenerateCancelTransactionArgs, headers?: object, signal?: AbortSignal): Promise<GenerateCancelTransactionReturn> => {
|
|
1525
|
+
return this.fetch(
|
|
1526
|
+
this.url('GenerateCancelTransaction'),
|
|
1527
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1528
|
+
return buildResponse(res).then(_data => {
|
|
1529
|
+
return {
|
|
1530
|
+
steps: <Array<Step>>(_data.steps),
|
|
1531
|
+
}
|
|
1532
|
+
})
|
|
1533
|
+
}, (error) => {
|
|
1534
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1535
|
+
})
|
|
1742
1536
|
}
|
|
1743
|
-
|
|
1537
|
+
|
|
1744
1538
|
execute = (args: ExecuteArgs, headers?: object, signal?: AbortSignal): Promise<ExecuteReturn> => {
|
|
1745
|
-
return this.fetch(
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
)
|
|
1539
|
+
return this.fetch(
|
|
1540
|
+
this.url('Execute'),
|
|
1541
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1542
|
+
return buildResponse(res).then(_data => {
|
|
1543
|
+
return {
|
|
1544
|
+
orderId: <string>(_data.orderId),
|
|
1545
|
+
}
|
|
1546
|
+
})
|
|
1547
|
+
}, (error) => {
|
|
1548
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1549
|
+
})
|
|
1757
1550
|
}
|
|
1758
|
-
|
|
1551
|
+
|
|
1759
1552
|
listCollectibles = (args: ListCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectiblesReturn> => {
|
|
1760
|
-
return this.fetch(
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
res => {
|
|
1801
|
-
return buildResponse(res).then(_data => {
|
|
1802
|
-
return {
|
|
1803
|
-
count: <number>_data.count
|
|
1804
|
-
}
|
|
1805
|
-
})
|
|
1806
|
-
},
|
|
1807
|
-
error => {
|
|
1808
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1809
|
-
}
|
|
1810
|
-
)
|
|
1553
|
+
return this.fetch(
|
|
1554
|
+
this.url('ListCollectibles'),
|
|
1555
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1556
|
+
return buildResponse(res).then(_data => {
|
|
1557
|
+
return {
|
|
1558
|
+
collectibles: <Array<CollectibleOrder>>(_data.collectibles),
|
|
1559
|
+
page: <Page>(_data.page),
|
|
1560
|
+
}
|
|
1561
|
+
})
|
|
1562
|
+
}, (error) => {
|
|
1563
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1564
|
+
})
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
getCountOfAllCollectibles = (args: GetCountOfAllCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise<GetCountOfAllCollectiblesReturn> => {
|
|
1568
|
+
return this.fetch(
|
|
1569
|
+
this.url('GetCountOfAllCollectibles'),
|
|
1570
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1571
|
+
return buildResponse(res).then(_data => {
|
|
1572
|
+
return {
|
|
1573
|
+
count: <number>(_data.count),
|
|
1574
|
+
}
|
|
1575
|
+
})
|
|
1576
|
+
}, (error) => {
|
|
1577
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1578
|
+
})
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
getCountOfFilteredCollectibles = (args: GetCountOfFilteredCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise<GetCountOfFilteredCollectiblesReturn> => {
|
|
1582
|
+
return this.fetch(
|
|
1583
|
+
this.url('GetCountOfFilteredCollectibles'),
|
|
1584
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1585
|
+
return buildResponse(res).then(_data => {
|
|
1586
|
+
return {
|
|
1587
|
+
count: <number>(_data.count),
|
|
1588
|
+
}
|
|
1589
|
+
})
|
|
1590
|
+
}, (error) => {
|
|
1591
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1592
|
+
})
|
|
1811
1593
|
}
|
|
1812
|
-
|
|
1594
|
+
|
|
1813
1595
|
getFloorOrder = (args: GetFloorOrderArgs, headers?: object, signal?: AbortSignal): Promise<GetFloorOrderReturn> => {
|
|
1814
|
-
return this.fetch(
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
): Promise<
|
|
1873
|
-
return this.fetch(
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
}
|
|
1881
|
-
}
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
)
|
|
1886
|
-
}
|
|
1887
|
-
|
|
1888
|
-
listCollectiblesWithHighestOffer = (
|
|
1889
|
-
args: ListCollectiblesWithHighestOfferArgs,
|
|
1890
|
-
headers?: object,
|
|
1891
|
-
signal?: AbortSignal
|
|
1892
|
-
): Promise<ListCollectiblesWithHighestOfferReturn> => {
|
|
1893
|
-
return this.fetch(this.url('ListCollectiblesWithHighestOffer'), createHTTPRequest(args, headers, signal)).then(
|
|
1894
|
-
res => {
|
|
1895
|
-
return buildResponse(res).then(_data => {
|
|
1896
|
-
return {
|
|
1897
|
-
collectibles: <Array<CollectibleOrder>>_data.collectibles,
|
|
1898
|
-
page: <Page>_data.page
|
|
1899
|
-
}
|
|
1900
|
-
})
|
|
1901
|
-
},
|
|
1902
|
-
error => {
|
|
1903
|
-
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1904
|
-
}
|
|
1905
|
-
)
|
|
1596
|
+
return this.fetch(
|
|
1597
|
+
this.url('GetFloorOrder'),
|
|
1598
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1599
|
+
return buildResponse(res).then(_data => {
|
|
1600
|
+
return {
|
|
1601
|
+
collectible: <CollectibleOrder>(_data.collectible),
|
|
1602
|
+
}
|
|
1603
|
+
})
|
|
1604
|
+
}, (error) => {
|
|
1605
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1606
|
+
})
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
listCollectionActivities = (args: ListCollectionActivitiesArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectionActivitiesReturn> => {
|
|
1610
|
+
return this.fetch(
|
|
1611
|
+
this.url('ListCollectionActivities'),
|
|
1612
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1613
|
+
return buildResponse(res).then(_data => {
|
|
1614
|
+
return {
|
|
1615
|
+
activities: <Array<Activity>>(_data.activities),
|
|
1616
|
+
page: <Page>(_data.page),
|
|
1617
|
+
}
|
|
1618
|
+
})
|
|
1619
|
+
}, (error) => {
|
|
1620
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1621
|
+
})
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
listCollectibleActivities = (args: ListCollectibleActivitiesArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectibleActivitiesReturn> => {
|
|
1625
|
+
return this.fetch(
|
|
1626
|
+
this.url('ListCollectibleActivities'),
|
|
1627
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1628
|
+
return buildResponse(res).then(_data => {
|
|
1629
|
+
return {
|
|
1630
|
+
activities: <Array<Activity>>(_data.activities),
|
|
1631
|
+
page: <Page>(_data.page),
|
|
1632
|
+
}
|
|
1633
|
+
})
|
|
1634
|
+
}, (error) => {
|
|
1635
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1636
|
+
})
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
listCollectiblesWithLowestListing = (args: ListCollectiblesWithLowestListingArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectiblesWithLowestListingReturn> => {
|
|
1640
|
+
return this.fetch(
|
|
1641
|
+
this.url('ListCollectiblesWithLowestListing'),
|
|
1642
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1643
|
+
return buildResponse(res).then(_data => {
|
|
1644
|
+
return {
|
|
1645
|
+
collectibles: <Array<CollectibleOrder>>(_data.collectibles),
|
|
1646
|
+
page: <Page>(_data.page),
|
|
1647
|
+
}
|
|
1648
|
+
})
|
|
1649
|
+
}, (error) => {
|
|
1650
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1651
|
+
})
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
listCollectiblesWithHighestOffer = (args: ListCollectiblesWithHighestOfferArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectiblesWithHighestOfferReturn> => {
|
|
1655
|
+
return this.fetch(
|
|
1656
|
+
this.url('ListCollectiblesWithHighestOffer'),
|
|
1657
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1658
|
+
return buildResponse(res).then(_data => {
|
|
1659
|
+
return {
|
|
1660
|
+
collectibles: <Array<CollectibleOrder>>(_data.collectibles),
|
|
1661
|
+
page: <Page>(_data.page),
|
|
1662
|
+
}
|
|
1663
|
+
})
|
|
1664
|
+
}, (error) => {
|
|
1665
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1666
|
+
})
|
|
1906
1667
|
}
|
|
1907
|
-
|
|
1668
|
+
|
|
1908
1669
|
syncOrder = (args: SyncOrderArgs, headers?: object, signal?: AbortSignal): Promise<SyncOrderReturn> => {
|
|
1909
|
-
return this.fetch(
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
}
|
|
1914
|
-
}
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
)
|
|
1670
|
+
return this.fetch(
|
|
1671
|
+
this.url('SyncOrder'),
|
|
1672
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1673
|
+
return buildResponse(res).then(_data => {
|
|
1674
|
+
return {}
|
|
1675
|
+
})
|
|
1676
|
+
}, (error) => {
|
|
1677
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1678
|
+
})
|
|
1919
1679
|
}
|
|
1920
|
-
|
|
1680
|
+
|
|
1921
1681
|
syncOrders = (args: SyncOrdersArgs, headers?: object, signal?: AbortSignal): Promise<SyncOrdersReturn> => {
|
|
1922
|
-
return this.fetch(
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
}
|
|
1927
|
-
}
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
)
|
|
1682
|
+
return this.fetch(
|
|
1683
|
+
this.url('SyncOrders'),
|
|
1684
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1685
|
+
return buildResponse(res).then(_data => {
|
|
1686
|
+
return {}
|
|
1687
|
+
})
|
|
1688
|
+
}, (error) => {
|
|
1689
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1690
|
+
})
|
|
1932
1691
|
}
|
|
1933
|
-
|
|
1692
|
+
|
|
1934
1693
|
getOrders = (args: GetOrdersArgs, headers?: object, signal?: AbortSignal): Promise<GetOrdersReturn> => {
|
|
1935
|
-
return this.fetch(
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
}
|
|
1943
|
-
}
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1694
|
+
return this.fetch(
|
|
1695
|
+
this.url('GetOrders'),
|
|
1696
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1697
|
+
return buildResponse(res).then(_data => {
|
|
1698
|
+
return {
|
|
1699
|
+
orders: <Array<Order>>(_data.orders),
|
|
1700
|
+
page: <Page>(_data.page),
|
|
1701
|
+
}
|
|
1702
|
+
})
|
|
1703
|
+
}, (error) => {
|
|
1704
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1705
|
+
})
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
checkoutOptionsMarketplace = (args: CheckoutOptionsMarketplaceArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsMarketplaceReturn> => {
|
|
1709
|
+
return this.fetch(
|
|
1710
|
+
this.url('CheckoutOptionsMarketplace'),
|
|
1711
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1712
|
+
return buildResponse(res).then(_data => {
|
|
1713
|
+
return {
|
|
1714
|
+
options: <CheckoutOptions>(_data.options),
|
|
1715
|
+
}
|
|
1716
|
+
})
|
|
1717
|
+
}, (error) => {
|
|
1718
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1719
|
+
})
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
checkoutOptionsSalesContract = (args: CheckoutOptionsSalesContractArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsSalesContractReturn> => {
|
|
1723
|
+
return this.fetch(
|
|
1724
|
+
this.url('CheckoutOptionsSalesContract'),
|
|
1725
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
1726
|
+
return buildResponse(res).then(_data => {
|
|
1727
|
+
return {
|
|
1728
|
+
options: <CheckoutOptions>(_data.options),
|
|
1729
|
+
}
|
|
1730
|
+
})
|
|
1731
|
+
}, (error) => {
|
|
1732
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1733
|
+
})
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
supportedMarketplaces = (headers?: object, signal?: AbortSignal): Promise<SupportedMarketplacesReturn> => {
|
|
1737
|
+
return this.fetch(
|
|
1738
|
+
this.url('SupportedMarketplaces'),
|
|
1739
|
+
createHTTPRequest({}, headers, signal)
|
|
1740
|
+
).then((res) => {
|
|
1741
|
+
return buildResponse(res).then(_data => {
|
|
1742
|
+
return {
|
|
1743
|
+
marketplaces: <Array<MarketplaceKind>>(_data.marketplaces),
|
|
1744
|
+
}
|
|
1745
|
+
})
|
|
1746
|
+
}, (error) => {
|
|
1747
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1748
|
+
})
|
|
1986
1749
|
}
|
|
1750
|
+
|
|
1987
1751
|
}
|
|
1988
1752
|
|
|
1989
|
-
const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => {
|
|
1990
|
-
const reqHeaders: {
|
|
1753
|
+
const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => {
|
|
1754
|
+
const reqHeaders: {[key: string]: string} = { ...headers, 'Content-Type': 'application/json' }
|
|
1991
1755
|
reqHeaders[WebrpcHeader] = WebrpcHeaderValue
|
|
1992
1756
|
|
|
1993
1757
|
return {
|
|
@@ -2003,18 +1767,18 @@ const buildResponse = (res: Response): Promise<any> => {
|
|
|
2003
1767
|
let data
|
|
2004
1768
|
try {
|
|
2005
1769
|
data = JSON.parse(text)
|
|
2006
|
-
} catch
|
|
1770
|
+
} catch(error) {
|
|
2007
1771
|
let message = ''
|
|
2008
|
-
if (error instanceof Error)
|
|
1772
|
+
if (error instanceof Error) {
|
|
2009
1773
|
message = error.message
|
|
2010
1774
|
}
|
|
2011
1775
|
throw WebrpcBadResponseError.new({
|
|
2012
1776
|
status: res.status,
|
|
2013
|
-
cause: `JSON.parse(): ${message}: response text: ${text}`
|
|
2014
|
-
|
|
1777
|
+
cause: `JSON.parse(): ${message}: response text: ${text}`},
|
|
1778
|
+
)
|
|
2015
1779
|
}
|
|
2016
1780
|
if (!res.ok) {
|
|
2017
|
-
const code: number = typeof data.code === 'number' ? data.code : 0
|
|
1781
|
+
const code: number = (typeof data.code === 'number') ? data.code : 0
|
|
2018
1782
|
throw (webrpcErrorByCode[code] || WebrpcError).new(data)
|
|
2019
1783
|
}
|
|
2020
1784
|
return data
|
|
@@ -2196,6 +1960,7 @@ export class WebrpcStreamFinishedError extends WebrpcError {
|
|
|
2196
1960
|
}
|
|
2197
1961
|
}
|
|
2198
1962
|
|
|
1963
|
+
|
|
2199
1964
|
// Schema errors
|
|
2200
1965
|
|
|
2201
1966
|
export class UnauthorizedError extends WebrpcError {
|
|
@@ -2354,6 +2119,7 @@ export class NotImplementedError extends WebrpcError {
|
|
|
2354
2119
|
}
|
|
2355
2120
|
}
|
|
2356
2121
|
|
|
2122
|
+
|
|
2357
2123
|
export enum errors {
|
|
2358
2124
|
WebrpcEndpoint = 'WebrpcEndpoint',
|
|
2359
2125
|
WebrpcRequestFailed = 'WebrpcRequestFailed',
|
|
@@ -2377,7 +2143,7 @@ export enum errors {
|
|
|
2377
2143
|
ProjectNotFound = 'ProjectNotFound',
|
|
2378
2144
|
InvalidTier = 'InvalidTier',
|
|
2379
2145
|
ProjectLimitReached = 'ProjectLimitReached',
|
|
2380
|
-
NotImplemented = 'NotImplemented'
|
|
2146
|
+
NotImplemented = 'NotImplemented',
|
|
2381
2147
|
}
|
|
2382
2148
|
|
|
2383
2149
|
export enum WebrpcErrorCodes {
|
|
@@ -2403,7 +2169,7 @@ export enum WebrpcErrorCodes {
|
|
|
2403
2169
|
ProjectNotFound = 3002,
|
|
2404
2170
|
InvalidTier = 3003,
|
|
2405
2171
|
ProjectLimitReached = 3005,
|
|
2406
|
-
NotImplemented = 9999
|
|
2172
|
+
NotImplemented = 9999,
|
|
2407
2173
|
}
|
|
2408
2174
|
|
|
2409
2175
|
export const webrpcErrorByCode: { [code: number]: any } = {
|
|
@@ -2429,7 +2195,8 @@ export const webrpcErrorByCode: { [code: number]: any } = {
|
|
|
2429
2195
|
[3002]: ProjectNotFoundError,
|
|
2430
2196
|
[3003]: InvalidTierError,
|
|
2431
2197
|
[3005]: ProjectLimitReachedError,
|
|
2432
|
-
[9999]: NotImplementedError
|
|
2198
|
+
[9999]: NotImplementedError,
|
|
2433
2199
|
}
|
|
2434
2200
|
|
|
2435
2201
|
export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response>
|
|
2202
|
+
|