@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.
- package/dist/0xsequence-api.cjs.dev.js +161 -29
- package/dist/0xsequence-api.cjs.prod.js +161 -29
- package/dist/0xsequence-api.esm.js +160 -30
- package/dist/declarations/src/api.gen.d.ts +231 -42
- package/package.json +1 -1
- package/src/api.gen.ts +439 -90
|
@@ -18,7 +18,7 @@ function _extends() {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/* eslint-disable */
|
|
21
|
-
// sequence-api v0.4.0
|
|
21
|
+
// sequence-api v0.4.0 76d8fe04d2e75e4d4ffd3d4c9da10b7a733622da
|
|
22
22
|
// --
|
|
23
23
|
// Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
|
|
24
24
|
//
|
|
@@ -31,7 +31,7 @@ const WebRPCVersion = 'v1';
|
|
|
31
31
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
32
32
|
|
|
33
33
|
// Schema hash generated from your RIDL schema
|
|
34
|
-
const WebRPCSchemaHash = '
|
|
34
|
+
const WebRPCSchemaHash = '76d8fe04d2e75e4d4ffd3d4c9da10b7a733622da';
|
|
35
35
|
|
|
36
36
|
//
|
|
37
37
|
// Types
|
|
@@ -42,6 +42,20 @@ let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
|
42
42
|
SortOrder["ASC"] = "ASC";
|
|
43
43
|
return SortOrder;
|
|
44
44
|
}({});
|
|
45
|
+
let SardinePaymentType = /*#__PURE__*/function (SardinePaymentType) {
|
|
46
|
+
SardinePaymentType["ach"] = "ach";
|
|
47
|
+
SardinePaymentType["debit"] = "debit";
|
|
48
|
+
SardinePaymentType["credit"] = "credit";
|
|
49
|
+
SardinePaymentType["us_debit"] = "us_debit";
|
|
50
|
+
SardinePaymentType["international_debit"] = "international_debit";
|
|
51
|
+
SardinePaymentType["international_credit"] = "international_credit";
|
|
52
|
+
return SardinePaymentType;
|
|
53
|
+
}({});
|
|
54
|
+
let SardineQuoteType = /*#__PURE__*/function (SardineQuoteType) {
|
|
55
|
+
SardineQuoteType["buy"] = "buy";
|
|
56
|
+
SardineQuoteType["sell"] = "sell";
|
|
57
|
+
return SardineQuoteType;
|
|
58
|
+
}({});
|
|
45
59
|
let TokenType = /*#__PURE__*/function (TokenType) {
|
|
46
60
|
TokenType["ERC20"] = "ERC20";
|
|
47
61
|
TokenType["ERC721"] = "ERC721";
|
|
@@ -352,8 +366,74 @@ class API {
|
|
|
352
366
|
});
|
|
353
367
|
});
|
|
354
368
|
};
|
|
355
|
-
this.
|
|
356
|
-
return this.fetch(this.url('
|
|
369
|
+
this.resolveENSAddress = (args, headers, signal) => {
|
|
370
|
+
return this.fetch(this.url('ResolveENSAddress'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
371
|
+
return buildResponse(res).then(_data => {
|
|
372
|
+
return {
|
|
373
|
+
address: _data.address,
|
|
374
|
+
ok: _data.ok
|
|
375
|
+
};
|
|
376
|
+
});
|
|
377
|
+
}, error => {
|
|
378
|
+
throw WebrpcRequestFailedError.new({
|
|
379
|
+
cause: `fetch(): ${error.message || ''}`
|
|
380
|
+
});
|
|
381
|
+
});
|
|
382
|
+
};
|
|
383
|
+
this.isValidSignature = (args, headers, signal) => {
|
|
384
|
+
return this.fetch(this.url('IsValidSignature'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
385
|
+
return buildResponse(res).then(_data => {
|
|
386
|
+
return {
|
|
387
|
+
isValid: _data.isValid
|
|
388
|
+
};
|
|
389
|
+
});
|
|
390
|
+
}, error => {
|
|
391
|
+
throw WebrpcRequestFailedError.new({
|
|
392
|
+
cause: `fetch(): ${error.message || ''}`
|
|
393
|
+
});
|
|
394
|
+
});
|
|
395
|
+
};
|
|
396
|
+
this.isValidMessageSignature = (args, headers, signal) => {
|
|
397
|
+
return this.fetch(this.url('IsValidMessageSignature'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
398
|
+
return buildResponse(res).then(_data => {
|
|
399
|
+
return {
|
|
400
|
+
isValid: _data.isValid
|
|
401
|
+
};
|
|
402
|
+
});
|
|
403
|
+
}, error => {
|
|
404
|
+
throw WebrpcRequestFailedError.new({
|
|
405
|
+
cause: `fetch(): ${error.message || ''}`
|
|
406
|
+
});
|
|
407
|
+
});
|
|
408
|
+
};
|
|
409
|
+
this.isValidTypedDataSignature = (args, headers, signal) => {
|
|
410
|
+
return this.fetch(this.url('IsValidTypedDataSignature'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
411
|
+
return buildResponse(res).then(_data => {
|
|
412
|
+
return {
|
|
413
|
+
isValid: _data.isValid
|
|
414
|
+
};
|
|
415
|
+
});
|
|
416
|
+
}, error => {
|
|
417
|
+
throw WebrpcRequestFailedError.new({
|
|
418
|
+
cause: `fetch(): ${error.message || ''}`
|
|
419
|
+
});
|
|
420
|
+
});
|
|
421
|
+
};
|
|
422
|
+
this.isValidETHAuthProof = (args, headers, signal) => {
|
|
423
|
+
return this.fetch(this.url('IsValidETHAuthProof'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
424
|
+
return buildResponse(res).then(_data => {
|
|
425
|
+
return {
|
|
426
|
+
isValid: _data.isValid
|
|
427
|
+
};
|
|
428
|
+
});
|
|
429
|
+
}, error => {
|
|
430
|
+
throw WebrpcRequestFailedError.new({
|
|
431
|
+
cause: `fetch(): ${error.message || ''}`
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434
|
+
};
|
|
435
|
+
this.sardineGetClientToken = (headers, signal) => {
|
|
436
|
+
return this.fetch(this.url('SardineGetClientToken'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
357
437
|
return buildResponse(res).then(_data => {
|
|
358
438
|
return {
|
|
359
439
|
token: _data.token
|
|
@@ -365,8 +445,8 @@ class API {
|
|
|
365
445
|
});
|
|
366
446
|
});
|
|
367
447
|
};
|
|
368
|
-
this.
|
|
369
|
-
return this.fetch(this.url('
|
|
448
|
+
this.sardineGetNFTCheckoutToken = (args, headers, signal) => {
|
|
449
|
+
return this.fetch(this.url('SardineGetNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
370
450
|
return buildResponse(res).then(_data => {
|
|
371
451
|
return {
|
|
372
452
|
resp: _data.resp
|
|
@@ -378,8 +458,8 @@ class API {
|
|
|
378
458
|
});
|
|
379
459
|
});
|
|
380
460
|
};
|
|
381
|
-
this.
|
|
382
|
-
return this.fetch(this.url('
|
|
461
|
+
this.sardineGetNFTCheckoutOrderStatus = (args, headers, signal) => {
|
|
462
|
+
return this.fetch(this.url('SardineGetNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
383
463
|
return buildResponse(res).then(_data => {
|
|
384
464
|
return {
|
|
385
465
|
resp: _data.resp
|
|
@@ -391,12 +471,11 @@ class API {
|
|
|
391
471
|
});
|
|
392
472
|
});
|
|
393
473
|
};
|
|
394
|
-
this.
|
|
395
|
-
return this.fetch(this.url('
|
|
474
|
+
this.sardineGetSupportedRegions = (headers, signal) => {
|
|
475
|
+
return this.fetch(this.url('SardineGetSupportedRegions'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
396
476
|
return buildResponse(res).then(_data => {
|
|
397
477
|
return {
|
|
398
|
-
|
|
399
|
-
ok: _data.ok
|
|
478
|
+
regions: _data.regions
|
|
400
479
|
};
|
|
401
480
|
});
|
|
402
481
|
}, error => {
|
|
@@ -405,11 +484,11 @@ class API {
|
|
|
405
484
|
});
|
|
406
485
|
});
|
|
407
486
|
};
|
|
408
|
-
this.
|
|
409
|
-
return this.fetch(this.url('
|
|
487
|
+
this.sardineGetSupportedFiatCurrencies = (headers, signal) => {
|
|
488
|
+
return this.fetch(this.url('SardineGetSupportedFiatCurrencies'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
410
489
|
return buildResponse(res).then(_data => {
|
|
411
490
|
return {
|
|
412
|
-
|
|
491
|
+
tokens: _data.tokens
|
|
413
492
|
};
|
|
414
493
|
});
|
|
415
494
|
}, error => {
|
|
@@ -418,11 +497,11 @@ class API {
|
|
|
418
497
|
});
|
|
419
498
|
});
|
|
420
499
|
};
|
|
421
|
-
this.
|
|
422
|
-
return this.fetch(this.url('
|
|
500
|
+
this.sardineGetSupportedTokens = (headers, signal) => {
|
|
501
|
+
return this.fetch(this.url('SardineGetSupportedTokens'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
423
502
|
return buildResponse(res).then(_data => {
|
|
424
503
|
return {
|
|
425
|
-
|
|
504
|
+
tokens: _data.tokens
|
|
426
505
|
};
|
|
427
506
|
});
|
|
428
507
|
}, error => {
|
|
@@ -431,11 +510,11 @@ class API {
|
|
|
431
510
|
});
|
|
432
511
|
});
|
|
433
512
|
};
|
|
434
|
-
this.
|
|
435
|
-
return this.fetch(this.url('
|
|
513
|
+
this.sardineGetEnabledTokens = (headers, signal) => {
|
|
514
|
+
return this.fetch(this.url('SardineGetEnabledTokens'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
436
515
|
return buildResponse(res).then(_data => {
|
|
437
516
|
return {
|
|
438
|
-
|
|
517
|
+
tokens: _data.tokens
|
|
439
518
|
};
|
|
440
519
|
});
|
|
441
520
|
}, error => {
|
|
@@ -444,11 +523,50 @@ class API {
|
|
|
444
523
|
});
|
|
445
524
|
});
|
|
446
525
|
};
|
|
447
|
-
this.
|
|
448
|
-
return this.fetch(this.url('
|
|
526
|
+
this.sardineGetQuote = (args, headers, signal) => {
|
|
527
|
+
return this.fetch(this.url('SardineGetQuote'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
449
528
|
return buildResponse(res).then(_data => {
|
|
450
529
|
return {
|
|
451
|
-
|
|
530
|
+
quote: _data.quote
|
|
531
|
+
};
|
|
532
|
+
});
|
|
533
|
+
}, error => {
|
|
534
|
+
throw WebrpcRequestFailedError.new({
|
|
535
|
+
cause: `fetch(): ${error.message || ''}`
|
|
536
|
+
});
|
|
537
|
+
});
|
|
538
|
+
};
|
|
539
|
+
this.getSardineClientToken = (headers, signal) => {
|
|
540
|
+
return this.fetch(this.url('GetSardineClientToken'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
541
|
+
return buildResponse(res).then(_data => {
|
|
542
|
+
return {
|
|
543
|
+
token: _data.token
|
|
544
|
+
};
|
|
545
|
+
});
|
|
546
|
+
}, error => {
|
|
547
|
+
throw WebrpcRequestFailedError.new({
|
|
548
|
+
cause: `fetch(): ${error.message || ''}`
|
|
549
|
+
});
|
|
550
|
+
});
|
|
551
|
+
};
|
|
552
|
+
this.getSardineNFTCheckoutToken = (args, headers, signal) => {
|
|
553
|
+
return this.fetch(this.url('GetSardineNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
554
|
+
return buildResponse(res).then(_data => {
|
|
555
|
+
return {
|
|
556
|
+
resp: _data.resp
|
|
557
|
+
};
|
|
558
|
+
});
|
|
559
|
+
}, error => {
|
|
560
|
+
throw WebrpcRequestFailedError.new({
|
|
561
|
+
cause: `fetch(): ${error.message || ''}`
|
|
562
|
+
});
|
|
563
|
+
});
|
|
564
|
+
};
|
|
565
|
+
this.getSardineNFTCheckoutOrderStatus = (args, headers, signal) => {
|
|
566
|
+
return this.fetch(this.url('GetSardineNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
567
|
+
return buildResponse(res).then(_data => {
|
|
568
|
+
return {
|
|
569
|
+
resp: _data.resp
|
|
452
570
|
};
|
|
453
571
|
});
|
|
454
572
|
}, error => {
|
|
@@ -604,8 +722,7 @@ class API {
|
|
|
604
722
|
return this.fetch(this.url('LinkWallet'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
605
723
|
return buildResponse(res).then(_data => {
|
|
606
724
|
return {
|
|
607
|
-
status: _data.status
|
|
608
|
-
linkedWalletAddress: _data.linkedWalletAddress
|
|
725
|
+
status: _data.status
|
|
609
726
|
};
|
|
610
727
|
});
|
|
611
728
|
}, error => {
|
|
@@ -667,11 +784,24 @@ class API {
|
|
|
667
784
|
});
|
|
668
785
|
});
|
|
669
786
|
};
|
|
670
|
-
this.
|
|
671
|
-
return this.fetch(this.url('
|
|
787
|
+
this.getSwapPrices = (args, headers, signal) => {
|
|
788
|
+
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
789
|
+
return buildResponse(res).then(_data => {
|
|
790
|
+
return {
|
|
791
|
+
swapPrices: _data.swapPrices
|
|
792
|
+
};
|
|
793
|
+
});
|
|
794
|
+
}, error => {
|
|
795
|
+
throw WebrpcRequestFailedError.new({
|
|
796
|
+
cause: `fetch(): ${error.message || ''}`
|
|
797
|
+
});
|
|
798
|
+
});
|
|
799
|
+
};
|
|
800
|
+
this.getSwapQuote = (args, headers, signal) => {
|
|
801
|
+
return this.fetch(this.url('GetSwapQuote'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
672
802
|
return buildResponse(res).then(_data => {
|
|
673
803
|
return {
|
|
674
|
-
|
|
804
|
+
swapQuote: _data.swapQuote
|
|
675
805
|
};
|
|
676
806
|
});
|
|
677
807
|
}, error => {
|
|
@@ -1078,6 +1208,8 @@ exports.InvalidArgumentError = InvalidArgumentError;
|
|
|
1078
1208
|
exports.NotFoundError = NotFoundError;
|
|
1079
1209
|
exports.PermissionDeniedError = PermissionDeniedError;
|
|
1080
1210
|
exports.QueryFailedError = QueryFailedError;
|
|
1211
|
+
exports.SardinePaymentType = SardinePaymentType;
|
|
1212
|
+
exports.SardineQuoteType = SardineQuoteType;
|
|
1081
1213
|
exports.SequenceAPIClient = SequenceAPIClient;
|
|
1082
1214
|
exports.SessionExpiredError = SessionExpiredError;
|
|
1083
1215
|
exports.SortOrder = SortOrder;
|
|
@@ -18,7 +18,7 @@ function _extends() {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/* eslint-disable */
|
|
21
|
-
// sequence-api v0.4.0
|
|
21
|
+
// sequence-api v0.4.0 76d8fe04d2e75e4d4ffd3d4c9da10b7a733622da
|
|
22
22
|
// --
|
|
23
23
|
// Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
|
|
24
24
|
//
|
|
@@ -31,7 +31,7 @@ const WebRPCVersion = 'v1';
|
|
|
31
31
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
32
32
|
|
|
33
33
|
// Schema hash generated from your RIDL schema
|
|
34
|
-
const WebRPCSchemaHash = '
|
|
34
|
+
const WebRPCSchemaHash = '76d8fe04d2e75e4d4ffd3d4c9da10b7a733622da';
|
|
35
35
|
|
|
36
36
|
//
|
|
37
37
|
// Types
|
|
@@ -42,6 +42,20 @@ let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
|
42
42
|
SortOrder["ASC"] = "ASC";
|
|
43
43
|
return SortOrder;
|
|
44
44
|
}({});
|
|
45
|
+
let SardinePaymentType = /*#__PURE__*/function (SardinePaymentType) {
|
|
46
|
+
SardinePaymentType["ach"] = "ach";
|
|
47
|
+
SardinePaymentType["debit"] = "debit";
|
|
48
|
+
SardinePaymentType["credit"] = "credit";
|
|
49
|
+
SardinePaymentType["us_debit"] = "us_debit";
|
|
50
|
+
SardinePaymentType["international_debit"] = "international_debit";
|
|
51
|
+
SardinePaymentType["international_credit"] = "international_credit";
|
|
52
|
+
return SardinePaymentType;
|
|
53
|
+
}({});
|
|
54
|
+
let SardineQuoteType = /*#__PURE__*/function (SardineQuoteType) {
|
|
55
|
+
SardineQuoteType["buy"] = "buy";
|
|
56
|
+
SardineQuoteType["sell"] = "sell";
|
|
57
|
+
return SardineQuoteType;
|
|
58
|
+
}({});
|
|
45
59
|
let TokenType = /*#__PURE__*/function (TokenType) {
|
|
46
60
|
TokenType["ERC20"] = "ERC20";
|
|
47
61
|
TokenType["ERC721"] = "ERC721";
|
|
@@ -352,8 +366,74 @@ class API {
|
|
|
352
366
|
});
|
|
353
367
|
});
|
|
354
368
|
};
|
|
355
|
-
this.
|
|
356
|
-
return this.fetch(this.url('
|
|
369
|
+
this.resolveENSAddress = (args, headers, signal) => {
|
|
370
|
+
return this.fetch(this.url('ResolveENSAddress'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
371
|
+
return buildResponse(res).then(_data => {
|
|
372
|
+
return {
|
|
373
|
+
address: _data.address,
|
|
374
|
+
ok: _data.ok
|
|
375
|
+
};
|
|
376
|
+
});
|
|
377
|
+
}, error => {
|
|
378
|
+
throw WebrpcRequestFailedError.new({
|
|
379
|
+
cause: `fetch(): ${error.message || ''}`
|
|
380
|
+
});
|
|
381
|
+
});
|
|
382
|
+
};
|
|
383
|
+
this.isValidSignature = (args, headers, signal) => {
|
|
384
|
+
return this.fetch(this.url('IsValidSignature'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
385
|
+
return buildResponse(res).then(_data => {
|
|
386
|
+
return {
|
|
387
|
+
isValid: _data.isValid
|
|
388
|
+
};
|
|
389
|
+
});
|
|
390
|
+
}, error => {
|
|
391
|
+
throw WebrpcRequestFailedError.new({
|
|
392
|
+
cause: `fetch(): ${error.message || ''}`
|
|
393
|
+
});
|
|
394
|
+
});
|
|
395
|
+
};
|
|
396
|
+
this.isValidMessageSignature = (args, headers, signal) => {
|
|
397
|
+
return this.fetch(this.url('IsValidMessageSignature'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
398
|
+
return buildResponse(res).then(_data => {
|
|
399
|
+
return {
|
|
400
|
+
isValid: _data.isValid
|
|
401
|
+
};
|
|
402
|
+
});
|
|
403
|
+
}, error => {
|
|
404
|
+
throw WebrpcRequestFailedError.new({
|
|
405
|
+
cause: `fetch(): ${error.message || ''}`
|
|
406
|
+
});
|
|
407
|
+
});
|
|
408
|
+
};
|
|
409
|
+
this.isValidTypedDataSignature = (args, headers, signal) => {
|
|
410
|
+
return this.fetch(this.url('IsValidTypedDataSignature'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
411
|
+
return buildResponse(res).then(_data => {
|
|
412
|
+
return {
|
|
413
|
+
isValid: _data.isValid
|
|
414
|
+
};
|
|
415
|
+
});
|
|
416
|
+
}, error => {
|
|
417
|
+
throw WebrpcRequestFailedError.new({
|
|
418
|
+
cause: `fetch(): ${error.message || ''}`
|
|
419
|
+
});
|
|
420
|
+
});
|
|
421
|
+
};
|
|
422
|
+
this.isValidETHAuthProof = (args, headers, signal) => {
|
|
423
|
+
return this.fetch(this.url('IsValidETHAuthProof'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
424
|
+
return buildResponse(res).then(_data => {
|
|
425
|
+
return {
|
|
426
|
+
isValid: _data.isValid
|
|
427
|
+
};
|
|
428
|
+
});
|
|
429
|
+
}, error => {
|
|
430
|
+
throw WebrpcRequestFailedError.new({
|
|
431
|
+
cause: `fetch(): ${error.message || ''}`
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434
|
+
};
|
|
435
|
+
this.sardineGetClientToken = (headers, signal) => {
|
|
436
|
+
return this.fetch(this.url('SardineGetClientToken'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
357
437
|
return buildResponse(res).then(_data => {
|
|
358
438
|
return {
|
|
359
439
|
token: _data.token
|
|
@@ -365,8 +445,8 @@ class API {
|
|
|
365
445
|
});
|
|
366
446
|
});
|
|
367
447
|
};
|
|
368
|
-
this.
|
|
369
|
-
return this.fetch(this.url('
|
|
448
|
+
this.sardineGetNFTCheckoutToken = (args, headers, signal) => {
|
|
449
|
+
return this.fetch(this.url('SardineGetNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
370
450
|
return buildResponse(res).then(_data => {
|
|
371
451
|
return {
|
|
372
452
|
resp: _data.resp
|
|
@@ -378,8 +458,8 @@ class API {
|
|
|
378
458
|
});
|
|
379
459
|
});
|
|
380
460
|
};
|
|
381
|
-
this.
|
|
382
|
-
return this.fetch(this.url('
|
|
461
|
+
this.sardineGetNFTCheckoutOrderStatus = (args, headers, signal) => {
|
|
462
|
+
return this.fetch(this.url('SardineGetNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
383
463
|
return buildResponse(res).then(_data => {
|
|
384
464
|
return {
|
|
385
465
|
resp: _data.resp
|
|
@@ -391,12 +471,11 @@ class API {
|
|
|
391
471
|
});
|
|
392
472
|
});
|
|
393
473
|
};
|
|
394
|
-
this.
|
|
395
|
-
return this.fetch(this.url('
|
|
474
|
+
this.sardineGetSupportedRegions = (headers, signal) => {
|
|
475
|
+
return this.fetch(this.url('SardineGetSupportedRegions'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
396
476
|
return buildResponse(res).then(_data => {
|
|
397
477
|
return {
|
|
398
|
-
|
|
399
|
-
ok: _data.ok
|
|
478
|
+
regions: _data.regions
|
|
400
479
|
};
|
|
401
480
|
});
|
|
402
481
|
}, error => {
|
|
@@ -405,11 +484,11 @@ class API {
|
|
|
405
484
|
});
|
|
406
485
|
});
|
|
407
486
|
};
|
|
408
|
-
this.
|
|
409
|
-
return this.fetch(this.url('
|
|
487
|
+
this.sardineGetSupportedFiatCurrencies = (headers, signal) => {
|
|
488
|
+
return this.fetch(this.url('SardineGetSupportedFiatCurrencies'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
410
489
|
return buildResponse(res).then(_data => {
|
|
411
490
|
return {
|
|
412
|
-
|
|
491
|
+
tokens: _data.tokens
|
|
413
492
|
};
|
|
414
493
|
});
|
|
415
494
|
}, error => {
|
|
@@ -418,11 +497,11 @@ class API {
|
|
|
418
497
|
});
|
|
419
498
|
});
|
|
420
499
|
};
|
|
421
|
-
this.
|
|
422
|
-
return this.fetch(this.url('
|
|
500
|
+
this.sardineGetSupportedTokens = (headers, signal) => {
|
|
501
|
+
return this.fetch(this.url('SardineGetSupportedTokens'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
423
502
|
return buildResponse(res).then(_data => {
|
|
424
503
|
return {
|
|
425
|
-
|
|
504
|
+
tokens: _data.tokens
|
|
426
505
|
};
|
|
427
506
|
});
|
|
428
507
|
}, error => {
|
|
@@ -431,11 +510,11 @@ class API {
|
|
|
431
510
|
});
|
|
432
511
|
});
|
|
433
512
|
};
|
|
434
|
-
this.
|
|
435
|
-
return this.fetch(this.url('
|
|
513
|
+
this.sardineGetEnabledTokens = (headers, signal) => {
|
|
514
|
+
return this.fetch(this.url('SardineGetEnabledTokens'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
436
515
|
return buildResponse(res).then(_data => {
|
|
437
516
|
return {
|
|
438
|
-
|
|
517
|
+
tokens: _data.tokens
|
|
439
518
|
};
|
|
440
519
|
});
|
|
441
520
|
}, error => {
|
|
@@ -444,11 +523,50 @@ class API {
|
|
|
444
523
|
});
|
|
445
524
|
});
|
|
446
525
|
};
|
|
447
|
-
this.
|
|
448
|
-
return this.fetch(this.url('
|
|
526
|
+
this.sardineGetQuote = (args, headers, signal) => {
|
|
527
|
+
return this.fetch(this.url('SardineGetQuote'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
449
528
|
return buildResponse(res).then(_data => {
|
|
450
529
|
return {
|
|
451
|
-
|
|
530
|
+
quote: _data.quote
|
|
531
|
+
};
|
|
532
|
+
});
|
|
533
|
+
}, error => {
|
|
534
|
+
throw WebrpcRequestFailedError.new({
|
|
535
|
+
cause: `fetch(): ${error.message || ''}`
|
|
536
|
+
});
|
|
537
|
+
});
|
|
538
|
+
};
|
|
539
|
+
this.getSardineClientToken = (headers, signal) => {
|
|
540
|
+
return this.fetch(this.url('GetSardineClientToken'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
541
|
+
return buildResponse(res).then(_data => {
|
|
542
|
+
return {
|
|
543
|
+
token: _data.token
|
|
544
|
+
};
|
|
545
|
+
});
|
|
546
|
+
}, error => {
|
|
547
|
+
throw WebrpcRequestFailedError.new({
|
|
548
|
+
cause: `fetch(): ${error.message || ''}`
|
|
549
|
+
});
|
|
550
|
+
});
|
|
551
|
+
};
|
|
552
|
+
this.getSardineNFTCheckoutToken = (args, headers, signal) => {
|
|
553
|
+
return this.fetch(this.url('GetSardineNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
554
|
+
return buildResponse(res).then(_data => {
|
|
555
|
+
return {
|
|
556
|
+
resp: _data.resp
|
|
557
|
+
};
|
|
558
|
+
});
|
|
559
|
+
}, error => {
|
|
560
|
+
throw WebrpcRequestFailedError.new({
|
|
561
|
+
cause: `fetch(): ${error.message || ''}`
|
|
562
|
+
});
|
|
563
|
+
});
|
|
564
|
+
};
|
|
565
|
+
this.getSardineNFTCheckoutOrderStatus = (args, headers, signal) => {
|
|
566
|
+
return this.fetch(this.url('GetSardineNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
567
|
+
return buildResponse(res).then(_data => {
|
|
568
|
+
return {
|
|
569
|
+
resp: _data.resp
|
|
452
570
|
};
|
|
453
571
|
});
|
|
454
572
|
}, error => {
|
|
@@ -604,8 +722,7 @@ class API {
|
|
|
604
722
|
return this.fetch(this.url('LinkWallet'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
605
723
|
return buildResponse(res).then(_data => {
|
|
606
724
|
return {
|
|
607
|
-
status: _data.status
|
|
608
|
-
linkedWalletAddress: _data.linkedWalletAddress
|
|
725
|
+
status: _data.status
|
|
609
726
|
};
|
|
610
727
|
});
|
|
611
728
|
}, error => {
|
|
@@ -667,11 +784,24 @@ class API {
|
|
|
667
784
|
});
|
|
668
785
|
});
|
|
669
786
|
};
|
|
670
|
-
this.
|
|
671
|
-
return this.fetch(this.url('
|
|
787
|
+
this.getSwapPrices = (args, headers, signal) => {
|
|
788
|
+
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
789
|
+
return buildResponse(res).then(_data => {
|
|
790
|
+
return {
|
|
791
|
+
swapPrices: _data.swapPrices
|
|
792
|
+
};
|
|
793
|
+
});
|
|
794
|
+
}, error => {
|
|
795
|
+
throw WebrpcRequestFailedError.new({
|
|
796
|
+
cause: `fetch(): ${error.message || ''}`
|
|
797
|
+
});
|
|
798
|
+
});
|
|
799
|
+
};
|
|
800
|
+
this.getSwapQuote = (args, headers, signal) => {
|
|
801
|
+
return this.fetch(this.url('GetSwapQuote'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
672
802
|
return buildResponse(res).then(_data => {
|
|
673
803
|
return {
|
|
674
|
-
|
|
804
|
+
swapQuote: _data.swapQuote
|
|
675
805
|
};
|
|
676
806
|
});
|
|
677
807
|
}, error => {
|
|
@@ -1078,6 +1208,8 @@ exports.InvalidArgumentError = InvalidArgumentError;
|
|
|
1078
1208
|
exports.NotFoundError = NotFoundError;
|
|
1079
1209
|
exports.PermissionDeniedError = PermissionDeniedError;
|
|
1080
1210
|
exports.QueryFailedError = QueryFailedError;
|
|
1211
|
+
exports.SardinePaymentType = SardinePaymentType;
|
|
1212
|
+
exports.SardineQuoteType = SardineQuoteType;
|
|
1081
1213
|
exports.SequenceAPIClient = SequenceAPIClient;
|
|
1082
1214
|
exports.SessionExpiredError = SessionExpiredError;
|
|
1083
1215
|
exports.SortOrder = SortOrder;
|