@0xsequence/marketplace 2.3.34 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,7 +35,7 @@ export function VersionFromHeader(headers: Headers): WebrpcGenVersions {
35
35
  codeGenName: '',
36
36
  codeGenVersion: '',
37
37
  schemaName: '',
38
- schemaVersion: ''
38
+ schemaVersion: '',
39
39
  }
40
40
  }
41
41
 
@@ -50,7 +50,7 @@ function parseWebrpcGenVersions(header: string): WebrpcGenVersions {
50
50
  codeGenName: '',
51
51
  codeGenVersion: '',
52
52
  schemaName: '',
53
- schemaVersion: ''
53
+ schemaVersion: '',
54
54
  }
55
55
  }
56
56
 
@@ -63,7 +63,7 @@ function parseWebrpcGenVersions(header: string): WebrpcGenVersions {
63
63
  codeGenName: codeGenName ?? '',
64
64
  codeGenVersion: codeGenVersion ?? '',
65
65
  schemaName: schemaName ?? '',
66
- schemaVersion: schemaVersion ?? ''
66
+ schemaVersion: schemaVersion ?? '',
67
67
  }
68
68
  }
69
69
 
@@ -73,14 +73,14 @@ function parseWebrpcGenVersions(header: string): WebrpcGenVersions {
73
73
 
74
74
  export enum SortOrder {
75
75
  ASC = 'ASC',
76
- DESC = 'DESC'
76
+ DESC = 'DESC',
77
77
  }
78
78
 
79
79
  export enum PropertyType {
80
80
  INT = 'INT',
81
81
  STRING = 'STRING',
82
82
  ARRAY = 'ARRAY',
83
- GENERIC = 'GENERIC'
83
+ GENERIC = 'GENERIC',
84
84
  }
85
85
 
86
86
  export enum MarketplaceKind {
@@ -95,7 +95,7 @@ export enum MarketplaceKind {
95
95
  alienswap = 'alienswap',
96
96
  payment_processor = 'payment_processor',
97
97
  mintify = 'mintify',
98
- magic_eden = 'magic_eden'
98
+ magic_eden = 'magic_eden',
99
99
  }
100
100
 
101
101
  export enum OrderbookKind {
@@ -107,7 +107,7 @@ export enum OrderbookKind {
107
107
  looks_rare = 'looks_rare',
108
108
  reservoir = 'reservoir',
109
109
  x2y2 = 'x2y2',
110
- magic_eden = 'magic_eden'
110
+ magic_eden = 'magic_eden',
111
111
  }
112
112
 
113
113
  export enum SourceKind {
@@ -116,19 +116,19 @@ export enum SourceKind {
116
116
  sequence_marketplace_v1 = 'sequence_marketplace_v1',
117
117
  sequence_marketplace_v2 = 'sequence_marketplace_v2',
118
118
  opensea = 'opensea',
119
- magic_eden = 'magic_eden'
119
+ magic_eden = 'magic_eden',
120
120
  }
121
121
 
122
122
  export enum OrderSide {
123
123
  unknown = 'unknown',
124
124
  listing = 'listing',
125
- offer = 'offer'
125
+ offer = 'offer',
126
126
  }
127
127
 
128
128
  export enum OfferType {
129
129
  unknown = 'unknown',
130
130
  item = 'item',
131
- collection = 'collection'
131
+ collection = 'collection',
132
132
  }
133
133
 
134
134
  export enum OrderStatus {
@@ -138,21 +138,21 @@ export enum OrderStatus {
138
138
  expired = 'expired',
139
139
  cancelled = 'cancelled',
140
140
  filled = 'filled',
141
- decimals_missing = 'decimals_missing'
141
+ decimals_missing = 'decimals_missing',
142
142
  }
143
143
 
144
144
  export enum ContractType {
145
145
  UNKNOWN = 'UNKNOWN',
146
146
  ERC20 = 'ERC20',
147
147
  ERC721 = 'ERC721',
148
- ERC1155 = 'ERC1155'
148
+ ERC1155 = 'ERC1155',
149
149
  }
150
150
 
151
151
  export enum CollectionPriority {
152
152
  unknown = 'unknown',
153
153
  low = 'low',
154
154
  normal = 'normal',
155
- high = 'high'
155
+ high = 'high',
156
156
  }
157
157
 
158
158
  export enum CollectionStatus {
@@ -162,13 +162,13 @@ export enum CollectionStatus {
162
162
  active = 'active',
163
163
  failed = 'failed',
164
164
  inactive = 'inactive',
165
- incompatible_type = 'incompatible_type'
165
+ incompatible_type = 'incompatible_type',
166
166
  }
167
167
 
168
168
  export enum ProjectStatus {
169
169
  unknown = 'unknown',
170
170
  active = 'active',
171
- inactive = 'inactive'
171
+ inactive = 'inactive',
172
172
  }
173
173
 
174
174
  export enum ItemsContractStatus {
@@ -180,19 +180,19 @@ export enum ItemsContractStatus {
180
180
  synced_tokens = 'synced_tokens',
181
181
  active = 'active',
182
182
  inactive = 'inactive',
183
- incompatible_type = 'incompatible_type'
183
+ incompatible_type = 'incompatible_type',
184
184
  }
185
185
 
186
186
  export enum CollectibleStatus {
187
187
  unknown = 'unknown',
188
188
  active = 'active',
189
- inactive = 'inactive'
189
+ inactive = 'inactive',
190
190
  }
191
191
 
192
192
  export enum CollectibleSource {
193
193
  unknown = 'unknown',
194
194
  indexer = 'indexer',
195
- manual = 'manual'
195
+ manual = 'manual',
196
196
  }
197
197
 
198
198
  export enum CurrencyStatus {
@@ -200,12 +200,12 @@ export enum CurrencyStatus {
200
200
  created = 'created',
201
201
  syncing_metadata = 'syncing_metadata',
202
202
  active = 'active',
203
- failed = 'failed'
203
+ failed = 'failed',
204
204
  }
205
205
 
206
206
  export enum WalletKind {
207
207
  unknown = 'unknown',
208
- sequence = 'sequence'
208
+ sequence = 'sequence',
209
209
  }
210
210
 
211
211
  export enum StepType {
@@ -217,30 +217,30 @@ export enum StepType {
217
217
  createOffer = 'createOffer',
218
218
  signEIP712 = 'signEIP712',
219
219
  signEIP191 = 'signEIP191',
220
- cancel = 'cancel'
220
+ cancel = 'cancel',
221
221
  }
222
222
 
223
223
  export enum TransactionCrypto {
224
224
  none = 'none',
225
225
  partially = 'partially',
226
- all = 'all'
226
+ all = 'all',
227
227
  }
228
228
 
229
229
  export enum TransactionNFTCheckoutProvider {
230
230
  unknown = 'unknown',
231
231
  transak = 'transak',
232
- sardine = 'sardine'
232
+ sardine = 'sardine',
233
233
  }
234
234
 
235
235
  export enum TransactionOnRampProvider {
236
236
  unknown = 'unknown',
237
237
  transak = 'transak',
238
- sardine = 'sardine'
238
+ sardine = 'sardine',
239
239
  }
240
240
 
241
241
  export enum TransactionSwapProvider {
242
242
  unknown = 'unknown',
243
- lifi = 'lifi'
243
+ lifi = 'lifi',
244
244
  }
245
245
 
246
246
  export enum ExecuteType {
@@ -248,7 +248,7 @@ export enum ExecuteType {
248
248
  order = 'order',
249
249
  createListing = 'createListing',
250
250
  createItemOffer = 'createItemOffer',
251
- createTraitOffer = 'createTraitOffer'
251
+ createTraitOffer = 'createTraitOffer',
252
252
  }
253
253
 
254
254
  export enum ActivityAction {
@@ -259,7 +259,7 @@ export enum ActivityAction {
259
259
  sale = 'sale',
260
260
  listingCancel = 'listingCancel',
261
261
  offerCancel = 'offerCancel',
262
- transfer = 'transfer'
262
+ transfer = 'transfer',
263
263
  }
264
264
 
265
265
  export enum PrimarySaleContractStatus {
@@ -269,24 +269,24 @@ export enum PrimarySaleContractStatus {
269
269
  active = 'active',
270
270
  inactive = 'inactive',
271
271
  incompatible_type = 'incompatible_type',
272
- failed = 'failed'
272
+ failed = 'failed',
273
273
  }
274
274
 
275
275
  export enum PrimarySaleVersion {
276
276
  v0 = 'v0',
277
- v1 = 'v1'
277
+ v1 = 'v1',
278
278
  }
279
279
 
280
280
  export enum PrimarySaleItemDetailType {
281
281
  unknown = 'unknown',
282
282
  global = 'global',
283
- individual = 'individual'
283
+ individual = 'individual',
284
284
  }
285
285
 
286
286
  export enum MetadataStatus {
287
287
  NOT_AVAILABLE = 'NOT_AVAILABLE',
288
288
  REFRESHING = 'REFRESHING',
289
- AVAILABLE = 'AVAILABLE'
289
+ AVAILABLE = 'AVAILABLE',
290
290
  }
291
291
 
292
292
  export interface Page {
@@ -683,12 +683,12 @@ export interface Admin {
683
683
  createPrimarySaleContract(
684
684
  args: CreatePrimarySaleContractArgs,
685
685
  headers?: object,
686
- signal?: AbortSignal
686
+ signal?: AbortSignal,
687
687
  ): Promise<CreatePrimarySaleContractReturn>
688
688
  deletePrimarySaleContract(
689
689
  args: DeletePrimarySaleContractArgs,
690
690
  headers?: object,
691
- signal?: AbortSignal
691
+ signal?: AbortSignal,
692
692
  ): Promise<DeletePrimarySaleContractReturn>
693
693
  createCurrency(args: CreateCurrencyArgs, headers?: object, signal?: AbortSignal): Promise<CreateCurrencyReturn>
694
694
  createCurrencies(args: CreateCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise<CreateCurrenciesReturn>
@@ -818,70 +818,78 @@ export interface AddCollectiblesReturn {}
818
818
 
819
819
  export interface Marketplace {
820
820
  listCurrencies(args: ListCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise<ListCurrenciesReturn>
821
- getCollectionDetail(args: GetCollectionDetailArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectionDetailReturn>
821
+ getCollectionDetail(
822
+ args: GetCollectionDetailArgs,
823
+ headers?: object,
824
+ signal?: AbortSignal,
825
+ ): Promise<GetCollectionDetailReturn>
822
826
  getCollectionActiveListingsCurrencies(
823
827
  args: GetCollectionActiveListingsCurrenciesArgs,
824
828
  headers?: object,
825
- signal?: AbortSignal
829
+ signal?: AbortSignal,
826
830
  ): Promise<GetCollectionActiveListingsCurrenciesReturn>
827
831
  getCollectionActiveOffersCurrencies(
828
832
  args: GetCollectionActiveOffersCurrenciesArgs,
829
833
  headers?: object,
830
- signal?: AbortSignal
834
+ signal?: AbortSignal,
831
835
  ): Promise<GetCollectionActiveOffersCurrenciesReturn>
832
836
  getCollectible(args: GetCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectibleReturn>
833
837
  getLowestPriceOfferForCollectible(
834
838
  args: GetLowestPriceOfferForCollectibleArgs,
835
839
  headers?: object,
836
- signal?: AbortSignal
840
+ signal?: AbortSignal,
837
841
  ): Promise<GetLowestPriceOfferForCollectibleReturn>
838
842
  getHighestPriceOfferForCollectible(
839
843
  args: GetHighestPriceOfferForCollectibleArgs,
840
844
  headers?: object,
841
- signal?: AbortSignal
845
+ signal?: AbortSignal,
842
846
  ): Promise<GetHighestPriceOfferForCollectibleReturn>
843
847
  getLowestPriceListingForCollectible(
844
848
  args: GetLowestPriceListingForCollectibleArgs,
845
849
  headers?: object,
846
- signal?: AbortSignal
850
+ signal?: AbortSignal,
847
851
  ): Promise<GetLowestPriceListingForCollectibleReturn>
848
852
  getHighestPriceListingForCollectible(
849
853
  args: GetHighestPriceListingForCollectibleArgs,
850
854
  headers?: object,
851
- signal?: AbortSignal
855
+ signal?: AbortSignal,
852
856
  ): Promise<GetHighestPriceListingForCollectibleReturn>
853
857
  listListingsForCollectible(
854
858
  args: ListListingsForCollectibleArgs,
855
859
  headers?: object,
856
- signal?: AbortSignal
860
+ signal?: AbortSignal,
857
861
  ): Promise<ListListingsForCollectibleReturn>
858
862
  listOffersForCollectible(
859
863
  args: ListOffersForCollectibleArgs,
860
864
  headers?: object,
861
- signal?: AbortSignal
865
+ signal?: AbortSignal,
862
866
  ): Promise<ListOffersForCollectibleReturn>
863
867
  listOrdersWithCollectibles(
864
868
  args: ListOrdersWithCollectiblesArgs,
865
869
  headers?: object,
866
- signal?: AbortSignal
870
+ signal?: AbortSignal,
867
871
  ): Promise<ListOrdersWithCollectiblesReturn>
868
- getCountOfAllOrders(args: GetCountOfAllOrdersArgs, headers?: object, signal?: AbortSignal): Promise<GetCountOfAllOrdersReturn>
872
+ getCountOfAllOrders(
873
+ args: GetCountOfAllOrdersArgs,
874
+ headers?: object,
875
+ signal?: AbortSignal,
876
+ ): Promise<GetCountOfAllOrdersReturn>
869
877
  getCountOfFilteredOrders(
870
878
  args: GetCountOfFilteredOrdersArgs,
871
879
  headers?: object,
872
- signal?: AbortSignal
880
+ signal?: AbortSignal,
873
881
  ): Promise<GetCountOfFilteredOrdersReturn>
874
882
  listListings(args: ListListingsArgs, headers?: object, signal?: AbortSignal): Promise<ListListingsReturn>
875
883
  listOffers(args: ListOffersArgs, headers?: object, signal?: AbortSignal): Promise<ListOffersReturn>
876
884
  getCountOfListingsForCollectible(
877
885
  args: GetCountOfListingsForCollectibleArgs,
878
886
  headers?: object,
879
- signal?: AbortSignal
887
+ signal?: AbortSignal,
880
888
  ): Promise<GetCountOfListingsForCollectibleReturn>
881
889
  getCountOfOffersForCollectible(
882
890
  args: GetCountOfOffersForCollectibleArgs,
883
891
  headers?: object,
884
- signal?: AbortSignal
892
+ signal?: AbortSignal,
885
893
  ): Promise<GetCountOfOffersForCollectibleReturn>
886
894
  /**
887
895
  * @deprecated Please use GetLowestPriceOfferForCollectible instead.
@@ -889,7 +897,7 @@ export interface Marketplace {
889
897
  getCollectibleLowestOffer(
890
898
  args: GetCollectibleLowestOfferArgs,
891
899
  headers?: object,
892
- signal?: AbortSignal
900
+ signal?: AbortSignal,
893
901
  ): Promise<GetCollectibleLowestOfferReturn>
894
902
  /**
895
903
  * @deprecated Please use GetHighestPriceOfferForCollectible instead.
@@ -897,7 +905,7 @@ export interface Marketplace {
897
905
  getCollectibleHighestOffer(
898
906
  args: GetCollectibleHighestOfferArgs,
899
907
  headers?: object,
900
- signal?: AbortSignal
908
+ signal?: AbortSignal,
901
909
  ): Promise<GetCollectibleHighestOfferReturn>
902
910
  /**
903
911
  * @deprecated Please use GetLowestPriceListingForCollectible instead.
@@ -905,7 +913,7 @@ export interface Marketplace {
905
913
  getCollectibleLowestListing(
906
914
  args: GetCollectibleLowestListingArgs,
907
915
  headers?: object,
908
- signal?: AbortSignal
916
+ signal?: AbortSignal,
909
917
  ): Promise<GetCollectibleLowestListingReturn>
910
918
  /**
911
919
  * @deprecated Please use GetHighestPriceListingForCollectible instead.
@@ -913,7 +921,7 @@ export interface Marketplace {
913
921
  getCollectibleHighestListing(
914
922
  args: GetCollectibleHighestListingArgs,
915
923
  headers?: object,
916
- signal?: AbortSignal
924
+ signal?: AbortSignal,
917
925
  ): Promise<GetCollectibleHighestListingReturn>
918
926
  /**
919
927
  * @deprecated Please use ListListingsForCollectible instead.
@@ -921,7 +929,7 @@ export interface Marketplace {
921
929
  listCollectibleListings(
922
930
  args: ListCollectibleListingsArgs,
923
931
  headers?: object,
924
- signal?: AbortSignal
932
+ signal?: AbortSignal,
925
933
  ): Promise<ListCollectibleListingsReturn>
926
934
  /**
927
935
  * @deprecated Please use ListOffersForCollectible instead.
@@ -929,7 +937,7 @@ export interface Marketplace {
929
937
  listCollectibleOffers(
930
938
  args: ListCollectibleOffersArgs,
931
939
  headers?: object,
932
- signal?: AbortSignal
940
+ signal?: AbortSignal,
933
941
  ): Promise<ListCollectibleOffersReturn>
934
942
  /**
935
943
  * checkout process
@@ -937,27 +945,27 @@ export interface Marketplace {
937
945
  generateBuyTransaction(
938
946
  args: GenerateBuyTransactionArgs,
939
947
  headers?: object,
940
- signal?: AbortSignal
948
+ signal?: AbortSignal,
941
949
  ): Promise<GenerateBuyTransactionReturn>
942
950
  generateSellTransaction(
943
951
  args: GenerateSellTransactionArgs,
944
952
  headers?: object,
945
- signal?: AbortSignal
953
+ signal?: AbortSignal,
946
954
  ): Promise<GenerateSellTransactionReturn>
947
955
  generateListingTransaction(
948
956
  args: GenerateListingTransactionArgs,
949
957
  headers?: object,
950
- signal?: AbortSignal
958
+ signal?: AbortSignal,
951
959
  ): Promise<GenerateListingTransactionReturn>
952
960
  generateOfferTransaction(
953
961
  args: GenerateOfferTransactionArgs,
954
962
  headers?: object,
955
- signal?: AbortSignal
963
+ signal?: AbortSignal,
956
964
  ): Promise<GenerateOfferTransactionReturn>
957
965
  generateCancelTransaction(
958
966
  args: GenerateCancelTransactionArgs,
959
967
  headers?: object,
960
- signal?: AbortSignal
968
+ signal?: AbortSignal,
961
969
  ): Promise<GenerateCancelTransactionReturn>
962
970
  /**
963
971
  * only used in a case of external transactions ( when we create off-chain transactions ) for instance opensea market, use only ExecuteInput params and leave other root inputs empty, they are depracated and kept only for backward compatibility
@@ -970,33 +978,33 @@ export interface Marketplace {
970
978
  getCountOfAllCollectibles(
971
979
  args: GetCountOfAllCollectiblesArgs,
972
980
  headers?: object,
973
- signal?: AbortSignal
981
+ signal?: AbortSignal,
974
982
  ): Promise<GetCountOfAllCollectiblesReturn>
975
983
  getCountOfFilteredCollectibles(
976
984
  args: GetCountOfFilteredCollectiblesArgs,
977
985
  headers?: object,
978
- signal?: AbortSignal
986
+ signal?: AbortSignal,
979
987
  ): Promise<GetCountOfFilteredCollectiblesReturn>
980
988
  getFloorOrder(args: GetFloorOrderArgs, headers?: object, signal?: AbortSignal): Promise<GetFloorOrderReturn>
981
989
  listCollectionActivities(
982
990
  args: ListCollectionActivitiesArgs,
983
991
  headers?: object,
984
- signal?: AbortSignal
992
+ signal?: AbortSignal,
985
993
  ): Promise<ListCollectionActivitiesReturn>
986
994
  listCollectibleActivities(
987
995
  args: ListCollectibleActivitiesArgs,
988
996
  headers?: object,
989
- signal?: AbortSignal
997
+ signal?: AbortSignal,
990
998
  ): Promise<ListCollectibleActivitiesReturn>
991
999
  listCollectiblesWithLowestListing(
992
1000
  args: ListCollectiblesWithLowestListingArgs,
993
1001
  headers?: object,
994
- signal?: AbortSignal
1002
+ signal?: AbortSignal,
995
1003
  ): Promise<ListCollectiblesWithLowestListingReturn>
996
1004
  listCollectiblesWithHighestOffer(
997
1005
  args: ListCollectiblesWithHighestOfferArgs,
998
1006
  headers?: object,
999
- signal?: AbortSignal
1007
+ signal?: AbortSignal,
1000
1008
  ): Promise<ListCollectiblesWithHighestOfferReturn>
1001
1009
  syncOrder(args: SyncOrderArgs, headers?: object, signal?: AbortSignal): Promise<SyncOrderReturn>
1002
1010
  syncOrders(args: SyncOrdersArgs, headers?: object, signal?: AbortSignal): Promise<SyncOrdersReturn>
@@ -1004,28 +1012,32 @@ export interface Marketplace {
1004
1012
  checkoutOptionsMarketplace(
1005
1013
  args: CheckoutOptionsMarketplaceArgs,
1006
1014
  headers?: object,
1007
- signal?: AbortSignal
1015
+ signal?: AbortSignal,
1008
1016
  ): Promise<CheckoutOptionsMarketplaceReturn>
1009
1017
  checkoutOptionsSalesContract(
1010
1018
  args: CheckoutOptionsSalesContractArgs,
1011
1019
  headers?: object,
1012
- signal?: AbortSignal
1020
+ signal?: AbortSignal,
1013
1021
  ): Promise<CheckoutOptionsSalesContractReturn>
1014
1022
  supportedMarketplaces(
1015
1023
  args: SupportedMarketplacesArgs,
1016
1024
  headers?: object,
1017
- signal?: AbortSignal
1025
+ signal?: AbortSignal,
1018
1026
  ): Promise<SupportedMarketplacesReturn>
1019
- getPrimarySaleItem(args: GetPrimarySaleItemArgs, headers?: object, signal?: AbortSignal): Promise<GetPrimarySaleItemReturn>
1027
+ getPrimarySaleItem(
1028
+ args: GetPrimarySaleItemArgs,
1029
+ headers?: object,
1030
+ signal?: AbortSignal,
1031
+ ): Promise<GetPrimarySaleItemReturn>
1020
1032
  listPrimarySaleItems(
1021
1033
  args: ListPrimarySaleItemsArgs,
1022
1034
  headers?: object,
1023
- signal?: AbortSignal
1035
+ signal?: AbortSignal,
1024
1036
  ): Promise<ListPrimarySaleItemsReturn>
1025
1037
  getCountOfPrimarySaleItems(
1026
1038
  args: GetCountOfPrimarySaleItemsArgs,
1027
1039
  headers?: object,
1028
- signal?: AbortSignal
1040
+ signal?: AbortSignal,
1029
1041
  ): Promise<GetCountOfPrimarySaleItemsReturn>
1030
1042
  }
1031
1043
 
@@ -1528,216 +1540,288 @@ export class Admin implements Admin {
1528
1540
  return this.hostname + this.path + name
1529
1541
  }
1530
1542
 
1531
- createCollection = (args: CreateCollectionArgs, headers?: object, signal?: AbortSignal): Promise<CreateCollectionReturn> => {
1543
+ createCollection = (
1544
+ args: CreateCollectionArgs,
1545
+ headers?: object,
1546
+ signal?: AbortSignal,
1547
+ ): Promise<CreateCollectionReturn> => {
1532
1548
  return this.fetch(this.url('CreateCollection'), createHTTPRequest(args, headers, signal)).then(
1533
- res => {
1534
- return buildResponse(res).then(_data => {
1549
+ (res) => {
1550
+ return buildResponse(res).then((_data) => {
1535
1551
  return {
1536
- collection: <Collection>_data.collection
1552
+ collection: <Collection>_data.collection,
1537
1553
  }
1538
1554
  })
1539
1555
  },
1540
- error => {
1541
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1542
- }
1556
+ (error) => {
1557
+ throw WebrpcRequestFailedError.new({
1558
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1559
+ })
1560
+ },
1543
1561
  )
1544
1562
  }
1545
1563
 
1546
1564
  getCollection = (args: GetCollectionArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectionReturn> => {
1547
1565
  return this.fetch(this.url('GetCollection'), createHTTPRequest(args, headers, signal)).then(
1548
- res => {
1549
- return buildResponse(res).then(_data => {
1566
+ (res) => {
1567
+ return buildResponse(res).then((_data) => {
1550
1568
  return {
1551
- collection: <Collection>_data.collection
1569
+ collection: <Collection>_data.collection,
1552
1570
  }
1553
1571
  })
1554
1572
  },
1555
- error => {
1556
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1557
- }
1573
+ (error) => {
1574
+ throw WebrpcRequestFailedError.new({
1575
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1576
+ })
1577
+ },
1558
1578
  )
1559
1579
  }
1560
1580
 
1561
- updateCollection = (args: UpdateCollectionArgs, headers?: object, signal?: AbortSignal): Promise<UpdateCollectionReturn> => {
1581
+ updateCollection = (
1582
+ args: UpdateCollectionArgs,
1583
+ headers?: object,
1584
+ signal?: AbortSignal,
1585
+ ): Promise<UpdateCollectionReturn> => {
1562
1586
  return this.fetch(this.url('UpdateCollection'), createHTTPRequest(args, headers, signal)).then(
1563
- res => {
1564
- return buildResponse(res).then(_data => {
1587
+ (res) => {
1588
+ return buildResponse(res).then((_data) => {
1565
1589
  return {
1566
- collection: <Collection>_data.collection
1590
+ collection: <Collection>_data.collection,
1567
1591
  }
1568
1592
  })
1569
1593
  },
1570
- error => {
1571
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1572
- }
1594
+ (error) => {
1595
+ throw WebrpcRequestFailedError.new({
1596
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1597
+ })
1598
+ },
1573
1599
  )
1574
1600
  }
1575
1601
 
1576
- listCollections = (args: ListCollectionsArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectionsReturn> => {
1602
+ listCollections = (
1603
+ args: ListCollectionsArgs,
1604
+ headers?: object,
1605
+ signal?: AbortSignal,
1606
+ ): Promise<ListCollectionsReturn> => {
1577
1607
  return this.fetch(this.url('ListCollections'), createHTTPRequest(args, headers, signal)).then(
1578
- res => {
1579
- return buildResponse(res).then(_data => {
1608
+ (res) => {
1609
+ return buildResponse(res).then((_data) => {
1580
1610
  return {
1581
1611
  collections: <Array<Collection>>_data.collections,
1582
- page: <Page>_data.page
1612
+ page: <Page>_data.page,
1583
1613
  }
1584
1614
  })
1585
1615
  },
1586
- error => {
1587
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1588
- }
1616
+ (error) => {
1617
+ throw WebrpcRequestFailedError.new({
1618
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1619
+ })
1620
+ },
1589
1621
  )
1590
1622
  }
1591
1623
 
1592
- deleteCollection = (args: DeleteCollectionArgs, headers?: object, signal?: AbortSignal): Promise<DeleteCollectionReturn> => {
1624
+ deleteCollection = (
1625
+ args: DeleteCollectionArgs,
1626
+ headers?: object,
1627
+ signal?: AbortSignal,
1628
+ ): Promise<DeleteCollectionReturn> => {
1593
1629
  return this.fetch(this.url('DeleteCollection'), createHTTPRequest(args, headers, signal)).then(
1594
- res => {
1595
- return buildResponse(res).then(_data => {
1630
+ (res) => {
1631
+ return buildResponse(res).then((_data) => {
1596
1632
  return {
1597
- collection: <Collection>_data.collection
1633
+ collection: <Collection>_data.collection,
1598
1634
  }
1599
1635
  })
1600
1636
  },
1601
- error => {
1602
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1603
- }
1637
+ (error) => {
1638
+ throw WebrpcRequestFailedError.new({
1639
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1640
+ })
1641
+ },
1604
1642
  )
1605
1643
  }
1606
1644
 
1607
- syncCollection = (args: SyncCollectionArgs, headers?: object, signal?: AbortSignal): Promise<SyncCollectionReturn> => {
1645
+ syncCollection = (
1646
+ args: SyncCollectionArgs,
1647
+ headers?: object,
1648
+ signal?: AbortSignal,
1649
+ ): Promise<SyncCollectionReturn> => {
1608
1650
  return this.fetch(this.url('SyncCollection'), createHTTPRequest(args, headers, signal)).then(
1609
- res => {
1610
- return buildResponse(res).then(_data => {
1651
+ (res) => {
1652
+ return buildResponse(res).then((_data) => {
1611
1653
  return {}
1612
1654
  })
1613
1655
  },
1614
- error => {
1615
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1616
- }
1656
+ (error) => {
1657
+ throw WebrpcRequestFailedError.new({
1658
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1659
+ })
1660
+ },
1617
1661
  )
1618
1662
  }
1619
1663
 
1620
1664
  createPrimarySaleContract = (
1621
1665
  args: CreatePrimarySaleContractArgs,
1622
1666
  headers?: object,
1623
- signal?: AbortSignal
1667
+ signal?: AbortSignal,
1624
1668
  ): Promise<CreatePrimarySaleContractReturn> => {
1625
1669
  return this.fetch(this.url('CreatePrimarySaleContract'), createHTTPRequest(args, headers, signal)).then(
1626
- res => {
1627
- return buildResponse(res).then(_data => {
1670
+ (res) => {
1671
+ return buildResponse(res).then((_data) => {
1628
1672
  return {
1629
- primarySaleContract: <PrimarySaleContract>_data.primarySaleContract
1673
+ primarySaleContract: <PrimarySaleContract>_data.primarySaleContract,
1630
1674
  }
1631
1675
  })
1632
1676
  },
1633
- error => {
1634
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1635
- }
1677
+ (error) => {
1678
+ throw WebrpcRequestFailedError.new({
1679
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1680
+ })
1681
+ },
1636
1682
  )
1637
1683
  }
1638
1684
 
1639
1685
  deletePrimarySaleContract = (
1640
1686
  args: DeletePrimarySaleContractArgs,
1641
1687
  headers?: object,
1642
- signal?: AbortSignal
1688
+ signal?: AbortSignal,
1643
1689
  ): Promise<DeletePrimarySaleContractReturn> => {
1644
1690
  return this.fetch(this.url('DeletePrimarySaleContract'), createHTTPRequest(args, headers, signal)).then(
1645
- res => {
1646
- return buildResponse(res).then(_data => {
1691
+ (res) => {
1692
+ return buildResponse(res).then((_data) => {
1647
1693
  return {}
1648
1694
  })
1649
1695
  },
1650
- error => {
1651
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1652
- }
1696
+ (error) => {
1697
+ throw WebrpcRequestFailedError.new({
1698
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1699
+ })
1700
+ },
1653
1701
  )
1654
1702
  }
1655
1703
 
1656
- createCurrency = (args: CreateCurrencyArgs, headers?: object, signal?: AbortSignal): Promise<CreateCurrencyReturn> => {
1704
+ createCurrency = (
1705
+ args: CreateCurrencyArgs,
1706
+ headers?: object,
1707
+ signal?: AbortSignal,
1708
+ ): Promise<CreateCurrencyReturn> => {
1657
1709
  return this.fetch(this.url('CreateCurrency'), createHTTPRequest(args, headers, signal)).then(
1658
- res => {
1659
- return buildResponse(res).then(_data => {
1710
+ (res) => {
1711
+ return buildResponse(res).then((_data) => {
1660
1712
  return {
1661
- currency: <Currency>_data.currency
1713
+ currency: <Currency>_data.currency,
1662
1714
  }
1663
1715
  })
1664
1716
  },
1665
- error => {
1666
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1667
- }
1717
+ (error) => {
1718
+ throw WebrpcRequestFailedError.new({
1719
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1720
+ })
1721
+ },
1668
1722
  )
1669
1723
  }
1670
1724
 
1671
- createCurrencies = (args: CreateCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise<CreateCurrenciesReturn> => {
1725
+ createCurrencies = (
1726
+ args: CreateCurrenciesArgs,
1727
+ headers?: object,
1728
+ signal?: AbortSignal,
1729
+ ): Promise<CreateCurrenciesReturn> => {
1672
1730
  return this.fetch(this.url('CreateCurrencies'), createHTTPRequest(args, headers, signal)).then(
1673
- res => {
1674
- return buildResponse(res).then(_data => {
1731
+ (res) => {
1732
+ return buildResponse(res).then((_data) => {
1675
1733
  return {
1676
- currency: <{ [key: string]: Currency }>_data.currency
1734
+ currency: <{ [key: string]: Currency }>_data.currency,
1677
1735
  }
1678
1736
  })
1679
1737
  },
1680
- error => {
1681
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1682
- }
1738
+ (error) => {
1739
+ throw WebrpcRequestFailedError.new({
1740
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1741
+ })
1742
+ },
1683
1743
  )
1684
1744
  }
1685
1745
 
1686
- updateCurrency = (args: UpdateCurrencyArgs, headers?: object, signal?: AbortSignal): Promise<UpdateCurrencyReturn> => {
1746
+ updateCurrency = (
1747
+ args: UpdateCurrencyArgs,
1748
+ headers?: object,
1749
+ signal?: AbortSignal,
1750
+ ): Promise<UpdateCurrencyReturn> => {
1687
1751
  return this.fetch(this.url('UpdateCurrency'), createHTTPRequest(args, headers, signal)).then(
1688
- res => {
1689
- return buildResponse(res).then(_data => {
1752
+ (res) => {
1753
+ return buildResponse(res).then((_data) => {
1690
1754
  return {
1691
- currency: <Currency>_data.currency
1755
+ currency: <Currency>_data.currency,
1692
1756
  }
1693
1757
  })
1694
1758
  },
1695
- error => {
1696
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1697
- }
1759
+ (error) => {
1760
+ throw WebrpcRequestFailedError.new({
1761
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1762
+ })
1763
+ },
1698
1764
  )
1699
1765
  }
1700
1766
 
1701
- listCurrencies = (args: ListCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise<ListCurrenciesReturn> => {
1767
+ listCurrencies = (
1768
+ args: ListCurrenciesArgs,
1769
+ headers?: object,
1770
+ signal?: AbortSignal,
1771
+ ): Promise<ListCurrenciesReturn> => {
1702
1772
  return this.fetch(this.url('ListCurrencies'), createHTTPRequest(args, headers, signal)).then(
1703
- res => {
1704
- return buildResponse(res).then(_data => {
1773
+ (res) => {
1774
+ return buildResponse(res).then((_data) => {
1705
1775
  return {
1706
- currencies: <Array<Currency>>_data.currencies
1776
+ currencies: <Array<Currency>>_data.currencies,
1707
1777
  }
1708
1778
  })
1709
1779
  },
1710
- error => {
1711
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1712
- }
1780
+ (error) => {
1781
+ throw WebrpcRequestFailedError.new({
1782
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1783
+ })
1784
+ },
1713
1785
  )
1714
1786
  }
1715
1787
 
1716
- deleteCurrency = (args: DeleteCurrencyArgs, headers?: object, signal?: AbortSignal): Promise<DeleteCurrencyReturn> => {
1788
+ deleteCurrency = (
1789
+ args: DeleteCurrencyArgs,
1790
+ headers?: object,
1791
+ signal?: AbortSignal,
1792
+ ): Promise<DeleteCurrencyReturn> => {
1717
1793
  return this.fetch(this.url('DeleteCurrency'), createHTTPRequest(args, headers, signal)).then(
1718
- res => {
1719
- return buildResponse(res).then(_data => {
1794
+ (res) => {
1795
+ return buildResponse(res).then((_data) => {
1720
1796
  return {
1721
- currency: <Currency>_data.currency
1797
+ currency: <Currency>_data.currency,
1722
1798
  }
1723
1799
  })
1724
1800
  },
1725
- error => {
1726
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1727
- }
1801
+ (error) => {
1802
+ throw WebrpcRequestFailedError.new({
1803
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1804
+ })
1805
+ },
1728
1806
  )
1729
1807
  }
1730
1808
 
1731
- addCollectibles = (args: AddCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise<AddCollectiblesReturn> => {
1809
+ addCollectibles = (
1810
+ args: AddCollectiblesArgs,
1811
+ headers?: object,
1812
+ signal?: AbortSignal,
1813
+ ): Promise<AddCollectiblesReturn> => {
1732
1814
  return this.fetch(this.url('AddCollectibles'), createHTTPRequest(args, headers, signal)).then(
1733
- res => {
1734
- return buildResponse(res).then(_data => {
1815
+ (res) => {
1816
+ return buildResponse(res).then((_data) => {
1735
1817
  return {}
1736
1818
  })
1737
1819
  },
1738
- error => {
1739
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1740
- }
1820
+ (error) => {
1821
+ throw WebrpcRequestFailedError.new({
1822
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1823
+ })
1824
+ },
1741
1825
  )
1742
1826
  }
1743
1827
  }
@@ -1755,866 +1839,972 @@ export class Marketplace implements Marketplace {
1755
1839
  return this.hostname + this.path + name
1756
1840
  }
1757
1841
 
1758
- listCurrencies = (args: ListCurrenciesArgs, headers?: object, signal?: AbortSignal): Promise<ListCurrenciesReturn> => {
1842
+ listCurrencies = (
1843
+ args: ListCurrenciesArgs,
1844
+ headers?: object,
1845
+ signal?: AbortSignal,
1846
+ ): Promise<ListCurrenciesReturn> => {
1759
1847
  return this.fetch(this.url('ListCurrencies'), createHTTPRequest(args, headers, signal)).then(
1760
- res => {
1761
- return buildResponse(res).then(_data => {
1848
+ (res) => {
1849
+ return buildResponse(res).then((_data) => {
1762
1850
  return {
1763
- currencies: <Array<Currency>>_data.currencies
1851
+ currencies: <Array<Currency>>_data.currencies,
1764
1852
  }
1765
1853
  })
1766
1854
  },
1767
- error => {
1768
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1769
- }
1855
+ (error) => {
1856
+ throw WebrpcRequestFailedError.new({
1857
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1858
+ })
1859
+ },
1770
1860
  )
1771
1861
  }
1772
1862
 
1773
1863
  getCollectionDetail = (
1774
1864
  args: GetCollectionDetailArgs,
1775
1865
  headers?: object,
1776
- signal?: AbortSignal
1866
+ signal?: AbortSignal,
1777
1867
  ): Promise<GetCollectionDetailReturn> => {
1778
1868
  return this.fetch(this.url('GetCollectionDetail'), createHTTPRequest(args, headers, signal)).then(
1779
- res => {
1780
- return buildResponse(res).then(_data => {
1869
+ (res) => {
1870
+ return buildResponse(res).then((_data) => {
1781
1871
  return {
1782
- collection: <Collection>_data.collection
1872
+ collection: <Collection>_data.collection,
1783
1873
  }
1784
1874
  })
1785
1875
  },
1786
- error => {
1787
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1788
- }
1876
+ (error) => {
1877
+ throw WebrpcRequestFailedError.new({
1878
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1879
+ })
1880
+ },
1789
1881
  )
1790
1882
  }
1791
1883
 
1792
1884
  getCollectionActiveListingsCurrencies = (
1793
1885
  args: GetCollectionActiveListingsCurrenciesArgs,
1794
1886
  headers?: object,
1795
- signal?: AbortSignal
1887
+ signal?: AbortSignal,
1796
1888
  ): Promise<GetCollectionActiveListingsCurrenciesReturn> => {
1797
1889
  return this.fetch(this.url('GetCollectionActiveListingsCurrencies'), createHTTPRequest(args, headers, signal)).then(
1798
- res => {
1799
- return buildResponse(res).then(_data => {
1890
+ (res) => {
1891
+ return buildResponse(res).then((_data) => {
1800
1892
  return {
1801
- currencies: <Array<Currency>>_data.currencies
1893
+ currencies: <Array<Currency>>_data.currencies,
1802
1894
  }
1803
1895
  })
1804
1896
  },
1805
- error => {
1806
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1807
- }
1897
+ (error) => {
1898
+ throw WebrpcRequestFailedError.new({
1899
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1900
+ })
1901
+ },
1808
1902
  )
1809
1903
  }
1810
1904
 
1811
1905
  getCollectionActiveOffersCurrencies = (
1812
1906
  args: GetCollectionActiveOffersCurrenciesArgs,
1813
1907
  headers?: object,
1814
- signal?: AbortSignal
1908
+ signal?: AbortSignal,
1815
1909
  ): Promise<GetCollectionActiveOffersCurrenciesReturn> => {
1816
1910
  return this.fetch(this.url('GetCollectionActiveOffersCurrencies'), createHTTPRequest(args, headers, signal)).then(
1817
- res => {
1818
- return buildResponse(res).then(_data => {
1911
+ (res) => {
1912
+ return buildResponse(res).then((_data) => {
1819
1913
  return {
1820
- currencies: <Array<Currency>>_data.currencies
1914
+ currencies: <Array<Currency>>_data.currencies,
1821
1915
  }
1822
1916
  })
1823
1917
  },
1824
- error => {
1825
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1826
- }
1918
+ (error) => {
1919
+ throw WebrpcRequestFailedError.new({
1920
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1921
+ })
1922
+ },
1827
1923
  )
1828
1924
  }
1829
1925
 
1830
- getCollectible = (args: GetCollectibleArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectibleReturn> => {
1926
+ getCollectible = (
1927
+ args: GetCollectibleArgs,
1928
+ headers?: object,
1929
+ signal?: AbortSignal,
1930
+ ): Promise<GetCollectibleReturn> => {
1831
1931
  return this.fetch(this.url('GetCollectible'), createHTTPRequest(args, headers, signal)).then(
1832
- res => {
1833
- return buildResponse(res).then(_data => {
1932
+ (res) => {
1933
+ return buildResponse(res).then((_data) => {
1834
1934
  return {
1835
- metadata: <TokenMetadata>_data.metadata
1935
+ metadata: <TokenMetadata>_data.metadata,
1836
1936
  }
1837
1937
  })
1838
1938
  },
1839
- error => {
1840
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1841
- }
1939
+ (error) => {
1940
+ throw WebrpcRequestFailedError.new({
1941
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1942
+ })
1943
+ },
1842
1944
  )
1843
1945
  }
1844
1946
 
1845
1947
  getLowestPriceOfferForCollectible = (
1846
1948
  args: GetLowestPriceOfferForCollectibleArgs,
1847
1949
  headers?: object,
1848
- signal?: AbortSignal
1950
+ signal?: AbortSignal,
1849
1951
  ): Promise<GetLowestPriceOfferForCollectibleReturn> => {
1850
1952
  return this.fetch(this.url('GetLowestPriceOfferForCollectible'), createHTTPRequest(args, headers, signal)).then(
1851
- res => {
1852
- return buildResponse(res).then(_data => {
1953
+ (res) => {
1954
+ return buildResponse(res).then((_data) => {
1853
1955
  return {
1854
- order: <Order>_data.order
1956
+ order: <Order>_data.order,
1855
1957
  }
1856
1958
  })
1857
1959
  },
1858
- error => {
1859
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1860
- }
1960
+ (error) => {
1961
+ throw WebrpcRequestFailedError.new({
1962
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1963
+ })
1964
+ },
1861
1965
  )
1862
1966
  }
1863
1967
 
1864
1968
  getHighestPriceOfferForCollectible = (
1865
1969
  args: GetHighestPriceOfferForCollectibleArgs,
1866
1970
  headers?: object,
1867
- signal?: AbortSignal
1971
+ signal?: AbortSignal,
1868
1972
  ): Promise<GetHighestPriceOfferForCollectibleReturn> => {
1869
1973
  return this.fetch(this.url('GetHighestPriceOfferForCollectible'), createHTTPRequest(args, headers, signal)).then(
1870
- res => {
1871
- return buildResponse(res).then(_data => {
1974
+ (res) => {
1975
+ return buildResponse(res).then((_data) => {
1872
1976
  return {
1873
- order: <Order>_data.order
1977
+ order: <Order>_data.order,
1874
1978
  }
1875
1979
  })
1876
1980
  },
1877
- error => {
1878
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1879
- }
1981
+ (error) => {
1982
+ throw WebrpcRequestFailedError.new({
1983
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
1984
+ })
1985
+ },
1880
1986
  )
1881
1987
  }
1882
1988
 
1883
1989
  getLowestPriceListingForCollectible = (
1884
1990
  args: GetLowestPriceListingForCollectibleArgs,
1885
1991
  headers?: object,
1886
- signal?: AbortSignal
1992
+ signal?: AbortSignal,
1887
1993
  ): Promise<GetLowestPriceListingForCollectibleReturn> => {
1888
1994
  return this.fetch(this.url('GetLowestPriceListingForCollectible'), createHTTPRequest(args, headers, signal)).then(
1889
- res => {
1890
- return buildResponse(res).then(_data => {
1995
+ (res) => {
1996
+ return buildResponse(res).then((_data) => {
1891
1997
  return {
1892
- order: <Order>_data.order
1998
+ order: <Order>_data.order,
1893
1999
  }
1894
2000
  })
1895
2001
  },
1896
- error => {
1897
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1898
- }
2002
+ (error) => {
2003
+ throw WebrpcRequestFailedError.new({
2004
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2005
+ })
2006
+ },
1899
2007
  )
1900
2008
  }
1901
2009
 
1902
2010
  getHighestPriceListingForCollectible = (
1903
2011
  args: GetHighestPriceListingForCollectibleArgs,
1904
2012
  headers?: object,
1905
- signal?: AbortSignal
2013
+ signal?: AbortSignal,
1906
2014
  ): Promise<GetHighestPriceListingForCollectibleReturn> => {
1907
2015
  return this.fetch(this.url('GetHighestPriceListingForCollectible'), createHTTPRequest(args, headers, signal)).then(
1908
- res => {
1909
- return buildResponse(res).then(_data => {
2016
+ (res) => {
2017
+ return buildResponse(res).then((_data) => {
1910
2018
  return {
1911
- order: <Order>_data.order
2019
+ order: <Order>_data.order,
1912
2020
  }
1913
2021
  })
1914
2022
  },
1915
- error => {
1916
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1917
- }
2023
+ (error) => {
2024
+ throw WebrpcRequestFailedError.new({
2025
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2026
+ })
2027
+ },
1918
2028
  )
1919
2029
  }
1920
2030
 
1921
2031
  listListingsForCollectible = (
1922
2032
  args: ListListingsForCollectibleArgs,
1923
2033
  headers?: object,
1924
- signal?: AbortSignal
2034
+ signal?: AbortSignal,
1925
2035
  ): Promise<ListListingsForCollectibleReturn> => {
1926
2036
  return this.fetch(this.url('ListListingsForCollectible'), createHTTPRequest(args, headers, signal)).then(
1927
- res => {
1928
- return buildResponse(res).then(_data => {
2037
+ (res) => {
2038
+ return buildResponse(res).then((_data) => {
1929
2039
  return {
1930
2040
  listings: <Array<Order>>_data.listings,
1931
- page: <Page>_data.page
2041
+ page: <Page>_data.page,
1932
2042
  }
1933
2043
  })
1934
2044
  },
1935
- error => {
1936
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1937
- }
2045
+ (error) => {
2046
+ throw WebrpcRequestFailedError.new({
2047
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2048
+ })
2049
+ },
1938
2050
  )
1939
2051
  }
1940
2052
 
1941
2053
  listOffersForCollectible = (
1942
2054
  args: ListOffersForCollectibleArgs,
1943
2055
  headers?: object,
1944
- signal?: AbortSignal
2056
+ signal?: AbortSignal,
1945
2057
  ): Promise<ListOffersForCollectibleReturn> => {
1946
2058
  return this.fetch(this.url('ListOffersForCollectible'), createHTTPRequest(args, headers, signal)).then(
1947
- res => {
1948
- return buildResponse(res).then(_data => {
2059
+ (res) => {
2060
+ return buildResponse(res).then((_data) => {
1949
2061
  return {
1950
2062
  offers: <Array<Order>>_data.offers,
1951
- page: <Page>_data.page
2063
+ page: <Page>_data.page,
1952
2064
  }
1953
2065
  })
1954
2066
  },
1955
- error => {
1956
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1957
- }
2067
+ (error) => {
2068
+ throw WebrpcRequestFailedError.new({
2069
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2070
+ })
2071
+ },
1958
2072
  )
1959
2073
  }
1960
2074
 
1961
2075
  listOrdersWithCollectibles = (
1962
2076
  args: ListOrdersWithCollectiblesArgs,
1963
2077
  headers?: object,
1964
- signal?: AbortSignal
2078
+ signal?: AbortSignal,
1965
2079
  ): Promise<ListOrdersWithCollectiblesReturn> => {
1966
2080
  return this.fetch(this.url('ListOrdersWithCollectibles'), createHTTPRequest(args, headers, signal)).then(
1967
- res => {
1968
- return buildResponse(res).then(_data => {
2081
+ (res) => {
2082
+ return buildResponse(res).then((_data) => {
1969
2083
  return {
1970
2084
  collectibles: <Array<CollectibleOrder>>_data.collectibles,
1971
- page: <Page>_data.page
2085
+ page: <Page>_data.page,
1972
2086
  }
1973
2087
  })
1974
2088
  },
1975
- error => {
1976
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1977
- }
2089
+ (error) => {
2090
+ throw WebrpcRequestFailedError.new({
2091
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2092
+ })
2093
+ },
1978
2094
  )
1979
2095
  }
1980
2096
 
1981
2097
  getCountOfAllOrders = (
1982
2098
  args: GetCountOfAllOrdersArgs,
1983
2099
  headers?: object,
1984
- signal?: AbortSignal
2100
+ signal?: AbortSignal,
1985
2101
  ): Promise<GetCountOfAllOrdersReturn> => {
1986
2102
  return this.fetch(this.url('GetCountOfAllOrders'), createHTTPRequest(args, headers, signal)).then(
1987
- res => {
1988
- return buildResponse(res).then(_data => {
2103
+ (res) => {
2104
+ return buildResponse(res).then((_data) => {
1989
2105
  return {
1990
- count: <number>_data.count
2106
+ count: <number>_data.count,
1991
2107
  }
1992
2108
  })
1993
2109
  },
1994
- error => {
1995
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
1996
- }
2110
+ (error) => {
2111
+ throw WebrpcRequestFailedError.new({
2112
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2113
+ })
2114
+ },
1997
2115
  )
1998
2116
  }
1999
2117
 
2000
2118
  getCountOfFilteredOrders = (
2001
2119
  args: GetCountOfFilteredOrdersArgs,
2002
2120
  headers?: object,
2003
- signal?: AbortSignal
2121
+ signal?: AbortSignal,
2004
2122
  ): Promise<GetCountOfFilteredOrdersReturn> => {
2005
2123
  return this.fetch(this.url('GetCountOfFilteredOrders'), createHTTPRequest(args, headers, signal)).then(
2006
- res => {
2007
- return buildResponse(res).then(_data => {
2124
+ (res) => {
2125
+ return buildResponse(res).then((_data) => {
2008
2126
  return {
2009
- count: <number>_data.count
2127
+ count: <number>_data.count,
2010
2128
  }
2011
2129
  })
2012
2130
  },
2013
- error => {
2014
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2015
- }
2131
+ (error) => {
2132
+ throw WebrpcRequestFailedError.new({
2133
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2134
+ })
2135
+ },
2016
2136
  )
2017
2137
  }
2018
2138
 
2019
2139
  listListings = (args: ListListingsArgs, headers?: object, signal?: AbortSignal): Promise<ListListingsReturn> => {
2020
2140
  return this.fetch(this.url('ListListings'), createHTTPRequest(args, headers, signal)).then(
2021
- res => {
2022
- return buildResponse(res).then(_data => {
2141
+ (res) => {
2142
+ return buildResponse(res).then((_data) => {
2023
2143
  return {
2024
2144
  listings: <Array<Order>>_data.listings,
2025
- page: <Page>_data.page
2145
+ page: <Page>_data.page,
2026
2146
  }
2027
2147
  })
2028
2148
  },
2029
- error => {
2030
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2031
- }
2149
+ (error) => {
2150
+ throw WebrpcRequestFailedError.new({
2151
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2152
+ })
2153
+ },
2032
2154
  )
2033
2155
  }
2034
2156
 
2035
2157
  listOffers = (args: ListOffersArgs, headers?: object, signal?: AbortSignal): Promise<ListOffersReturn> => {
2036
2158
  return this.fetch(this.url('ListOffers'), createHTTPRequest(args, headers, signal)).then(
2037
- res => {
2038
- return buildResponse(res).then(_data => {
2159
+ (res) => {
2160
+ return buildResponse(res).then((_data) => {
2039
2161
  return {
2040
2162
  offers: <Array<Order>>_data.offers,
2041
- page: <Page>_data.page
2163
+ page: <Page>_data.page,
2042
2164
  }
2043
2165
  })
2044
2166
  },
2045
- error => {
2046
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2047
- }
2167
+ (error) => {
2168
+ throw WebrpcRequestFailedError.new({
2169
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2170
+ })
2171
+ },
2048
2172
  )
2049
2173
  }
2050
2174
 
2051
2175
  getCountOfListingsForCollectible = (
2052
2176
  args: GetCountOfListingsForCollectibleArgs,
2053
2177
  headers?: object,
2054
- signal?: AbortSignal
2178
+ signal?: AbortSignal,
2055
2179
  ): Promise<GetCountOfListingsForCollectibleReturn> => {
2056
2180
  return this.fetch(this.url('GetCountOfListingsForCollectible'), createHTTPRequest(args, headers, signal)).then(
2057
- res => {
2058
- return buildResponse(res).then(_data => {
2181
+ (res) => {
2182
+ return buildResponse(res).then((_data) => {
2059
2183
  return {
2060
- count: <number>_data.count
2184
+ count: <number>_data.count,
2061
2185
  }
2062
2186
  })
2063
2187
  },
2064
- error => {
2065
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2066
- }
2188
+ (error) => {
2189
+ throw WebrpcRequestFailedError.new({
2190
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2191
+ })
2192
+ },
2067
2193
  )
2068
2194
  }
2069
2195
 
2070
2196
  getCountOfOffersForCollectible = (
2071
2197
  args: GetCountOfOffersForCollectibleArgs,
2072
2198
  headers?: object,
2073
- signal?: AbortSignal
2199
+ signal?: AbortSignal,
2074
2200
  ): Promise<GetCountOfOffersForCollectibleReturn> => {
2075
2201
  return this.fetch(this.url('GetCountOfOffersForCollectible'), createHTTPRequest(args, headers, signal)).then(
2076
- res => {
2077
- return buildResponse(res).then(_data => {
2202
+ (res) => {
2203
+ return buildResponse(res).then((_data) => {
2078
2204
  return {
2079
- count: <number>_data.count
2205
+ count: <number>_data.count,
2080
2206
  }
2081
2207
  })
2082
2208
  },
2083
- error => {
2084
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2085
- }
2209
+ (error) => {
2210
+ throw WebrpcRequestFailedError.new({
2211
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2212
+ })
2213
+ },
2086
2214
  )
2087
2215
  }
2088
2216
 
2089
2217
  getCollectibleLowestOffer = (
2090
2218
  args: GetCollectibleLowestOfferArgs,
2091
2219
  headers?: object,
2092
- signal?: AbortSignal
2220
+ signal?: AbortSignal,
2093
2221
  ): Promise<GetCollectibleLowestOfferReturn> => {
2094
2222
  return this.fetch(this.url('GetCollectibleLowestOffer'), createHTTPRequest(args, headers, signal)).then(
2095
- res => {
2096
- return buildResponse(res).then(_data => {
2223
+ (res) => {
2224
+ return buildResponse(res).then((_data) => {
2097
2225
  return {
2098
- order: <Order>_data.order
2226
+ order: <Order>_data.order,
2099
2227
  }
2100
2228
  })
2101
2229
  },
2102
- error => {
2103
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2104
- }
2230
+ (error) => {
2231
+ throw WebrpcRequestFailedError.new({
2232
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2233
+ })
2234
+ },
2105
2235
  )
2106
2236
  }
2107
2237
 
2108
2238
  getCollectibleHighestOffer = (
2109
2239
  args: GetCollectibleHighestOfferArgs,
2110
2240
  headers?: object,
2111
- signal?: AbortSignal
2241
+ signal?: AbortSignal,
2112
2242
  ): Promise<GetCollectibleHighestOfferReturn> => {
2113
2243
  return this.fetch(this.url('GetCollectibleHighestOffer'), createHTTPRequest(args, headers, signal)).then(
2114
- res => {
2115
- return buildResponse(res).then(_data => {
2244
+ (res) => {
2245
+ return buildResponse(res).then((_data) => {
2116
2246
  return {
2117
- order: <Order>_data.order
2247
+ order: <Order>_data.order,
2118
2248
  }
2119
2249
  })
2120
2250
  },
2121
- error => {
2122
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2123
- }
2251
+ (error) => {
2252
+ throw WebrpcRequestFailedError.new({
2253
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2254
+ })
2255
+ },
2124
2256
  )
2125
2257
  }
2126
2258
 
2127
2259
  getCollectibleLowestListing = (
2128
2260
  args: GetCollectibleLowestListingArgs,
2129
2261
  headers?: object,
2130
- signal?: AbortSignal
2262
+ signal?: AbortSignal,
2131
2263
  ): Promise<GetCollectibleLowestListingReturn> => {
2132
2264
  return this.fetch(this.url('GetCollectibleLowestListing'), createHTTPRequest(args, headers, signal)).then(
2133
- res => {
2134
- return buildResponse(res).then(_data => {
2265
+ (res) => {
2266
+ return buildResponse(res).then((_data) => {
2135
2267
  return {
2136
- order: <Order>_data.order
2268
+ order: <Order>_data.order,
2137
2269
  }
2138
2270
  })
2139
2271
  },
2140
- error => {
2141
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2142
- }
2272
+ (error) => {
2273
+ throw WebrpcRequestFailedError.new({
2274
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2275
+ })
2276
+ },
2143
2277
  )
2144
2278
  }
2145
2279
 
2146
2280
  getCollectibleHighestListing = (
2147
2281
  args: GetCollectibleHighestListingArgs,
2148
2282
  headers?: object,
2149
- signal?: AbortSignal
2283
+ signal?: AbortSignal,
2150
2284
  ): Promise<GetCollectibleHighestListingReturn> => {
2151
2285
  return this.fetch(this.url('GetCollectibleHighestListing'), createHTTPRequest(args, headers, signal)).then(
2152
- res => {
2153
- return buildResponse(res).then(_data => {
2286
+ (res) => {
2287
+ return buildResponse(res).then((_data) => {
2154
2288
  return {
2155
- order: <Order>_data.order
2289
+ order: <Order>_data.order,
2156
2290
  }
2157
2291
  })
2158
2292
  },
2159
- error => {
2160
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2161
- }
2293
+ (error) => {
2294
+ throw WebrpcRequestFailedError.new({
2295
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2296
+ })
2297
+ },
2162
2298
  )
2163
2299
  }
2164
2300
 
2165
2301
  listCollectibleListings = (
2166
2302
  args: ListCollectibleListingsArgs,
2167
2303
  headers?: object,
2168
- signal?: AbortSignal
2304
+ signal?: AbortSignal,
2169
2305
  ): Promise<ListCollectibleListingsReturn> => {
2170
2306
  return this.fetch(this.url('ListCollectibleListings'), createHTTPRequest(args, headers, signal)).then(
2171
- res => {
2172
- return buildResponse(res).then(_data => {
2307
+ (res) => {
2308
+ return buildResponse(res).then((_data) => {
2173
2309
  return {
2174
2310
  listings: <Array<Order>>_data.listings,
2175
- page: <Page>_data.page
2311
+ page: <Page>_data.page,
2176
2312
  }
2177
2313
  })
2178
2314
  },
2179
- error => {
2180
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2181
- }
2315
+ (error) => {
2316
+ throw WebrpcRequestFailedError.new({
2317
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2318
+ })
2319
+ },
2182
2320
  )
2183
2321
  }
2184
2322
 
2185
2323
  listCollectibleOffers = (
2186
2324
  args: ListCollectibleOffersArgs,
2187
2325
  headers?: object,
2188
- signal?: AbortSignal
2326
+ signal?: AbortSignal,
2189
2327
  ): Promise<ListCollectibleOffersReturn> => {
2190
2328
  return this.fetch(this.url('ListCollectibleOffers'), createHTTPRequest(args, headers, signal)).then(
2191
- res => {
2192
- return buildResponse(res).then(_data => {
2329
+ (res) => {
2330
+ return buildResponse(res).then((_data) => {
2193
2331
  return {
2194
2332
  offers: <Array<Order>>_data.offers,
2195
- page: <Page>_data.page
2333
+ page: <Page>_data.page,
2196
2334
  }
2197
2335
  })
2198
2336
  },
2199
- error => {
2200
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2201
- }
2337
+ (error) => {
2338
+ throw WebrpcRequestFailedError.new({
2339
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2340
+ })
2341
+ },
2202
2342
  )
2203
2343
  }
2204
2344
 
2205
2345
  generateBuyTransaction = (
2206
2346
  args: GenerateBuyTransactionArgs,
2207
2347
  headers?: object,
2208
- signal?: AbortSignal
2348
+ signal?: AbortSignal,
2209
2349
  ): Promise<GenerateBuyTransactionReturn> => {
2210
2350
  return this.fetch(this.url('GenerateBuyTransaction'), createHTTPRequest(args, headers, signal)).then(
2211
- res => {
2212
- return buildResponse(res).then(_data => {
2351
+ (res) => {
2352
+ return buildResponse(res).then((_data) => {
2213
2353
  return {
2214
- steps: <Array<Step>>_data.steps
2354
+ steps: <Array<Step>>_data.steps,
2215
2355
  }
2216
2356
  })
2217
2357
  },
2218
- error => {
2219
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2220
- }
2358
+ (error) => {
2359
+ throw WebrpcRequestFailedError.new({
2360
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2361
+ })
2362
+ },
2221
2363
  )
2222
2364
  }
2223
2365
 
2224
2366
  generateSellTransaction = (
2225
2367
  args: GenerateSellTransactionArgs,
2226
2368
  headers?: object,
2227
- signal?: AbortSignal
2369
+ signal?: AbortSignal,
2228
2370
  ): Promise<GenerateSellTransactionReturn> => {
2229
2371
  return this.fetch(this.url('GenerateSellTransaction'), createHTTPRequest(args, headers, signal)).then(
2230
- res => {
2231
- return buildResponse(res).then(_data => {
2372
+ (res) => {
2373
+ return buildResponse(res).then((_data) => {
2232
2374
  return {
2233
- steps: <Array<Step>>_data.steps
2375
+ steps: <Array<Step>>_data.steps,
2234
2376
  }
2235
2377
  })
2236
2378
  },
2237
- error => {
2238
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2239
- }
2379
+ (error) => {
2380
+ throw WebrpcRequestFailedError.new({
2381
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2382
+ })
2383
+ },
2240
2384
  )
2241
2385
  }
2242
2386
 
2243
2387
  generateListingTransaction = (
2244
2388
  args: GenerateListingTransactionArgs,
2245
2389
  headers?: object,
2246
- signal?: AbortSignal
2390
+ signal?: AbortSignal,
2247
2391
  ): Promise<GenerateListingTransactionReturn> => {
2248
2392
  return this.fetch(this.url('GenerateListingTransaction'), createHTTPRequest(args, headers, signal)).then(
2249
- res => {
2250
- return buildResponse(res).then(_data => {
2393
+ (res) => {
2394
+ return buildResponse(res).then((_data) => {
2251
2395
  return {
2252
- steps: <Array<Step>>_data.steps
2396
+ steps: <Array<Step>>_data.steps,
2253
2397
  }
2254
2398
  })
2255
2399
  },
2256
- error => {
2257
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2258
- }
2400
+ (error) => {
2401
+ throw WebrpcRequestFailedError.new({
2402
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2403
+ })
2404
+ },
2259
2405
  )
2260
2406
  }
2261
2407
 
2262
2408
  generateOfferTransaction = (
2263
2409
  args: GenerateOfferTransactionArgs,
2264
2410
  headers?: object,
2265
- signal?: AbortSignal
2411
+ signal?: AbortSignal,
2266
2412
  ): Promise<GenerateOfferTransactionReturn> => {
2267
2413
  return this.fetch(this.url('GenerateOfferTransaction'), createHTTPRequest(args, headers, signal)).then(
2268
- res => {
2269
- return buildResponse(res).then(_data => {
2414
+ (res) => {
2415
+ return buildResponse(res).then((_data) => {
2270
2416
  return {
2271
- steps: <Array<Step>>_data.steps
2417
+ steps: <Array<Step>>_data.steps,
2272
2418
  }
2273
2419
  })
2274
2420
  },
2275
- error => {
2276
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2277
- }
2421
+ (error) => {
2422
+ throw WebrpcRequestFailedError.new({
2423
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2424
+ })
2425
+ },
2278
2426
  )
2279
2427
  }
2280
2428
 
2281
2429
  generateCancelTransaction = (
2282
2430
  args: GenerateCancelTransactionArgs,
2283
2431
  headers?: object,
2284
- signal?: AbortSignal
2432
+ signal?: AbortSignal,
2285
2433
  ): Promise<GenerateCancelTransactionReturn> => {
2286
2434
  return this.fetch(this.url('GenerateCancelTransaction'), createHTTPRequest(args, headers, signal)).then(
2287
- res => {
2288
- return buildResponse(res).then(_data => {
2435
+ (res) => {
2436
+ return buildResponse(res).then((_data) => {
2289
2437
  return {
2290
- steps: <Array<Step>>_data.steps
2438
+ steps: <Array<Step>>_data.steps,
2291
2439
  }
2292
2440
  })
2293
2441
  },
2294
- error => {
2295
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2296
- }
2442
+ (error) => {
2443
+ throw WebrpcRequestFailedError.new({
2444
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2445
+ })
2446
+ },
2297
2447
  )
2298
2448
  }
2299
2449
 
2300
2450
  execute = (args: ExecuteArgs, headers?: object, signal?: AbortSignal): Promise<ExecuteReturn> => {
2301
2451
  return this.fetch(this.url('Execute'), createHTTPRequest(args, headers, signal)).then(
2302
- res => {
2303
- return buildResponse(res).then(_data => {
2452
+ (res) => {
2453
+ return buildResponse(res).then((_data) => {
2304
2454
  return {
2305
- orderId: <string>_data.orderId
2455
+ orderId: <string>_data.orderId,
2306
2456
  }
2307
2457
  })
2308
2458
  },
2309
- error => {
2310
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2311
- }
2459
+ (error) => {
2460
+ throw WebrpcRequestFailedError.new({
2461
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2462
+ })
2463
+ },
2312
2464
  )
2313
2465
  }
2314
2466
 
2315
- listCollectibles = (args: ListCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectiblesReturn> => {
2467
+ listCollectibles = (
2468
+ args: ListCollectiblesArgs,
2469
+ headers?: object,
2470
+ signal?: AbortSignal,
2471
+ ): Promise<ListCollectiblesReturn> => {
2316
2472
  return this.fetch(this.url('ListCollectibles'), createHTTPRequest(args, headers, signal)).then(
2317
- res => {
2318
- return buildResponse(res).then(_data => {
2473
+ (res) => {
2474
+ return buildResponse(res).then((_data) => {
2319
2475
  return {
2320
2476
  collectibles: <Array<CollectibleOrder>>_data.collectibles,
2321
- page: <Page>_data.page
2477
+ page: <Page>_data.page,
2322
2478
  }
2323
2479
  })
2324
2480
  },
2325
- error => {
2326
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2327
- }
2481
+ (error) => {
2482
+ throw WebrpcRequestFailedError.new({
2483
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2484
+ })
2485
+ },
2328
2486
  )
2329
2487
  }
2330
2488
 
2331
2489
  getCountOfAllCollectibles = (
2332
2490
  args: GetCountOfAllCollectiblesArgs,
2333
2491
  headers?: object,
2334
- signal?: AbortSignal
2492
+ signal?: AbortSignal,
2335
2493
  ): Promise<GetCountOfAllCollectiblesReturn> => {
2336
2494
  return this.fetch(this.url('GetCountOfAllCollectibles'), createHTTPRequest(args, headers, signal)).then(
2337
- res => {
2338
- return buildResponse(res).then(_data => {
2495
+ (res) => {
2496
+ return buildResponse(res).then((_data) => {
2339
2497
  return {
2340
- count: <number>_data.count
2498
+ count: <number>_data.count,
2341
2499
  }
2342
2500
  })
2343
2501
  },
2344
- error => {
2345
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2346
- }
2502
+ (error) => {
2503
+ throw WebrpcRequestFailedError.new({
2504
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2505
+ })
2506
+ },
2347
2507
  )
2348
2508
  }
2349
2509
 
2350
2510
  getCountOfFilteredCollectibles = (
2351
2511
  args: GetCountOfFilteredCollectiblesArgs,
2352
2512
  headers?: object,
2353
- signal?: AbortSignal
2513
+ signal?: AbortSignal,
2354
2514
  ): Promise<GetCountOfFilteredCollectiblesReturn> => {
2355
2515
  return this.fetch(this.url('GetCountOfFilteredCollectibles'), createHTTPRequest(args, headers, signal)).then(
2356
- res => {
2357
- return buildResponse(res).then(_data => {
2516
+ (res) => {
2517
+ return buildResponse(res).then((_data) => {
2358
2518
  return {
2359
- count: <number>_data.count
2519
+ count: <number>_data.count,
2360
2520
  }
2361
2521
  })
2362
2522
  },
2363
- error => {
2364
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2365
- }
2523
+ (error) => {
2524
+ throw WebrpcRequestFailedError.new({
2525
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2526
+ })
2527
+ },
2366
2528
  )
2367
2529
  }
2368
2530
 
2369
2531
  getFloorOrder = (args: GetFloorOrderArgs, headers?: object, signal?: AbortSignal): Promise<GetFloorOrderReturn> => {
2370
2532
  return this.fetch(this.url('GetFloorOrder'), createHTTPRequest(args, headers, signal)).then(
2371
- res => {
2372
- return buildResponse(res).then(_data => {
2533
+ (res) => {
2534
+ return buildResponse(res).then((_data) => {
2373
2535
  return {
2374
- collectible: <CollectibleOrder>_data.collectible
2536
+ collectible: <CollectibleOrder>_data.collectible,
2375
2537
  }
2376
2538
  })
2377
2539
  },
2378
- error => {
2379
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2380
- }
2540
+ (error) => {
2541
+ throw WebrpcRequestFailedError.new({
2542
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2543
+ })
2544
+ },
2381
2545
  )
2382
2546
  }
2383
2547
 
2384
2548
  listCollectionActivities = (
2385
2549
  args: ListCollectionActivitiesArgs,
2386
2550
  headers?: object,
2387
- signal?: AbortSignal
2551
+ signal?: AbortSignal,
2388
2552
  ): Promise<ListCollectionActivitiesReturn> => {
2389
2553
  return this.fetch(this.url('ListCollectionActivities'), createHTTPRequest(args, headers, signal)).then(
2390
- res => {
2391
- return buildResponse(res).then(_data => {
2554
+ (res) => {
2555
+ return buildResponse(res).then((_data) => {
2392
2556
  return {
2393
2557
  activities: <Array<Activity>>_data.activities,
2394
- page: <Page>_data.page
2558
+ page: <Page>_data.page,
2395
2559
  }
2396
2560
  })
2397
2561
  },
2398
- error => {
2399
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2400
- }
2562
+ (error) => {
2563
+ throw WebrpcRequestFailedError.new({
2564
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2565
+ })
2566
+ },
2401
2567
  )
2402
2568
  }
2403
2569
 
2404
2570
  listCollectibleActivities = (
2405
2571
  args: ListCollectibleActivitiesArgs,
2406
2572
  headers?: object,
2407
- signal?: AbortSignal
2573
+ signal?: AbortSignal,
2408
2574
  ): Promise<ListCollectibleActivitiesReturn> => {
2409
2575
  return this.fetch(this.url('ListCollectibleActivities'), createHTTPRequest(args, headers, signal)).then(
2410
- res => {
2411
- return buildResponse(res).then(_data => {
2576
+ (res) => {
2577
+ return buildResponse(res).then((_data) => {
2412
2578
  return {
2413
2579
  activities: <Array<Activity>>_data.activities,
2414
- page: <Page>_data.page
2580
+ page: <Page>_data.page,
2415
2581
  }
2416
2582
  })
2417
2583
  },
2418
- error => {
2419
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2420
- }
2584
+ (error) => {
2585
+ throw WebrpcRequestFailedError.new({
2586
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2587
+ })
2588
+ },
2421
2589
  )
2422
2590
  }
2423
2591
 
2424
2592
  listCollectiblesWithLowestListing = (
2425
2593
  args: ListCollectiblesWithLowestListingArgs,
2426
2594
  headers?: object,
2427
- signal?: AbortSignal
2595
+ signal?: AbortSignal,
2428
2596
  ): Promise<ListCollectiblesWithLowestListingReturn> => {
2429
2597
  return this.fetch(this.url('ListCollectiblesWithLowestListing'), createHTTPRequest(args, headers, signal)).then(
2430
- res => {
2431
- return buildResponse(res).then(_data => {
2598
+ (res) => {
2599
+ return buildResponse(res).then((_data) => {
2432
2600
  return {
2433
2601
  collectibles: <Array<CollectibleOrder>>_data.collectibles,
2434
- page: <Page>_data.page
2602
+ page: <Page>_data.page,
2435
2603
  }
2436
2604
  })
2437
2605
  },
2438
- error => {
2439
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2440
- }
2606
+ (error) => {
2607
+ throw WebrpcRequestFailedError.new({
2608
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2609
+ })
2610
+ },
2441
2611
  )
2442
2612
  }
2443
2613
 
2444
2614
  listCollectiblesWithHighestOffer = (
2445
2615
  args: ListCollectiblesWithHighestOfferArgs,
2446
2616
  headers?: object,
2447
- signal?: AbortSignal
2617
+ signal?: AbortSignal,
2448
2618
  ): Promise<ListCollectiblesWithHighestOfferReturn> => {
2449
2619
  return this.fetch(this.url('ListCollectiblesWithHighestOffer'), createHTTPRequest(args, headers, signal)).then(
2450
- res => {
2451
- return buildResponse(res).then(_data => {
2620
+ (res) => {
2621
+ return buildResponse(res).then((_data) => {
2452
2622
  return {
2453
2623
  collectibles: <Array<CollectibleOrder>>_data.collectibles,
2454
- page: <Page>_data.page
2624
+ page: <Page>_data.page,
2455
2625
  }
2456
2626
  })
2457
2627
  },
2458
- error => {
2459
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2460
- }
2628
+ (error) => {
2629
+ throw WebrpcRequestFailedError.new({
2630
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2631
+ })
2632
+ },
2461
2633
  )
2462
2634
  }
2463
2635
 
2464
2636
  syncOrder = (args: SyncOrderArgs, headers?: object, signal?: AbortSignal): Promise<SyncOrderReturn> => {
2465
2637
  return this.fetch(this.url('SyncOrder'), createHTTPRequest(args, headers, signal)).then(
2466
- res => {
2467
- return buildResponse(res).then(_data => {
2638
+ (res) => {
2639
+ return buildResponse(res).then((_data) => {
2468
2640
  return {}
2469
2641
  })
2470
2642
  },
2471
- error => {
2472
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2473
- }
2643
+ (error) => {
2644
+ throw WebrpcRequestFailedError.new({
2645
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2646
+ })
2647
+ },
2474
2648
  )
2475
2649
  }
2476
2650
 
2477
2651
  syncOrders = (args: SyncOrdersArgs, headers?: object, signal?: AbortSignal): Promise<SyncOrdersReturn> => {
2478
2652
  return this.fetch(this.url('SyncOrders'), createHTTPRequest(args, headers, signal)).then(
2479
- res => {
2480
- return buildResponse(res).then(_data => {
2653
+ (res) => {
2654
+ return buildResponse(res).then((_data) => {
2481
2655
  return {}
2482
2656
  })
2483
2657
  },
2484
- error => {
2485
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2486
- }
2658
+ (error) => {
2659
+ throw WebrpcRequestFailedError.new({
2660
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2661
+ })
2662
+ },
2487
2663
  )
2488
2664
  }
2489
2665
 
2490
2666
  getOrders = (args: GetOrdersArgs, headers?: object, signal?: AbortSignal): Promise<GetOrdersReturn> => {
2491
2667
  return this.fetch(this.url('GetOrders'), createHTTPRequest(args, headers, signal)).then(
2492
- res => {
2493
- return buildResponse(res).then(_data => {
2668
+ (res) => {
2669
+ return buildResponse(res).then((_data) => {
2494
2670
  return {
2495
2671
  orders: <Array<Order>>_data.orders,
2496
- page: <Page>_data.page
2672
+ page: <Page>_data.page,
2497
2673
  }
2498
2674
  })
2499
2675
  },
2500
- error => {
2501
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2502
- }
2676
+ (error) => {
2677
+ throw WebrpcRequestFailedError.new({
2678
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2679
+ })
2680
+ },
2503
2681
  )
2504
2682
  }
2505
2683
 
2506
2684
  checkoutOptionsMarketplace = (
2507
2685
  args: CheckoutOptionsMarketplaceArgs,
2508
2686
  headers?: object,
2509
- signal?: AbortSignal
2687
+ signal?: AbortSignal,
2510
2688
  ): Promise<CheckoutOptionsMarketplaceReturn> => {
2511
2689
  return this.fetch(this.url('CheckoutOptionsMarketplace'), createHTTPRequest(args, headers, signal)).then(
2512
- res => {
2513
- return buildResponse(res).then(_data => {
2690
+ (res) => {
2691
+ return buildResponse(res).then((_data) => {
2514
2692
  return {
2515
- options: <CheckoutOptions>_data.options
2693
+ options: <CheckoutOptions>_data.options,
2516
2694
  }
2517
2695
  })
2518
2696
  },
2519
- error => {
2520
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2521
- }
2697
+ (error) => {
2698
+ throw WebrpcRequestFailedError.new({
2699
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2700
+ })
2701
+ },
2522
2702
  )
2523
2703
  }
2524
2704
 
2525
2705
  checkoutOptionsSalesContract = (
2526
2706
  args: CheckoutOptionsSalesContractArgs,
2527
2707
  headers?: object,
2528
- signal?: AbortSignal
2708
+ signal?: AbortSignal,
2529
2709
  ): Promise<CheckoutOptionsSalesContractReturn> => {
2530
2710
  return this.fetch(this.url('CheckoutOptionsSalesContract'), createHTTPRequest(args, headers, signal)).then(
2531
- res => {
2532
- return buildResponse(res).then(_data => {
2711
+ (res) => {
2712
+ return buildResponse(res).then((_data) => {
2533
2713
  return {
2534
- options: <CheckoutOptions>_data.options
2714
+ options: <CheckoutOptions>_data.options,
2535
2715
  }
2536
2716
  })
2537
2717
  },
2538
- error => {
2539
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2540
- }
2718
+ (error) => {
2719
+ throw WebrpcRequestFailedError.new({
2720
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2721
+ })
2722
+ },
2541
2723
  )
2542
2724
  }
2543
2725
 
2544
2726
  supportedMarketplaces = (
2545
2727
  args: SupportedMarketplacesArgs,
2546
2728
  headers?: object,
2547
- signal?: AbortSignal
2729
+ signal?: AbortSignal,
2548
2730
  ): Promise<SupportedMarketplacesReturn> => {
2549
2731
  return this.fetch(this.url('SupportedMarketplaces'), createHTTPRequest(args, headers, signal)).then(
2550
- res => {
2551
- return buildResponse(res).then(_data => {
2732
+ (res) => {
2733
+ return buildResponse(res).then((_data) => {
2552
2734
  return {
2553
- marketplaces: <Array<MarketplaceKind>>_data.marketplaces
2735
+ marketplaces: <Array<MarketplaceKind>>_data.marketplaces,
2554
2736
  }
2555
2737
  })
2556
2738
  },
2557
- error => {
2558
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2559
- }
2739
+ (error) => {
2740
+ throw WebrpcRequestFailedError.new({
2741
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2742
+ })
2743
+ },
2560
2744
  )
2561
2745
  }
2562
2746
 
2563
2747
  getPrimarySaleItem = (
2564
2748
  args: GetPrimarySaleItemArgs,
2565
2749
  headers?: object,
2566
- signal?: AbortSignal
2750
+ signal?: AbortSignal,
2567
2751
  ): Promise<GetPrimarySaleItemReturn> => {
2568
2752
  return this.fetch(this.url('GetPrimarySaleItem'), createHTTPRequest(args, headers, signal)).then(
2569
- res => {
2570
- return buildResponse(res).then(_data => {
2753
+ (res) => {
2754
+ return buildResponse(res).then((_data) => {
2571
2755
  return {
2572
- item: <CollectiblePrimarySaleItem>_data.item
2756
+ item: <CollectiblePrimarySaleItem>_data.item,
2573
2757
  }
2574
2758
  })
2575
2759
  },
2576
- error => {
2577
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2578
- }
2760
+ (error) => {
2761
+ throw WebrpcRequestFailedError.new({
2762
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2763
+ })
2764
+ },
2579
2765
  )
2580
2766
  }
2581
2767
 
2582
2768
  listPrimarySaleItems = (
2583
2769
  args: ListPrimarySaleItemsArgs,
2584
2770
  headers?: object,
2585
- signal?: AbortSignal
2771
+ signal?: AbortSignal,
2586
2772
  ): Promise<ListPrimarySaleItemsReturn> => {
2587
2773
  return this.fetch(this.url('ListPrimarySaleItems'), createHTTPRequest(args, headers, signal)).then(
2588
- res => {
2589
- return buildResponse(res).then(_data => {
2774
+ (res) => {
2775
+ return buildResponse(res).then((_data) => {
2590
2776
  return {
2591
2777
  primarySaleItems: <Array<CollectiblePrimarySaleItem>>_data.primarySaleItems,
2592
- page: <Page>_data.page
2778
+ page: <Page>_data.page,
2593
2779
  }
2594
2780
  })
2595
2781
  },
2596
- error => {
2597
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2598
- }
2782
+ (error) => {
2783
+ throw WebrpcRequestFailedError.new({
2784
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2785
+ })
2786
+ },
2599
2787
  )
2600
2788
  }
2601
2789
 
2602
2790
  getCountOfPrimarySaleItems = (
2603
2791
  args: GetCountOfPrimarySaleItemsArgs,
2604
2792
  headers?: object,
2605
- signal?: AbortSignal
2793
+ signal?: AbortSignal,
2606
2794
  ): Promise<GetCountOfPrimarySaleItemsReturn> => {
2607
2795
  return this.fetch(this.url('GetCountOfPrimarySaleItems'), createHTTPRequest(args, headers, signal)).then(
2608
- res => {
2609
- return buildResponse(res).then(_data => {
2796
+ (res) => {
2797
+ return buildResponse(res).then((_data) => {
2610
2798
  return {
2611
- count: <number>_data.count
2799
+ count: <number>_data.count,
2612
2800
  }
2613
2801
  })
2614
2802
  },
2615
- error => {
2616
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
2617
- }
2803
+ (error) => {
2804
+ throw WebrpcRequestFailedError.new({
2805
+ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
2806
+ })
2807
+ },
2618
2808
  )
2619
2809
  }
2620
2810
  }
@@ -2627,19 +2817,19 @@ const createHTTPRequest = (body: object = {}, headers: object = {}, signal: Abor
2627
2817
  method: 'POST',
2628
2818
  headers: reqHeaders,
2629
2819
  body: JSON.stringify(body || {}),
2630
- signal
2820
+ signal,
2631
2821
  }
2632
2822
  }
2633
2823
 
2634
2824
  const buildResponse = (res: Response): Promise<any> => {
2635
- return res.text().then(text => {
2825
+ return res.text().then((text) => {
2636
2826
  let data
2637
2827
  try {
2638
2828
  data = JSON.parse(text)
2639
2829
  } catch (error) {
2640
2830
  throw WebrpcBadResponseError.new({
2641
2831
  status: res.status,
2642
- cause: `JSON.parse(): ${error instanceof Error ? error.message : String(error)}: response text: ${text}`
2832
+ cause: `JSON.parse(): ${error instanceof Error ? error.message : String(error)}: response text: ${text}`,
2643
2833
  })
2644
2834
  }
2645
2835
  if (!res.ok) {
@@ -2688,7 +2878,7 @@ export class WebrpcEndpointError extends WebrpcError {
2688
2878
  code: number = 0,
2689
2879
  message: string = `endpoint error`,
2690
2880
  status: number = 400,
2691
- cause?: string
2881
+ cause?: string,
2692
2882
  ) {
2693
2883
  super(name, code, message, status, cause)
2694
2884
  Object.setPrototypeOf(this, WebrpcEndpointError.prototype)
@@ -2701,7 +2891,7 @@ export class WebrpcRequestFailedError extends WebrpcError {
2701
2891
  code: number = -1,
2702
2892
  message: string = `request failed`,
2703
2893
  status: number = 400,
2704
- cause?: string
2894
+ cause?: string,
2705
2895
  ) {
2706
2896
  super(name, code, message, status, cause)
2707
2897
  Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype)
@@ -2714,7 +2904,7 @@ export class WebrpcBadRouteError extends WebrpcError {
2714
2904
  code: number = -2,
2715
2905
  message: string = `bad route`,
2716
2906
  status: number = 404,
2717
- cause?: string
2907
+ cause?: string,
2718
2908
  ) {
2719
2909
  super(name, code, message, status, cause)
2720
2910
  Object.setPrototypeOf(this, WebrpcBadRouteError.prototype)
@@ -2727,7 +2917,7 @@ export class WebrpcBadMethodError extends WebrpcError {
2727
2917
  code: number = -3,
2728
2918
  message: string = `bad method`,
2729
2919
  status: number = 405,
2730
- cause?: string
2920
+ cause?: string,
2731
2921
  ) {
2732
2922
  super(name, code, message, status, cause)
2733
2923
  Object.setPrototypeOf(this, WebrpcBadMethodError.prototype)
@@ -2740,7 +2930,7 @@ export class WebrpcBadRequestError extends WebrpcError {
2740
2930
  code: number = -4,
2741
2931
  message: string = `bad request`,
2742
2932
  status: number = 400,
2743
- cause?: string
2933
+ cause?: string,
2744
2934
  ) {
2745
2935
  super(name, code, message, status, cause)
2746
2936
  Object.setPrototypeOf(this, WebrpcBadRequestError.prototype)
@@ -2753,7 +2943,7 @@ export class WebrpcBadResponseError extends WebrpcError {
2753
2943
  code: number = -5,
2754
2944
  message: string = `bad response`,
2755
2945
  status: number = 500,
2756
- cause?: string
2946
+ cause?: string,
2757
2947
  ) {
2758
2948
  super(name, code, message, status, cause)
2759
2949
  Object.setPrototypeOf(this, WebrpcBadResponseError.prototype)
@@ -2766,7 +2956,7 @@ export class WebrpcServerPanicError extends WebrpcError {
2766
2956
  code: number = -6,
2767
2957
  message: string = `server panic`,
2768
2958
  status: number = 500,
2769
- cause?: string
2959
+ cause?: string,
2770
2960
  ) {
2771
2961
  super(name, code, message, status, cause)
2772
2962
  Object.setPrototypeOf(this, WebrpcServerPanicError.prototype)
@@ -2779,7 +2969,7 @@ export class WebrpcInternalErrorError extends WebrpcError {
2779
2969
  code: number = -7,
2780
2970
  message: string = `internal error`,
2781
2971
  status: number = 500,
2782
- cause?: string
2972
+ cause?: string,
2783
2973
  ) {
2784
2974
  super(name, code, message, status, cause)
2785
2975
  Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype)
@@ -2792,7 +2982,7 @@ export class WebrpcClientAbortedError extends WebrpcError {
2792
2982
  code: number = -8,
2793
2983
  message: string = `request aborted by client`,
2794
2984
  status: number = 400,
2795
- cause?: string
2985
+ cause?: string,
2796
2986
  ) {
2797
2987
  super(name, code, message, status, cause)
2798
2988
  Object.setPrototypeOf(this, WebrpcClientAbortedError.prototype)
@@ -2805,7 +2995,7 @@ export class WebrpcStreamLostError extends WebrpcError {
2805
2995
  code: number = -9,
2806
2996
  message: string = `stream lost`,
2807
2997
  status: number = 400,
2808
- cause?: string
2998
+ cause?: string,
2809
2999
  ) {
2810
3000
  super(name, code, message, status, cause)
2811
3001
  Object.setPrototypeOf(this, WebrpcStreamLostError.prototype)
@@ -2818,7 +3008,7 @@ export class WebrpcStreamFinishedError extends WebrpcError {
2818
3008
  code: number = -10,
2819
3009
  message: string = `stream finished`,
2820
3010
  status: number = 200,
2821
- cause?: string
3011
+ cause?: string,
2822
3012
  ) {
2823
3013
  super(name, code, message, status, cause)
2824
3014
  Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype)
@@ -2833,7 +3023,7 @@ export class UnauthorizedError extends WebrpcError {
2833
3023
  code: number = 1000,
2834
3024
  message: string = `Unauthorized access`,
2835
3025
  status: number = 401,
2836
- cause?: string
3026
+ cause?: string,
2837
3027
  ) {
2838
3028
  super(name, code, message, status, cause)
2839
3029
  Object.setPrototypeOf(this, UnauthorizedError.prototype)
@@ -2846,7 +3036,7 @@ export class PermissionDeniedError extends WebrpcError {
2846
3036
  code: number = 1001,
2847
3037
  message: string = `Permission denied`,
2848
3038
  status: number = 403,
2849
- cause?: string
3039
+ cause?: string,
2850
3040
  ) {
2851
3041
  super(name, code, message, status, cause)
2852
3042
  Object.setPrototypeOf(this, PermissionDeniedError.prototype)
@@ -2859,7 +3049,7 @@ export class SessionExpiredError extends WebrpcError {
2859
3049
  code: number = 1002,
2860
3050
  message: string = `Session expired`,
2861
3051
  status: number = 403,
2862
- cause?: string
3052
+ cause?: string,
2863
3053
  ) {
2864
3054
  super(name, code, message, status, cause)
2865
3055
  Object.setPrototypeOf(this, SessionExpiredError.prototype)
@@ -2872,7 +3062,7 @@ export class MethodNotFoundError extends WebrpcError {
2872
3062
  code: number = 1003,
2873
3063
  message: string = `Method not found`,
2874
3064
  status: number = 404,
2875
- cause?: string
3065
+ cause?: string,
2876
3066
  ) {
2877
3067
  super(name, code, message, status, cause)
2878
3068
  Object.setPrototypeOf(this, MethodNotFoundError.prototype)
@@ -2885,7 +3075,7 @@ export class RequestConflictError extends WebrpcError {
2885
3075
  code: number = 1004,
2886
3076
  message: string = `Conflict with target resource`,
2887
3077
  status: number = 409,
2888
- cause?: string
3078
+ cause?: string,
2889
3079
  ) {
2890
3080
  super(name, code, message, status, cause)
2891
3081
  Object.setPrototypeOf(this, RequestConflictError.prototype)
@@ -2898,7 +3088,7 @@ export class AbortedError extends WebrpcError {
2898
3088
  code: number = 1005,
2899
3089
  message: string = `Request aborted`,
2900
3090
  status: number = 400,
2901
- cause?: string
3091
+ cause?: string,
2902
3092
  ) {
2903
3093
  super(name, code, message, status, cause)
2904
3094
  Object.setPrototypeOf(this, AbortedError.prototype)
@@ -2911,7 +3101,7 @@ export class GeoblockedError extends WebrpcError {
2911
3101
  code: number = 1006,
2912
3102
  message: string = `Geoblocked region`,
2913
3103
  status: number = 451,
2914
- cause?: string
3104
+ cause?: string,
2915
3105
  ) {
2916
3106
  super(name, code, message, status, cause)
2917
3107
  Object.setPrototypeOf(this, GeoblockedError.prototype)
@@ -2924,7 +3114,7 @@ export class RateLimitedError extends WebrpcError {
2924
3114
  code: number = 1007,
2925
3115
  message: string = `Rate-limited. Please slow down.`,
2926
3116
  status: number = 429,
2927
- cause?: string
3117
+ cause?: string,
2928
3118
  ) {
2929
3119
  super(name, code, message, status, cause)
2930
3120
  Object.setPrototypeOf(this, RateLimitedError.prototype)
@@ -2937,7 +3127,7 @@ export class ProjectNotFoundError extends WebrpcError {
2937
3127
  code: number = 1008,
2938
3128
  message: string = `Project not found`,
2939
3129
  status: number = 401,
2940
- cause?: string
3130
+ cause?: string,
2941
3131
  ) {
2942
3132
  super(name, code, message, status, cause)
2943
3133
  Object.setPrototypeOf(this, ProjectNotFoundError.prototype)
@@ -2950,7 +3140,7 @@ export class SecretKeyCorsDisallowedError extends WebrpcError {
2950
3140
  code: number = 1009,
2951
3141
  message: string = `CORS disallowed. Admin API Secret Key can't be used from a web app.`,
2952
3142
  status: number = 403,
2953
- cause?: string
3143
+ cause?: string,
2954
3144
  ) {
2955
3145
  super(name, code, message, status, cause)
2956
3146
  Object.setPrototypeOf(this, SecretKeyCorsDisallowedError.prototype)
@@ -2963,7 +3153,7 @@ export class AccessKeyNotFoundError extends WebrpcError {
2963
3153
  code: number = 1101,
2964
3154
  message: string = `Access key not found`,
2965
3155
  status: number = 401,
2966
- cause?: string
3156
+ cause?: string,
2967
3157
  ) {
2968
3158
  super(name, code, message, status, cause)
2969
3159
  Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype)
@@ -2976,7 +3166,7 @@ export class AccessKeyMismatchError extends WebrpcError {
2976
3166
  code: number = 1102,
2977
3167
  message: string = `Access key mismatch`,
2978
3168
  status: number = 403,
2979
- cause?: string
3169
+ cause?: string,
2980
3170
  ) {
2981
3171
  super(name, code, message, status, cause)
2982
3172
  Object.setPrototypeOf(this, AccessKeyMismatchError.prototype)
@@ -2989,7 +3179,7 @@ export class InvalidOriginError extends WebrpcError {
2989
3179
  code: number = 1103,
2990
3180
  message: string = `Invalid origin for Access Key`,
2991
3181
  status: number = 403,
2992
- cause?: string
3182
+ cause?: string,
2993
3183
  ) {
2994
3184
  super(name, code, message, status, cause)
2995
3185
  Object.setPrototypeOf(this, InvalidOriginError.prototype)
@@ -3002,7 +3192,7 @@ export class InvalidServiceError extends WebrpcError {
3002
3192
  code: number = 1104,
3003
3193
  message: string = `Service not enabled for Access key`,
3004
3194
  status: number = 403,
3005
- cause?: string
3195
+ cause?: string,
3006
3196
  ) {
3007
3197
  super(name, code, message, status, cause)
3008
3198
  Object.setPrototypeOf(this, InvalidServiceError.prototype)
@@ -3015,7 +3205,7 @@ export class UnauthorizedUserError extends WebrpcError {
3015
3205
  code: number = 1105,
3016
3206
  message: string = `Unauthorized user`,
3017
3207
  status: number = 403,
3018
- cause?: string
3208
+ cause?: string,
3019
3209
  ) {
3020
3210
  super(name, code, message, status, cause)
3021
3211
  Object.setPrototypeOf(this, UnauthorizedUserError.prototype)
@@ -3028,7 +3218,7 @@ export class InvalidChainError extends WebrpcError {
3028
3218
  code: number = 1106,
3029
3219
  message: string = `Network not enabled for Access key`,
3030
3220
  status: number = 403,
3031
- cause?: string
3221
+ cause?: string,
3032
3222
  ) {
3033
3223
  super(name, code, message, status, cause)
3034
3224
  Object.setPrototypeOf(this, InvalidChainError.prototype)
@@ -3041,7 +3231,7 @@ export class QuotaExceededError extends WebrpcError {
3041
3231
  code: number = 1200,
3042
3232
  message: string = `Quota request exceeded`,
3043
3233
  status: number = 429,
3044
- cause?: string
3234
+ cause?: string,
3045
3235
  ) {
3046
3236
  super(name, code, message, status, cause)
3047
3237
  Object.setPrototypeOf(this, QuotaExceededError.prototype)
@@ -3054,7 +3244,7 @@ export class QuotaRateLimitError extends WebrpcError {
3054
3244
  code: number = 1201,
3055
3245
  message: string = `Quota rate limit exceeded`,
3056
3246
  status: number = 429,
3057
- cause?: string
3247
+ cause?: string,
3058
3248
  ) {
3059
3249
  super(name, code, message, status, cause)
3060
3250
  Object.setPrototypeOf(this, QuotaRateLimitError.prototype)
@@ -3067,7 +3257,7 @@ export class NoDefaultKeyError extends WebrpcError {
3067
3257
  code: number = 1300,
3068
3258
  message: string = `No default access key found`,
3069
3259
  status: number = 403,
3070
- cause?: string
3260
+ cause?: string,
3071
3261
  ) {
3072
3262
  super(name, code, message, status, cause)
3073
3263
  Object.setPrototypeOf(this, NoDefaultKeyError.prototype)
@@ -3080,7 +3270,7 @@ export class MaxAccessKeysError extends WebrpcError {
3080
3270
  code: number = 1301,
3081
3271
  message: string = `Access keys limit reached`,
3082
3272
  status: number = 403,
3083
- cause?: string
3273
+ cause?: string,
3084
3274
  ) {
3085
3275
  super(name, code, message, status, cause)
3086
3276
  Object.setPrototypeOf(this, MaxAccessKeysError.prototype)
@@ -3093,7 +3283,7 @@ export class AtLeastOneKeyError extends WebrpcError {
3093
3283
  code: number = 1302,
3094
3284
  message: string = `You need at least one Access Key`,
3095
3285
  status: number = 403,
3096
- cause?: string
3286
+ cause?: string,
3097
3287
  ) {
3098
3288
  super(name, code, message, status, cause)
3099
3289
  Object.setPrototypeOf(this, AtLeastOneKeyError.prototype)
@@ -3106,7 +3296,7 @@ export class TimeoutError extends WebrpcError {
3106
3296
  code: number = 1900,
3107
3297
  message: string = `Request timed out`,
3108
3298
  status: number = 408,
3109
- cause?: string
3299
+ cause?: string,
3110
3300
  ) {
3111
3301
  super(name, code, message, status, cause)
3112
3302
  Object.setPrototypeOf(this, TimeoutError.prototype)
@@ -3119,7 +3309,7 @@ export class NotFoundError extends WebrpcError {
3119
3309
  code: number = 2000,
3120
3310
  message: string = `Resource not found`,
3121
3311
  status: number = 400,
3122
- cause?: string
3312
+ cause?: string,
3123
3313
  ) {
3124
3314
  super(name, code, message, status, cause)
3125
3315
  Object.setPrototypeOf(this, NotFoundError.prototype)
@@ -3132,7 +3322,7 @@ export class InvalidArgumentError extends WebrpcError {
3132
3322
  code: number = 2001,
3133
3323
  message: string = `Invalid argument`,
3134
3324
  status: number = 400,
3135
- cause?: string
3325
+ cause?: string,
3136
3326
  ) {
3137
3327
  super(name, code, message, status, cause)
3138
3328
  Object.setPrototypeOf(this, InvalidArgumentError.prototype)
@@ -3145,7 +3335,7 @@ export class NotImplementedError extends WebrpcError {
3145
3335
  code: number = 9999,
3146
3336
  message: string = `Not Implemented`,
3147
3337
  status: number = 500,
3148
- cause?: string
3338
+ cause?: string,
3149
3339
  ) {
3150
3340
  super(name, code, message, status, cause)
3151
3341
  Object.setPrototypeOf(this, NotImplementedError.prototype)
@@ -3188,7 +3378,7 @@ export enum errors {
3188
3378
  Timeout = 'Timeout',
3189
3379
  NotFound = 'NotFound',
3190
3380
  InvalidArgument = 'InvalidArgument',
3191
- NotImplemented = 'NotImplemented'
3381
+ NotImplemented = 'NotImplemented',
3192
3382
  }
3193
3383
 
3194
3384
  export enum WebrpcErrorCodes {
@@ -3227,7 +3417,7 @@ export enum WebrpcErrorCodes {
3227
3417
  Timeout = 1900,
3228
3418
  NotFound = 2000,
3229
3419
  InvalidArgument = 2001,
3230
- NotImplemented = 9999
3420
+ NotImplemented = 9999,
3231
3421
  }
3232
3422
 
3233
3423
  export const webrpcErrorByCode: { [code: number]: any } = {
@@ -3266,7 +3456,7 @@ export const webrpcErrorByCode: { [code: number]: any } = {
3266
3456
  [1900]: TimeoutError,
3267
3457
  [2000]: NotFoundError,
3268
3458
  [2001]: InvalidArgumentError,
3269
- [9999]: NotImplementedError
3459
+ [9999]: NotImplementedError,
3270
3460
  }
3271
3461
 
3272
3462
  export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response>