@0xsequence/api 2.0.10 → 2.0.11

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.
@@ -14,7 +14,7 @@ function _extends() {
14
14
  }
15
15
 
16
16
  /* eslint-disable */
17
- // sequence-api v0.4.0 d3f5f1338693d60d58f87bc408a076218201a097
17
+ // sequence-api v0.4.0 76d8fe04d2e75e4d4ffd3d4c9da10b7a733622da
18
18
  // --
19
19
  // Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
20
20
  //
@@ -27,7 +27,7 @@ const WebRPCVersion = 'v1';
27
27
  const WebRPCSchemaVersion = 'v0.4.0';
28
28
 
29
29
  // Schema hash generated from your RIDL schema
30
- const WebRPCSchemaHash = 'd3f5f1338693d60d58f87bc408a076218201a097';
30
+ const WebRPCSchemaHash = '76d8fe04d2e75e4d4ffd3d4c9da10b7a733622da';
31
31
 
32
32
  //
33
33
  // Types
@@ -38,6 +38,20 @@ let SortOrder = /*#__PURE__*/function (SortOrder) {
38
38
  SortOrder["ASC"] = "ASC";
39
39
  return SortOrder;
40
40
  }({});
41
+ let SardinePaymentType = /*#__PURE__*/function (SardinePaymentType) {
42
+ SardinePaymentType["ach"] = "ach";
43
+ SardinePaymentType["debit"] = "debit";
44
+ SardinePaymentType["credit"] = "credit";
45
+ SardinePaymentType["us_debit"] = "us_debit";
46
+ SardinePaymentType["international_debit"] = "international_debit";
47
+ SardinePaymentType["international_credit"] = "international_credit";
48
+ return SardinePaymentType;
49
+ }({});
50
+ let SardineQuoteType = /*#__PURE__*/function (SardineQuoteType) {
51
+ SardineQuoteType["buy"] = "buy";
52
+ SardineQuoteType["sell"] = "sell";
53
+ return SardineQuoteType;
54
+ }({});
41
55
  let TokenType = /*#__PURE__*/function (TokenType) {
42
56
  TokenType["ERC20"] = "ERC20";
43
57
  TokenType["ERC721"] = "ERC721";
@@ -348,8 +362,74 @@ class API {
348
362
  });
349
363
  });
350
364
  };
351
- this.getSardineClientToken = (headers, signal) => {
352
- return this.fetch(this.url('GetSardineClientToken'), createHTTPRequest({}, headers, signal)).then(res => {
365
+ this.resolveENSAddress = (args, headers, signal) => {
366
+ return this.fetch(this.url('ResolveENSAddress'), createHTTPRequest(args, headers, signal)).then(res => {
367
+ return buildResponse(res).then(_data => {
368
+ return {
369
+ address: _data.address,
370
+ ok: _data.ok
371
+ };
372
+ });
373
+ }, error => {
374
+ throw WebrpcRequestFailedError.new({
375
+ cause: `fetch(): ${error.message || ''}`
376
+ });
377
+ });
378
+ };
379
+ this.isValidSignature = (args, headers, signal) => {
380
+ return this.fetch(this.url('IsValidSignature'), createHTTPRequest(args, headers, signal)).then(res => {
381
+ return buildResponse(res).then(_data => {
382
+ return {
383
+ isValid: _data.isValid
384
+ };
385
+ });
386
+ }, error => {
387
+ throw WebrpcRequestFailedError.new({
388
+ cause: `fetch(): ${error.message || ''}`
389
+ });
390
+ });
391
+ };
392
+ this.isValidMessageSignature = (args, headers, signal) => {
393
+ return this.fetch(this.url('IsValidMessageSignature'), createHTTPRequest(args, headers, signal)).then(res => {
394
+ return buildResponse(res).then(_data => {
395
+ return {
396
+ isValid: _data.isValid
397
+ };
398
+ });
399
+ }, error => {
400
+ throw WebrpcRequestFailedError.new({
401
+ cause: `fetch(): ${error.message || ''}`
402
+ });
403
+ });
404
+ };
405
+ this.isValidTypedDataSignature = (args, headers, signal) => {
406
+ return this.fetch(this.url('IsValidTypedDataSignature'), createHTTPRequest(args, headers, signal)).then(res => {
407
+ return buildResponse(res).then(_data => {
408
+ return {
409
+ isValid: _data.isValid
410
+ };
411
+ });
412
+ }, error => {
413
+ throw WebrpcRequestFailedError.new({
414
+ cause: `fetch(): ${error.message || ''}`
415
+ });
416
+ });
417
+ };
418
+ this.isValidETHAuthProof = (args, headers, signal) => {
419
+ return this.fetch(this.url('IsValidETHAuthProof'), createHTTPRequest(args, headers, signal)).then(res => {
420
+ return buildResponse(res).then(_data => {
421
+ return {
422
+ isValid: _data.isValid
423
+ };
424
+ });
425
+ }, error => {
426
+ throw WebrpcRequestFailedError.new({
427
+ cause: `fetch(): ${error.message || ''}`
428
+ });
429
+ });
430
+ };
431
+ this.sardineGetClientToken = (headers, signal) => {
432
+ return this.fetch(this.url('SardineGetClientToken'), createHTTPRequest({}, headers, signal)).then(res => {
353
433
  return buildResponse(res).then(_data => {
354
434
  return {
355
435
  token: _data.token
@@ -361,8 +441,8 @@ class API {
361
441
  });
362
442
  });
363
443
  };
364
- this.getSardineNFTCheckoutToken = (args, headers, signal) => {
365
- return this.fetch(this.url('GetSardineNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then(res => {
444
+ this.sardineGetNFTCheckoutToken = (args, headers, signal) => {
445
+ return this.fetch(this.url('SardineGetNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then(res => {
366
446
  return buildResponse(res).then(_data => {
367
447
  return {
368
448
  resp: _data.resp
@@ -374,8 +454,8 @@ class API {
374
454
  });
375
455
  });
376
456
  };
377
- this.getSardineNFTCheckoutOrderStatus = (args, headers, signal) => {
378
- return this.fetch(this.url('GetSardineNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then(res => {
457
+ this.sardineGetNFTCheckoutOrderStatus = (args, headers, signal) => {
458
+ return this.fetch(this.url('SardineGetNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then(res => {
379
459
  return buildResponse(res).then(_data => {
380
460
  return {
381
461
  resp: _data.resp
@@ -387,12 +467,11 @@ class API {
387
467
  });
388
468
  });
389
469
  };
390
- this.resolveENSAddress = (args, headers, signal) => {
391
- return this.fetch(this.url('ResolveENSAddress'), createHTTPRequest(args, headers, signal)).then(res => {
470
+ this.sardineGetSupportedRegions = (headers, signal) => {
471
+ return this.fetch(this.url('SardineGetSupportedRegions'), createHTTPRequest({}, headers, signal)).then(res => {
392
472
  return buildResponse(res).then(_data => {
393
473
  return {
394
- address: _data.address,
395
- ok: _data.ok
474
+ regions: _data.regions
396
475
  };
397
476
  });
398
477
  }, error => {
@@ -401,11 +480,11 @@ class API {
401
480
  });
402
481
  });
403
482
  };
404
- this.isValidSignature = (args, headers, signal) => {
405
- return this.fetch(this.url('IsValidSignature'), createHTTPRequest(args, headers, signal)).then(res => {
483
+ this.sardineGetSupportedFiatCurrencies = (headers, signal) => {
484
+ return this.fetch(this.url('SardineGetSupportedFiatCurrencies'), createHTTPRequest({}, headers, signal)).then(res => {
406
485
  return buildResponse(res).then(_data => {
407
486
  return {
408
- isValid: _data.isValid
487
+ tokens: _data.tokens
409
488
  };
410
489
  });
411
490
  }, error => {
@@ -414,11 +493,11 @@ class API {
414
493
  });
415
494
  });
416
495
  };
417
- this.isValidMessageSignature = (args, headers, signal) => {
418
- return this.fetch(this.url('IsValidMessageSignature'), createHTTPRequest(args, headers, signal)).then(res => {
496
+ this.sardineGetSupportedTokens = (headers, signal) => {
497
+ return this.fetch(this.url('SardineGetSupportedTokens'), createHTTPRequest({}, headers, signal)).then(res => {
419
498
  return buildResponse(res).then(_data => {
420
499
  return {
421
- isValid: _data.isValid
500
+ tokens: _data.tokens
422
501
  };
423
502
  });
424
503
  }, error => {
@@ -427,11 +506,11 @@ class API {
427
506
  });
428
507
  });
429
508
  };
430
- this.isValidTypedDataSignature = (args, headers, signal) => {
431
- return this.fetch(this.url('IsValidTypedDataSignature'), createHTTPRequest(args, headers, signal)).then(res => {
509
+ this.sardineGetEnabledTokens = (headers, signal) => {
510
+ return this.fetch(this.url('SardineGetEnabledTokens'), createHTTPRequest({}, headers, signal)).then(res => {
432
511
  return buildResponse(res).then(_data => {
433
512
  return {
434
- isValid: _data.isValid
513
+ tokens: _data.tokens
435
514
  };
436
515
  });
437
516
  }, error => {
@@ -440,11 +519,50 @@ class API {
440
519
  });
441
520
  });
442
521
  };
443
- this.isValidETHAuthProof = (args, headers, signal) => {
444
- return this.fetch(this.url('IsValidETHAuthProof'), createHTTPRequest(args, headers, signal)).then(res => {
522
+ this.sardineGetQuote = (args, headers, signal) => {
523
+ return this.fetch(this.url('SardineGetQuote'), createHTTPRequest(args, headers, signal)).then(res => {
445
524
  return buildResponse(res).then(_data => {
446
525
  return {
447
- isValid: _data.isValid
526
+ quote: _data.quote
527
+ };
528
+ });
529
+ }, error => {
530
+ throw WebrpcRequestFailedError.new({
531
+ cause: `fetch(): ${error.message || ''}`
532
+ });
533
+ });
534
+ };
535
+ this.getSardineClientToken = (headers, signal) => {
536
+ return this.fetch(this.url('GetSardineClientToken'), createHTTPRequest({}, headers, signal)).then(res => {
537
+ return buildResponse(res).then(_data => {
538
+ return {
539
+ token: _data.token
540
+ };
541
+ });
542
+ }, error => {
543
+ throw WebrpcRequestFailedError.new({
544
+ cause: `fetch(): ${error.message || ''}`
545
+ });
546
+ });
547
+ };
548
+ this.getSardineNFTCheckoutToken = (args, headers, signal) => {
549
+ return this.fetch(this.url('GetSardineNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then(res => {
550
+ return buildResponse(res).then(_data => {
551
+ return {
552
+ resp: _data.resp
553
+ };
554
+ });
555
+ }, error => {
556
+ throw WebrpcRequestFailedError.new({
557
+ cause: `fetch(): ${error.message || ''}`
558
+ });
559
+ });
560
+ };
561
+ this.getSardineNFTCheckoutOrderStatus = (args, headers, signal) => {
562
+ return this.fetch(this.url('GetSardineNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then(res => {
563
+ return buildResponse(res).then(_data => {
564
+ return {
565
+ resp: _data.resp
448
566
  };
449
567
  });
450
568
  }, error => {
@@ -600,8 +718,7 @@ class API {
600
718
  return this.fetch(this.url('LinkWallet'), createHTTPRequest(args, headers, signal)).then(res => {
601
719
  return buildResponse(res).then(_data => {
602
720
  return {
603
- status: _data.status,
604
- linkedWalletAddress: _data.linkedWalletAddress
721
+ status: _data.status
605
722
  };
606
723
  });
607
724
  }, error => {
@@ -663,11 +780,24 @@ class API {
663
780
  });
664
781
  });
665
782
  };
666
- this.getSwapQuotes = (args, headers, signal) => {
667
- return this.fetch(this.url('GetSwapQuotes'), createHTTPRequest(args, headers, signal)).then(res => {
783
+ this.getSwapPrices = (args, headers, signal) => {
784
+ return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
785
+ return buildResponse(res).then(_data => {
786
+ return {
787
+ swapPrices: _data.swapPrices
788
+ };
789
+ });
790
+ }, error => {
791
+ throw WebrpcRequestFailedError.new({
792
+ cause: `fetch(): ${error.message || ''}`
793
+ });
794
+ });
795
+ };
796
+ this.getSwapQuote = (args, headers, signal) => {
797
+ return this.fetch(this.url('GetSwapQuote'), createHTTPRequest(args, headers, signal)).then(res => {
668
798
  return buildResponse(res).then(_data => {
669
799
  return {
670
- swapQuotes: _data.swapQuotes
800
+ swapQuote: _data.swapQuote
671
801
  };
672
802
  });
673
803
  }, error => {
@@ -1067,4 +1197,4 @@ class SequenceAPIClient extends API {
1067
1197
  }
1068
1198
  }
1069
1199
 
1070
- export { API, AbortedError, GeoblockedError, InvalidArgumentError, NotFoundError, PermissionDeniedError, QueryFailedError, SequenceAPIClient, SessionExpiredError, SortOrder, TokenType, UnauthorizedError, UnavailableError, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion, WebrpcBadMethodError, WebrpcBadRequestError, WebrpcBadResponseError, WebrpcBadRouteError, WebrpcClientDisconnectedError, WebrpcEndpointError, WebrpcError, WebrpcInternalErrorError, WebrpcRequestFailedError, WebrpcServerPanicError, WebrpcStreamFinishedError, WebrpcStreamLostError, errors };
1200
+ export { API, AbortedError, GeoblockedError, InvalidArgumentError, NotFoundError, PermissionDeniedError, QueryFailedError, SardinePaymentType, SardineQuoteType, SequenceAPIClient, SessionExpiredError, SortOrder, TokenType, UnauthorizedError, UnavailableError, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion, WebrpcBadMethodError, WebrpcBadRequestError, WebrpcBadResponseError, WebrpcBadRouteError, WebrpcClientDisconnectedError, WebrpcEndpointError, WebrpcError, WebrpcInternalErrorError, WebrpcRequestFailedError, WebrpcServerPanicError, WebrpcStreamFinishedError, WebrpcStreamLostError, errors };