@0xsequence/api 2.3.9 → 2.3.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/src/api.gen.ts CHANGED
@@ -1,75 +1,76 @@
1
1
  /* eslint-disable */
2
- // sequence-api v0.4.0 2409c101bc62a1b7aa797e099d913b1c4046e9f6
2
+ // sequence-api v0.4.0 ab3b6841bf983fa51a24df4cee18536199f115c3
3
3
  // --
4
- // Code generated by webrpc-gen@v0.24.0 with typescript generator. DO NOT EDIT.
4
+ // Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
5
5
  //
6
6
  // webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
7
7
 
8
- export const WebrpcHeader = 'Webrpc'
8
+ export const WebrpcHeader = "Webrpc"
9
9
 
10
- export const WebrpcHeaderValue = 'webrpc@v0.24.0;gen-typescript@v0.16.3;sequence-api@v0.4.0'
10
+ export const WebrpcHeaderValue = "webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-api@v0.4.0"
11
11
 
12
12
  // WebRPC description and code-gen version
13
- export const WebRPCVersion = 'v1'
13
+ export const WebRPCVersion = "v1"
14
14
 
15
15
  // Schema version of your RIDL schema
16
- export const WebRPCSchemaVersion = 'v0.4.0'
16
+ export const WebRPCSchemaVersion = "v0.4.0"
17
17
 
18
18
  // Schema hash generated from your RIDL schema
19
- export const WebRPCSchemaHash = '2409c101bc62a1b7aa797e099d913b1c4046e9f6'
19
+ export const WebRPCSchemaHash = "ab3b6841bf983fa51a24df4cee18536199f115c3"
20
20
 
21
21
  type WebrpcGenVersions = {
22
- webrpcGenVersion: string
23
- codeGenName: string
24
- codeGenVersion: string
25
- schemaName: string
26
- schemaVersion: string
27
- }
22
+ webrpcGenVersion: string;
23
+ codeGenName: string;
24
+ codeGenVersion: string;
25
+ schemaName: string;
26
+ schemaVersion: string;
27
+ };
28
28
 
29
29
  export function VersionFromHeader(headers: Headers): WebrpcGenVersions {
30
- const headerValue = headers.get(WebrpcHeader)
30
+ const headerValue = headers.get(WebrpcHeader);
31
31
  if (!headerValue) {
32
32
  return {
33
- webrpcGenVersion: '',
34
- codeGenName: '',
35
- codeGenVersion: '',
36
- schemaName: '',
37
- schemaVersion: ''
38
- }
33
+ webrpcGenVersion: "",
34
+ codeGenName: "",
35
+ codeGenVersion: "",
36
+ schemaName: "",
37
+ schemaVersion: "",
38
+ };
39
39
  }
40
40
 
41
- return parseWebrpcGenVersions(headerValue)
41
+ return parseWebrpcGenVersions(headerValue);
42
42
  }
43
43
 
44
44
  function parseWebrpcGenVersions(header: string): WebrpcGenVersions {
45
- const versions = header.split(';')
45
+ const versions = header.split(";");
46
46
  if (versions.length < 3) {
47
47
  return {
48
- webrpcGenVersion: '',
49
- codeGenName: '',
50
- codeGenVersion: '',
51
- schemaName: '',
52
- schemaVersion: ''
53
- }
48
+ webrpcGenVersion: "",
49
+ codeGenName: "",
50
+ codeGenVersion: "",
51
+ schemaName: "",
52
+ schemaVersion: "",
53
+ };
54
54
  }
55
55
 
56
- const [_, webrpcGenVersion] = versions[0]!.split('@')
57
- const [codeGenName, codeGenVersion] = versions[1]!.split('@')
58
- const [schemaName, schemaVersion] = versions[2]!.split('@')
56
+ const [_, webrpcGenVersion] = versions[0]!.split("@");
57
+ const [codeGenName, codeGenVersion] = versions[1]!.split("@");
58
+ const [schemaName, schemaVersion] = versions[2]!.split("@");
59
59
 
60
60
  return {
61
- webrpcGenVersion: webrpcGenVersion ?? '',
62
- codeGenName: codeGenName ?? '',
63
- codeGenVersion: codeGenVersion ?? '',
64
- schemaName: schemaName ?? '',
65
- schemaVersion: schemaVersion ?? ''
66
- }
61
+ webrpcGenVersion: webrpcGenVersion ?? "",
62
+ codeGenName: codeGenName ?? "",
63
+ codeGenVersion: codeGenVersion ?? "",
64
+ schemaName: schemaName ?? "",
65
+ schemaVersion: schemaVersion ?? "",
66
+ };
67
67
  }
68
68
 
69
69
  //
70
70
  // Types
71
71
  //
72
72
 
73
+
73
74
  export enum SortOrder {
74
75
  DESC = 'DESC',
75
76
  ASC = 'ASC'
@@ -101,6 +102,29 @@ export enum TransakBuySell {
101
102
  SELL = 'SELL'
102
103
  }
103
104
 
105
+ export enum CheckoutOptionCrypto {
106
+ none = 'none',
107
+ partially = 'partially',
108
+ all = 'all'
109
+ }
110
+
111
+ export enum CheckoutOptionNFTCheckoutProvider {
112
+ unknown = 'unknown',
113
+ sardine = 'sardine',
114
+ transak = 'transak'
115
+ }
116
+
117
+ export enum CheckoutOptionOnRampProvider {
118
+ unknown = 'unknown',
119
+ sardine = 'sardine',
120
+ transak = 'transak'
121
+ }
122
+
123
+ export enum CheckoutOptionSwapProvider {
124
+ unknown = 'unknown',
125
+ lifi = 'lifi'
126
+ }
127
+
104
128
  export interface Version {
105
129
  webrpcVersion: string
106
130
  schemaVersion: string
@@ -116,7 +140,7 @@ export interface RuntimeStatus {
116
140
  branch: string
117
141
  commitHash: string
118
142
  checks: RuntimeChecks
119
- numTxnsRelayed: { [key: string]: NumTxnsRelayed }
143
+ numTxnsRelayed: {[key: string]: NumTxnsRelayed}
120
144
  }
121
145
 
122
146
  export interface NumTxnsRelayed {
@@ -126,7 +150,8 @@ export interface NumTxnsRelayed {
126
150
  period: number
127
151
  }
128
152
 
129
- export interface RuntimeChecks {}
153
+ export interface RuntimeChecks {
154
+ }
130
155
 
131
156
  export interface SequenceContext {
132
157
  factory: string
@@ -443,34 +468,37 @@ export interface SardinePaymentOption {
443
468
  processingTime: string
444
469
  }
445
470
 
446
- export interface SwapPermit2Price {
447
- currencyAddress: string
448
- currencyBalance: string
449
- price: string
450
- maxPrice: string
451
- transactionValue: string
471
+ export interface LifiToken {
472
+ chainId: number
473
+ address: string
474
+ symbol: string
475
+ name: string
476
+ decimals: number
477
+ priceUsd: number
478
+ price?: string
479
+ coinKey: string
480
+ logoUri: string
452
481
  }
453
482
 
454
- export interface SwapPermit2Quote {
455
- currencyAddress: string
456
- currencyBalance: string
457
- price: string
458
- maxPrice: string
459
- to: string
460
- transactionData: string
461
- transactionValue: string
462
- approveData: string
483
+ export interface LifiSwapRoute {
484
+ fromChainId: number
485
+ toChainId: number
486
+ fromTokens: Array<LifiToken>
487
+ toTokens: Array<LifiToken>
463
488
  }
464
489
 
465
- export interface SwapPrice {
466
- currencyAddress: string
467
- currencyBalance: string
468
- price: string
469
- maxPrice: string
470
- transactionValue: string
490
+ export interface GetLifiSwapQuoteParams {
491
+ chainId: number
492
+ walletAddress: string
493
+ fromTokenAddress: string
494
+ toTokenAddress: string
495
+ fromTokenAmount?: string
496
+ toTokenAmount?: string
497
+ includeApprove: boolean
498
+ slippageBps: number
471
499
  }
472
500
 
473
- export interface SwapQuote {
501
+ export interface LifiSwapQuote {
474
502
  currencyAddress: string
475
503
  currencyBalance: string
476
504
  price: string
@@ -479,6 +507,8 @@ export interface SwapQuote {
479
507
  transactionData: string
480
508
  transactionValue: string
481
509
  approveData: string
510
+ amount: string
511
+ amountMin: string
482
512
  }
483
513
 
484
514
  export interface CurrencyGroup {
@@ -702,207 +732,243 @@ export interface TransakChain {
702
732
  chainId: number
703
733
  }
704
734
 
735
+ export interface SecondaryCheckoutOptionsParams {
736
+ collectionAddress: string
737
+ marketplaceAddress: string
738
+ currencyAddress: string
739
+ priceAmount: string
740
+ tokenId: string
741
+ }
742
+
743
+ export interface CheckoutOptions {
744
+ crypto: CheckoutOptionCrypto
745
+ swap: Array<CheckoutOptionSwapProvider>
746
+ nftCheckout: Array<CheckoutOptionNFTCheckoutProvider>
747
+ onRamp: Array<CheckoutOptionOnRampProvider>
748
+ }
749
+
705
750
  export interface API {
751
+ /**
752
+ *
753
+ * Runtime
754
+ *
755
+ */
706
756
  ping(headers?: object, signal?: AbortSignal): Promise<PingReturn>
707
757
  version(headers?: object, signal?: AbortSignal): Promise<VersionReturn>
708
758
  runtimeStatus(headers?: object, signal?: AbortSignal): Promise<RuntimeStatusReturn>
709
759
  clock(headers?: object, signal?: AbortSignal): Promise<ClockReturn>
710
760
  getSequenceContext(headers?: object, signal?: AbortSignal): Promise<GetSequenceContextReturn>
761
+ /**
762
+ *
763
+ * Auth
764
+ *
765
+ * TODO: rename 'ewtString' arg to 'ethauthProof'
766
+ */
711
767
  getAuthToken(args: GetAuthTokenArgs, headers?: object, signal?: AbortSignal): Promise<GetAuthTokenReturn>
712
768
  getAuthToken2(args: GetAuthToken2Args, headers?: object, signal?: AbortSignal): Promise<GetAuthToken2Return>
713
- sendPasswordlessLink(
714
- args: SendPasswordlessLinkArgs,
715
- headers?: object,
716
- signal?: AbortSignal
717
- ): Promise<SendPasswordlessLinkReturn>
769
+ sendPasswordlessLink(args: SendPasswordlessLinkArgs, headers?: object, signal?: AbortSignal): Promise<SendPasswordlessLinkReturn>
718
770
  registerPublicKey(args: RegisterPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<RegisterPublicKeyReturn>
719
771
  getPublicKey(args: GetPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<GetPublicKeyReturn>
772
+ /**
773
+ *
774
+ * Contacts / Friends
775
+ *
776
+ */
720
777
  friendList(args: FriendListArgs, headers?: object, signal?: AbortSignal): Promise<FriendListReturn>
721
778
  getFriendByAddress(args: GetFriendByAddressArgs, headers?: object, signal?: AbortSignal): Promise<GetFriendByAddressReturn>
722
779
  searchFriends(args: SearchFriendsArgs, headers?: object, signal?: AbortSignal): Promise<SearchFriendsReturn>
723
780
  addFriend(args: AddFriendArgs, headers?: object, signal?: AbortSignal): Promise<AddFriendReturn>
724
- updateFriendNickname(
725
- args: UpdateFriendNicknameArgs,
726
- headers?: object,
727
- signal?: AbortSignal
728
- ): Promise<UpdateFriendNicknameReturn>
781
+ updateFriendNickname(args: UpdateFriendNicknameArgs, headers?: object, signal?: AbortSignal): Promise<UpdateFriendNicknameReturn>
729
782
  removeFriend(args: RemoveFriendArgs, headers?: object, signal?: AbortSignal): Promise<RemoveFriendReturn>
783
+ /**
784
+ *
785
+ * Chain-Utils
786
+ *
787
+ */
730
788
  contractCall(args: ContractCallArgs, headers?: object, signal?: AbortSignal): Promise<ContractCallReturn>
731
789
  decodeContractCall(args: DecodeContractCallArgs, headers?: object, signal?: AbortSignal): Promise<DecodeContractCallReturn>
732
- lookupContractCallSelectors(
733
- args: LookupContractCallSelectorsArgs,
734
- headers?: object,
735
- signal?: AbortSignal
736
- ): Promise<LookupContractCallSelectorsReturn>
790
+ lookupContractCallSelectors(args: LookupContractCallSelectorsArgs, headers?: object, signal?: AbortSignal): Promise<LookupContractCallSelectorsReturn>
791
+ /**
792
+ *
793
+ * User Storage
794
+ *
795
+ */
737
796
  userStorageFetch(args: UserStorageFetchArgs, headers?: object, signal?: AbortSignal): Promise<UserStorageFetchReturn>
738
797
  userStorageSave(args: UserStorageSaveArgs, headers?: object, signal?: AbortSignal): Promise<UserStorageSaveReturn>
739
798
  userStorageDelete(args: UserStorageDeleteArgs, headers?: object, signal?: AbortSignal): Promise<UserStorageDeleteReturn>
740
799
  userStorageFetchAll(args: UserStorageFetchAllArgs, headers?: object, signal?: AbortSignal): Promise<UserStorageFetchAllReturn>
800
+ /**
801
+ *
802
+ * Wallet utils
803
+ *
804
+ */
741
805
  getMoonpayLink(args: GetMoonpayLinkArgs, headers?: object, signal?: AbortSignal): Promise<GetMoonpayLinkReturn>
806
+ /**
807
+ * - IsUsingGoogleMail(domain: string) => (yes: bool)
808
+ */
742
809
  resolveENSAddress(args: ResolveENSAddressArgs, headers?: object, signal?: AbortSignal): Promise<ResolveENSAddressReturn>
810
+ /**
811
+ * TODO: we can add walletContext optional in the future when we need it
812
+ * NOTE: chainId can be either a number or canonical name
813
+ */
743
814
  isValidSignature(args: IsValidSignatureArgs, headers?: object, signal?: AbortSignal): Promise<IsValidSignatureReturn>
744
- isValidMessageSignature(
745
- args: IsValidMessageSignatureArgs,
746
- headers?: object,
747
- signal?: AbortSignal
748
- ): Promise<IsValidMessageSignatureReturn>
749
- isValidTypedDataSignature(
750
- args: IsValidTypedDataSignatureArgs,
751
- headers?: object,
752
- signal?: AbortSignal
753
- ): Promise<IsValidTypedDataSignatureReturn>
815
+ isValidMessageSignature(args: IsValidMessageSignatureArgs, headers?: object, signal?: AbortSignal): Promise<IsValidMessageSignatureReturn>
816
+ isValidTypedDataSignature(args: IsValidTypedDataSignatureArgs, headers?: object, signal?: AbortSignal): Promise<IsValidTypedDataSignatureReturn>
754
817
  isValidETHAuthProof(args: IsValidETHAuthProofArgs, headers?: object, signal?: AbortSignal): Promise<IsValidETHAuthProofReturn>
755
818
  sardineGetClientToken(headers?: object, signal?: AbortSignal): Promise<SardineGetClientTokenReturn>
756
- sardineGetNFTCheckoutToken(
757
- args: SardineGetNFTCheckoutTokenArgs,
758
- headers?: object,
759
- signal?: AbortSignal
760
- ): Promise<SardineGetNFTCheckoutTokenReturn>
761
- sardineGetNFTCheckoutOrderStatus(
762
- args: SardineGetNFTCheckoutOrderStatusArgs,
763
- headers?: object,
764
- signal?: AbortSignal
765
- ): Promise<SardineGetNFTCheckoutOrderStatusReturn>
819
+ sardineGetNFTCheckoutToken(args: SardineGetNFTCheckoutTokenArgs, headers?: object, signal?: AbortSignal): Promise<SardineGetNFTCheckoutTokenReturn>
820
+ sardineGetNFTCheckoutOrderStatus(args: SardineGetNFTCheckoutOrderStatusArgs, headers?: object, signal?: AbortSignal): Promise<SardineGetNFTCheckoutOrderStatusReturn>
766
821
  sardineGetSupportedRegions(headers?: object, signal?: AbortSignal): Promise<SardineGetSupportedRegionsReturn>
767
822
  sardineGetSupportedFiatCurrencies(headers?: object, signal?: AbortSignal): Promise<SardineGetSupportedFiatCurrenciesReturn>
768
823
  sardineGetSupportedTokens(headers?: object, signal?: AbortSignal): Promise<SardineGetSupportedTokensReturn>
769
- sardineGetSupportedTokenForSwap(
770
- args: SardineGetSupportedTokenForSwapArgs,
771
- headers?: object,
772
- signal?: AbortSignal
773
- ): Promise<SardineGetSupportedTokenForSwapReturn>
824
+ sardineGetSupportedTokenForSwap(args: SardineGetSupportedTokenForSwapArgs, headers?: object, signal?: AbortSignal): Promise<SardineGetSupportedTokenForSwapReturn>
774
825
  sardineGetEnabledTokens(headers?: object, signal?: AbortSignal): Promise<SardineGetEnabledTokensReturn>
775
826
  sardineGetQuote(args: SardineGetQuoteArgs, headers?: object, signal?: AbortSignal): Promise<SardineGetQuoteReturn>
827
+ /**
828
+ * Deprecated. Use SardineGetClientToken() instead.
829
+ */
776
830
  getSardineClientToken(headers?: object, signal?: AbortSignal): Promise<GetSardineClientTokenReturn>
777
- getSardineNFTCheckoutToken(
778
- args: GetSardineNFTCheckoutTokenArgs,
779
- headers?: object,
780
- signal?: AbortSignal
781
- ): Promise<GetSardineNFTCheckoutTokenReturn>
782
- getSardineNFTCheckoutOrderStatus(
783
- args: GetSardineNFTCheckoutOrderStatusArgs,
784
- headers?: object,
785
- signal?: AbortSignal
786
- ): Promise<GetSardineNFTCheckoutOrderStatusReturn>
831
+ /**
832
+ * Deprecated. Use SardineGetNFTCheckoutToken() instead.
833
+ */
834
+ getSardineNFTCheckoutToken(args: GetSardineNFTCheckoutTokenArgs, headers?: object, signal?: AbortSignal): Promise<GetSardineNFTCheckoutTokenReturn>
835
+ /**
836
+ * Deprecated. Use SardineGetNFTCheckoutOrderStatus() instead.
837
+ */
838
+ getSardineNFTCheckoutOrderStatus(args: GetSardineNFTCheckoutOrderStatusArgs, headers?: object, signal?: AbortSignal): Promise<GetSardineNFTCheckoutOrderStatusReturn>
787
839
  transakGetCountries(headers?: object, signal?: AbortSignal): Promise<TransakGetCountriesReturn>
788
840
  transakGetCryptoCurrencies(headers?: object, signal?: AbortSignal): Promise<TransakGetCryptoCurrenciesReturn>
789
841
  transakGetFiatCurrencies(headers?: object, signal?: AbortSignal): Promise<TransakGetFiatCurrenciesReturn>
790
842
  transakGetPrice(args: TransakGetPriceArgs, headers?: object, signal?: AbortSignal): Promise<TransakGetPriceReturn>
791
- transakGetSupportedNFTCheckoutChains(
792
- headers?: object,
793
- signal?: AbortSignal
794
- ): Promise<TransakGetSupportedNFTCheckoutChainsReturn>
843
+ transakGetSupportedNFTCheckoutChains(headers?: object, signal?: AbortSignal): Promise<TransakGetSupportedNFTCheckoutChainsReturn>
844
+ /**
845
+ *
846
+ * Price Feed
847
+ *
848
+ */
795
849
  getCoinPrices(args: GetCoinPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetCoinPricesReturn>
796
- getCollectiblePrices(
797
- args: GetCollectiblePricesArgs,
798
- headers?: object,
799
- signal?: AbortSignal
800
- ): Promise<GetCollectiblePricesReturn>
850
+ getCollectiblePrices(args: GetCollectiblePricesArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectiblePricesReturn>
851
+ /**
852
+ *
853
+ * Price Feed utils
854
+ *
855
+ */
801
856
  getExchangeRate(args: GetExchangeRateArgs, headers?: object, signal?: AbortSignal): Promise<GetExchangeRateReturn>
857
+ /**
858
+ *
859
+ * Util / misc
860
+ *
861
+ */
802
862
  memoryStore(args: MemoryStoreArgs, headers?: object, signal?: AbortSignal): Promise<MemoryStoreReturn>
803
863
  memoryLoad(args: MemoryLoadArgs, headers?: object, signal?: AbortSignal): Promise<MemoryLoadReturn>
864
+ /**
865
+ *
866
+ * Legacy
867
+ *
868
+ */
804
869
  getInviteInfo(headers?: object, signal?: AbortSignal): Promise<GetInviteInfoReturn>
870
+ /**
871
+ * NOTE: we're still using this from SW-API to Sequence-API to claim invite code
872
+ */
805
873
  isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object, signal?: AbortSignal): Promise<IsValidAccessCodeReturn>
806
- internalClaimAccessCode(
807
- args: InternalClaimAccessCodeArgs,
808
- headers?: object,
809
- signal?: AbortSignal
810
- ): Promise<InternalClaimAccessCodeReturn>
874
+ internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object, signal?: AbortSignal): Promise<InternalClaimAccessCodeReturn>
875
+ /**
876
+ * Utils
877
+ */
811
878
  blockNumberAtTime(args: BlockNumberAtTimeArgs, headers?: object, signal?: AbortSignal): Promise<BlockNumberAtTimeReturn>
879
+ /**
880
+ *
881
+ * Paper
882
+ * TODO: deprecate in the future
883
+ *
884
+ */
812
885
  paperSessionSecret(args: PaperSessionSecretArgs, headers?: object, signal?: AbortSignal): Promise<PaperSessionSecretReturn>
813
886
  paperSessionSecret2(args: PaperSessionSecret2Args, headers?: object, signal?: AbortSignal): Promise<PaperSessionSecret2Return>
887
+ /**
888
+ *
889
+ * Linked wallets (v0 -- simple support)
890
+ *
891
+ */
814
892
  linkWallet(args: LinkWalletArgs, headers?: object, signal?: AbortSignal): Promise<LinkWalletReturn>
815
893
  getLinkedWallets(args: GetLinkedWalletsArgs, headers?: object, signal?: AbortSignal): Promise<GetLinkedWalletsReturn>
816
894
  removeLinkedWallet(args: RemoveLinkedWalletArgs, headers?: object, signal?: AbortSignal): Promise<RemoveLinkedWalletReturn>
817
- generateWaaSVerificationURL(
818
- args: GenerateWaaSVerificationURLArgs,
819
- headers?: object,
820
- signal?: AbortSignal
821
- ): Promise<GenerateWaaSVerificationURLReturn>
822
- validateWaaSVerificationNonce(
823
- args: ValidateWaaSVerificationNonceArgs,
824
- headers?: object,
825
- signal?: AbortSignal
826
- ): Promise<ValidateWaaSVerificationNonceReturn>
895
+ /**
896
+ * NOTE: these methods are deprecated, please do not use them. We may resurface them in the future, but just wanted
897
+ * to be clear, they are not necessary for our linked wallets.
898
+ */
899
+ generateWaaSVerificationURL(args: GenerateWaaSVerificationURLArgs, headers?: object, signal?: AbortSignal): Promise<GenerateWaaSVerificationURLReturn>
900
+ validateWaaSVerificationNonce(args: ValidateWaaSVerificationNonceArgs, headers?: object, signal?: AbortSignal): Promise<ValidateWaaSVerificationNonceReturn>
901
+ /**
902
+ *
903
+ *
904
+ * WaaS child wallet adoption
905
+ *
906
+ */
827
907
  listAdoptedWallets(args: ListAdoptedWalletsArgs, headers?: object, signal?: AbortSignal): Promise<ListAdoptedWalletsReturn>
828
- getSwapPermit2Price(args: GetSwapPermit2PriceArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPermit2PriceReturn>
829
- getSwapPermit2Prices(
830
- args: GetSwapPermit2PricesArgs,
831
- headers?: object,
832
- signal?: AbortSignal
833
- ): Promise<GetSwapPermit2PricesReturn>
834
- getSwapPermit2Quote(args: GetSwapPermit2QuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPermit2QuoteReturn>
835
- getSwapPrice(args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPriceReturn>
836
- getSwapPrices(args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPricesReturn>
837
- getSwapQuote(args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteReturn>
838
- getSwapQuoteV2(args: GetSwapQuoteV2Args, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteV2Return>
839
- intentQuery(args: IntentQueryArgs, headers?: object, signal?: AbortSignal): Promise<IntentQueryReturn>
908
+ /**
909
+ *
910
+ * Currency abstraction
911
+ *
912
+ */
913
+ getLifiChains(headers?: object, signal?: AbortSignal): Promise<GetLifiChainsReturn>
914
+ getLifiTokens(args: GetLifiTokensArgs, headers?: object, signal?: AbortSignal): Promise<GetLifiTokensReturn>
915
+ getLifiSwapRoutes(args: GetLifiSwapRoutesArgs, headers?: object, signal?: AbortSignal): Promise<GetLifiSwapRoutesReturn>
916
+ getLifiSwapQuote(args: GetLifiSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetLifiSwapQuoteReturn>
917
+ /**
918
+ *
919
+ * Inventory, payments and management
920
+ *
921
+ */
840
922
  listCurrencyGroups(headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn>
841
- addOffchainInventory(
842
- args: AddOffchainInventoryArgs,
843
- headers?: object,
844
- signal?: AbortSignal
845
- ): Promise<AddOffchainInventoryReturn>
846
- getOffchainInventory(
847
- args: GetOffchainInventoryArgs,
848
- headers?: object,
849
- signal?: AbortSignal
850
- ): Promise<GetOffchainInventoryReturn>
851
- listOffchainInventories(
852
- args: ListOffchainInventoriesArgs,
853
- headers?: object,
854
- signal?: AbortSignal
855
- ): Promise<ListOffchainInventoriesReturn>
856
- updateOffchainInventory(
857
- args: UpdateOffchainInventoryArgs,
858
- headers?: object,
859
- signal?: AbortSignal
860
- ): Promise<UpdateOffchainInventoryReturn>
861
- deleteOffchainInventory(
862
- args: DeleteOffchainInventoryArgs,
863
- headers?: object,
864
- signal?: AbortSignal
865
- ): Promise<DeleteOffchainInventoryReturn>
866
- requestOffchainPayment(
867
- args: RequestOffchainPaymentArgs,
868
- headers?: object,
869
- signal?: AbortSignal
870
- ): Promise<RequestOffchainPaymentReturn>
871
- listOffchainPayments(
872
- args: ListOffchainPaymentsArgs,
873
- headers?: object,
874
- signal?: AbortSignal
875
- ): Promise<ListOffchainPaymentsReturn>
923
+ addOffchainInventory(args: AddOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<AddOffchainInventoryReturn>
924
+ getOffchainInventory(args: GetOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<GetOffchainInventoryReturn>
925
+ listOffchainInventories(args: ListOffchainInventoriesArgs, headers?: object, signal?: AbortSignal): Promise<ListOffchainInventoriesReturn>
926
+ updateOffchainInventory(args: UpdateOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<UpdateOffchainInventoryReturn>
927
+ deleteOffchainInventory(args: DeleteOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<DeleteOffchainInventoryReturn>
928
+ requestOffchainPayment(args: RequestOffchainPaymentArgs, headers?: object, signal?: AbortSignal): Promise<RequestOffchainPaymentReturn>
929
+ listOffchainPayments(args: ListOffchainPaymentsArgs, headers?: object, signal?: AbortSignal): Promise<ListOffchainPaymentsReturn>
930
+ /**
931
+ *
932
+ * Packs
933
+ *
934
+ */
876
935
  savePack(args: SavePackArgs, headers?: object, signal?: AbortSignal): Promise<SavePackReturn>
877
936
  getPack(args: GetPackArgs, headers?: object, signal?: AbortSignal): Promise<GetPackReturn>
878
937
  deletePack(args: DeletePackArgs, headers?: object, signal?: AbortSignal): Promise<DeletePackReturn>
879
938
  updatePackContent(args: UpdatePackContentArgs, headers?: object, signal?: AbortSignal): Promise<UpdatePackContentReturn>
939
+ checkoutOptionsSecondary(args: CheckoutOptionsSecondaryArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsSecondaryReturn>
940
+ checkoutOptionsGetTransakContractID(args: CheckoutOptionsGetTransakContractIDArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsGetTransakContractIDReturn>
880
941
  }
881
942
 
882
- export interface PingArgs {}
943
+ export interface PingArgs {
944
+ }
883
945
 
884
946
  export interface PingReturn {
885
- status: boolean
947
+ status: boolean
948
+ }
949
+ export interface VersionArgs {
886
950
  }
887
- export interface VersionArgs {}
888
951
 
889
952
  export interface VersionReturn {
890
- version: Version
953
+ version: Version
954
+ }
955
+ export interface RuntimeStatusArgs {
891
956
  }
892
- export interface RuntimeStatusArgs {}
893
957
 
894
958
  export interface RuntimeStatusReturn {
895
- status: RuntimeStatus
959
+ status: RuntimeStatus
960
+ }
961
+ export interface ClockArgs {
896
962
  }
897
- export interface ClockArgs {}
898
963
 
899
964
  export interface ClockReturn {
900
- serverTime: string
965
+ serverTime: string
966
+ }
967
+ export interface GetSequenceContextArgs {
901
968
  }
902
- export interface GetSequenceContextArgs {}
903
969
 
904
970
  export interface GetSequenceContextReturn {
905
- data: SequenceContext
971
+ data: SequenceContext
906
972
  }
907
973
  export interface GetAuthTokenArgs {
908
974
  ewtString: string
@@ -913,7 +979,7 @@ export interface GetAuthTokenReturn {
913
979
  status: boolean
914
980
  jwtToken: string
915
981
  address: string
916
- user?: User
982
+ user?: User
917
983
  }
918
984
  export interface GetAuthToken2Args {
919
985
  ewtString: string
@@ -924,7 +990,7 @@ export interface GetAuthToken2Return {
924
990
  status: boolean
925
991
  jwtToken: string
926
992
  address: string
927
- user?: User
993
+ user?: User
928
994
  }
929
995
  export interface SendPasswordlessLinkArgs {
930
996
  email: string
@@ -933,21 +999,21 @@ export interface SendPasswordlessLinkArgs {
933
999
  }
934
1000
 
935
1001
  export interface SendPasswordlessLinkReturn {
936
- status: boolean
1002
+ status: boolean
937
1003
  }
938
1004
  export interface RegisterPublicKeyArgs {
939
1005
  publicKey: PublicKey
940
1006
  }
941
1007
 
942
1008
  export interface RegisterPublicKeyReturn {
943
- status: boolean
1009
+ status: boolean
944
1010
  }
945
1011
  export interface GetPublicKeyArgs {
946
1012
  id: string
947
1013
  }
948
1014
 
949
1015
  export interface GetPublicKeyReturn {
950
- publicKey: PublicKey
1016
+ publicKey: PublicKey
951
1017
  }
952
1018
  export interface FriendListArgs {
953
1019
  nickname?: string
@@ -956,7 +1022,7 @@ export interface FriendListArgs {
956
1022
 
957
1023
  export interface FriendListReturn {
958
1024
  page: Page
959
- friends: Array<Friend>
1025
+ friends: Array<Friend>
960
1026
  }
961
1027
  export interface GetFriendByAddressArgs {
962
1028
  friendAddress: string
@@ -964,7 +1030,7 @@ export interface GetFriendByAddressArgs {
964
1030
 
965
1031
  export interface GetFriendByAddressReturn {
966
1032
  status: boolean
967
- friend: Friend
1033
+ friend: Friend
968
1034
  }
969
1035
  export interface SearchFriendsArgs {
970
1036
  filterUsername: string
@@ -972,7 +1038,7 @@ export interface SearchFriendsArgs {
972
1038
  }
973
1039
 
974
1040
  export interface SearchFriendsReturn {
975
- friends: Array<Friend>
1041
+ friends: Array<Friend>
976
1042
  }
977
1043
  export interface AddFriendArgs {
978
1044
  friendAddress: string
@@ -981,7 +1047,7 @@ export interface AddFriendArgs {
981
1047
 
982
1048
  export interface AddFriendReturn {
983
1049
  status: boolean
984
- friend?: Friend
1050
+ friend?: Friend
985
1051
  }
986
1052
  export interface UpdateFriendNicknameArgs {
987
1053
  friendAddress: string
@@ -990,14 +1056,14 @@ export interface UpdateFriendNicknameArgs {
990
1056
 
991
1057
  export interface UpdateFriendNicknameReturn {
992
1058
  status: boolean
993
- friend?: Friend
1059
+ friend?: Friend
994
1060
  }
995
1061
  export interface RemoveFriendArgs {
996
1062
  friendAddress: string
997
1063
  }
998
1064
 
999
1065
  export interface RemoveFriendReturn {
1000
- status: boolean
1066
+ status: boolean
1001
1067
  }
1002
1068
  export interface ContractCallArgs {
1003
1069
  chainID: string
@@ -1008,28 +1074,28 @@ export interface ContractCallArgs {
1008
1074
  }
1009
1075
 
1010
1076
  export interface ContractCallReturn {
1011
- returns: Array<string>
1077
+ returns: Array<string>
1012
1078
  }
1013
1079
  export interface DecodeContractCallArgs {
1014
1080
  callData: string
1015
1081
  }
1016
1082
 
1017
1083
  export interface DecodeContractCallReturn {
1018
- call: ContractCall
1084
+ call: ContractCall
1019
1085
  }
1020
1086
  export interface LookupContractCallSelectorsArgs {
1021
1087
  selectors: Array<string>
1022
1088
  }
1023
1089
 
1024
1090
  export interface LookupContractCallSelectorsReturn {
1025
- signatures: Array<Array<string>>
1091
+ signatures: Array<Array<string>>
1026
1092
  }
1027
1093
  export interface UserStorageFetchArgs {
1028
1094
  key: string
1029
1095
  }
1030
1096
 
1031
1097
  export interface UserStorageFetchReturn {
1032
- object: any
1098
+ object: any
1033
1099
  }
1034
1100
  export interface UserStorageSaveArgs {
1035
1101
  key: string
@@ -1037,28 +1103,28 @@ export interface UserStorageSaveArgs {
1037
1103
  }
1038
1104
 
1039
1105
  export interface UserStorageSaveReturn {
1040
- ok: boolean
1106
+ ok: boolean
1041
1107
  }
1042
1108
  export interface UserStorageDeleteArgs {
1043
1109
  key: string
1044
1110
  }
1045
1111
 
1046
1112
  export interface UserStorageDeleteReturn {
1047
- ok: boolean
1113
+ ok: boolean
1048
1114
  }
1049
1115
  export interface UserStorageFetchAllArgs {
1050
1116
  keys?: Array<string>
1051
1117
  }
1052
1118
 
1053
1119
  export interface UserStorageFetchAllReturn {
1054
- objects: { [key: string]: any }
1120
+ objects: {[key: string]: any}
1055
1121
  }
1056
1122
  export interface GetMoonpayLinkArgs {
1057
1123
  url: string
1058
1124
  }
1059
1125
 
1060
1126
  export interface GetMoonpayLinkReturn {
1061
- signedUrl: string
1127
+ signedUrl: string
1062
1128
  }
1063
1129
  export interface ResolveENSAddressArgs {
1064
1130
  ens: string
@@ -1066,7 +1132,7 @@ export interface ResolveENSAddressArgs {
1066
1132
 
1067
1133
  export interface ResolveENSAddressReturn {
1068
1134
  address: string
1069
- ok: boolean
1135
+ ok: boolean
1070
1136
  }
1071
1137
  export interface IsValidSignatureArgs {
1072
1138
  chainId: string
@@ -1076,7 +1142,7 @@ export interface IsValidSignatureArgs {
1076
1142
  }
1077
1143
 
1078
1144
  export interface IsValidSignatureReturn {
1079
- isValid: boolean
1145
+ isValid: boolean
1080
1146
  }
1081
1147
  export interface IsValidMessageSignatureArgs {
1082
1148
  chainId: string
@@ -1086,7 +1152,7 @@ export interface IsValidMessageSignatureArgs {
1086
1152
  }
1087
1153
 
1088
1154
  export interface IsValidMessageSignatureReturn {
1089
- isValid: boolean
1155
+ isValid: boolean
1090
1156
  }
1091
1157
  export interface IsValidTypedDataSignatureArgs {
1092
1158
  chainId: string
@@ -1096,7 +1162,7 @@ export interface IsValidTypedDataSignatureArgs {
1096
1162
  }
1097
1163
 
1098
1164
  export interface IsValidTypedDataSignatureReturn {
1099
- isValid: boolean
1165
+ isValid: boolean
1100
1166
  }
1101
1167
  export interface IsValidETHAuthProofArgs {
1102
1168
  chainId: string
@@ -1105,41 +1171,45 @@ export interface IsValidETHAuthProofArgs {
1105
1171
  }
1106
1172
 
1107
1173
  export interface IsValidETHAuthProofReturn {
1108
- isValid: boolean
1174
+ isValid: boolean
1175
+ }
1176
+ export interface SardineGetClientTokenArgs {
1109
1177
  }
1110
- export interface SardineGetClientTokenArgs {}
1111
1178
 
1112
1179
  export interface SardineGetClientTokenReturn {
1113
- token: string
1180
+ token: string
1114
1181
  }
1115
1182
  export interface SardineGetNFTCheckoutTokenArgs {
1116
1183
  params: SardineNFTCheckoutParams
1117
1184
  }
1118
1185
 
1119
1186
  export interface SardineGetNFTCheckoutTokenReturn {
1120
- resp: SardineNFTCheckout
1187
+ resp: SardineNFTCheckout
1121
1188
  }
1122
1189
  export interface SardineGetNFTCheckoutOrderStatusArgs {
1123
1190
  orderId: string
1124
1191
  }
1125
1192
 
1126
1193
  export interface SardineGetNFTCheckoutOrderStatusReturn {
1127
- resp: SardineOrder
1194
+ resp: SardineOrder
1195
+ }
1196
+ export interface SardineGetSupportedRegionsArgs {
1128
1197
  }
1129
- export interface SardineGetSupportedRegionsArgs {}
1130
1198
 
1131
1199
  export interface SardineGetSupportedRegionsReturn {
1132
- regions: Array<SardineRegion>
1200
+ regions: Array<SardineRegion>
1201
+ }
1202
+ export interface SardineGetSupportedFiatCurrenciesArgs {
1133
1203
  }
1134
- export interface SardineGetSupportedFiatCurrenciesArgs {}
1135
1204
 
1136
1205
  export interface SardineGetSupportedFiatCurrenciesReturn {
1137
- tokens: Array<SardineFiatCurrency>
1206
+ tokens: Array<SardineFiatCurrency>
1207
+ }
1208
+ export interface SardineGetSupportedTokensArgs {
1138
1209
  }
1139
- export interface SardineGetSupportedTokensArgs {}
1140
1210
 
1141
1211
  export interface SardineGetSupportedTokensReturn {
1142
- tokens: Array<SardineSupportedToken>
1212
+ tokens: Array<SardineSupportedToken>
1143
1213
  }
1144
1214
  export interface SardineGetSupportedTokenForSwapArgs {
1145
1215
  network: string
@@ -1147,86 +1217,92 @@ export interface SardineGetSupportedTokenForSwapArgs {
1147
1217
  }
1148
1218
 
1149
1219
  export interface SardineGetSupportedTokenForSwapReturn {
1150
- token: SardineSupportedTokenForSwap
1220
+ token: SardineSupportedTokenForSwap
1221
+ }
1222
+ export interface SardineGetEnabledTokensArgs {
1151
1223
  }
1152
- export interface SardineGetEnabledTokensArgs {}
1153
1224
 
1154
1225
  export interface SardineGetEnabledTokensReturn {
1155
- tokens: Array<SardineEnabledToken>
1226
+ tokens: Array<SardineEnabledToken>
1156
1227
  }
1157
1228
  export interface SardineGetQuoteArgs {
1158
1229
  params: SardineGetQuoteParams
1159
1230
  }
1160
1231
 
1161
1232
  export interface SardineGetQuoteReturn {
1162
- quote: SardineQuote
1233
+ quote: SardineQuote
1234
+ }
1235
+ export interface GetSardineClientTokenArgs {
1163
1236
  }
1164
- export interface GetSardineClientTokenArgs {}
1165
1237
 
1166
1238
  export interface GetSardineClientTokenReturn {
1167
- token: string
1239
+ token: string
1168
1240
  }
1169
1241
  export interface GetSardineNFTCheckoutTokenArgs {
1170
1242
  params: SardineNFTCheckoutParams
1171
1243
  }
1172
1244
 
1173
1245
  export interface GetSardineNFTCheckoutTokenReturn {
1174
- resp: SardineNFTCheckout
1246
+ resp: SardineNFTCheckout
1175
1247
  }
1176
1248
  export interface GetSardineNFTCheckoutOrderStatusArgs {
1177
1249
  orderId: string
1178
1250
  }
1179
1251
 
1180
1252
  export interface GetSardineNFTCheckoutOrderStatusReturn {
1181
- resp: SardineOrder
1253
+ resp: SardineOrder
1254
+ }
1255
+ export interface TransakGetCountriesArgs {
1182
1256
  }
1183
- export interface TransakGetCountriesArgs {}
1184
1257
 
1185
1258
  export interface TransakGetCountriesReturn {
1186
- regions: Array<TransakCountry>
1259
+ regions: Array<TransakCountry>
1260
+ }
1261
+ export interface TransakGetCryptoCurrenciesArgs {
1187
1262
  }
1188
- export interface TransakGetCryptoCurrenciesArgs {}
1189
1263
 
1190
1264
  export interface TransakGetCryptoCurrenciesReturn {
1191
- currencies: Array<TransakCryptoCurrency>
1265
+ currencies: Array<TransakCryptoCurrency>
1266
+ }
1267
+ export interface TransakGetFiatCurrenciesArgs {
1192
1268
  }
1193
- export interface TransakGetFiatCurrenciesArgs {}
1194
1269
 
1195
1270
  export interface TransakGetFiatCurrenciesReturn {
1196
- currencies: Array<TransakFiatCurrency>
1271
+ currencies: Array<TransakFiatCurrency>
1197
1272
  }
1198
1273
  export interface TransakGetPriceArgs {
1199
1274
  params: TransakGetPriceParams
1200
1275
  }
1201
1276
 
1202
1277
  export interface TransakGetPriceReturn {
1203
- price: TransakPrice
1278
+ price: TransakPrice
1279
+ }
1280
+ export interface TransakGetSupportedNFTCheckoutChainsArgs {
1204
1281
  }
1205
- export interface TransakGetSupportedNFTCheckoutChainsArgs {}
1206
1282
 
1207
1283
  export interface TransakGetSupportedNFTCheckoutChainsReturn {
1208
- chains: Array<TransakChain>
1284
+ chains: Array<TransakChain>
1209
1285
  }
1210
1286
  export interface GetCoinPricesArgs {
1211
1287
  tokens: Array<Token>
1212
1288
  }
1213
1289
 
1214
1290
  export interface GetCoinPricesReturn {
1215
- tokenPrices: Array<TokenPrice>
1291
+ tokenPrices: Array<TokenPrice>
1216
1292
  }
1217
1293
  export interface GetCollectiblePricesArgs {
1218
1294
  tokens: Array<Token>
1219
1295
  }
1220
1296
 
1221
1297
  export interface GetCollectiblePricesReturn {
1222
- tokenPrices: Array<TokenPrice>
1298
+ tokenPrices: Array<TokenPrice>
1223
1299
  }
1224
1300
  export interface GetExchangeRateArgs {
1225
1301
  toCurrency: string
1226
1302
  }
1227
1303
 
1228
1304
  export interface GetExchangeRateReturn {
1229
- exchangeRate: ExchangeRate
1305
+ exchangeRate: ExchangeRate
1230
1306
  }
1231
1307
  export interface MemoryStoreArgs {
1232
1308
  key: string
@@ -1234,26 +1310,27 @@ export interface MemoryStoreArgs {
1234
1310
  }
1235
1311
 
1236
1312
  export interface MemoryStoreReturn {
1237
- ok: boolean
1313
+ ok: boolean
1238
1314
  }
1239
1315
  export interface MemoryLoadArgs {
1240
1316
  key: string
1241
1317
  }
1242
1318
 
1243
1319
  export interface MemoryLoadReturn {
1244
- value: string
1320
+ value: string
1321
+ }
1322
+ export interface GetInviteInfoArgs {
1245
1323
  }
1246
- export interface GetInviteInfoArgs {}
1247
1324
 
1248
1325
  export interface GetInviteInfoReturn {
1249
- inviteInfo: InviteInfo
1326
+ inviteInfo: InviteInfo
1250
1327
  }
1251
1328
  export interface IsValidAccessCodeArgs {
1252
1329
  accessCode: string
1253
1330
  }
1254
1331
 
1255
1332
  export interface IsValidAccessCodeReturn {
1256
- status: boolean
1333
+ status: boolean
1257
1334
  }
1258
1335
  export interface InternalClaimAccessCodeArgs {
1259
1336
  address: string
@@ -1261,7 +1338,7 @@ export interface InternalClaimAccessCodeArgs {
1261
1338
  }
1262
1339
 
1263
1340
  export interface InternalClaimAccessCodeReturn {
1264
- status: boolean
1341
+ status: boolean
1265
1342
  }
1266
1343
  export interface BlockNumberAtTimeArgs {
1267
1344
  chainId: number
@@ -1269,7 +1346,7 @@ export interface BlockNumberAtTimeArgs {
1269
1346
  }
1270
1347
 
1271
1348
  export interface BlockNumberAtTimeReturn {
1272
- blocks: Array<number>
1349
+ blocks: Array<number>
1273
1350
  }
1274
1351
  export interface PaperSessionSecretArgs {
1275
1352
  chainName: string
@@ -1279,7 +1356,7 @@ export interface PaperSessionSecretArgs {
1279
1356
  }
1280
1357
 
1281
1358
  export interface PaperSessionSecretReturn {
1282
- secret: string
1359
+ secret: string
1283
1360
  }
1284
1361
  export interface PaperSessionSecret2Args {
1285
1362
  chainName: string
@@ -1289,7 +1366,7 @@ export interface PaperSessionSecret2Args {
1289
1366
  }
1290
1367
 
1291
1368
  export interface PaperSessionSecret2Return {
1292
- secret: string
1369
+ secret: string
1293
1370
  }
1294
1371
  export interface LinkWalletArgs {
1295
1372
  parentWalletAddress: string
@@ -1303,7 +1380,7 @@ export interface LinkWalletArgs {
1303
1380
  }
1304
1381
 
1305
1382
  export interface LinkWalletReturn {
1306
- status: boolean
1383
+ status: boolean
1307
1384
  }
1308
1385
  export interface GetLinkedWalletsArgs {
1309
1386
  parentWalletAddress: string
@@ -1313,7 +1390,7 @@ export interface GetLinkedWalletsArgs {
1313
1390
  }
1314
1391
 
1315
1392
  export interface GetLinkedWalletsReturn {
1316
- linkedWallets: Array<LinkedWallet>
1393
+ linkedWallets: Array<LinkedWallet>
1317
1394
  }
1318
1395
  export interface RemoveLinkedWalletArgs {
1319
1396
  parentWalletAddress: string
@@ -1324,7 +1401,7 @@ export interface RemoveLinkedWalletArgs {
1324
1401
  }
1325
1402
 
1326
1403
  export interface RemoveLinkedWalletReturn {
1327
- status: boolean
1404
+ status: boolean
1328
1405
  }
1329
1406
  export interface GenerateWaaSVerificationURLArgs {
1330
1407
  walletAddress: string
@@ -1332,7 +1409,7 @@ export interface GenerateWaaSVerificationURLArgs {
1332
1409
 
1333
1410
  export interface GenerateWaaSVerificationURLReturn {
1334
1411
  nonce: string
1335
- verificationURL: string
1412
+ verificationURL: string
1336
1413
  }
1337
1414
  export interface ValidateWaaSVerificationNonceArgs {
1338
1415
  nonce: string
@@ -1342,7 +1419,7 @@ export interface ValidateWaaSVerificationNonceArgs {
1342
1419
  }
1343
1420
 
1344
1421
  export interface ValidateWaaSVerificationNonceReturn {
1345
- walletAddress: string
1422
+ walletAddress: string
1346
1423
  }
1347
1424
  export interface ListAdoptedWalletsArgs {
1348
1425
  page?: Page
@@ -1350,136 +1427,77 @@ export interface ListAdoptedWalletsArgs {
1350
1427
 
1351
1428
  export interface ListAdoptedWalletsReturn {
1352
1429
  page: Page
1353
- wallets: Array<AdoptedChildWallet>
1430
+ wallets: Array<AdoptedChildWallet>
1354
1431
  }
1355
- export interface GetSwapPermit2PriceArgs {
1356
- buyCurrencyAddress: string
1357
- sellCurrencyAddress: string
1358
- buyAmount: string
1359
- chainId: number
1360
- slippagePercentage?: number
1432
+ export interface GetLifiChainsArgs {
1361
1433
  }
1362
1434
 
1363
- export interface GetSwapPermit2PriceReturn {
1364
- swapPermit2Price: SwapPermit2Price
1435
+ export interface GetLifiChainsReturn {
1436
+ chains: Array<number>
1365
1437
  }
1366
- export interface GetSwapPermit2PricesArgs {
1367
- userAddress: string
1368
- buyCurrencyAddress: string
1369
- buyAmount: string
1370
- chainId: number
1371
- slippagePercentage?: number
1438
+ export interface GetLifiTokensArgs {
1439
+ chainIds: Array<number>
1372
1440
  }
1373
1441
 
1374
- export interface GetSwapPermit2PricesReturn {
1375
- swapPermit2Prices: Array<SwapPermit2Price>
1442
+ export interface GetLifiTokensReturn {
1443
+ tokens: Array<Token>
1376
1444
  }
1377
- export interface GetSwapPermit2QuoteArgs {
1378
- userAddress: string
1379
- buyCurrencyAddress: string
1380
- sellCurrencyAddress: string
1381
- buyAmount: string
1445
+ export interface GetLifiSwapRoutesArgs {
1382
1446
  chainId: number
1383
- includeApprove: boolean
1384
- slippagePercentage?: number
1385
- }
1386
-
1387
- export interface GetSwapPermit2QuoteReturn {
1388
- swapPermit2Quote: SwapPermit2Quote
1389
- }
1390
- export interface GetSwapPriceArgs {
1391
- buyCurrencyAddress: string
1392
- sellCurrencyAddress: string
1393
- buyAmount: string
1394
- chainId: number
1395
- slippagePercentage?: number
1396
- }
1397
-
1398
- export interface GetSwapPriceReturn {
1399
- swapPrice: SwapPrice
1400
- }
1401
- export interface GetSwapPricesArgs {
1402
- userAddress: string
1403
- buyCurrencyAddress: string
1404
- buyAmount: string
1405
- chainId: number
1406
- slippagePercentage?: number
1407
- }
1408
-
1409
- export interface GetSwapPricesReturn {
1410
- swapPrices: Array<SwapPrice>
1411
- }
1412
- export interface GetSwapQuoteArgs {
1413
- userAddress: string
1414
- buyCurrencyAddress: string
1415
- sellCurrencyAddress: string
1416
- buyAmount: string
1417
- chainId: number
1418
- includeApprove: boolean
1419
- slippagePercentage?: number
1447
+ toTokenAddress: string
1448
+ toTokenAmount: string
1449
+ walletAddress: string
1420
1450
  }
1421
1451
 
1422
- export interface GetSwapQuoteReturn {
1423
- swapQuote: SwapQuote
1452
+ export interface GetLifiSwapRoutesReturn {
1453
+ routes: Array<LifiSwapRoute>
1424
1454
  }
1425
- export interface GetSwapQuoteV2Args {
1426
- userAddress: string
1427
- buyCurrencyAddress: string
1428
- sellCurrencyAddress: string
1429
- buyAmount: string
1430
- chainId: number
1431
- includeApprove: boolean
1432
- slippagePercentage?: number
1455
+ export interface GetLifiSwapQuoteArgs {
1456
+ params: GetLifiSwapQuoteParams
1433
1457
  }
1434
1458
 
1435
- export interface GetSwapQuoteV2Return {
1436
- swapQuote: SwapQuote
1459
+ export interface GetLifiSwapQuoteReturn {
1460
+ quote: LifiSwapQuote
1437
1461
  }
1438
- export interface IntentQueryArgs {
1439
- wallet: string
1440
- preconditions: Array<IntentPrecondition>
1441
- }
1442
-
1443
- export interface IntentQueryReturn {
1444
- solutions: Array<IntentSolution>
1462
+ export interface ListCurrencyGroupsArgs {
1445
1463
  }
1446
- export interface ListCurrencyGroupsArgs {}
1447
1464
 
1448
1465
  export interface ListCurrencyGroupsReturn {
1449
- currencyGroups: Array<CurrencyGroup>
1466
+ currencyGroups: Array<CurrencyGroup>
1450
1467
  }
1451
1468
  export interface AddOffchainInventoryArgs {
1452
1469
  inventory: OffchainInventory
1453
1470
  }
1454
1471
 
1455
1472
  export interface AddOffchainInventoryReturn {
1456
- inventoryId: number
1473
+ inventoryId: number
1457
1474
  }
1458
1475
  export interface GetOffchainInventoryArgs {
1459
1476
  inventoryId: number
1460
1477
  }
1461
1478
 
1462
1479
  export interface GetOffchainInventoryReturn {
1463
- inventory: OffchainInventory
1480
+ inventory: OffchainInventory
1464
1481
  }
1465
1482
  export interface ListOffchainInventoriesArgs {
1466
1483
  projectId: number
1467
1484
  }
1468
1485
 
1469
1486
  export interface ListOffchainInventoriesReturn {
1470
- inventory: Array<OffchainInventory>
1487
+ inventory: Array<OffchainInventory>
1471
1488
  }
1472
1489
  export interface UpdateOffchainInventoryArgs {
1473
1490
  inventory: OffchainInventory
1474
1491
  }
1475
1492
 
1476
- export interface UpdateOffchainInventoryReturn {}
1493
+ export interface UpdateOffchainInventoryReturn {
1494
+ }
1477
1495
  export interface DeleteOffchainInventoryArgs {
1478
1496
  inventoryId: number
1479
1497
  }
1480
1498
 
1481
1499
  export interface DeleteOffchainInventoryReturn {
1482
- ok: boolean
1500
+ ok: boolean
1483
1501
  }
1484
1502
  export interface RequestOffchainPaymentArgs {
1485
1503
  inventoryId: number
@@ -1489,7 +1507,7 @@ export interface RequestOffchainPaymentArgs {
1489
1507
  }
1490
1508
 
1491
1509
  export interface RequestOffchainPaymentReturn {
1492
- payment: PaymentResponse
1510
+ payment: PaymentResponse
1493
1511
  }
1494
1512
  export interface ListOffchainPaymentsArgs {
1495
1513
  inventoryId: number
@@ -1498,14 +1516,14 @@ export interface ListOffchainPaymentsArgs {
1498
1516
 
1499
1517
  export interface ListOffchainPaymentsReturn {
1500
1518
  page: Page
1501
- payments: Array<OffchainPayment>
1519
+ payments: Array<OffchainPayment>
1502
1520
  }
1503
1521
  export interface SavePackArgs {
1504
1522
  pack: Pack
1505
1523
  }
1506
1524
 
1507
1525
  export interface SavePackReturn {
1508
- merkleRoot: string
1526
+ merkleRoot: string
1509
1527
  }
1510
1528
  export interface GetPackArgs {
1511
1529
  contractAddress: string
@@ -1513,7 +1531,7 @@ export interface GetPackArgs {
1513
1531
  }
1514
1532
 
1515
1533
  export interface GetPackReturn {
1516
- pack: Pack
1534
+ pack: Pack
1517
1535
  }
1518
1536
  export interface DeletePackArgs {
1519
1537
  contractAddress: string
@@ -1521,16 +1539,35 @@ export interface DeletePackArgs {
1521
1539
  }
1522
1540
 
1523
1541
  export interface DeletePackReturn {
1524
- status: boolean
1542
+ status: boolean
1525
1543
  }
1526
1544
  export interface UpdatePackContentArgs {
1527
1545
  pack: Pack
1528
1546
  }
1529
1547
 
1530
1548
  export interface UpdatePackContentReturn {
1531
- merkleRoot: string
1549
+ merkleRoot: string
1550
+ }
1551
+ export interface CheckoutOptionsSecondaryArgs {
1552
+ chainId: number
1553
+ wallet: string
1554
+ params: Array<SecondaryCheckoutOptionsParams>
1532
1555
  }
1533
1556
 
1557
+ export interface CheckoutOptionsSecondaryReturn {
1558
+ options: CheckoutOptions
1559
+ }
1560
+ export interface CheckoutOptionsGetTransakContractIDArgs {
1561
+ chainId: number
1562
+ contractAddress: string
1563
+ }
1564
+
1565
+ export interface CheckoutOptionsGetTransakContractIDReturn {
1566
+ contractId: string
1567
+ }
1568
+
1569
+
1570
+
1534
1571
  //
1535
1572
  // Client
1536
1573
  //
@@ -1547,1401 +1584,1175 @@ export class API implements API {
1547
1584
  private url(name: string): string {
1548
1585
  return this.hostname + this.path + name
1549
1586
  }
1550
-
1587
+
1551
1588
  ping = (headers?: object, signal?: AbortSignal): Promise<PingReturn> => {
1552
- return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then(
1553
- res => {
1554
- return buildResponse(res).then(_data => {
1555
- return {
1556
- status: <boolean>_data.status
1557
- }
1558
- })
1559
- },
1560
- error => {
1561
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1562
- }
1563
- )
1589
+ return this.fetch(
1590
+ this.url('Ping'),
1591
+ createHTTPRequest({}, headers, signal)
1592
+ ).then((res) => {
1593
+ return buildResponse(res).then(_data => {
1594
+ return {
1595
+ status: <boolean>(_data.status),
1596
+ }
1597
+ })
1598
+ }, (error) => {
1599
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1600
+ })
1564
1601
  }
1565
-
1602
+
1566
1603
  version = (headers?: object, signal?: AbortSignal): Promise<VersionReturn> => {
1567
- return this.fetch(this.url('Version'), createHTTPRequest({}, headers, signal)).then(
1568
- res => {
1569
- return buildResponse(res).then(_data => {
1570
- return {
1571
- version: <Version>_data.version
1572
- }
1573
- })
1574
- },
1575
- error => {
1576
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1577
- }
1578
- )
1604
+ return this.fetch(
1605
+ this.url('Version'),
1606
+ createHTTPRequest({}, headers, signal)
1607
+ ).then((res) => {
1608
+ return buildResponse(res).then(_data => {
1609
+ return {
1610
+ version: <Version>(_data.version),
1611
+ }
1612
+ })
1613
+ }, (error) => {
1614
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1615
+ })
1579
1616
  }
1580
-
1617
+
1581
1618
  runtimeStatus = (headers?: object, signal?: AbortSignal): Promise<RuntimeStatusReturn> => {
1582
- return this.fetch(this.url('RuntimeStatus'), createHTTPRequest({}, headers, signal)).then(
1583
- res => {
1584
- return buildResponse(res).then(_data => {
1585
- return {
1586
- status: <RuntimeStatus>_data.status
1587
- }
1588
- })
1589
- },
1590
- error => {
1591
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1592
- }
1593
- )
1619
+ return this.fetch(
1620
+ this.url('RuntimeStatus'),
1621
+ createHTTPRequest({}, headers, signal)
1622
+ ).then((res) => {
1623
+ return buildResponse(res).then(_data => {
1624
+ return {
1625
+ status: <RuntimeStatus>(_data.status),
1626
+ }
1627
+ })
1628
+ }, (error) => {
1629
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1630
+ })
1594
1631
  }
1595
-
1632
+
1596
1633
  clock = (headers?: object, signal?: AbortSignal): Promise<ClockReturn> => {
1597
- return this.fetch(this.url('Clock'), createHTTPRequest({}, headers, signal)).then(
1598
- res => {
1599
- return buildResponse(res).then(_data => {
1600
- return {
1601
- serverTime: <string>_data.serverTime
1602
- }
1603
- })
1604
- },
1605
- error => {
1606
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1607
- }
1608
- )
1634
+ return this.fetch(
1635
+ this.url('Clock'),
1636
+ createHTTPRequest({}, headers, signal)
1637
+ ).then((res) => {
1638
+ return buildResponse(res).then(_data => {
1639
+ return {
1640
+ serverTime: <string>(_data.serverTime),
1641
+ }
1642
+ })
1643
+ }, (error) => {
1644
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1645
+ })
1609
1646
  }
1610
-
1647
+
1611
1648
  getSequenceContext = (headers?: object, signal?: AbortSignal): Promise<GetSequenceContextReturn> => {
1612
- return this.fetch(this.url('GetSequenceContext'), createHTTPRequest({}, headers, signal)).then(
1613
- res => {
1614
- return buildResponse(res).then(_data => {
1615
- return {
1616
- data: <SequenceContext>_data.data
1617
- }
1618
- })
1619
- },
1620
- error => {
1621
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1622
- }
1623
- )
1649
+ return this.fetch(
1650
+ this.url('GetSequenceContext'),
1651
+ createHTTPRequest({}, headers, signal)
1652
+ ).then((res) => {
1653
+ return buildResponse(res).then(_data => {
1654
+ return {
1655
+ data: <SequenceContext>(_data.data),
1656
+ }
1657
+ })
1658
+ }, (error) => {
1659
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1660
+ })
1624
1661
  }
1625
-
1662
+
1626
1663
  getAuthToken = (args: GetAuthTokenArgs, headers?: object, signal?: AbortSignal): Promise<GetAuthTokenReturn> => {
1627
- return this.fetch(this.url('GetAuthToken'), createHTTPRequest(args, headers, signal)).then(
1628
- res => {
1629
- return buildResponse(res).then(_data => {
1630
- return {
1631
- status: <boolean>_data.status,
1632
- jwtToken: <string>_data.jwtToken,
1633
- address: <string>_data.address,
1634
- user: <User>_data.user
1635
- }
1636
- })
1637
- },
1638
- error => {
1639
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1640
- }
1641
- )
1664
+ return this.fetch(
1665
+ this.url('GetAuthToken'),
1666
+ createHTTPRequest(args, headers, signal)).then((res) => {
1667
+ return buildResponse(res).then(_data => {
1668
+ return {
1669
+ status: <boolean>(_data.status),
1670
+ jwtToken: <string>(_data.jwtToken),
1671
+ address: <string>(_data.address),
1672
+ user: <User>(_data.user),
1673
+ }
1674
+ })
1675
+ }, (error) => {
1676
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1677
+ })
1642
1678
  }
1643
-
1679
+
1644
1680
  getAuthToken2 = (args: GetAuthToken2Args, headers?: object, signal?: AbortSignal): Promise<GetAuthToken2Return> => {
1645
- return this.fetch(this.url('GetAuthToken2'), createHTTPRequest(args, headers, signal)).then(
1646
- res => {
1647
- return buildResponse(res).then(_data => {
1648
- return {
1649
- status: <boolean>_data.status,
1650
- jwtToken: <string>_data.jwtToken,
1651
- address: <string>_data.address,
1652
- user: <User>_data.user
1653
- }
1654
- })
1655
- },
1656
- error => {
1657
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1658
- }
1659
- )
1660
- }
1661
-
1662
- sendPasswordlessLink = (
1663
- args: SendPasswordlessLinkArgs,
1664
- headers?: object,
1665
- signal?: AbortSignal
1666
- ): Promise<SendPasswordlessLinkReturn> => {
1667
- return this.fetch(this.url('SendPasswordlessLink'), createHTTPRequest(args, headers, signal)).then(
1668
- res => {
1669
- return buildResponse(res).then(_data => {
1670
- return {
1671
- status: <boolean>_data.status
1672
- }
1673
- })
1674
- },
1675
- error => {
1676
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1677
- }
1678
- )
1681
+ return this.fetch(
1682
+ this.url('GetAuthToken2'),
1683
+ createHTTPRequest(args, headers, signal)).then((res) => {
1684
+ return buildResponse(res).then(_data => {
1685
+ return {
1686
+ status: <boolean>(_data.status),
1687
+ jwtToken: <string>(_data.jwtToken),
1688
+ address: <string>(_data.address),
1689
+ user: <User>(_data.user),
1690
+ }
1691
+ })
1692
+ }, (error) => {
1693
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1694
+ })
1695
+ }
1696
+
1697
+ sendPasswordlessLink = (args: SendPasswordlessLinkArgs, headers?: object, signal?: AbortSignal): Promise<SendPasswordlessLinkReturn> => {
1698
+ return this.fetch(
1699
+ this.url('SendPasswordlessLink'),
1700
+ createHTTPRequest(args, headers, signal)).then((res) => {
1701
+ return buildResponse(res).then(_data => {
1702
+ return {
1703
+ status: <boolean>(_data.status),
1704
+ }
1705
+ })
1706
+ }, (error) => {
1707
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1708
+ })
1679
1709
  }
1680
-
1710
+
1681
1711
  registerPublicKey = (args: RegisterPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<RegisterPublicKeyReturn> => {
1682
- return this.fetch(this.url('RegisterPublicKey'), createHTTPRequest(args, headers, signal)).then(
1683
- res => {
1684
- return buildResponse(res).then(_data => {
1685
- return {
1686
- status: <boolean>_data.status
1687
- }
1688
- })
1689
- },
1690
- error => {
1691
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1692
- }
1693
- )
1712
+ return this.fetch(
1713
+ this.url('RegisterPublicKey'),
1714
+ createHTTPRequest(args, headers, signal)).then((res) => {
1715
+ return buildResponse(res).then(_data => {
1716
+ return {
1717
+ status: <boolean>(_data.status),
1718
+ }
1719
+ })
1720
+ }, (error) => {
1721
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1722
+ })
1694
1723
  }
1695
-
1724
+
1696
1725
  getPublicKey = (args: GetPublicKeyArgs, headers?: object, signal?: AbortSignal): Promise<GetPublicKeyReturn> => {
1697
- return this.fetch(this.url('GetPublicKey'), createHTTPRequest(args, headers, signal)).then(
1698
- res => {
1699
- return buildResponse(res).then(_data => {
1700
- return {
1701
- publicKey: <PublicKey>_data.publicKey
1702
- }
1703
- })
1704
- },
1705
- error => {
1706
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1707
- }
1708
- )
1726
+ return this.fetch(
1727
+ this.url('GetPublicKey'),
1728
+ createHTTPRequest(args, headers, signal)).then((res) => {
1729
+ return buildResponse(res).then(_data => {
1730
+ return {
1731
+ publicKey: <PublicKey>(_data.publicKey),
1732
+ }
1733
+ })
1734
+ }, (error) => {
1735
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1736
+ })
1709
1737
  }
1710
-
1738
+
1711
1739
  friendList = (args: FriendListArgs, headers?: object, signal?: AbortSignal): Promise<FriendListReturn> => {
1712
- return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers, signal)).then(
1713
- res => {
1714
- return buildResponse(res).then(_data => {
1715
- return {
1716
- page: <Page>_data.page,
1717
- friends: <Array<Friend>>_data.friends
1718
- }
1719
- })
1720
- },
1721
- error => {
1722
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1723
- }
1724
- )
1725
- }
1726
-
1727
- getFriendByAddress = (
1728
- args: GetFriendByAddressArgs,
1729
- headers?: object,
1730
- signal?: AbortSignal
1731
- ): Promise<GetFriendByAddressReturn> => {
1732
- return this.fetch(this.url('GetFriendByAddress'), createHTTPRequest(args, headers, signal)).then(
1733
- res => {
1734
- return buildResponse(res).then(_data => {
1735
- return {
1736
- status: <boolean>_data.status,
1737
- friend: <Friend>_data.friend
1738
- }
1739
- })
1740
- },
1741
- error => {
1742
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1743
- }
1744
- )
1740
+ return this.fetch(
1741
+ this.url('FriendList'),
1742
+ createHTTPRequest(args, headers, signal)).then((res) => {
1743
+ return buildResponse(res).then(_data => {
1744
+ return {
1745
+ page: <Page>(_data.page),
1746
+ friends: <Array<Friend>>(_data.friends),
1747
+ }
1748
+ })
1749
+ }, (error) => {
1750
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1751
+ })
1752
+ }
1753
+
1754
+ getFriendByAddress = (args: GetFriendByAddressArgs, headers?: object, signal?: AbortSignal): Promise<GetFriendByAddressReturn> => {
1755
+ return this.fetch(
1756
+ this.url('GetFriendByAddress'),
1757
+ createHTTPRequest(args, headers, signal)).then((res) => {
1758
+ return buildResponse(res).then(_data => {
1759
+ return {
1760
+ status: <boolean>(_data.status),
1761
+ friend: <Friend>(_data.friend),
1762
+ }
1763
+ })
1764
+ }, (error) => {
1765
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1766
+ })
1745
1767
  }
1746
-
1768
+
1747
1769
  searchFriends = (args: SearchFriendsArgs, headers?: object, signal?: AbortSignal): Promise<SearchFriendsReturn> => {
1748
- return this.fetch(this.url('SearchFriends'), createHTTPRequest(args, headers, signal)).then(
1749
- res => {
1750
- return buildResponse(res).then(_data => {
1751
- return {
1752
- friends: <Array<Friend>>_data.friends
1753
- }
1754
- })
1755
- },
1756
- error => {
1757
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1758
- }
1759
- )
1770
+ return this.fetch(
1771
+ this.url('SearchFriends'),
1772
+ createHTTPRequest(args, headers, signal)).then((res) => {
1773
+ return buildResponse(res).then(_data => {
1774
+ return {
1775
+ friends: <Array<Friend>>(_data.friends),
1776
+ }
1777
+ })
1778
+ }, (error) => {
1779
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1780
+ })
1760
1781
  }
1761
-
1782
+
1762
1783
  addFriend = (args: AddFriendArgs, headers?: object, signal?: AbortSignal): Promise<AddFriendReturn> => {
1763
- return this.fetch(this.url('AddFriend'), createHTTPRequest(args, headers, signal)).then(
1764
- res => {
1765
- return buildResponse(res).then(_data => {
1766
- return {
1767
- status: <boolean>_data.status,
1768
- friend: <Friend>_data.friend
1769
- }
1770
- })
1771
- },
1772
- error => {
1773
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1774
- }
1775
- )
1776
- }
1777
-
1778
- updateFriendNickname = (
1779
- args: UpdateFriendNicknameArgs,
1780
- headers?: object,
1781
- signal?: AbortSignal
1782
- ): Promise<UpdateFriendNicknameReturn> => {
1783
- return this.fetch(this.url('UpdateFriendNickname'), createHTTPRequest(args, headers, signal)).then(
1784
- res => {
1785
- return buildResponse(res).then(_data => {
1786
- return {
1787
- status: <boolean>_data.status,
1788
- friend: <Friend>_data.friend
1789
- }
1790
- })
1791
- },
1792
- error => {
1793
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1794
- }
1795
- )
1784
+ return this.fetch(
1785
+ this.url('AddFriend'),
1786
+ createHTTPRequest(args, headers, signal)).then((res) => {
1787
+ return buildResponse(res).then(_data => {
1788
+ return {
1789
+ status: <boolean>(_data.status),
1790
+ friend: <Friend>(_data.friend),
1791
+ }
1792
+ })
1793
+ }, (error) => {
1794
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1795
+ })
1796
+ }
1797
+
1798
+ updateFriendNickname = (args: UpdateFriendNicknameArgs, headers?: object, signal?: AbortSignal): Promise<UpdateFriendNicknameReturn> => {
1799
+ return this.fetch(
1800
+ this.url('UpdateFriendNickname'),
1801
+ createHTTPRequest(args, headers, signal)).then((res) => {
1802
+ return buildResponse(res).then(_data => {
1803
+ return {
1804
+ status: <boolean>(_data.status),
1805
+ friend: <Friend>(_data.friend),
1806
+ }
1807
+ })
1808
+ }, (error) => {
1809
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1810
+ })
1796
1811
  }
1797
-
1812
+
1798
1813
  removeFriend = (args: RemoveFriendArgs, headers?: object, signal?: AbortSignal): Promise<RemoveFriendReturn> => {
1799
- return this.fetch(this.url('RemoveFriend'), createHTTPRequest(args, headers, signal)).then(
1800
- res => {
1801
- return buildResponse(res).then(_data => {
1802
- return {
1803
- status: <boolean>_data.status
1804
- }
1805
- })
1806
- },
1807
- error => {
1808
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1809
- }
1810
- )
1814
+ return this.fetch(
1815
+ this.url('RemoveFriend'),
1816
+ createHTTPRequest(args, headers, signal)).then((res) => {
1817
+ return buildResponse(res).then(_data => {
1818
+ return {
1819
+ status: <boolean>(_data.status),
1820
+ }
1821
+ })
1822
+ }, (error) => {
1823
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1824
+ })
1811
1825
  }
1812
-
1826
+
1813
1827
  contractCall = (args: ContractCallArgs, headers?: object, signal?: AbortSignal): Promise<ContractCallReturn> => {
1814
- return this.fetch(this.url('ContractCall'), createHTTPRequest(args, headers, signal)).then(
1815
- res => {
1816
- return buildResponse(res).then(_data => {
1817
- return {
1818
- returns: <Array<string>>_data.returns
1819
- }
1820
- })
1821
- },
1822
- error => {
1823
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1824
- }
1825
- )
1826
- }
1827
-
1828
- decodeContractCall = (
1829
- args: DecodeContractCallArgs,
1830
- headers?: object,
1831
- signal?: AbortSignal
1832
- ): Promise<DecodeContractCallReturn> => {
1833
- return this.fetch(this.url('DecodeContractCall'), createHTTPRequest(args, headers, signal)).then(
1834
- res => {
1835
- return buildResponse(res).then(_data => {
1836
- return {
1837
- call: <ContractCall>_data.call
1838
- }
1839
- })
1840
- },
1841
- error => {
1842
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1843
- }
1844
- )
1845
- }
1846
-
1847
- lookupContractCallSelectors = (
1848
- args: LookupContractCallSelectorsArgs,
1849
- headers?: object,
1850
- signal?: AbortSignal
1851
- ): Promise<LookupContractCallSelectorsReturn> => {
1852
- return this.fetch(this.url('LookupContractCallSelectors'), createHTTPRequest(args, headers, signal)).then(
1853
- res => {
1854
- return buildResponse(res).then(_data => {
1855
- return {
1856
- signatures: <Array<Array<string>>>_data.signatures
1857
- }
1858
- })
1859
- },
1860
- error => {
1861
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1862
- }
1863
- )
1828
+ return this.fetch(
1829
+ this.url('ContractCall'),
1830
+ createHTTPRequest(args, headers, signal)).then((res) => {
1831
+ return buildResponse(res).then(_data => {
1832
+ return {
1833
+ returns: <Array<string>>(_data.returns),
1834
+ }
1835
+ })
1836
+ }, (error) => {
1837
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1838
+ })
1839
+ }
1840
+
1841
+ decodeContractCall = (args: DecodeContractCallArgs, headers?: object, signal?: AbortSignal): Promise<DecodeContractCallReturn> => {
1842
+ return this.fetch(
1843
+ this.url('DecodeContractCall'),
1844
+ createHTTPRequest(args, headers, signal)).then((res) => {
1845
+ return buildResponse(res).then(_data => {
1846
+ return {
1847
+ call: <ContractCall>(_data.call),
1848
+ }
1849
+ })
1850
+ }, (error) => {
1851
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1852
+ })
1853
+ }
1854
+
1855
+ lookupContractCallSelectors = (args: LookupContractCallSelectorsArgs, headers?: object, signal?: AbortSignal): Promise<LookupContractCallSelectorsReturn> => {
1856
+ return this.fetch(
1857
+ this.url('LookupContractCallSelectors'),
1858
+ createHTTPRequest(args, headers, signal)).then((res) => {
1859
+ return buildResponse(res).then(_data => {
1860
+ return {
1861
+ signatures: <Array<Array<string>>>(_data.signatures),
1862
+ }
1863
+ })
1864
+ }, (error) => {
1865
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1866
+ })
1864
1867
  }
1865
-
1868
+
1866
1869
  userStorageFetch = (args: UserStorageFetchArgs, headers?: object, signal?: AbortSignal): Promise<UserStorageFetchReturn> => {
1867
- return this.fetch(this.url('UserStorageFetch'), createHTTPRequest(args, headers, signal)).then(
1868
- res => {
1869
- return buildResponse(res).then(_data => {
1870
- return {
1871
- object: <any>_data.object
1872
- }
1873
- })
1874
- },
1875
- error => {
1876
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1877
- }
1878
- )
1870
+ return this.fetch(
1871
+ this.url('UserStorageFetch'),
1872
+ createHTTPRequest(args, headers, signal)).then((res) => {
1873
+ return buildResponse(res).then(_data => {
1874
+ return {
1875
+ object: <any>(_data.object),
1876
+ }
1877
+ })
1878
+ }, (error) => {
1879
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1880
+ })
1879
1881
  }
1880
-
1882
+
1881
1883
  userStorageSave = (args: UserStorageSaveArgs, headers?: object, signal?: AbortSignal): Promise<UserStorageSaveReturn> => {
1882
- return this.fetch(this.url('UserStorageSave'), createHTTPRequest(args, headers, signal)).then(
1883
- res => {
1884
- return buildResponse(res).then(_data => {
1885
- return {
1886
- ok: <boolean>_data.ok
1887
- }
1888
- })
1889
- },
1890
- error => {
1891
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1892
- }
1893
- )
1884
+ return this.fetch(
1885
+ this.url('UserStorageSave'),
1886
+ createHTTPRequest(args, headers, signal)).then((res) => {
1887
+ return buildResponse(res).then(_data => {
1888
+ return {
1889
+ ok: <boolean>(_data.ok),
1890
+ }
1891
+ })
1892
+ }, (error) => {
1893
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1894
+ })
1894
1895
  }
1895
-
1896
+
1896
1897
  userStorageDelete = (args: UserStorageDeleteArgs, headers?: object, signal?: AbortSignal): Promise<UserStorageDeleteReturn> => {
1897
- return this.fetch(this.url('UserStorageDelete'), createHTTPRequest(args, headers, signal)).then(
1898
- res => {
1899
- return buildResponse(res).then(_data => {
1900
- return {
1901
- ok: <boolean>_data.ok
1902
- }
1903
- })
1904
- },
1905
- error => {
1906
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1907
- }
1908
- )
1909
- }
1910
-
1911
- userStorageFetchAll = (
1912
- args: UserStorageFetchAllArgs,
1913
- headers?: object,
1914
- signal?: AbortSignal
1915
- ): Promise<UserStorageFetchAllReturn> => {
1916
- return this.fetch(this.url('UserStorageFetchAll'), createHTTPRequest(args, headers, signal)).then(
1917
- res => {
1918
- return buildResponse(res).then(_data => {
1919
- return {
1920
- objects: <{ [key: string]: any }>_data.objects
1921
- }
1922
- })
1923
- },
1924
- error => {
1925
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1926
- }
1927
- )
1898
+ return this.fetch(
1899
+ this.url('UserStorageDelete'),
1900
+ createHTTPRequest(args, headers, signal)).then((res) => {
1901
+ return buildResponse(res).then(_data => {
1902
+ return {
1903
+ ok: <boolean>(_data.ok),
1904
+ }
1905
+ })
1906
+ }, (error) => {
1907
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1908
+ })
1909
+ }
1910
+
1911
+ userStorageFetchAll = (args: UserStorageFetchAllArgs, headers?: object, signal?: AbortSignal): Promise<UserStorageFetchAllReturn> => {
1912
+ return this.fetch(
1913
+ this.url('UserStorageFetchAll'),
1914
+ createHTTPRequest(args, headers, signal)).then((res) => {
1915
+ return buildResponse(res).then(_data => {
1916
+ return {
1917
+ objects: <{[key: string]: any}>(_data.objects),
1918
+ }
1919
+ })
1920
+ }, (error) => {
1921
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1922
+ })
1928
1923
  }
1929
-
1924
+
1930
1925
  getMoonpayLink = (args: GetMoonpayLinkArgs, headers?: object, signal?: AbortSignal): Promise<GetMoonpayLinkReturn> => {
1931
- return this.fetch(this.url('GetMoonpayLink'), createHTTPRequest(args, headers, signal)).then(
1932
- res => {
1933
- return buildResponse(res).then(_data => {
1934
- return {
1935
- signedUrl: <string>_data.signedUrl
1936
- }
1937
- })
1938
- },
1939
- error => {
1940
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1941
- }
1942
- )
1926
+ return this.fetch(
1927
+ this.url('GetMoonpayLink'),
1928
+ createHTTPRequest(args, headers, signal)).then((res) => {
1929
+ return buildResponse(res).then(_data => {
1930
+ return {
1931
+ signedUrl: <string>(_data.signedUrl),
1932
+ }
1933
+ })
1934
+ }, (error) => {
1935
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1936
+ })
1943
1937
  }
1944
-
1938
+
1945
1939
  resolveENSAddress = (args: ResolveENSAddressArgs, headers?: object, signal?: AbortSignal): Promise<ResolveENSAddressReturn> => {
1946
- return this.fetch(this.url('ResolveENSAddress'), createHTTPRequest(args, headers, signal)).then(
1947
- res => {
1948
- return buildResponse(res).then(_data => {
1949
- return {
1950
- address: <string>_data.address,
1951
- ok: <boolean>_data.ok
1952
- }
1953
- })
1954
- },
1955
- error => {
1956
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1957
- }
1958
- )
1940
+ return this.fetch(
1941
+ this.url('ResolveENSAddress'),
1942
+ createHTTPRequest(args, headers, signal)).then((res) => {
1943
+ return buildResponse(res).then(_data => {
1944
+ return {
1945
+ address: <string>(_data.address),
1946
+ ok: <boolean>(_data.ok),
1947
+ }
1948
+ })
1949
+ }, (error) => {
1950
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1951
+ })
1959
1952
  }
1960
-
1953
+
1961
1954
  isValidSignature = (args: IsValidSignatureArgs, headers?: object, signal?: AbortSignal): Promise<IsValidSignatureReturn> => {
1962
- return this.fetch(this.url('IsValidSignature'), createHTTPRequest(args, headers, signal)).then(
1963
- res => {
1964
- return buildResponse(res).then(_data => {
1965
- return {
1966
- isValid: <boolean>_data.isValid
1967
- }
1968
- })
1969
- },
1970
- error => {
1971
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1972
- }
1973
- )
1974
- }
1975
-
1976
- isValidMessageSignature = (
1977
- args: IsValidMessageSignatureArgs,
1978
- headers?: object,
1979
- signal?: AbortSignal
1980
- ): Promise<IsValidMessageSignatureReturn> => {
1981
- return this.fetch(this.url('IsValidMessageSignature'), createHTTPRequest(args, headers, signal)).then(
1982
- res => {
1983
- return buildResponse(res).then(_data => {
1984
- return {
1985
- isValid: <boolean>_data.isValid
1986
- }
1987
- })
1988
- },
1989
- error => {
1990
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1991
- }
1992
- )
1993
- }
1994
-
1995
- isValidTypedDataSignature = (
1996
- args: IsValidTypedDataSignatureArgs,
1997
- headers?: object,
1998
- signal?: AbortSignal
1999
- ): Promise<IsValidTypedDataSignatureReturn> => {
2000
- return this.fetch(this.url('IsValidTypedDataSignature'), createHTTPRequest(args, headers, signal)).then(
2001
- res => {
2002
- return buildResponse(res).then(_data => {
2003
- return {
2004
- isValid: <boolean>_data.isValid
2005
- }
2006
- })
2007
- },
2008
- error => {
2009
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2010
- }
2011
- )
2012
- }
2013
-
2014
- isValidETHAuthProof = (
2015
- args: IsValidETHAuthProofArgs,
2016
- headers?: object,
2017
- signal?: AbortSignal
2018
- ): Promise<IsValidETHAuthProofReturn> => {
2019
- return this.fetch(this.url('IsValidETHAuthProof'), createHTTPRequest(args, headers, signal)).then(
2020
- res => {
2021
- return buildResponse(res).then(_data => {
2022
- return {
2023
- isValid: <boolean>_data.isValid
2024
- }
2025
- })
2026
- },
2027
- error => {
2028
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2029
- }
2030
- )
1955
+ return this.fetch(
1956
+ this.url('IsValidSignature'),
1957
+ createHTTPRequest(args, headers, signal)).then((res) => {
1958
+ return buildResponse(res).then(_data => {
1959
+ return {
1960
+ isValid: <boolean>(_data.isValid),
1961
+ }
1962
+ })
1963
+ }, (error) => {
1964
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1965
+ })
1966
+ }
1967
+
1968
+ isValidMessageSignature = (args: IsValidMessageSignatureArgs, headers?: object, signal?: AbortSignal): Promise<IsValidMessageSignatureReturn> => {
1969
+ return this.fetch(
1970
+ this.url('IsValidMessageSignature'),
1971
+ createHTTPRequest(args, headers, signal)).then((res) => {
1972
+ return buildResponse(res).then(_data => {
1973
+ return {
1974
+ isValid: <boolean>(_data.isValid),
1975
+ }
1976
+ })
1977
+ }, (error) => {
1978
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1979
+ })
1980
+ }
1981
+
1982
+ isValidTypedDataSignature = (args: IsValidTypedDataSignatureArgs, headers?: object, signal?: AbortSignal): Promise<IsValidTypedDataSignatureReturn> => {
1983
+ return this.fetch(
1984
+ this.url('IsValidTypedDataSignature'),
1985
+ createHTTPRequest(args, headers, signal)).then((res) => {
1986
+ return buildResponse(res).then(_data => {
1987
+ return {
1988
+ isValid: <boolean>(_data.isValid),
1989
+ }
1990
+ })
1991
+ }, (error) => {
1992
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1993
+ })
1994
+ }
1995
+
1996
+ isValidETHAuthProof = (args: IsValidETHAuthProofArgs, headers?: object, signal?: AbortSignal): Promise<IsValidETHAuthProofReturn> => {
1997
+ return this.fetch(
1998
+ this.url('IsValidETHAuthProof'),
1999
+ createHTTPRequest(args, headers, signal)).then((res) => {
2000
+ return buildResponse(res).then(_data => {
2001
+ return {
2002
+ isValid: <boolean>(_data.isValid),
2003
+ }
2004
+ })
2005
+ }, (error) => {
2006
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2007
+ })
2031
2008
  }
2032
-
2009
+
2033
2010
  sardineGetClientToken = (headers?: object, signal?: AbortSignal): Promise<SardineGetClientTokenReturn> => {
2034
- return this.fetch(this.url('SardineGetClientToken'), createHTTPRequest({}, headers, signal)).then(
2035
- res => {
2036
- return buildResponse(res).then(_data => {
2037
- return {
2038
- token: <string>_data.token
2039
- }
2040
- })
2041
- },
2042
- error => {
2043
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2044
- }
2045
- )
2046
- }
2047
-
2048
- sardineGetNFTCheckoutToken = (
2049
- args: SardineGetNFTCheckoutTokenArgs,
2050
- headers?: object,
2051
- signal?: AbortSignal
2052
- ): Promise<SardineGetNFTCheckoutTokenReturn> => {
2053
- return this.fetch(this.url('SardineGetNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then(
2054
- res => {
2055
- return buildResponse(res).then(_data => {
2056
- return {
2057
- resp: <SardineNFTCheckout>_data.resp
2058
- }
2059
- })
2060
- },
2061
- error => {
2062
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2063
- }
2064
- )
2065
- }
2066
-
2067
- sardineGetNFTCheckoutOrderStatus = (
2068
- args: SardineGetNFTCheckoutOrderStatusArgs,
2069
- headers?: object,
2070
- signal?: AbortSignal
2071
- ): Promise<SardineGetNFTCheckoutOrderStatusReturn> => {
2072
- return this.fetch(this.url('SardineGetNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then(
2073
- res => {
2074
- return buildResponse(res).then(_data => {
2075
- return {
2076
- resp: <SardineOrder>_data.resp
2077
- }
2078
- })
2079
- },
2080
- error => {
2081
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2082
- }
2083
- )
2011
+ return this.fetch(
2012
+ this.url('SardineGetClientToken'),
2013
+ createHTTPRequest({}, headers, signal)
2014
+ ).then((res) => {
2015
+ return buildResponse(res).then(_data => {
2016
+ return {
2017
+ token: <string>(_data.token),
2018
+ }
2019
+ })
2020
+ }, (error) => {
2021
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2022
+ })
2023
+ }
2024
+
2025
+ sardineGetNFTCheckoutToken = (args: SardineGetNFTCheckoutTokenArgs, headers?: object, signal?: AbortSignal): Promise<SardineGetNFTCheckoutTokenReturn> => {
2026
+ return this.fetch(
2027
+ this.url('SardineGetNFTCheckoutToken'),
2028
+ createHTTPRequest(args, headers, signal)).then((res) => {
2029
+ return buildResponse(res).then(_data => {
2030
+ return {
2031
+ resp: <SardineNFTCheckout>(_data.resp),
2032
+ }
2033
+ })
2034
+ }, (error) => {
2035
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2036
+ })
2037
+ }
2038
+
2039
+ sardineGetNFTCheckoutOrderStatus = (args: SardineGetNFTCheckoutOrderStatusArgs, headers?: object, signal?: AbortSignal): Promise<SardineGetNFTCheckoutOrderStatusReturn> => {
2040
+ return this.fetch(
2041
+ this.url('SardineGetNFTCheckoutOrderStatus'),
2042
+ createHTTPRequest(args, headers, signal)).then((res) => {
2043
+ return buildResponse(res).then(_data => {
2044
+ return {
2045
+ resp: <SardineOrder>(_data.resp),
2046
+ }
2047
+ })
2048
+ }, (error) => {
2049
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2050
+ })
2084
2051
  }
2085
-
2052
+
2086
2053
  sardineGetSupportedRegions = (headers?: object, signal?: AbortSignal): Promise<SardineGetSupportedRegionsReturn> => {
2087
- return this.fetch(this.url('SardineGetSupportedRegions'), createHTTPRequest({}, headers, signal)).then(
2088
- res => {
2089
- return buildResponse(res).then(_data => {
2090
- return {
2091
- regions: <Array<SardineRegion>>_data.regions
2092
- }
2093
- })
2094
- },
2095
- error => {
2096
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2097
- }
2098
- )
2099
- }
2100
-
2101
- sardineGetSupportedFiatCurrencies = (
2102
- headers?: object,
2103
- signal?: AbortSignal
2104
- ): Promise<SardineGetSupportedFiatCurrenciesReturn> => {
2105
- return this.fetch(this.url('SardineGetSupportedFiatCurrencies'), createHTTPRequest({}, headers, signal)).then(
2106
- res => {
2107
- return buildResponse(res).then(_data => {
2108
- return {
2109
- tokens: <Array<SardineFiatCurrency>>_data.tokens
2110
- }
2111
- })
2112
- },
2113
- error => {
2114
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2115
- }
2116
- )
2054
+ return this.fetch(
2055
+ this.url('SardineGetSupportedRegions'),
2056
+ createHTTPRequest({}, headers, signal)
2057
+ ).then((res) => {
2058
+ return buildResponse(res).then(_data => {
2059
+ return {
2060
+ regions: <Array<SardineRegion>>(_data.regions),
2061
+ }
2062
+ })
2063
+ }, (error) => {
2064
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2065
+ })
2066
+ }
2067
+
2068
+ sardineGetSupportedFiatCurrencies = (headers?: object, signal?: AbortSignal): Promise<SardineGetSupportedFiatCurrenciesReturn> => {
2069
+ return this.fetch(
2070
+ this.url('SardineGetSupportedFiatCurrencies'),
2071
+ createHTTPRequest({}, headers, signal)
2072
+ ).then((res) => {
2073
+ return buildResponse(res).then(_data => {
2074
+ return {
2075
+ tokens: <Array<SardineFiatCurrency>>(_data.tokens),
2076
+ }
2077
+ })
2078
+ }, (error) => {
2079
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2080
+ })
2117
2081
  }
2118
-
2082
+
2119
2083
  sardineGetSupportedTokens = (headers?: object, signal?: AbortSignal): Promise<SardineGetSupportedTokensReturn> => {
2120
- return this.fetch(this.url('SardineGetSupportedTokens'), createHTTPRequest({}, headers, signal)).then(
2121
- res => {
2122
- return buildResponse(res).then(_data => {
2123
- return {
2124
- tokens: <Array<SardineSupportedToken>>_data.tokens
2125
- }
2126
- })
2127
- },
2128
- error => {
2129
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2130
- }
2131
- )
2132
- }
2133
-
2134
- sardineGetSupportedTokenForSwap = (
2135
- args: SardineGetSupportedTokenForSwapArgs,
2136
- headers?: object,
2137
- signal?: AbortSignal
2138
- ): Promise<SardineGetSupportedTokenForSwapReturn> => {
2139
- return this.fetch(this.url('SardineGetSupportedTokenForSwap'), createHTTPRequest(args, headers, signal)).then(
2140
- res => {
2141
- return buildResponse(res).then(_data => {
2142
- return {
2143
- token: <SardineSupportedTokenForSwap>_data.token
2144
- }
2145
- })
2146
- },
2147
- error => {
2148
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2149
- }
2150
- )
2084
+ return this.fetch(
2085
+ this.url('SardineGetSupportedTokens'),
2086
+ createHTTPRequest({}, headers, signal)
2087
+ ).then((res) => {
2088
+ return buildResponse(res).then(_data => {
2089
+ return {
2090
+ tokens: <Array<SardineSupportedToken>>(_data.tokens),
2091
+ }
2092
+ })
2093
+ }, (error) => {
2094
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2095
+ })
2096
+ }
2097
+
2098
+ sardineGetSupportedTokenForSwap = (args: SardineGetSupportedTokenForSwapArgs, headers?: object, signal?: AbortSignal): Promise<SardineGetSupportedTokenForSwapReturn> => {
2099
+ return this.fetch(
2100
+ this.url('SardineGetSupportedTokenForSwap'),
2101
+ createHTTPRequest(args, headers, signal)).then((res) => {
2102
+ return buildResponse(res).then(_data => {
2103
+ return {
2104
+ token: <SardineSupportedTokenForSwap>(_data.token),
2105
+ }
2106
+ })
2107
+ }, (error) => {
2108
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2109
+ })
2151
2110
  }
2152
-
2111
+
2153
2112
  sardineGetEnabledTokens = (headers?: object, signal?: AbortSignal): Promise<SardineGetEnabledTokensReturn> => {
2154
- return this.fetch(this.url('SardineGetEnabledTokens'), createHTTPRequest({}, headers, signal)).then(
2155
- res => {
2156
- return buildResponse(res).then(_data => {
2157
- return {
2158
- tokens: <Array<SardineEnabledToken>>_data.tokens
2159
- }
2160
- })
2161
- },
2162
- error => {
2163
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2164
- }
2165
- )
2113
+ return this.fetch(
2114
+ this.url('SardineGetEnabledTokens'),
2115
+ createHTTPRequest({}, headers, signal)
2116
+ ).then((res) => {
2117
+ return buildResponse(res).then(_data => {
2118
+ return {
2119
+ tokens: <Array<SardineEnabledToken>>(_data.tokens),
2120
+ }
2121
+ })
2122
+ }, (error) => {
2123
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2124
+ })
2166
2125
  }
2167
-
2126
+
2168
2127
  sardineGetQuote = (args: SardineGetQuoteArgs, headers?: object, signal?: AbortSignal): Promise<SardineGetQuoteReturn> => {
2169
- return this.fetch(this.url('SardineGetQuote'), createHTTPRequest(args, headers, signal)).then(
2170
- res => {
2171
- return buildResponse(res).then(_data => {
2172
- return {
2173
- quote: <SardineQuote>_data.quote
2174
- }
2175
- })
2176
- },
2177
- error => {
2178
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2179
- }
2180
- )
2128
+ return this.fetch(
2129
+ this.url('SardineGetQuote'),
2130
+ createHTTPRequest(args, headers, signal)).then((res) => {
2131
+ return buildResponse(res).then(_data => {
2132
+ return {
2133
+ quote: <SardineQuote>(_data.quote),
2134
+ }
2135
+ })
2136
+ }, (error) => {
2137
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2138
+ })
2181
2139
  }
2182
-
2140
+
2183
2141
  getSardineClientToken = (headers?: object, signal?: AbortSignal): Promise<GetSardineClientTokenReturn> => {
2184
- return this.fetch(this.url('GetSardineClientToken'), createHTTPRequest({}, headers, signal)).then(
2185
- res => {
2186
- return buildResponse(res).then(_data => {
2187
- return {
2188
- token: <string>_data.token
2189
- }
2190
- })
2191
- },
2192
- error => {
2193
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2194
- }
2195
- )
2196
- }
2197
-
2198
- getSardineNFTCheckoutToken = (
2199
- args: GetSardineNFTCheckoutTokenArgs,
2200
- headers?: object,
2201
- signal?: AbortSignal
2202
- ): Promise<GetSardineNFTCheckoutTokenReturn> => {
2203
- return this.fetch(this.url('GetSardineNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then(
2204
- res => {
2205
- return buildResponse(res).then(_data => {
2206
- return {
2207
- resp: <SardineNFTCheckout>_data.resp
2208
- }
2209
- })
2210
- },
2211
- error => {
2212
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2213
- }
2214
- )
2215
- }
2216
-
2217
- getSardineNFTCheckoutOrderStatus = (
2218
- args: GetSardineNFTCheckoutOrderStatusArgs,
2219
- headers?: object,
2220
- signal?: AbortSignal
2221
- ): Promise<GetSardineNFTCheckoutOrderStatusReturn> => {
2222
- return this.fetch(this.url('GetSardineNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then(
2223
- res => {
2224
- return buildResponse(res).then(_data => {
2225
- return {
2226
- resp: <SardineOrder>_data.resp
2227
- }
2228
- })
2229
- },
2230
- error => {
2231
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2232
- }
2233
- )
2142
+ return this.fetch(
2143
+ this.url('GetSardineClientToken'),
2144
+ createHTTPRequest({}, headers, signal)
2145
+ ).then((res) => {
2146
+ return buildResponse(res).then(_data => {
2147
+ return {
2148
+ token: <string>(_data.token),
2149
+ }
2150
+ })
2151
+ }, (error) => {
2152
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2153
+ })
2154
+ }
2155
+
2156
+ getSardineNFTCheckoutToken = (args: GetSardineNFTCheckoutTokenArgs, headers?: object, signal?: AbortSignal): Promise<GetSardineNFTCheckoutTokenReturn> => {
2157
+ return this.fetch(
2158
+ this.url('GetSardineNFTCheckoutToken'),
2159
+ createHTTPRequest(args, headers, signal)).then((res) => {
2160
+ return buildResponse(res).then(_data => {
2161
+ return {
2162
+ resp: <SardineNFTCheckout>(_data.resp),
2163
+ }
2164
+ })
2165
+ }, (error) => {
2166
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2167
+ })
2168
+ }
2169
+
2170
+ getSardineNFTCheckoutOrderStatus = (args: GetSardineNFTCheckoutOrderStatusArgs, headers?: object, signal?: AbortSignal): Promise<GetSardineNFTCheckoutOrderStatusReturn> => {
2171
+ return this.fetch(
2172
+ this.url('GetSardineNFTCheckoutOrderStatus'),
2173
+ createHTTPRequest(args, headers, signal)).then((res) => {
2174
+ return buildResponse(res).then(_data => {
2175
+ return {
2176
+ resp: <SardineOrder>(_data.resp),
2177
+ }
2178
+ })
2179
+ }, (error) => {
2180
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2181
+ })
2234
2182
  }
2235
-
2183
+
2236
2184
  transakGetCountries = (headers?: object, signal?: AbortSignal): Promise<TransakGetCountriesReturn> => {
2237
- return this.fetch(this.url('TransakGetCountries'), createHTTPRequest({}, headers, signal)).then(
2238
- res => {
2239
- return buildResponse(res).then(_data => {
2240
- return {
2241
- regions: <Array<TransakCountry>>_data.regions
2242
- }
2243
- })
2244
- },
2245
- error => {
2246
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2247
- }
2248
- )
2185
+ return this.fetch(
2186
+ this.url('TransakGetCountries'),
2187
+ createHTTPRequest({}, headers, signal)
2188
+ ).then((res) => {
2189
+ return buildResponse(res).then(_data => {
2190
+ return {
2191
+ regions: <Array<TransakCountry>>(_data.regions),
2192
+ }
2193
+ })
2194
+ }, (error) => {
2195
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2196
+ })
2249
2197
  }
2250
-
2198
+
2251
2199
  transakGetCryptoCurrencies = (headers?: object, signal?: AbortSignal): Promise<TransakGetCryptoCurrenciesReturn> => {
2252
- return this.fetch(this.url('TransakGetCryptoCurrencies'), createHTTPRequest({}, headers, signal)).then(
2253
- res => {
2254
- return buildResponse(res).then(_data => {
2255
- return {
2256
- currencies: <Array<TransakCryptoCurrency>>_data.currencies
2257
- }
2258
- })
2259
- },
2260
- error => {
2261
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2262
- }
2263
- )
2200
+ return this.fetch(
2201
+ this.url('TransakGetCryptoCurrencies'),
2202
+ createHTTPRequest({}, headers, signal)
2203
+ ).then((res) => {
2204
+ return buildResponse(res).then(_data => {
2205
+ return {
2206
+ currencies: <Array<TransakCryptoCurrency>>(_data.currencies),
2207
+ }
2208
+ })
2209
+ }, (error) => {
2210
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2211
+ })
2264
2212
  }
2265
-
2213
+
2266
2214
  transakGetFiatCurrencies = (headers?: object, signal?: AbortSignal): Promise<TransakGetFiatCurrenciesReturn> => {
2267
- return this.fetch(this.url('TransakGetFiatCurrencies'), createHTTPRequest({}, headers, signal)).then(
2268
- res => {
2269
- return buildResponse(res).then(_data => {
2270
- return {
2271
- currencies: <Array<TransakFiatCurrency>>_data.currencies
2272
- }
2273
- })
2274
- },
2275
- error => {
2276
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2277
- }
2278
- )
2215
+ return this.fetch(
2216
+ this.url('TransakGetFiatCurrencies'),
2217
+ createHTTPRequest({}, headers, signal)
2218
+ ).then((res) => {
2219
+ return buildResponse(res).then(_data => {
2220
+ return {
2221
+ currencies: <Array<TransakFiatCurrency>>(_data.currencies),
2222
+ }
2223
+ })
2224
+ }, (error) => {
2225
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2226
+ })
2279
2227
  }
2280
-
2228
+
2281
2229
  transakGetPrice = (args: TransakGetPriceArgs, headers?: object, signal?: AbortSignal): Promise<TransakGetPriceReturn> => {
2282
- return this.fetch(this.url('TransakGetPrice'), createHTTPRequest(args, headers, signal)).then(
2283
- res => {
2284
- return buildResponse(res).then(_data => {
2285
- return {
2286
- price: <TransakPrice>_data.price
2287
- }
2288
- })
2289
- },
2290
- error => {
2291
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2292
- }
2293
- )
2294
- }
2295
-
2296
- transakGetSupportedNFTCheckoutChains = (
2297
- headers?: object,
2298
- signal?: AbortSignal
2299
- ): Promise<TransakGetSupportedNFTCheckoutChainsReturn> => {
2300
- return this.fetch(this.url('TransakGetSupportedNFTCheckoutChains'), createHTTPRequest({}, headers, signal)).then(
2301
- res => {
2302
- return buildResponse(res).then(_data => {
2303
- return {
2304
- chains: <Array<TransakChain>>_data.chains
2305
- }
2306
- })
2307
- },
2308
- error => {
2309
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2310
- }
2311
- )
2230
+ return this.fetch(
2231
+ this.url('TransakGetPrice'),
2232
+ createHTTPRequest(args, headers, signal)).then((res) => {
2233
+ return buildResponse(res).then(_data => {
2234
+ return {
2235
+ price: <TransakPrice>(_data.price),
2236
+ }
2237
+ })
2238
+ }, (error) => {
2239
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2240
+ })
2241
+ }
2242
+
2243
+ transakGetSupportedNFTCheckoutChains = (headers?: object, signal?: AbortSignal): Promise<TransakGetSupportedNFTCheckoutChainsReturn> => {
2244
+ return this.fetch(
2245
+ this.url('TransakGetSupportedNFTCheckoutChains'),
2246
+ createHTTPRequest({}, headers, signal)
2247
+ ).then((res) => {
2248
+ return buildResponse(res).then(_data => {
2249
+ return {
2250
+ chains: <Array<TransakChain>>(_data.chains),
2251
+ }
2252
+ })
2253
+ }, (error) => {
2254
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2255
+ })
2312
2256
  }
2313
-
2257
+
2314
2258
  getCoinPrices = (args: GetCoinPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetCoinPricesReturn> => {
2315
- return this.fetch(this.url('GetCoinPrices'), createHTTPRequest(args, headers, signal)).then(
2316
- res => {
2317
- return buildResponse(res).then(_data => {
2318
- return {
2319
- tokenPrices: <Array<TokenPrice>>_data.tokenPrices
2320
- }
2321
- })
2322
- },
2323
- error => {
2324
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2325
- }
2326
- )
2327
- }
2328
-
2329
- getCollectiblePrices = (
2330
- args: GetCollectiblePricesArgs,
2331
- headers?: object,
2332
- signal?: AbortSignal
2333
- ): Promise<GetCollectiblePricesReturn> => {
2334
- return this.fetch(this.url('GetCollectiblePrices'), createHTTPRequest(args, headers, signal)).then(
2335
- res => {
2336
- return buildResponse(res).then(_data => {
2337
- return {
2338
- tokenPrices: <Array<TokenPrice>>_data.tokenPrices
2339
- }
2340
- })
2341
- },
2342
- error => {
2343
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2344
- }
2345
- )
2259
+ return this.fetch(
2260
+ this.url('GetCoinPrices'),
2261
+ createHTTPRequest(args, headers, signal)).then((res) => {
2262
+ return buildResponse(res).then(_data => {
2263
+ return {
2264
+ tokenPrices: <Array<TokenPrice>>(_data.tokenPrices),
2265
+ }
2266
+ })
2267
+ }, (error) => {
2268
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2269
+ })
2270
+ }
2271
+
2272
+ getCollectiblePrices = (args: GetCollectiblePricesArgs, headers?: object, signal?: AbortSignal): Promise<GetCollectiblePricesReturn> => {
2273
+ return this.fetch(
2274
+ this.url('GetCollectiblePrices'),
2275
+ createHTTPRequest(args, headers, signal)).then((res) => {
2276
+ return buildResponse(res).then(_data => {
2277
+ return {
2278
+ tokenPrices: <Array<TokenPrice>>(_data.tokenPrices),
2279
+ }
2280
+ })
2281
+ }, (error) => {
2282
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2283
+ })
2346
2284
  }
2347
-
2285
+
2348
2286
  getExchangeRate = (args: GetExchangeRateArgs, headers?: object, signal?: AbortSignal): Promise<GetExchangeRateReturn> => {
2349
- return this.fetch(this.url('GetExchangeRate'), createHTTPRequest(args, headers, signal)).then(
2350
- res => {
2351
- return buildResponse(res).then(_data => {
2352
- return {
2353
- exchangeRate: <ExchangeRate>_data.exchangeRate
2354
- }
2355
- })
2356
- },
2357
- error => {
2358
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2359
- }
2360
- )
2287
+ return this.fetch(
2288
+ this.url('GetExchangeRate'),
2289
+ createHTTPRequest(args, headers, signal)).then((res) => {
2290
+ return buildResponse(res).then(_data => {
2291
+ return {
2292
+ exchangeRate: <ExchangeRate>(_data.exchangeRate),
2293
+ }
2294
+ })
2295
+ }, (error) => {
2296
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2297
+ })
2361
2298
  }
2362
-
2299
+
2363
2300
  memoryStore = (args: MemoryStoreArgs, headers?: object, signal?: AbortSignal): Promise<MemoryStoreReturn> => {
2364
- return this.fetch(this.url('MemoryStore'), createHTTPRequest(args, headers, signal)).then(
2365
- res => {
2366
- return buildResponse(res).then(_data => {
2367
- return {
2368
- ok: <boolean>_data.ok
2369
- }
2370
- })
2371
- },
2372
- error => {
2373
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2374
- }
2375
- )
2301
+ return this.fetch(
2302
+ this.url('MemoryStore'),
2303
+ createHTTPRequest(args, headers, signal)).then((res) => {
2304
+ return buildResponse(res).then(_data => {
2305
+ return {
2306
+ ok: <boolean>(_data.ok),
2307
+ }
2308
+ })
2309
+ }, (error) => {
2310
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2311
+ })
2376
2312
  }
2377
-
2313
+
2378
2314
  memoryLoad = (args: MemoryLoadArgs, headers?: object, signal?: AbortSignal): Promise<MemoryLoadReturn> => {
2379
- return this.fetch(this.url('MemoryLoad'), createHTTPRequest(args, headers, signal)).then(
2380
- res => {
2381
- return buildResponse(res).then(_data => {
2382
- return {
2383
- value: <string>_data.value
2384
- }
2385
- })
2386
- },
2387
- error => {
2388
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2389
- }
2390
- )
2315
+ return this.fetch(
2316
+ this.url('MemoryLoad'),
2317
+ createHTTPRequest(args, headers, signal)).then((res) => {
2318
+ return buildResponse(res).then(_data => {
2319
+ return {
2320
+ value: <string>(_data.value),
2321
+ }
2322
+ })
2323
+ }, (error) => {
2324
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2325
+ })
2391
2326
  }
2392
-
2327
+
2393
2328
  getInviteInfo = (headers?: object, signal?: AbortSignal): Promise<GetInviteInfoReturn> => {
2394
- return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers, signal)).then(
2395
- res => {
2396
- return buildResponse(res).then(_data => {
2397
- return {
2398
- inviteInfo: <InviteInfo>_data.inviteInfo
2399
- }
2400
- })
2401
- },
2402
- error => {
2403
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2404
- }
2405
- )
2329
+ return this.fetch(
2330
+ this.url('GetInviteInfo'),
2331
+ createHTTPRequest({}, headers, signal)
2332
+ ).then((res) => {
2333
+ return buildResponse(res).then(_data => {
2334
+ return {
2335
+ inviteInfo: <InviteInfo>(_data.inviteInfo),
2336
+ }
2337
+ })
2338
+ }, (error) => {
2339
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2340
+ })
2406
2341
  }
2407
-
2342
+
2408
2343
  isValidAccessCode = (args: IsValidAccessCodeArgs, headers?: object, signal?: AbortSignal): Promise<IsValidAccessCodeReturn> => {
2409
- return this.fetch(this.url('IsValidAccessCode'), createHTTPRequest(args, headers, signal)).then(
2410
- res => {
2411
- return buildResponse(res).then(_data => {
2412
- return {
2413
- status: <boolean>_data.status
2414
- }
2415
- })
2416
- },
2417
- error => {
2418
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2419
- }
2420
- )
2421
- }
2422
-
2423
- internalClaimAccessCode = (
2424
- args: InternalClaimAccessCodeArgs,
2425
- headers?: object,
2426
- signal?: AbortSignal
2427
- ): Promise<InternalClaimAccessCodeReturn> => {
2428
- return this.fetch(this.url('InternalClaimAccessCode'), createHTTPRequest(args, headers, signal)).then(
2429
- res => {
2430
- return buildResponse(res).then(_data => {
2431
- return {
2432
- status: <boolean>_data.status
2433
- }
2434
- })
2435
- },
2436
- error => {
2437
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2438
- }
2439
- )
2344
+ return this.fetch(
2345
+ this.url('IsValidAccessCode'),
2346
+ createHTTPRequest(args, headers, signal)).then((res) => {
2347
+ return buildResponse(res).then(_data => {
2348
+ return {
2349
+ status: <boolean>(_data.status),
2350
+ }
2351
+ })
2352
+ }, (error) => {
2353
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2354
+ })
2355
+ }
2356
+
2357
+ internalClaimAccessCode = (args: InternalClaimAccessCodeArgs, headers?: object, signal?: AbortSignal): Promise<InternalClaimAccessCodeReturn> => {
2358
+ return this.fetch(
2359
+ this.url('InternalClaimAccessCode'),
2360
+ createHTTPRequest(args, headers, signal)).then((res) => {
2361
+ return buildResponse(res).then(_data => {
2362
+ return {
2363
+ status: <boolean>(_data.status),
2364
+ }
2365
+ })
2366
+ }, (error) => {
2367
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2368
+ })
2440
2369
  }
2441
-
2370
+
2442
2371
  blockNumberAtTime = (args: BlockNumberAtTimeArgs, headers?: object, signal?: AbortSignal): Promise<BlockNumberAtTimeReturn> => {
2443
- return this.fetch(this.url('BlockNumberAtTime'), createHTTPRequest(args, headers, signal)).then(
2444
- res => {
2445
- return buildResponse(res).then(_data => {
2446
- return {
2447
- blocks: <Array<number>>_data.blocks
2448
- }
2449
- })
2450
- },
2451
- error => {
2452
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2453
- }
2454
- )
2455
- }
2456
-
2457
- paperSessionSecret = (
2458
- args: PaperSessionSecretArgs,
2459
- headers?: object,
2460
- signal?: AbortSignal
2461
- ): Promise<PaperSessionSecretReturn> => {
2462
- return this.fetch(this.url('PaperSessionSecret'), createHTTPRequest(args, headers, signal)).then(
2463
- res => {
2464
- return buildResponse(res).then(_data => {
2465
- return {
2466
- secret: <string>_data.secret
2467
- }
2468
- })
2469
- },
2470
- error => {
2471
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2472
- }
2473
- )
2474
- }
2475
-
2476
- paperSessionSecret2 = (
2477
- args: PaperSessionSecret2Args,
2478
- headers?: object,
2479
- signal?: AbortSignal
2480
- ): Promise<PaperSessionSecret2Return> => {
2481
- return this.fetch(this.url('PaperSessionSecret2'), createHTTPRequest(args, headers, signal)).then(
2482
- res => {
2483
- return buildResponse(res).then(_data => {
2484
- return {
2485
- secret: <string>_data.secret
2486
- }
2487
- })
2488
- },
2489
- error => {
2490
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2491
- }
2492
- )
2372
+ return this.fetch(
2373
+ this.url('BlockNumberAtTime'),
2374
+ createHTTPRequest(args, headers, signal)).then((res) => {
2375
+ return buildResponse(res).then(_data => {
2376
+ return {
2377
+ blocks: <Array<number>>(_data.blocks),
2378
+ }
2379
+ })
2380
+ }, (error) => {
2381
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2382
+ })
2383
+ }
2384
+
2385
+ paperSessionSecret = (args: PaperSessionSecretArgs, headers?: object, signal?: AbortSignal): Promise<PaperSessionSecretReturn> => {
2386
+ return this.fetch(
2387
+ this.url('PaperSessionSecret'),
2388
+ createHTTPRequest(args, headers, signal)).then((res) => {
2389
+ return buildResponse(res).then(_data => {
2390
+ return {
2391
+ secret: <string>(_data.secret),
2392
+ }
2393
+ })
2394
+ }, (error) => {
2395
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2396
+ })
2397
+ }
2398
+
2399
+ paperSessionSecret2 = (args: PaperSessionSecret2Args, headers?: object, signal?: AbortSignal): Promise<PaperSessionSecret2Return> => {
2400
+ return this.fetch(
2401
+ this.url('PaperSessionSecret2'),
2402
+ createHTTPRequest(args, headers, signal)).then((res) => {
2403
+ return buildResponse(res).then(_data => {
2404
+ return {
2405
+ secret: <string>(_data.secret),
2406
+ }
2407
+ })
2408
+ }, (error) => {
2409
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2410
+ })
2493
2411
  }
2494
-
2412
+
2495
2413
  linkWallet = (args: LinkWalletArgs, headers?: object, signal?: AbortSignal): Promise<LinkWalletReturn> => {
2496
- return this.fetch(this.url('LinkWallet'), createHTTPRequest(args, headers, signal)).then(
2497
- res => {
2498
- return buildResponse(res).then(_data => {
2499
- return {
2500
- status: <boolean>_data.status
2501
- }
2502
- })
2503
- },
2504
- error => {
2505
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2506
- }
2507
- )
2414
+ return this.fetch(
2415
+ this.url('LinkWallet'),
2416
+ createHTTPRequest(args, headers, signal)).then((res) => {
2417
+ return buildResponse(res).then(_data => {
2418
+ return {
2419
+ status: <boolean>(_data.status),
2420
+ }
2421
+ })
2422
+ }, (error) => {
2423
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2424
+ })
2508
2425
  }
2509
-
2426
+
2510
2427
  getLinkedWallets = (args: GetLinkedWalletsArgs, headers?: object, signal?: AbortSignal): Promise<GetLinkedWalletsReturn> => {
2511
- return this.fetch(this.url('GetLinkedWallets'), createHTTPRequest(args, headers, signal)).then(
2512
- res => {
2513
- return buildResponse(res).then(_data => {
2514
- return {
2515
- linkedWallets: <Array<LinkedWallet>>_data.linkedWallets
2516
- }
2517
- })
2518
- },
2519
- error => {
2520
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2521
- }
2522
- )
2523
- }
2524
-
2525
- removeLinkedWallet = (
2526
- args: RemoveLinkedWalletArgs,
2527
- headers?: object,
2528
- signal?: AbortSignal
2529
- ): Promise<RemoveLinkedWalletReturn> => {
2530
- return this.fetch(this.url('RemoveLinkedWallet'), createHTTPRequest(args, headers, signal)).then(
2531
- res => {
2532
- return buildResponse(res).then(_data => {
2533
- return {
2534
- status: <boolean>_data.status
2535
- }
2536
- })
2537
- },
2538
- error => {
2539
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2540
- }
2541
- )
2542
- }
2543
-
2544
- generateWaaSVerificationURL = (
2545
- args: GenerateWaaSVerificationURLArgs,
2546
- headers?: object,
2547
- signal?: AbortSignal
2548
- ): Promise<GenerateWaaSVerificationURLReturn> => {
2549
- return this.fetch(this.url('GenerateWaaSVerificationURL'), createHTTPRequest(args, headers, signal)).then(
2550
- res => {
2551
- return buildResponse(res).then(_data => {
2552
- return {
2553
- nonce: <string>_data.nonce,
2554
- verificationURL: <string>_data.verificationURL
2555
- }
2556
- })
2557
- },
2558
- error => {
2559
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2560
- }
2561
- )
2562
- }
2563
-
2564
- validateWaaSVerificationNonce = (
2565
- args: ValidateWaaSVerificationNonceArgs,
2566
- headers?: object,
2567
- signal?: AbortSignal
2568
- ): Promise<ValidateWaaSVerificationNonceReturn> => {
2569
- return this.fetch(this.url('ValidateWaaSVerificationNonce'), createHTTPRequest(args, headers, signal)).then(
2570
- res => {
2571
- return buildResponse(res).then(_data => {
2572
- return {
2573
- walletAddress: <string>_data.walletAddress
2574
- }
2575
- })
2576
- },
2577
- error => {
2578
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2579
- }
2580
- )
2581
- }
2582
-
2583
- listAdoptedWallets = (
2584
- args: ListAdoptedWalletsArgs,
2585
- headers?: object,
2586
- signal?: AbortSignal
2587
- ): Promise<ListAdoptedWalletsReturn> => {
2588
- return this.fetch(this.url('ListAdoptedWallets'), createHTTPRequest(args, headers, signal)).then(
2589
- res => {
2590
- return buildResponse(res).then(_data => {
2591
- return {
2592
- page: <Page>_data.page,
2593
- wallets: <Array<AdoptedChildWallet>>_data.wallets
2594
- }
2595
- })
2596
- },
2597
- error => {
2598
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2599
- }
2600
- )
2601
- }
2602
-
2603
- getSwapPermit2Price = (
2604
- args: GetSwapPermit2PriceArgs,
2605
- headers?: object,
2606
- signal?: AbortSignal
2607
- ): Promise<GetSwapPermit2PriceReturn> => {
2608
- return this.fetch(this.url('GetSwapPermit2Price'), createHTTPRequest(args, headers, signal)).then(
2609
- res => {
2610
- return buildResponse(res).then(_data => {
2611
- return {
2612
- swapPermit2Price: <SwapPermit2Price>_data.swapPermit2Price
2613
- }
2614
- })
2615
- },
2616
- error => {
2617
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2618
- }
2619
- )
2620
- }
2621
-
2622
- getSwapPermit2Prices = (
2623
- args: GetSwapPermit2PricesArgs,
2624
- headers?: object,
2625
- signal?: AbortSignal
2626
- ): Promise<GetSwapPermit2PricesReturn> => {
2627
- return this.fetch(this.url('GetSwapPermit2Prices'), createHTTPRequest(args, headers, signal)).then(
2628
- res => {
2629
- return buildResponse(res).then(_data => {
2630
- return {
2631
- swapPermit2Prices: <Array<SwapPermit2Price>>_data.swapPermit2Prices
2632
- }
2633
- })
2634
- },
2635
- error => {
2636
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2637
- }
2638
- )
2639
- }
2640
-
2641
- getSwapPermit2Quote = (
2642
- args: GetSwapPermit2QuoteArgs,
2643
- headers?: object,
2644
- signal?: AbortSignal
2645
- ): Promise<GetSwapPermit2QuoteReturn> => {
2646
- return this.fetch(this.url('GetSwapPermit2Quote'), createHTTPRequest(args, headers, signal)).then(
2647
- res => {
2648
- return buildResponse(res).then(_data => {
2649
- return {
2650
- swapPermit2Quote: <SwapPermit2Quote>_data.swapPermit2Quote
2651
- }
2652
- })
2653
- },
2654
- error => {
2655
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2656
- }
2657
- )
2658
- }
2659
-
2660
- getSwapPrice = (args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPriceReturn> => {
2661
- return this.fetch(this.url('GetSwapPrice'), createHTTPRequest(args, headers, signal)).then(
2662
- res => {
2663
- return buildResponse(res).then(_data => {
2664
- return {
2665
- swapPrice: <SwapPrice>_data.swapPrice
2666
- }
2667
- })
2668
- },
2669
- error => {
2670
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2671
- }
2672
- )
2673
- }
2674
-
2675
- getSwapPrices = (args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPricesReturn> => {
2676
- return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(
2677
- res => {
2678
- return buildResponse(res).then(_data => {
2679
- return {
2680
- swapPrices: <Array<SwapPrice>>_data.swapPrices
2681
- }
2682
- })
2683
- },
2684
- error => {
2685
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2686
- }
2687
- )
2688
- }
2689
-
2690
- getSwapQuote = (args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteReturn> => {
2691
- return this.fetch(this.url('GetSwapQuote'), createHTTPRequest(args, headers, signal)).then(
2692
- res => {
2693
- return buildResponse(res).then(_data => {
2694
- return {
2695
- swapQuote: <SwapQuote>_data.swapQuote
2696
- }
2697
- })
2698
- },
2699
- error => {
2700
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2701
- }
2702
- )
2703
- }
2704
-
2705
- getSwapQuoteV2 = (args: GetSwapQuoteV2Args, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteV2Return> => {
2706
- return this.fetch(this.url('GetSwapQuoteV2'), createHTTPRequest(args, headers, signal)).then(
2707
- res => {
2708
- return buildResponse(res).then(_data => {
2709
- return {
2710
- swapQuote: <SwapQuote>_data.swapQuote
2711
- }
2712
- })
2713
- },
2714
- error => {
2715
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2716
- }
2717
- )
2718
- }
2719
-
2720
- intentQuery = (args: IntentQueryArgs, headers?: object, signal?: AbortSignal): Promise<IntentQueryReturn> => {
2721
- return this.fetch(this.url('IntentQuery'), createHTTPRequest(args, headers, signal)).then(
2722
- res => {
2723
- return buildResponse(res).then(_data => {
2724
- return {
2725
- solutions: <Array<IntentSolution>>_data.solutions
2726
- }
2727
- })
2728
- },
2729
- error => {
2730
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2731
- }
2732
- )
2428
+ return this.fetch(
2429
+ this.url('GetLinkedWallets'),
2430
+ createHTTPRequest(args, headers, signal)).then((res) => {
2431
+ return buildResponse(res).then(_data => {
2432
+ return {
2433
+ linkedWallets: <Array<LinkedWallet>>(_data.linkedWallets),
2434
+ }
2435
+ })
2436
+ }, (error) => {
2437
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2438
+ })
2439
+ }
2440
+
2441
+ removeLinkedWallet = (args: RemoveLinkedWalletArgs, headers?: object, signal?: AbortSignal): Promise<RemoveLinkedWalletReturn> => {
2442
+ return this.fetch(
2443
+ this.url('RemoveLinkedWallet'),
2444
+ createHTTPRequest(args, headers, signal)).then((res) => {
2445
+ return buildResponse(res).then(_data => {
2446
+ return {
2447
+ status: <boolean>(_data.status),
2448
+ }
2449
+ })
2450
+ }, (error) => {
2451
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2452
+ })
2453
+ }
2454
+
2455
+ generateWaaSVerificationURL = (args: GenerateWaaSVerificationURLArgs, headers?: object, signal?: AbortSignal): Promise<GenerateWaaSVerificationURLReturn> => {
2456
+ return this.fetch(
2457
+ this.url('GenerateWaaSVerificationURL'),
2458
+ createHTTPRequest(args, headers, signal)).then((res) => {
2459
+ return buildResponse(res).then(_data => {
2460
+ return {
2461
+ nonce: <string>(_data.nonce),
2462
+ verificationURL: <string>(_data.verificationURL),
2463
+ }
2464
+ })
2465
+ }, (error) => {
2466
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2467
+ })
2468
+ }
2469
+
2470
+ validateWaaSVerificationNonce = (args: ValidateWaaSVerificationNonceArgs, headers?: object, signal?: AbortSignal): Promise<ValidateWaaSVerificationNonceReturn> => {
2471
+ return this.fetch(
2472
+ this.url('ValidateWaaSVerificationNonce'),
2473
+ createHTTPRequest(args, headers, signal)).then((res) => {
2474
+ return buildResponse(res).then(_data => {
2475
+ return {
2476
+ walletAddress: <string>(_data.walletAddress),
2477
+ }
2478
+ })
2479
+ }, (error) => {
2480
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2481
+ })
2482
+ }
2483
+
2484
+ listAdoptedWallets = (args: ListAdoptedWalletsArgs, headers?: object, signal?: AbortSignal): Promise<ListAdoptedWalletsReturn> => {
2485
+ return this.fetch(
2486
+ this.url('ListAdoptedWallets'),
2487
+ createHTTPRequest(args, headers, signal)).then((res) => {
2488
+ return buildResponse(res).then(_data => {
2489
+ return {
2490
+ page: <Page>(_data.page),
2491
+ wallets: <Array<AdoptedChildWallet>>(_data.wallets),
2492
+ }
2493
+ })
2494
+ }, (error) => {
2495
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2496
+ })
2497
+ }
2498
+
2499
+ getLifiChains = (headers?: object, signal?: AbortSignal): Promise<GetLifiChainsReturn> => {
2500
+ return this.fetch(
2501
+ this.url('GetLifiChains'),
2502
+ createHTTPRequest({}, headers, signal)
2503
+ ).then((res) => {
2504
+ return buildResponse(res).then(_data => {
2505
+ return {
2506
+ chains: <Array<number>>(_data.chains),
2507
+ }
2508
+ })
2509
+ }, (error) => {
2510
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2511
+ })
2512
+ }
2513
+
2514
+ getLifiTokens = (args: GetLifiTokensArgs, headers?: object, signal?: AbortSignal): Promise<GetLifiTokensReturn> => {
2515
+ return this.fetch(
2516
+ this.url('GetLifiTokens'),
2517
+ createHTTPRequest(args, headers, signal)).then((res) => {
2518
+ return buildResponse(res).then(_data => {
2519
+ return {
2520
+ tokens: <Array<Token>>(_data.tokens),
2521
+ }
2522
+ })
2523
+ }, (error) => {
2524
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2525
+ })
2526
+ }
2527
+
2528
+ getLifiSwapRoutes = (args: GetLifiSwapRoutesArgs, headers?: object, signal?: AbortSignal): Promise<GetLifiSwapRoutesReturn> => {
2529
+ return this.fetch(
2530
+ this.url('GetLifiSwapRoutes'),
2531
+ createHTTPRequest(args, headers, signal)).then((res) => {
2532
+ return buildResponse(res).then(_data => {
2533
+ return {
2534
+ routes: <Array<LifiSwapRoute>>(_data.routes),
2535
+ }
2536
+ })
2537
+ }, (error) => {
2538
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2539
+ })
2540
+ }
2541
+
2542
+ getLifiSwapQuote = (args: GetLifiSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetLifiSwapQuoteReturn> => {
2543
+ return this.fetch(
2544
+ this.url('GetLifiSwapQuote'),
2545
+ createHTTPRequest(args, headers, signal)).then((res) => {
2546
+ return buildResponse(res).then(_data => {
2547
+ return {
2548
+ quote: <LifiSwapQuote>(_data.quote),
2549
+ }
2550
+ })
2551
+ }, (error) => {
2552
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2553
+ })
2733
2554
  }
2734
-
2555
+
2735
2556
  listCurrencyGroups = (headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn> => {
2736
- return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(
2737
- res => {
2738
- return buildResponse(res).then(_data => {
2739
- return {
2740
- currencyGroups: <Array<CurrencyGroup>>_data.currencyGroups
2741
- }
2742
- })
2743
- },
2744
- error => {
2745
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2746
- }
2747
- )
2748
- }
2749
-
2750
- addOffchainInventory = (
2751
- args: AddOffchainInventoryArgs,
2752
- headers?: object,
2753
- signal?: AbortSignal
2754
- ): Promise<AddOffchainInventoryReturn> => {
2755
- return this.fetch(this.url('AddOffchainInventory'), createHTTPRequest(args, headers, signal)).then(
2756
- res => {
2757
- return buildResponse(res).then(_data => {
2758
- return {
2759
- inventoryId: <number>_data.inventoryId
2760
- }
2761
- })
2762
- },
2763
- error => {
2764
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2765
- }
2766
- )
2767
- }
2768
-
2769
- getOffchainInventory = (
2770
- args: GetOffchainInventoryArgs,
2771
- headers?: object,
2772
- signal?: AbortSignal
2773
- ): Promise<GetOffchainInventoryReturn> => {
2774
- return this.fetch(this.url('GetOffchainInventory'), createHTTPRequest(args, headers, signal)).then(
2775
- res => {
2776
- return buildResponse(res).then(_data => {
2777
- return {
2778
- inventory: <OffchainInventory>_data.inventory
2779
- }
2780
- })
2781
- },
2782
- error => {
2783
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2784
- }
2785
- )
2786
- }
2787
-
2788
- listOffchainInventories = (
2789
- args: ListOffchainInventoriesArgs,
2790
- headers?: object,
2791
- signal?: AbortSignal
2792
- ): Promise<ListOffchainInventoriesReturn> => {
2793
- return this.fetch(this.url('ListOffchainInventories'), createHTTPRequest(args, headers, signal)).then(
2794
- res => {
2795
- return buildResponse(res).then(_data => {
2796
- return {
2797
- inventory: <Array<OffchainInventory>>_data.inventory
2798
- }
2799
- })
2800
- },
2801
- error => {
2802
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2803
- }
2804
- )
2805
- }
2806
-
2807
- updateOffchainInventory = (
2808
- args: UpdateOffchainInventoryArgs,
2809
- headers?: object,
2810
- signal?: AbortSignal
2811
- ): Promise<UpdateOffchainInventoryReturn> => {
2812
- return this.fetch(this.url('UpdateOffchainInventory'), createHTTPRequest(args, headers, signal)).then(
2813
- res => {
2814
- return buildResponse(res).then(_data => {
2815
- return {}
2816
- })
2817
- },
2818
- error => {
2819
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2820
- }
2821
- )
2822
- }
2823
-
2824
- deleteOffchainInventory = (
2825
- args: DeleteOffchainInventoryArgs,
2826
- headers?: object,
2827
- signal?: AbortSignal
2828
- ): Promise<DeleteOffchainInventoryReturn> => {
2829
- return this.fetch(this.url('DeleteOffchainInventory'), createHTTPRequest(args, headers, signal)).then(
2830
- res => {
2831
- return buildResponse(res).then(_data => {
2832
- return {
2833
- ok: <boolean>_data.ok
2834
- }
2835
- })
2836
- },
2837
- error => {
2838
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2839
- }
2840
- )
2841
- }
2842
-
2843
- requestOffchainPayment = (
2844
- args: RequestOffchainPaymentArgs,
2845
- headers?: object,
2846
- signal?: AbortSignal
2847
- ): Promise<RequestOffchainPaymentReturn> => {
2848
- return this.fetch(this.url('RequestOffchainPayment'), createHTTPRequest(args, headers, signal)).then(
2849
- res => {
2850
- return buildResponse(res).then(_data => {
2851
- return {
2852
- payment: <PaymentResponse>_data.payment
2853
- }
2854
- })
2855
- },
2856
- error => {
2857
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2858
- }
2859
- )
2860
- }
2861
-
2862
- listOffchainPayments = (
2863
- args: ListOffchainPaymentsArgs,
2864
- headers?: object,
2865
- signal?: AbortSignal
2866
- ): Promise<ListOffchainPaymentsReturn> => {
2867
- return this.fetch(this.url('ListOffchainPayments'), createHTTPRequest(args, headers, signal)).then(
2868
- res => {
2869
- return buildResponse(res).then(_data => {
2870
- return {
2871
- page: <Page>_data.page,
2872
- payments: <Array<OffchainPayment>>_data.payments
2873
- }
2874
- })
2875
- },
2876
- error => {
2877
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2878
- }
2879
- )
2557
+ return this.fetch(
2558
+ this.url('ListCurrencyGroups'),
2559
+ createHTTPRequest({}, headers, signal)
2560
+ ).then((res) => {
2561
+ return buildResponse(res).then(_data => {
2562
+ return {
2563
+ currencyGroups: <Array<CurrencyGroup>>(_data.currencyGroups),
2564
+ }
2565
+ })
2566
+ }, (error) => {
2567
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2568
+ })
2569
+ }
2570
+
2571
+ addOffchainInventory = (args: AddOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<AddOffchainInventoryReturn> => {
2572
+ return this.fetch(
2573
+ this.url('AddOffchainInventory'),
2574
+ createHTTPRequest(args, headers, signal)).then((res) => {
2575
+ return buildResponse(res).then(_data => {
2576
+ return {
2577
+ inventoryId: <number>(_data.inventoryId),
2578
+ }
2579
+ })
2580
+ }, (error) => {
2581
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2582
+ })
2583
+ }
2584
+
2585
+ getOffchainInventory = (args: GetOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<GetOffchainInventoryReturn> => {
2586
+ return this.fetch(
2587
+ this.url('GetOffchainInventory'),
2588
+ createHTTPRequest(args, headers, signal)).then((res) => {
2589
+ return buildResponse(res).then(_data => {
2590
+ return {
2591
+ inventory: <OffchainInventory>(_data.inventory),
2592
+ }
2593
+ })
2594
+ }, (error) => {
2595
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2596
+ })
2597
+ }
2598
+
2599
+ listOffchainInventories = (args: ListOffchainInventoriesArgs, headers?: object, signal?: AbortSignal): Promise<ListOffchainInventoriesReturn> => {
2600
+ return this.fetch(
2601
+ this.url('ListOffchainInventories'),
2602
+ createHTTPRequest(args, headers, signal)).then((res) => {
2603
+ return buildResponse(res).then(_data => {
2604
+ return {
2605
+ inventory: <Array<OffchainInventory>>(_data.inventory),
2606
+ }
2607
+ })
2608
+ }, (error) => {
2609
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2610
+ })
2611
+ }
2612
+
2613
+ updateOffchainInventory = (args: UpdateOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<UpdateOffchainInventoryReturn> => {
2614
+ return this.fetch(
2615
+ this.url('UpdateOffchainInventory'),
2616
+ createHTTPRequest(args, headers, signal)).then((res) => {
2617
+ return buildResponse(res).then(_data => {
2618
+ return {}
2619
+ })
2620
+ }, (error) => {
2621
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2622
+ })
2623
+ }
2624
+
2625
+ deleteOffchainInventory = (args: DeleteOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<DeleteOffchainInventoryReturn> => {
2626
+ return this.fetch(
2627
+ this.url('DeleteOffchainInventory'),
2628
+ createHTTPRequest(args, headers, signal)).then((res) => {
2629
+ return buildResponse(res).then(_data => {
2630
+ return {
2631
+ ok: <boolean>(_data.ok),
2632
+ }
2633
+ })
2634
+ }, (error) => {
2635
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2636
+ })
2637
+ }
2638
+
2639
+ requestOffchainPayment = (args: RequestOffchainPaymentArgs, headers?: object, signal?: AbortSignal): Promise<RequestOffchainPaymentReturn> => {
2640
+ return this.fetch(
2641
+ this.url('RequestOffchainPayment'),
2642
+ createHTTPRequest(args, headers, signal)).then((res) => {
2643
+ return buildResponse(res).then(_data => {
2644
+ return {
2645
+ payment: <PaymentResponse>(_data.payment),
2646
+ }
2647
+ })
2648
+ }, (error) => {
2649
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2650
+ })
2651
+ }
2652
+
2653
+ listOffchainPayments = (args: ListOffchainPaymentsArgs, headers?: object, signal?: AbortSignal): Promise<ListOffchainPaymentsReturn> => {
2654
+ return this.fetch(
2655
+ this.url('ListOffchainPayments'),
2656
+ createHTTPRequest(args, headers, signal)).then((res) => {
2657
+ return buildResponse(res).then(_data => {
2658
+ return {
2659
+ page: <Page>(_data.page),
2660
+ payments: <Array<OffchainPayment>>(_data.payments),
2661
+ }
2662
+ })
2663
+ }, (error) => {
2664
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2665
+ })
2880
2666
  }
2881
-
2667
+
2882
2668
  savePack = (args: SavePackArgs, headers?: object, signal?: AbortSignal): Promise<SavePackReturn> => {
2883
- return this.fetch(this.url('SavePack'), createHTTPRequest(args, headers, signal)).then(
2884
- res => {
2885
- return buildResponse(res).then(_data => {
2886
- return {
2887
- merkleRoot: <string>_data.merkleRoot
2888
- }
2889
- })
2890
- },
2891
- error => {
2892
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2893
- }
2894
- )
2669
+ return this.fetch(
2670
+ this.url('SavePack'),
2671
+ createHTTPRequest(args, headers, signal)).then((res) => {
2672
+ return buildResponse(res).then(_data => {
2673
+ return {
2674
+ merkleRoot: <string>(_data.merkleRoot),
2675
+ }
2676
+ })
2677
+ }, (error) => {
2678
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2679
+ })
2895
2680
  }
2896
-
2681
+
2897
2682
  getPack = (args: GetPackArgs, headers?: object, signal?: AbortSignal): Promise<GetPackReturn> => {
2898
- return this.fetch(this.url('GetPack'), createHTTPRequest(args, headers, signal)).then(
2899
- res => {
2900
- return buildResponse(res).then(_data => {
2901
- return {
2902
- pack: <Pack>_data.pack
2903
- }
2904
- })
2905
- },
2906
- error => {
2907
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2908
- }
2909
- )
2683
+ return this.fetch(
2684
+ this.url('GetPack'),
2685
+ createHTTPRequest(args, headers, signal)).then((res) => {
2686
+ return buildResponse(res).then(_data => {
2687
+ return {
2688
+ pack: <Pack>(_data.pack),
2689
+ }
2690
+ })
2691
+ }, (error) => {
2692
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2693
+ })
2910
2694
  }
2911
-
2695
+
2912
2696
  deletePack = (args: DeletePackArgs, headers?: object, signal?: AbortSignal): Promise<DeletePackReturn> => {
2913
- return this.fetch(this.url('DeletePack'), createHTTPRequest(args, headers, signal)).then(
2914
- res => {
2915
- return buildResponse(res).then(_data => {
2916
- return {
2917
- status: <boolean>_data.status
2918
- }
2919
- })
2920
- },
2921
- error => {
2922
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2923
- }
2924
- )
2697
+ return this.fetch(
2698
+ this.url('DeletePack'),
2699
+ createHTTPRequest(args, headers, signal)).then((res) => {
2700
+ return buildResponse(res).then(_data => {
2701
+ return {
2702
+ status: <boolean>(_data.status),
2703
+ }
2704
+ })
2705
+ }, (error) => {
2706
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2707
+ })
2925
2708
  }
2926
-
2709
+
2927
2710
  updatePackContent = (args: UpdatePackContentArgs, headers?: object, signal?: AbortSignal): Promise<UpdatePackContentReturn> => {
2928
- return this.fetch(this.url('UpdatePackContent'), createHTTPRequest(args, headers, signal)).then(
2929
- res => {
2930
- return buildResponse(res).then(_data => {
2931
- return {
2932
- merkleRoot: <string>_data.merkleRoot
2933
- }
2934
- })
2935
- },
2936
- error => {
2937
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2938
- }
2939
- )
2711
+ return this.fetch(
2712
+ this.url('UpdatePackContent'),
2713
+ createHTTPRequest(args, headers, signal)).then((res) => {
2714
+ return buildResponse(res).then(_data => {
2715
+ return {
2716
+ merkleRoot: <string>(_data.merkleRoot),
2717
+ }
2718
+ })
2719
+ }, (error) => {
2720
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2721
+ })
2722
+ }
2723
+
2724
+ checkoutOptionsSecondary = (args: CheckoutOptionsSecondaryArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsSecondaryReturn> => {
2725
+ return this.fetch(
2726
+ this.url('CheckoutOptionsSecondary'),
2727
+ createHTTPRequest(args, headers, signal)).then((res) => {
2728
+ return buildResponse(res).then(_data => {
2729
+ return {
2730
+ options: <CheckoutOptions>(_data.options),
2731
+ }
2732
+ })
2733
+ }, (error) => {
2734
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2735
+ })
2736
+ }
2737
+
2738
+ checkoutOptionsGetTransakContractID = (args: CheckoutOptionsGetTransakContractIDArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsGetTransakContractIDReturn> => {
2739
+ return this.fetch(
2740
+ this.url('CheckoutOptionsGetTransakContractID'),
2741
+ createHTTPRequest(args, headers, signal)).then((res) => {
2742
+ return buildResponse(res).then(_data => {
2743
+ return {
2744
+ contractId: <string>(_data.contractId),
2745
+ }
2746
+ })
2747
+ }, (error) => {
2748
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
2749
+ })
2940
2750
  }
2751
+
2941
2752
  }
2942
2753
 
2943
- const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => {
2944
- const reqHeaders: { [key: string]: string } = { ...headers, 'Content-Type': 'application/json' }
2754
+ const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => {
2755
+ const reqHeaders: {[key: string]: string} = { ...headers, 'Content-Type': 'application/json' }
2945
2756
  reqHeaders[WebrpcHeader] = WebrpcHeaderValue
2946
2757
 
2947
2758
  return {
@@ -2957,18 +2768,18 @@ const buildResponse = (res: Response): Promise<any> => {
2957
2768
  let data
2958
2769
  try {
2959
2770
  data = JSON.parse(text)
2960
- } catch (error) {
2771
+ } catch(error) {
2961
2772
  let message = ''
2962
- if (error instanceof Error) {
2773
+ if (error instanceof Error) {
2963
2774
  message = error.message
2964
2775
  }
2965
2776
  throw WebrpcBadResponseError.new({
2966
2777
  status: res.status,
2967
- cause: `JSON.parse(): ${message}: response text: ${text}`
2968
- })
2778
+ cause: `JSON.parse(): ${message}: response text: ${text}`},
2779
+ )
2969
2780
  }
2970
2781
  if (!res.ok) {
2971
- const code: number = typeof data.code === 'number' ? data.code : 0
2782
+ const code: number = (typeof data.code === 'number') ? data.code : 0
2972
2783
  throw (webrpcErrorByCode[code] || WebrpcError).new(data)
2973
2784
  }
2974
2785
  return data
@@ -3150,6 +2961,7 @@ export class WebrpcStreamFinishedError extends WebrpcError {
3150
2961
  }
3151
2962
  }
3152
2963
 
2964
+
3153
2965
  // Schema errors
3154
2966
 
3155
2967
  export class UnauthorizedError extends WebrpcError {
@@ -3477,6 +3289,7 @@ export class UnsupportedNetworkError extends WebrpcError {
3477
3289
  }
3478
3290
  }
3479
3291
 
3292
+
3480
3293
  export enum errors {
3481
3294
  WebrpcEndpoint = 'WebrpcEndpoint',
3482
3295
  WebrpcRequestFailed = 'WebrpcRequestFailed',
@@ -3513,7 +3326,7 @@ export enum errors {
3513
3326
  Unavailable = 'Unavailable',
3514
3327
  QueryFailed = 'QueryFailed',
3515
3328
  NotFound = 'NotFound',
3516
- UnsupportedNetwork = 'UnsupportedNetwork'
3329
+ UnsupportedNetwork = 'UnsupportedNetwork',
3517
3330
  }
3518
3331
 
3519
3332
  export enum WebrpcErrorCodes {
@@ -3552,7 +3365,7 @@ export enum WebrpcErrorCodes {
3552
3365
  Unavailable = 2002,
3553
3366
  QueryFailed = 2003,
3554
3367
  NotFound = 3000,
3555
- UnsupportedNetwork = 3008
3368
+ UnsupportedNetwork = 3008,
3556
3369
  }
3557
3370
 
3558
3371
  export const webrpcErrorByCode: { [code: number]: any } = {
@@ -3591,7 +3404,8 @@ export const webrpcErrorByCode: { [code: number]: any } = {
3591
3404
  [2002]: UnavailableError,
3592
3405
  [2003]: QueryFailedError,
3593
3406
  [3000]: NotFoundError,
3594
- [3008]: UnsupportedNetworkError
3407
+ [3008]: UnsupportedNetworkError,
3595
3408
  }
3596
3409
 
3597
3410
  export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response>
3411
+