@0xsequence/api 2.0.10 → 2.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/0xsequence-api.cjs.dev.js +177 -68
- package/dist/0xsequence-api.cjs.prod.js +177 -68
- package/dist/0xsequence-api.esm.js +176 -69
- package/dist/declarations/src/api.gen.d.ts +278 -105
- package/package.json +1 -1
- package/src/api.gen.ts +1236 -1149
|
@@ -14,20 +14,20 @@ function _extends() {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/* eslint-disable */
|
|
17
|
-
// sequence-api v0.4.0
|
|
17
|
+
// sequence-api v0.4.0 470a0f88ea399c2a57ff8c22da54358c033ed5f0
|
|
18
18
|
// --
|
|
19
19
|
// Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
|
|
20
20
|
//
|
|
21
21
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
22
22
|
|
|
23
23
|
// WebRPC description and code-gen version
|
|
24
|
-
const WebRPCVersion =
|
|
24
|
+
const WebRPCVersion = "v1";
|
|
25
25
|
|
|
26
26
|
// Schema version of your RIDL schema
|
|
27
|
-
const WebRPCSchemaVersion =
|
|
27
|
+
const WebRPCSchemaVersion = "v0.4.0";
|
|
28
28
|
|
|
29
29
|
// Schema hash generated from your RIDL schema
|
|
30
|
-
const WebRPCSchemaHash =
|
|
30
|
+
const WebRPCSchemaHash = "470a0f88ea399c2a57ff8c22da54358c033ed5f0";
|
|
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.
|
|
352
|
-
return this.fetch(this.url('
|
|
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.
|
|
365
|
-
return this.fetch(this.url('
|
|
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.
|
|
378
|
-
return this.fetch(this.url('
|
|
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.
|
|
391
|
-
return this.fetch(this.url('
|
|
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
|
-
|
|
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.
|
|
405
|
-
return this.fetch(this.url('
|
|
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
|
-
|
|
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.
|
|
418
|
-
return this.fetch(this.url('
|
|
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
|
-
|
|
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.
|
|
431
|
-
return this.fetch(this.url('
|
|
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
|
-
|
|
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.
|
|
444
|
-
return this.fetch(this.url('
|
|
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
|
-
|
|
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,11 @@ class API {
|
|
|
663
780
|
});
|
|
664
781
|
});
|
|
665
782
|
};
|
|
666
|
-
this.
|
|
667
|
-
return this.fetch(this.url('
|
|
783
|
+
this.getSwapPrices = (args, headers, signal) => {
|
|
784
|
+
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
668
785
|
return buildResponse(res).then(_data => {
|
|
669
786
|
return {
|
|
670
|
-
|
|
787
|
+
swapPrices: _data.swapPrices
|
|
671
788
|
};
|
|
672
789
|
});
|
|
673
790
|
}, error => {
|
|
@@ -676,11 +793,11 @@ class API {
|
|
|
676
793
|
});
|
|
677
794
|
});
|
|
678
795
|
};
|
|
679
|
-
this.
|
|
680
|
-
return this.fetch(this.url('
|
|
796
|
+
this.getSwapQuote = (args, headers, signal) => {
|
|
797
|
+
return this.fetch(this.url('GetSwapQuote'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
681
798
|
return buildResponse(res).then(_data => {
|
|
682
799
|
return {
|
|
683
|
-
|
|
800
|
+
swapQuote: _data.swapQuote
|
|
684
801
|
};
|
|
685
802
|
});
|
|
686
803
|
}, error => {
|
|
@@ -689,17 +806,6 @@ class API {
|
|
|
689
806
|
});
|
|
690
807
|
});
|
|
691
808
|
};
|
|
692
|
-
this.updateCurrencyGroup = (args, headers, signal) => {
|
|
693
|
-
return this.fetch(this.url('UpdateCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
694
|
-
return buildResponse(res).then(_data => {
|
|
695
|
-
return {};
|
|
696
|
-
});
|
|
697
|
-
}, error => {
|
|
698
|
-
throw WebrpcRequestFailedError.new({
|
|
699
|
-
cause: `fetch(): ${error.message || ''}`
|
|
700
|
-
});
|
|
701
|
-
});
|
|
702
|
-
};
|
|
703
809
|
this.listCurrencyGroups = (headers, signal) => {
|
|
704
810
|
return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
705
811
|
return buildResponse(res).then(_data => {
|
|
@@ -713,11 +819,11 @@ class API {
|
|
|
713
819
|
});
|
|
714
820
|
});
|
|
715
821
|
};
|
|
716
|
-
this.
|
|
717
|
-
return this.fetch(this.url('
|
|
822
|
+
this.addOffchainInventory = (args, headers, signal) => {
|
|
823
|
+
return this.fetch(this.url('AddOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
718
824
|
return buildResponse(res).then(_data => {
|
|
719
825
|
return {
|
|
720
|
-
|
|
826
|
+
inventoryId: _data.inventoryId
|
|
721
827
|
};
|
|
722
828
|
});
|
|
723
829
|
}, error => {
|
|
@@ -726,11 +832,11 @@ class API {
|
|
|
726
832
|
});
|
|
727
833
|
});
|
|
728
834
|
};
|
|
729
|
-
this.
|
|
730
|
-
return this.fetch(this.url('
|
|
835
|
+
this.getOffchainInventory = (args, headers, signal) => {
|
|
836
|
+
return this.fetch(this.url('GetOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
731
837
|
return buildResponse(res).then(_data => {
|
|
732
838
|
return {
|
|
733
|
-
|
|
839
|
+
inventory: _data.inventory
|
|
734
840
|
};
|
|
735
841
|
});
|
|
736
842
|
}, error => {
|
|
@@ -739,11 +845,11 @@ class API {
|
|
|
739
845
|
});
|
|
740
846
|
});
|
|
741
847
|
};
|
|
742
|
-
this.
|
|
743
|
-
return this.fetch(this.url('
|
|
848
|
+
this.listOffchainInventories = (args, headers, signal) => {
|
|
849
|
+
return this.fetch(this.url('ListOffchainInventories'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
744
850
|
return buildResponse(res).then(_data => {
|
|
745
851
|
return {
|
|
746
|
-
|
|
852
|
+
inventory: _data.inventory
|
|
747
853
|
};
|
|
748
854
|
});
|
|
749
855
|
}, error => {
|
|
@@ -752,12 +858,10 @@ class API {
|
|
|
752
858
|
});
|
|
753
859
|
});
|
|
754
860
|
};
|
|
755
|
-
this.
|
|
756
|
-
return this.fetch(this.url('
|
|
861
|
+
this.updateOffchainInventory = (args, headers, signal) => {
|
|
862
|
+
return this.fetch(this.url('UpdateOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
757
863
|
return buildResponse(res).then(_data => {
|
|
758
|
-
return {
|
|
759
|
-
configs: _data.configs
|
|
760
|
-
};
|
|
864
|
+
return {};
|
|
761
865
|
});
|
|
762
866
|
}, error => {
|
|
763
867
|
throw WebrpcRequestFailedError.new({
|
|
@@ -765,10 +869,12 @@ class API {
|
|
|
765
869
|
});
|
|
766
870
|
});
|
|
767
871
|
};
|
|
768
|
-
this.
|
|
769
|
-
return this.fetch(this.url('
|
|
872
|
+
this.deleteOffchainInventory = (args, headers, signal) => {
|
|
873
|
+
return this.fetch(this.url('DeleteOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
770
874
|
return buildResponse(res).then(_data => {
|
|
771
|
-
return {
|
|
875
|
+
return {
|
|
876
|
+
ok: _data.ok
|
|
877
|
+
};
|
|
772
878
|
});
|
|
773
879
|
}, error => {
|
|
774
880
|
throw WebrpcRequestFailedError.new({
|
|
@@ -776,11 +882,11 @@ class API {
|
|
|
776
882
|
});
|
|
777
883
|
});
|
|
778
884
|
};
|
|
779
|
-
this.
|
|
780
|
-
return this.fetch(this.url('
|
|
885
|
+
this.requestOffchainPayment = (args, headers, signal) => {
|
|
886
|
+
return this.fetch(this.url('RequestOffchainPayment'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
781
887
|
return buildResponse(res).then(_data => {
|
|
782
888
|
return {
|
|
783
|
-
|
|
889
|
+
payment: _data.payment
|
|
784
890
|
};
|
|
785
891
|
});
|
|
786
892
|
}, error => {
|
|
@@ -789,11 +895,12 @@ class API {
|
|
|
789
895
|
});
|
|
790
896
|
});
|
|
791
897
|
};
|
|
792
|
-
this.
|
|
793
|
-
return this.fetch(this.url('
|
|
898
|
+
this.listOffchainPayments = (args, headers, signal) => {
|
|
899
|
+
return this.fetch(this.url('ListOffchainPayments'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
794
900
|
return buildResponse(res).then(_data => {
|
|
795
901
|
return {
|
|
796
|
-
|
|
902
|
+
page: _data.page,
|
|
903
|
+
payments: _data.payments
|
|
797
904
|
};
|
|
798
905
|
});
|
|
799
906
|
}, error => {
|
|
@@ -1067,4 +1174,4 @@ class SequenceAPIClient extends API {
|
|
|
1067
1174
|
}
|
|
1068
1175
|
}
|
|
1069
1176
|
|
|
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 };
|
|
1177
|
+
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 };
|