wallaby-cash 2.3.0-alpha.2 → 2.3.0

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.
Files changed (37) hide show
  1. package/README.md +69 -0
  2. package/dist/generated/api.d.ts +1369 -2674
  3. package/dist/helpers/base64.base.d.ts +12 -0
  4. package/dist/helpers/base64.d.ts +6 -0
  5. package/dist/helpers/base64.native.d.ts +6 -0
  6. package/dist/helpers/normalize-storage-keys.d.ts +8 -0
  7. package/dist/index.cjs.js +861 -543
  8. package/dist/index.cjs.js.map +1 -1
  9. package/dist/index.d.ts +6 -0
  10. package/dist/index.esm.js +861 -543
  11. package/dist/index.esm.js.map +1 -1
  12. package/dist/index.js +1022 -595
  13. package/dist/index.js.map +1 -1
  14. package/dist/lib/auth/auth.service.d.ts +1 -1
  15. package/dist/lib/auth/authenticator.d.ts +3 -3
  16. package/dist/lib/auth/authenticator.native.d.ts +36 -0
  17. package/dist/lib/auth/passkey.model.d.ts +10 -3
  18. package/dist/lib/auth/passkey.service.base.d.ts +76 -0
  19. package/dist/lib/auth/passkey.service.d.ts +1 -76
  20. package/dist/lib/auth/passkey.service.native.d.ts +4 -0
  21. package/dist/lib/index.d.ts +1 -0
  22. package/dist/lib/swap/index.d.ts +36 -0
  23. package/dist/lib/system/index.d.ts +14 -4
  24. package/dist/lib/transactions/index.d.ts +4 -2
  25. package/dist/lib/utils/constants.d.ts +1 -1
  26. package/dist/lib/wallet/wallet-data.service.d.ts +5 -3
  27. package/dist/package.json +22 -12
  28. package/dist/routes/index.d.ts +1 -0
  29. package/dist/routes/swap.d.ts +24 -0
  30. package/dist/types/auth.d.ts +152 -4
  31. package/dist/types/common.d.ts +3 -0
  32. package/dist/types/error-response-codes.d.ts +1 -0
  33. package/dist/types/index.d.ts +1 -0
  34. package/dist/types/swap.d.ts +95 -0
  35. package/dist/types/transactions.d.ts +1 -0
  36. package/dist/types/wallet.d.ts +2 -4
  37. package/package.json +22 -12
package/dist/index.esm.js CHANGED
@@ -4,6 +4,7 @@ import { AES, enc } from 'crypto-js';
4
4
  import { jwtDecode } from 'jwt-decode';
5
5
  import { omit } from 'lodash';
6
6
  import * as WebAuthn from '@simplewebauthn/browser';
7
+ import { atob, toUint8Array } from 'js-base64';
7
8
 
8
9
  /******************************************************************************
9
10
  Copyright (c) Microsoft Corporation.
@@ -362,6 +363,7 @@ var ErrorResponseCodes;
362
363
  ErrorResponseCodes["sdk_missing_parameter"] = "sdk_missing_parameter";
363
364
  ErrorResponseCodes["sdk_invalid_parameter"] = "sdk_invalid_parameter";
364
365
  ErrorResponseCodes["sdk_wrong_password"] = "sdk_wrong_password";
366
+ ErrorResponseCodes["sdk_no_valid_seed_option"] = "sdk_no_valid_seed_option";
365
367
  // passkey errors
366
368
  ErrorResponseCodes["sdk_passkey_prf_not_available"] = "sdk_passkey_prf_not_available";
367
369
  ErrorResponseCodes["sdk_passkey_challenge_unavailable"] = "sdk_passkey_challenge_unavailable";
@@ -768,14 +770,24 @@ const MASTER_ENCRYPTION_KEY = '9fa9d3f3c77c20d3a50a08e5299644be29f6e6206ef3479fe
768
770
  In particular, RS256 is necessary for compatibility with Microsoft Windows platform authenticators.
769
771
  ES256 is a widely supported algorithm and is compatible with most other platform authenticators and roaming authenticators.
770
772
  Therefore a Relying Party that uses an algorithm identifier list that omits either of those values will see registration failures when users attempt to use incompatible authenticators.
771
-
773
+
772
774
  https://chromium.googlesource.com/chromium/src/+/main/content/browser/webauth/pub_key_cred_params.md
773
775
  */
774
776
  [
775
777
  { type: 'public-key', alg: PublicKeyCredentialAlgorithm.RS256 },
776
778
  { type: 'public-key', alg: PublicKeyCredentialAlgorithm.ES256 },
777
779
  ];
778
- const currentPackageVersion = "2.3.0-alpha.1";
780
+ const isWeb = typeof window !== 'undefined' && typeof document !== 'undefined';
781
+ const currentPackageVersion = "2.3.0" ;
782
+
783
+ /**
784
+ * Storage keys adapter for Storage interface across different platforms.
785
+ *
786
+ * This sdk uses keys like "wsdk:version:key-name" but `SecureStore` doesn't allow colons in key names,
787
+ * Valid SecureStore key characters: alphanumeric, ".", "-", "_"
788
+ *
789
+ */
790
+ const normalizeKey = (key) => key.replace(/:/g, '_');
779
791
 
780
792
  const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;
781
793
 
@@ -5037,6 +5049,9 @@ class StorageService {
5037
5049
  else {
5038
5050
  storageKey = `wsdk:v2:${this.shortenedEnv}:${key}:${this.userId}`;
5039
5051
  }
5052
+ if (!isWeb) {
5053
+ storageKey = normalizeKey(storageKey);
5054
+ }
5040
5055
  const item = await this.getItem(storageKey);
5041
5056
  if (!item) {
5042
5057
  logger.debug(`(404): Item with key ${storageKey} was not found in storage.`);
@@ -5070,6 +5085,9 @@ class StorageService {
5070
5085
  else {
5071
5086
  storageKey = `wsdk:v2:${this.shortenedEnv}:${key}:${this.userId}`;
5072
5087
  }
5088
+ if (!isWeb) {
5089
+ storageKey = normalizeKey(storageKey);
5090
+ }
5073
5091
  let valueToStore;
5074
5092
  if (this._keysProtectedByMasterKey.includes(key)) {
5075
5093
  const wrappedByMasterKey = this.cipher.encryptWithMasterKey({ data: value });
@@ -5094,6 +5112,9 @@ class StorageService {
5094
5112
  else {
5095
5113
  storageKey = `wsdk:v2:${this.shortenedEnv}:${key}:${this.userId}`;
5096
5114
  }
5115
+ if (!isWeb) {
5116
+ storageKey = normalizeKey(storageKey);
5117
+ }
5097
5118
  return await this.removeItem(storageKey);
5098
5119
  }
5099
5120
  setItem(key, value) {
@@ -5591,7 +5612,7 @@ var ContentType;
5591
5612
  })(ContentType || (ContentType = {}));
5592
5613
  class HttpClient {
5593
5614
  constructor(apiConfig = {}) {
5594
- this.baseUrl = "https://staging-testnet.wallaby.cash";
5615
+ this.baseUrl = "";
5595
5616
  this.securityData = null;
5596
5617
  this.abortControllers = new Map();
5597
5618
  this.customFetch = (...fetchParams) => fetch(...fetchParams);
@@ -5724,15 +5745,31 @@ class HttpClient {
5724
5745
  }
5725
5746
  }
5726
5747
  /**
5727
- * @title STAGING
5728
- * @version 1.0
5729
- * @baseUrl https://staging-testnet.wallaby.cash
5748
+ * @title Wallaby API Service
5749
+ * @version 1.0.0
5730
5750
  * @contact
5731
5751
  *
5732
- * The STAGING is an API that manages the wallets of the Republic Crypto
5752
+ * NCW Wallets Service API Documentation
5733
5753
  */
5734
5754
  class Api {
5735
5755
  constructor(http) {
5756
+ /**
5757
+ * No description
5758
+ *
5759
+ * @name DashboardControllerGetDashboardData
5760
+ * @summary Create new merchant. This endpoint is only available for super admin and republic admin
5761
+ * @request GET:/dashboard
5762
+ * @secure
5763
+ */
5764
+ this.dashboardControllerGetDashboardData = (params = {}) => this.http.request(Object.assign({ path: `/dashboard`, method: "GET", secure: true }, params));
5765
+ /**
5766
+ * No description
5767
+ *
5768
+ * @name GetActivitiees
5769
+ * @summary Get all activities. This endpoint is only available for super admin and republic admin
5770
+ * @request GET:/users-activities
5771
+ */
5772
+ this.getActivitiees = (query, params = {}) => this.http.request(Object.assign({ path: `/users-activities`, method: "GET", query: query }, params));
5736
5773
  this.health = {
5737
5774
  /**
5738
5775
  * No description
@@ -5741,9 +5778,8 @@ class Api {
5741
5778
  * @name GetHello
5742
5779
  * @summary Health Check API
5743
5780
  * @request GET:/
5744
- * @secure
5745
5781
  */
5746
- getHello: (params = {}) => this.http.request(Object.assign({ path: `/`, method: "GET", secure: true }, params)),
5782
+ getHello: (params = {}) => this.http.request(Object.assign({ path: `/`, method: "GET" }, params)),
5747
5783
  /**
5748
5784
  * No description
5749
5785
  *
@@ -5751,9 +5787,8 @@ class Api {
5751
5787
  * @name GetHealthCheck
5752
5788
  * @summary Service API status check
5753
5789
  * @request GET:/healthz
5754
- * @secure
5755
5790
  */
5756
- getHealthCheck: (params = {}) => this.http.request(Object.assign({ path: `/healthz`, method: "GET", secure: true }, params)),
5791
+ getHealthCheck: (params = {}) => this.http.request(Object.assign({ path: `/healthz`, method: "GET" }, params)),
5757
5792
  };
5758
5793
  this.auth = {
5759
5794
  /**
@@ -5762,91 +5797,86 @@ class Api {
5762
5797
  * @tags Auth
5763
5798
  * @name GenerateExternalSignatureMessage
5764
5799
  * @summary The returned message will be used for sign up and sign in signature
5765
- * @request POST:/api/v1/auth/signature-message/external
5766
- * @secure
5800
+ * @request POST:/auth/signature-message/external
5767
5801
  */
5768
- generateExternalSignatureMessage: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/auth/signature-message/external`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
5802
+ generateExternalSignatureMessage: (data, params = {}) => this.http.request(Object.assign({ path: `/auth/signature-message/external`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
5769
5803
  /**
5770
5804
  * No description
5771
5805
  *
5772
5806
  * @tags Auth
5773
5807
  * @name GenerateSignatureMessage
5774
5808
  * @summary The returned message will be used for sign up and sign in signature
5775
- * @request POST:/api/v1/auth/signature-message
5776
- * @secure
5809
+ * @request POST:/auth/signature-message
5777
5810
  */
5778
- generateSignatureMessage: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/auth/signature-message`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
5811
+ generateSignatureMessage: (data, params = {}) => this.http.request(Object.assign({ path: `/auth/signature-message`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
5779
5812
  /**
5780
5813
  * No description
5781
5814
  *
5782
5815
  * @tags Auth
5783
5816
  * @name SignUp
5784
5817
  * @summary Users will be able to sign up by providing a signature and message. Message to sign can be retrieved from /api/auth/signature-message
5785
- * @request POST:/api/v1/auth/sign-up
5786
- * @secure
5818
+ * @request POST:/auth/sign-up
5787
5819
  */
5788
- signUp: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/auth/sign-up`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
5820
+ signUp: (data, params = {}) => this.http.request(Object.assign({ path: `/auth/sign-up`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
5789
5821
  /**
5790
5822
  * No description
5791
5823
  *
5792
5824
  * @tags Auth
5793
5825
  * @name SignUpExternal
5794
5826
  * @summary Users will be able to sign up by providing a signature and message. Message to sign can be retrieved from /api/auth/signature-message
5795
- * @request POST:/api/v1/auth/sign-up/external
5796
- * @secure
5827
+ * @request POST:/auth/sign-up/external
5797
5828
  */
5798
- signUpExternal: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/auth/sign-up/external`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
5829
+ signUpExternal: (data, params = {}) => this.http.request(Object.assign({ path: `/auth/sign-up/external`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
5799
5830
  /**
5800
5831
  * No description
5801
5832
  *
5802
5833
  * @tags Auth
5803
5834
  * @name SignIn
5804
5835
  * @summary Users will be able to sign up by providing a signature and message. Use the same pair keys used on sign up
5805
- * @request POST:/api/v1/auth/sign-in
5806
- * @secure
5836
+ * @request POST:/auth/sign-in
5807
5837
  */
5808
- signIn: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/auth/sign-in`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
5838
+ signIn: (data, params = {}) => this.http.request(Object.assign({ path: `/auth/sign-in`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
5809
5839
  /**
5810
5840
  * No description
5811
5841
  *
5812
5842
  * @tags Auth
5813
5843
  * @name RefreshAccessToken
5814
5844
  * @summary Users will be able to sign up by providing a signature and message. Use the same pair keys used on sign up
5815
- * @request POST:/api/v1/auth/refresh-access-token
5845
+ * @request POST:/auth/refresh-access-token
5816
5846
  * @deprecated
5817
5847
  * @secure
5818
5848
  */
5819
- refreshAccessToken: (params = {}) => this.http.request(Object.assign({ path: `/api/v1/auth/refresh-access-token`, method: "POST", secure: true, format: "json" }, params)),
5849
+ refreshAccessToken: (params = {}) => this.http.request(Object.assign({ path: `/auth/refresh-access-token`, method: "POST", secure: true, format: "json" }, params)),
5820
5850
  /**
5821
5851
  * No description
5822
5852
  *
5823
5853
  * @tags Auth
5824
5854
  * @name ChangeAuthPublicKey
5825
5855
  * @summary Change user authentication public key
5826
- * @request PUT:/api/v1/auth/client-auth-pubkey
5856
+ * @request PUT:/auth/client-auth-pubkey
5827
5857
  * @secure
5828
5858
  */
5829
- changeAuthPublicKey: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/auth/client-auth-pubkey`, method: "PUT", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
5859
+ changeAuthPublicKey: (data, params = {}) => this.http.request(Object.assign({ path: `/auth/client-auth-pubkey`, method: "PUT", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
5830
5860
  /**
5831
5861
  * No description
5832
5862
  *
5833
5863
  * @tags Auth
5834
5864
  * @name GetWallabyAuthPubKey
5835
5865
  * @summary Get user public key
5836
- * @request POST:/api/v1/auth/wallaby-auth-pubkey
5866
+ * @request POST:/auth/wallaby-auth-pubkey
5837
5867
  * @secure
5838
5868
  */
5839
- getWallabyAuthPubKey: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/auth/wallaby-auth-pubkey`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
5869
+ getWallabyAuthPubKey: (data, params = {}) => this.http.request(Object.assign({ path: `/auth/wallaby-auth-pubkey`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
5840
5870
  /**
5841
5871
  * No description
5842
5872
  *
5843
5873
  * @tags Auth
5844
5874
  * @name GetPasskeyCredentials
5845
5875
  * @summary Get user passkey credentials
5846
- * @request GET:/api/v1/auth/passkey-credentials
5876
+ * @request GET:/auth/passkey-credentials
5847
5877
  * @secure
5848
5878
  */
5849
- getPasskeyCredentials: (params = {}) => this.http.request(Object.assign({ path: `/api/v1/auth/passkey-credentials`, method: "GET", secure: true, format: "json" }, params)),
5879
+ getPasskeyCredentials: (params = {}) => this.http.request(Object.assign({ path: `/auth/passkey-credentials`, method: "GET", secure: true, format: "json" }, params)),
5850
5880
  };
5851
5881
  this.chains = {
5852
5882
  /**
@@ -5855,33 +5885,31 @@ class Api {
5855
5885
  * @tags Chains
5856
5886
  * @name GetAllChains
5857
5887
  * @summary Get all supported chains
5858
- * @request GET:/api/v1/chains
5888
+ * @request GET:/chains
5859
5889
  * @secure
5860
5890
  */
5861
- getAllChains: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/chains`, method: "GET", query: query, secure: true, format: "json" }, params)),
5891
+ getAllChains: (query, params = {}) => this.http.request(Object.assign({ path: `/chains`, method: "GET", query: query, secure: true, format: "json" }, params)),
5862
5892
  /**
5863
5893
  * No description
5864
5894
  *
5865
5895
  * @tags Chains
5866
5896
  * @name CreateChain
5867
5897
  * @summary Create new chain. This endpoint is only available for super admin and republic admin
5868
- * @request POST:/api/v1/chains
5869
- * @secure
5898
+ * @request POST:/chains
5870
5899
  */
5871
- createChain: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/chains`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
5900
+ createChain: (data, params = {}) => this.http.request(Object.assign({ path: `/chains`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
5872
5901
  /**
5873
5902
  * No description
5874
5903
  *
5875
5904
  * @tags Chains
5876
5905
  * @name UpdateChain
5877
5906
  * @summary Update the chain public data
5878
- * @request PUT:/api/v1/chains/{chainId}
5879
- * @secure
5907
+ * @request PUT:/chains/{chainId}
5880
5908
  */
5881
5909
  updateChain: (_a, data, params) => {
5882
5910
  var { chainId } = _a; __rest(_a, ["chainId"]);
5883
5911
  if (params === void 0) { params = {}; }
5884
- return this.http.request(Object.assign({ path: `/api/v1/chains/${chainId}`, method: "PUT", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
5912
+ return this.http.request(Object.assign({ path: `/chains/${chainId}`, method: "PUT", body: data, type: ContentType.Json, format: "json" }, params));
5885
5913
  },
5886
5914
  };
5887
5915
  this.assets = {
@@ -5891,33 +5919,33 @@ class Api {
5891
5919
  * @tags Assets
5892
5920
  * @name GetAssetsConfigurations
5893
5921
  * @summary Get all supported assets configuration that can be imported into a merchant or a user wallet
5894
- * @request GET:/api/v1/assets/configurations
5922
+ * @request GET:/assets/configurations
5895
5923
  * @secure
5896
5924
  */
5897
- getAssetsConfigurations: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/assets/configurations`, method: "GET", query: query, secure: true, format: "json" }, params)),
5925
+ getAssetsConfigurations: (query, params = {}) => this.http.request(Object.assign({ path: `/assets/configurations`, method: "GET", query: query, secure: true, format: "json" }, params)),
5898
5926
  /**
5899
5927
  * No description
5900
5928
  *
5901
5929
  * @tags Assets
5902
5930
  * @name CreateAssetConfig
5903
5931
  * @summary Create new asset configuration that can be imported later into a merchant or a user wallet. This endpoint is only available for super admin and republic admin
5904
- * @request POST:/api/v1/assets/configurations
5932
+ * @request POST:/assets/configurations
5905
5933
  * @secure
5906
5934
  */
5907
- createAssetConfig: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/assets/configurations`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
5935
+ createAssetConfig: (data, params = {}) => this.http.request(Object.assign({ path: `/assets/configurations`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
5908
5936
  /**
5909
5937
  * No description
5910
5938
  *
5911
5939
  * @tags Assets
5912
5940
  * @name UpdateAssetConfig
5913
5941
  * @summary Update asset configuration that can be imported later into a merchant or a user wallet. This endpoint is only available for owner, super admin and republic admin
5914
- * @request PUT:/api/v1/assets/configurations/{assetConfigId}
5942
+ * @request PUT:/assets/configurations/{assetConfigId}
5915
5943
  * @secure
5916
5944
  */
5917
5945
  updateAssetConfig: (_a, data, params) => {
5918
5946
  var { assetConfigId } = _a; __rest(_a, ["assetConfigId"]);
5919
5947
  if (params === void 0) { params = {}; }
5920
- return this.http.request(Object.assign({ path: `/api/v1/assets/configurations/${assetConfigId}`, method: "PUT", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
5948
+ return this.http.request(Object.assign({ path: `/assets/configurations/${assetConfigId}`, method: "PUT", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
5921
5949
  },
5922
5950
  /**
5923
5951
  * No description
@@ -5925,13 +5953,13 @@ class Api {
5925
5953
  * @tags Assets
5926
5954
  * @name VerifyAsset
5927
5955
  * @summary Verify asset configuration details.
5928
- * @request POST:/api/v1/assets/configurations/{assetConfigId}/verify
5956
+ * @request POST:/assets/configurations/{assetConfigId}/verify
5929
5957
  * @secure
5930
5958
  */
5931
5959
  verifyAsset: (_a, params) => {
5932
5960
  var { assetConfigId } = _a; __rest(_a, ["assetConfigId"]);
5933
5961
  if (params === void 0) { params = {}; }
5934
- return this.http.request(Object.assign({ path: `/api/v1/assets/configurations/${assetConfigId}/verify`, method: "POST", secure: true, format: "json" }, params));
5962
+ return this.http.request(Object.assign({ path: `/assets/configurations/${assetConfigId}/verify`, method: "POST", secure: true, format: "json" }, params));
5935
5963
  },
5936
5964
  /**
5937
5965
  * No description
@@ -5939,13 +5967,13 @@ class Api {
5939
5967
  * @tags Assets
5940
5968
  * @name UnverifyAsset
5941
5969
  * @summary Unverify asset configuration
5942
- * @request DELETE:/api/v1/assets/configurations/{assetConfigId}/unverify
5970
+ * @request DELETE:/assets/configurations/{assetConfigId}/unverify
5943
5971
  * @secure
5944
5972
  */
5945
5973
  unverifyAsset: (_a, params) => {
5946
5974
  var { assetConfigId } = _a; __rest(_a, ["assetConfigId"]);
5947
5975
  if (params === void 0) { params = {}; }
5948
- return this.http.request(Object.assign({ path: `/api/v1/assets/configurations/${assetConfigId}/unverify`, method: "DELETE", secure: true, format: "json" }, params));
5976
+ return this.http.request(Object.assign({ path: `/assets/configurations/${assetConfigId}/unverify`, method: "DELETE", secure: true, format: "json" }, params));
5949
5977
  },
5950
5978
  /**
5951
5979
  * No description
@@ -5953,13 +5981,13 @@ class Api {
5953
5981
  * @tags Assets
5954
5982
  * @name ArchiveAsset
5955
5983
  * @summary Archive an asset configuration
5956
- * @request POST:/api/v1/assets/configurations/{assetConfigId}/archive
5984
+ * @request POST:/assets/configurations/{assetConfigId}/archive
5957
5985
  * @secure
5958
5986
  */
5959
5987
  archiveAsset: (_a, params) => {
5960
5988
  var { assetConfigId } = _a; __rest(_a, ["assetConfigId"]);
5961
5989
  if (params === void 0) { params = {}; }
5962
- return this.http.request(Object.assign({ path: `/api/v1/assets/configurations/${assetConfigId}/archive`, method: "POST", secure: true, format: "json" }, params));
5990
+ return this.http.request(Object.assign({ path: `/assets/configurations/${assetConfigId}/archive`, method: "POST", secure: true, format: "json" }, params));
5963
5991
  },
5964
5992
  /**
5965
5993
  * No description
@@ -5967,13 +5995,13 @@ class Api {
5967
5995
  * @tags Assets
5968
5996
  * @name UnarchiveAsset
5969
5997
  * @summary Archive an asset configuration
5970
- * @request POST:/api/v1/assets/configurations/{assetConfigId}/unarchive
5998
+ * @request POST:/assets/configurations/{assetConfigId}/unarchive
5971
5999
  * @secure
5972
6000
  */
5973
6001
  unarchiveAsset: (_a, params) => {
5974
6002
  var { assetConfigId } = _a; __rest(_a, ["assetConfigId"]);
5975
6003
  if (params === void 0) { params = {}; }
5976
- return this.http.request(Object.assign({ path: `/api/v1/assets/configurations/${assetConfigId}/unarchive`, method: "POST", secure: true, format: "json" }, params));
6004
+ return this.http.request(Object.assign({ path: `/assets/configurations/${assetConfigId}/unarchive`, method: "POST", secure: true, format: "json" }, params));
5977
6005
  },
5978
6006
  };
5979
6007
  this.merchants = {
@@ -5983,33 +6011,32 @@ class Api {
5983
6011
  * @tags Merchants
5984
6012
  * @name GetAllMerchants
5985
6013
  * @summary Get all merchants
5986
- * @request GET:/api/v1/merchants
5987
- * @secure
6014
+ * @request GET:/merchants
5988
6015
  */
5989
- getAllMerchants: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/merchants`, method: "GET", query: query, secure: true, format: "json" }, params)),
6016
+ getAllMerchants: (query, params = {}) => this.http.request(Object.assign({ path: `/merchants`, method: "GET", query: query, format: "json" }, params)),
5990
6017
  /**
5991
6018
  * No description
5992
6019
  *
5993
6020
  * @tags Merchants
5994
6021
  * @name CreateMerchant
5995
6022
  * @summary Create new merchant. This endpoint is only available for super admin and republic admin
5996
- * @request POST:/api/v1/merchants
6023
+ * @request POST:/merchants
5997
6024
  * @secure
5998
6025
  */
5999
- createMerchant: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/merchants`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6026
+ createMerchant: (data, params = {}) => this.http.request(Object.assign({ path: `/merchants`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6000
6027
  /**
6001
6028
  * No description
6002
6029
  *
6003
6030
  * @tags Merchants
6004
6031
  * @name UpdateMerchant
6005
6032
  * @summary Update merchant. This endpoint is only available for super admin and republic admin
6006
- * @request PUT:/api/v1/merchants/{merchantId}
6033
+ * @request PUT:/merchants/{merchantId}
6007
6034
  * @secure
6008
6035
  */
6009
6036
  updateMerchant: (_a, data, params) => {
6010
6037
  var { merchantId } = _a; __rest(_a, ["merchantId"]);
6011
6038
  if (params === void 0) { params = {}; }
6012
- return this.http.request(Object.assign({ path: `/api/v1/merchants/${merchantId}`, method: "PUT", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
6039
+ return this.http.request(Object.assign({ path: `/merchants/${merchantId}`, method: "PUT", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
6013
6040
  },
6014
6041
  /**
6015
6042
  * No description
@@ -6017,13 +6044,12 @@ class Api {
6017
6044
  * @tags Merchants
6018
6045
  * @name GetOneMerchant
6019
6046
  * @summary Get one merchant by id with counts
6020
- * @request GET:/api/v1/merchants/{merchantId}
6021
- * @secure
6047
+ * @request GET:/merchants/{merchantId}
6022
6048
  */
6023
6049
  getOneMerchant: (_a, params) => {
6024
6050
  var { merchantId } = _a; __rest(_a, ["merchantId"]);
6025
6051
  if (params === void 0) { params = {}; }
6026
- return this.http.request(Object.assign({ path: `/api/v1/merchants/${merchantId}`, method: "GET", secure: true, format: "json" }, params));
6052
+ return this.http.request(Object.assign({ path: `/merchants/${merchantId}`, method: "GET", format: "json" }, params));
6027
6053
  },
6028
6054
  /**
6029
6055
  * No description
@@ -6031,13 +6057,12 @@ class Api {
6031
6057
  * @tags Merchants
6032
6058
  * @name GetMerchantAssets
6033
6059
  * @summary Get merchant assets by merchant id
6034
- * @request GET:/api/v1/merchants/{merchantId}/assets
6035
- * @secure
6060
+ * @request GET:/merchants/{merchantId}/assets
6036
6061
  */
6037
6062
  getMerchantAssets: (_a, params) => {
6038
6063
  var { merchantId } = _a, query = __rest(_a, ["merchantId"]);
6039
6064
  if (params === void 0) { params = {}; }
6040
- return this.http.request(Object.assign({ path: `/api/v1/merchants/${merchantId}/assets`, method: "GET", query: query, secure: true, format: "json" }, params));
6065
+ return this.http.request(Object.assign({ path: `/merchants/${merchantId}/assets`, method: "GET", query: query, format: "json" }, params));
6041
6066
  },
6042
6067
  /**
6043
6068
  * No description
@@ -6045,13 +6070,13 @@ class Api {
6045
6070
  * @tags Merchants
6046
6071
  * @name GetMerchantUsers
6047
6072
  * @summary Get merchant users by merchant id
6048
- * @request GET:/api/v1/merchants/{merchantId}/users
6073
+ * @request GET:/merchants/{merchantId}/users
6049
6074
  * @secure
6050
6075
  */
6051
6076
  getMerchantUsers: (_a, params) => {
6052
6077
  var { merchantId } = _a, query = __rest(_a, ["merchantId"]);
6053
6078
  if (params === void 0) { params = {}; }
6054
- return this.http.request(Object.assign({ path: `/api/v1/merchants/${merchantId}/users`, method: "GET", query: query, secure: true, format: "json" }, params));
6079
+ return this.http.request(Object.assign({ path: `/merchants/${merchantId}/users`, method: "GET", query: query, secure: true, format: "json" }, params));
6055
6080
  },
6056
6081
  /**
6057
6082
  * No description
@@ -6059,13 +6084,13 @@ class Api {
6059
6084
  * @tags Merchants
6060
6085
  * @name GetMerchantAdmins
6061
6086
  * @summary Get merchant admins by merchant id
6062
- * @request GET:/api/v1/merchants/{merchantId}/admins
6087
+ * @request GET:/merchants/{merchantId}/admins
6063
6088
  * @secure
6064
6089
  */
6065
6090
  getMerchantAdmins: (_a, params) => {
6066
6091
  var { merchantId } = _a, query = __rest(_a, ["merchantId"]);
6067
6092
  if (params === void 0) { params = {}; }
6068
- return this.http.request(Object.assign({ path: `/api/v1/merchants/${merchantId}/admins`, method: "GET", query: query, secure: true, format: "json" }, params));
6093
+ return this.http.request(Object.assign({ path: `/merchants/${merchantId}/admins`, method: "GET", query: query, secure: true, format: "json" }, params));
6069
6094
  },
6070
6095
  /**
6071
6096
  * No description
@@ -6073,23 +6098,23 @@ class Api {
6073
6098
  * @tags Merchants
6074
6099
  * @name InviteMerchantAdmins
6075
6100
  * @summary Invite merchant admins by merchant id
6076
- * @request POST:/api/v1/merchants/admins/invite
6101
+ * @request POST:/merchants/admins/invite
6077
6102
  * @secure
6078
6103
  */
6079
- inviteMerchantAdmins: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/merchants/admins/invite`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6104
+ inviteMerchantAdmins: (data, params = {}) => this.http.request(Object.assign({ path: `/merchants/admins/invite`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6080
6105
  /**
6081
6106
  * No description
6082
6107
  *
6083
6108
  * @tags Merchants
6084
6109
  * @name RevokeMerchantAdmins
6085
6110
  * @summary Invite merchant admins by merchant id
6086
- * @request DELETE:/api/v1/merchants/{merchantId}/admins/{userId}
6111
+ * @request DELETE:/merchants/{merchantId}/admins/{userId}
6087
6112
  * @secure
6088
6113
  */
6089
6114
  revokeMerchantAdmins: (_a, params) => {
6090
6115
  var { merchantId, userId } = _a; __rest(_a, ["merchantId", "userId"]);
6091
6116
  if (params === void 0) { params = {}; }
6092
- return this.http.request(Object.assign({ path: `/api/v1/merchants/${merchantId}/admins/${userId}`, method: "DELETE", secure: true, format: "json" }, params));
6117
+ return this.http.request(Object.assign({ path: `/merchants/${merchantId}/admins/${userId}`, method: "DELETE", secure: true, format: "json" }, params));
6093
6118
  },
6094
6119
  /**
6095
6120
  * No description
@@ -6097,13 +6122,13 @@ class Api {
6097
6122
  * @tags Merchants
6098
6123
  * @name GetMerchantWallets
6099
6124
  * @summary Get merchant wallets by merchant id
6100
- * @request GET:/api/v1/merchants/{merchantId}/wallets
6125
+ * @request GET:/merchants/{merchantId}/wallets
6101
6126
  * @secure
6102
6127
  */
6103
6128
  getMerchantWallets: (_a, params) => {
6104
6129
  var { merchantId } = _a, query = __rest(_a, ["merchantId"]);
6105
6130
  if (params === void 0) { params = {}; }
6106
- return this.http.request(Object.assign({ path: `/api/v1/merchants/${merchantId}/wallets`, method: "GET", query: query, secure: true, format: "json" }, params));
6131
+ return this.http.request(Object.assign({ path: `/merchants/${merchantId}/wallets`, method: "GET", query: query, secure: true, format: "json" }, params));
6107
6132
  },
6108
6133
  /**
6109
6134
  * No description
@@ -6111,70 +6136,70 @@ class Api {
6111
6136
  * @tags Merchants
6112
6137
  * @name AddMerchantWalletAssets
6113
6138
  * @summary Add assets to merchant wallets by merchant id
6114
- * @request POST:/api/v1/merchants/wallets/add-assets
6139
+ * @request POST:/merchants/wallets/add-assets
6115
6140
  * @secure
6116
6141
  */
6117
- addMerchantWalletAssets: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/merchants/wallets/add-assets`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6142
+ addMerchantWalletAssets: (data, params = {}) => this.http.request(Object.assign({ path: `/merchants/wallets/add-assets`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6118
6143
  /**
6119
6144
  * No description
6120
6145
  *
6121
6146
  * @tags Merchants
6122
6147
  * @name AddNewAsset
6123
6148
  * @summary Add new asset to merchant based on the asset configuration
6124
- * @request POST:/api/v1/merchants/assets/add
6149
+ * @request POST:/merchants/assets/add
6125
6150
  * @secure
6126
6151
  */
6127
- addNewAsset: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/merchants/assets/add`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6152
+ addNewAsset: (data, params = {}) => this.http.request(Object.assign({ path: `/merchants/assets/add`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6128
6153
  /**
6129
6154
  * No description
6130
6155
  *
6131
6156
  * @tags Merchants
6132
6157
  * @name RemoveAsset
6133
6158
  * @summary Remove asset from merchant based on the asset configuration
6134
- * @request DELETE:/api/v1/merchants/assets/delete
6159
+ * @request DELETE:/merchants/assets/delete
6135
6160
  * @secure
6136
6161
  */
6137
- removeAsset: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/merchants/assets/delete`, method: "DELETE", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6162
+ removeAsset: (data, params = {}) => this.http.request(Object.assign({ path: `/merchants/assets/delete`, method: "DELETE", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6138
6163
  /**
6139
6164
  * No description
6140
6165
  *
6141
6166
  * @tags Merchants
6142
6167
  * @name ShowMerchantAssetToWalletHolders
6143
6168
  * @summary Show merchant asset to wallet holders based on the asset configuration
6144
- * @request POST:/api/v1/merchants/assets/update-visibility
6169
+ * @request POST:/merchants/assets/update-visibility
6145
6170
  * @secure
6146
6171
  */
6147
- showMerchantAssetToWalletHolders: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/merchants/assets/update-visibility`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6172
+ showMerchantAssetToWalletHolders: (data, params = {}) => this.http.request(Object.assign({ path: `/merchants/assets/update-visibility`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6148
6173
  /**
6149
6174
  * No description
6150
6175
  *
6151
6176
  * @tags Merchants
6152
6177
  * @name ChangeMerchantAssetDefaultStatus
6153
6178
  * @summary Change merchant asset default status
6154
- * @request POST:/api/v1/merchants/assets/update-default-status
6179
+ * @request POST:/merchants/assets/update-default-status
6155
6180
  * @secure
6156
6181
  */
6157
- changeMerchantAssetDefaultStatus: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/merchants/assets/update-default-status`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6182
+ changeMerchantAssetDefaultStatus: (data, params = {}) => this.http.request(Object.assign({ path: `/merchants/assets/update-default-status`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6158
6183
  /**
6159
6184
  * No description
6160
6185
  *
6161
6186
  * @tags Merchants
6162
6187
  * @name CreateApiKey
6163
6188
  * @summary Create new API Key
6164
- * @request POST:/api/v1/merchants/api-keys/new
6189
+ * @request POST:/merchants/api-keys/new
6165
6190
  * @secure
6166
6191
  */
6167
- createApiKey: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/merchants/api-keys/new`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6192
+ createApiKey: (data, params = {}) => this.http.request(Object.assign({ path: `/merchants/api-keys/new`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6168
6193
  /**
6169
6194
  * No description
6170
6195
  *
6171
6196
  * @tags Merchants
6172
6197
  * @name WhitelistApiKeyOrigins
6173
6198
  * @summary Whitelist API Key's origins
6174
- * @request POST:/api/v1/merchants/api-keys/whitelist-origins
6199
+ * @request POST:/merchants/api-keys/whitelist-origins
6175
6200
  * @secure
6176
6201
  */
6177
- whitelistApiKeyOrigins: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/merchants/api-keys/whitelist-origins`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6202
+ whitelistApiKeyOrigins: (data, params = {}) => this.http.request(Object.assign({ path: `/merchants/api-keys/whitelist-origins`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6178
6203
  };
6179
6204
  this.wallets = {
6180
6205
  /**
@@ -6183,133 +6208,133 @@ class Api {
6183
6208
  * @tags Wallets
6184
6209
  * @name GetAllUsers
6185
6210
  * @summary Get all wallets by the admin
6186
- * @request GET:/api/v1/wallets
6211
+ * @request GET:/wallets
6187
6212
  * @secure
6188
6213
  */
6189
- getAllUsers: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets`, method: "GET", query: query, secure: true, format: "json" }, params)),
6214
+ getAllUsers: (query, params = {}) => this.http.request(Object.assign({ path: `/wallets`, method: "GET", query: query, secure: true, format: "json" }, params)),
6190
6215
  /**
6191
6216
  * No description
6192
6217
  *
6193
6218
  * @tags Wallets
6194
6219
  * @name CreateWallet
6195
6220
  * @summary Create a newly fresh wallet, returns asset list and encrypted seed
6196
- * @request POST:/api/v1/wallets/create
6221
+ * @request POST:/wallets/create
6197
6222
  * @secure
6198
6223
  */
6199
- createWallet: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/create`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6224
+ createWallet: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/create`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6200
6225
  /**
6201
6226
  * No description
6202
6227
  *
6203
6228
  * @tags Wallets
6204
6229
  * @name VerifyAccess
6205
6230
  * @summary Verify that the user still has the ability to transact with the wallet
6206
- * @request POST:/api/v1/wallets/verify-access
6231
+ * @request POST:/wallets/verify-access
6207
6232
  * @secure
6208
6233
  */
6209
- verifyAccess: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/verify-access`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6234
+ verifyAccess: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/verify-access`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6210
6235
  /**
6211
6236
  * No description
6212
6237
  *
6213
6238
  * @tags Wallets
6214
6239
  * @name CreateAdminWallet
6215
6240
  * @summary Create a server side admin wallet where encryptedSeed will be opaque to the caller
6216
- * @request POST:/api/v1/wallets/create-admin-server-wallet
6241
+ * @request POST:/wallets/create-admin-server-wallet
6217
6242
  * @secure
6218
6243
  */
6219
- createAdminWallet: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/create-admin-server-wallet`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6244
+ createAdminWallet: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/create-admin-server-wallet`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6220
6245
  /**
6221
6246
  * No description
6222
6247
  *
6223
6248
  * @tags Wallets, MPC
6224
6249
  * @name CreateWalletV2
6225
6250
  * @summary Create a newly fresh wallet, returns asset list and encrypted seed, shares, or both
6226
- * @request POST:/api/v1/wallets/create-with-shares
6251
+ * @request POST:/wallets/create-with-shares
6227
6252
  * @secure
6228
6253
  */
6229
- createWalletV2: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/create-with-shares`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6254
+ createWalletV2: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/create-with-shares`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6230
6255
  /**
6231
6256
  * No description
6232
6257
  *
6233
6258
  * @tags Wallets, MPC
6234
6259
  * @name ImportWalletSeedPhraseV2
6235
6260
  * @summary Import an existing wallet seed phrase into wallaby system directly
6236
- * @request POST:/api/v1/wallets/create-shares-based-wallet-from-seed
6261
+ * @request POST:/wallets/create-shares-based-wallet-from-seed
6237
6262
  * @secure
6238
6263
  */
6239
- importWalletSeedPhraseV2: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/create-shares-based-wallet-from-seed`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6264
+ importWalletSeedPhraseV2: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/create-shares-based-wallet-from-seed`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6240
6265
  /**
6241
6266
  * No description
6242
6267
  *
6243
6268
  * @tags Wallets, MPC
6244
6269
  * @name RetrieveShares
6245
6270
  * @summary Retrieve shares which belong to the user on a specified wallet
6246
- * @request POST:/api/v1/wallets/retrieve-shares
6271
+ * @request POST:/wallets/retrieve-shares
6247
6272
  * @secure
6248
6273
  */
6249
- retrieveShares: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/retrieve-shares`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6274
+ retrieveShares: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/retrieve-shares`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6250
6275
  /**
6251
6276
  * No description
6252
6277
  *
6253
6278
  * @tags Wallets, MPC
6254
6279
  * @name ShareWallet
6255
6280
  * @summary Share an entity wallet with another user
6256
- * @request POST:/api/v1/wallets/initiate-share-wallet
6281
+ * @request POST:/wallets/initiate-share-wallet
6257
6282
  * @secure
6258
6283
  */
6259
- shareWallet: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/initiate-share-wallet`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6284
+ shareWallet: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/initiate-share-wallet`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6260
6285
  /**
6261
6286
  * No description
6262
6287
  *
6263
6288
  * @tags Wallets, MPC
6264
6289
  * @name UnshareWallet
6265
6290
  * @summary Unshare an entity wallet with a user previously granted access
6266
- * @request POST:/api/v1/wallets/unshare-wallet
6291
+ * @request POST:/wallets/unshare-wallet
6267
6292
  * @secure
6268
6293
  */
6269
- unshareWallet: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/unshare-wallet`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6294
+ unshareWallet: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/unshare-wallet`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6270
6295
  /**
6271
6296
  * No description
6272
6297
  *
6273
6298
  * @tags Wallets
6274
6299
  * @name AddNewDevice
6275
6300
  * @summary This endpoint will be called by the new device after it receives a Wallaby wrapped share
6276
- * @request POST:/api/v1/wallets/add-new-device
6301
+ * @request POST:/wallets/add-new-device
6277
6302
  * @secure
6278
6303
  */
6279
- addNewDevice: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/add-new-device`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6304
+ addNewDevice: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/add-new-device`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6280
6305
  /**
6281
6306
  * No description
6282
6307
  *
6283
6308
  * @tags Wallets
6284
6309
  * @name ImportWalletSeedPhrase
6285
6310
  * @summary Import an existing wallet seed phrase into wallaby system directly
6286
- * @request POST:/api/v1/wallets/import-seed-phrase
6311
+ * @request POST:/wallets/import-seed-phrase
6287
6312
  * @secure
6288
6313
  */
6289
- importWalletSeedPhrase: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/import-seed-phrase`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6314
+ importWalletSeedPhrase: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/import-seed-phrase`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6290
6315
  /**
6291
6316
  * No description
6292
6317
  *
6293
6318
  * @tags Wallets
6294
6319
  * @name GenerateMissingAddresses
6295
6320
  * @summary Generates missing wallet addresses for a user's wallet
6296
- * @request POST:/api/v1/wallets/generate-wallet-addresses
6321
+ * @request POST:/wallets/generate-wallet-addresses
6297
6322
  * @secure
6298
6323
  */
6299
- generateMissingAddresses: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/generate-wallet-addresses`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6324
+ generateMissingAddresses: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/generate-wallet-addresses`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6300
6325
  /**
6301
6326
  * No description
6302
6327
  *
6303
6328
  * @tags Wallets
6304
6329
  * @name GetUserAssetsByWalletId
6305
6330
  * @summary Get all assets that exist in a certain wallet, by specifying a wallet ID
6306
- * @request GET:/api/v1/wallets/{walletId}/assets
6331
+ * @request GET:/wallets/{walletId}/assets
6307
6332
  * @secure
6308
6333
  */
6309
6334
  getUserAssetsByWalletId: (_a, params) => {
6310
6335
  var { walletId } = _a, query = __rest(_a, ["walletId"]);
6311
6336
  if (params === void 0) { params = {}; }
6312
- return this.http.request(Object.assign({ path: `/api/v1/wallets/${walletId}/assets`, method: "GET", query: query, secure: true, format: "json" }, params));
6337
+ return this.http.request(Object.assign({ path: `/wallets/${walletId}/assets`, method: "GET", query: query, secure: true, format: "json" }, params));
6313
6338
  },
6314
6339
  /**
6315
6340
  * No description
@@ -6317,277 +6342,443 @@ class Api {
6317
6342
  * @tags Wallets
6318
6343
  * @name GetUserAsset
6319
6344
  * @summary Get one asset from a user's wallet
6320
- * @request GET:/api/v1/wallets/asset
6345
+ * @request GET:/wallets/asset
6321
6346
  * @secure
6322
6347
  */
6323
- getUserAsset: (query, data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/asset`, method: "GET", query: query, body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6348
+ getUserAsset: (query, data, params = {}) => this.http.request(Object.assign({ path: `/wallets/asset`, method: "GET", query: query, body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6324
6349
  /**
6325
6350
  * No description
6326
6351
  *
6327
6352
  * @tags Wallets
6328
6353
  * @name UpdateUserAsset
6329
6354
  * @summary Update a specific asset in a wallet
6330
- * @request PUT:/api/v1/wallets/asset/update
6355
+ * @request PUT:/wallets/asset/update
6331
6356
  * @secure
6332
6357
  */
6333
- updateUserAsset: (query, data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/asset/update`, method: "PUT", query: query, body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6358
+ updateUserAsset: (query, data, params = {}) => this.http.request(Object.assign({ path: `/wallets/asset/update`, method: "PUT", query: query, body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6334
6359
  /**
6335
6360
  * No description
6336
6361
  *
6337
6362
  * @tags Wallets, Multisig
6338
6363
  * @name CreateMultisigAsset
6339
6364
  * @summary Initiate creation for a new multisig asset, by specifying participants and the threshold
6340
- * @request POST:/api/v1/wallets/create-multisig-asset
6365
+ * @request POST:/wallets/create-multisig-asset
6341
6366
  * @secure
6342
6367
  */
6343
- createMultisigAsset: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/create-multisig-asset`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6368
+ createMultisigAsset: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/create-multisig-asset`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6344
6369
  /**
6345
6370
  * No description
6346
6371
  *
6347
6372
  * @tags Wallets, Recovery
6348
6373
  * @name InitiateWalletRecovery
6349
6374
  * @summary Wallet Recovery - Step 1: Initiate wallet recovery
6350
- * @request POST:/api/v1/wallets/recover/init
6375
+ * @request POST:/wallets/recover/init
6351
6376
  * @secure
6352
6377
  */
6353
- initiateWalletRecovery: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/recover/init`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6378
+ initiateWalletRecovery: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/recover/init`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6354
6379
  /**
6355
6380
  * No description
6356
6381
  *
6357
6382
  * @tags Wallets, Recovery
6358
6383
  * @name RecoverWallet
6359
6384
  * @summary Wallet Recovery - Step 2 and final: Recover the lost wallet and its assets
6360
- * @request POST:/api/v1/wallets/recover
6385
+ * @request POST:/wallets/recover
6361
6386
  * @secure
6362
6387
  */
6363
- recoverWallet: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/recover`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6388
+ recoverWallet: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/recover`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6364
6389
  /**
6365
6390
  * No description
6366
6391
  *
6367
6392
  * @tags Wallets, Algorand
6368
6393
  * @name ConvertStandardPhraseToAlgoSpecific
6369
6394
  * @summary Convert BIP39 Standard seed phrase to Algorand fixed 25 words mnemonic phrase
6370
- * @request POST:/api/v1/wallets/convert-mnemonic-seed
6395
+ * @request POST:/wallets/convert-mnemonic-seed
6396
+ * @secure
6397
+ */
6398
+ convertStandardPhraseToAlgoSpecific: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/convert-mnemonic-seed`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6399
+ };
6400
+ this.users = {
6401
+ /**
6402
+ * No description
6403
+ *
6404
+ * @tags Users
6405
+ * @name GetAllUsers
6406
+ * @summary Get all users by the admin
6407
+ * @request GET:/users
6408
+ * @secure
6409
+ */
6410
+ getAllUsers: (query, params = {}) => this.http.request(Object.assign({ path: `/users`, method: "GET", query: query, secure: true, format: "json" }, params)),
6411
+ /**
6412
+ * No description
6413
+ *
6414
+ * @tags Users
6415
+ * @name UpdateProfile
6416
+ * @summary Update user profile info
6417
+ * @request PUT:/users/profile
6418
+ * @secure
6419
+ */
6420
+ updateProfile: (data, params = {}) => this.http.request(Object.assign({ path: `/users/profile`, method: "PUT", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6421
+ /**
6422
+ * No description
6423
+ *
6424
+ * @tags Users
6425
+ * @name GetCurrentUser
6426
+ * @summary Returns current user data
6427
+ * @request GET:/users/profile
6428
+ * @secure
6429
+ */
6430
+ getCurrentUser: (params = {}) => this.http.request(Object.assign({ path: `/users/profile`, method: "GET", secure: true, format: "json" }, params)),
6431
+ /**
6432
+ * No description
6433
+ *
6434
+ * @tags Users
6435
+ * @name GetCurrentUserSalt
6436
+ * @summary Get current user's client salt
6437
+ * @request GET:/users/salt
6438
+ * @secure
6439
+ */
6440
+ getCurrentUserSalt: (params = {}) => this.http.request(Object.assign({ path: `/users/salt`, method: "GET", secure: true, format: "json" }, params)),
6441
+ /**
6442
+ * No description
6443
+ *
6444
+ * @tags Users
6445
+ * @name GetAllWalletsFromUserId
6446
+ * @summary Returns user wallets by specifying user id
6447
+ * @request GET:/users/{userId}/wallets
6448
+ * @secure
6449
+ */
6450
+ getAllWalletsFromUserId: (_a, params) => {
6451
+ var { userId } = _a; __rest(_a, ["userId"]);
6452
+ if (params === void 0) { params = {}; }
6453
+ return this.http.request(Object.assign({ path: `/users/${userId}/wallets`, method: "GET", secure: true, format: "json" }, params));
6454
+ },
6455
+ /**
6456
+ * No description
6457
+ *
6458
+ * @tags Users
6459
+ * @name GetCurrentUserMerchantAssets
6460
+ * @summary Returns user's merchant assets
6461
+ * @request GET:/users/merchants/assets
6462
+ * @secure
6463
+ */
6464
+ getCurrentUserMerchantAssets: (query, params = {}) => this.http.request(Object.assign({ path: `/users/merchants/assets`, method: "GET", query: query, secure: true, format: "json" }, params)),
6465
+ /**
6466
+ * No description
6467
+ *
6468
+ * @tags Users
6469
+ * @name GetCurrentUserMerchantAssets2
6470
+ * @summary Returns user's merchant assets
6471
+ * @request GET:/users/merchant/assets
6472
+ * @originalName getCurrentUserMerchantAssets
6473
+ * @duplicate
6474
+ * @secure
6475
+ */
6476
+ getCurrentUserMerchantAssets2: (query, params = {}) => this.http.request(Object.assign({ path: `/users/merchant/assets`, method: "GET", query: query, secure: true, format: "json" }, params)),
6477
+ /**
6478
+ * No description
6479
+ *
6480
+ * @tags Users
6481
+ * @name GetAssetsByUserId
6482
+ * @summary Returns user assets by specifying user id
6483
+ * @request GET:/users/{userId}/assets
6484
+ * @secure
6485
+ */
6486
+ getAssetsByUserId: (_a, params) => {
6487
+ var { userId } = _a, query = __rest(_a, ["userId"]);
6488
+ if (params === void 0) { params = {}; }
6489
+ return this.http.request(Object.assign({ path: `/users/${userId}/assets`, method: "GET", query: query, secure: true, format: "json" }, params));
6490
+ },
6491
+ /**
6492
+ * No description
6493
+ *
6494
+ * @tags Users
6495
+ * @name AddAssetToUser
6496
+ * @summary Add a new asset to the user's wallet based on the asset configuration
6497
+ * @request POST:/users/assets/add
6371
6498
  * @secure
6372
6499
  */
6373
- convertStandardPhraseToAlgoSpecific: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets/convert-mnemonic-seed`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6500
+ addAssetToUser: (data, params = {}) => this.http.request(Object.assign({ path: `/users/assets/add`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6374
6501
  /**
6375
6502
  * No description
6376
6503
  *
6377
- * @tags Wallets, Swaps
6378
- * @name RequestSwapQuote
6379
- * @summary Request a swap quote for exchanging assets
6380
- * @request POST:/api/v1/wallets/{walletId}/swap/quote
6504
+ * @tags Users
6505
+ * @name RemoveAssetFromUser
6506
+ * @summary Remove an asset from the user's wallet based on the asset configuration
6507
+ * @request DELETE:/users/{userId}/wallets/{walletId}/assets/{assetConfigId}
6381
6508
  * @secure
6382
6509
  */
6383
- requestSwapQuote: (_a, data, params) => {
6384
- var { walletId } = _a; __rest(_a, ["walletId"]);
6510
+ removeAssetFromUser: (_a, params) => {
6511
+ var { assetConfigId, walletId, userId } = _a; __rest(_a, ["assetConfigId", "walletId", "userId"]);
6385
6512
  if (params === void 0) { params = {}; }
6386
- return this.http.request(Object.assign({ path: `/api/v1/wallets/${walletId}/swap/quote`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
6513
+ return this.http.request(Object.assign({ path: `/users/${userId}/wallets/${walletId}/assets/${assetConfigId}`, method: "DELETE", secure: true, format: "json" }, params));
6387
6514
  },
6388
6515
  /**
6389
6516
  * No description
6390
6517
  *
6391
- * @tags Wallets, Swaps
6392
- * @name GetSwapHistory
6393
- * @summary Get swap history for a wallet
6394
- * @request GET:/api/v1/wallets/{walletId}/swaps
6518
+ * @tags Users
6519
+ * @name GetUserByUserId
6520
+ * @summary Returns user public data
6521
+ * @request GET:/users/{userId}
6395
6522
  * @secure
6396
6523
  */
6397
- getSwapHistory: (_a, params) => {
6398
- var { walletId } = _a, query = __rest(_a, ["walletId"]);
6524
+ getUserByUserId: (_a, params) => {
6525
+ var { userId } = _a; __rest(_a, ["userId"]);
6526
+ if (params === void 0) { params = {}; }
6527
+ return this.http.request(Object.assign({ path: `/users/${userId}`, method: "GET", secure: true, format: "json" }, params));
6528
+ },
6529
+ /**
6530
+ * No description
6531
+ *
6532
+ * @tags Users
6533
+ * @name GetUserByExternalUserId
6534
+ * @request GET:/users/{externalUserId}/externalUserId
6535
+ * @secure
6536
+ */
6537
+ getUserByExternalUserId: (_a, params) => {
6538
+ var { externalUserId } = _a; __rest(_a, ["externalUserId"]);
6399
6539
  if (params === void 0) { params = {}; }
6400
- return this.http.request(Object.assign({ path: `/api/v1/wallets/${walletId}/swaps`, method: "GET", query: query, secure: true, format: "json" }, params));
6540
+ return this.http.request(Object.assign({ path: `/users/${externalUserId}/externalUserId`, method: "GET", secure: true, format: "json" }, params));
6401
6541
  },
6402
6542
  /**
6403
6543
  * No description
6404
6544
  *
6405
- * @tags Wallets, Swaps
6406
- * @name GetSwapById
6407
- * @summary Get a specific swap by ID
6408
- * @request GET:/api/v1/wallets/{walletId}/swaps/{swapId}
6545
+ * @tags Users
6546
+ * @name GetParticipantsByUserId
6547
+ * @summary Returns multisig participants by user id
6548
+ * @request GET:/users/{userId}/multisig-transactions
6409
6549
  * @secure
6410
6550
  */
6411
- getSwapById: (_a, params) => {
6412
- var { walletId, swapId } = _a; __rest(_a, ["walletId", "swapId"]);
6551
+ getParticipantsByUserId: (_a, params) => {
6552
+ var { userId } = _a, query = __rest(_a, ["userId"]);
6413
6553
  if (params === void 0) { params = {}; }
6414
- return this.http.request(Object.assign({ path: `/api/v1/wallets/${walletId}/swaps/${swapId}`, method: "GET", secure: true, format: "json" }, params));
6554
+ return this.http.request(Object.assign({ path: `/users/${userId}/multisig-transactions`, method: "GET", query: query, secure: true, format: "json" }, params));
6415
6555
  },
6416
6556
  };
6417
- this.transactions = {
6557
+ this.query = {
6418
6558
  /**
6419
6559
  * No description
6420
6560
  *
6421
- * @tags Transactions
6422
- * @name GetTransactions
6423
- * @summary Get list of transactions
6424
- * @request GET:/api/v1/transactions
6561
+ * @tags Query
6562
+ * @name FetchBalance
6563
+ * @summary Fetch asset balance by specifying the asset address and the asset symbol
6564
+ * @request GET:/query/assets/balance
6425
6565
  * @secure
6426
6566
  */
6427
- getTransactions: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions`, method: "GET", query: query, secure: true, format: "json" }, params)),
6567
+ fetchBalance: (query, params = {}) => this.http.request(Object.assign({ path: `/query/assets/balance`, method: "GET", query: query, secure: true, format: "json" }, params)),
6428
6568
  /**
6429
6569
  * No description
6430
6570
  *
6431
- * @tags Transactions
6432
- * @name GetPendingTransactions
6433
- * @summary Get list of pending transactions
6434
- * @request GET:/api/v1/transactions/pending
6571
+ * @tags Query
6572
+ * @name FetchOnlyBalance
6573
+ * @summary Fetch address balance by specifying the address and the asset symbol. This API works even for external assets addresses
6574
+ * @request GET:/query/address/balance
6575
+ * @secure
6576
+ */
6577
+ fetchOnlyBalance: (query, params = {}) => this.http.request(Object.assign({ path: `/query/address/balance`, method: "GET", query: query, secure: true, format: "json" }, params)),
6578
+ /**
6579
+ * No description
6580
+ *
6581
+ * @tags Query
6582
+ * @name FetchBulkBalance
6583
+ * @summary Fetch assets' balance by providing an array of asset addresses and symbols
6584
+ * @request POST:/query/assets/bulk-balance
6585
+ * @secure
6586
+ */
6587
+ fetchBulkBalance: (data, params = {}) => this.http.request(Object.assign({ path: `/query/assets/bulk-balance`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6588
+ /**
6589
+ * No description
6590
+ *
6591
+ * @tags Query
6592
+ * @name FetchWalletBulkBalance
6593
+ * @summary Fetch assets balances by specifying the wallet ID
6594
+ * @request POST:/query/assets/wallet-bulk-balance
6595
+ * @secure
6596
+ */
6597
+ fetchWalletBulkBalance: (data, params = {}) => this.http.request(Object.assign({ path: `/query/assets/wallet-bulk-balance`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6598
+ /**
6599
+ * No description
6600
+ *
6601
+ * @tags Query
6602
+ * @name FetchTransactions
6603
+ * @summary Fetch the current address historical transactions
6604
+ * @request GET:/query/transactions
6605
+ */
6606
+ fetchTransactions: (query, params = {}) => this.http.request(Object.assign({ path: `/query/transactions`, method: "GET", query: query, format: "json" }, params)),
6607
+ /**
6608
+ * No description
6609
+ *
6610
+ * @tags Query, Assets
6611
+ * @name FetchEvmTokenAssetInfo
6612
+ * @summary Request token asset info like decimals, name and symbol
6613
+ * @request GET:/query/fetch-token-info
6614
+ * @secure
6615
+ */
6616
+ fetchEvmTokenAssetInfo: (query, params = {}) => this.http.request(Object.assign({ path: `/query/fetch-token-info`, method: "GET", query: query, secure: true, format: "json" }, params)),
6617
+ /**
6618
+ * No description
6619
+ *
6620
+ * @tags Query, Assets
6621
+ * @name FetchAssetPairPrice
6622
+ * @summary Fetch asset price by providing symbol pairing or a list of pairing symbols
6623
+ * @request GET:/query/get-asset-price
6435
6624
  * @secure
6436
6625
  */
6437
- getPendingTransactions: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/pending`, method: "GET", query: query, secure: true, format: "json" }, params)),
6626
+ fetchAssetPairPrice: (query, params = {}) => this.http.request(Object.assign({ path: `/query/get-asset-price`, method: "GET", query: query, secure: true, format: "json" }, params)),
6627
+ };
6628
+ this.transactions = {
6438
6629
  /**
6439
6630
  * No description
6440
6631
  *
6441
6632
  * @tags Transactions
6442
- * @name ResolvePendingTransaction
6443
- * @summary Approve or reject a pending transaction
6444
- * @request POST:/api/v1/transactions/resolve
6633
+ * @name GetTransactions
6634
+ * @summary Get list of transactions
6635
+ * @request GET:/transactions
6445
6636
  * @secure
6446
6637
  */
6447
- resolvePendingTransaction: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/resolve`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6638
+ getTransactions: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions`, method: "GET", query: query, secure: true, format: "json" }, params)),
6448
6639
  /**
6449
6640
  * No description
6450
6641
  *
6451
6642
  * @tags Transactions
6452
6643
  * @name SendTransaction
6453
6644
  * @summary Request transferring funds to a recipient address
6454
- * @request POST:/api/v1/transactions/transfer
6645
+ * @request POST:/transactions/transfer
6455
6646
  * @secure
6456
6647
  */
6457
- sendTransaction: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/transfer`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6648
+ sendTransaction: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/transfer`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6458
6649
  /**
6459
6650
  * No description
6460
6651
  *
6461
6652
  * @tags Transactions
6462
6653
  * @name SendV2Transaction
6463
6654
  * @summary Request transferring funds to a recipient address
6464
- * @request POST:/api/v1/transactions/transfer-with-shares
6655
+ * @request POST:/transactions/transfer-with-shares
6465
6656
  * @secure
6466
6657
  */
6467
- sendV2Transaction: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/transfer-with-shares`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6658
+ sendV2Transaction: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/transfer-with-shares`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6468
6659
  /**
6469
6660
  * No description
6470
6661
  *
6471
6662
  * @tags Transactions
6472
6663
  * @name InitMultisigTransfer
6473
6664
  * @summary User initiating and signing a multi-sig transfer request
6474
- * @request POST:/api/v1/transactions/init-multisig-transfer
6665
+ * @request POST:/transactions/init-multisig-transfer
6475
6666
  * @secure
6476
6667
  */
6477
- initMultisigTransfer: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/init-multisig-transfer`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6668
+ initMultisigTransfer: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/init-multisig-transfer`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6478
6669
  /**
6479
6670
  * No description
6480
6671
  *
6481
6672
  * @tags Transactions, Multisig
6482
6673
  * @name InitMultisigAssetOptin
6483
6674
  * @summary User initiating a multi-sig asset optin request and subsequently signs the first signature on the request
6484
- * @request POST:/api/v1/transactions/init-multisig-asset-optin
6675
+ * @request POST:/transactions/init-multisig-asset-optin
6485
6676
  * @secure
6486
6677
  */
6487
- initMultisigAssetOptin: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/init-multisig-asset-optin`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6678
+ initMultisigAssetOptin: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/init-multisig-asset-optin`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6488
6679
  /**
6489
6680
  * No description
6490
6681
  *
6491
6682
  * @tags Transactions, Multisig
6492
6683
  * @name InitMultisigAppOptin
6493
6684
  * @summary User initiating a multi-sig app optin request and subsequently signs the first signature on the request
6494
- * @request POST:/api/v1/transactions/init-multisig-app-optin
6685
+ * @request POST:/transactions/init-multisig-app-optin
6495
6686
  * @secure
6496
6687
  */
6497
- initMultisigAppOptin: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/init-multisig-app-optin`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6688
+ initMultisigAppOptin: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/init-multisig-app-optin`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6498
6689
  /**
6499
6690
  * No description
6500
6691
  *
6501
6692
  * @tags Transactions, Multisig
6502
6693
  * @name SignOnMultisigTransactionRequest
6503
6694
  * @summary Append signature to an existing multisig transaction request: It can be a request to transfer, optin, etc, ...
6504
- * @request POST:/api/v1/transactions/sign-multisig-request
6695
+ * @request POST:/transactions/sign-multisig-request
6505
6696
  * @secure
6506
6697
  */
6507
- signOnMultisigTransactionRequest: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/sign-multisig-request`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6698
+ signOnMultisigTransactionRequest: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/sign-multisig-request`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6508
6699
  /**
6509
6700
  * No description
6510
6701
  *
6511
6702
  * @tags Transactions, Optin
6512
6703
  * @name AssetOptInTransaction
6513
6704
  * @summary Transaction for optin to receive a specific asset in the future
6514
- * @request POST:/api/v1/transactions/asset-optin
6705
+ * @request POST:/transactions/asset-optin
6515
6706
  * @secure
6516
6707
  */
6517
- assetOptInTransaction: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/asset-optin`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6708
+ assetOptInTransaction: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/asset-optin`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6518
6709
  /**
6519
6710
  * No description
6520
6711
  *
6521
6712
  * @tags Transactions, Optin
6522
6713
  * @name AppOptInTransaction
6523
6714
  * @summary Transaction for optin to interact with a specific app
6524
- * @request POST:/api/v1/transactions/app-optin
6715
+ * @request POST:/transactions/app-optin
6525
6716
  * @secure
6526
6717
  */
6527
- appOptInTransaction: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/app-optin`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6718
+ appOptInTransaction: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/app-optin`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6528
6719
  /**
6529
6720
  * No description
6530
6721
  *
6531
6722
  * @tags Transactions
6532
6723
  * @name GetEstimateFee
6533
6724
  * @summary Request fee estimate for a particular transaction
6534
- * @request GET:/api/v1/transactions/estimate-fee
6725
+ * @request GET:/transactions/estimate-fee
6535
6726
  * @secure
6536
6727
  */
6537
- getEstimateFee: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/estimate-fee`, method: "GET", query: query, secure: true, format: "json" }, params)),
6728
+ getEstimateFee: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/estimate-fee`, method: "GET", query: query, secure: true, format: "json" }, params)),
6538
6729
  /**
6539
6730
  * @description The sign and broadcast transaction API was designed and implemented specifically for uses cases where the caller has their own custom raw transaction that is not yet currently supported by Wallaby
6540
6731
  *
6541
6732
  * @tags Transactions, Raw, Transactions
6542
6733
  * @name SignAndBroadcastRawTx
6543
6734
  * @summary Sign and broadcast raw transaction API
6544
- * @request POST:/api/v1/transactions/sign-broadcast-rawtx
6735
+ * @request POST:/transactions/sign-broadcast-rawtx
6545
6736
  * @secure
6546
6737
  */
6547
- signAndBroadcastRawTx: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/sign-broadcast-rawtx`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6738
+ signAndBroadcastRawTx: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/sign-broadcast-rawtx`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6548
6739
  /**
6549
6740
  * No description
6550
6741
  *
6551
6742
  * @tags Transactions, Query
6552
6743
  * @name FetchTransactionByHashOrReference
6553
6744
  * @summary Fetch transaction status data using a reference or transaction hash
6554
- * @request GET:/api/v1/transactions/status
6745
+ * @request GET:/transactions/status
6555
6746
  * @secure
6556
6747
  */
6557
- fetchTransactionByHashOrReference: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/status`, method: "GET", query: query, secure: true, format: "json" }, params)),
6748
+ fetchTransactionByHashOrReference: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/status`, method: "GET", query: query, secure: true, format: "json" }, params)),
6558
6749
  /**
6559
6750
  * No description
6560
6751
  *
6561
6752
  * @tags Transactions, Transactions, Multisig, Raw
6562
6753
  * @name InitMultisigRawTransaction
6563
6754
  * @summary Initiate a multisig raw transaction and sign the first signature on that same transaction
6564
- * @request POST:/api/v1/transactions/init-sign-broadcast-multisig-rawtx
6755
+ * @request POST:/transactions/init-sign-broadcast-multisig-rawtx
6565
6756
  * @secure
6566
6757
  */
6567
- initMultisigRawTransaction: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/init-sign-broadcast-multisig-rawtx`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6758
+ initMultisigRawTransaction: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/init-sign-broadcast-multisig-rawtx`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6568
6759
  /**
6569
6760
  * No description
6570
6761
  *
6571
6762
  * @tags Transactions, Query
6572
6763
  * @name GetDetailedRawTransactionDataByReference
6573
6764
  * @summary Fetch transaction in raw data format from the system persistence
6574
- * @request GET:/api/v1/transactions/raw-status
6765
+ * @request GET:/transactions/raw-status
6575
6766
  * @secure
6576
6767
  */
6577
- getDetailedRawTransactionDataByReference: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/raw-status`, method: "GET", query: query, secure: true, format: "json" }, params)),
6768
+ getDetailedRawTransactionDataByReference: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/raw-status`, method: "GET", query: query, secure: true, format: "json" }, params)),
6578
6769
  /**
6579
6770
  * No description
6580
6771
  *
6581
6772
  * @tags Transactions, Query
6582
6773
  * @name FetchTransactionParticipants
6583
6774
  * @summary Fetch transaction's participants
6584
- * @request GET:/api/v1/transactions/{reference}/participants
6775
+ * @request GET:/transactions/{reference}/participants
6585
6776
  * @secure
6586
6777
  */
6587
6778
  fetchTransactionParticipants: (_a, params) => {
6588
6779
  var { reference } = _a; __rest(_a, ["reference"]);
6589
6780
  if (params === void 0) { params = {}; }
6590
- return this.http.request(Object.assign({ path: `/api/v1/transactions/${reference}/participants`, method: "GET", secure: true, format: "json" }, params));
6781
+ return this.http.request(Object.assign({ path: `/transactions/${reference}/participants`, method: "GET", secure: true, format: "json" }, params));
6591
6782
  },
6592
6783
  /**
6593
6784
  * No description
@@ -6595,425 +6786,192 @@ class Api {
6595
6786
  * @tags Transactions, Transactions, ERC1404
6596
6787
  * @name DetectTransferRestriction
6597
6788
  * @summary Request to detect whether there is a transfer restriction on a particular transaction
6598
- * @request GET:/api/v1/transactions/detect-transfers-restrictions
6789
+ * @request GET:/transactions/detect-transfers-restrictions
6599
6790
  * @secure
6600
6791
  */
6601
- detectTransferRestriction: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/detect-transfers-restrictions`, method: "GET", query: query, secure: true, format: "json" }, params)),
6792
+ detectTransferRestriction: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/detect-transfers-restrictions`, method: "GET", query: query, secure: true, format: "json" }, params)),
6602
6793
  /**
6603
6794
  * No description
6604
6795
  *
6605
6796
  * @tags Transactions, Transactions, ERC1404
6606
6797
  * @name FetchMessageForTransferRestriction
6607
6798
  * @summary Request restriction message by providing a restriction code
6608
- * @request GET:/api/v1/transactions/transfer-restriction-message
6799
+ * @request GET:/transactions/transfer-restriction-message
6609
6800
  * @secure
6610
6801
  */
6611
- fetchMessageForTransferRestriction: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/transfer-restriction-message`, method: "GET", query: query, secure: true, format: "json" }, params)),
6802
+ fetchMessageForTransferRestriction: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/transfer-restriction-message`, method: "GET", query: query, secure: true, format: "json" }, params)),
6612
6803
  /**
6613
6804
  * No description
6614
6805
  *
6615
6806
  * @tags Transactions, Optin
6616
6807
  * @name CheckAssetOptinForAddress
6617
6808
  * @summary Get the list of all assets that the current account has opted into. This is only relevant for the Algorand chain
6618
- * @request GET:/api/v1/transactions/check-asset-optin
6809
+ * @request GET:/transactions/check-asset-optin
6619
6810
  * @secure
6620
6811
  */
6621
- checkAssetOptinForAddress: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/check-asset-optin`, method: "GET", query: query, secure: true }, params)),
6812
+ checkAssetOptinForAddress: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/check-asset-optin`, method: "GET", query: query, secure: true }, params)),
6622
6813
  /**
6623
6814
  * No description
6624
6815
  *
6625
6816
  * @tags Transactions, Optin
6626
6817
  * @name CheckAppOptinForAddress
6627
6818
  * @summary Get the list of all apps that the current account has opted into. This is only relevant for the Algorand chain
6628
- * @request GET:/api/v1/transactions/check-app-optin
6819
+ * @request GET:/transactions/check-app-optin
6629
6820
  * @secure
6630
6821
  */
6631
- checkAppOptinForAddress: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/check-app-optin`, method: "GET", query: query, secure: true }, params)),
6822
+ checkAppOptinForAddress: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/check-app-optin`, method: "GET", query: query, secure: true }, params)),
6632
6823
  /**
6633
6824
  * No description
6634
6825
  *
6635
6826
  * @tags Transactions, Allowance, Transaction
6636
6827
  * @name CreateAllowanceTransaction
6637
6828
  * @summary Create an allowance for others to spend on your behalf
6638
- * @request POST:/api/v1/transactions/create-allowance
6829
+ * @request POST:/transactions/create-allowance
6639
6830
  * @secure
6640
6831
  */
6641
- createAllowanceTransaction: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/create-allowance`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6832
+ createAllowanceTransaction: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/create-allowance`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6642
6833
  };
6643
- this.query = {
6834
+ this.mpc = {
6644
6835
  /**
6645
6836
  * No description
6646
6837
  *
6647
- * @tags Query
6648
- * @name FetchBalance
6649
- * @summary Fetch asset balance by specifying the asset address and the asset symbol
6650
- * @request GET:/api/v1/query/assets/balance
6651
- * @secure
6838
+ * @tags Mpc
6839
+ * @name InitKeyExchange
6840
+ * @summary Initialize key exchange process, the keys exchanged will be later used for encryption/decryption of the payloads exchanged
6841
+ * @request POST:/mpc/init-key-exchange
6652
6842
  */
6653
- fetchBalance: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/query/assets/balance`, method: "GET", query: query, secure: true, format: "json" }, params)),
6843
+ initKeyExchange: (data, params = {}) => this.http.request(Object.assign({ path: `/mpc/init-key-exchange`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
6654
6844
  /**
6655
6845
  * No description
6656
6846
  *
6657
- * @tags Query
6658
- * @name FetchOnlyBalance
6659
- * @summary Fetch address balance by specifying the address and the asset symbol. This API works even for external assets addresses
6660
- * @request GET:/api/v1/query/address/balance
6661
- * @secure
6847
+ * @tags Mpc
6848
+ * @name RequestSeedphraseSplit
6849
+ * @summary Request seed phrase split and return shares that can be used later for recovery
6850
+ * @request POST:/mpc/request-seed-split
6662
6851
  */
6663
- fetchOnlyBalance: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/query/address/balance`, method: "GET", query: query, secure: true, format: "json" }, params)),
6852
+ requestSeedphraseSplit: (data, params = {}) => this.http.request(Object.assign({ path: `/mpc/request-seed-split`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
6664
6853
  /**
6665
6854
  * No description
6666
6855
  *
6667
- * @tags Query
6668
- * @name FetchBulkBalance
6669
- * @summary Fetch assets' balance by providing an array of asset addresses and symbols
6670
- * @request POST:/api/v1/query/assets/bulk-balance
6671
- * @secure
6856
+ * @tags Mpc
6857
+ * @name ReconstructSeedPhrase
6858
+ * @summary Pass encrypted shares and return reconstructed encrypted seed phrase
6859
+ * @request POST:/mpc/reconstruct-seed-phrase
6672
6860
  */
6673
- fetchBulkBalance: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/query/assets/bulk-balance`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6861
+ reconstructSeedPhrase: (data, params = {}) => this.http.request(Object.assign({ path: `/mpc/reconstruct-seed-phrase`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
6862
+ };
6863
+ this.adminTransactions = {
6674
6864
  /**
6675
6865
  * No description
6676
6866
  *
6677
- * @tags Query
6678
- * @name FetchWalletBulkBalance
6679
- * @summary Fetch assets balances by specifying the wallet ID
6680
- * @request POST:/api/v1/query/assets/wallet-bulk-balance
6867
+ * @tags Admin-Transactions
6868
+ * @name CreateReleaseSchedule
6869
+ * @summary Request the creation of a release schedule
6870
+ * @request POST:/transactions/admin/release-schedule
6681
6871
  * @secure
6682
6872
  */
6683
- fetchWalletBulkBalance: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/query/assets/wallet-bulk-balance`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6873
+ createReleaseSchedule: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/release-schedule`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6684
6874
  /**
6685
6875
  * No description
6686
6876
  *
6687
- * @tags Query
6688
- * @name FetchTransactions
6689
- * @summary Fetch the current address historical transactions
6690
- * @request GET:/api/v1/query/transactions
6877
+ * @tags Admin-Transactions
6878
+ * @name ViewReleaseSchedule
6879
+ * @summary View a release schedule
6880
+ * @request GET:/transactions/admin/release-schedule
6691
6881
  * @secure
6692
6882
  */
6693
- fetchTransactions: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/query/transactions`, method: "GET", query: query, secure: true, format: "json" }, params)),
6883
+ viewReleaseSchedule: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/release-schedule`, method: "GET", query: query, secure: true, format: "json" }, params)),
6694
6884
  /**
6695
6885
  * No description
6696
6886
  *
6697
- * @tags Query, Assets
6698
- * @name FetchEvmTokenAssetInfo
6699
- * @summary Request token asset info like decimals, name and symbol
6700
- * @request GET:/api/v1/query/fetch-token-info
6887
+ * @tags Admin-Transactions
6888
+ * @name Mint
6889
+ * @summary Request the minting of an asset to addresses either via mint release schedule or directly
6890
+ * @request POST:/transactions/admin/mint
6701
6891
  * @secure
6702
6892
  */
6703
- fetchEvmTokenAssetInfo: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/query/fetch-token-info`, method: "GET", query: query, secure: true, format: "json" }, params)),
6893
+ mint: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/mint`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6704
6894
  /**
6705
6895
  * No description
6706
6896
  *
6707
- * @tags Query, Assets
6708
- * @name FetchAssetPairPrice
6709
- * @summary Fetch asset price by providing symbol pairing or a list of pairing symbols
6710
- * @request GET:/api/v1/query/get-asset-price
6897
+ * @tags Admin-Transactions
6898
+ * @name Burn
6899
+ * @summary Request the burning of an asset to address(es) directly
6900
+ * @request POST:/transactions/admin/burn
6711
6901
  * @secure
6712
6902
  */
6713
- fetchAssetPairPrice: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/query/get-asset-price`, method: "GET", query: query, secure: true, format: "json" }, params)),
6714
- };
6715
- this.mpc = {
6903
+ burn: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/burn`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6716
6904
  /**
6717
6905
  * No description
6718
6906
  *
6719
- * @tags Mpc
6720
- * @name InitKeyExchange
6721
- * @summary Initialize key exchange process, the keys exchanged will be later used for encryption/decryption of the payloads exchanged
6722
- * @request POST:/api/v1/mpc/init-key-exchange
6907
+ * @tags Admin-Transactions
6908
+ * @name ExecutePurchase
6909
+ * @summary Request purchase on the purchase contract
6910
+ * @request POST:/transactions/admin/execute-purchase
6723
6911
  * @secure
6724
6912
  */
6725
- initKeyExchange: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/mpc/init-key-exchange`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6913
+ executePurchase: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/execute-purchase`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6726
6914
  /**
6727
6915
  * No description
6728
6916
  *
6729
- * @tags Mpc
6730
- * @name RequestSeedphraseSplit
6731
- * @summary Request seed phrase split and return shares that can be used later for recovery
6732
- * @request POST:/api/v1/mpc/request-seed-split
6917
+ * @tags Admin-Transactions
6918
+ * @name ExecutePurchaseWithInterest
6919
+ * @summary Request purchase with interest on the purchase contract
6920
+ * @request POST:/transactions/admin/execute-purchase-with-interest
6733
6921
  * @secure
6734
6922
  */
6735
- requestSeedphraseSplit: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/mpc/request-seed-split`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6736
- /**
6737
- * No description
6738
- *
6739
- * @tags Mpc
6740
- * @name ReconstructSeedPhrase
6741
- * @summary Pass encrypted shares and return reconstructed encrypted seed phrase
6742
- * @request POST:/api/v1/mpc/reconstruct-seed-phrase
6743
- * @secure
6744
- */
6745
- reconstructSeedPhrase: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/mpc/reconstruct-seed-phrase`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6746
- };
6747
- this.users = {
6748
- /**
6749
- * No description
6750
- *
6751
- * @tags Users
6752
- * @name GetAllUsers
6753
- * @summary Get all users by the admin
6754
- * @request GET:/api/v1/users
6755
- * @secure
6756
- */
6757
- getAllUsers: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/users`, method: "GET", query: query, secure: true, format: "json" }, params)),
6758
- /**
6759
- * No description
6760
- *
6761
- * @tags Users
6762
- * @name UpdateProfile
6763
- * @summary Update user profile info
6764
- * @request PUT:/api/v1/users/profile
6765
- * @secure
6766
- */
6767
- updateProfile: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/users/profile`, method: "PUT", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6768
- /**
6769
- * No description
6770
- *
6771
- * @tags Users
6772
- * @name GetCurrentUser
6773
- * @summary Returns current user data
6774
- * @request GET:/api/v1/users/profile
6775
- * @secure
6776
- */
6777
- getCurrentUser: (params = {}) => this.http.request(Object.assign({ path: `/api/v1/users/profile`, method: "GET", secure: true, format: "json" }, params)),
6778
- /**
6779
- * No description
6780
- *
6781
- * @tags Users
6782
- * @name GetCurrentUserSalt
6783
- * @summary Get current user's client salt
6784
- * @request GET:/api/v1/users/salt
6785
- * @secure
6786
- */
6787
- getCurrentUserSalt: (params = {}) => this.http.request(Object.assign({ path: `/api/v1/users/salt`, method: "GET", secure: true, format: "json" }, params)),
6788
- /**
6789
- * No description
6790
- *
6791
- * @tags Users
6792
- * @name GetAllWalletsFromUserId
6793
- * @summary Returns user wallets by specifying user id
6794
- * @request GET:/api/v1/users/{userId}/wallets
6795
- * @secure
6796
- */
6797
- getAllWalletsFromUserId: (_a, params) => {
6798
- var { userId } = _a; __rest(_a, ["userId"]);
6799
- if (params === void 0) { params = {}; }
6800
- return this.http.request(Object.assign({ path: `/api/v1/users/${userId}/wallets`, method: "GET", secure: true, format: "json" }, params));
6801
- },
6802
- /**
6803
- * No description
6804
- *
6805
- * @tags Users
6806
- * @name GetCurrentUserMerchantAssets
6807
- * @summary Returns user's merchant assets
6808
- * @request GET:/api/v1/users/merchants/assets
6809
- * @secure
6810
- */
6811
- getCurrentUserMerchantAssets: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/users/merchants/assets`, method: "GET", query: query, secure: true, format: "json" }, params)),
6812
- /**
6813
- * No description
6814
- *
6815
- * @tags Users
6816
- * @name GetCurrentUserMerchantAssets2
6817
- * @summary Returns user's merchant assets
6818
- * @request GET:/api/v1/users/merchant/assets
6819
- * @originalName getCurrentUserMerchantAssets
6820
- * @duplicate
6821
- * @secure
6822
- */
6823
- getCurrentUserMerchantAssets2: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/users/merchant/assets`, method: "GET", query: query, secure: true, format: "json" }, params)),
6824
- /**
6825
- * No description
6826
- *
6827
- * @tags Users
6828
- * @name GetAssetsByUserId
6829
- * @summary Returns user assets by specifying user id
6830
- * @request GET:/api/v1/users/{userId}/assets
6831
- * @secure
6832
- */
6833
- getAssetsByUserId: (_a, params) => {
6834
- var { userId } = _a, query = __rest(_a, ["userId"]);
6835
- if (params === void 0) { params = {}; }
6836
- return this.http.request(Object.assign({ path: `/api/v1/users/${userId}/assets`, method: "GET", query: query, secure: true, format: "json" }, params));
6837
- },
6838
- /**
6839
- * No description
6840
- *
6841
- * @tags Users
6842
- * @name AddAssetToUser
6843
- * @summary Add a new asset to the user's wallet based on the asset configuration
6844
- * @request POST:/api/v1/users/assets/add
6845
- * @secure
6846
- */
6847
- addAssetToUser: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/users/assets/add`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6848
- /**
6849
- * No description
6850
- *
6851
- * @tags Users
6852
- * @name RemoveAssetFromUser
6853
- * @summary Remove an asset from the user's wallet based on the asset configuration
6854
- * @request DELETE:/api/v1/users/{userId}/wallets/{walletId}/assets/{assetConfigId}
6855
- * @secure
6856
- */
6857
- removeAssetFromUser: (_a, params) => {
6858
- var { assetConfigId, walletId, userId } = _a; __rest(_a, ["assetConfigId", "walletId", "userId"]);
6859
- if (params === void 0) { params = {}; }
6860
- return this.http.request(Object.assign({ path: `/api/v1/users/${userId}/wallets/${walletId}/assets/${assetConfigId}`, method: "DELETE", secure: true, format: "json" }, params));
6861
- },
6862
- /**
6863
- * No description
6864
- *
6865
- * @tags Users
6866
- * @name GetUserByUserId
6867
- * @summary Returns user public data
6868
- * @request GET:/api/v1/users/{userId}
6869
- * @secure
6870
- */
6871
- getUserByUserId: (_a, params) => {
6872
- var { userId } = _a; __rest(_a, ["userId"]);
6873
- if (params === void 0) { params = {}; }
6874
- return this.http.request(Object.assign({ path: `/api/v1/users/${userId}`, method: "GET", secure: true, format: "json" }, params));
6875
- },
6876
- /**
6877
- * No description
6878
- *
6879
- * @tags Users
6880
- * @name GetUserByExternalUserId
6881
- * @request GET:/api/v1/users/{externalUserId}/externalUserId
6882
- * @secure
6883
- */
6884
- getUserByExternalUserId: (_a, params) => {
6885
- var { externalUserId } = _a; __rest(_a, ["externalUserId"]);
6886
- if (params === void 0) { params = {}; }
6887
- return this.http.request(Object.assign({ path: `/api/v1/users/${externalUserId}/externalUserId`, method: "GET", secure: true, format: "json" }, params));
6888
- },
6889
- /**
6890
- * No description
6891
- *
6892
- * @tags Users
6893
- * @name GetParticipantsByUserId
6894
- * @summary Returns multisig participants by user id
6895
- * @request GET:/api/v1/users/{userId}/multisig-transactions
6896
- * @secure
6897
- */
6898
- getParticipantsByUserId: (_a, params) => {
6899
- var { userId } = _a, query = __rest(_a, ["userId"]);
6900
- if (params === void 0) { params = {}; }
6901
- return this.http.request(Object.assign({ path: `/api/v1/users/${userId}/multisig-transactions`, method: "GET", query: query, secure: true, format: "json" }, params));
6902
- },
6903
- };
6904
- this.adminTransactions = {
6905
- /**
6906
- * No description
6907
- *
6908
- * @tags Admin-Transactions
6909
- * @name CreateReleaseSchedule
6910
- * @summary Request the creation of a release schedule
6911
- * @request POST:/api/v1/transactions/admin/release-schedule
6912
- * @secure
6913
- */
6914
- createReleaseSchedule: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/admin/release-schedule`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6915
- /**
6916
- * No description
6917
- *
6918
- * @tags Admin-Transactions
6919
- * @name ViewReleaseSchedule
6920
- * @summary View a release schedule
6921
- * @request GET:/api/v1/transactions/admin/release-schedule
6922
- * @secure
6923
- */
6924
- viewReleaseSchedule: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/admin/release-schedule`, method: "GET", query: query, secure: true, format: "json" }, params)),
6925
- /**
6926
- * No description
6927
- *
6928
- * @tags Admin-Transactions
6929
- * @name Mint
6930
- * @summary Request the minting of an asset to addresses either via mint release schedule or directly
6931
- * @request POST:/api/v1/transactions/admin/mint
6932
- * @secure
6933
- */
6934
- mint: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/admin/mint`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6935
- /**
6936
- * No description
6937
- *
6938
- * @tags Admin-Transactions
6939
- * @name Burn
6940
- * @summary Request the burning of an asset to address(es) directly
6941
- * @request POST:/api/v1/transactions/admin/burn
6942
- * @secure
6943
- */
6944
- burn: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/admin/burn`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6945
- /**
6946
- * No description
6947
- *
6948
- * @tags Admin-Transactions
6949
- * @name ExecutePurchase
6950
- * @summary Request purchase on the purchase contract
6951
- * @request POST:/api/v1/transactions/admin/execute-purchase
6952
- * @secure
6953
- */
6954
- executePurchase: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/admin/execute-purchase`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6955
- /**
6956
- * No description
6957
- *
6958
- * @tags Admin-Transactions
6959
- * @name ExecutePurchaseWithInterest
6960
- * @summary Request purchase with interest on the purchase contract
6961
- * @request POST:/api/v1/transactions/admin/execute-purchase-with-interest
6962
- * @secure
6963
- */
6964
- executePurchaseWithInterest: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/admin/execute-purchase-with-interest`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6923
+ executePurchaseWithInterest: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/execute-purchase-with-interest`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6965
6924
  /**
6966
6925
  * No description
6967
6926
  *
6968
6927
  * @tags Admin-Transactions
6969
6928
  * @name SetIdentity
6970
6929
  * @summary Set identity via the identity registry contract
6971
- * @request POST:/api/v1/transactions/admin/set-identity
6930
+ * @request POST:/transactions/admin/set-identity
6972
6931
  * @secure
6973
6932
  */
6974
- setIdentity: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/admin/set-identity`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6933
+ setIdentity: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/set-identity`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6975
6934
  /**
6976
6935
  * No description
6977
6936
  *
6978
6937
  * @tags Admin-Transactions
6979
6938
  * @name ForceClaim
6980
6939
  * @summary Force claim interest via the interest payment contract
6981
- * @request POST:/api/v1/transactions/admin/force-claim
6940
+ * @request POST:/transactions/admin/force-claim
6982
6941
  * @secure
6983
6942
  */
6984
- forceClaim: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/admin/force-claim`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6943
+ forceClaim: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/force-claim`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6985
6944
  /**
6986
6945
  * No description
6987
6946
  *
6988
6947
  * @tags Admin-Transactions
6989
6948
  * @name ForceClaimPrincipal
6990
6949
  * @summary Force claim principal via the interest payment contract
6991
- * @request POST:/api/v1/transactions/admin/force-claim-principal
6950
+ * @request POST:/transactions/admin/force-claim-principal
6992
6951
  * @secure
6993
6952
  */
6994
- forceClaimPrincipal: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/admin/force-claim-principal`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6953
+ forceClaimPrincipal: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/force-claim-principal`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6995
6954
  /**
6996
6955
  * No description
6997
6956
  *
6998
6957
  * @tags Admin-Transactions
6999
6958
  * @name GetCallbackPublicKey
7000
- * @request GET:/api/v1/transactions/admin/callback_pk
7001
- * @secure
6959
+ * @request GET:/transactions/admin/callback_pk
7002
6960
  */
7003
- getCallbackPublicKey: (params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/admin/callback_pk`, method: "GET", secure: true }, params)),
6961
+ getCallbackPublicKey: (params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/callback_pk`, method: "GET" }, params)),
7004
6962
  /**
7005
6963
  * No description
7006
6964
  *
7007
6965
  * @tags Admin-Transactions
7008
6966
  * @name ViewAdminTransaction
7009
6967
  * @summary View an admin transaction
7010
- * @request GET:/api/v1/transactions/admin/{referenceId}
6968
+ * @request GET:/transactions/admin/{referenceId}
7011
6969
  * @secure
7012
6970
  */
7013
6971
  viewAdminTransaction: (_a, params) => {
7014
6972
  var { referenceId } = _a; __rest(_a, ["referenceId"]);
7015
6973
  if (params === void 0) { params = {}; }
7016
- return this.http.request(Object.assign({ path: `/api/v1/transactions/admin/${referenceId}`, method: "GET", secure: true, format: "json" }, params));
6974
+ return this.http.request(Object.assign({ path: `/transactions/admin/${referenceId}`, method: "GET", secure: true, format: "json" }, params));
7017
6975
  },
7018
6976
  /**
7019
6977
  * No description
@@ -7021,30 +6979,9 @@ class Api {
7021
6979
  * @tags Admin-Transactions
7022
6980
  * @name UpsideCallback
7023
6981
  * @summary Upside callback for release schedule
7024
- * @request POST:/api/v1/transactions/admin/callback
7025
- * @secure
6982
+ * @request POST:/transactions/admin/callback
7026
6983
  */
7027
- upsideCallback: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/admin/callback`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
7028
- };
7029
- this.v1 = {
7030
- /**
7031
- * No description
7032
- *
7033
- * @name DashboardControllerGetDashboardData
7034
- * @summary Create new merchant. This endpoint is only available for super admin and republic admin
7035
- * @request GET:/api/v1/dashboard
7036
- * @secure
7037
- */
7038
- dashboardControllerGetDashboardData: (params = {}) => this.http.request(Object.assign({ path: `/api/v1/dashboard`, method: "GET", secure: true }, params)),
7039
- /**
7040
- * No description
7041
- *
7042
- * @name GetActivitiees
7043
- * @summary Get all activities. This endpoint is only available for super admin and republic admin
7044
- * @request GET:/api/v1/users-activities
7045
- * @secure
7046
- */
7047
- getActivitiees: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/users-activities`, method: "GET", query: query, secure: true }, params)),
6984
+ upsideCallback: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/callback`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
7048
6985
  };
7049
6986
  this.http = http;
7050
6987
  }
@@ -7068,11 +7005,16 @@ function objectToQueryParams(obj) {
7068
7005
 
7069
7006
  class Base {
7070
7007
  constructor(config) {
7008
+ var _a, _b;
7071
7009
  const sanitizedConfig = sanitizeConfig(config);
7072
7010
  this.apiKey = sanitizedConfig.apiKey;
7073
7011
  this.baseUrl = sanitizedConfig.baseUrl;
7074
7012
  this.userId = sanitizedConfig.userId;
7075
7013
  this.options = sanitizedConfig.options;
7014
+ if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.platform) {
7015
+ this.options.platform;
7016
+ this.options.platform === 'ios' || this.options.platform === 'android';
7017
+ }
7076
7018
  this.cipher = new Cipher();
7077
7019
  this.lockManager = new LockManagerService();
7078
7020
  this._initializeClientAuthToken(sanitizedConfig.clientAuthToken);
@@ -7117,10 +7059,7 @@ class Base {
7117
7059
  }
7118
7060
  };
7119
7061
  this.api = new Api(httpClient);
7120
- this.api.http.setSecurityData({
7121
- 'x-api-key': config.apiKey,
7122
- 'x-client-jwt': config.clientAuthToken,
7123
- });
7062
+ this.api.http.setSecurityData(Object.assign({ 'x-api-key': config.apiKey, 'x-client-jwt': config.clientAuthToken }, (_b = this.options) === null || _b === void 0 ? void 0 : _b.headers));
7124
7063
  }
7125
7064
  set setClientAuthToken(token) {
7126
7065
  this._initializeClientAuthToken(token);
@@ -7567,6 +7506,24 @@ const TransactionsRoutes = {
7567
7506
  },
7568
7507
  };
7569
7508
 
7509
+ const SwapRoutes = {
7510
+ getQuote: {
7511
+ fullPath: ({ walletId }) => `/api/v1/wallets/${walletId}/swap/quote`,
7512
+ method: RequestMethod.Post,
7513
+ requiresAccessToken: true,
7514
+ },
7515
+ executeSwap: {
7516
+ fullPath: ({ walletId }) => `/api/v1/wallets/${walletId}/swap`,
7517
+ method: RequestMethod.Post,
7518
+ requiresAccessToken: true,
7519
+ },
7520
+ getSwaps: {
7521
+ fullPath: ({ walletId }) => `/api/v1/wallets/${walletId}/swaps`,
7522
+ method: RequestMethod.Get,
7523
+ requiresAccessToken: true,
7524
+ },
7525
+ };
7526
+
7570
7527
  /* eslint-disable no-useless-catch */
7571
7528
  /**
7572
7529
  * Web Authenticator Implementation
@@ -7653,6 +7610,50 @@ class Authenticator {
7653
7610
  }
7654
7611
  }
7655
7612
 
7613
+ /**
7614
+ * Shared base64 helpers. Platform-specific files (base64.ts, base64.native.ts)
7615
+ * import from here and add or re-export as needed.
7616
+ */
7617
+ function normalizeAndPadBase64(s) {
7618
+ const normalized = s.replace(/-/g, '+').replace(/_/g, '/');
7619
+ return normalized.padEnd(normalized.length + ((4 - (normalized.length % 4)) % 4), '=');
7620
+ }
7621
+ function decodeBase64String(s) {
7622
+ return toUint8Array(normalizeAndPadBase64(s));
7623
+ }
7624
+ function decodeBase64URL(base64url) {
7625
+ const padded = normalizeAndPadBase64(base64url);
7626
+ const binary = atob(padded);
7627
+ const bytes = new Uint8Array(binary.length);
7628
+ for (let i = 0; i < binary.length; i++) {
7629
+ bytes[i] = binary.charCodeAt(i);
7630
+ }
7631
+ return bytes;
7632
+ }
7633
+
7634
+ /**
7635
+ * Web: round-trip with uint8ArrayToBase64 (which does btoa(fromUint8Array(bytes, true))).
7636
+ * Single decode first; if the result looks like a base64 string, decode again to get original bytes.
7637
+ */
7638
+ function base64ToUint8Array(base64) {
7639
+ try {
7640
+ const first = toUint8Array(base64);
7641
+ const asStr = String.fromCharCode.apply(null, first);
7642
+ if (/^[A-Za-z0-9+/\-_=]*$/.test(asStr) && asStr.length >= 4) {
7643
+ try {
7644
+ return decodeBase64String(asStr);
7645
+ }
7646
+ catch (_a) {
7647
+ // fall through
7648
+ }
7649
+ }
7650
+ return first;
7651
+ }
7652
+ catch (_b) {
7653
+ return decodeBase64String(base64);
7654
+ }
7655
+ }
7656
+
7656
7657
  class PasskeyService {
7657
7658
  constructor(userId, storageService, request) {
7658
7659
  this.cipher = new Cipher();
@@ -7664,7 +7665,7 @@ class PasskeyService {
7664
7665
  preparePasskeyRequestOptions(options) {
7665
7666
  var _a, _b, _c, _d, _e, _f;
7666
7667
  const prfExtensionEvaluation = ((_b = (_a = options.extensions) === null || _a === void 0 ? void 0 : _a.prf.eval) === null || _b === void 0 ? void 0 : _b.base64)
7667
- ? WebAuthn.base64URLStringToBuffer(options.extensions.prf.eval.base64)
7668
+ ? decodeBase64URL(options.extensions.prf.eval.base64)
7668
7669
  : ((_d = (_c = options.extensions) === null || _c === void 0 ? void 0 : _c.prf.eval) === null || _d === void 0 ? void 0 : _d.first) instanceof ArrayBuffer
7669
7670
  ? new Uint8Array(options.extensions.prf.eval.first)
7670
7671
  : typeof ((_f = (_e = options.extensions) === null || _e === void 0 ? void 0 : _e.prf.eval) === null || _f === void 0 ? void 0 : _f.first) === 'object'
@@ -7684,7 +7685,7 @@ class PasskeyService {
7684
7685
  preparePasskeyCreationOptions(options) {
7685
7686
  var _a, _b, _c, _d, _e, _f;
7686
7687
  const prfExtensionEvaluation = ((_b = (_a = options.extensions) === null || _a === void 0 ? void 0 : _a.prf.eval) === null || _b === void 0 ? void 0 : _b.base64)
7687
- ? WebAuthn.base64URLStringToBuffer(options.extensions.prf.eval.base64)
7688
+ ? decodeBase64URL(options.extensions.prf.eval.base64)
7688
7689
  : ((_d = (_c = options.extensions) === null || _c === void 0 ? void 0 : _c.prf.eval) === null || _d === void 0 ? void 0 : _d.first) instanceof ArrayBuffer
7689
7690
  ? new Uint8Array(options.extensions.prf.eval.first)
7690
7691
  : typeof ((_f = (_e = options.extensions) === null || _e === void 0 ? void 0 : _e.prf.eval) === null || _f === void 0 ? void 0 : _f.first) === 'object'
@@ -8085,8 +8086,50 @@ class PasskeyService {
8085
8086
  errorCode: ErrorResponseCodes.sdk_passkey_prf_not_available,
8086
8087
  });
8087
8088
  }
8088
- const prfValue = new Uint8Array((_e = extensions.prf.results) === null || _e === void 0 ? void 0 : _e.first);
8089
- logger.debug('SDK::PasskeyService::handleCredentialsCreationFromPrfExtension::prfValue', !!prfValue);
8089
+ const prfResult = (_e = extensions.prf.results) === null || _e === void 0 ? void 0 : _e.first;
8090
+ let prfValue;
8091
+ if (typeof prfResult === 'string') {
8092
+ prfValue = base64ToUint8Array(prfResult);
8093
+ }
8094
+ else if (prfResult instanceof Uint8Array) {
8095
+ prfValue = prfResult;
8096
+ }
8097
+ else if (prfResult instanceof ArrayBuffer) {
8098
+ prfValue = new Uint8Array(prfResult);
8099
+ }
8100
+ else if (ArrayBuffer.isView(prfResult)) {
8101
+ prfValue = new Uint8Array(prfResult.buffer);
8102
+ }
8103
+ else if (Array.isArray(prfResult)) {
8104
+ prfValue = new Uint8Array(prfResult);
8105
+ }
8106
+ else if (prfResult && typeof prfResult === 'object') {
8107
+ const data = prfResult.data;
8108
+ if (Array.isArray(data)) {
8109
+ prfValue = new Uint8Array(data);
8110
+ }
8111
+ else {
8112
+ const values = Object.values(prfResult);
8113
+ if (values.length && values.every((value) => typeof value === 'number')) {
8114
+ prfValue = new Uint8Array(values);
8115
+ }
8116
+ else {
8117
+ throw new WallabyError({
8118
+ message: 'Unsupported PRF result type.',
8119
+ statusCode: 400,
8120
+ errorCode: ErrorResponseCodes.sdk_passkey_prf_not_available,
8121
+ });
8122
+ }
8123
+ }
8124
+ }
8125
+ else {
8126
+ throw new WallabyError({
8127
+ message: 'Unsupported PRF result type.',
8128
+ statusCode: 400,
8129
+ errorCode: ErrorResponseCodes.sdk_passkey_prf_not_available,
8130
+ });
8131
+ }
8132
+ logger.debug('SDK::PasskeyService::handleCredentialsCreationFromPrfExtension::prfValue', prfValue);
8090
8133
  const credentialsKeyPair = await this.cipher.getCredentialsKeyPair({
8091
8134
  prfValue,
8092
8135
  authType: AuthType.Passkey,
@@ -8429,7 +8472,6 @@ class AuthService extends Base {
8429
8472
  let deviceKeyPair;
8430
8473
  // This logic needs to change and depend on data from server.
8431
8474
  if (!passkeyCredential) {
8432
- console.debug('SDK::AuthService::handleSignInWithPasskey:: creating new key pair');
8433
8475
  deviceKeyPair = createIdentity();
8434
8476
  devicePublicKey = deviceKeyPair.publicKey;
8435
8477
  await this.localStorageService.save(LocalStorageItems.ClientAuthPublicKey, devicePublicKey);
@@ -10469,7 +10511,7 @@ class WalletDataService extends Base {
10469
10511
  * @param { string } address Wallet address
10470
10512
  * @param { string } symbol Token symbol
10471
10513
  * @param { BlockchainName } chainName the chain name enum. i.e. 'ETHEREUM', 'BITCOIN'
10472
- * @returns { TokenBalanceResponse } The wallet has been created successfully
10514
+ * @returns { TokenBalance } Balance of the token
10473
10515
  */
10474
10516
  async getTokenBalance({ address, symbol, tokenStandard, chainName }) {
10475
10517
  try {
@@ -10510,7 +10552,7 @@ class WalletDataService extends Base {
10510
10552
  });
10511
10553
  }
10512
10554
  const response = await this.request(WalletRoutes.getMultiTokenBalances, {
10513
- payload: { tokensAndAddressesList },
10555
+ payload: { assets: tokensAndAddressesList },
10514
10556
  });
10515
10557
  return response;
10516
10558
  }
@@ -10598,10 +10640,20 @@ class WalletDataService extends Base {
10598
10640
  * Get all assets that exist in a certain wallet, by specifying a wallet ID
10599
10641
  * @param walletId Wallaby's wallet ID
10600
10642
  * @param { BasicQueryOptions } queryOptions Optional query options
10643
+ * @param { string } [queryOptions.search] - Search assets by name or symbol (minimum 3 characters)
10644
+ * @param { BlockchainName } [queryOptions.chainName] - Filter assets by blockchain name
10601
10645
  * @returns { GetUserAssetsByWalletIdData } Returns all assets belonging in a certain wallet ID
10602
10646
  */
10603
10647
  async getWalletAssets({ walletId, queryOptions }) {
10604
10648
  try {
10649
+ // Validate search parameter if provided
10650
+ if ((queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.search) !== undefined && queryOptions.search.length < 3) {
10651
+ throw new WallabyError({
10652
+ message: 'Search parameter must be at least 3 characters long',
10653
+ statusCode: 400,
10654
+ errorCode: ErrorResponseCodes.sdk_invalid_parameter,
10655
+ });
10656
+ }
10605
10657
  const response = await this.request(WalletRoutes.getWalletAssets, {
10606
10658
  payload: {
10607
10659
  walletId,
@@ -11071,6 +11123,246 @@ class HttpApi extends Base {
11071
11123
  }
11072
11124
  }
11073
11125
 
11126
+ class Swap extends Base {
11127
+ constructor(config) {
11128
+ super(config);
11129
+ this.authService = new AuthService(config);
11130
+ this.walletService = new WalletService(config);
11131
+ }
11132
+ /**
11133
+ * Gets a swap quote between two assets (from/to), including fees, min output, and slippage limits.
11134
+ *
11135
+ * @public
11136
+ * @param {SwapQuoteRequest} request - The swap quote request parameters
11137
+ * @returns {Promise<SwapQuoteResponse>} A promise that resolves with the swap quote
11138
+ */
11139
+ async getQuote({ walletId, fromAsset, toAsset, fromAmount, toAmount }) {
11140
+ try {
11141
+ if (!walletId || !fromAsset || !toAsset) {
11142
+ throw new WallabyError({
11143
+ message: 'Missing required parameters: walletId, fromAsset, and toAsset are required',
11144
+ statusCode: 400,
11145
+ errorCode: ErrorResponseCodes.sdk_missing_parameter,
11146
+ });
11147
+ }
11148
+ if (!fromAmount && !toAmount) {
11149
+ throw new WallabyError({
11150
+ message: 'Either fromAmount or toAmount must be provided',
11151
+ statusCode: 400,
11152
+ errorCode: ErrorResponseCodes.sdk_missing_parameter,
11153
+ });
11154
+ }
11155
+ // Build path with walletId, but exclude it from request body
11156
+ const routePayload = { walletId };
11157
+ const requestBody = Object.assign(Object.assign({ fromAsset,
11158
+ toAsset }, (fromAmount && { fromAmount })), (toAmount && { toAmount }));
11159
+ const response = await this.request(Object.assign(Object.assign({}, SwapRoutes.getQuote), { fullPath: SwapRoutes.getQuote.fullPath(routePayload) }), {
11160
+ payload: requestBody,
11161
+ });
11162
+ return response;
11163
+ }
11164
+ catch (error) {
11165
+ logger.error('SDK::Swap::getQuote::error', error);
11166
+ throw error;
11167
+ }
11168
+ }
11169
+ /**
11170
+ * Executes a swap using a previously generated quote.
11171
+ *
11172
+ * @public
11173
+ * @param {ExecuteSwapRequest} request - The execute swap request parameters
11174
+ * @returns {Promise<ExecuteSwapResponse>} A promise that resolves with the swap execution response
11175
+ */
11176
+ async executeSwap({ walletId, quoteId, authenticationOptions }) {
11177
+ try {
11178
+ // Only attempt migration if we have password auth and V2 storage might be incomplete
11179
+ if (this.deviceAuthType === AuthType.Password && authenticationOptions.password) {
11180
+ try {
11181
+ await this.walletService.handleUpdateToV2({
11182
+ password: authenticationOptions.password,
11183
+ walletId: walletId,
11184
+ });
11185
+ }
11186
+ catch (error) {
11187
+ logger.error('SDK::Swap::executeSwap::handleUpdateToV2::error', error);
11188
+ throw new WallabyError({
11189
+ message: 'Error accessing user wallet on this device. Please ensure the password is correct and try again.',
11190
+ statusCode: 500,
11191
+ errorCode: ErrorResponseCodes.sdk_unknown_error,
11192
+ });
11193
+ }
11194
+ }
11195
+ const { deviceAuthPublicKey, signatureMessage, readyForTransportSeedPhrase, sharesEncryptedWithWallabyPubKey, hasShares } = await this.prepareSwapAuth(authenticationOptions, walletId);
11196
+ let swapResponse;
11197
+ // Build path with walletId, but exclude it from request body
11198
+ const routePayload = { walletId };
11199
+ if (readyForTransportSeedPhrase) {
11200
+ swapResponse = await this.request(Object.assign(Object.assign({}, SwapRoutes.executeSwap), { fullPath: SwapRoutes.executeSwap.fullPath(routePayload) }), {
11201
+ payload: {
11202
+ quoteId,
11203
+ message: signatureMessage.message,
11204
+ signature: signatureMessage.signature,
11205
+ clientAuthPubKey: deviceAuthPublicKey,
11206
+ encryptedSeed: readyForTransportSeedPhrase,
11207
+ },
11208
+ });
11209
+ }
11210
+ else if (hasShares) {
11211
+ swapResponse = await this.request(Object.assign(Object.assign({}, SwapRoutes.executeSwap), { fullPath: SwapRoutes.executeSwap.fullPath(routePayload) }), {
11212
+ payload: {
11213
+ quoteId,
11214
+ message: signatureMessage.message,
11215
+ signature: signatureMessage.signature,
11216
+ clientAuthPubKey: deviceAuthPublicKey,
11217
+ encryptedShares: sharesEncryptedWithWallabyPubKey,
11218
+ },
11219
+ });
11220
+ }
11221
+ else {
11222
+ throw new WallabyError({
11223
+ message: 'No valid seed option found on this device.',
11224
+ statusCode: 400,
11225
+ errorCode: ErrorResponseCodes.sdk_no_valid_seed_option,
11226
+ });
11227
+ }
11228
+ return swapResponse;
11229
+ }
11230
+ catch (error) {
11231
+ logger.error('SDK::Swap::executeSwap::error', error);
11232
+ throw error;
11233
+ }
11234
+ }
11235
+ /**
11236
+ * Lists executed swap transactions for a given wallet, with optional date and pagination filters.
11237
+ *
11238
+ * @public
11239
+ * @param {GetSwapsRequest} request - The get swaps request parameters
11240
+ * @returns {Promise<GetSwapsResponse>} A promise that resolves with the list of swaps
11241
+ */
11242
+ async getSwaps({ walletId, queryParams }) {
11243
+ try {
11244
+ if (!walletId) {
11245
+ throw new WallabyError({
11246
+ message: 'Missing required parameter: walletId',
11247
+ statusCode: 400,
11248
+ errorCode: ErrorResponseCodes.sdk_missing_parameter,
11249
+ });
11250
+ }
11251
+ // Build path with walletId
11252
+ const routePayload = { walletId };
11253
+ const response = await this.request(Object.assign(Object.assign({}, SwapRoutes.getSwaps), { fullPath: SwapRoutes.getSwaps.fullPath(routePayload) }), {
11254
+ queryParams: queryParams,
11255
+ });
11256
+ return response;
11257
+ }
11258
+ catch (error) {
11259
+ logger.error('SDK::Swap::getSwaps::error', error);
11260
+ throw error;
11261
+ }
11262
+ }
11263
+ /**
11264
+ * Prepares authentication data and encrypted payload for swap requests
11265
+ * @private
11266
+ */
11267
+ async prepareSwapAuth(authenticationOptions, walletId) {
11268
+ const { password, prfValue, user, clientSalt: authClientSalt } = authenticationOptions;
11269
+ const encryptedDevicePrivateKey = await this.localStorageService.fetch(LocalStorageItems.EncryptedDevicePrivateKey, {
11270
+ walletId,
11271
+ });
11272
+ if (!encryptedDevicePrivateKey) {
11273
+ throw new WallabyError({
11274
+ message: 'No private key was found on this device.',
11275
+ statusCode: 400,
11276
+ errorCode: ErrorResponseCodes.sdk_private_key_not_found,
11277
+ });
11278
+ }
11279
+ // Get credentials key pair for device private key decryption
11280
+ const clientSalt = authClientSalt || user.clientSalt;
11281
+ const credentialsKeyPair = await this.cipher.getCredentialsKeyPair({
11282
+ authType: this.deviceAuthType,
11283
+ password,
11284
+ prfValue,
11285
+ salt: clientSalt,
11286
+ });
11287
+ // Decrypt device private key
11288
+ const decryptedDevicePrivateKey = await this.cipher.decrypt({
11289
+ cipherText: JSON.parse(encryptedDevicePrivateKey),
11290
+ decryptionKey: credentialsKeyPair.privateKey,
11291
+ });
11292
+ if (!decryptedDevicePrivateKey) {
11293
+ throw new WallabyError({
11294
+ message: 'Credentials are wrong, please pass the correct credentials.',
11295
+ statusCode: 400,
11296
+ errorCode: ErrorResponseCodes.sdk_private_key_decryption_failed,
11297
+ });
11298
+ }
11299
+ const deviceAuthPublicKey = publicKeyByPrivateKey(decryptedDevicePrivateKey);
11300
+ // Get signature message
11301
+ const signatureMessage = await this.authService.getSignature({
11302
+ publicKey: deviceAuthPublicKey,
11303
+ privateKey: decryptedDevicePrivateKey,
11304
+ }, this.deviceAuthType === AuthType.Passkey ? PasskeyChallengeType.AUTHENTICATION : undefined);
11305
+ // Prepare encrypted data (seed phrase or key shares)
11306
+ const sharesEncryptedWithWallabyPubKey = [];
11307
+ let readyForTransportSeedPhrase = undefined;
11308
+ const primaryKeyShare = await this.localStorageService.fetch(LocalStorageItems.PrimaryDeviceKeyShare, { walletId });
11309
+ if (!primaryKeyShare) {
11310
+ // No primary share, try seed phrase
11311
+ const encryptedSeedPhrase = await this.localStorageService.fetch(LocalStorageItems.EncryptedStandardSeedPhrase, {
11312
+ walletId,
11313
+ });
11314
+ if (!encryptedSeedPhrase) {
11315
+ throw new WallabyError({
11316
+ message: 'Your device does not have a seed phrase or an operating share to sign the transaction.',
11317
+ statusCode: 400,
11318
+ errorCode: ErrorResponseCodes.sdk_seed_phrase_not_found,
11319
+ });
11320
+ }
11321
+ const parsedSeedPhrase = safeJsonParse(encryptedSeedPhrase);
11322
+ readyForTransportSeedPhrase = await this.cipher.prepareStoredDataForTransport({
11323
+ storedEncryptedData: parsedSeedPhrase,
11324
+ encryptedDevicePrivateKey: JSON.parse(encryptedDevicePrivateKey),
11325
+ wallabyPublicKey: user.wallabyAuthPubKey,
11326
+ options: {
11327
+ authType: this.deviceAuthType,
11328
+ password,
11329
+ prfValue,
11330
+ salt: clientSalt,
11331
+ },
11332
+ });
11333
+ }
11334
+ else {
11335
+ // Use primary key share
11336
+ const parsedPrimaryShare = safeJsonParse(primaryKeyShare);
11337
+ const readyForTransportShare = await this.cipher.prepareStoredDataForTransport({
11338
+ storedEncryptedData: parsedPrimaryShare,
11339
+ encryptedDevicePrivateKey: JSON.parse(encryptedDevicePrivateKey),
11340
+ wallabyPublicKey: user.wallabyAuthPubKey,
11341
+ options: {
11342
+ authType: this.deviceAuthType,
11343
+ password,
11344
+ prfValue,
11345
+ salt: clientSalt,
11346
+ },
11347
+ });
11348
+ sharesEncryptedWithWallabyPubKey.push(readyForTransportShare);
11349
+ }
11350
+ return Object.freeze({
11351
+ deviceAuthPublicKey,
11352
+ signatureMessage,
11353
+ readyForTransportSeedPhrase,
11354
+ sharesEncryptedWithWallabyPubKey,
11355
+ hasShares: sharesEncryptedWithWallabyPubKey.length > 0,
11356
+ });
11357
+ }
11358
+ }
11359
+ __decorate([
11360
+ WithLock('executeSwap'),
11361
+ __metadata("design:type", Function),
11362
+ __metadata("design:paramtypes", [Object]),
11363
+ __metadata("design:returntype", Promise)
11364
+ ], Swap.prototype, "executeSwap", null);
11365
+
11074
11366
  /**
11075
11367
  * Sanitizes a Sui object ID by removing any part of the string after '::'.
11076
11368
  *
@@ -11097,13 +11389,14 @@ class System extends Base {
11097
11389
  /**
11098
11390
  * @public
11099
11391
  * Get all supported chains
11100
- * @param {null}
11392
+ * @param {Object} [options] - Optional query parameters
11393
+ * @param {boolean} [options.supportSwaps] - When true, include only chains that support swaps
11101
11394
  * @returns {Array<Blockchain>} Array of supported chains
11102
11395
  */
11103
- async getSupportedBlockchains() {
11396
+ async getSupportedBlockchains(options) {
11104
11397
  try {
11105
11398
  const response = await this.request(SystemRoutes.getSupportedBlockchains, {
11106
- payload: {},
11399
+ queryParams: (options === null || options === void 0 ? void 0 : options.supportSwaps) !== undefined ? { supportSwaps: options.supportSwaps } : undefined,
11107
11400
  });
11108
11401
  return response.chains;
11109
11402
  }
@@ -11208,13 +11501,33 @@ class System extends Base {
11208
11501
  /**
11209
11502
  * @public
11210
11503
  * Get all supported assets configuration
11211
- * @param {null}
11504
+ * @param {Object} [options] - Optional query parameters
11505
+ * @param {boolean} [options.supportsSwaps] - When true, filter to assets that support swaps
11506
+ * @param {string} [options.search] - Search assets by name or symbol (minimum 3 characters)
11507
+ * @param {BlockchainName} [options.chainName] - Filter assets by blockchain name
11212
11508
  * @returns {Array<AssetConfig>} Array of supported tokens
11213
11509
  */
11214
- async getSupportedTokens() {
11510
+ async getSupportedTokens(options) {
11215
11511
  try {
11512
+ const queryParams = {};
11513
+ if ((options === null || options === void 0 ? void 0 : options.supportsSwaps) !== undefined) {
11514
+ queryParams.supportsSwaps = options.supportsSwaps;
11515
+ }
11516
+ if ((options === null || options === void 0 ? void 0 : options.search) !== undefined) {
11517
+ if (options.search.length < 3) {
11518
+ throw new WallabyError({
11519
+ message: 'Search parameter must be at least 3 characters long',
11520
+ statusCode: 400,
11521
+ errorCode: ErrorResponseCodes.sdk_invalid_parameter,
11522
+ });
11523
+ }
11524
+ queryParams.search = options.search;
11525
+ }
11526
+ if ((options === null || options === void 0 ? void 0 : options.chainName) !== undefined) {
11527
+ queryParams.chainName = options.chainName;
11528
+ }
11216
11529
  const response = await this.request(SystemRoutes.getSupportedTokens, {
11217
- payload: {},
11530
+ queryParams: Object.keys(queryParams).length > 0 ? queryParams : undefined,
11218
11531
  });
11219
11532
  return response.assets;
11220
11533
  }
@@ -11357,9 +11670,10 @@ class Transactions extends Base {
11357
11670
  * @param {string} reference
11358
11671
  * @param {AuthenticationResponse} authenticationOptions
11359
11672
  * @param {string} memo
11673
+ * @param {TransactionType} transactionType
11360
11674
  * @returns {TransactionResponse}
11361
11675
  */
11362
- async transfer({ originAddress, recipientAddress, amount, assetId, walletId, reference, authenticationOptions, memo, }) {
11676
+ async transfer({ originAddress, recipientAddress, amount, assetId, walletId, reference, authenticationOptions, memo, transactionType, }) {
11363
11677
  try {
11364
11678
  // Only attempt migration if we have password auth and V2 storage might be incomplete
11365
11679
  if (this.deviceAuthType === AuthType.Password && authenticationOptions.password) {
@@ -11385,7 +11699,8 @@ class Transactions extends Base {
11385
11699
  payload: Object.assign(Object.assign({}, signatureMessage), { clientAuthPubKey: deviceAuthPublicKey, encryptedSeed: readyForTransportSeedPhrase, originAddress,
11386
11700
  recipientAddress,
11387
11701
  assetId,
11388
- amount, reference: reference || v4(), memo }),
11702
+ amount, reference: reference || v4(), memo,
11703
+ transactionType }),
11389
11704
  });
11390
11705
  }
11391
11706
  else if (hasShares) {
@@ -11393,14 +11708,15 @@ class Transactions extends Base {
11393
11708
  payload: Object.assign(Object.assign({}, signatureMessage), { clientAuthPubKey: deviceAuthPublicKey, encryptedShares: sharesEncryptedWithWallabyPubKey, originAddress,
11394
11709
  recipientAddress,
11395
11710
  assetId,
11396
- amount, reference: reference || v4(), memo }),
11711
+ amount, reference: reference || v4(), memo,
11712
+ transactionType }),
11397
11713
  });
11398
11714
  }
11399
11715
  else {
11400
11716
  throw new WallabyError({
11401
11717
  message: 'No valid seed option found on this device.',
11402
11718
  statusCode: 400,
11403
- errorCode: 'sdk_no_valid_seed_option',
11719
+ errorCode: ErrorResponseCodes.sdk_no_valid_seed_option,
11404
11720
  });
11405
11721
  }
11406
11722
  return transferResponse;
@@ -11422,10 +11738,11 @@ class Transactions extends Base {
11422
11738
  * @param {string} suiObjectId
11423
11739
  * @param {string} reference
11424
11740
  * @param {string} memo
11741
+ * @param {TransactionType} transactionType
11425
11742
  * @returns {CreateAllowanceResponse}
11426
11743
  *
11427
11744
  */
11428
- async createAllowance({ authenticationOptions, walletId, ownerAddress, spenderAddress, amount, assetId, suiObjectId, contractAddress, chainName, assetSymbol, reference, memo, }) {
11745
+ async createAllowance({ authenticationOptions, walletId, ownerAddress, spenderAddress, amount, assetId, suiObjectId, contractAddress, chainName, assetSymbol, reference, memo, transactionType, }) {
11429
11746
  try {
11430
11747
  if (!suiObjectId && !contractAddress && !assetId && !assetSymbol && !chainName) {
11431
11748
  throw new WallabyError({
@@ -11466,14 +11783,14 @@ class Transactions extends Base {
11466
11783
  }
11467
11784
  const payload = Object.assign({ message,
11468
11785
  walletId,
11469
- authenticationOptions,
11470
11786
  signature, clientAuthPubKey: deviceAuthPublicKey, ownerAddress,
11471
11787
  spenderAddress,
11472
11788
  chainName,
11473
11789
  assetSymbol,
11474
11790
  amount,
11475
11791
  assetId, contractAddress: contractAddress !== null && contractAddress !== void 0 ? contractAddress : suiObjectId, reference,
11476
- memo }, (hasShares ? { encryptedShares: sharesEncryptedWithWallabyPubKey } : { encryptedSeed: readyForTransportSeedPhrase }));
11792
+ memo,
11793
+ transactionType }, (hasShares ? { encryptedShares: sharesEncryptedWithWallabyPubKey } : { encryptedSeed: readyForTransportSeedPhrase }));
11477
11794
  const response = await this.request(TransactionsRoutes.createAllowance, {
11478
11795
  payload,
11479
11796
  });
@@ -11691,6 +12008,7 @@ class Wallaby {
11691
12008
  this.auth = new AuthService(config);
11692
12009
  this.system = new System(config);
11693
12010
  this.transactions = new Transactions(config);
12011
+ this.swap = new Swap(config);
11694
12012
  this.merchants = new Merchants(config);
11695
12013
  this.httpApi = new HttpApi(config);
11696
12014
  }