@0xsequence/api 2.0.17 → 2.0.18
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 +3 -3
- package/dist/0xsequence-api.cjs.prod.js +3 -3
- package/dist/0xsequence-api.esm.js +3 -3
- package/package.json +1 -1
- package/src/api.gen.ts +1202 -982
package/src/api.gen.ts
CHANGED
|
@@ -6,19 +6,18 @@
|
|
|
6
6
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
7
7
|
|
|
8
8
|
// WebRPC description and code-gen version
|
|
9
|
-
export const WebRPCVersion =
|
|
9
|
+
export const WebRPCVersion = 'v1'
|
|
10
10
|
|
|
11
11
|
// Schema version of your RIDL schema
|
|
12
|
-
export const WebRPCSchemaVersion =
|
|
12
|
+
export const WebRPCSchemaVersion = 'v0.4.0'
|
|
13
13
|
|
|
14
14
|
// Schema hash generated from your RIDL schema
|
|
15
|
-
export const WebRPCSchemaHash =
|
|
15
|
+
export const WebRPCSchemaHash = '470a0f88ea399c2a57ff8c22da54358c033ed5f0'
|
|
16
16
|
|
|
17
17
|
//
|
|
18
18
|
// Types
|
|
19
19
|
//
|
|
20
20
|
|
|
21
|
-
|
|
22
21
|
export enum SortOrder {
|
|
23
22
|
DESC = 'DESC',
|
|
24
23
|
ASC = 'ASC'
|
|
@@ -59,7 +58,7 @@ export interface RuntimeStatus {
|
|
|
59
58
|
branch: string
|
|
60
59
|
commitHash: string
|
|
61
60
|
checks: RuntimeChecks
|
|
62
|
-
numTxnsRelayed: {[key: string]: NumTxnsRelayed}
|
|
61
|
+
numTxnsRelayed: { [key: string]: NumTxnsRelayed }
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
export interface NumTxnsRelayed {
|
|
@@ -69,8 +68,7 @@ export interface NumTxnsRelayed {
|
|
|
69
68
|
period: number
|
|
70
69
|
}
|
|
71
70
|
|
|
72
|
-
export interface RuntimeChecks {
|
|
73
|
-
}
|
|
71
|
+
export interface RuntimeChecks {}
|
|
74
72
|
|
|
75
73
|
export interface SequenceContext {
|
|
76
74
|
factory: string
|
|
@@ -442,16 +440,28 @@ export interface API {
|
|
|
442
440
|
getSequenceContext(headers?: object, signal?: AbortSignal): Promise<GetSequenceContextReturn>
|
|
443
441
|
getAuthToken(args: GetAuthTokenArgs, headers?: object, signal?: AbortSignal): Promise<GetAuthTokenReturn>
|
|
444
442
|
getAuthToken2(args: GetAuthToken2Args, headers?: object, signal?: AbortSignal): Promise<GetAuthToken2Return>
|
|
445
|
-
sendPasswordlessLink(
|
|
443
|
+
sendPasswordlessLink(
|
|
444
|
+
args: SendPasswordlessLinkArgs,
|
|
445
|
+
headers?: object,
|
|
446
|
+
signal?: AbortSignal
|
|
447
|
+
): Promise<SendPasswordlessLinkReturn>
|
|
446
448
|
friendList(args: FriendListArgs, headers?: object, signal?: AbortSignal): Promise<FriendListReturn>
|
|
447
449
|
getFriendByAddress(args: GetFriendByAddressArgs, headers?: object, signal?: AbortSignal): Promise<GetFriendByAddressReturn>
|
|
448
450
|
searchFriends(args: SearchFriendsArgs, headers?: object, signal?: AbortSignal): Promise<SearchFriendsReturn>
|
|
449
451
|
addFriend(args: AddFriendArgs, headers?: object, signal?: AbortSignal): Promise<AddFriendReturn>
|
|
450
|
-
updateFriendNickname(
|
|
452
|
+
updateFriendNickname(
|
|
453
|
+
args: UpdateFriendNicknameArgs,
|
|
454
|
+
headers?: object,
|
|
455
|
+
signal?: AbortSignal
|
|
456
|
+
): Promise<UpdateFriendNicknameReturn>
|
|
451
457
|
removeFriend(args: RemoveFriendArgs, headers?: object, signal?: AbortSignal): Promise<RemoveFriendReturn>
|
|
452
458
|
contractCall(args: ContractCallArgs, headers?: object, signal?: AbortSignal): Promise<ContractCallReturn>
|
|
453
459
|
decodeContractCall(args: DecodeContractCallArgs, headers?: object, signal?: AbortSignal): Promise<DecodeContractCallReturn>
|
|
454
|
-
lookupContractCallSelectors(
|
|
460
|
+
lookupContractCallSelectors(
|
|
461
|
+
args: LookupContractCallSelectorsArgs,
|
|
462
|
+
headers?: object,
|
|
463
|
+
signal?: AbortSignal
|
|
464
|
+
): Promise<LookupContractCallSelectorsReturn>
|
|
455
465
|
userStorageFetch(args: UserStorageFetchArgs, headers?: object, signal?: AbortSignal): Promise<UserStorageFetchReturn>
|
|
456
466
|
userStorageSave(args: UserStorageSaveArgs, headers?: object, signal?: AbortSignal): Promise<UserStorageSaveReturn>
|
|
457
467
|
userStorageDelete(args: UserStorageDeleteArgs, headers?: object, signal?: AbortSignal): Promise<UserStorageDeleteReturn>
|
|
@@ -459,77 +469,140 @@ export interface API {
|
|
|
459
469
|
getMoonpayLink(args: GetMoonpayLinkArgs, headers?: object, signal?: AbortSignal): Promise<GetMoonpayLinkReturn>
|
|
460
470
|
resolveENSAddress(args: ResolveENSAddressArgs, headers?: object, signal?: AbortSignal): Promise<ResolveENSAddressReturn>
|
|
461
471
|
isValidSignature(args: IsValidSignatureArgs, headers?: object, signal?: AbortSignal): Promise<IsValidSignatureReturn>
|
|
462
|
-
isValidMessageSignature(
|
|
463
|
-
|
|
472
|
+
isValidMessageSignature(
|
|
473
|
+
args: IsValidMessageSignatureArgs,
|
|
474
|
+
headers?: object,
|
|
475
|
+
signal?: AbortSignal
|
|
476
|
+
): Promise<IsValidMessageSignatureReturn>
|
|
477
|
+
isValidTypedDataSignature(
|
|
478
|
+
args: IsValidTypedDataSignatureArgs,
|
|
479
|
+
headers?: object,
|
|
480
|
+
signal?: AbortSignal
|
|
481
|
+
): Promise<IsValidTypedDataSignatureReturn>
|
|
464
482
|
isValidETHAuthProof(args: IsValidETHAuthProofArgs, headers?: object, signal?: AbortSignal): Promise<IsValidETHAuthProofReturn>
|
|
465
483
|
sardineGetClientToken(headers?: object, signal?: AbortSignal): Promise<SardineGetClientTokenReturn>
|
|
466
|
-
sardineGetNFTCheckoutToken(
|
|
467
|
-
|
|
484
|
+
sardineGetNFTCheckoutToken(
|
|
485
|
+
args: SardineGetNFTCheckoutTokenArgs,
|
|
486
|
+
headers?: object,
|
|
487
|
+
signal?: AbortSignal
|
|
488
|
+
): Promise<SardineGetNFTCheckoutTokenReturn>
|
|
489
|
+
sardineGetNFTCheckoutOrderStatus(
|
|
490
|
+
args: SardineGetNFTCheckoutOrderStatusArgs,
|
|
491
|
+
headers?: object,
|
|
492
|
+
signal?: AbortSignal
|
|
493
|
+
): Promise<SardineGetNFTCheckoutOrderStatusReturn>
|
|
468
494
|
sardineGetSupportedRegions(headers?: object, signal?: AbortSignal): Promise<SardineGetSupportedRegionsReturn>
|
|
469
495
|
sardineGetSupportedFiatCurrencies(headers?: object, signal?: AbortSignal): Promise<SardineGetSupportedFiatCurrenciesReturn>
|
|
470
496
|
sardineGetSupportedTokens(headers?: object, signal?: AbortSignal): Promise<SardineGetSupportedTokensReturn>
|
|
471
497
|
sardineGetEnabledTokens(headers?: object, signal?: AbortSignal): Promise<SardineGetEnabledTokensReturn>
|
|
472
498
|
sardineGetQuote(args: SardineGetQuoteArgs, headers?: object, signal?: AbortSignal): Promise<SardineGetQuoteReturn>
|
|
473
499
|
getSardineClientToken(headers?: object, signal?: AbortSignal): Promise<GetSardineClientTokenReturn>
|
|
474
|
-
getSardineNFTCheckoutToken(
|
|
475
|
-
|
|
500
|
+
getSardineNFTCheckoutToken(
|
|
501
|
+
args: GetSardineNFTCheckoutTokenArgs,
|
|
502
|
+
headers?: object,
|
|
503
|
+
signal?: AbortSignal
|
|
504
|
+
): Promise<GetSardineNFTCheckoutTokenReturn>
|
|
505
|
+
getSardineNFTCheckoutOrderStatus(
|
|
506
|
+
args: GetSardineNFTCheckoutOrderStatusArgs,
|
|
507
|
+
headers?: object,
|
|
508
|
+
signal?: AbortSignal
|
|
509
|
+
): Promise<GetSardineNFTCheckoutOrderStatusReturn>
|
|
476
510
|
getCoinPrices(args: GetCoinPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetCoinPricesReturn>
|
|
477
|
-
getCollectiblePrices(
|
|
511
|
+
getCollectiblePrices(
|
|
512
|
+
args: GetCollectiblePricesArgs,
|
|
513
|
+
headers?: object,
|
|
514
|
+
signal?: AbortSignal
|
|
515
|
+
): Promise<GetCollectiblePricesReturn>
|
|
478
516
|
getExchangeRate(args: GetExchangeRateArgs, headers?: object, signal?: AbortSignal): Promise<GetExchangeRateReturn>
|
|
479
517
|
memoryStore(args: MemoryStoreArgs, headers?: object, signal?: AbortSignal): Promise<MemoryStoreReturn>
|
|
480
518
|
memoryLoad(args: MemoryLoadArgs, headers?: object, signal?: AbortSignal): Promise<MemoryLoadReturn>
|
|
481
519
|
getInviteInfo(headers?: object, signal?: AbortSignal): Promise<GetInviteInfoReturn>
|
|
482
520
|
isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object, signal?: AbortSignal): Promise<IsValidAccessCodeReturn>
|
|
483
|
-
internalClaimAccessCode(
|
|
521
|
+
internalClaimAccessCode(
|
|
522
|
+
args: InternalClaimAccessCodeArgs,
|
|
523
|
+
headers?: object,
|
|
524
|
+
signal?: AbortSignal
|
|
525
|
+
): Promise<InternalClaimAccessCodeReturn>
|
|
484
526
|
blockNumberAtTime(args: BlockNumberAtTimeArgs, headers?: object, signal?: AbortSignal): Promise<BlockNumberAtTimeReturn>
|
|
485
527
|
paperSessionSecret(args: PaperSessionSecretArgs, headers?: object, signal?: AbortSignal): Promise<PaperSessionSecretReturn>
|
|
486
528
|
paperSessionSecret2(args: PaperSessionSecret2Args, headers?: object, signal?: AbortSignal): Promise<PaperSessionSecret2Return>
|
|
487
529
|
linkWallet(args: LinkWalletArgs, headers?: object, signal?: AbortSignal): Promise<LinkWalletReturn>
|
|
488
530
|
getLinkedWallets(args: GetLinkedWalletsArgs, headers?: object, signal?: AbortSignal): Promise<GetLinkedWalletsReturn>
|
|
489
531
|
removeLinkedWallet(args: RemoveLinkedWalletArgs, headers?: object, signal?: AbortSignal): Promise<RemoveLinkedWalletReturn>
|
|
490
|
-
generateWaaSVerificationURL(
|
|
491
|
-
|
|
532
|
+
generateWaaSVerificationURL(
|
|
533
|
+
args: GenerateWaaSVerificationURLArgs,
|
|
534
|
+
headers?: object,
|
|
535
|
+
signal?: AbortSignal
|
|
536
|
+
): Promise<GenerateWaaSVerificationURLReturn>
|
|
537
|
+
validateWaaSVerificationNonce(
|
|
538
|
+
args: ValidateWaaSVerificationNonceArgs,
|
|
539
|
+
headers?: object,
|
|
540
|
+
signal?: AbortSignal
|
|
541
|
+
): Promise<ValidateWaaSVerificationNonceReturn>
|
|
492
542
|
getSwapPrices(args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPricesReturn>
|
|
493
543
|
getSwapQuote(args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteReturn>
|
|
494
544
|
listCurrencyGroups(headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn>
|
|
495
|
-
addOffchainInventory(
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
545
|
+
addOffchainInventory(
|
|
546
|
+
args: AddOffchainInventoryArgs,
|
|
547
|
+
headers?: object,
|
|
548
|
+
signal?: AbortSignal
|
|
549
|
+
): Promise<AddOffchainInventoryReturn>
|
|
550
|
+
getOffchainInventory(
|
|
551
|
+
args: GetOffchainInventoryArgs,
|
|
552
|
+
headers?: object,
|
|
553
|
+
signal?: AbortSignal
|
|
554
|
+
): Promise<GetOffchainInventoryReturn>
|
|
555
|
+
listOffchainInventories(
|
|
556
|
+
args: ListOffchainInventoriesArgs,
|
|
557
|
+
headers?: object,
|
|
558
|
+
signal?: AbortSignal
|
|
559
|
+
): Promise<ListOffchainInventoriesReturn>
|
|
560
|
+
updateOffchainInventory(
|
|
561
|
+
args: UpdateOffchainInventoryArgs,
|
|
562
|
+
headers?: object,
|
|
563
|
+
signal?: AbortSignal
|
|
564
|
+
): Promise<UpdateOffchainInventoryReturn>
|
|
565
|
+
deleteOffchainInventory(
|
|
566
|
+
args: DeleteOffchainInventoryArgs,
|
|
567
|
+
headers?: object,
|
|
568
|
+
signal?: AbortSignal
|
|
569
|
+
): Promise<DeleteOffchainInventoryReturn>
|
|
570
|
+
requestOffchainPayment(
|
|
571
|
+
args: RequestOffchainPaymentArgs,
|
|
572
|
+
headers?: object,
|
|
573
|
+
signal?: AbortSignal
|
|
574
|
+
): Promise<RequestOffchainPaymentReturn>
|
|
575
|
+
listOffchainPayments(
|
|
576
|
+
args: ListOffchainPaymentsArgs,
|
|
577
|
+
headers?: object,
|
|
578
|
+
signal?: AbortSignal
|
|
579
|
+
): Promise<ListOffchainPaymentsReturn>
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
export interface PingArgs {}
|
|
506
583
|
|
|
507
584
|
export interface PingReturn {
|
|
508
|
-
status: boolean
|
|
509
|
-
}
|
|
510
|
-
export interface VersionArgs {
|
|
585
|
+
status: boolean
|
|
511
586
|
}
|
|
587
|
+
export interface VersionArgs {}
|
|
512
588
|
|
|
513
589
|
export interface VersionReturn {
|
|
514
|
-
version: Version
|
|
515
|
-
}
|
|
516
|
-
export interface RuntimeStatusArgs {
|
|
590
|
+
version: Version
|
|
517
591
|
}
|
|
592
|
+
export interface RuntimeStatusArgs {}
|
|
518
593
|
|
|
519
594
|
export interface RuntimeStatusReturn {
|
|
520
|
-
status: RuntimeStatus
|
|
521
|
-
}
|
|
522
|
-
export interface ClockArgs {
|
|
595
|
+
status: RuntimeStatus
|
|
523
596
|
}
|
|
597
|
+
export interface ClockArgs {}
|
|
524
598
|
|
|
525
599
|
export interface ClockReturn {
|
|
526
|
-
serverTime: string
|
|
527
|
-
}
|
|
528
|
-
export interface GetSequenceContextArgs {
|
|
600
|
+
serverTime: string
|
|
529
601
|
}
|
|
602
|
+
export interface GetSequenceContextArgs {}
|
|
530
603
|
|
|
531
604
|
export interface GetSequenceContextReturn {
|
|
532
|
-
data: SequenceContext
|
|
605
|
+
data: SequenceContext
|
|
533
606
|
}
|
|
534
607
|
export interface GetAuthTokenArgs {
|
|
535
608
|
ewtString: string
|
|
@@ -540,7 +613,7 @@ export interface GetAuthTokenReturn {
|
|
|
540
613
|
status: boolean
|
|
541
614
|
jwtToken: string
|
|
542
615
|
address: string
|
|
543
|
-
user?: User
|
|
616
|
+
user?: User
|
|
544
617
|
}
|
|
545
618
|
export interface GetAuthToken2Args {
|
|
546
619
|
ewtString: string
|
|
@@ -551,7 +624,7 @@ export interface GetAuthToken2Return {
|
|
|
551
624
|
status: boolean
|
|
552
625
|
jwtToken: string
|
|
553
626
|
address: string
|
|
554
|
-
user?: User
|
|
627
|
+
user?: User
|
|
555
628
|
}
|
|
556
629
|
export interface SendPasswordlessLinkArgs {
|
|
557
630
|
email: string
|
|
@@ -560,7 +633,7 @@ export interface SendPasswordlessLinkArgs {
|
|
|
560
633
|
}
|
|
561
634
|
|
|
562
635
|
export interface SendPasswordlessLinkReturn {
|
|
563
|
-
status: boolean
|
|
636
|
+
status: boolean
|
|
564
637
|
}
|
|
565
638
|
export interface FriendListArgs {
|
|
566
639
|
nickname?: string
|
|
@@ -569,7 +642,7 @@ export interface FriendListArgs {
|
|
|
569
642
|
|
|
570
643
|
export interface FriendListReturn {
|
|
571
644
|
page: Page
|
|
572
|
-
friends: Array<Friend>
|
|
645
|
+
friends: Array<Friend>
|
|
573
646
|
}
|
|
574
647
|
export interface GetFriendByAddressArgs {
|
|
575
648
|
friendAddress: string
|
|
@@ -577,7 +650,7 @@ export interface GetFriendByAddressArgs {
|
|
|
577
650
|
|
|
578
651
|
export interface GetFriendByAddressReturn {
|
|
579
652
|
status: boolean
|
|
580
|
-
friend: Friend
|
|
653
|
+
friend: Friend
|
|
581
654
|
}
|
|
582
655
|
export interface SearchFriendsArgs {
|
|
583
656
|
filterUsername: string
|
|
@@ -585,7 +658,7 @@ export interface SearchFriendsArgs {
|
|
|
585
658
|
}
|
|
586
659
|
|
|
587
660
|
export interface SearchFriendsReturn {
|
|
588
|
-
friends: Array<Friend>
|
|
661
|
+
friends: Array<Friend>
|
|
589
662
|
}
|
|
590
663
|
export interface AddFriendArgs {
|
|
591
664
|
friendAddress: string
|
|
@@ -594,7 +667,7 @@ export interface AddFriendArgs {
|
|
|
594
667
|
|
|
595
668
|
export interface AddFriendReturn {
|
|
596
669
|
status: boolean
|
|
597
|
-
friend?: Friend
|
|
670
|
+
friend?: Friend
|
|
598
671
|
}
|
|
599
672
|
export interface UpdateFriendNicknameArgs {
|
|
600
673
|
friendAddress: string
|
|
@@ -603,14 +676,14 @@ export interface UpdateFriendNicknameArgs {
|
|
|
603
676
|
|
|
604
677
|
export interface UpdateFriendNicknameReturn {
|
|
605
678
|
status: boolean
|
|
606
|
-
friend?: Friend
|
|
679
|
+
friend?: Friend
|
|
607
680
|
}
|
|
608
681
|
export interface RemoveFriendArgs {
|
|
609
682
|
friendAddress: string
|
|
610
683
|
}
|
|
611
684
|
|
|
612
685
|
export interface RemoveFriendReturn {
|
|
613
|
-
status: boolean
|
|
686
|
+
status: boolean
|
|
614
687
|
}
|
|
615
688
|
export interface ContractCallArgs {
|
|
616
689
|
chainID: string
|
|
@@ -621,28 +694,28 @@ export interface ContractCallArgs {
|
|
|
621
694
|
}
|
|
622
695
|
|
|
623
696
|
export interface ContractCallReturn {
|
|
624
|
-
returns: Array<string>
|
|
697
|
+
returns: Array<string>
|
|
625
698
|
}
|
|
626
699
|
export interface DecodeContractCallArgs {
|
|
627
700
|
callData: string
|
|
628
701
|
}
|
|
629
702
|
|
|
630
703
|
export interface DecodeContractCallReturn {
|
|
631
|
-
call: ContractCall
|
|
704
|
+
call: ContractCall
|
|
632
705
|
}
|
|
633
706
|
export interface LookupContractCallSelectorsArgs {
|
|
634
707
|
selectors: Array<string>
|
|
635
708
|
}
|
|
636
709
|
|
|
637
710
|
export interface LookupContractCallSelectorsReturn {
|
|
638
|
-
signatures: Array<Array<string>>
|
|
711
|
+
signatures: Array<Array<string>>
|
|
639
712
|
}
|
|
640
713
|
export interface UserStorageFetchArgs {
|
|
641
714
|
key: string
|
|
642
715
|
}
|
|
643
716
|
|
|
644
717
|
export interface UserStorageFetchReturn {
|
|
645
|
-
object: any
|
|
718
|
+
object: any
|
|
646
719
|
}
|
|
647
720
|
export interface UserStorageSaveArgs {
|
|
648
721
|
key: string
|
|
@@ -650,28 +723,28 @@ export interface UserStorageSaveArgs {
|
|
|
650
723
|
}
|
|
651
724
|
|
|
652
725
|
export interface UserStorageSaveReturn {
|
|
653
|
-
ok: boolean
|
|
726
|
+
ok: boolean
|
|
654
727
|
}
|
|
655
728
|
export interface UserStorageDeleteArgs {
|
|
656
729
|
key: string
|
|
657
730
|
}
|
|
658
731
|
|
|
659
732
|
export interface UserStorageDeleteReturn {
|
|
660
|
-
ok: boolean
|
|
733
|
+
ok: boolean
|
|
661
734
|
}
|
|
662
735
|
export interface UserStorageFetchAllArgs {
|
|
663
736
|
keys?: Array<string>
|
|
664
737
|
}
|
|
665
738
|
|
|
666
739
|
export interface UserStorageFetchAllReturn {
|
|
667
|
-
objects: {[key: string]: any}
|
|
740
|
+
objects: { [key: string]: any }
|
|
668
741
|
}
|
|
669
742
|
export interface GetMoonpayLinkArgs {
|
|
670
743
|
url: string
|
|
671
744
|
}
|
|
672
745
|
|
|
673
746
|
export interface GetMoonpayLinkReturn {
|
|
674
|
-
signedUrl: string
|
|
747
|
+
signedUrl: string
|
|
675
748
|
}
|
|
676
749
|
export interface ResolveENSAddressArgs {
|
|
677
750
|
ens: string
|
|
@@ -679,7 +752,7 @@ export interface ResolveENSAddressArgs {
|
|
|
679
752
|
|
|
680
753
|
export interface ResolveENSAddressReturn {
|
|
681
754
|
address: string
|
|
682
|
-
ok: boolean
|
|
755
|
+
ok: boolean
|
|
683
756
|
}
|
|
684
757
|
export interface IsValidSignatureArgs {
|
|
685
758
|
chainId: string
|
|
@@ -689,7 +762,7 @@ export interface IsValidSignatureArgs {
|
|
|
689
762
|
}
|
|
690
763
|
|
|
691
764
|
export interface IsValidSignatureReturn {
|
|
692
|
-
isValid: boolean
|
|
765
|
+
isValid: boolean
|
|
693
766
|
}
|
|
694
767
|
export interface IsValidMessageSignatureArgs {
|
|
695
768
|
chainId: string
|
|
@@ -699,7 +772,7 @@ export interface IsValidMessageSignatureArgs {
|
|
|
699
772
|
}
|
|
700
773
|
|
|
701
774
|
export interface IsValidMessageSignatureReturn {
|
|
702
|
-
isValid: boolean
|
|
775
|
+
isValid: boolean
|
|
703
776
|
}
|
|
704
777
|
export interface IsValidTypedDataSignatureArgs {
|
|
705
778
|
chainId: string
|
|
@@ -709,7 +782,7 @@ export interface IsValidTypedDataSignatureArgs {
|
|
|
709
782
|
}
|
|
710
783
|
|
|
711
784
|
export interface IsValidTypedDataSignatureReturn {
|
|
712
|
-
isValid: boolean
|
|
785
|
+
isValid: boolean
|
|
713
786
|
}
|
|
714
787
|
export interface IsValidETHAuthProofArgs {
|
|
715
788
|
chainId: string
|
|
@@ -718,99 +791,93 @@ export interface IsValidETHAuthProofArgs {
|
|
|
718
791
|
}
|
|
719
792
|
|
|
720
793
|
export interface IsValidETHAuthProofReturn {
|
|
721
|
-
isValid: boolean
|
|
722
|
-
}
|
|
723
|
-
export interface SardineGetClientTokenArgs {
|
|
794
|
+
isValid: boolean
|
|
724
795
|
}
|
|
796
|
+
export interface SardineGetClientTokenArgs {}
|
|
725
797
|
|
|
726
798
|
export interface SardineGetClientTokenReturn {
|
|
727
|
-
token: string
|
|
799
|
+
token: string
|
|
728
800
|
}
|
|
729
801
|
export interface SardineGetNFTCheckoutTokenArgs {
|
|
730
802
|
params: SardineNFTCheckoutParams
|
|
731
803
|
}
|
|
732
804
|
|
|
733
805
|
export interface SardineGetNFTCheckoutTokenReturn {
|
|
734
|
-
resp: SardineNFTCheckout
|
|
806
|
+
resp: SardineNFTCheckout
|
|
735
807
|
}
|
|
736
808
|
export interface SardineGetNFTCheckoutOrderStatusArgs {
|
|
737
809
|
orderId: string
|
|
738
810
|
}
|
|
739
811
|
|
|
740
812
|
export interface SardineGetNFTCheckoutOrderStatusReturn {
|
|
741
|
-
resp: SardineOrder
|
|
742
|
-
}
|
|
743
|
-
export interface SardineGetSupportedRegionsArgs {
|
|
813
|
+
resp: SardineOrder
|
|
744
814
|
}
|
|
815
|
+
export interface SardineGetSupportedRegionsArgs {}
|
|
745
816
|
|
|
746
817
|
export interface SardineGetSupportedRegionsReturn {
|
|
747
|
-
regions: Array<SardineRegion>
|
|
748
|
-
}
|
|
749
|
-
export interface SardineGetSupportedFiatCurrenciesArgs {
|
|
818
|
+
regions: Array<SardineRegion>
|
|
750
819
|
}
|
|
820
|
+
export interface SardineGetSupportedFiatCurrenciesArgs {}
|
|
751
821
|
|
|
752
822
|
export interface SardineGetSupportedFiatCurrenciesReturn {
|
|
753
|
-
tokens: Array<SardineFiatCurrency>
|
|
754
|
-
}
|
|
755
|
-
export interface SardineGetSupportedTokensArgs {
|
|
823
|
+
tokens: Array<SardineFiatCurrency>
|
|
756
824
|
}
|
|
825
|
+
export interface SardineGetSupportedTokensArgs {}
|
|
757
826
|
|
|
758
827
|
export interface SardineGetSupportedTokensReturn {
|
|
759
|
-
tokens: Array<SardineSupportedToken>
|
|
760
|
-
}
|
|
761
|
-
export interface SardineGetEnabledTokensArgs {
|
|
828
|
+
tokens: Array<SardineSupportedToken>
|
|
762
829
|
}
|
|
830
|
+
export interface SardineGetEnabledTokensArgs {}
|
|
763
831
|
|
|
764
832
|
export interface SardineGetEnabledTokensReturn {
|
|
765
|
-
tokens: Array<SardineEnabledToken>
|
|
833
|
+
tokens: Array<SardineEnabledToken>
|
|
766
834
|
}
|
|
767
835
|
export interface SardineGetQuoteArgs {
|
|
768
836
|
params: SardineGetQuoteParams
|
|
769
837
|
}
|
|
770
838
|
|
|
771
839
|
export interface SardineGetQuoteReturn {
|
|
772
|
-
quote: SardineQuote
|
|
773
|
-
}
|
|
774
|
-
export interface GetSardineClientTokenArgs {
|
|
840
|
+
quote: SardineQuote
|
|
775
841
|
}
|
|
842
|
+
export interface GetSardineClientTokenArgs {}
|
|
776
843
|
|
|
777
844
|
export interface GetSardineClientTokenReturn {
|
|
778
|
-
token: string
|
|
845
|
+
token: string
|
|
779
846
|
}
|
|
780
847
|
export interface GetSardineNFTCheckoutTokenArgs {
|
|
781
848
|
params: SardineNFTCheckoutParams
|
|
782
849
|
}
|
|
783
850
|
|
|
784
851
|
export interface GetSardineNFTCheckoutTokenReturn {
|
|
785
|
-
resp: SardineNFTCheckout
|
|
852
|
+
resp: SardineNFTCheckout
|
|
786
853
|
}
|
|
787
854
|
export interface GetSardineNFTCheckoutOrderStatusArgs {
|
|
788
855
|
orderId: string
|
|
789
856
|
}
|
|
790
857
|
|
|
791
858
|
export interface GetSardineNFTCheckoutOrderStatusReturn {
|
|
792
|
-
resp: SardineOrder
|
|
859
|
+
resp: SardineOrder
|
|
793
860
|
}
|
|
794
861
|
export interface GetCoinPricesArgs {
|
|
795
862
|
tokens: Array<Token>
|
|
796
863
|
}
|
|
797
864
|
|
|
798
865
|
export interface GetCoinPricesReturn {
|
|
799
|
-
tokenPrices: Array<TokenPrice>
|
|
866
|
+
tokenPrices: Array<TokenPrice>
|
|
800
867
|
}
|
|
801
868
|
export interface GetCollectiblePricesArgs {
|
|
802
869
|
tokens: Array<Token>
|
|
803
870
|
}
|
|
804
871
|
|
|
805
872
|
export interface GetCollectiblePricesReturn {
|
|
806
|
-
tokenPrices: Array<TokenPrice>
|
|
873
|
+
tokenPrices: Array<TokenPrice>
|
|
807
874
|
}
|
|
808
875
|
export interface GetExchangeRateArgs {
|
|
809
876
|
toCurrency: string
|
|
810
877
|
}
|
|
811
878
|
|
|
812
879
|
export interface GetExchangeRateReturn {
|
|
813
|
-
exchangeRate: ExchangeRate
|
|
880
|
+
exchangeRate: ExchangeRate
|
|
814
881
|
}
|
|
815
882
|
export interface MemoryStoreArgs {
|
|
816
883
|
key: string
|
|
@@ -818,27 +885,26 @@ export interface MemoryStoreArgs {
|
|
|
818
885
|
}
|
|
819
886
|
|
|
820
887
|
export interface MemoryStoreReturn {
|
|
821
|
-
ok: boolean
|
|
888
|
+
ok: boolean
|
|
822
889
|
}
|
|
823
890
|
export interface MemoryLoadArgs {
|
|
824
891
|
key: string
|
|
825
892
|
}
|
|
826
893
|
|
|
827
894
|
export interface MemoryLoadReturn {
|
|
828
|
-
value: string
|
|
829
|
-
}
|
|
830
|
-
export interface GetInviteInfoArgs {
|
|
895
|
+
value: string
|
|
831
896
|
}
|
|
897
|
+
export interface GetInviteInfoArgs {}
|
|
832
898
|
|
|
833
899
|
export interface GetInviteInfoReturn {
|
|
834
|
-
inviteInfo: InviteInfo
|
|
900
|
+
inviteInfo: InviteInfo
|
|
835
901
|
}
|
|
836
902
|
export interface IsValidAccessCodeArgs {
|
|
837
903
|
accessCode: string
|
|
838
904
|
}
|
|
839
905
|
|
|
840
906
|
export interface IsValidAccessCodeReturn {
|
|
841
|
-
status: boolean
|
|
907
|
+
status: boolean
|
|
842
908
|
}
|
|
843
909
|
export interface InternalClaimAccessCodeArgs {
|
|
844
910
|
address: string
|
|
@@ -846,7 +912,7 @@ export interface InternalClaimAccessCodeArgs {
|
|
|
846
912
|
}
|
|
847
913
|
|
|
848
914
|
export interface InternalClaimAccessCodeReturn {
|
|
849
|
-
status: boolean
|
|
915
|
+
status: boolean
|
|
850
916
|
}
|
|
851
917
|
export interface BlockNumberAtTimeArgs {
|
|
852
918
|
chainId: number
|
|
@@ -854,7 +920,7 @@ export interface BlockNumberAtTimeArgs {
|
|
|
854
920
|
}
|
|
855
921
|
|
|
856
922
|
export interface BlockNumberAtTimeReturn {
|
|
857
|
-
blocks: Array<number>
|
|
923
|
+
blocks: Array<number>
|
|
858
924
|
}
|
|
859
925
|
export interface PaperSessionSecretArgs {
|
|
860
926
|
chainName: string
|
|
@@ -864,7 +930,7 @@ export interface PaperSessionSecretArgs {
|
|
|
864
930
|
}
|
|
865
931
|
|
|
866
932
|
export interface PaperSessionSecretReturn {
|
|
867
|
-
secret: string
|
|
933
|
+
secret: string
|
|
868
934
|
}
|
|
869
935
|
export interface PaperSessionSecret2Args {
|
|
870
936
|
chainName: string
|
|
@@ -874,7 +940,7 @@ export interface PaperSessionSecret2Args {
|
|
|
874
940
|
}
|
|
875
941
|
|
|
876
942
|
export interface PaperSessionSecret2Return {
|
|
877
|
-
secret: string
|
|
943
|
+
secret: string
|
|
878
944
|
}
|
|
879
945
|
export interface LinkWalletArgs {
|
|
880
946
|
parentWalletAddress: string
|
|
@@ -888,7 +954,7 @@ export interface LinkWalletArgs {
|
|
|
888
954
|
}
|
|
889
955
|
|
|
890
956
|
export interface LinkWalletReturn {
|
|
891
|
-
status: boolean
|
|
957
|
+
status: boolean
|
|
892
958
|
}
|
|
893
959
|
export interface GetLinkedWalletsArgs {
|
|
894
960
|
parentWalletAddress: string
|
|
@@ -898,7 +964,7 @@ export interface GetLinkedWalletsArgs {
|
|
|
898
964
|
}
|
|
899
965
|
|
|
900
966
|
export interface GetLinkedWalletsReturn {
|
|
901
|
-
linkedWallets: Array<LinkedWallet>
|
|
967
|
+
linkedWallets: Array<LinkedWallet>
|
|
902
968
|
}
|
|
903
969
|
export interface RemoveLinkedWalletArgs {
|
|
904
970
|
parentWalletAddress: string
|
|
@@ -911,7 +977,7 @@ export interface RemoveLinkedWalletArgs {
|
|
|
911
977
|
}
|
|
912
978
|
|
|
913
979
|
export interface RemoveLinkedWalletReturn {
|
|
914
|
-
status: boolean
|
|
980
|
+
status: boolean
|
|
915
981
|
}
|
|
916
982
|
export interface GenerateWaaSVerificationURLArgs {
|
|
917
983
|
walletAddress: string
|
|
@@ -919,7 +985,7 @@ export interface GenerateWaaSVerificationURLArgs {
|
|
|
919
985
|
|
|
920
986
|
export interface GenerateWaaSVerificationURLReturn {
|
|
921
987
|
nonce: string
|
|
922
|
-
verificationURL: string
|
|
988
|
+
verificationURL: string
|
|
923
989
|
}
|
|
924
990
|
export interface ValidateWaaSVerificationNonceArgs {
|
|
925
991
|
nonce: string
|
|
@@ -929,7 +995,7 @@ export interface ValidateWaaSVerificationNonceArgs {
|
|
|
929
995
|
}
|
|
930
996
|
|
|
931
997
|
export interface ValidateWaaSVerificationNonceReturn {
|
|
932
|
-
walletAddress: string
|
|
998
|
+
walletAddress: string
|
|
933
999
|
}
|
|
934
1000
|
export interface GetSwapPricesArgs {
|
|
935
1001
|
userAddress: string
|
|
@@ -939,7 +1005,7 @@ export interface GetSwapPricesArgs {
|
|
|
939
1005
|
}
|
|
940
1006
|
|
|
941
1007
|
export interface GetSwapPricesReturn {
|
|
942
|
-
swapPrices: Array<SwapPrice>
|
|
1008
|
+
swapPrices: Array<SwapPrice>
|
|
943
1009
|
}
|
|
944
1010
|
export interface GetSwapQuoteArgs {
|
|
945
1011
|
userAddress: string
|
|
@@ -951,47 +1017,45 @@ export interface GetSwapQuoteArgs {
|
|
|
951
1017
|
}
|
|
952
1018
|
|
|
953
1019
|
export interface GetSwapQuoteReturn {
|
|
954
|
-
swapQuote: SwapQuote
|
|
955
|
-
}
|
|
956
|
-
export interface ListCurrencyGroupsArgs {
|
|
1020
|
+
swapQuote: SwapQuote
|
|
957
1021
|
}
|
|
1022
|
+
export interface ListCurrencyGroupsArgs {}
|
|
958
1023
|
|
|
959
1024
|
export interface ListCurrencyGroupsReturn {
|
|
960
|
-
currencyGroups: Array<CurrencyGroup>
|
|
1025
|
+
currencyGroups: Array<CurrencyGroup>
|
|
961
1026
|
}
|
|
962
1027
|
export interface AddOffchainInventoryArgs {
|
|
963
1028
|
inventory: OffchainInventory
|
|
964
1029
|
}
|
|
965
1030
|
|
|
966
1031
|
export interface AddOffchainInventoryReturn {
|
|
967
|
-
inventoryId: number
|
|
1032
|
+
inventoryId: number
|
|
968
1033
|
}
|
|
969
1034
|
export interface GetOffchainInventoryArgs {
|
|
970
1035
|
inventoryId: number
|
|
971
1036
|
}
|
|
972
1037
|
|
|
973
1038
|
export interface GetOffchainInventoryReturn {
|
|
974
|
-
inventory: OffchainInventory
|
|
1039
|
+
inventory: OffchainInventory
|
|
975
1040
|
}
|
|
976
1041
|
export interface ListOffchainInventoriesArgs {
|
|
977
1042
|
projectId: number
|
|
978
1043
|
}
|
|
979
1044
|
|
|
980
1045
|
export interface ListOffchainInventoriesReturn {
|
|
981
|
-
inventory: Array<OffchainInventory>
|
|
1046
|
+
inventory: Array<OffchainInventory>
|
|
982
1047
|
}
|
|
983
1048
|
export interface UpdateOffchainInventoryArgs {
|
|
984
1049
|
inventory: OffchainInventory
|
|
985
1050
|
}
|
|
986
1051
|
|
|
987
|
-
export interface UpdateOffchainInventoryReturn {
|
|
988
|
-
}
|
|
1052
|
+
export interface UpdateOffchainInventoryReturn {}
|
|
989
1053
|
export interface DeleteOffchainInventoryArgs {
|
|
990
1054
|
inventoryId: number
|
|
991
1055
|
}
|
|
992
1056
|
|
|
993
1057
|
export interface DeleteOffchainInventoryReturn {
|
|
994
|
-
ok: boolean
|
|
1058
|
+
ok: boolean
|
|
995
1059
|
}
|
|
996
1060
|
export interface RequestOffchainPaymentArgs {
|
|
997
1061
|
inventoryId: number
|
|
@@ -1001,7 +1065,7 @@ export interface RequestOffchainPaymentArgs {
|
|
|
1001
1065
|
}
|
|
1002
1066
|
|
|
1003
1067
|
export interface RequestOffchainPaymentReturn {
|
|
1004
|
-
payment: PaymentResponse
|
|
1068
|
+
payment: PaymentResponse
|
|
1005
1069
|
}
|
|
1006
1070
|
export interface ListOffchainPaymentsArgs {
|
|
1007
1071
|
inventoryId: number
|
|
@@ -1010,11 +1074,9 @@ export interface ListOffchainPaymentsArgs {
|
|
|
1010
1074
|
|
|
1011
1075
|
export interface ListOffchainPaymentsReturn {
|
|
1012
1076
|
page: Page
|
|
1013
|
-
payments: Array<OffchainPayment>
|
|
1077
|
+
payments: Array<OffchainPayment>
|
|
1014
1078
|
}
|
|
1015
1079
|
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
1080
|
//
|
|
1019
1081
|
// Client
|
|
1020
1082
|
//
|
|
@@ -1031,930 +1093,1091 @@ export class API implements API {
|
|
|
1031
1093
|
private url(name: string): string {
|
|
1032
1094
|
return this.hostname + this.path + name
|
|
1033
1095
|
}
|
|
1034
|
-
|
|
1096
|
+
|
|
1035
1097
|
ping = (headers?: object, signal?: AbortSignal): Promise<PingReturn> => {
|
|
1036
|
-
return this.fetch(
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1098
|
+
return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then(
|
|
1099
|
+
res => {
|
|
1100
|
+
return buildResponse(res).then(_data => {
|
|
1101
|
+
return {
|
|
1102
|
+
status: <boolean>_data.status
|
|
1103
|
+
}
|
|
1104
|
+
})
|
|
1105
|
+
},
|
|
1106
|
+
error => {
|
|
1107
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1108
|
+
}
|
|
1109
|
+
)
|
|
1048
1110
|
}
|
|
1049
|
-
|
|
1111
|
+
|
|
1050
1112
|
version = (headers?: object, signal?: AbortSignal): Promise<VersionReturn> => {
|
|
1051
|
-
return this.fetch(
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1113
|
+
return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then(
|
|
1114
|
+
res => {
|
|
1115
|
+
return buildResponse(res).then(_data => {
|
|
1116
|
+
return {
|
|
1117
|
+
version: <Version>_data.version
|
|
1118
|
+
}
|
|
1119
|
+
})
|
|
1120
|
+
},
|
|
1121
|
+
error => {
|
|
1122
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1123
|
+
}
|
|
1124
|
+
)
|
|
1063
1125
|
}
|
|
1064
|
-
|
|
1126
|
+
|
|
1065
1127
|
runtimeStatus = (headers?: object, signal?: AbortSignal): Promise<RuntimeStatusReturn> => {
|
|
1066
|
-
return this.fetch(
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1128
|
+
return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then(
|
|
1129
|
+
res => {
|
|
1130
|
+
return buildResponse(res).then(_data => {
|
|
1131
|
+
return {
|
|
1132
|
+
status: <RuntimeStatus>_data.status
|
|
1133
|
+
}
|
|
1134
|
+
})
|
|
1135
|
+
},
|
|
1136
|
+
error => {
|
|
1137
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1138
|
+
}
|
|
1139
|
+
)
|
|
1078
1140
|
}
|
|
1079
|
-
|
|
1141
|
+
|
|
1080
1142
|
clock = (headers?: object, signal?: AbortSignal): Promise<ClockReturn> => {
|
|
1081
|
-
return this.fetch(
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1143
|
+
return this.fetch(this.url('Clock'), createHTTPRequest({}, headers, signal)).then(
|
|
1144
|
+
res => {
|
|
1145
|
+
return buildResponse(res).then(_data => {
|
|
1146
|
+
return {
|
|
1147
|
+
serverTime: <string>_data.serverTime
|
|
1148
|
+
}
|
|
1149
|
+
})
|
|
1150
|
+
},
|
|
1151
|
+
error => {
|
|
1152
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1153
|
+
}
|
|
1154
|
+
)
|
|
1093
1155
|
}
|
|
1094
|
-
|
|
1156
|
+
|
|
1095
1157
|
getSequenceContext = (headers?: object, signal?: AbortSignal): Promise<GetSequenceContextReturn> => {
|
|
1096
|
-
return this.fetch(
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1158
|
+
return this.fetch(this.url('GetSequenceContext'), createHTTPRequest({}, headers, signal)).then(
|
|
1159
|
+
res => {
|
|
1160
|
+
return buildResponse(res).then(_data => {
|
|
1161
|
+
return {
|
|
1162
|
+
data: <SequenceContext>_data.data
|
|
1163
|
+
}
|
|
1164
|
+
})
|
|
1165
|
+
},
|
|
1166
|
+
error => {
|
|
1167
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1168
|
+
}
|
|
1169
|
+
)
|
|
1108
1170
|
}
|
|
1109
|
-
|
|
1171
|
+
|
|
1110
1172
|
getAuthToken = (args: GetAuthTokenArgs, headers?: object, signal?: AbortSignal): Promise<GetAuthTokenReturn> => {
|
|
1111
|
-
return this.fetch(
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1173
|
+
return this.fetch(this.url('GetAuthToken'), createHTTPRequest(args, headers, signal)).then(
|
|
1174
|
+
res => {
|
|
1175
|
+
return buildResponse(res).then(_data => {
|
|
1176
|
+
return {
|
|
1177
|
+
status: <boolean>_data.status,
|
|
1178
|
+
jwtToken: <string>_data.jwtToken,
|
|
1179
|
+
address: <string>_data.address,
|
|
1180
|
+
user: <User>_data.user
|
|
1181
|
+
}
|
|
1182
|
+
})
|
|
1183
|
+
},
|
|
1184
|
+
error => {
|
|
1185
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1186
|
+
}
|
|
1187
|
+
)
|
|
1125
1188
|
}
|
|
1126
|
-
|
|
1189
|
+
|
|
1127
1190
|
getAuthToken2 = (args: GetAuthToken2Args, headers?: object, signal?: AbortSignal): Promise<GetAuthToken2Return> => {
|
|
1128
|
-
return this.fetch(
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1191
|
+
return this.fetch(this.url('GetAuthToken2'), createHTTPRequest(args, headers, signal)).then(
|
|
1192
|
+
res => {
|
|
1193
|
+
return buildResponse(res).then(_data => {
|
|
1194
|
+
return {
|
|
1195
|
+
status: <boolean>_data.status,
|
|
1196
|
+
jwtToken: <string>_data.jwtToken,
|
|
1197
|
+
address: <string>_data.address,
|
|
1198
|
+
user: <User>_data.user
|
|
1199
|
+
}
|
|
1200
|
+
})
|
|
1201
|
+
},
|
|
1202
|
+
error => {
|
|
1203
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1204
|
+
}
|
|
1205
|
+
)
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
sendPasswordlessLink = (
|
|
1209
|
+
args: SendPasswordlessLinkArgs,
|
|
1210
|
+
headers?: object,
|
|
1211
|
+
signal?: AbortSignal
|
|
1212
|
+
): Promise<SendPasswordlessLinkReturn> => {
|
|
1213
|
+
return this.fetch(this.url('SendPasswordlessLink'), createHTTPRequest(args, headers, signal)).then(
|
|
1214
|
+
res => {
|
|
1215
|
+
return buildResponse(res).then(_data => {
|
|
1216
|
+
return {
|
|
1217
|
+
status: <boolean>_data.status
|
|
1218
|
+
}
|
|
1219
|
+
})
|
|
1220
|
+
},
|
|
1221
|
+
error => {
|
|
1222
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1223
|
+
}
|
|
1224
|
+
)
|
|
1156
1225
|
}
|
|
1157
|
-
|
|
1226
|
+
|
|
1158
1227
|
friendList = (args: FriendListArgs, headers?: object, signal?: AbortSignal): Promise<FriendListReturn> => {
|
|
1159
|
-
return this.fetch(
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1228
|
+
return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers, signal)).then(
|
|
1229
|
+
res => {
|
|
1230
|
+
return buildResponse(res).then(_data => {
|
|
1231
|
+
return {
|
|
1232
|
+
page: <Page>_data.page,
|
|
1233
|
+
friends: <Array<Friend>>_data.friends
|
|
1234
|
+
}
|
|
1235
|
+
})
|
|
1236
|
+
},
|
|
1237
|
+
error => {
|
|
1238
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1239
|
+
}
|
|
1240
|
+
)
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
getFriendByAddress = (
|
|
1244
|
+
args: GetFriendByAddressArgs,
|
|
1245
|
+
headers?: object,
|
|
1246
|
+
signal?: AbortSignal
|
|
1247
|
+
): Promise<GetFriendByAddressReturn> => {
|
|
1248
|
+
return this.fetch(this.url('GetFriendByAddress'), createHTTPRequest(args, headers, signal)).then(
|
|
1249
|
+
res => {
|
|
1250
|
+
return buildResponse(res).then(_data => {
|
|
1251
|
+
return {
|
|
1252
|
+
status: <boolean>_data.status,
|
|
1253
|
+
friend: <Friend>_data.friend
|
|
1254
|
+
}
|
|
1255
|
+
})
|
|
1256
|
+
},
|
|
1257
|
+
error => {
|
|
1258
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1259
|
+
}
|
|
1260
|
+
)
|
|
1186
1261
|
}
|
|
1187
|
-
|
|
1262
|
+
|
|
1188
1263
|
searchFriends = (args: SearchFriendsArgs, headers?: object, signal?: AbortSignal): Promise<SearchFriendsReturn> => {
|
|
1189
|
-
return this.fetch(
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1264
|
+
return this.fetch(this.url('SearchFriends'), createHTTPRequest(args, headers, signal)).then(
|
|
1265
|
+
res => {
|
|
1266
|
+
return buildResponse(res).then(_data => {
|
|
1267
|
+
return {
|
|
1268
|
+
friends: <Array<Friend>>_data.friends
|
|
1269
|
+
}
|
|
1270
|
+
})
|
|
1271
|
+
},
|
|
1272
|
+
error => {
|
|
1273
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1274
|
+
}
|
|
1275
|
+
)
|
|
1200
1276
|
}
|
|
1201
|
-
|
|
1277
|
+
|
|
1202
1278
|
addFriend = (args: AddFriendArgs, headers?: object, signal?: AbortSignal): Promise<AddFriendReturn> => {
|
|
1203
|
-
return this.fetch(
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1279
|
+
return this.fetch(this.url('AddFriend'), createHTTPRequest(args, headers, signal)).then(
|
|
1280
|
+
res => {
|
|
1281
|
+
return buildResponse(res).then(_data => {
|
|
1282
|
+
return {
|
|
1283
|
+
status: <boolean>_data.status,
|
|
1284
|
+
friend: <Friend>_data.friend
|
|
1285
|
+
}
|
|
1286
|
+
})
|
|
1287
|
+
},
|
|
1288
|
+
error => {
|
|
1289
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1290
|
+
}
|
|
1291
|
+
)
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
updateFriendNickname = (
|
|
1295
|
+
args: UpdateFriendNicknameArgs,
|
|
1296
|
+
headers?: object,
|
|
1297
|
+
signal?: AbortSignal
|
|
1298
|
+
): Promise<UpdateFriendNicknameReturn> => {
|
|
1299
|
+
return this.fetch(this.url('UpdateFriendNickname'), createHTTPRequest(args, headers, signal)).then(
|
|
1300
|
+
res => {
|
|
1301
|
+
return buildResponse(res).then(_data => {
|
|
1302
|
+
return {
|
|
1303
|
+
status: <boolean>_data.status,
|
|
1304
|
+
friend: <Friend>_data.friend
|
|
1305
|
+
}
|
|
1306
|
+
})
|
|
1307
|
+
},
|
|
1308
|
+
error => {
|
|
1309
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1310
|
+
}
|
|
1311
|
+
)
|
|
1230
1312
|
}
|
|
1231
|
-
|
|
1313
|
+
|
|
1232
1314
|
removeFriend = (args: RemoveFriendArgs, headers?: object, signal?: AbortSignal): Promise<RemoveFriendReturn> => {
|
|
1233
|
-
return this.fetch(
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1315
|
+
return this.fetch(this.url('RemoveFriend'), createHTTPRequest(args, headers, signal)).then(
|
|
1316
|
+
res => {
|
|
1317
|
+
return buildResponse(res).then(_data => {
|
|
1318
|
+
return {
|
|
1319
|
+
status: <boolean>_data.status
|
|
1320
|
+
}
|
|
1321
|
+
})
|
|
1322
|
+
},
|
|
1323
|
+
error => {
|
|
1324
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1325
|
+
}
|
|
1326
|
+
)
|
|
1244
1327
|
}
|
|
1245
|
-
|
|
1328
|
+
|
|
1246
1329
|
contractCall = (args: ContractCallArgs, headers?: object, signal?: AbortSignal): Promise<ContractCallReturn> => {
|
|
1247
|
-
return this.fetch(
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1330
|
+
return this.fetch(this.url('ContractCall'), createHTTPRequest(args, headers, signal)).then(
|
|
1331
|
+
res => {
|
|
1332
|
+
return buildResponse(res).then(_data => {
|
|
1333
|
+
return {
|
|
1334
|
+
returns: <Array<string>>_data.returns
|
|
1335
|
+
}
|
|
1336
|
+
})
|
|
1337
|
+
},
|
|
1338
|
+
error => {
|
|
1339
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1340
|
+
}
|
|
1341
|
+
)
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
decodeContractCall = (
|
|
1345
|
+
args: DecodeContractCallArgs,
|
|
1346
|
+
headers?: object,
|
|
1347
|
+
signal?: AbortSignal
|
|
1348
|
+
): Promise<DecodeContractCallReturn> => {
|
|
1349
|
+
return this.fetch(this.url('DecodeContractCall'), createHTTPRequest(args, headers, signal)).then(
|
|
1350
|
+
res => {
|
|
1351
|
+
return buildResponse(res).then(_data => {
|
|
1352
|
+
return {
|
|
1353
|
+
call: <ContractCall>_data.call
|
|
1354
|
+
}
|
|
1355
|
+
})
|
|
1356
|
+
},
|
|
1357
|
+
error => {
|
|
1358
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1359
|
+
}
|
|
1360
|
+
)
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
lookupContractCallSelectors = (
|
|
1364
|
+
args: LookupContractCallSelectorsArgs,
|
|
1365
|
+
headers?: object,
|
|
1366
|
+
signal?: AbortSignal
|
|
1367
|
+
): Promise<LookupContractCallSelectorsReturn> => {
|
|
1368
|
+
return this.fetch(this.url('LookupContractCallSelectors'), createHTTPRequest(args, headers, signal)).then(
|
|
1369
|
+
res => {
|
|
1370
|
+
return buildResponse(res).then(_data => {
|
|
1371
|
+
return {
|
|
1372
|
+
signatures: <Array<Array<string>>>_data.signatures
|
|
1373
|
+
}
|
|
1374
|
+
})
|
|
1375
|
+
},
|
|
1376
|
+
error => {
|
|
1377
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1378
|
+
}
|
|
1379
|
+
)
|
|
1286
1380
|
}
|
|
1287
|
-
|
|
1381
|
+
|
|
1288
1382
|
userStorageFetch = (args: UserStorageFetchArgs, headers?: object, signal?: AbortSignal): Promise<UserStorageFetchReturn> => {
|
|
1289
|
-
return this.fetch(
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1383
|
+
return this.fetch(this.url('UserStorageFetch'), createHTTPRequest(args, headers, signal)).then(
|
|
1384
|
+
res => {
|
|
1385
|
+
return buildResponse(res).then(_data => {
|
|
1386
|
+
return {
|
|
1387
|
+
object: <any>_data.object
|
|
1388
|
+
}
|
|
1389
|
+
})
|
|
1390
|
+
},
|
|
1391
|
+
error => {
|
|
1392
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1393
|
+
}
|
|
1394
|
+
)
|
|
1300
1395
|
}
|
|
1301
|
-
|
|
1396
|
+
|
|
1302
1397
|
userStorageSave = (args: UserStorageSaveArgs, headers?: object, signal?: AbortSignal): Promise<UserStorageSaveReturn> => {
|
|
1303
|
-
return this.fetch(
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
}
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1398
|
+
return this.fetch(this.url('UserStorageSave'), createHTTPRequest(args, headers, signal)).then(
|
|
1399
|
+
res => {
|
|
1400
|
+
return buildResponse(res).then(_data => {
|
|
1401
|
+
return {
|
|
1402
|
+
ok: <boolean>_data.ok
|
|
1403
|
+
}
|
|
1404
|
+
})
|
|
1405
|
+
},
|
|
1406
|
+
error => {
|
|
1407
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1408
|
+
}
|
|
1409
|
+
)
|
|
1314
1410
|
}
|
|
1315
|
-
|
|
1411
|
+
|
|
1316
1412
|
userStorageDelete = (args: UserStorageDeleteArgs, headers?: object, signal?: AbortSignal): Promise<UserStorageDeleteReturn> => {
|
|
1317
|
-
return this.fetch(
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1413
|
+
return this.fetch(this.url('UserStorageDelete'), createHTTPRequest(args, headers, signal)).then(
|
|
1414
|
+
res => {
|
|
1415
|
+
return buildResponse(res).then(_data => {
|
|
1416
|
+
return {
|
|
1417
|
+
ok: <boolean>_data.ok
|
|
1418
|
+
}
|
|
1419
|
+
})
|
|
1420
|
+
},
|
|
1421
|
+
error => {
|
|
1422
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1423
|
+
}
|
|
1424
|
+
)
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
userStorageFetchAll = (
|
|
1428
|
+
args: UserStorageFetchAllArgs,
|
|
1429
|
+
headers?: object,
|
|
1430
|
+
signal?: AbortSignal
|
|
1431
|
+
): Promise<UserStorageFetchAllReturn> => {
|
|
1432
|
+
return this.fetch(this.url('UserStorageFetchAll'), createHTTPRequest(args, headers, signal)).then(
|
|
1433
|
+
res => {
|
|
1434
|
+
return buildResponse(res).then(_data => {
|
|
1435
|
+
return {
|
|
1436
|
+
objects: <{ [key: string]: any }>_data.objects
|
|
1437
|
+
}
|
|
1438
|
+
})
|
|
1439
|
+
},
|
|
1440
|
+
error => {
|
|
1441
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1442
|
+
}
|
|
1443
|
+
)
|
|
1342
1444
|
}
|
|
1343
|
-
|
|
1445
|
+
|
|
1344
1446
|
getMoonpayLink = (args: GetMoonpayLinkArgs, headers?: object, signal?: AbortSignal): Promise<GetMoonpayLinkReturn> => {
|
|
1345
|
-
return this.fetch(
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
}
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1447
|
+
return this.fetch(this.url('GetMoonpayLink'), createHTTPRequest(args, headers, signal)).then(
|
|
1448
|
+
res => {
|
|
1449
|
+
return buildResponse(res).then(_data => {
|
|
1450
|
+
return {
|
|
1451
|
+
signedUrl: <string>_data.signedUrl
|
|
1452
|
+
}
|
|
1453
|
+
})
|
|
1454
|
+
},
|
|
1455
|
+
error => {
|
|
1456
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1457
|
+
}
|
|
1458
|
+
)
|
|
1356
1459
|
}
|
|
1357
|
-
|
|
1460
|
+
|
|
1358
1461
|
resolveENSAddress = (args: ResolveENSAddressArgs, headers?: object, signal?: AbortSignal): Promise<ResolveENSAddressReturn> => {
|
|
1359
|
-
return this.fetch(
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1462
|
+
return this.fetch(this.url('ResolveENSAddress'), createHTTPRequest(args, headers, signal)).then(
|
|
1463
|
+
res => {
|
|
1464
|
+
return buildResponse(res).then(_data => {
|
|
1465
|
+
return {
|
|
1466
|
+
address: <string>_data.address,
|
|
1467
|
+
ok: <boolean>_data.ok
|
|
1468
|
+
}
|
|
1469
|
+
})
|
|
1470
|
+
},
|
|
1471
|
+
error => {
|
|
1472
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1473
|
+
}
|
|
1474
|
+
)
|
|
1371
1475
|
}
|
|
1372
|
-
|
|
1476
|
+
|
|
1373
1477
|
isValidSignature = (args: IsValidSignatureArgs, headers?: object, signal?: AbortSignal): Promise<IsValidSignatureReturn> => {
|
|
1374
|
-
return this.fetch(
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1478
|
+
return this.fetch(this.url('IsValidSignature'), createHTTPRequest(args, headers, signal)).then(
|
|
1479
|
+
res => {
|
|
1480
|
+
return buildResponse(res).then(_data => {
|
|
1481
|
+
return {
|
|
1482
|
+
isValid: <boolean>_data.isValid
|
|
1483
|
+
}
|
|
1484
|
+
})
|
|
1485
|
+
},
|
|
1486
|
+
error => {
|
|
1487
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1488
|
+
}
|
|
1489
|
+
)
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
isValidMessageSignature = (
|
|
1493
|
+
args: IsValidMessageSignatureArgs,
|
|
1494
|
+
headers?: object,
|
|
1495
|
+
signal?: AbortSignal
|
|
1496
|
+
): Promise<IsValidMessageSignatureReturn> => {
|
|
1497
|
+
return this.fetch(this.url('IsValidMessageSignature'), createHTTPRequest(args, headers, signal)).then(
|
|
1498
|
+
res => {
|
|
1499
|
+
return buildResponse(res).then(_data => {
|
|
1500
|
+
return {
|
|
1501
|
+
isValid: <boolean>_data.isValid
|
|
1502
|
+
}
|
|
1503
|
+
})
|
|
1504
|
+
},
|
|
1505
|
+
error => {
|
|
1506
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1507
|
+
}
|
|
1508
|
+
)
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
isValidTypedDataSignature = (
|
|
1512
|
+
args: IsValidTypedDataSignatureArgs,
|
|
1513
|
+
headers?: object,
|
|
1514
|
+
signal?: AbortSignal
|
|
1515
|
+
): Promise<IsValidTypedDataSignatureReturn> => {
|
|
1516
|
+
return this.fetch(this.url('IsValidTypedDataSignature'), createHTTPRequest(args, headers, signal)).then(
|
|
1517
|
+
res => {
|
|
1518
|
+
return buildResponse(res).then(_data => {
|
|
1519
|
+
return {
|
|
1520
|
+
isValid: <boolean>_data.isValid
|
|
1521
|
+
}
|
|
1522
|
+
})
|
|
1523
|
+
},
|
|
1524
|
+
error => {
|
|
1525
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1526
|
+
}
|
|
1527
|
+
)
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
isValidETHAuthProof = (
|
|
1531
|
+
args: IsValidETHAuthProofArgs,
|
|
1532
|
+
headers?: object,
|
|
1533
|
+
signal?: AbortSignal
|
|
1534
|
+
): Promise<IsValidETHAuthProofReturn> => {
|
|
1535
|
+
return this.fetch(this.url('IsValidETHAuthProof'), createHTTPRequest(args, headers, signal)).then(
|
|
1536
|
+
res => {
|
|
1537
|
+
return buildResponse(res).then(_data => {
|
|
1538
|
+
return {
|
|
1539
|
+
isValid: <boolean>_data.isValid
|
|
1540
|
+
}
|
|
1541
|
+
})
|
|
1542
|
+
},
|
|
1543
|
+
error => {
|
|
1544
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1545
|
+
}
|
|
1546
|
+
)
|
|
1427
1547
|
}
|
|
1428
|
-
|
|
1548
|
+
|
|
1429
1549
|
sardineGetClientToken = (headers?: object, signal?: AbortSignal): Promise<SardineGetClientTokenReturn> => {
|
|
1430
|
-
return this.fetch(
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
}
|
|
1443
|
-
|
|
1444
|
-
sardineGetNFTCheckoutToken = (
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1550
|
+
return this.fetch(this.url('SardineGetClientToken'), createHTTPRequest({}, headers, signal)).then(
|
|
1551
|
+
res => {
|
|
1552
|
+
return buildResponse(res).then(_data => {
|
|
1553
|
+
return {
|
|
1554
|
+
token: <string>_data.token
|
|
1555
|
+
}
|
|
1556
|
+
})
|
|
1557
|
+
},
|
|
1558
|
+
error => {
|
|
1559
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1560
|
+
}
|
|
1561
|
+
)
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
sardineGetNFTCheckoutToken = (
|
|
1565
|
+
args: SardineGetNFTCheckoutTokenArgs,
|
|
1566
|
+
headers?: object,
|
|
1567
|
+
signal?: AbortSignal
|
|
1568
|
+
): Promise<SardineGetNFTCheckoutTokenReturn> => {
|
|
1569
|
+
return this.fetch(this.url('SardineGetNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then(
|
|
1570
|
+
res => {
|
|
1571
|
+
return buildResponse(res).then(_data => {
|
|
1572
|
+
return {
|
|
1573
|
+
resp: <SardineNFTCheckout>_data.resp
|
|
1574
|
+
}
|
|
1575
|
+
})
|
|
1576
|
+
},
|
|
1577
|
+
error => {
|
|
1578
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1579
|
+
}
|
|
1580
|
+
)
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
sardineGetNFTCheckoutOrderStatus = (
|
|
1584
|
+
args: SardineGetNFTCheckoutOrderStatusArgs,
|
|
1585
|
+
headers?: object,
|
|
1586
|
+
signal?: AbortSignal
|
|
1587
|
+
): Promise<SardineGetNFTCheckoutOrderStatusReturn> => {
|
|
1588
|
+
return this.fetch(this.url('SardineGetNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then(
|
|
1589
|
+
res => {
|
|
1590
|
+
return buildResponse(res).then(_data => {
|
|
1591
|
+
return {
|
|
1592
|
+
resp: <SardineOrder>_data.resp
|
|
1593
|
+
}
|
|
1594
|
+
})
|
|
1595
|
+
},
|
|
1596
|
+
error => {
|
|
1597
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1598
|
+
}
|
|
1599
|
+
)
|
|
1470
1600
|
}
|
|
1471
|
-
|
|
1601
|
+
|
|
1472
1602
|
sardineGetSupportedRegions = (headers?: object, signal?: AbortSignal): Promise<SardineGetSupportedRegionsReturn> => {
|
|
1473
|
-
return this.fetch(
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
sardineGetSupportedFiatCurrencies = (
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
return {
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1603
|
+
return this.fetch(this.url('SardineGetSupportedRegions'), createHTTPRequest({}, headers, signal)).then(
|
|
1604
|
+
res => {
|
|
1605
|
+
return buildResponse(res).then(_data => {
|
|
1606
|
+
return {
|
|
1607
|
+
regions: <Array<SardineRegion>>_data.regions
|
|
1608
|
+
}
|
|
1609
|
+
})
|
|
1610
|
+
},
|
|
1611
|
+
error => {
|
|
1612
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1613
|
+
}
|
|
1614
|
+
)
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
sardineGetSupportedFiatCurrencies = (
|
|
1618
|
+
headers?: object,
|
|
1619
|
+
signal?: AbortSignal
|
|
1620
|
+
): Promise<SardineGetSupportedFiatCurrenciesReturn> => {
|
|
1621
|
+
return this.fetch(this.url('SardineGetSupportedFiatCurrencies'), createHTTPRequest({}, headers, signal)).then(
|
|
1622
|
+
res => {
|
|
1623
|
+
return buildResponse(res).then(_data => {
|
|
1624
|
+
return {
|
|
1625
|
+
tokens: <Array<SardineFiatCurrency>>_data.tokens
|
|
1626
|
+
}
|
|
1627
|
+
})
|
|
1628
|
+
},
|
|
1629
|
+
error => {
|
|
1630
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1631
|
+
}
|
|
1632
|
+
)
|
|
1500
1633
|
}
|
|
1501
|
-
|
|
1634
|
+
|
|
1502
1635
|
sardineGetSupportedTokens = (headers?: object, signal?: AbortSignal): Promise<SardineGetSupportedTokensReturn> => {
|
|
1503
|
-
return this.fetch(
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1636
|
+
return this.fetch(this.url('SardineGetSupportedTokens'), createHTTPRequest({}, headers, signal)).then(
|
|
1637
|
+
res => {
|
|
1638
|
+
return buildResponse(res).then(_data => {
|
|
1639
|
+
return {
|
|
1640
|
+
tokens: <Array<SardineSupportedToken>>_data.tokens
|
|
1641
|
+
}
|
|
1642
|
+
})
|
|
1643
|
+
},
|
|
1644
|
+
error => {
|
|
1645
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1646
|
+
}
|
|
1647
|
+
)
|
|
1515
1648
|
}
|
|
1516
|
-
|
|
1649
|
+
|
|
1517
1650
|
sardineGetEnabledTokens = (headers?: object, signal?: AbortSignal): Promise<SardineGetEnabledTokensReturn> => {
|
|
1518
|
-
return this.fetch(
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1651
|
+
return this.fetch(this.url('SardineGetEnabledTokens'), createHTTPRequest({}, headers, signal)).then(
|
|
1652
|
+
res => {
|
|
1653
|
+
return buildResponse(res).then(_data => {
|
|
1654
|
+
return {
|
|
1655
|
+
tokens: <Array<SardineEnabledToken>>_data.tokens
|
|
1656
|
+
}
|
|
1657
|
+
})
|
|
1658
|
+
},
|
|
1659
|
+
error => {
|
|
1660
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1661
|
+
}
|
|
1662
|
+
)
|
|
1530
1663
|
}
|
|
1531
|
-
|
|
1664
|
+
|
|
1532
1665
|
sardineGetQuote = (args: SardineGetQuoteArgs, headers?: object, signal?: AbortSignal): Promise<SardineGetQuoteReturn> => {
|
|
1533
|
-
return this.fetch(
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1666
|
+
return this.fetch(this.url('SardineGetQuote'), createHTTPRequest(args, headers, signal)).then(
|
|
1667
|
+
res => {
|
|
1668
|
+
return buildResponse(res).then(_data => {
|
|
1669
|
+
return {
|
|
1670
|
+
quote: <SardineQuote>_data.quote
|
|
1671
|
+
}
|
|
1672
|
+
})
|
|
1673
|
+
},
|
|
1674
|
+
error => {
|
|
1675
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1676
|
+
}
|
|
1677
|
+
)
|
|
1544
1678
|
}
|
|
1545
|
-
|
|
1679
|
+
|
|
1546
1680
|
getSardineClientToken = (headers?: object, signal?: AbortSignal): Promise<GetSardineClientTokenReturn> => {
|
|
1547
|
-
return this.fetch(
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
}
|
|
1560
|
-
|
|
1561
|
-
getSardineNFTCheckoutToken = (
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1681
|
+
return this.fetch(this.url('GetSardineClientToken'), createHTTPRequest({}, headers, signal)).then(
|
|
1682
|
+
res => {
|
|
1683
|
+
return buildResponse(res).then(_data => {
|
|
1684
|
+
return {
|
|
1685
|
+
token: <string>_data.token
|
|
1686
|
+
}
|
|
1687
|
+
})
|
|
1688
|
+
},
|
|
1689
|
+
error => {
|
|
1690
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1691
|
+
}
|
|
1692
|
+
)
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
getSardineNFTCheckoutToken = (
|
|
1696
|
+
args: GetSardineNFTCheckoutTokenArgs,
|
|
1697
|
+
headers?: object,
|
|
1698
|
+
signal?: AbortSignal
|
|
1699
|
+
): Promise<GetSardineNFTCheckoutTokenReturn> => {
|
|
1700
|
+
return this.fetch(this.url('GetSardineNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then(
|
|
1701
|
+
res => {
|
|
1702
|
+
return buildResponse(res).then(_data => {
|
|
1703
|
+
return {
|
|
1704
|
+
resp: <SardineNFTCheckout>_data.resp
|
|
1705
|
+
}
|
|
1706
|
+
})
|
|
1707
|
+
},
|
|
1708
|
+
error => {
|
|
1709
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1710
|
+
}
|
|
1711
|
+
)
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
getSardineNFTCheckoutOrderStatus = (
|
|
1715
|
+
args: GetSardineNFTCheckoutOrderStatusArgs,
|
|
1716
|
+
headers?: object,
|
|
1717
|
+
signal?: AbortSignal
|
|
1718
|
+
): Promise<GetSardineNFTCheckoutOrderStatusReturn> => {
|
|
1719
|
+
return this.fetch(this.url('GetSardineNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then(
|
|
1720
|
+
res => {
|
|
1721
|
+
return buildResponse(res).then(_data => {
|
|
1722
|
+
return {
|
|
1723
|
+
resp: <SardineOrder>_data.resp
|
|
1724
|
+
}
|
|
1725
|
+
})
|
|
1726
|
+
},
|
|
1727
|
+
error => {
|
|
1728
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1729
|
+
}
|
|
1730
|
+
)
|
|
1587
1731
|
}
|
|
1588
|
-
|
|
1732
|
+
|
|
1589
1733
|
getCoinPrices = (args: GetCoinPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetCoinPricesReturn> => {
|
|
1590
|
-
return this.fetch(
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
}
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1734
|
+
return this.fetch(this.url('GetCoinPrices'), createHTTPRequest(args, headers, signal)).then(
|
|
1735
|
+
res => {
|
|
1736
|
+
return buildResponse(res).then(_data => {
|
|
1737
|
+
return {
|
|
1738
|
+
tokenPrices: <Array<TokenPrice>>_data.tokenPrices
|
|
1739
|
+
}
|
|
1740
|
+
})
|
|
1741
|
+
},
|
|
1742
|
+
error => {
|
|
1743
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1744
|
+
}
|
|
1745
|
+
)
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
getCollectiblePrices = (
|
|
1749
|
+
args: GetCollectiblePricesArgs,
|
|
1750
|
+
headers?: object,
|
|
1751
|
+
signal?: AbortSignal
|
|
1752
|
+
): Promise<GetCollectiblePricesReturn> => {
|
|
1753
|
+
return this.fetch(this.url('GetCollectiblePrices'), createHTTPRequest(args, headers, signal)).then(
|
|
1754
|
+
res => {
|
|
1755
|
+
return buildResponse(res).then(_data => {
|
|
1756
|
+
return {
|
|
1757
|
+
tokenPrices: <Array<TokenPrice>>_data.tokenPrices
|
|
1758
|
+
}
|
|
1759
|
+
})
|
|
1760
|
+
},
|
|
1761
|
+
error => {
|
|
1762
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1763
|
+
}
|
|
1764
|
+
)
|
|
1615
1765
|
}
|
|
1616
|
-
|
|
1766
|
+
|
|
1617
1767
|
getExchangeRate = (args: GetExchangeRateArgs, headers?: object, signal?: AbortSignal): Promise<GetExchangeRateReturn> => {
|
|
1618
|
-
return this.fetch(
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
}
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1768
|
+
return this.fetch(this.url('GetExchangeRate'), createHTTPRequest(args, headers, signal)).then(
|
|
1769
|
+
res => {
|
|
1770
|
+
return buildResponse(res).then(_data => {
|
|
1771
|
+
return {
|
|
1772
|
+
exchangeRate: <ExchangeRate>_data.exchangeRate
|
|
1773
|
+
}
|
|
1774
|
+
})
|
|
1775
|
+
},
|
|
1776
|
+
error => {
|
|
1777
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1778
|
+
}
|
|
1779
|
+
)
|
|
1629
1780
|
}
|
|
1630
|
-
|
|
1781
|
+
|
|
1631
1782
|
memoryStore = (args: MemoryStoreArgs, headers?: object, signal?: AbortSignal): Promise<MemoryStoreReturn> => {
|
|
1632
|
-
return this.fetch(
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
}
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1783
|
+
return this.fetch(this.url('MemoryStore'), createHTTPRequest(args, headers, signal)).then(
|
|
1784
|
+
res => {
|
|
1785
|
+
return buildResponse(res).then(_data => {
|
|
1786
|
+
return {
|
|
1787
|
+
ok: <boolean>_data.ok
|
|
1788
|
+
}
|
|
1789
|
+
})
|
|
1790
|
+
},
|
|
1791
|
+
error => {
|
|
1792
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1793
|
+
}
|
|
1794
|
+
)
|
|
1643
1795
|
}
|
|
1644
|
-
|
|
1796
|
+
|
|
1645
1797
|
memoryLoad = (args: MemoryLoadArgs, headers?: object, signal?: AbortSignal): Promise<MemoryLoadReturn> => {
|
|
1646
|
-
return this.fetch(
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1798
|
+
return this.fetch(this.url('MemoryLoad'), createHTTPRequest(args, headers, signal)).then(
|
|
1799
|
+
res => {
|
|
1800
|
+
return buildResponse(res).then(_data => {
|
|
1801
|
+
return {
|
|
1802
|
+
value: <string>_data.value
|
|
1803
|
+
}
|
|
1804
|
+
})
|
|
1805
|
+
},
|
|
1806
|
+
error => {
|
|
1807
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1808
|
+
}
|
|
1809
|
+
)
|
|
1657
1810
|
}
|
|
1658
|
-
|
|
1811
|
+
|
|
1659
1812
|
getInviteInfo = (headers?: object, signal?: AbortSignal): Promise<GetInviteInfoReturn> => {
|
|
1660
|
-
return this.fetch(
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1813
|
+
return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers, signal)).then(
|
|
1814
|
+
res => {
|
|
1815
|
+
return buildResponse(res).then(_data => {
|
|
1816
|
+
return {
|
|
1817
|
+
inviteInfo: <InviteInfo>_data.inviteInfo
|
|
1818
|
+
}
|
|
1819
|
+
})
|
|
1820
|
+
},
|
|
1821
|
+
error => {
|
|
1822
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1823
|
+
}
|
|
1824
|
+
)
|
|
1672
1825
|
}
|
|
1673
|
-
|
|
1826
|
+
|
|
1674
1827
|
isValidAccessCode = (args: IsValidAccessCodeArgs, headers?: object, signal?: AbortSignal): Promise<IsValidAccessCodeReturn> => {
|
|
1675
|
-
return this.fetch(
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1828
|
+
return this.fetch(this.url('IsValidAccessCode'), createHTTPRequest(args, headers, signal)).then(
|
|
1829
|
+
res => {
|
|
1830
|
+
return buildResponse(res).then(_data => {
|
|
1831
|
+
return {
|
|
1832
|
+
status: <boolean>_data.status
|
|
1833
|
+
}
|
|
1834
|
+
})
|
|
1835
|
+
},
|
|
1836
|
+
error => {
|
|
1837
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1838
|
+
}
|
|
1839
|
+
)
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
internalClaimAccessCode = (
|
|
1843
|
+
args: InternalClaimAccessCodeArgs,
|
|
1844
|
+
headers?: object,
|
|
1845
|
+
signal?: AbortSignal
|
|
1846
|
+
): Promise<InternalClaimAccessCodeReturn> => {
|
|
1847
|
+
return this.fetch(this.url('InternalClaimAccessCode'), createHTTPRequest(args, headers, signal)).then(
|
|
1848
|
+
res => {
|
|
1849
|
+
return buildResponse(res).then(_data => {
|
|
1850
|
+
return {
|
|
1851
|
+
status: <boolean>_data.status
|
|
1852
|
+
}
|
|
1853
|
+
})
|
|
1854
|
+
},
|
|
1855
|
+
error => {
|
|
1856
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1857
|
+
}
|
|
1858
|
+
)
|
|
1700
1859
|
}
|
|
1701
|
-
|
|
1860
|
+
|
|
1702
1861
|
blockNumberAtTime = (args: BlockNumberAtTimeArgs, headers?: object, signal?: AbortSignal): Promise<BlockNumberAtTimeReturn> => {
|
|
1703
|
-
return this.fetch(
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
}
|
|
1710
|
-
}
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1862
|
+
return this.fetch(this.url('BlockNumberAtTime'), createHTTPRequest(args, headers, signal)).then(
|
|
1863
|
+
res => {
|
|
1864
|
+
return buildResponse(res).then(_data => {
|
|
1865
|
+
return {
|
|
1866
|
+
blocks: <Array<number>>_data.blocks
|
|
1867
|
+
}
|
|
1868
|
+
})
|
|
1869
|
+
},
|
|
1870
|
+
error => {
|
|
1871
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1872
|
+
}
|
|
1873
|
+
)
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
paperSessionSecret = (
|
|
1877
|
+
args: PaperSessionSecretArgs,
|
|
1878
|
+
headers?: object,
|
|
1879
|
+
signal?: AbortSignal
|
|
1880
|
+
): Promise<PaperSessionSecretReturn> => {
|
|
1881
|
+
return this.fetch(this.url('PaperSessionSecret'), createHTTPRequest(args, headers, signal)).then(
|
|
1882
|
+
res => {
|
|
1883
|
+
return buildResponse(res).then(_data => {
|
|
1884
|
+
return {
|
|
1885
|
+
secret: <string>_data.secret
|
|
1886
|
+
}
|
|
1887
|
+
})
|
|
1888
|
+
},
|
|
1889
|
+
error => {
|
|
1890
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1891
|
+
}
|
|
1892
|
+
)
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
paperSessionSecret2 = (
|
|
1896
|
+
args: PaperSessionSecret2Args,
|
|
1897
|
+
headers?: object,
|
|
1898
|
+
signal?: AbortSignal
|
|
1899
|
+
): Promise<PaperSessionSecret2Return> => {
|
|
1900
|
+
return this.fetch(this.url('PaperSessionSecret2'), createHTTPRequest(args, headers, signal)).then(
|
|
1901
|
+
res => {
|
|
1902
|
+
return buildResponse(res).then(_data => {
|
|
1903
|
+
return {
|
|
1904
|
+
secret: <string>_data.secret
|
|
1905
|
+
}
|
|
1906
|
+
})
|
|
1907
|
+
},
|
|
1908
|
+
error => {
|
|
1909
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1910
|
+
}
|
|
1911
|
+
)
|
|
1742
1912
|
}
|
|
1743
|
-
|
|
1913
|
+
|
|
1744
1914
|
linkWallet = (args: LinkWalletArgs, headers?: object, signal?: AbortSignal): Promise<LinkWalletReturn> => {
|
|
1745
|
-
return this.fetch(
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1915
|
+
return this.fetch(this.url('LinkWallet'), createHTTPRequest(args, headers, signal)).then(
|
|
1916
|
+
res => {
|
|
1917
|
+
return buildResponse(res).then(_data => {
|
|
1918
|
+
return {
|
|
1919
|
+
status: <boolean>_data.status
|
|
1920
|
+
}
|
|
1921
|
+
})
|
|
1922
|
+
},
|
|
1923
|
+
error => {
|
|
1924
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1925
|
+
}
|
|
1926
|
+
)
|
|
1756
1927
|
}
|
|
1757
|
-
|
|
1928
|
+
|
|
1758
1929
|
getLinkedWallets = (args: GetLinkedWalletsArgs, headers?: object, signal?: AbortSignal): Promise<GetLinkedWalletsReturn> => {
|
|
1759
|
-
return this.fetch(
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
}
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1930
|
+
return this.fetch(this.url('GetLinkedWallets'), createHTTPRequest(args, headers, signal)).then(
|
|
1931
|
+
res => {
|
|
1932
|
+
return buildResponse(res).then(_data => {
|
|
1933
|
+
return {
|
|
1934
|
+
linkedWallets: <Array<LinkedWallet>>_data.linkedWallets
|
|
1935
|
+
}
|
|
1936
|
+
})
|
|
1937
|
+
},
|
|
1938
|
+
error => {
|
|
1939
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1940
|
+
}
|
|
1941
|
+
)
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
removeLinkedWallet = (
|
|
1945
|
+
args: RemoveLinkedWalletArgs,
|
|
1946
|
+
headers?: object,
|
|
1947
|
+
signal?: AbortSignal
|
|
1948
|
+
): Promise<RemoveLinkedWalletReturn> => {
|
|
1949
|
+
return this.fetch(this.url('RemoveLinkedWallet'), createHTTPRequest(args, headers, signal)).then(
|
|
1950
|
+
res => {
|
|
1951
|
+
return buildResponse(res).then(_data => {
|
|
1952
|
+
return {
|
|
1953
|
+
status: <boolean>_data.status
|
|
1954
|
+
}
|
|
1955
|
+
})
|
|
1956
|
+
},
|
|
1957
|
+
error => {
|
|
1958
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1959
|
+
}
|
|
1960
|
+
)
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
generateWaaSVerificationURL = (
|
|
1964
|
+
args: GenerateWaaSVerificationURLArgs,
|
|
1965
|
+
headers?: object,
|
|
1966
|
+
signal?: AbortSignal
|
|
1967
|
+
): Promise<GenerateWaaSVerificationURLReturn> => {
|
|
1968
|
+
return this.fetch(this.url('GenerateWaaSVerificationURL'), createHTTPRequest(args, headers, signal)).then(
|
|
1969
|
+
res => {
|
|
1970
|
+
return buildResponse(res).then(_data => {
|
|
1971
|
+
return {
|
|
1972
|
+
nonce: <string>_data.nonce,
|
|
1973
|
+
verificationURL: <string>_data.verificationURL
|
|
1974
|
+
}
|
|
1975
|
+
})
|
|
1976
|
+
},
|
|
1977
|
+
error => {
|
|
1978
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1979
|
+
}
|
|
1980
|
+
)
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
validateWaaSVerificationNonce = (
|
|
1984
|
+
args: ValidateWaaSVerificationNonceArgs,
|
|
1985
|
+
headers?: object,
|
|
1986
|
+
signal?: AbortSignal
|
|
1987
|
+
): Promise<ValidateWaaSVerificationNonceReturn> => {
|
|
1988
|
+
return this.fetch(this.url('ValidateWaaSVerificationNonce'), createHTTPRequest(args, headers, signal)).then(
|
|
1989
|
+
res => {
|
|
1990
|
+
return buildResponse(res).then(_data => {
|
|
1991
|
+
return {
|
|
1992
|
+
walletAddress: <string>_data.walletAddress
|
|
1993
|
+
}
|
|
1994
|
+
})
|
|
1995
|
+
},
|
|
1996
|
+
error => {
|
|
1997
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
1998
|
+
}
|
|
1999
|
+
)
|
|
1813
2000
|
}
|
|
1814
|
-
|
|
2001
|
+
|
|
1815
2002
|
getSwapPrices = (args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPricesReturn> => {
|
|
1816
|
-
return this.fetch(
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
2003
|
+
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(
|
|
2004
|
+
res => {
|
|
2005
|
+
return buildResponse(res).then(_data => {
|
|
2006
|
+
return {
|
|
2007
|
+
swapPrices: <Array<SwapPrice>>_data.swapPrices
|
|
2008
|
+
}
|
|
2009
|
+
})
|
|
2010
|
+
},
|
|
2011
|
+
error => {
|
|
2012
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2013
|
+
}
|
|
2014
|
+
)
|
|
1827
2015
|
}
|
|
1828
|
-
|
|
2016
|
+
|
|
1829
2017
|
getSwapQuote = (args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteReturn> => {
|
|
1830
|
-
return this.fetch(
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
2018
|
+
return this.fetch(this.url('GetSwapQuote'), createHTTPRequest(args, headers, signal)).then(
|
|
2019
|
+
res => {
|
|
2020
|
+
return buildResponse(res).then(_data => {
|
|
2021
|
+
return {
|
|
2022
|
+
swapQuote: <SwapQuote>_data.swapQuote
|
|
2023
|
+
}
|
|
2024
|
+
})
|
|
2025
|
+
},
|
|
2026
|
+
error => {
|
|
2027
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2028
|
+
}
|
|
2029
|
+
)
|
|
1841
2030
|
}
|
|
1842
|
-
|
|
2031
|
+
|
|
1843
2032
|
listCurrencyGroups = (headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn> => {
|
|
1844
|
-
return this.fetch(
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
addOffchainInventory = (
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
return this.fetch(
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
2033
|
+
return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(
|
|
2034
|
+
res => {
|
|
2035
|
+
return buildResponse(res).then(_data => {
|
|
2036
|
+
return {
|
|
2037
|
+
currencyGroups: <Array<CurrencyGroup>>_data.currencyGroups
|
|
2038
|
+
}
|
|
2039
|
+
})
|
|
2040
|
+
},
|
|
2041
|
+
error => {
|
|
2042
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2043
|
+
}
|
|
2044
|
+
)
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
addOffchainInventory = (
|
|
2048
|
+
args: AddOffchainInventoryArgs,
|
|
2049
|
+
headers?: object,
|
|
2050
|
+
signal?: AbortSignal
|
|
2051
|
+
): Promise<AddOffchainInventoryReturn> => {
|
|
2052
|
+
return this.fetch(this.url('AddOffchainInventory'), createHTTPRequest(args, headers, signal)).then(
|
|
2053
|
+
res => {
|
|
2054
|
+
return buildResponse(res).then(_data => {
|
|
2055
|
+
return {
|
|
2056
|
+
inventoryId: <number>_data.inventoryId
|
|
2057
|
+
}
|
|
2058
|
+
})
|
|
2059
|
+
},
|
|
2060
|
+
error => {
|
|
2061
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2062
|
+
}
|
|
2063
|
+
)
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
getOffchainInventory = (
|
|
2067
|
+
args: GetOffchainInventoryArgs,
|
|
2068
|
+
headers?: object,
|
|
2069
|
+
signal?: AbortSignal
|
|
2070
|
+
): Promise<GetOffchainInventoryReturn> => {
|
|
2071
|
+
return this.fetch(this.url('GetOffchainInventory'), createHTTPRequest(args, headers, signal)).then(
|
|
2072
|
+
res => {
|
|
2073
|
+
return buildResponse(res).then(_data => {
|
|
2074
|
+
return {
|
|
2075
|
+
inventory: <OffchainInventory>_data.inventory
|
|
2076
|
+
}
|
|
2077
|
+
})
|
|
2078
|
+
},
|
|
2079
|
+
error => {
|
|
2080
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2081
|
+
}
|
|
2082
|
+
)
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
listOffchainInventories = (
|
|
2086
|
+
args: ListOffchainInventoriesArgs,
|
|
2087
|
+
headers?: object,
|
|
2088
|
+
signal?: AbortSignal
|
|
2089
|
+
): Promise<ListOffchainInventoriesReturn> => {
|
|
2090
|
+
return this.fetch(this.url('ListOffchainInventories'), createHTTPRequest(args, headers, signal)).then(
|
|
2091
|
+
res => {
|
|
2092
|
+
return buildResponse(res).then(_data => {
|
|
2093
|
+
return {
|
|
2094
|
+
inventory: <Array<OffchainInventory>>_data.inventory
|
|
2095
|
+
}
|
|
2096
|
+
})
|
|
2097
|
+
},
|
|
2098
|
+
error => {
|
|
2099
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2100
|
+
}
|
|
2101
|
+
)
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
updateOffchainInventory = (
|
|
2105
|
+
args: UpdateOffchainInventoryArgs,
|
|
2106
|
+
headers?: object,
|
|
2107
|
+
signal?: AbortSignal
|
|
2108
|
+
): Promise<UpdateOffchainInventoryReturn> => {
|
|
2109
|
+
return this.fetch(this.url('UpdateOffchainInventory'), createHTTPRequest(args, headers, signal)).then(
|
|
2110
|
+
res => {
|
|
2111
|
+
return buildResponse(res).then(_data => {
|
|
2112
|
+
return {}
|
|
2113
|
+
})
|
|
2114
|
+
},
|
|
2115
|
+
error => {
|
|
2116
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2117
|
+
}
|
|
2118
|
+
)
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
deleteOffchainInventory = (
|
|
2122
|
+
args: DeleteOffchainInventoryArgs,
|
|
2123
|
+
headers?: object,
|
|
2124
|
+
signal?: AbortSignal
|
|
2125
|
+
): Promise<DeleteOffchainInventoryReturn> => {
|
|
2126
|
+
return this.fetch(this.url('DeleteOffchainInventory'), createHTTPRequest(args, headers, signal)).then(
|
|
2127
|
+
res => {
|
|
2128
|
+
return buildResponse(res).then(_data => {
|
|
2129
|
+
return {
|
|
2130
|
+
ok: <boolean>_data.ok
|
|
2131
|
+
}
|
|
2132
|
+
})
|
|
2133
|
+
},
|
|
2134
|
+
error => {
|
|
2135
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2136
|
+
}
|
|
2137
|
+
)
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
requestOffchainPayment = (
|
|
2141
|
+
args: RequestOffchainPaymentArgs,
|
|
2142
|
+
headers?: object,
|
|
2143
|
+
signal?: AbortSignal
|
|
2144
|
+
): Promise<RequestOffchainPaymentReturn> => {
|
|
2145
|
+
return this.fetch(this.url('RequestOffchainPayment'), createHTTPRequest(args, headers, signal)).then(
|
|
2146
|
+
res => {
|
|
2147
|
+
return buildResponse(res).then(_data => {
|
|
2148
|
+
return {
|
|
2149
|
+
payment: <PaymentResponse>_data.payment
|
|
2150
|
+
}
|
|
2151
|
+
})
|
|
2152
|
+
},
|
|
2153
|
+
error => {
|
|
2154
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2155
|
+
}
|
|
2156
|
+
)
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
listOffchainPayments = (
|
|
2160
|
+
args: ListOffchainPaymentsArgs,
|
|
2161
|
+
headers?: object,
|
|
2162
|
+
signal?: AbortSignal
|
|
2163
|
+
): Promise<ListOffchainPaymentsReturn> => {
|
|
2164
|
+
return this.fetch(this.url('ListOffchainPayments'), createHTTPRequest(args, headers, signal)).then(
|
|
2165
|
+
res => {
|
|
2166
|
+
return buildResponse(res).then(_data => {
|
|
2167
|
+
return {
|
|
2168
|
+
page: <Page>_data.page,
|
|
2169
|
+
payments: <Array<OffchainPayment>>_data.payments
|
|
2170
|
+
}
|
|
2171
|
+
})
|
|
2172
|
+
},
|
|
2173
|
+
error => {
|
|
2174
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2175
|
+
}
|
|
2176
|
+
)
|
|
1953
2177
|
}
|
|
1954
|
-
|
|
1955
2178
|
}
|
|
1956
2179
|
|
|
1957
|
-
|
|
2180
|
+
const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => {
|
|
1958
2181
|
return {
|
|
1959
2182
|
method: 'POST',
|
|
1960
2183
|
headers: { ...headers, 'Content-Type': 'application/json' },
|
|
@@ -1968,18 +2191,18 @@ const buildResponse = (res: Response): Promise<any> => {
|
|
|
1968
2191
|
let data
|
|
1969
2192
|
try {
|
|
1970
2193
|
data = JSON.parse(text)
|
|
1971
|
-
} catch(error) {
|
|
2194
|
+
} catch (error) {
|
|
1972
2195
|
let message = ''
|
|
1973
|
-
if (error instanceof Error)
|
|
2196
|
+
if (error instanceof Error) {
|
|
1974
2197
|
message = error.message
|
|
1975
2198
|
}
|
|
1976
2199
|
throw WebrpcBadResponseError.new({
|
|
1977
2200
|
status: res.status,
|
|
1978
|
-
cause: `JSON.parse(): ${message}: response text: ${text}`
|
|
1979
|
-
)
|
|
2201
|
+
cause: `JSON.parse(): ${message}: response text: ${text}`
|
|
2202
|
+
})
|
|
1980
2203
|
}
|
|
1981
2204
|
if (!res.ok) {
|
|
1982
|
-
const code: number =
|
|
2205
|
+
const code: number = typeof data.code === 'number' ? data.code : 0
|
|
1983
2206
|
throw (webrpcErrorByCode[code] || WebrpcError).new(data)
|
|
1984
2207
|
}
|
|
1985
2208
|
return data
|
|
@@ -2161,7 +2384,6 @@ export class WebrpcStreamFinishedError extends WebrpcError {
|
|
|
2161
2384
|
}
|
|
2162
2385
|
}
|
|
2163
2386
|
|
|
2164
|
-
|
|
2165
2387
|
// Schema errors
|
|
2166
2388
|
|
|
2167
2389
|
export class UnauthorizedError extends WebrpcError {
|
|
@@ -2281,7 +2503,6 @@ export class NotFoundError extends WebrpcError {
|
|
|
2281
2503
|
}
|
|
2282
2504
|
}
|
|
2283
2505
|
|
|
2284
|
-
|
|
2285
2506
|
export enum errors {
|
|
2286
2507
|
WebrpcEndpoint = 'WebrpcEndpoint',
|
|
2287
2508
|
WebrpcRequestFailed = 'WebrpcRequestFailed',
|
|
@@ -2302,7 +2523,7 @@ export enum errors {
|
|
|
2302
2523
|
InvalidArgument = 'InvalidArgument',
|
|
2303
2524
|
Unavailable = 'Unavailable',
|
|
2304
2525
|
QueryFailed = 'QueryFailed',
|
|
2305
|
-
NotFound = 'NotFound'
|
|
2526
|
+
NotFound = 'NotFound'
|
|
2306
2527
|
}
|
|
2307
2528
|
|
|
2308
2529
|
const webrpcErrorByCode: { [code: number]: any } = {
|
|
@@ -2325,8 +2546,7 @@ const webrpcErrorByCode: { [code: number]: any } = {
|
|
|
2325
2546
|
[2000]: InvalidArgumentError,
|
|
2326
2547
|
[2002]: UnavailableError,
|
|
2327
2548
|
[2003]: QueryFailedError,
|
|
2328
|
-
[3000]: NotFoundError
|
|
2549
|
+
[3000]: NotFoundError
|
|
2329
2550
|
}
|
|
2330
2551
|
|
|
2331
2552
|
export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response>
|
|
2332
|
-
|