@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.
@@ -1,1614 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- function _extends() {
6
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
7
- for (var e = 1; e < arguments.length; e++) {
8
- var t = arguments[e];
9
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
10
- }
11
- return n;
12
- }, _extends.apply(null, arguments);
13
- }
14
-
15
- /* eslint-disable */
16
- // marketplace-api 652676d9951ceb12f6846907c7c4b5160c73c57a
17
- // --
18
- // Code generated by webrpc-gen@v0.30.2 with github.com/webrpc/gen-typescript@v0.19.0 generator. DO NOT EDIT.
19
- //
20
- // webrpc-gen -schema=./schema/schema.ridl -target=github.com/webrpc/gen-typescript@v0.19.0 -client -out=./clients/marketplace.gen.ts
21
-
22
- const WebrpcHeader = 'Webrpc';
23
- const WebrpcHeaderValue = 'webrpc@v0.30.2;gen-typescript@v0.19.0;marketplace-api@v0.0.0-652676d9951ceb12f6846907c7c4b5160c73c57a';
24
-
25
- // WebRPC description and code-gen version
26
- const WebRPCVersion = 'v1';
27
-
28
- // Schema version of your RIDL schema
29
- const WebRPCSchemaVersion = '';
30
-
31
- // Schema hash generated from your RIDL schema
32
- const WebRPCSchemaHash = '652676d9951ceb12f6846907c7c4b5160c73c57a';
33
- function VersionFromHeader(headers) {
34
- const headerValue = headers.get(WebrpcHeader);
35
- if (!headerValue) {
36
- return {
37
- webrpcGenVersion: '',
38
- codeGenName: '',
39
- codeGenVersion: '',
40
- schemaName: '',
41
- schemaVersion: ''
42
- };
43
- }
44
- return parseWebrpcGenVersions(headerValue);
45
- }
46
- function parseWebrpcGenVersions(header) {
47
- const versions = header.split(';');
48
- if (versions.length < 3) {
49
- return {
50
- webrpcGenVersion: '',
51
- codeGenName: '',
52
- codeGenVersion: '',
53
- schemaName: '',
54
- schemaVersion: ''
55
- };
56
- }
57
- const [_, webrpcGenVersion] = versions[0].split('@');
58
- const [codeGenName, codeGenVersion] = versions[1].split('@');
59
- const [schemaName, schemaVersion] = versions[2].split('@');
60
- return {
61
- webrpcGenVersion: webrpcGenVersion != null ? webrpcGenVersion : '',
62
- codeGenName: codeGenName != null ? codeGenName : '',
63
- codeGenVersion: codeGenVersion != null ? codeGenVersion : '',
64
- schemaName: schemaName != null ? schemaName : '',
65
- schemaVersion: schemaVersion != null ? schemaVersion : ''
66
- };
67
- }
68
-
69
- //
70
- // Types
71
- //
72
-
73
- let SortOrder = /*#__PURE__*/function (SortOrder) {
74
- SortOrder["ASC"] = "ASC";
75
- SortOrder["DESC"] = "DESC";
76
- return SortOrder;
77
- }({});
78
- let PropertyType = /*#__PURE__*/function (PropertyType) {
79
- PropertyType["INT"] = "INT";
80
- PropertyType["STRING"] = "STRING";
81
- PropertyType["ARRAY"] = "ARRAY";
82
- PropertyType["GENERIC"] = "GENERIC";
83
- return PropertyType;
84
- }({});
85
- let MarketplaceKind = /*#__PURE__*/function (MarketplaceKind) {
86
- MarketplaceKind["unknown"] = "unknown";
87
- MarketplaceKind["sequence_marketplace_v1"] = "sequence_marketplace_v1";
88
- MarketplaceKind["sequence_marketplace_v2"] = "sequence_marketplace_v2";
89
- MarketplaceKind["blur"] = "blur";
90
- MarketplaceKind["zerox"] = "zerox";
91
- MarketplaceKind["opensea"] = "opensea";
92
- MarketplaceKind["looks_rare"] = "looks_rare";
93
- MarketplaceKind["x2y2"] = "x2y2";
94
- MarketplaceKind["alienswap"] = "alienswap";
95
- MarketplaceKind["payment_processor"] = "payment_processor";
96
- MarketplaceKind["mintify"] = "mintify";
97
- MarketplaceKind["magic_eden"] = "magic_eden";
98
- return MarketplaceKind;
99
- }({});
100
- let OrderbookKind = /*#__PURE__*/function (OrderbookKind) {
101
- OrderbookKind["unknown"] = "unknown";
102
- OrderbookKind["sequence_marketplace_v1"] = "sequence_marketplace_v1";
103
- OrderbookKind["sequence_marketplace_v2"] = "sequence_marketplace_v2";
104
- OrderbookKind["blur"] = "blur";
105
- OrderbookKind["opensea"] = "opensea";
106
- OrderbookKind["looks_rare"] = "looks_rare";
107
- OrderbookKind["reservoir"] = "reservoir";
108
- OrderbookKind["x2y2"] = "x2y2";
109
- OrderbookKind["magic_eden"] = "magic_eden";
110
- return OrderbookKind;
111
- }({});
112
- let SourceKind = /*#__PURE__*/function (SourceKind) {
113
- SourceKind["unknown"] = "unknown";
114
- SourceKind["external"] = "external";
115
- SourceKind["sequence_marketplace_v1"] = "sequence_marketplace_v1";
116
- SourceKind["sequence_marketplace_v2"] = "sequence_marketplace_v2";
117
- SourceKind["opensea"] = "opensea";
118
- SourceKind["magic_eden"] = "magic_eden";
119
- return SourceKind;
120
- }({});
121
- let OrderSide = /*#__PURE__*/function (OrderSide) {
122
- OrderSide["unknown"] = "unknown";
123
- OrderSide["listing"] = "listing";
124
- OrderSide["offer"] = "offer";
125
- return OrderSide;
126
- }({});
127
- let OfferType = /*#__PURE__*/function (OfferType) {
128
- OfferType["unknown"] = "unknown";
129
- OfferType["item"] = "item";
130
- OfferType["collection"] = "collection";
131
- return OfferType;
132
- }({});
133
- let OrderStatus = /*#__PURE__*/function (OrderStatus) {
134
- OrderStatus["unknown"] = "unknown";
135
- OrderStatus["active"] = "active";
136
- OrderStatus["inactive"] = "inactive";
137
- OrderStatus["expired"] = "expired";
138
- OrderStatus["cancelled"] = "cancelled";
139
- OrderStatus["filled"] = "filled";
140
- OrderStatus["decimals_missing"] = "decimals_missing";
141
- return OrderStatus;
142
- }({});
143
- let ContractType = /*#__PURE__*/function (ContractType) {
144
- ContractType["UNKNOWN"] = "UNKNOWN";
145
- ContractType["ERC20"] = "ERC20";
146
- ContractType["ERC721"] = "ERC721";
147
- ContractType["ERC1155"] = "ERC1155";
148
- return ContractType;
149
- }({});
150
- let CollectionPriority = /*#__PURE__*/function (CollectionPriority) {
151
- CollectionPriority["unknown"] = "unknown";
152
- CollectionPriority["low"] = "low";
153
- CollectionPriority["normal"] = "normal";
154
- CollectionPriority["high"] = "high";
155
- return CollectionPriority;
156
- }({});
157
- let CollectionStatus = /*#__PURE__*/function (CollectionStatus) {
158
- CollectionStatus["unknown"] = "unknown";
159
- CollectionStatus["created"] = "created";
160
- CollectionStatus["syncing_orders"] = "syncing_orders";
161
- CollectionStatus["active"] = "active";
162
- CollectionStatus["failed"] = "failed";
163
- CollectionStatus["inactive"] = "inactive";
164
- CollectionStatus["incompatible_type"] = "incompatible_type";
165
- return CollectionStatus;
166
- }({});
167
- let ProjectStatus = /*#__PURE__*/function (ProjectStatus) {
168
- ProjectStatus["unknown"] = "unknown";
169
- ProjectStatus["active"] = "active";
170
- ProjectStatus["inactive"] = "inactive";
171
- return ProjectStatus;
172
- }({});
173
- let ItemsContractStatus = /*#__PURE__*/function (ItemsContractStatus) {
174
- ItemsContractStatus["unknown"] = "unknown";
175
- ItemsContractStatus["created"] = "created";
176
- ItemsContractStatus["syncing_contract_metadata"] = "syncing_contract_metadata";
177
- ItemsContractStatus["synced_contract_metadata"] = "synced_contract_metadata";
178
- ItemsContractStatus["syncing_tokens"] = "syncing_tokens";
179
- ItemsContractStatus["synced_tokens"] = "synced_tokens";
180
- ItemsContractStatus["active"] = "active";
181
- ItemsContractStatus["inactive"] = "inactive";
182
- ItemsContractStatus["incompatible_type"] = "incompatible_type";
183
- return ItemsContractStatus;
184
- }({});
185
- let CollectibleStatus = /*#__PURE__*/function (CollectibleStatus) {
186
- CollectibleStatus["unknown"] = "unknown";
187
- CollectibleStatus["active"] = "active";
188
- CollectibleStatus["inactive"] = "inactive";
189
- return CollectibleStatus;
190
- }({});
191
- let CollectibleSource = /*#__PURE__*/function (CollectibleSource) {
192
- CollectibleSource["unknown"] = "unknown";
193
- CollectibleSource["indexer"] = "indexer";
194
- CollectibleSource["manual"] = "manual";
195
- return CollectibleSource;
196
- }({});
197
- let CurrencyStatus = /*#__PURE__*/function (CurrencyStatus) {
198
- CurrencyStatus["unknown"] = "unknown";
199
- CurrencyStatus["created"] = "created";
200
- CurrencyStatus["syncing_metadata"] = "syncing_metadata";
201
- CurrencyStatus["active"] = "active";
202
- CurrencyStatus["failed"] = "failed";
203
- return CurrencyStatus;
204
- }({});
205
- let WalletKind = /*#__PURE__*/function (WalletKind) {
206
- WalletKind["unknown"] = "unknown";
207
- WalletKind["sequence"] = "sequence";
208
- return WalletKind;
209
- }({});
210
- let StepType = /*#__PURE__*/function (StepType) {
211
- StepType["unknown"] = "unknown";
212
- StepType["tokenApproval"] = "tokenApproval";
213
- StepType["buy"] = "buy";
214
- StepType["sell"] = "sell";
215
- StepType["createListing"] = "createListing";
216
- StepType["createOffer"] = "createOffer";
217
- StepType["signEIP712"] = "signEIP712";
218
- StepType["signEIP191"] = "signEIP191";
219
- StepType["cancel"] = "cancel";
220
- return StepType;
221
- }({});
222
- let TransactionCrypto = /*#__PURE__*/function (TransactionCrypto) {
223
- TransactionCrypto["none"] = "none";
224
- TransactionCrypto["partially"] = "partially";
225
- TransactionCrypto["all"] = "all";
226
- return TransactionCrypto;
227
- }({});
228
- let TransactionNFTCheckoutProvider = /*#__PURE__*/function (TransactionNFTCheckoutProvider) {
229
- TransactionNFTCheckoutProvider["unknown"] = "unknown";
230
- TransactionNFTCheckoutProvider["transak"] = "transak";
231
- TransactionNFTCheckoutProvider["sardine"] = "sardine";
232
- return TransactionNFTCheckoutProvider;
233
- }({});
234
- let TransactionOnRampProvider = /*#__PURE__*/function (TransactionOnRampProvider) {
235
- TransactionOnRampProvider["unknown"] = "unknown";
236
- TransactionOnRampProvider["transak"] = "transak";
237
- TransactionOnRampProvider["sardine"] = "sardine";
238
- return TransactionOnRampProvider;
239
- }({});
240
- let TransactionSwapProvider = /*#__PURE__*/function (TransactionSwapProvider) {
241
- TransactionSwapProvider["unknown"] = "unknown";
242
- TransactionSwapProvider["lifi"] = "lifi";
243
- return TransactionSwapProvider;
244
- }({});
245
- let ExecuteType = /*#__PURE__*/function (ExecuteType) {
246
- ExecuteType["unknown"] = "unknown";
247
- ExecuteType["order"] = "order";
248
- ExecuteType["createListing"] = "createListing";
249
- ExecuteType["createItemOffer"] = "createItemOffer";
250
- ExecuteType["createTraitOffer"] = "createTraitOffer";
251
- return ExecuteType;
252
- }({});
253
- let ActivityAction = /*#__PURE__*/function (ActivityAction) {
254
- ActivityAction["unknown"] = "unknown";
255
- ActivityAction["listing"] = "listing";
256
- ActivityAction["offer"] = "offer";
257
- ActivityAction["mint"] = "mint";
258
- ActivityAction["sale"] = "sale";
259
- ActivityAction["listingCancel"] = "listingCancel";
260
- ActivityAction["offerCancel"] = "offerCancel";
261
- ActivityAction["transfer"] = "transfer";
262
- return ActivityAction;
263
- }({});
264
- let PrimarySaleContractStatus = /*#__PURE__*/function (PrimarySaleContractStatus) {
265
- PrimarySaleContractStatus["unknown"] = "unknown";
266
- PrimarySaleContractStatus["created"] = "created";
267
- PrimarySaleContractStatus["syncing_items"] = "syncing_items";
268
- PrimarySaleContractStatus["active"] = "active";
269
- PrimarySaleContractStatus["inactive"] = "inactive";
270
- PrimarySaleContractStatus["incompatible_type"] = "incompatible_type";
271
- PrimarySaleContractStatus["failed"] = "failed";
272
- return PrimarySaleContractStatus;
273
- }({});
274
- let PrimarySaleVersion = /*#__PURE__*/function (PrimarySaleVersion) {
275
- PrimarySaleVersion["v0"] = "v0";
276
- PrimarySaleVersion["v1"] = "v1";
277
- return PrimarySaleVersion;
278
- }({});
279
- let PrimarySaleItemDetailType = /*#__PURE__*/function (PrimarySaleItemDetailType) {
280
- PrimarySaleItemDetailType["unknown"] = "unknown";
281
- PrimarySaleItemDetailType["global"] = "global";
282
- PrimarySaleItemDetailType["individual"] = "individual";
283
- return PrimarySaleItemDetailType;
284
- }({});
285
- let MetadataStatus = /*#__PURE__*/function (MetadataStatus) {
286
- MetadataStatus["NOT_AVAILABLE"] = "NOT_AVAILABLE";
287
- MetadataStatus["REFRESHING"] = "REFRESHING";
288
- MetadataStatus["AVAILABLE"] = "AVAILABLE";
289
- return MetadataStatus;
290
- }({});
291
- //
292
- // Client
293
- //
294
- class Admin {
295
- constructor(hostname, fetch) {
296
- this.hostname = void 0;
297
- this.fetch = void 0;
298
- this.path = '/rpc/Admin/';
299
- this.createCollection = (args, headers, signal) => {
300
- return this.fetch(this.url('CreateCollection'), createHTTPRequest(args, headers, signal)).then(res => {
301
- return buildResponse(res).then(_data => {
302
- return {
303
- collection: _data.collection
304
- };
305
- });
306
- }, error => {
307
- throw WebrpcRequestFailedError.new({
308
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
309
- });
310
- });
311
- };
312
- this.getCollection = (args, headers, signal) => {
313
- return this.fetch(this.url('GetCollection'), createHTTPRequest(args, headers, signal)).then(res => {
314
- return buildResponse(res).then(_data => {
315
- return {
316
- collection: _data.collection
317
- };
318
- });
319
- }, error => {
320
- throw WebrpcRequestFailedError.new({
321
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
322
- });
323
- });
324
- };
325
- this.updateCollection = (args, headers, signal) => {
326
- return this.fetch(this.url('UpdateCollection'), createHTTPRequest(args, headers, signal)).then(res => {
327
- return buildResponse(res).then(_data => {
328
- return {
329
- collection: _data.collection
330
- };
331
- });
332
- }, error => {
333
- throw WebrpcRequestFailedError.new({
334
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
335
- });
336
- });
337
- };
338
- this.listCollections = (args, headers, signal) => {
339
- return this.fetch(this.url('ListCollections'), createHTTPRequest(args, headers, signal)).then(res => {
340
- return buildResponse(res).then(_data => {
341
- return {
342
- collections: _data.collections,
343
- page: _data.page
344
- };
345
- });
346
- }, error => {
347
- throw WebrpcRequestFailedError.new({
348
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
349
- });
350
- });
351
- };
352
- this.deleteCollection = (args, headers, signal) => {
353
- return this.fetch(this.url('DeleteCollection'), createHTTPRequest(args, headers, signal)).then(res => {
354
- return buildResponse(res).then(_data => {
355
- return {
356
- collection: _data.collection
357
- };
358
- });
359
- }, error => {
360
- throw WebrpcRequestFailedError.new({
361
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
362
- });
363
- });
364
- };
365
- this.syncCollection = (args, headers, signal) => {
366
- return this.fetch(this.url('SyncCollection'), createHTTPRequest(args, headers, signal)).then(res => {
367
- return buildResponse(res).then(_data => {
368
- return {};
369
- });
370
- }, error => {
371
- throw WebrpcRequestFailedError.new({
372
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
373
- });
374
- });
375
- };
376
- this.createPrimarySaleContract = (args, headers, signal) => {
377
- return this.fetch(this.url('CreatePrimarySaleContract'), createHTTPRequest(args, headers, signal)).then(res => {
378
- return buildResponse(res).then(_data => {
379
- return {
380
- primarySaleContract: _data.primarySaleContract
381
- };
382
- });
383
- }, error => {
384
- throw WebrpcRequestFailedError.new({
385
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
386
- });
387
- });
388
- };
389
- this.deletePrimarySaleContract = (args, headers, signal) => {
390
- return this.fetch(this.url('DeletePrimarySaleContract'), createHTTPRequest(args, headers, signal)).then(res => {
391
- return buildResponse(res).then(_data => {
392
- return {};
393
- });
394
- }, error => {
395
- throw WebrpcRequestFailedError.new({
396
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
397
- });
398
- });
399
- };
400
- this.createCurrency = (args, headers, signal) => {
401
- return this.fetch(this.url('CreateCurrency'), createHTTPRequest(args, headers, signal)).then(res => {
402
- return buildResponse(res).then(_data => {
403
- return {
404
- currency: _data.currency
405
- };
406
- });
407
- }, error => {
408
- throw WebrpcRequestFailedError.new({
409
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
410
- });
411
- });
412
- };
413
- this.createCurrencies = (args, headers, signal) => {
414
- return this.fetch(this.url('CreateCurrencies'), createHTTPRequest(args, headers, signal)).then(res => {
415
- return buildResponse(res).then(_data => {
416
- return {
417
- currency: _data.currency
418
- };
419
- });
420
- }, error => {
421
- throw WebrpcRequestFailedError.new({
422
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
423
- });
424
- });
425
- };
426
- this.updateCurrency = (args, headers, signal) => {
427
- return this.fetch(this.url('UpdateCurrency'), createHTTPRequest(args, headers, signal)).then(res => {
428
- return buildResponse(res).then(_data => {
429
- return {
430
- currency: _data.currency
431
- };
432
- });
433
- }, error => {
434
- throw WebrpcRequestFailedError.new({
435
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
436
- });
437
- });
438
- };
439
- this.listCurrencies = (args, headers, signal) => {
440
- return this.fetch(this.url('ListCurrencies'), createHTTPRequest(args, headers, signal)).then(res => {
441
- return buildResponse(res).then(_data => {
442
- return {
443
- currencies: _data.currencies
444
- };
445
- });
446
- }, error => {
447
- throw WebrpcRequestFailedError.new({
448
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
449
- });
450
- });
451
- };
452
- this.deleteCurrency = (args, headers, signal) => {
453
- return this.fetch(this.url('DeleteCurrency'), createHTTPRequest(args, headers, signal)).then(res => {
454
- return buildResponse(res).then(_data => {
455
- return {
456
- currency: _data.currency
457
- };
458
- });
459
- }, error => {
460
- throw WebrpcRequestFailedError.new({
461
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
462
- });
463
- });
464
- };
465
- this.addCollectibles = (args, headers, signal) => {
466
- return this.fetch(this.url('AddCollectibles'), createHTTPRequest(args, headers, signal)).then(res => {
467
- return buildResponse(res).then(_data => {
468
- return {};
469
- });
470
- }, error => {
471
- throw WebrpcRequestFailedError.new({
472
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
473
- });
474
- });
475
- };
476
- this.hostname = hostname.replace(/\/*$/, '');
477
- this.fetch = (input, init) => fetch(input, init);
478
- }
479
- url(name) {
480
- return this.hostname + this.path + name;
481
- }
482
- }
483
- class Marketplace {
484
- constructor(hostname, fetch) {
485
- this.hostname = void 0;
486
- this.fetch = void 0;
487
- this.path = '/rpc/Marketplace/';
488
- this.listCurrencies = (args, headers, signal) => {
489
- return this.fetch(this.url('ListCurrencies'), createHTTPRequest(args, headers, signal)).then(res => {
490
- return buildResponse(res).then(_data => {
491
- return {
492
- currencies: _data.currencies
493
- };
494
- });
495
- }, error => {
496
- throw WebrpcRequestFailedError.new({
497
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
498
- });
499
- });
500
- };
501
- this.getCollectionDetail = (args, headers, signal) => {
502
- return this.fetch(this.url('GetCollectionDetail'), createHTTPRequest(args, headers, signal)).then(res => {
503
- return buildResponse(res).then(_data => {
504
- return {
505
- collection: _data.collection
506
- };
507
- });
508
- }, error => {
509
- throw WebrpcRequestFailedError.new({
510
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
511
- });
512
- });
513
- };
514
- this.getCollectionActiveListingsCurrencies = (args, headers, signal) => {
515
- return this.fetch(this.url('GetCollectionActiveListingsCurrencies'), createHTTPRequest(args, headers, signal)).then(res => {
516
- return buildResponse(res).then(_data => {
517
- return {
518
- currencies: _data.currencies
519
- };
520
- });
521
- }, error => {
522
- throw WebrpcRequestFailedError.new({
523
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
524
- });
525
- });
526
- };
527
- this.getCollectionActiveOffersCurrencies = (args, headers, signal) => {
528
- return this.fetch(this.url('GetCollectionActiveOffersCurrencies'), createHTTPRequest(args, headers, signal)).then(res => {
529
- return buildResponse(res).then(_data => {
530
- return {
531
- currencies: _data.currencies
532
- };
533
- });
534
- }, error => {
535
- throw WebrpcRequestFailedError.new({
536
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
537
- });
538
- });
539
- };
540
- this.getCollectible = (args, headers, signal) => {
541
- return this.fetch(this.url('GetCollectible'), createHTTPRequest(args, headers, signal)).then(res => {
542
- return buildResponse(res).then(_data => {
543
- return {
544
- metadata: _data.metadata
545
- };
546
- });
547
- }, error => {
548
- throw WebrpcRequestFailedError.new({
549
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
550
- });
551
- });
552
- };
553
- this.getLowestPriceOfferForCollectible = (args, headers, signal) => {
554
- return this.fetch(this.url('GetLowestPriceOfferForCollectible'), createHTTPRequest(args, headers, signal)).then(res => {
555
- return buildResponse(res).then(_data => {
556
- return {
557
- order: _data.order
558
- };
559
- });
560
- }, error => {
561
- throw WebrpcRequestFailedError.new({
562
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
563
- });
564
- });
565
- };
566
- this.getHighestPriceOfferForCollectible = (args, headers, signal) => {
567
- return this.fetch(this.url('GetHighestPriceOfferForCollectible'), createHTTPRequest(args, headers, signal)).then(res => {
568
- return buildResponse(res).then(_data => {
569
- return {
570
- order: _data.order
571
- };
572
- });
573
- }, error => {
574
- throw WebrpcRequestFailedError.new({
575
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
576
- });
577
- });
578
- };
579
- this.getLowestPriceListingForCollectible = (args, headers, signal) => {
580
- return this.fetch(this.url('GetLowestPriceListingForCollectible'), createHTTPRequest(args, headers, signal)).then(res => {
581
- return buildResponse(res).then(_data => {
582
- return {
583
- order: _data.order
584
- };
585
- });
586
- }, error => {
587
- throw WebrpcRequestFailedError.new({
588
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
589
- });
590
- });
591
- };
592
- this.getHighestPriceListingForCollectible = (args, headers, signal) => {
593
- return this.fetch(this.url('GetHighestPriceListingForCollectible'), createHTTPRequest(args, headers, signal)).then(res => {
594
- return buildResponse(res).then(_data => {
595
- return {
596
- order: _data.order
597
- };
598
- });
599
- }, error => {
600
- throw WebrpcRequestFailedError.new({
601
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
602
- });
603
- });
604
- };
605
- this.listListingsForCollectible = (args, headers, signal) => {
606
- return this.fetch(this.url('ListListingsForCollectible'), createHTTPRequest(args, headers, signal)).then(res => {
607
- return buildResponse(res).then(_data => {
608
- return {
609
- listings: _data.listings,
610
- page: _data.page
611
- };
612
- });
613
- }, error => {
614
- throw WebrpcRequestFailedError.new({
615
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
616
- });
617
- });
618
- };
619
- this.listOffersForCollectible = (args, headers, signal) => {
620
- return this.fetch(this.url('ListOffersForCollectible'), createHTTPRequest(args, headers, signal)).then(res => {
621
- return buildResponse(res).then(_data => {
622
- return {
623
- offers: _data.offers,
624
- page: _data.page
625
- };
626
- });
627
- }, error => {
628
- throw WebrpcRequestFailedError.new({
629
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
630
- });
631
- });
632
- };
633
- this.listOrdersWithCollectibles = (args, headers, signal) => {
634
- return this.fetch(this.url('ListOrdersWithCollectibles'), createHTTPRequest(args, headers, signal)).then(res => {
635
- return buildResponse(res).then(_data => {
636
- return {
637
- collectibles: _data.collectibles,
638
- page: _data.page
639
- };
640
- });
641
- }, error => {
642
- throw WebrpcRequestFailedError.new({
643
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
644
- });
645
- });
646
- };
647
- this.getCountOfAllOrders = (args, headers, signal) => {
648
- return this.fetch(this.url('GetCountOfAllOrders'), createHTTPRequest(args, headers, signal)).then(res => {
649
- return buildResponse(res).then(_data => {
650
- return {
651
- count: _data.count
652
- };
653
- });
654
- }, error => {
655
- throw WebrpcRequestFailedError.new({
656
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
657
- });
658
- });
659
- };
660
- this.getCountOfFilteredOrders = (args, headers, signal) => {
661
- return this.fetch(this.url('GetCountOfFilteredOrders'), createHTTPRequest(args, headers, signal)).then(res => {
662
- return buildResponse(res).then(_data => {
663
- return {
664
- count: _data.count
665
- };
666
- });
667
- }, error => {
668
- throw WebrpcRequestFailedError.new({
669
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
670
- });
671
- });
672
- };
673
- this.listListings = (args, headers, signal) => {
674
- return this.fetch(this.url('ListListings'), createHTTPRequest(args, headers, signal)).then(res => {
675
- return buildResponse(res).then(_data => {
676
- return {
677
- listings: _data.listings,
678
- page: _data.page
679
- };
680
- });
681
- }, error => {
682
- throw WebrpcRequestFailedError.new({
683
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
684
- });
685
- });
686
- };
687
- this.listOffers = (args, headers, signal) => {
688
- return this.fetch(this.url('ListOffers'), createHTTPRequest(args, headers, signal)).then(res => {
689
- return buildResponse(res).then(_data => {
690
- return {
691
- offers: _data.offers,
692
- page: _data.page
693
- };
694
- });
695
- }, error => {
696
- throw WebrpcRequestFailedError.new({
697
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
698
- });
699
- });
700
- };
701
- this.getCountOfListingsForCollectible = (args, headers, signal) => {
702
- return this.fetch(this.url('GetCountOfListingsForCollectible'), createHTTPRequest(args, headers, signal)).then(res => {
703
- return buildResponse(res).then(_data => {
704
- return {
705
- count: _data.count
706
- };
707
- });
708
- }, error => {
709
- throw WebrpcRequestFailedError.new({
710
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
711
- });
712
- });
713
- };
714
- this.getCountOfOffersForCollectible = (args, headers, signal) => {
715
- return this.fetch(this.url('GetCountOfOffersForCollectible'), createHTTPRequest(args, headers, signal)).then(res => {
716
- return buildResponse(res).then(_data => {
717
- return {
718
- count: _data.count
719
- };
720
- });
721
- }, error => {
722
- throw WebrpcRequestFailedError.new({
723
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
724
- });
725
- });
726
- };
727
- this.getCollectibleLowestOffer = (args, headers, signal) => {
728
- return this.fetch(this.url('GetCollectibleLowestOffer'), createHTTPRequest(args, headers, signal)).then(res => {
729
- return buildResponse(res).then(_data => {
730
- return {
731
- order: _data.order
732
- };
733
- });
734
- }, error => {
735
- throw WebrpcRequestFailedError.new({
736
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
737
- });
738
- });
739
- };
740
- this.getCollectibleHighestOffer = (args, headers, signal) => {
741
- return this.fetch(this.url('GetCollectibleHighestOffer'), createHTTPRequest(args, headers, signal)).then(res => {
742
- return buildResponse(res).then(_data => {
743
- return {
744
- order: _data.order
745
- };
746
- });
747
- }, error => {
748
- throw WebrpcRequestFailedError.new({
749
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
750
- });
751
- });
752
- };
753
- this.getCollectibleLowestListing = (args, headers, signal) => {
754
- return this.fetch(this.url('GetCollectibleLowestListing'), createHTTPRequest(args, headers, signal)).then(res => {
755
- return buildResponse(res).then(_data => {
756
- return {
757
- order: _data.order
758
- };
759
- });
760
- }, error => {
761
- throw WebrpcRequestFailedError.new({
762
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
763
- });
764
- });
765
- };
766
- this.getCollectibleHighestListing = (args, headers, signal) => {
767
- return this.fetch(this.url('GetCollectibleHighestListing'), createHTTPRequest(args, headers, signal)).then(res => {
768
- return buildResponse(res).then(_data => {
769
- return {
770
- order: _data.order
771
- };
772
- });
773
- }, error => {
774
- throw WebrpcRequestFailedError.new({
775
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
776
- });
777
- });
778
- };
779
- this.listCollectibleListings = (args, headers, signal) => {
780
- return this.fetch(this.url('ListCollectibleListings'), createHTTPRequest(args, headers, signal)).then(res => {
781
- return buildResponse(res).then(_data => {
782
- return {
783
- listings: _data.listings,
784
- page: _data.page
785
- };
786
- });
787
- }, error => {
788
- throw WebrpcRequestFailedError.new({
789
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
790
- });
791
- });
792
- };
793
- this.listCollectibleOffers = (args, headers, signal) => {
794
- return this.fetch(this.url('ListCollectibleOffers'), createHTTPRequest(args, headers, signal)).then(res => {
795
- return buildResponse(res).then(_data => {
796
- return {
797
- offers: _data.offers,
798
- page: _data.page
799
- };
800
- });
801
- }, error => {
802
- throw WebrpcRequestFailedError.new({
803
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
804
- });
805
- });
806
- };
807
- this.generateBuyTransaction = (args, headers, signal) => {
808
- return this.fetch(this.url('GenerateBuyTransaction'), createHTTPRequest(args, headers, signal)).then(res => {
809
- return buildResponse(res).then(_data => {
810
- return {
811
- steps: _data.steps
812
- };
813
- });
814
- }, error => {
815
- throw WebrpcRequestFailedError.new({
816
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
817
- });
818
- });
819
- };
820
- this.generateSellTransaction = (args, headers, signal) => {
821
- return this.fetch(this.url('GenerateSellTransaction'), createHTTPRequest(args, headers, signal)).then(res => {
822
- return buildResponse(res).then(_data => {
823
- return {
824
- steps: _data.steps
825
- };
826
- });
827
- }, error => {
828
- throw WebrpcRequestFailedError.new({
829
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
830
- });
831
- });
832
- };
833
- this.generateListingTransaction = (args, headers, signal) => {
834
- return this.fetch(this.url('GenerateListingTransaction'), createHTTPRequest(args, headers, signal)).then(res => {
835
- return buildResponse(res).then(_data => {
836
- return {
837
- steps: _data.steps
838
- };
839
- });
840
- }, error => {
841
- throw WebrpcRequestFailedError.new({
842
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
843
- });
844
- });
845
- };
846
- this.generateOfferTransaction = (args, headers, signal) => {
847
- return this.fetch(this.url('GenerateOfferTransaction'), createHTTPRequest(args, headers, signal)).then(res => {
848
- return buildResponse(res).then(_data => {
849
- return {
850
- steps: _data.steps
851
- };
852
- });
853
- }, error => {
854
- throw WebrpcRequestFailedError.new({
855
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
856
- });
857
- });
858
- };
859
- this.generateCancelTransaction = (args, headers, signal) => {
860
- return this.fetch(this.url('GenerateCancelTransaction'), createHTTPRequest(args, headers, signal)).then(res => {
861
- return buildResponse(res).then(_data => {
862
- return {
863
- steps: _data.steps
864
- };
865
- });
866
- }, error => {
867
- throw WebrpcRequestFailedError.new({
868
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
869
- });
870
- });
871
- };
872
- this.execute = (args, headers, signal) => {
873
- return this.fetch(this.url('Execute'), createHTTPRequest(args, headers, signal)).then(res => {
874
- return buildResponse(res).then(_data => {
875
- return {
876
- orderId: _data.orderId
877
- };
878
- });
879
- }, error => {
880
- throw WebrpcRequestFailedError.new({
881
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
882
- });
883
- });
884
- };
885
- this.listCollectibles = (args, headers, signal) => {
886
- return this.fetch(this.url('ListCollectibles'), createHTTPRequest(args, headers, signal)).then(res => {
887
- return buildResponse(res).then(_data => {
888
- return {
889
- collectibles: _data.collectibles,
890
- page: _data.page
891
- };
892
- });
893
- }, error => {
894
- throw WebrpcRequestFailedError.new({
895
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
896
- });
897
- });
898
- };
899
- this.getCountOfAllCollectibles = (args, headers, signal) => {
900
- return this.fetch(this.url('GetCountOfAllCollectibles'), createHTTPRequest(args, headers, signal)).then(res => {
901
- return buildResponse(res).then(_data => {
902
- return {
903
- count: _data.count
904
- };
905
- });
906
- }, error => {
907
- throw WebrpcRequestFailedError.new({
908
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
909
- });
910
- });
911
- };
912
- this.getCountOfFilteredCollectibles = (args, headers, signal) => {
913
- return this.fetch(this.url('GetCountOfFilteredCollectibles'), createHTTPRequest(args, headers, signal)).then(res => {
914
- return buildResponse(res).then(_data => {
915
- return {
916
- count: _data.count
917
- };
918
- });
919
- }, error => {
920
- throw WebrpcRequestFailedError.new({
921
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
922
- });
923
- });
924
- };
925
- this.getFloorOrder = (args, headers, signal) => {
926
- return this.fetch(this.url('GetFloorOrder'), createHTTPRequest(args, headers, signal)).then(res => {
927
- return buildResponse(res).then(_data => {
928
- return {
929
- collectible: _data.collectible
930
- };
931
- });
932
- }, error => {
933
- throw WebrpcRequestFailedError.new({
934
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
935
- });
936
- });
937
- };
938
- this.listCollectionActivities = (args, headers, signal) => {
939
- return this.fetch(this.url('ListCollectionActivities'), createHTTPRequest(args, headers, signal)).then(res => {
940
- return buildResponse(res).then(_data => {
941
- return {
942
- activities: _data.activities,
943
- page: _data.page
944
- };
945
- });
946
- }, error => {
947
- throw WebrpcRequestFailedError.new({
948
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
949
- });
950
- });
951
- };
952
- this.listCollectibleActivities = (args, headers, signal) => {
953
- return this.fetch(this.url('ListCollectibleActivities'), createHTTPRequest(args, headers, signal)).then(res => {
954
- return buildResponse(res).then(_data => {
955
- return {
956
- activities: _data.activities,
957
- page: _data.page
958
- };
959
- });
960
- }, error => {
961
- throw WebrpcRequestFailedError.new({
962
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
963
- });
964
- });
965
- };
966
- this.listCollectiblesWithLowestListing = (args, headers, signal) => {
967
- return this.fetch(this.url('ListCollectiblesWithLowestListing'), createHTTPRequest(args, headers, signal)).then(res => {
968
- return buildResponse(res).then(_data => {
969
- return {
970
- collectibles: _data.collectibles,
971
- page: _data.page
972
- };
973
- });
974
- }, error => {
975
- throw WebrpcRequestFailedError.new({
976
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
977
- });
978
- });
979
- };
980
- this.listCollectiblesWithHighestOffer = (args, headers, signal) => {
981
- return this.fetch(this.url('ListCollectiblesWithHighestOffer'), createHTTPRequest(args, headers, signal)).then(res => {
982
- return buildResponse(res).then(_data => {
983
- return {
984
- collectibles: _data.collectibles,
985
- page: _data.page
986
- };
987
- });
988
- }, error => {
989
- throw WebrpcRequestFailedError.new({
990
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
991
- });
992
- });
993
- };
994
- this.syncOrder = (args, headers, signal) => {
995
- return this.fetch(this.url('SyncOrder'), createHTTPRequest(args, headers, signal)).then(res => {
996
- return buildResponse(res).then(_data => {
997
- return {};
998
- });
999
- }, error => {
1000
- throw WebrpcRequestFailedError.new({
1001
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
1002
- });
1003
- });
1004
- };
1005
- this.syncOrders = (args, headers, signal) => {
1006
- return this.fetch(this.url('SyncOrders'), createHTTPRequest(args, headers, signal)).then(res => {
1007
- return buildResponse(res).then(_data => {
1008
- return {};
1009
- });
1010
- }, error => {
1011
- throw WebrpcRequestFailedError.new({
1012
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
1013
- });
1014
- });
1015
- };
1016
- this.getOrders = (args, headers, signal) => {
1017
- return this.fetch(this.url('GetOrders'), createHTTPRequest(args, headers, signal)).then(res => {
1018
- return buildResponse(res).then(_data => {
1019
- return {
1020
- orders: _data.orders,
1021
- page: _data.page
1022
- };
1023
- });
1024
- }, error => {
1025
- throw WebrpcRequestFailedError.new({
1026
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
1027
- });
1028
- });
1029
- };
1030
- this.checkoutOptionsMarketplace = (args, headers, signal) => {
1031
- return this.fetch(this.url('CheckoutOptionsMarketplace'), createHTTPRequest(args, headers, signal)).then(res => {
1032
- return buildResponse(res).then(_data => {
1033
- return {
1034
- options: _data.options
1035
- };
1036
- });
1037
- }, error => {
1038
- throw WebrpcRequestFailedError.new({
1039
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
1040
- });
1041
- });
1042
- };
1043
- this.checkoutOptionsSalesContract = (args, headers, signal) => {
1044
- return this.fetch(this.url('CheckoutOptionsSalesContract'), createHTTPRequest(args, headers, signal)).then(res => {
1045
- return buildResponse(res).then(_data => {
1046
- return {
1047
- options: _data.options
1048
- };
1049
- });
1050
- }, error => {
1051
- throw WebrpcRequestFailedError.new({
1052
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
1053
- });
1054
- });
1055
- };
1056
- this.supportedMarketplaces = (args, headers, signal) => {
1057
- return this.fetch(this.url('SupportedMarketplaces'), createHTTPRequest(args, headers, signal)).then(res => {
1058
- return buildResponse(res).then(_data => {
1059
- return {
1060
- marketplaces: _data.marketplaces
1061
- };
1062
- });
1063
- }, error => {
1064
- throw WebrpcRequestFailedError.new({
1065
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
1066
- });
1067
- });
1068
- };
1069
- this.getPrimarySaleItem = (args, headers, signal) => {
1070
- return this.fetch(this.url('GetPrimarySaleItem'), createHTTPRequest(args, headers, signal)).then(res => {
1071
- return buildResponse(res).then(_data => {
1072
- return {
1073
- item: _data.item
1074
- };
1075
- });
1076
- }, error => {
1077
- throw WebrpcRequestFailedError.new({
1078
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
1079
- });
1080
- });
1081
- };
1082
- this.listPrimarySaleItems = (args, headers, signal) => {
1083
- return this.fetch(this.url('ListPrimarySaleItems'), createHTTPRequest(args, headers, signal)).then(res => {
1084
- return buildResponse(res).then(_data => {
1085
- return {
1086
- primarySaleItems: _data.primarySaleItems,
1087
- page: _data.page
1088
- };
1089
- });
1090
- }, error => {
1091
- throw WebrpcRequestFailedError.new({
1092
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
1093
- });
1094
- });
1095
- };
1096
- this.getCountOfPrimarySaleItems = (args, headers, signal) => {
1097
- return this.fetch(this.url('GetCountOfPrimarySaleItems'), createHTTPRequest(args, headers, signal)).then(res => {
1098
- return buildResponse(res).then(_data => {
1099
- return {
1100
- count: _data.count
1101
- };
1102
- });
1103
- }, error => {
1104
- throw WebrpcRequestFailedError.new({
1105
- cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
1106
- });
1107
- });
1108
- };
1109
- this.hostname = hostname.replace(/\/*$/, '');
1110
- this.fetch = (input, init) => fetch(input, init);
1111
- }
1112
- url(name) {
1113
- return this.hostname + this.path + name;
1114
- }
1115
- }
1116
- const createHTTPRequest = (body = {}, headers = {}, signal = null) => {
1117
- const reqHeaders = _extends({}, headers, {
1118
- 'Content-Type': 'application/json'
1119
- });
1120
- reqHeaders[WebrpcHeader] = WebrpcHeaderValue;
1121
- return {
1122
- method: 'POST',
1123
- headers: reqHeaders,
1124
- body: JSON.stringify(body || {}),
1125
- signal
1126
- };
1127
- };
1128
- const buildResponse = res => {
1129
- return res.text().then(text => {
1130
- let data;
1131
- try {
1132
- data = JSON.parse(text);
1133
- } catch (error) {
1134
- throw WebrpcBadResponseError.new({
1135
- status: res.status,
1136
- cause: `JSON.parse(): ${error instanceof Error ? error.message : String(error)}: response text: ${text}`
1137
- });
1138
- }
1139
- if (!res.ok) {
1140
- const code = typeof data.code === 'number' ? data.code : 0;
1141
- throw (webrpcErrorByCode[code] || WebrpcError).new(data);
1142
- }
1143
- return data;
1144
- });
1145
- };
1146
-
1147
- //
1148
- // Errors
1149
- //
1150
-
1151
- class WebrpcError extends Error {
1152
- constructor(name, code, message, status, cause) {
1153
- super(message);
1154
- this.name = void 0;
1155
- this.code = void 0;
1156
- this.message = void 0;
1157
- this.status = void 0;
1158
- this.cause = void 0;
1159
- /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */
1160
- this.msg = void 0;
1161
- this.name = name || 'WebrpcError';
1162
- this.code = typeof code === 'number' ? code : 0;
1163
- this.message = message || `endpoint error ${this.code}`;
1164
- this.msg = this.message;
1165
- this.status = typeof status === 'number' ? status : 0;
1166
- this.cause = cause;
1167
- Object.setPrototypeOf(this, WebrpcError.prototype);
1168
- }
1169
- static new(payload) {
1170
- return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause);
1171
- }
1172
- }
1173
-
1174
- // Webrpc errors
1175
-
1176
- class WebrpcEndpointError extends WebrpcError {
1177
- constructor(name = 'WebrpcEndpoint', code = 0, message = `endpoint error`, status = 400, cause) {
1178
- super(name, code, message, status, cause);
1179
- Object.setPrototypeOf(this, WebrpcEndpointError.prototype);
1180
- }
1181
- }
1182
- class WebrpcRequestFailedError extends WebrpcError {
1183
- constructor(name = 'WebrpcRequestFailed', code = -1, message = `request failed`, status = 400, cause) {
1184
- super(name, code, message, status, cause);
1185
- Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype);
1186
- }
1187
- }
1188
- class WebrpcBadRouteError extends WebrpcError {
1189
- constructor(name = 'WebrpcBadRoute', code = -2, message = `bad route`, status = 404, cause) {
1190
- super(name, code, message, status, cause);
1191
- Object.setPrototypeOf(this, WebrpcBadRouteError.prototype);
1192
- }
1193
- }
1194
- class WebrpcBadMethodError extends WebrpcError {
1195
- constructor(name = 'WebrpcBadMethod', code = -3, message = `bad method`, status = 405, cause) {
1196
- super(name, code, message, status, cause);
1197
- Object.setPrototypeOf(this, WebrpcBadMethodError.prototype);
1198
- }
1199
- }
1200
- class WebrpcBadRequestError extends WebrpcError {
1201
- constructor(name = 'WebrpcBadRequest', code = -4, message = `bad request`, status = 400, cause) {
1202
- super(name, code, message, status, cause);
1203
- Object.setPrototypeOf(this, WebrpcBadRequestError.prototype);
1204
- }
1205
- }
1206
- class WebrpcBadResponseError extends WebrpcError {
1207
- constructor(name = 'WebrpcBadResponse', code = -5, message = `bad response`, status = 500, cause) {
1208
- super(name, code, message, status, cause);
1209
- Object.setPrototypeOf(this, WebrpcBadResponseError.prototype);
1210
- }
1211
- }
1212
- class WebrpcServerPanicError extends WebrpcError {
1213
- constructor(name = 'WebrpcServerPanic', code = -6, message = `server panic`, status = 500, cause) {
1214
- super(name, code, message, status, cause);
1215
- Object.setPrototypeOf(this, WebrpcServerPanicError.prototype);
1216
- }
1217
- }
1218
- class WebrpcInternalErrorError extends WebrpcError {
1219
- constructor(name = 'WebrpcInternalError', code = -7, message = `internal error`, status = 500, cause) {
1220
- super(name, code, message, status, cause);
1221
- Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype);
1222
- }
1223
- }
1224
- class WebrpcClientAbortedError extends WebrpcError {
1225
- constructor(name = 'WebrpcClientAborted', code = -8, message = `request aborted by client`, status = 400, cause) {
1226
- super(name, code, message, status, cause);
1227
- Object.setPrototypeOf(this, WebrpcClientAbortedError.prototype);
1228
- }
1229
- }
1230
- class WebrpcStreamLostError extends WebrpcError {
1231
- constructor(name = 'WebrpcStreamLost', code = -9, message = `stream lost`, status = 400, cause) {
1232
- super(name, code, message, status, cause);
1233
- Object.setPrototypeOf(this, WebrpcStreamLostError.prototype);
1234
- }
1235
- }
1236
- class WebrpcStreamFinishedError extends WebrpcError {
1237
- constructor(name = 'WebrpcStreamFinished', code = -10, message = `stream finished`, status = 200, cause) {
1238
- super(name, code, message, status, cause);
1239
- Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype);
1240
- }
1241
- }
1242
-
1243
- // Schema errors
1244
-
1245
- class UnauthorizedError extends WebrpcError {
1246
- constructor(name = 'Unauthorized', code = 1000, message = `Unauthorized access`, status = 401, cause) {
1247
- super(name, code, message, status, cause);
1248
- Object.setPrototypeOf(this, UnauthorizedError.prototype);
1249
- }
1250
- }
1251
- class PermissionDeniedError extends WebrpcError {
1252
- constructor(name = 'PermissionDenied', code = 1001, message = `Permission denied`, status = 403, cause) {
1253
- super(name, code, message, status, cause);
1254
- Object.setPrototypeOf(this, PermissionDeniedError.prototype);
1255
- }
1256
- }
1257
- class SessionExpiredError extends WebrpcError {
1258
- constructor(name = 'SessionExpired', code = 1002, message = `Session expired`, status = 403, cause) {
1259
- super(name, code, message, status, cause);
1260
- Object.setPrototypeOf(this, SessionExpiredError.prototype);
1261
- }
1262
- }
1263
- class MethodNotFoundError extends WebrpcError {
1264
- constructor(name = 'MethodNotFound', code = 1003, message = `Method not found`, status = 404, cause) {
1265
- super(name, code, message, status, cause);
1266
- Object.setPrototypeOf(this, MethodNotFoundError.prototype);
1267
- }
1268
- }
1269
- class RequestConflictError extends WebrpcError {
1270
- constructor(name = 'RequestConflict', code = 1004, message = `Conflict with target resource`, status = 409, cause) {
1271
- super(name, code, message, status, cause);
1272
- Object.setPrototypeOf(this, RequestConflictError.prototype);
1273
- }
1274
- }
1275
- class AbortedError extends WebrpcError {
1276
- constructor(name = 'Aborted', code = 1005, message = `Request aborted`, status = 400, cause) {
1277
- super(name, code, message, status, cause);
1278
- Object.setPrototypeOf(this, AbortedError.prototype);
1279
- }
1280
- }
1281
- class GeoblockedError extends WebrpcError {
1282
- constructor(name = 'Geoblocked', code = 1006, message = `Geoblocked region`, status = 451, cause) {
1283
- super(name, code, message, status, cause);
1284
- Object.setPrototypeOf(this, GeoblockedError.prototype);
1285
- }
1286
- }
1287
- class RateLimitedError extends WebrpcError {
1288
- constructor(name = 'RateLimited', code = 1007, message = `Rate-limited. Please slow down.`, status = 429, cause) {
1289
- super(name, code, message, status, cause);
1290
- Object.setPrototypeOf(this, RateLimitedError.prototype);
1291
- }
1292
- }
1293
- class ProjectNotFoundError extends WebrpcError {
1294
- constructor(name = 'ProjectNotFound', code = 1008, message = `Project not found`, status = 401, cause) {
1295
- super(name, code, message, status, cause);
1296
- Object.setPrototypeOf(this, ProjectNotFoundError.prototype);
1297
- }
1298
- }
1299
- class SecretKeyCorsDisallowedError extends WebrpcError {
1300
- constructor(name = 'SecretKeyCorsDisallowed', code = 1009, message = `CORS disallowed. Admin API Secret Key can't be used from a web app.`, status = 403, cause) {
1301
- super(name, code, message, status, cause);
1302
- Object.setPrototypeOf(this, SecretKeyCorsDisallowedError.prototype);
1303
- }
1304
- }
1305
- class AccessKeyNotFoundError extends WebrpcError {
1306
- constructor(name = 'AccessKeyNotFound', code = 1101, message = `Access key not found`, status = 401, cause) {
1307
- super(name, code, message, status, cause);
1308
- Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype);
1309
- }
1310
- }
1311
- class AccessKeyMismatchError extends WebrpcError {
1312
- constructor(name = 'AccessKeyMismatch', code = 1102, message = `Access key mismatch`, status = 403, cause) {
1313
- super(name, code, message, status, cause);
1314
- Object.setPrototypeOf(this, AccessKeyMismatchError.prototype);
1315
- }
1316
- }
1317
- class InvalidOriginError extends WebrpcError {
1318
- constructor(name = 'InvalidOrigin', code = 1103, message = `Invalid origin for Access Key`, status = 403, cause) {
1319
- super(name, code, message, status, cause);
1320
- Object.setPrototypeOf(this, InvalidOriginError.prototype);
1321
- }
1322
- }
1323
- class InvalidServiceError extends WebrpcError {
1324
- constructor(name = 'InvalidService', code = 1104, message = `Service not enabled for Access key`, status = 403, cause) {
1325
- super(name, code, message, status, cause);
1326
- Object.setPrototypeOf(this, InvalidServiceError.prototype);
1327
- }
1328
- }
1329
- class UnauthorizedUserError extends WebrpcError {
1330
- constructor(name = 'UnauthorizedUser', code = 1105, message = `Unauthorized user`, status = 403, cause) {
1331
- super(name, code, message, status, cause);
1332
- Object.setPrototypeOf(this, UnauthorizedUserError.prototype);
1333
- }
1334
- }
1335
- class InvalidChainError extends WebrpcError {
1336
- constructor(name = 'InvalidChain', code = 1106, message = `Network not enabled for Access key`, status = 403, cause) {
1337
- super(name, code, message, status, cause);
1338
- Object.setPrototypeOf(this, InvalidChainError.prototype);
1339
- }
1340
- }
1341
- class QuotaExceededError extends WebrpcError {
1342
- constructor(name = 'QuotaExceeded', code = 1200, message = `Quota request exceeded`, status = 429, cause) {
1343
- super(name, code, message, status, cause);
1344
- Object.setPrototypeOf(this, QuotaExceededError.prototype);
1345
- }
1346
- }
1347
- class QuotaRateLimitError extends WebrpcError {
1348
- constructor(name = 'QuotaRateLimit', code = 1201, message = `Quota rate limit exceeded`, status = 429, cause) {
1349
- super(name, code, message, status, cause);
1350
- Object.setPrototypeOf(this, QuotaRateLimitError.prototype);
1351
- }
1352
- }
1353
- class NoDefaultKeyError extends WebrpcError {
1354
- constructor(name = 'NoDefaultKey', code = 1300, message = `No default access key found`, status = 403, cause) {
1355
- super(name, code, message, status, cause);
1356
- Object.setPrototypeOf(this, NoDefaultKeyError.prototype);
1357
- }
1358
- }
1359
- class MaxAccessKeysError extends WebrpcError {
1360
- constructor(name = 'MaxAccessKeys', code = 1301, message = `Access keys limit reached`, status = 403, cause) {
1361
- super(name, code, message, status, cause);
1362
- Object.setPrototypeOf(this, MaxAccessKeysError.prototype);
1363
- }
1364
- }
1365
- class AtLeastOneKeyError extends WebrpcError {
1366
- constructor(name = 'AtLeastOneKey', code = 1302, message = `You need at least one Access Key`, status = 403, cause) {
1367
- super(name, code, message, status, cause);
1368
- Object.setPrototypeOf(this, AtLeastOneKeyError.prototype);
1369
- }
1370
- }
1371
- class TimeoutError extends WebrpcError {
1372
- constructor(name = 'Timeout', code = 1900, message = `Request timed out`, status = 408, cause) {
1373
- super(name, code, message, status, cause);
1374
- Object.setPrototypeOf(this, TimeoutError.prototype);
1375
- }
1376
- }
1377
- class NotFoundError extends WebrpcError {
1378
- constructor(name = 'NotFound', code = 2000, message = `Resource not found`, status = 400, cause) {
1379
- super(name, code, message, status, cause);
1380
- Object.setPrototypeOf(this, NotFoundError.prototype);
1381
- }
1382
- }
1383
- class InvalidArgumentError extends WebrpcError {
1384
- constructor(name = 'InvalidArgument', code = 2001, message = `Invalid argument`, status = 400, cause) {
1385
- super(name, code, message, status, cause);
1386
- Object.setPrototypeOf(this, InvalidArgumentError.prototype);
1387
- }
1388
- }
1389
- class NotImplementedError extends WebrpcError {
1390
- constructor(name = 'NotImplemented', code = 9999, message = `Not Implemented`, status = 500, cause) {
1391
- super(name, code, message, status, cause);
1392
- Object.setPrototypeOf(this, NotImplementedError.prototype);
1393
- }
1394
- }
1395
- let errors = /*#__PURE__*/function (errors) {
1396
- errors["WebrpcEndpoint"] = "WebrpcEndpoint";
1397
- errors["WebrpcRequestFailed"] = "WebrpcRequestFailed";
1398
- errors["WebrpcBadRoute"] = "WebrpcBadRoute";
1399
- errors["WebrpcBadMethod"] = "WebrpcBadMethod";
1400
- errors["WebrpcBadRequest"] = "WebrpcBadRequest";
1401
- errors["WebrpcBadResponse"] = "WebrpcBadResponse";
1402
- errors["WebrpcServerPanic"] = "WebrpcServerPanic";
1403
- errors["WebrpcInternalError"] = "WebrpcInternalError";
1404
- errors["WebrpcClientAborted"] = "WebrpcClientAborted";
1405
- errors["WebrpcStreamLost"] = "WebrpcStreamLost";
1406
- errors["WebrpcStreamFinished"] = "WebrpcStreamFinished";
1407
- errors["Unauthorized"] = "Unauthorized";
1408
- errors["PermissionDenied"] = "PermissionDenied";
1409
- errors["SessionExpired"] = "SessionExpired";
1410
- errors["MethodNotFound"] = "MethodNotFound";
1411
- errors["RequestConflict"] = "RequestConflict";
1412
- errors["Aborted"] = "Aborted";
1413
- errors["Geoblocked"] = "Geoblocked";
1414
- errors["RateLimited"] = "RateLimited";
1415
- errors["ProjectNotFound"] = "ProjectNotFound";
1416
- errors["SecretKeyCorsDisallowed"] = "SecretKeyCorsDisallowed";
1417
- errors["AccessKeyNotFound"] = "AccessKeyNotFound";
1418
- errors["AccessKeyMismatch"] = "AccessKeyMismatch";
1419
- errors["InvalidOrigin"] = "InvalidOrigin";
1420
- errors["InvalidService"] = "InvalidService";
1421
- errors["UnauthorizedUser"] = "UnauthorizedUser";
1422
- errors["InvalidChain"] = "InvalidChain";
1423
- errors["QuotaExceeded"] = "QuotaExceeded";
1424
- errors["QuotaRateLimit"] = "QuotaRateLimit";
1425
- errors["NoDefaultKey"] = "NoDefaultKey";
1426
- errors["MaxAccessKeys"] = "MaxAccessKeys";
1427
- errors["AtLeastOneKey"] = "AtLeastOneKey";
1428
- errors["Timeout"] = "Timeout";
1429
- errors["NotFound"] = "NotFound";
1430
- errors["InvalidArgument"] = "InvalidArgument";
1431
- errors["NotImplemented"] = "NotImplemented";
1432
- return errors;
1433
- }({});
1434
- let WebrpcErrorCodes = /*#__PURE__*/function (WebrpcErrorCodes) {
1435
- WebrpcErrorCodes[WebrpcErrorCodes["WebrpcEndpoint"] = 0] = "WebrpcEndpoint";
1436
- WebrpcErrorCodes[WebrpcErrorCodes["WebrpcRequestFailed"] = -1] = "WebrpcRequestFailed";
1437
- WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadRoute"] = -2] = "WebrpcBadRoute";
1438
- WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadMethod"] = -3] = "WebrpcBadMethod";
1439
- WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadRequest"] = -4] = "WebrpcBadRequest";
1440
- WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadResponse"] = -5] = "WebrpcBadResponse";
1441
- WebrpcErrorCodes[WebrpcErrorCodes["WebrpcServerPanic"] = -6] = "WebrpcServerPanic";
1442
- WebrpcErrorCodes[WebrpcErrorCodes["WebrpcInternalError"] = -7] = "WebrpcInternalError";
1443
- WebrpcErrorCodes[WebrpcErrorCodes["WebrpcClientAborted"] = -8] = "WebrpcClientAborted";
1444
- WebrpcErrorCodes[WebrpcErrorCodes["WebrpcStreamLost"] = -9] = "WebrpcStreamLost";
1445
- WebrpcErrorCodes[WebrpcErrorCodes["WebrpcStreamFinished"] = -10] = "WebrpcStreamFinished";
1446
- WebrpcErrorCodes[WebrpcErrorCodes["Unauthorized"] = 1000] = "Unauthorized";
1447
- WebrpcErrorCodes[WebrpcErrorCodes["PermissionDenied"] = 1001] = "PermissionDenied";
1448
- WebrpcErrorCodes[WebrpcErrorCodes["SessionExpired"] = 1002] = "SessionExpired";
1449
- WebrpcErrorCodes[WebrpcErrorCodes["MethodNotFound"] = 1003] = "MethodNotFound";
1450
- WebrpcErrorCodes[WebrpcErrorCodes["RequestConflict"] = 1004] = "RequestConflict";
1451
- WebrpcErrorCodes[WebrpcErrorCodes["Aborted"] = 1005] = "Aborted";
1452
- WebrpcErrorCodes[WebrpcErrorCodes["Geoblocked"] = 1006] = "Geoblocked";
1453
- WebrpcErrorCodes[WebrpcErrorCodes["RateLimited"] = 1007] = "RateLimited";
1454
- WebrpcErrorCodes[WebrpcErrorCodes["ProjectNotFound"] = 1008] = "ProjectNotFound";
1455
- WebrpcErrorCodes[WebrpcErrorCodes["SecretKeyCorsDisallowed"] = 1009] = "SecretKeyCorsDisallowed";
1456
- WebrpcErrorCodes[WebrpcErrorCodes["AccessKeyNotFound"] = 1101] = "AccessKeyNotFound";
1457
- WebrpcErrorCodes[WebrpcErrorCodes["AccessKeyMismatch"] = 1102] = "AccessKeyMismatch";
1458
- WebrpcErrorCodes[WebrpcErrorCodes["InvalidOrigin"] = 1103] = "InvalidOrigin";
1459
- WebrpcErrorCodes[WebrpcErrorCodes["InvalidService"] = 1104] = "InvalidService";
1460
- WebrpcErrorCodes[WebrpcErrorCodes["UnauthorizedUser"] = 1105] = "UnauthorizedUser";
1461
- WebrpcErrorCodes[WebrpcErrorCodes["InvalidChain"] = 1106] = "InvalidChain";
1462
- WebrpcErrorCodes[WebrpcErrorCodes["QuotaExceeded"] = 1200] = "QuotaExceeded";
1463
- WebrpcErrorCodes[WebrpcErrorCodes["QuotaRateLimit"] = 1201] = "QuotaRateLimit";
1464
- WebrpcErrorCodes[WebrpcErrorCodes["NoDefaultKey"] = 1300] = "NoDefaultKey";
1465
- WebrpcErrorCodes[WebrpcErrorCodes["MaxAccessKeys"] = 1301] = "MaxAccessKeys";
1466
- WebrpcErrorCodes[WebrpcErrorCodes["AtLeastOneKey"] = 1302] = "AtLeastOneKey";
1467
- WebrpcErrorCodes[WebrpcErrorCodes["Timeout"] = 1900] = "Timeout";
1468
- WebrpcErrorCodes[WebrpcErrorCodes["NotFound"] = 2000] = "NotFound";
1469
- WebrpcErrorCodes[WebrpcErrorCodes["InvalidArgument"] = 2001] = "InvalidArgument";
1470
- WebrpcErrorCodes[WebrpcErrorCodes["NotImplemented"] = 9999] = "NotImplemented";
1471
- return WebrpcErrorCodes;
1472
- }({});
1473
- const webrpcErrorByCode = {
1474
- [0]: WebrpcEndpointError,
1475
- [-1]: WebrpcRequestFailedError,
1476
- [-2]: WebrpcBadRouteError,
1477
- [-3]: WebrpcBadMethodError,
1478
- [-4]: WebrpcBadRequestError,
1479
- [-5]: WebrpcBadResponseError,
1480
- [-6]: WebrpcServerPanicError,
1481
- [-7]: WebrpcInternalErrorError,
1482
- [-8]: WebrpcClientAbortedError,
1483
- [-9]: WebrpcStreamLostError,
1484
- [-10]: WebrpcStreamFinishedError,
1485
- [1000]: UnauthorizedError,
1486
- [1001]: PermissionDeniedError,
1487
- [1002]: SessionExpiredError,
1488
- [1003]: MethodNotFoundError,
1489
- [1004]: RequestConflictError,
1490
- [1005]: AbortedError,
1491
- [1006]: GeoblockedError,
1492
- [1007]: RateLimitedError,
1493
- [1008]: ProjectNotFoundError,
1494
- [1009]: SecretKeyCorsDisallowedError,
1495
- [1101]: AccessKeyNotFoundError,
1496
- [1102]: AccessKeyMismatchError,
1497
- [1103]: InvalidOriginError,
1498
- [1104]: InvalidServiceError,
1499
- [1105]: UnauthorizedUserError,
1500
- [1106]: InvalidChainError,
1501
- [1200]: QuotaExceededError,
1502
- [1201]: QuotaRateLimitError,
1503
- [1300]: NoDefaultKeyError,
1504
- [1301]: MaxAccessKeysError,
1505
- [1302]: AtLeastOneKeyError,
1506
- [1900]: TimeoutError,
1507
- [2000]: NotFoundError,
1508
- [2001]: InvalidArgumentError,
1509
- [9999]: NotImplementedError
1510
- };
1511
-
1512
- class MarketplaceIndexer extends Marketplace {
1513
- constructor(hostname, projectAccessKey, jwtAuth) {
1514
- super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
1515
- this.projectAccessKey = projectAccessKey;
1516
- this.jwtAuth = jwtAuth;
1517
- this._fetch = (input, init) => {
1518
- // automatically include jwt and access key auth header to requests
1519
- // if its been set on the api client
1520
- const headers = {};
1521
- const jwtAuth = this.jwtAuth;
1522
- const projectAccessKey = this.projectAccessKey;
1523
- if (jwtAuth && jwtAuth.length > 0) {
1524
- headers['Authorization'] = `BEARER ${jwtAuth}`;
1525
- }
1526
- if (projectAccessKey && projectAccessKey.length > 0) {
1527
- headers['X-Access-Key'] = projectAccessKey;
1528
- }
1529
-
1530
- // before the request is made
1531
- init.headers = _extends({}, init.headers, headers);
1532
- return fetch(input, init);
1533
- };
1534
- this.fetch = this._fetch;
1535
- }
1536
- }
1537
-
1538
- exports.AbortedError = AbortedError;
1539
- exports.AccessKeyMismatchError = AccessKeyMismatchError;
1540
- exports.AccessKeyNotFoundError = AccessKeyNotFoundError;
1541
- exports.ActivityAction = ActivityAction;
1542
- exports.Admin = Admin;
1543
- exports.AtLeastOneKeyError = AtLeastOneKeyError;
1544
- exports.CollectibleSource = CollectibleSource;
1545
- exports.CollectibleStatus = CollectibleStatus;
1546
- exports.CollectionPriority = CollectionPriority;
1547
- exports.CollectionStatus = CollectionStatus;
1548
- exports.ContractType = ContractType;
1549
- exports.CurrencyStatus = CurrencyStatus;
1550
- exports.ExecuteType = ExecuteType;
1551
- exports.GeoblockedError = GeoblockedError;
1552
- exports.InvalidArgumentError = InvalidArgumentError;
1553
- exports.InvalidChainError = InvalidChainError;
1554
- exports.InvalidOriginError = InvalidOriginError;
1555
- exports.InvalidServiceError = InvalidServiceError;
1556
- exports.ItemsContractStatus = ItemsContractStatus;
1557
- exports.Marketplace = Marketplace;
1558
- exports.MarketplaceIndexer = MarketplaceIndexer;
1559
- exports.MarketplaceKind = MarketplaceKind;
1560
- exports.MaxAccessKeysError = MaxAccessKeysError;
1561
- exports.MetadataStatus = MetadataStatus;
1562
- exports.MethodNotFoundError = MethodNotFoundError;
1563
- exports.NoDefaultKeyError = NoDefaultKeyError;
1564
- exports.NotFoundError = NotFoundError;
1565
- exports.NotImplementedError = NotImplementedError;
1566
- exports.OfferType = OfferType;
1567
- exports.OrderSide = OrderSide;
1568
- exports.OrderStatus = OrderStatus;
1569
- exports.OrderbookKind = OrderbookKind;
1570
- exports.PermissionDeniedError = PermissionDeniedError;
1571
- exports.PrimarySaleContractStatus = PrimarySaleContractStatus;
1572
- exports.PrimarySaleItemDetailType = PrimarySaleItemDetailType;
1573
- exports.PrimarySaleVersion = PrimarySaleVersion;
1574
- exports.ProjectNotFoundError = ProjectNotFoundError;
1575
- exports.ProjectStatus = ProjectStatus;
1576
- exports.PropertyType = PropertyType;
1577
- exports.QuotaExceededError = QuotaExceededError;
1578
- exports.QuotaRateLimitError = QuotaRateLimitError;
1579
- exports.RateLimitedError = RateLimitedError;
1580
- exports.RequestConflictError = RequestConflictError;
1581
- exports.SecretKeyCorsDisallowedError = SecretKeyCorsDisallowedError;
1582
- exports.SessionExpiredError = SessionExpiredError;
1583
- exports.SortOrder = SortOrder;
1584
- exports.SourceKind = SourceKind;
1585
- exports.StepType = StepType;
1586
- exports.TimeoutError = TimeoutError;
1587
- exports.TransactionCrypto = TransactionCrypto;
1588
- exports.TransactionNFTCheckoutProvider = TransactionNFTCheckoutProvider;
1589
- exports.TransactionOnRampProvider = TransactionOnRampProvider;
1590
- exports.TransactionSwapProvider = TransactionSwapProvider;
1591
- exports.UnauthorizedError = UnauthorizedError;
1592
- exports.UnauthorizedUserError = UnauthorizedUserError;
1593
- exports.VersionFromHeader = VersionFromHeader;
1594
- exports.WalletKind = WalletKind;
1595
- exports.WebRPCSchemaHash = WebRPCSchemaHash;
1596
- exports.WebRPCSchemaVersion = WebRPCSchemaVersion;
1597
- exports.WebRPCVersion = WebRPCVersion;
1598
- exports.WebrpcBadMethodError = WebrpcBadMethodError;
1599
- exports.WebrpcBadRequestError = WebrpcBadRequestError;
1600
- exports.WebrpcBadResponseError = WebrpcBadResponseError;
1601
- exports.WebrpcBadRouteError = WebrpcBadRouteError;
1602
- exports.WebrpcClientAbortedError = WebrpcClientAbortedError;
1603
- exports.WebrpcEndpointError = WebrpcEndpointError;
1604
- exports.WebrpcError = WebrpcError;
1605
- exports.WebrpcErrorCodes = WebrpcErrorCodes;
1606
- exports.WebrpcHeader = WebrpcHeader;
1607
- exports.WebrpcHeaderValue = WebrpcHeaderValue;
1608
- exports.WebrpcInternalErrorError = WebrpcInternalErrorError;
1609
- exports.WebrpcRequestFailedError = WebrpcRequestFailedError;
1610
- exports.WebrpcServerPanicError = WebrpcServerPanicError;
1611
- exports.WebrpcStreamFinishedError = WebrpcStreamFinishedError;
1612
- exports.WebrpcStreamLostError = WebrpcStreamLostError;
1613
- exports.errors = errors;
1614
- exports.webrpcErrorByCode = webrpcErrorByCode;