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.cjs.js CHANGED
@@ -8,6 +8,7 @@ const cryptoJs = require('crypto-js');
8
8
  const jwtDecode = require('jwt-decode');
9
9
  const lodash = require('lodash');
10
10
  const WebAuthn = require('@simplewebauthn/browser');
11
+ const jsBase64 = require('js-base64');
11
12
 
12
13
  const _interopDefaultCompat = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
13
14
 
@@ -389,6 +390,7 @@ exports.ErrorResponseCodes = void 0;
389
390
  ErrorResponseCodes["sdk_missing_parameter"] = "sdk_missing_parameter";
390
391
  ErrorResponseCodes["sdk_invalid_parameter"] = "sdk_invalid_parameter";
391
392
  ErrorResponseCodes["sdk_wrong_password"] = "sdk_wrong_password";
393
+ ErrorResponseCodes["sdk_no_valid_seed_option"] = "sdk_no_valid_seed_option";
392
394
  // passkey errors
393
395
  ErrorResponseCodes["sdk_passkey_prf_not_available"] = "sdk_passkey_prf_not_available";
394
396
  ErrorResponseCodes["sdk_passkey_challenge_unavailable"] = "sdk_passkey_challenge_unavailable";
@@ -795,14 +797,24 @@ const MASTER_ENCRYPTION_KEY = '9fa9d3f3c77c20d3a50a08e5299644be29f6e6206ef3479fe
795
797
  In particular, RS256 is necessary for compatibility with Microsoft Windows platform authenticators.
796
798
  ES256 is a widely supported algorithm and is compatible with most other platform authenticators and roaming authenticators.
797
799
  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.
798
-
800
+
799
801
  https://chromium.googlesource.com/chromium/src/+/main/content/browser/webauth/pub_key_cred_params.md
800
802
  */
801
803
  [
802
804
  { type: 'public-key', alg: exports.PublicKeyCredentialAlgorithm.RS256 },
803
805
  { type: 'public-key', alg: exports.PublicKeyCredentialAlgorithm.ES256 },
804
806
  ];
805
- const currentPackageVersion = "2.3.0-alpha.1";
807
+ const isWeb = typeof window !== 'undefined' && typeof document !== 'undefined';
808
+ const currentPackageVersion = "2.3.0" ;
809
+
810
+ /**
811
+ * Storage keys adapter for Storage interface across different platforms.
812
+ *
813
+ * This sdk uses keys like "wsdk:version:key-name" but `SecureStore` doesn't allow colons in key names,
814
+ * Valid SecureStore key characters: alphanumeric, ".", "-", "_"
815
+ *
816
+ */
817
+ const normalizeKey = (key) => key.replace(/:/g, '_');
806
818
 
807
819
  const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;
808
820
 
@@ -5064,6 +5076,9 @@ class StorageService {
5064
5076
  else {
5065
5077
  storageKey = `wsdk:v2:${this.shortenedEnv}:${key}:${this.userId}`;
5066
5078
  }
5079
+ if (!isWeb) {
5080
+ storageKey = normalizeKey(storageKey);
5081
+ }
5067
5082
  const item = await this.getItem(storageKey);
5068
5083
  if (!item) {
5069
5084
  logger.debug(`(404): Item with key ${storageKey} was not found in storage.`);
@@ -5097,6 +5112,9 @@ class StorageService {
5097
5112
  else {
5098
5113
  storageKey = `wsdk:v2:${this.shortenedEnv}:${key}:${this.userId}`;
5099
5114
  }
5115
+ if (!isWeb) {
5116
+ storageKey = normalizeKey(storageKey);
5117
+ }
5100
5118
  let valueToStore;
5101
5119
  if (this._keysProtectedByMasterKey.includes(key)) {
5102
5120
  const wrappedByMasterKey = this.cipher.encryptWithMasterKey({ data: value });
@@ -5121,6 +5139,9 @@ class StorageService {
5121
5139
  else {
5122
5140
  storageKey = `wsdk:v2:${this.shortenedEnv}:${key}:${this.userId}`;
5123
5141
  }
5142
+ if (!isWeb) {
5143
+ storageKey = normalizeKey(storageKey);
5144
+ }
5124
5145
  return await this.removeItem(storageKey);
5125
5146
  }
5126
5147
  setItem(key, value) {
@@ -5618,7 +5639,7 @@ var ContentType;
5618
5639
  })(ContentType || (ContentType = {}));
5619
5640
  class HttpClient {
5620
5641
  constructor(apiConfig = {}) {
5621
- this.baseUrl = "https://staging-testnet.wallaby.cash";
5642
+ this.baseUrl = "";
5622
5643
  this.securityData = null;
5623
5644
  this.abortControllers = new Map();
5624
5645
  this.customFetch = (...fetchParams) => fetch(...fetchParams);
@@ -5751,15 +5772,31 @@ class HttpClient {
5751
5772
  }
5752
5773
  }
5753
5774
  /**
5754
- * @title STAGING
5755
- * @version 1.0
5756
- * @baseUrl https://staging-testnet.wallaby.cash
5775
+ * @title Wallaby API Service
5776
+ * @version 1.0.0
5757
5777
  * @contact
5758
5778
  *
5759
- * The STAGING is an API that manages the wallets of the Republic Crypto
5779
+ * NCW Wallets Service API Documentation
5760
5780
  */
5761
5781
  class Api {
5762
5782
  constructor(http) {
5783
+ /**
5784
+ * No description
5785
+ *
5786
+ * @name DashboardControllerGetDashboardData
5787
+ * @summary Create new merchant. This endpoint is only available for super admin and republic admin
5788
+ * @request GET:/dashboard
5789
+ * @secure
5790
+ */
5791
+ this.dashboardControllerGetDashboardData = (params = {}) => this.http.request(Object.assign({ path: `/dashboard`, method: "GET", secure: true }, params));
5792
+ /**
5793
+ * No description
5794
+ *
5795
+ * @name GetActivitiees
5796
+ * @summary Get all activities. This endpoint is only available for super admin and republic admin
5797
+ * @request GET:/users-activities
5798
+ */
5799
+ this.getActivitiees = (query, params = {}) => this.http.request(Object.assign({ path: `/users-activities`, method: "GET", query: query }, params));
5763
5800
  this.health = {
5764
5801
  /**
5765
5802
  * No description
@@ -5768,9 +5805,8 @@ class Api {
5768
5805
  * @name GetHello
5769
5806
  * @summary Health Check API
5770
5807
  * @request GET:/
5771
- * @secure
5772
5808
  */
5773
- getHello: (params = {}) => this.http.request(Object.assign({ path: `/`, method: "GET", secure: true }, params)),
5809
+ getHello: (params = {}) => this.http.request(Object.assign({ path: `/`, method: "GET" }, params)),
5774
5810
  /**
5775
5811
  * No description
5776
5812
  *
@@ -5778,9 +5814,8 @@ class Api {
5778
5814
  * @name GetHealthCheck
5779
5815
  * @summary Service API status check
5780
5816
  * @request GET:/healthz
5781
- * @secure
5782
5817
  */
5783
- getHealthCheck: (params = {}) => this.http.request(Object.assign({ path: `/healthz`, method: "GET", secure: true }, params)),
5818
+ getHealthCheck: (params = {}) => this.http.request(Object.assign({ path: `/healthz`, method: "GET" }, params)),
5784
5819
  };
5785
5820
  this.auth = {
5786
5821
  /**
@@ -5789,91 +5824,86 @@ class Api {
5789
5824
  * @tags Auth
5790
5825
  * @name GenerateExternalSignatureMessage
5791
5826
  * @summary The returned message will be used for sign up and sign in signature
5792
- * @request POST:/api/v1/auth/signature-message/external
5793
- * @secure
5827
+ * @request POST:/auth/signature-message/external
5794
5828
  */
5795
- 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)),
5829
+ generateExternalSignatureMessage: (data, params = {}) => this.http.request(Object.assign({ path: `/auth/signature-message/external`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
5796
5830
  /**
5797
5831
  * No description
5798
5832
  *
5799
5833
  * @tags Auth
5800
5834
  * @name GenerateSignatureMessage
5801
5835
  * @summary The returned message will be used for sign up and sign in signature
5802
- * @request POST:/api/v1/auth/signature-message
5803
- * @secure
5836
+ * @request POST:/auth/signature-message
5804
5837
  */
5805
- 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)),
5838
+ generateSignatureMessage: (data, params = {}) => this.http.request(Object.assign({ path: `/auth/signature-message`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
5806
5839
  /**
5807
5840
  * No description
5808
5841
  *
5809
5842
  * @tags Auth
5810
5843
  * @name SignUp
5811
5844
  * @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
5812
- * @request POST:/api/v1/auth/sign-up
5813
- * @secure
5845
+ * @request POST:/auth/sign-up
5814
5846
  */
5815
- 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)),
5847
+ signUp: (data, params = {}) => this.http.request(Object.assign({ path: `/auth/sign-up`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
5816
5848
  /**
5817
5849
  * No description
5818
5850
  *
5819
5851
  * @tags Auth
5820
5852
  * @name SignUpExternal
5821
5853
  * @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
5822
- * @request POST:/api/v1/auth/sign-up/external
5823
- * @secure
5854
+ * @request POST:/auth/sign-up/external
5824
5855
  */
5825
- 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)),
5856
+ signUpExternal: (data, params = {}) => this.http.request(Object.assign({ path: `/auth/sign-up/external`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
5826
5857
  /**
5827
5858
  * No description
5828
5859
  *
5829
5860
  * @tags Auth
5830
5861
  * @name SignIn
5831
5862
  * @summary Users will be able to sign up by providing a signature and message. Use the same pair keys used on sign up
5832
- * @request POST:/api/v1/auth/sign-in
5833
- * @secure
5863
+ * @request POST:/auth/sign-in
5834
5864
  */
5835
- 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)),
5865
+ signIn: (data, params = {}) => this.http.request(Object.assign({ path: `/auth/sign-in`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
5836
5866
  /**
5837
5867
  * No description
5838
5868
  *
5839
5869
  * @tags Auth
5840
5870
  * @name RefreshAccessToken
5841
5871
  * @summary Users will be able to sign up by providing a signature and message. Use the same pair keys used on sign up
5842
- * @request POST:/api/v1/auth/refresh-access-token
5872
+ * @request POST:/auth/refresh-access-token
5843
5873
  * @deprecated
5844
5874
  * @secure
5845
5875
  */
5846
- refreshAccessToken: (params = {}) => this.http.request(Object.assign({ path: `/api/v1/auth/refresh-access-token`, method: "POST", secure: true, format: "json" }, params)),
5876
+ refreshAccessToken: (params = {}) => this.http.request(Object.assign({ path: `/auth/refresh-access-token`, method: "POST", secure: true, format: "json" }, params)),
5847
5877
  /**
5848
5878
  * No description
5849
5879
  *
5850
5880
  * @tags Auth
5851
5881
  * @name ChangeAuthPublicKey
5852
5882
  * @summary Change user authentication public key
5853
- * @request PUT:/api/v1/auth/client-auth-pubkey
5883
+ * @request PUT:/auth/client-auth-pubkey
5854
5884
  * @secure
5855
5885
  */
5856
- 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)),
5886
+ 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)),
5857
5887
  /**
5858
5888
  * No description
5859
5889
  *
5860
5890
  * @tags Auth
5861
5891
  * @name GetWallabyAuthPubKey
5862
5892
  * @summary Get user public key
5863
- * @request POST:/api/v1/auth/wallaby-auth-pubkey
5893
+ * @request POST:/auth/wallaby-auth-pubkey
5864
5894
  * @secure
5865
5895
  */
5866
- 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)),
5896
+ 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)),
5867
5897
  /**
5868
5898
  * No description
5869
5899
  *
5870
5900
  * @tags Auth
5871
5901
  * @name GetPasskeyCredentials
5872
5902
  * @summary Get user passkey credentials
5873
- * @request GET:/api/v1/auth/passkey-credentials
5903
+ * @request GET:/auth/passkey-credentials
5874
5904
  * @secure
5875
5905
  */
5876
- getPasskeyCredentials: (params = {}) => this.http.request(Object.assign({ path: `/api/v1/auth/passkey-credentials`, method: "GET", secure: true, format: "json" }, params)),
5906
+ getPasskeyCredentials: (params = {}) => this.http.request(Object.assign({ path: `/auth/passkey-credentials`, method: "GET", secure: true, format: "json" }, params)),
5877
5907
  };
5878
5908
  this.chains = {
5879
5909
  /**
@@ -5882,33 +5912,31 @@ class Api {
5882
5912
  * @tags Chains
5883
5913
  * @name GetAllChains
5884
5914
  * @summary Get all supported chains
5885
- * @request GET:/api/v1/chains
5915
+ * @request GET:/chains
5886
5916
  * @secure
5887
5917
  */
5888
- getAllChains: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/chains`, method: "GET", query: query, secure: true, format: "json" }, params)),
5918
+ getAllChains: (query, params = {}) => this.http.request(Object.assign({ path: `/chains`, method: "GET", query: query, secure: true, format: "json" }, params)),
5889
5919
  /**
5890
5920
  * No description
5891
5921
  *
5892
5922
  * @tags Chains
5893
5923
  * @name CreateChain
5894
5924
  * @summary Create new chain. This endpoint is only available for super admin and republic admin
5895
- * @request POST:/api/v1/chains
5896
- * @secure
5925
+ * @request POST:/chains
5897
5926
  */
5898
- createChain: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/chains`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
5927
+ createChain: (data, params = {}) => this.http.request(Object.assign({ path: `/chains`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
5899
5928
  /**
5900
5929
  * No description
5901
5930
  *
5902
5931
  * @tags Chains
5903
5932
  * @name UpdateChain
5904
5933
  * @summary Update the chain public data
5905
- * @request PUT:/api/v1/chains/{chainId}
5906
- * @secure
5934
+ * @request PUT:/chains/{chainId}
5907
5935
  */
5908
5936
  updateChain: (_a, data, params) => {
5909
5937
  var { chainId } = _a; __rest(_a, ["chainId"]);
5910
5938
  if (params === void 0) { params = {}; }
5911
- return this.http.request(Object.assign({ path: `/api/v1/chains/${chainId}`, method: "PUT", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
5939
+ return this.http.request(Object.assign({ path: `/chains/${chainId}`, method: "PUT", body: data, type: ContentType.Json, format: "json" }, params));
5912
5940
  },
5913
5941
  };
5914
5942
  this.assets = {
@@ -5918,33 +5946,33 @@ class Api {
5918
5946
  * @tags Assets
5919
5947
  * @name GetAssetsConfigurations
5920
5948
  * @summary Get all supported assets configuration that can be imported into a merchant or a user wallet
5921
- * @request GET:/api/v1/assets/configurations
5949
+ * @request GET:/assets/configurations
5922
5950
  * @secure
5923
5951
  */
5924
- getAssetsConfigurations: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/assets/configurations`, method: "GET", query: query, secure: true, format: "json" }, params)),
5952
+ getAssetsConfigurations: (query, params = {}) => this.http.request(Object.assign({ path: `/assets/configurations`, method: "GET", query: query, secure: true, format: "json" }, params)),
5925
5953
  /**
5926
5954
  * No description
5927
5955
  *
5928
5956
  * @tags Assets
5929
5957
  * @name CreateAssetConfig
5930
5958
  * @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
5931
- * @request POST:/api/v1/assets/configurations
5959
+ * @request POST:/assets/configurations
5932
5960
  * @secure
5933
5961
  */
5934
- 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)),
5962
+ createAssetConfig: (data, params = {}) => this.http.request(Object.assign({ path: `/assets/configurations`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
5935
5963
  /**
5936
5964
  * No description
5937
5965
  *
5938
5966
  * @tags Assets
5939
5967
  * @name UpdateAssetConfig
5940
5968
  * @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
5941
- * @request PUT:/api/v1/assets/configurations/{assetConfigId}
5969
+ * @request PUT:/assets/configurations/{assetConfigId}
5942
5970
  * @secure
5943
5971
  */
5944
5972
  updateAssetConfig: (_a, data, params) => {
5945
5973
  var { assetConfigId } = _a; __rest(_a, ["assetConfigId"]);
5946
5974
  if (params === void 0) { params = {}; }
5947
- return this.http.request(Object.assign({ path: `/api/v1/assets/configurations/${assetConfigId}`, method: "PUT", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
5975
+ return this.http.request(Object.assign({ path: `/assets/configurations/${assetConfigId}`, method: "PUT", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
5948
5976
  },
5949
5977
  /**
5950
5978
  * No description
@@ -5952,13 +5980,13 @@ class Api {
5952
5980
  * @tags Assets
5953
5981
  * @name VerifyAsset
5954
5982
  * @summary Verify asset configuration details.
5955
- * @request POST:/api/v1/assets/configurations/{assetConfigId}/verify
5983
+ * @request POST:/assets/configurations/{assetConfigId}/verify
5956
5984
  * @secure
5957
5985
  */
5958
5986
  verifyAsset: (_a, params) => {
5959
5987
  var { assetConfigId } = _a; __rest(_a, ["assetConfigId"]);
5960
5988
  if (params === void 0) { params = {}; }
5961
- return this.http.request(Object.assign({ path: `/api/v1/assets/configurations/${assetConfigId}/verify`, method: "POST", secure: true, format: "json" }, params));
5989
+ return this.http.request(Object.assign({ path: `/assets/configurations/${assetConfigId}/verify`, method: "POST", secure: true, format: "json" }, params));
5962
5990
  },
5963
5991
  /**
5964
5992
  * No description
@@ -5966,13 +5994,13 @@ class Api {
5966
5994
  * @tags Assets
5967
5995
  * @name UnverifyAsset
5968
5996
  * @summary Unverify asset configuration
5969
- * @request DELETE:/api/v1/assets/configurations/{assetConfigId}/unverify
5997
+ * @request DELETE:/assets/configurations/{assetConfigId}/unverify
5970
5998
  * @secure
5971
5999
  */
5972
6000
  unverifyAsset: (_a, params) => {
5973
6001
  var { assetConfigId } = _a; __rest(_a, ["assetConfigId"]);
5974
6002
  if (params === void 0) { params = {}; }
5975
- return this.http.request(Object.assign({ path: `/api/v1/assets/configurations/${assetConfigId}/unverify`, method: "DELETE", secure: true, format: "json" }, params));
6003
+ return this.http.request(Object.assign({ path: `/assets/configurations/${assetConfigId}/unverify`, method: "DELETE", secure: true, format: "json" }, params));
5976
6004
  },
5977
6005
  /**
5978
6006
  * No description
@@ -5980,13 +6008,13 @@ class Api {
5980
6008
  * @tags Assets
5981
6009
  * @name ArchiveAsset
5982
6010
  * @summary Archive an asset configuration
5983
- * @request POST:/api/v1/assets/configurations/{assetConfigId}/archive
6011
+ * @request POST:/assets/configurations/{assetConfigId}/archive
5984
6012
  * @secure
5985
6013
  */
5986
6014
  archiveAsset: (_a, params) => {
5987
6015
  var { assetConfigId } = _a; __rest(_a, ["assetConfigId"]);
5988
6016
  if (params === void 0) { params = {}; }
5989
- return this.http.request(Object.assign({ path: `/api/v1/assets/configurations/${assetConfigId}/archive`, method: "POST", secure: true, format: "json" }, params));
6017
+ return this.http.request(Object.assign({ path: `/assets/configurations/${assetConfigId}/archive`, method: "POST", secure: true, format: "json" }, params));
5990
6018
  },
5991
6019
  /**
5992
6020
  * No description
@@ -5994,13 +6022,13 @@ class Api {
5994
6022
  * @tags Assets
5995
6023
  * @name UnarchiveAsset
5996
6024
  * @summary Archive an asset configuration
5997
- * @request POST:/api/v1/assets/configurations/{assetConfigId}/unarchive
6025
+ * @request POST:/assets/configurations/{assetConfigId}/unarchive
5998
6026
  * @secure
5999
6027
  */
6000
6028
  unarchiveAsset: (_a, params) => {
6001
6029
  var { assetConfigId } = _a; __rest(_a, ["assetConfigId"]);
6002
6030
  if (params === void 0) { params = {}; }
6003
- return this.http.request(Object.assign({ path: `/api/v1/assets/configurations/${assetConfigId}/unarchive`, method: "POST", secure: true, format: "json" }, params));
6031
+ return this.http.request(Object.assign({ path: `/assets/configurations/${assetConfigId}/unarchive`, method: "POST", secure: true, format: "json" }, params));
6004
6032
  },
6005
6033
  };
6006
6034
  this.merchants = {
@@ -6010,33 +6038,32 @@ class Api {
6010
6038
  * @tags Merchants
6011
6039
  * @name GetAllMerchants
6012
6040
  * @summary Get all merchants
6013
- * @request GET:/api/v1/merchants
6014
- * @secure
6041
+ * @request GET:/merchants
6015
6042
  */
6016
- getAllMerchants: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/merchants`, method: "GET", query: query, secure: true, format: "json" }, params)),
6043
+ getAllMerchants: (query, params = {}) => this.http.request(Object.assign({ path: `/merchants`, method: "GET", query: query, format: "json" }, params)),
6017
6044
  /**
6018
6045
  * No description
6019
6046
  *
6020
6047
  * @tags Merchants
6021
6048
  * @name CreateMerchant
6022
6049
  * @summary Create new merchant. This endpoint is only available for super admin and republic admin
6023
- * @request POST:/api/v1/merchants
6050
+ * @request POST:/merchants
6024
6051
  * @secure
6025
6052
  */
6026
- createMerchant: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/merchants`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6053
+ createMerchant: (data, params = {}) => this.http.request(Object.assign({ path: `/merchants`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6027
6054
  /**
6028
6055
  * No description
6029
6056
  *
6030
6057
  * @tags Merchants
6031
6058
  * @name UpdateMerchant
6032
6059
  * @summary Update merchant. This endpoint is only available for super admin and republic admin
6033
- * @request PUT:/api/v1/merchants/{merchantId}
6060
+ * @request PUT:/merchants/{merchantId}
6034
6061
  * @secure
6035
6062
  */
6036
6063
  updateMerchant: (_a, data, params) => {
6037
6064
  var { merchantId } = _a; __rest(_a, ["merchantId"]);
6038
6065
  if (params === void 0) { params = {}; }
6039
- return this.http.request(Object.assign({ path: `/api/v1/merchants/${merchantId}`, method: "PUT", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
6066
+ return this.http.request(Object.assign({ path: `/merchants/${merchantId}`, method: "PUT", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
6040
6067
  },
6041
6068
  /**
6042
6069
  * No description
@@ -6044,13 +6071,12 @@ class Api {
6044
6071
  * @tags Merchants
6045
6072
  * @name GetOneMerchant
6046
6073
  * @summary Get one merchant by id with counts
6047
- * @request GET:/api/v1/merchants/{merchantId}
6048
- * @secure
6074
+ * @request GET:/merchants/{merchantId}
6049
6075
  */
6050
6076
  getOneMerchant: (_a, params) => {
6051
6077
  var { merchantId } = _a; __rest(_a, ["merchantId"]);
6052
6078
  if (params === void 0) { params = {}; }
6053
- return this.http.request(Object.assign({ path: `/api/v1/merchants/${merchantId}`, method: "GET", secure: true, format: "json" }, params));
6079
+ return this.http.request(Object.assign({ path: `/merchants/${merchantId}`, method: "GET", format: "json" }, params));
6054
6080
  },
6055
6081
  /**
6056
6082
  * No description
@@ -6058,13 +6084,12 @@ class Api {
6058
6084
  * @tags Merchants
6059
6085
  * @name GetMerchantAssets
6060
6086
  * @summary Get merchant assets by merchant id
6061
- * @request GET:/api/v1/merchants/{merchantId}/assets
6062
- * @secure
6087
+ * @request GET:/merchants/{merchantId}/assets
6063
6088
  */
6064
6089
  getMerchantAssets: (_a, params) => {
6065
6090
  var { merchantId } = _a, query = __rest(_a, ["merchantId"]);
6066
6091
  if (params === void 0) { params = {}; }
6067
- return this.http.request(Object.assign({ path: `/api/v1/merchants/${merchantId}/assets`, method: "GET", query: query, secure: true, format: "json" }, params));
6092
+ return this.http.request(Object.assign({ path: `/merchants/${merchantId}/assets`, method: "GET", query: query, format: "json" }, params));
6068
6093
  },
6069
6094
  /**
6070
6095
  * No description
@@ -6072,13 +6097,13 @@ class Api {
6072
6097
  * @tags Merchants
6073
6098
  * @name GetMerchantUsers
6074
6099
  * @summary Get merchant users by merchant id
6075
- * @request GET:/api/v1/merchants/{merchantId}/users
6100
+ * @request GET:/merchants/{merchantId}/users
6076
6101
  * @secure
6077
6102
  */
6078
6103
  getMerchantUsers: (_a, params) => {
6079
6104
  var { merchantId } = _a, query = __rest(_a, ["merchantId"]);
6080
6105
  if (params === void 0) { params = {}; }
6081
- return this.http.request(Object.assign({ path: `/api/v1/merchants/${merchantId}/users`, method: "GET", query: query, secure: true, format: "json" }, params));
6106
+ return this.http.request(Object.assign({ path: `/merchants/${merchantId}/users`, method: "GET", query: query, secure: true, format: "json" }, params));
6082
6107
  },
6083
6108
  /**
6084
6109
  * No description
@@ -6086,13 +6111,13 @@ class Api {
6086
6111
  * @tags Merchants
6087
6112
  * @name GetMerchantAdmins
6088
6113
  * @summary Get merchant admins by merchant id
6089
- * @request GET:/api/v1/merchants/{merchantId}/admins
6114
+ * @request GET:/merchants/{merchantId}/admins
6090
6115
  * @secure
6091
6116
  */
6092
6117
  getMerchantAdmins: (_a, params) => {
6093
6118
  var { merchantId } = _a, query = __rest(_a, ["merchantId"]);
6094
6119
  if (params === void 0) { params = {}; }
6095
- return this.http.request(Object.assign({ path: `/api/v1/merchants/${merchantId}/admins`, method: "GET", query: query, secure: true, format: "json" }, params));
6120
+ return this.http.request(Object.assign({ path: `/merchants/${merchantId}/admins`, method: "GET", query: query, secure: true, format: "json" }, params));
6096
6121
  },
6097
6122
  /**
6098
6123
  * No description
@@ -6100,23 +6125,23 @@ class Api {
6100
6125
  * @tags Merchants
6101
6126
  * @name InviteMerchantAdmins
6102
6127
  * @summary Invite merchant admins by merchant id
6103
- * @request POST:/api/v1/merchants/admins/invite
6128
+ * @request POST:/merchants/admins/invite
6104
6129
  * @secure
6105
6130
  */
6106
- 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)),
6131
+ inviteMerchantAdmins: (data, params = {}) => this.http.request(Object.assign({ path: `/merchants/admins/invite`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6107
6132
  /**
6108
6133
  * No description
6109
6134
  *
6110
6135
  * @tags Merchants
6111
6136
  * @name RevokeMerchantAdmins
6112
6137
  * @summary Invite merchant admins by merchant id
6113
- * @request DELETE:/api/v1/merchants/{merchantId}/admins/{userId}
6138
+ * @request DELETE:/merchants/{merchantId}/admins/{userId}
6114
6139
  * @secure
6115
6140
  */
6116
6141
  revokeMerchantAdmins: (_a, params) => {
6117
6142
  var { merchantId, userId } = _a; __rest(_a, ["merchantId", "userId"]);
6118
6143
  if (params === void 0) { params = {}; }
6119
- return this.http.request(Object.assign({ path: `/api/v1/merchants/${merchantId}/admins/${userId}`, method: "DELETE", secure: true, format: "json" }, params));
6144
+ return this.http.request(Object.assign({ path: `/merchants/${merchantId}/admins/${userId}`, method: "DELETE", secure: true, format: "json" }, params));
6120
6145
  },
6121
6146
  /**
6122
6147
  * No description
@@ -6124,13 +6149,13 @@ class Api {
6124
6149
  * @tags Merchants
6125
6150
  * @name GetMerchantWallets
6126
6151
  * @summary Get merchant wallets by merchant id
6127
- * @request GET:/api/v1/merchants/{merchantId}/wallets
6152
+ * @request GET:/merchants/{merchantId}/wallets
6128
6153
  * @secure
6129
6154
  */
6130
6155
  getMerchantWallets: (_a, params) => {
6131
6156
  var { merchantId } = _a, query = __rest(_a, ["merchantId"]);
6132
6157
  if (params === void 0) { params = {}; }
6133
- return this.http.request(Object.assign({ path: `/api/v1/merchants/${merchantId}/wallets`, method: "GET", query: query, secure: true, format: "json" }, params));
6158
+ return this.http.request(Object.assign({ path: `/merchants/${merchantId}/wallets`, method: "GET", query: query, secure: true, format: "json" }, params));
6134
6159
  },
6135
6160
  /**
6136
6161
  * No description
@@ -6138,70 +6163,70 @@ class Api {
6138
6163
  * @tags Merchants
6139
6164
  * @name AddMerchantWalletAssets
6140
6165
  * @summary Add assets to merchant wallets by merchant id
6141
- * @request POST:/api/v1/merchants/wallets/add-assets
6166
+ * @request POST:/merchants/wallets/add-assets
6142
6167
  * @secure
6143
6168
  */
6144
- 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)),
6169
+ addMerchantWalletAssets: (data, params = {}) => this.http.request(Object.assign({ path: `/merchants/wallets/add-assets`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6145
6170
  /**
6146
6171
  * No description
6147
6172
  *
6148
6173
  * @tags Merchants
6149
6174
  * @name AddNewAsset
6150
6175
  * @summary Add new asset to merchant based on the asset configuration
6151
- * @request POST:/api/v1/merchants/assets/add
6176
+ * @request POST:/merchants/assets/add
6152
6177
  * @secure
6153
6178
  */
6154
- 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)),
6179
+ addNewAsset: (data, params = {}) => this.http.request(Object.assign({ path: `/merchants/assets/add`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6155
6180
  /**
6156
6181
  * No description
6157
6182
  *
6158
6183
  * @tags Merchants
6159
6184
  * @name RemoveAsset
6160
6185
  * @summary Remove asset from merchant based on the asset configuration
6161
- * @request DELETE:/api/v1/merchants/assets/delete
6186
+ * @request DELETE:/merchants/assets/delete
6162
6187
  * @secure
6163
6188
  */
6164
- 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)),
6189
+ removeAsset: (data, params = {}) => this.http.request(Object.assign({ path: `/merchants/assets/delete`, method: "DELETE", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6165
6190
  /**
6166
6191
  * No description
6167
6192
  *
6168
6193
  * @tags Merchants
6169
6194
  * @name ShowMerchantAssetToWalletHolders
6170
6195
  * @summary Show merchant asset to wallet holders based on the asset configuration
6171
- * @request POST:/api/v1/merchants/assets/update-visibility
6196
+ * @request POST:/merchants/assets/update-visibility
6172
6197
  * @secure
6173
6198
  */
6174
- 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)),
6199
+ 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)),
6175
6200
  /**
6176
6201
  * No description
6177
6202
  *
6178
6203
  * @tags Merchants
6179
6204
  * @name ChangeMerchantAssetDefaultStatus
6180
6205
  * @summary Change merchant asset default status
6181
- * @request POST:/api/v1/merchants/assets/update-default-status
6206
+ * @request POST:/merchants/assets/update-default-status
6182
6207
  * @secure
6183
6208
  */
6184
- 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)),
6209
+ 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)),
6185
6210
  /**
6186
6211
  * No description
6187
6212
  *
6188
6213
  * @tags Merchants
6189
6214
  * @name CreateApiKey
6190
6215
  * @summary Create new API Key
6191
- * @request POST:/api/v1/merchants/api-keys/new
6216
+ * @request POST:/merchants/api-keys/new
6192
6217
  * @secure
6193
6218
  */
6194
- 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)),
6219
+ 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)),
6195
6220
  /**
6196
6221
  * No description
6197
6222
  *
6198
6223
  * @tags Merchants
6199
6224
  * @name WhitelistApiKeyOrigins
6200
6225
  * @summary Whitelist API Key's origins
6201
- * @request POST:/api/v1/merchants/api-keys/whitelist-origins
6226
+ * @request POST:/merchants/api-keys/whitelist-origins
6202
6227
  * @secure
6203
6228
  */
6204
- 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)),
6229
+ 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)),
6205
6230
  };
6206
6231
  this.wallets = {
6207
6232
  /**
@@ -6210,133 +6235,133 @@ class Api {
6210
6235
  * @tags Wallets
6211
6236
  * @name GetAllUsers
6212
6237
  * @summary Get all wallets by the admin
6213
- * @request GET:/api/v1/wallets
6238
+ * @request GET:/wallets
6214
6239
  * @secure
6215
6240
  */
6216
- getAllUsers: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/wallets`, method: "GET", query: query, secure: true, format: "json" }, params)),
6241
+ getAllUsers: (query, params = {}) => this.http.request(Object.assign({ path: `/wallets`, method: "GET", query: query, secure: true, format: "json" }, params)),
6217
6242
  /**
6218
6243
  * No description
6219
6244
  *
6220
6245
  * @tags Wallets
6221
6246
  * @name CreateWallet
6222
6247
  * @summary Create a newly fresh wallet, returns asset list and encrypted seed
6223
- * @request POST:/api/v1/wallets/create
6248
+ * @request POST:/wallets/create
6224
6249
  * @secure
6225
6250
  */
6226
- 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)),
6251
+ createWallet: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/create`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6227
6252
  /**
6228
6253
  * No description
6229
6254
  *
6230
6255
  * @tags Wallets
6231
6256
  * @name VerifyAccess
6232
6257
  * @summary Verify that the user still has the ability to transact with the wallet
6233
- * @request POST:/api/v1/wallets/verify-access
6258
+ * @request POST:/wallets/verify-access
6234
6259
  * @secure
6235
6260
  */
6236
- 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)),
6261
+ verifyAccess: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/verify-access`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6237
6262
  /**
6238
6263
  * No description
6239
6264
  *
6240
6265
  * @tags Wallets
6241
6266
  * @name CreateAdminWallet
6242
6267
  * @summary Create a server side admin wallet where encryptedSeed will be opaque to the caller
6243
- * @request POST:/api/v1/wallets/create-admin-server-wallet
6268
+ * @request POST:/wallets/create-admin-server-wallet
6244
6269
  * @secure
6245
6270
  */
6246
- 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)),
6271
+ 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)),
6247
6272
  /**
6248
6273
  * No description
6249
6274
  *
6250
6275
  * @tags Wallets, MPC
6251
6276
  * @name CreateWalletV2
6252
6277
  * @summary Create a newly fresh wallet, returns asset list and encrypted seed, shares, or both
6253
- * @request POST:/api/v1/wallets/create-with-shares
6278
+ * @request POST:/wallets/create-with-shares
6254
6279
  * @secure
6255
6280
  */
6256
- 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)),
6281
+ 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)),
6257
6282
  /**
6258
6283
  * No description
6259
6284
  *
6260
6285
  * @tags Wallets, MPC
6261
6286
  * @name ImportWalletSeedPhraseV2
6262
6287
  * @summary Import an existing wallet seed phrase into wallaby system directly
6263
- * @request POST:/api/v1/wallets/create-shares-based-wallet-from-seed
6288
+ * @request POST:/wallets/create-shares-based-wallet-from-seed
6264
6289
  * @secure
6265
6290
  */
6266
- 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)),
6291
+ 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)),
6267
6292
  /**
6268
6293
  * No description
6269
6294
  *
6270
6295
  * @tags Wallets, MPC
6271
6296
  * @name RetrieveShares
6272
6297
  * @summary Retrieve shares which belong to the user on a specified wallet
6273
- * @request POST:/api/v1/wallets/retrieve-shares
6298
+ * @request POST:/wallets/retrieve-shares
6274
6299
  * @secure
6275
6300
  */
6276
- 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)),
6301
+ retrieveShares: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/retrieve-shares`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6277
6302
  /**
6278
6303
  * No description
6279
6304
  *
6280
6305
  * @tags Wallets, MPC
6281
6306
  * @name ShareWallet
6282
6307
  * @summary Share an entity wallet with another user
6283
- * @request POST:/api/v1/wallets/initiate-share-wallet
6308
+ * @request POST:/wallets/initiate-share-wallet
6284
6309
  * @secure
6285
6310
  */
6286
- 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)),
6311
+ 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)),
6287
6312
  /**
6288
6313
  * No description
6289
6314
  *
6290
6315
  * @tags Wallets, MPC
6291
6316
  * @name UnshareWallet
6292
6317
  * @summary Unshare an entity wallet with a user previously granted access
6293
- * @request POST:/api/v1/wallets/unshare-wallet
6318
+ * @request POST:/wallets/unshare-wallet
6294
6319
  * @secure
6295
6320
  */
6296
- 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)),
6321
+ unshareWallet: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/unshare-wallet`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6297
6322
  /**
6298
6323
  * No description
6299
6324
  *
6300
6325
  * @tags Wallets
6301
6326
  * @name AddNewDevice
6302
6327
  * @summary This endpoint will be called by the new device after it receives a Wallaby wrapped share
6303
- * @request POST:/api/v1/wallets/add-new-device
6328
+ * @request POST:/wallets/add-new-device
6304
6329
  * @secure
6305
6330
  */
6306
- 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)),
6331
+ 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)),
6307
6332
  /**
6308
6333
  * No description
6309
6334
  *
6310
6335
  * @tags Wallets
6311
6336
  * @name ImportWalletSeedPhrase
6312
6337
  * @summary Import an existing wallet seed phrase into wallaby system directly
6313
- * @request POST:/api/v1/wallets/import-seed-phrase
6338
+ * @request POST:/wallets/import-seed-phrase
6314
6339
  * @secure
6315
6340
  */
6316
- 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)),
6341
+ 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)),
6317
6342
  /**
6318
6343
  * No description
6319
6344
  *
6320
6345
  * @tags Wallets
6321
6346
  * @name GenerateMissingAddresses
6322
6347
  * @summary Generates missing wallet addresses for a user's wallet
6323
- * @request POST:/api/v1/wallets/generate-wallet-addresses
6348
+ * @request POST:/wallets/generate-wallet-addresses
6324
6349
  * @secure
6325
6350
  */
6326
- 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)),
6351
+ 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)),
6327
6352
  /**
6328
6353
  * No description
6329
6354
  *
6330
6355
  * @tags Wallets
6331
6356
  * @name GetUserAssetsByWalletId
6332
6357
  * @summary Get all assets that exist in a certain wallet, by specifying a wallet ID
6333
- * @request GET:/api/v1/wallets/{walletId}/assets
6358
+ * @request GET:/wallets/{walletId}/assets
6334
6359
  * @secure
6335
6360
  */
6336
6361
  getUserAssetsByWalletId: (_a, params) => {
6337
6362
  var { walletId } = _a, query = __rest(_a, ["walletId"]);
6338
6363
  if (params === void 0) { params = {}; }
6339
- return this.http.request(Object.assign({ path: `/api/v1/wallets/${walletId}/assets`, method: "GET", query: query, secure: true, format: "json" }, params));
6364
+ return this.http.request(Object.assign({ path: `/wallets/${walletId}/assets`, method: "GET", query: query, secure: true, format: "json" }, params));
6340
6365
  },
6341
6366
  /**
6342
6367
  * No description
@@ -6344,277 +6369,443 @@ class Api {
6344
6369
  * @tags Wallets
6345
6370
  * @name GetUserAsset
6346
6371
  * @summary Get one asset from a user's wallet
6347
- * @request GET:/api/v1/wallets/asset
6372
+ * @request GET:/wallets/asset
6348
6373
  * @secure
6349
6374
  */
6350
- 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)),
6375
+ 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)),
6351
6376
  /**
6352
6377
  * No description
6353
6378
  *
6354
6379
  * @tags Wallets
6355
6380
  * @name UpdateUserAsset
6356
6381
  * @summary Update a specific asset in a wallet
6357
- * @request PUT:/api/v1/wallets/asset/update
6382
+ * @request PUT:/wallets/asset/update
6358
6383
  * @secure
6359
6384
  */
6360
- 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)),
6385
+ 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)),
6361
6386
  /**
6362
6387
  * No description
6363
6388
  *
6364
6389
  * @tags Wallets, Multisig
6365
6390
  * @name CreateMultisigAsset
6366
6391
  * @summary Initiate creation for a new multisig asset, by specifying participants and the threshold
6367
- * @request POST:/api/v1/wallets/create-multisig-asset
6392
+ * @request POST:/wallets/create-multisig-asset
6368
6393
  * @secure
6369
6394
  */
6370
- 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)),
6395
+ 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)),
6371
6396
  /**
6372
6397
  * No description
6373
6398
  *
6374
6399
  * @tags Wallets, Recovery
6375
6400
  * @name InitiateWalletRecovery
6376
6401
  * @summary Wallet Recovery - Step 1: Initiate wallet recovery
6377
- * @request POST:/api/v1/wallets/recover/init
6402
+ * @request POST:/wallets/recover/init
6378
6403
  * @secure
6379
6404
  */
6380
- 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)),
6405
+ initiateWalletRecovery: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/recover/init`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6381
6406
  /**
6382
6407
  * No description
6383
6408
  *
6384
6409
  * @tags Wallets, Recovery
6385
6410
  * @name RecoverWallet
6386
6411
  * @summary Wallet Recovery - Step 2 and final: Recover the lost wallet and its assets
6387
- * @request POST:/api/v1/wallets/recover
6412
+ * @request POST:/wallets/recover
6388
6413
  * @secure
6389
6414
  */
6390
- 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)),
6415
+ recoverWallet: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/recover`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6391
6416
  /**
6392
6417
  * No description
6393
6418
  *
6394
6419
  * @tags Wallets, Algorand
6395
6420
  * @name ConvertStandardPhraseToAlgoSpecific
6396
6421
  * @summary Convert BIP39 Standard seed phrase to Algorand fixed 25 words mnemonic phrase
6397
- * @request POST:/api/v1/wallets/convert-mnemonic-seed
6422
+ * @request POST:/wallets/convert-mnemonic-seed
6423
+ * @secure
6424
+ */
6425
+ convertStandardPhraseToAlgoSpecific: (data, params = {}) => this.http.request(Object.assign({ path: `/wallets/convert-mnemonic-seed`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6426
+ };
6427
+ this.users = {
6428
+ /**
6429
+ * No description
6430
+ *
6431
+ * @tags Users
6432
+ * @name GetAllUsers
6433
+ * @summary Get all users by the admin
6434
+ * @request GET:/users
6435
+ * @secure
6436
+ */
6437
+ getAllUsers: (query, params = {}) => this.http.request(Object.assign({ path: `/users`, method: "GET", query: query, secure: true, format: "json" }, params)),
6438
+ /**
6439
+ * No description
6440
+ *
6441
+ * @tags Users
6442
+ * @name UpdateProfile
6443
+ * @summary Update user profile info
6444
+ * @request PUT:/users/profile
6445
+ * @secure
6446
+ */
6447
+ updateProfile: (data, params = {}) => this.http.request(Object.assign({ path: `/users/profile`, method: "PUT", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6448
+ /**
6449
+ * No description
6450
+ *
6451
+ * @tags Users
6452
+ * @name GetCurrentUser
6453
+ * @summary Returns current user data
6454
+ * @request GET:/users/profile
6455
+ * @secure
6456
+ */
6457
+ getCurrentUser: (params = {}) => this.http.request(Object.assign({ path: `/users/profile`, method: "GET", secure: true, format: "json" }, params)),
6458
+ /**
6459
+ * No description
6460
+ *
6461
+ * @tags Users
6462
+ * @name GetCurrentUserSalt
6463
+ * @summary Get current user's client salt
6464
+ * @request GET:/users/salt
6465
+ * @secure
6466
+ */
6467
+ getCurrentUserSalt: (params = {}) => this.http.request(Object.assign({ path: `/users/salt`, method: "GET", secure: true, format: "json" }, params)),
6468
+ /**
6469
+ * No description
6470
+ *
6471
+ * @tags Users
6472
+ * @name GetAllWalletsFromUserId
6473
+ * @summary Returns user wallets by specifying user id
6474
+ * @request GET:/users/{userId}/wallets
6475
+ * @secure
6476
+ */
6477
+ getAllWalletsFromUserId: (_a, params) => {
6478
+ var { userId } = _a; __rest(_a, ["userId"]);
6479
+ if (params === void 0) { params = {}; }
6480
+ return this.http.request(Object.assign({ path: `/users/${userId}/wallets`, method: "GET", secure: true, format: "json" }, params));
6481
+ },
6482
+ /**
6483
+ * No description
6484
+ *
6485
+ * @tags Users
6486
+ * @name GetCurrentUserMerchantAssets
6487
+ * @summary Returns user's merchant assets
6488
+ * @request GET:/users/merchants/assets
6489
+ * @secure
6490
+ */
6491
+ getCurrentUserMerchantAssets: (query, params = {}) => this.http.request(Object.assign({ path: `/users/merchants/assets`, method: "GET", query: query, secure: true, format: "json" }, params)),
6492
+ /**
6493
+ * No description
6494
+ *
6495
+ * @tags Users
6496
+ * @name GetCurrentUserMerchantAssets2
6497
+ * @summary Returns user's merchant assets
6498
+ * @request GET:/users/merchant/assets
6499
+ * @originalName getCurrentUserMerchantAssets
6500
+ * @duplicate
6501
+ * @secure
6502
+ */
6503
+ getCurrentUserMerchantAssets2: (query, params = {}) => this.http.request(Object.assign({ path: `/users/merchant/assets`, method: "GET", query: query, secure: true, format: "json" }, params)),
6504
+ /**
6505
+ * No description
6506
+ *
6507
+ * @tags Users
6508
+ * @name GetAssetsByUserId
6509
+ * @summary Returns user assets by specifying user id
6510
+ * @request GET:/users/{userId}/assets
6511
+ * @secure
6512
+ */
6513
+ getAssetsByUserId: (_a, params) => {
6514
+ var { userId } = _a, query = __rest(_a, ["userId"]);
6515
+ if (params === void 0) { params = {}; }
6516
+ return this.http.request(Object.assign({ path: `/users/${userId}/assets`, method: "GET", query: query, secure: true, format: "json" }, params));
6517
+ },
6518
+ /**
6519
+ * No description
6520
+ *
6521
+ * @tags Users
6522
+ * @name AddAssetToUser
6523
+ * @summary Add a new asset to the user's wallet based on the asset configuration
6524
+ * @request POST:/users/assets/add
6398
6525
  * @secure
6399
6526
  */
6400
- 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)),
6527
+ addAssetToUser: (data, params = {}) => this.http.request(Object.assign({ path: `/users/assets/add`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6401
6528
  /**
6402
6529
  * No description
6403
6530
  *
6404
- * @tags Wallets, Swaps
6405
- * @name RequestSwapQuote
6406
- * @summary Request a swap quote for exchanging assets
6407
- * @request POST:/api/v1/wallets/{walletId}/swap/quote
6531
+ * @tags Users
6532
+ * @name RemoveAssetFromUser
6533
+ * @summary Remove an asset from the user's wallet based on the asset configuration
6534
+ * @request DELETE:/users/{userId}/wallets/{walletId}/assets/{assetConfigId}
6408
6535
  * @secure
6409
6536
  */
6410
- requestSwapQuote: (_a, data, params) => {
6411
- var { walletId } = _a; __rest(_a, ["walletId"]);
6537
+ removeAssetFromUser: (_a, params) => {
6538
+ var { assetConfigId, walletId, userId } = _a; __rest(_a, ["assetConfigId", "walletId", "userId"]);
6412
6539
  if (params === void 0) { params = {}; }
6413
- 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));
6540
+ return this.http.request(Object.assign({ path: `/users/${userId}/wallets/${walletId}/assets/${assetConfigId}`, method: "DELETE", secure: true, format: "json" }, params));
6414
6541
  },
6415
6542
  /**
6416
6543
  * No description
6417
6544
  *
6418
- * @tags Wallets, Swaps
6419
- * @name GetSwapHistory
6420
- * @summary Get swap history for a wallet
6421
- * @request GET:/api/v1/wallets/{walletId}/swaps
6545
+ * @tags Users
6546
+ * @name GetUserByUserId
6547
+ * @summary Returns user public data
6548
+ * @request GET:/users/{userId}
6422
6549
  * @secure
6423
6550
  */
6424
- getSwapHistory: (_a, params) => {
6425
- var { walletId } = _a, query = __rest(_a, ["walletId"]);
6551
+ getUserByUserId: (_a, params) => {
6552
+ var { userId } = _a; __rest(_a, ["userId"]);
6553
+ if (params === void 0) { params = {}; }
6554
+ return this.http.request(Object.assign({ path: `/users/${userId}`, method: "GET", secure: true, format: "json" }, params));
6555
+ },
6556
+ /**
6557
+ * No description
6558
+ *
6559
+ * @tags Users
6560
+ * @name GetUserByExternalUserId
6561
+ * @request GET:/users/{externalUserId}/externalUserId
6562
+ * @secure
6563
+ */
6564
+ getUserByExternalUserId: (_a, params) => {
6565
+ var { externalUserId } = _a; __rest(_a, ["externalUserId"]);
6426
6566
  if (params === void 0) { params = {}; }
6427
- return this.http.request(Object.assign({ path: `/api/v1/wallets/${walletId}/swaps`, method: "GET", query: query, secure: true, format: "json" }, params));
6567
+ return this.http.request(Object.assign({ path: `/users/${externalUserId}/externalUserId`, method: "GET", secure: true, format: "json" }, params));
6428
6568
  },
6429
6569
  /**
6430
6570
  * No description
6431
6571
  *
6432
- * @tags Wallets, Swaps
6433
- * @name GetSwapById
6434
- * @summary Get a specific swap by ID
6435
- * @request GET:/api/v1/wallets/{walletId}/swaps/{swapId}
6572
+ * @tags Users
6573
+ * @name GetParticipantsByUserId
6574
+ * @summary Returns multisig participants by user id
6575
+ * @request GET:/users/{userId}/multisig-transactions
6436
6576
  * @secure
6437
6577
  */
6438
- getSwapById: (_a, params) => {
6439
- var { walletId, swapId } = _a; __rest(_a, ["walletId", "swapId"]);
6578
+ getParticipantsByUserId: (_a, params) => {
6579
+ var { userId } = _a, query = __rest(_a, ["userId"]);
6440
6580
  if (params === void 0) { params = {}; }
6441
- return this.http.request(Object.assign({ path: `/api/v1/wallets/${walletId}/swaps/${swapId}`, method: "GET", secure: true, format: "json" }, params));
6581
+ return this.http.request(Object.assign({ path: `/users/${userId}/multisig-transactions`, method: "GET", query: query, secure: true, format: "json" }, params));
6442
6582
  },
6443
6583
  };
6444
- this.transactions = {
6584
+ this.query = {
6445
6585
  /**
6446
6586
  * No description
6447
6587
  *
6448
- * @tags Transactions
6449
- * @name GetTransactions
6450
- * @summary Get list of transactions
6451
- * @request GET:/api/v1/transactions
6588
+ * @tags Query
6589
+ * @name FetchBalance
6590
+ * @summary Fetch asset balance by specifying the asset address and the asset symbol
6591
+ * @request GET:/query/assets/balance
6452
6592
  * @secure
6453
6593
  */
6454
- getTransactions: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions`, method: "GET", query: query, secure: true, format: "json" }, params)),
6594
+ fetchBalance: (query, params = {}) => this.http.request(Object.assign({ path: `/query/assets/balance`, method: "GET", query: query, secure: true, format: "json" }, params)),
6455
6595
  /**
6456
6596
  * No description
6457
6597
  *
6458
- * @tags Transactions
6459
- * @name GetPendingTransactions
6460
- * @summary Get list of pending transactions
6461
- * @request GET:/api/v1/transactions/pending
6598
+ * @tags Query
6599
+ * @name FetchOnlyBalance
6600
+ * @summary Fetch address balance by specifying the address and the asset symbol. This API works even for external assets addresses
6601
+ * @request GET:/query/address/balance
6602
+ * @secure
6603
+ */
6604
+ fetchOnlyBalance: (query, params = {}) => this.http.request(Object.assign({ path: `/query/address/balance`, method: "GET", query: query, secure: true, format: "json" }, params)),
6605
+ /**
6606
+ * No description
6607
+ *
6608
+ * @tags Query
6609
+ * @name FetchBulkBalance
6610
+ * @summary Fetch assets' balance by providing an array of asset addresses and symbols
6611
+ * @request POST:/query/assets/bulk-balance
6612
+ * @secure
6613
+ */
6614
+ 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)),
6615
+ /**
6616
+ * No description
6617
+ *
6618
+ * @tags Query
6619
+ * @name FetchWalletBulkBalance
6620
+ * @summary Fetch assets balances by specifying the wallet ID
6621
+ * @request POST:/query/assets/wallet-bulk-balance
6622
+ * @secure
6623
+ */
6624
+ 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)),
6625
+ /**
6626
+ * No description
6627
+ *
6628
+ * @tags Query
6629
+ * @name FetchTransactions
6630
+ * @summary Fetch the current address historical transactions
6631
+ * @request GET:/query/transactions
6632
+ */
6633
+ fetchTransactions: (query, params = {}) => this.http.request(Object.assign({ path: `/query/transactions`, method: "GET", query: query, format: "json" }, params)),
6634
+ /**
6635
+ * No description
6636
+ *
6637
+ * @tags Query, Assets
6638
+ * @name FetchEvmTokenAssetInfo
6639
+ * @summary Request token asset info like decimals, name and symbol
6640
+ * @request GET:/query/fetch-token-info
6641
+ * @secure
6642
+ */
6643
+ fetchEvmTokenAssetInfo: (query, params = {}) => this.http.request(Object.assign({ path: `/query/fetch-token-info`, method: "GET", query: query, secure: true, format: "json" }, params)),
6644
+ /**
6645
+ * No description
6646
+ *
6647
+ * @tags Query, Assets
6648
+ * @name FetchAssetPairPrice
6649
+ * @summary Fetch asset price by providing symbol pairing or a list of pairing symbols
6650
+ * @request GET:/query/get-asset-price
6462
6651
  * @secure
6463
6652
  */
6464
- getPendingTransactions: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/pending`, method: "GET", query: query, secure: true, format: "json" }, params)),
6653
+ fetchAssetPairPrice: (query, params = {}) => this.http.request(Object.assign({ path: `/query/get-asset-price`, method: "GET", query: query, secure: true, format: "json" }, params)),
6654
+ };
6655
+ this.transactions = {
6465
6656
  /**
6466
6657
  * No description
6467
6658
  *
6468
6659
  * @tags Transactions
6469
- * @name ResolvePendingTransaction
6470
- * @summary Approve or reject a pending transaction
6471
- * @request POST:/api/v1/transactions/resolve
6660
+ * @name GetTransactions
6661
+ * @summary Get list of transactions
6662
+ * @request GET:/transactions
6472
6663
  * @secure
6473
6664
  */
6474
- 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)),
6665
+ getTransactions: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions`, method: "GET", query: query, secure: true, format: "json" }, params)),
6475
6666
  /**
6476
6667
  * No description
6477
6668
  *
6478
6669
  * @tags Transactions
6479
6670
  * @name SendTransaction
6480
6671
  * @summary Request transferring funds to a recipient address
6481
- * @request POST:/api/v1/transactions/transfer
6672
+ * @request POST:/transactions/transfer
6482
6673
  * @secure
6483
6674
  */
6484
- 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)),
6675
+ sendTransaction: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/transfer`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6485
6676
  /**
6486
6677
  * No description
6487
6678
  *
6488
6679
  * @tags Transactions
6489
6680
  * @name SendV2Transaction
6490
6681
  * @summary Request transferring funds to a recipient address
6491
- * @request POST:/api/v1/transactions/transfer-with-shares
6682
+ * @request POST:/transactions/transfer-with-shares
6492
6683
  * @secure
6493
6684
  */
6494
- 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)),
6685
+ 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)),
6495
6686
  /**
6496
6687
  * No description
6497
6688
  *
6498
6689
  * @tags Transactions
6499
6690
  * @name InitMultisigTransfer
6500
6691
  * @summary User initiating and signing a multi-sig transfer request
6501
- * @request POST:/api/v1/transactions/init-multisig-transfer
6692
+ * @request POST:/transactions/init-multisig-transfer
6502
6693
  * @secure
6503
6694
  */
6504
- 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)),
6695
+ initMultisigTransfer: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/init-multisig-transfer`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6505
6696
  /**
6506
6697
  * No description
6507
6698
  *
6508
6699
  * @tags Transactions, Multisig
6509
6700
  * @name InitMultisigAssetOptin
6510
6701
  * @summary User initiating a multi-sig asset optin request and subsequently signs the first signature on the request
6511
- * @request POST:/api/v1/transactions/init-multisig-asset-optin
6702
+ * @request POST:/transactions/init-multisig-asset-optin
6512
6703
  * @secure
6513
6704
  */
6514
- 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)),
6705
+ initMultisigAssetOptin: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/init-multisig-asset-optin`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6515
6706
  /**
6516
6707
  * No description
6517
6708
  *
6518
6709
  * @tags Transactions, Multisig
6519
6710
  * @name InitMultisigAppOptin
6520
6711
  * @summary User initiating a multi-sig app optin request and subsequently signs the first signature on the request
6521
- * @request POST:/api/v1/transactions/init-multisig-app-optin
6712
+ * @request POST:/transactions/init-multisig-app-optin
6522
6713
  * @secure
6523
6714
  */
6524
- 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)),
6715
+ initMultisigAppOptin: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/init-multisig-app-optin`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6525
6716
  /**
6526
6717
  * No description
6527
6718
  *
6528
6719
  * @tags Transactions, Multisig
6529
6720
  * @name SignOnMultisigTransactionRequest
6530
6721
  * @summary Append signature to an existing multisig transaction request: It can be a request to transfer, optin, etc, ...
6531
- * @request POST:/api/v1/transactions/sign-multisig-request
6722
+ * @request POST:/transactions/sign-multisig-request
6532
6723
  * @secure
6533
6724
  */
6534
- 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)),
6725
+ signOnMultisigTransactionRequest: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/sign-multisig-request`, method: "POST", body: data, secure: true, type: ContentType.Json }, params)),
6535
6726
  /**
6536
6727
  * No description
6537
6728
  *
6538
6729
  * @tags Transactions, Optin
6539
6730
  * @name AssetOptInTransaction
6540
6731
  * @summary Transaction for optin to receive a specific asset in the future
6541
- * @request POST:/api/v1/transactions/asset-optin
6732
+ * @request POST:/transactions/asset-optin
6542
6733
  * @secure
6543
6734
  */
6544
- 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)),
6735
+ assetOptInTransaction: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/asset-optin`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6545
6736
  /**
6546
6737
  * No description
6547
6738
  *
6548
6739
  * @tags Transactions, Optin
6549
6740
  * @name AppOptInTransaction
6550
6741
  * @summary Transaction for optin to interact with a specific app
6551
- * @request POST:/api/v1/transactions/app-optin
6742
+ * @request POST:/transactions/app-optin
6552
6743
  * @secure
6553
6744
  */
6554
- 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)),
6745
+ appOptInTransaction: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/app-optin`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6555
6746
  /**
6556
6747
  * No description
6557
6748
  *
6558
6749
  * @tags Transactions
6559
6750
  * @name GetEstimateFee
6560
6751
  * @summary Request fee estimate for a particular transaction
6561
- * @request GET:/api/v1/transactions/estimate-fee
6752
+ * @request GET:/transactions/estimate-fee
6562
6753
  * @secure
6563
6754
  */
6564
- getEstimateFee: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/estimate-fee`, method: "GET", query: query, secure: true, format: "json" }, params)),
6755
+ getEstimateFee: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/estimate-fee`, method: "GET", query: query, secure: true, format: "json" }, params)),
6565
6756
  /**
6566
6757
  * @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
6567
6758
  *
6568
6759
  * @tags Transactions, Raw, Transactions
6569
6760
  * @name SignAndBroadcastRawTx
6570
6761
  * @summary Sign and broadcast raw transaction API
6571
- * @request POST:/api/v1/transactions/sign-broadcast-rawtx
6762
+ * @request POST:/transactions/sign-broadcast-rawtx
6572
6763
  * @secure
6573
6764
  */
6574
- 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)),
6765
+ 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)),
6575
6766
  /**
6576
6767
  * No description
6577
6768
  *
6578
6769
  * @tags Transactions, Query
6579
6770
  * @name FetchTransactionByHashOrReference
6580
6771
  * @summary Fetch transaction status data using a reference or transaction hash
6581
- * @request GET:/api/v1/transactions/status
6772
+ * @request GET:/transactions/status
6582
6773
  * @secure
6583
6774
  */
6584
- fetchTransactionByHashOrReference: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/status`, method: "GET", query: query, secure: true, format: "json" }, params)),
6775
+ fetchTransactionByHashOrReference: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/status`, method: "GET", query: query, secure: true, format: "json" }, params)),
6585
6776
  /**
6586
6777
  * No description
6587
6778
  *
6588
6779
  * @tags Transactions, Transactions, Multisig, Raw
6589
6780
  * @name InitMultisigRawTransaction
6590
6781
  * @summary Initiate a multisig raw transaction and sign the first signature on that same transaction
6591
- * @request POST:/api/v1/transactions/init-sign-broadcast-multisig-rawtx
6782
+ * @request POST:/transactions/init-sign-broadcast-multisig-rawtx
6592
6783
  * @secure
6593
6784
  */
6594
- 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)),
6785
+ 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)),
6595
6786
  /**
6596
6787
  * No description
6597
6788
  *
6598
6789
  * @tags Transactions, Query
6599
6790
  * @name GetDetailedRawTransactionDataByReference
6600
6791
  * @summary Fetch transaction in raw data format from the system persistence
6601
- * @request GET:/api/v1/transactions/raw-status
6792
+ * @request GET:/transactions/raw-status
6602
6793
  * @secure
6603
6794
  */
6604
- getDetailedRawTransactionDataByReference: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/raw-status`, method: "GET", query: query, secure: true, format: "json" }, params)),
6795
+ getDetailedRawTransactionDataByReference: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/raw-status`, method: "GET", query: query, secure: true, format: "json" }, params)),
6605
6796
  /**
6606
6797
  * No description
6607
6798
  *
6608
6799
  * @tags Transactions, Query
6609
6800
  * @name FetchTransactionParticipants
6610
6801
  * @summary Fetch transaction's participants
6611
- * @request GET:/api/v1/transactions/{reference}/participants
6802
+ * @request GET:/transactions/{reference}/participants
6612
6803
  * @secure
6613
6804
  */
6614
6805
  fetchTransactionParticipants: (_a, params) => {
6615
6806
  var { reference } = _a; __rest(_a, ["reference"]);
6616
6807
  if (params === void 0) { params = {}; }
6617
- return this.http.request(Object.assign({ path: `/api/v1/transactions/${reference}/participants`, method: "GET", secure: true, format: "json" }, params));
6808
+ return this.http.request(Object.assign({ path: `/transactions/${reference}/participants`, method: "GET", secure: true, format: "json" }, params));
6618
6809
  },
6619
6810
  /**
6620
6811
  * No description
@@ -6622,425 +6813,192 @@ class Api {
6622
6813
  * @tags Transactions, Transactions, ERC1404
6623
6814
  * @name DetectTransferRestriction
6624
6815
  * @summary Request to detect whether there is a transfer restriction on a particular transaction
6625
- * @request GET:/api/v1/transactions/detect-transfers-restrictions
6816
+ * @request GET:/transactions/detect-transfers-restrictions
6626
6817
  * @secure
6627
6818
  */
6628
- detectTransferRestriction: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/detect-transfers-restrictions`, method: "GET", query: query, secure: true, format: "json" }, params)),
6819
+ detectTransferRestriction: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/detect-transfers-restrictions`, method: "GET", query: query, secure: true, format: "json" }, params)),
6629
6820
  /**
6630
6821
  * No description
6631
6822
  *
6632
6823
  * @tags Transactions, Transactions, ERC1404
6633
6824
  * @name FetchMessageForTransferRestriction
6634
6825
  * @summary Request restriction message by providing a restriction code
6635
- * @request GET:/api/v1/transactions/transfer-restriction-message
6826
+ * @request GET:/transactions/transfer-restriction-message
6636
6827
  * @secure
6637
6828
  */
6638
- fetchMessageForTransferRestriction: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/transfer-restriction-message`, method: "GET", query: query, secure: true, format: "json" }, params)),
6829
+ fetchMessageForTransferRestriction: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/transfer-restriction-message`, method: "GET", query: query, secure: true, format: "json" }, params)),
6639
6830
  /**
6640
6831
  * No description
6641
6832
  *
6642
6833
  * @tags Transactions, Optin
6643
6834
  * @name CheckAssetOptinForAddress
6644
6835
  * @summary Get the list of all assets that the current account has opted into. This is only relevant for the Algorand chain
6645
- * @request GET:/api/v1/transactions/check-asset-optin
6836
+ * @request GET:/transactions/check-asset-optin
6646
6837
  * @secure
6647
6838
  */
6648
- checkAssetOptinForAddress: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/check-asset-optin`, method: "GET", query: query, secure: true }, params)),
6839
+ checkAssetOptinForAddress: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/check-asset-optin`, method: "GET", query: query, secure: true }, params)),
6649
6840
  /**
6650
6841
  * No description
6651
6842
  *
6652
6843
  * @tags Transactions, Optin
6653
6844
  * @name CheckAppOptinForAddress
6654
6845
  * @summary Get the list of all apps that the current account has opted into. This is only relevant for the Algorand chain
6655
- * @request GET:/api/v1/transactions/check-app-optin
6846
+ * @request GET:/transactions/check-app-optin
6656
6847
  * @secure
6657
6848
  */
6658
- checkAppOptinForAddress: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/check-app-optin`, method: "GET", query: query, secure: true }, params)),
6849
+ checkAppOptinForAddress: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/check-app-optin`, method: "GET", query: query, secure: true }, params)),
6659
6850
  /**
6660
6851
  * No description
6661
6852
  *
6662
6853
  * @tags Transactions, Allowance, Transaction
6663
6854
  * @name CreateAllowanceTransaction
6664
6855
  * @summary Create an allowance for others to spend on your behalf
6665
- * @request POST:/api/v1/transactions/create-allowance
6856
+ * @request POST:/transactions/create-allowance
6666
6857
  * @secure
6667
6858
  */
6668
- 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)),
6859
+ createAllowanceTransaction: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/create-allowance`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6669
6860
  };
6670
- this.query = {
6861
+ this.mpc = {
6671
6862
  /**
6672
6863
  * No description
6673
6864
  *
6674
- * @tags Query
6675
- * @name FetchBalance
6676
- * @summary Fetch asset balance by specifying the asset address and the asset symbol
6677
- * @request GET:/api/v1/query/assets/balance
6678
- * @secure
6865
+ * @tags Mpc
6866
+ * @name InitKeyExchange
6867
+ * @summary Initialize key exchange process, the keys exchanged will be later used for encryption/decryption of the payloads exchanged
6868
+ * @request POST:/mpc/init-key-exchange
6679
6869
  */
6680
- fetchBalance: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/query/assets/balance`, method: "GET", query: query, secure: true, format: "json" }, params)),
6870
+ initKeyExchange: (data, params = {}) => this.http.request(Object.assign({ path: `/mpc/init-key-exchange`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
6681
6871
  /**
6682
6872
  * No description
6683
6873
  *
6684
- * @tags Query
6685
- * @name FetchOnlyBalance
6686
- * @summary Fetch address balance by specifying the address and the asset symbol. This API works even for external assets addresses
6687
- * @request GET:/api/v1/query/address/balance
6688
- * @secure
6874
+ * @tags Mpc
6875
+ * @name RequestSeedphraseSplit
6876
+ * @summary Request seed phrase split and return shares that can be used later for recovery
6877
+ * @request POST:/mpc/request-seed-split
6689
6878
  */
6690
- fetchOnlyBalance: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/query/address/balance`, method: "GET", query: query, secure: true, format: "json" }, params)),
6879
+ requestSeedphraseSplit: (data, params = {}) => this.http.request(Object.assign({ path: `/mpc/request-seed-split`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
6691
6880
  /**
6692
6881
  * No description
6693
6882
  *
6694
- * @tags Query
6695
- * @name FetchBulkBalance
6696
- * @summary Fetch assets' balance by providing an array of asset addresses and symbols
6697
- * @request POST:/api/v1/query/assets/bulk-balance
6698
- * @secure
6883
+ * @tags Mpc
6884
+ * @name ReconstructSeedPhrase
6885
+ * @summary Pass encrypted shares and return reconstructed encrypted seed phrase
6886
+ * @request POST:/mpc/reconstruct-seed-phrase
6699
6887
  */
6700
- 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)),
6888
+ reconstructSeedPhrase: (data, params = {}) => this.http.request(Object.assign({ path: `/mpc/reconstruct-seed-phrase`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
6889
+ };
6890
+ this.adminTransactions = {
6701
6891
  /**
6702
6892
  * No description
6703
6893
  *
6704
- * @tags Query
6705
- * @name FetchWalletBulkBalance
6706
- * @summary Fetch assets balances by specifying the wallet ID
6707
- * @request POST:/api/v1/query/assets/wallet-bulk-balance
6894
+ * @tags Admin-Transactions
6895
+ * @name CreateReleaseSchedule
6896
+ * @summary Request the creation of a release schedule
6897
+ * @request POST:/transactions/admin/release-schedule
6708
6898
  * @secure
6709
6899
  */
6710
- 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)),
6900
+ 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)),
6711
6901
  /**
6712
6902
  * No description
6713
6903
  *
6714
- * @tags Query
6715
- * @name FetchTransactions
6716
- * @summary Fetch the current address historical transactions
6717
- * @request GET:/api/v1/query/transactions
6904
+ * @tags Admin-Transactions
6905
+ * @name ViewReleaseSchedule
6906
+ * @summary View a release schedule
6907
+ * @request GET:/transactions/admin/release-schedule
6718
6908
  * @secure
6719
6909
  */
6720
- fetchTransactions: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/query/transactions`, method: "GET", query: query, secure: true, format: "json" }, params)),
6910
+ viewReleaseSchedule: (query, params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/release-schedule`, method: "GET", query: query, secure: true, format: "json" }, params)),
6721
6911
  /**
6722
6912
  * No description
6723
6913
  *
6724
- * @tags Query, Assets
6725
- * @name FetchEvmTokenAssetInfo
6726
- * @summary Request token asset info like decimals, name and symbol
6727
- * @request GET:/api/v1/query/fetch-token-info
6914
+ * @tags Admin-Transactions
6915
+ * @name Mint
6916
+ * @summary Request the minting of an asset to addresses either via mint release schedule or directly
6917
+ * @request POST:/transactions/admin/mint
6728
6918
  * @secure
6729
6919
  */
6730
- fetchEvmTokenAssetInfo: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/query/fetch-token-info`, method: "GET", query: query, secure: true, format: "json" }, params)),
6920
+ mint: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/mint`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6731
6921
  /**
6732
6922
  * No description
6733
6923
  *
6734
- * @tags Query, Assets
6735
- * @name FetchAssetPairPrice
6736
- * @summary Fetch asset price by providing symbol pairing or a list of pairing symbols
6737
- * @request GET:/api/v1/query/get-asset-price
6924
+ * @tags Admin-Transactions
6925
+ * @name Burn
6926
+ * @summary Request the burning of an asset to address(es) directly
6927
+ * @request POST:/transactions/admin/burn
6738
6928
  * @secure
6739
6929
  */
6740
- fetchAssetPairPrice: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/query/get-asset-price`, method: "GET", query: query, secure: true, format: "json" }, params)),
6741
- };
6742
- this.mpc = {
6930
+ burn: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/burn`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
6743
6931
  /**
6744
6932
  * No description
6745
6933
  *
6746
- * @tags Mpc
6747
- * @name InitKeyExchange
6748
- * @summary Initialize key exchange process, the keys exchanged will be later used for encryption/decryption of the payloads exchanged
6749
- * @request POST:/api/v1/mpc/init-key-exchange
6934
+ * @tags Admin-Transactions
6935
+ * @name ExecutePurchase
6936
+ * @summary Request purchase on the purchase contract
6937
+ * @request POST:/transactions/admin/execute-purchase
6750
6938
  * @secure
6751
6939
  */
6752
- 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)),
6940
+ 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)),
6753
6941
  /**
6754
6942
  * No description
6755
6943
  *
6756
- * @tags Mpc
6757
- * @name RequestSeedphraseSplit
6758
- * @summary Request seed phrase split and return shares that can be used later for recovery
6759
- * @request POST:/api/v1/mpc/request-seed-split
6944
+ * @tags Admin-Transactions
6945
+ * @name ExecutePurchaseWithInterest
6946
+ * @summary Request purchase with interest on the purchase contract
6947
+ * @request POST:/transactions/admin/execute-purchase-with-interest
6760
6948
  * @secure
6761
6949
  */
6762
- 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)),
6763
- /**
6764
- * No description
6765
- *
6766
- * @tags Mpc
6767
- * @name ReconstructSeedPhrase
6768
- * @summary Pass encrypted shares and return reconstructed encrypted seed phrase
6769
- * @request POST:/api/v1/mpc/reconstruct-seed-phrase
6770
- * @secure
6771
- */
6772
- 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)),
6773
- };
6774
- this.users = {
6775
- /**
6776
- * No description
6777
- *
6778
- * @tags Users
6779
- * @name GetAllUsers
6780
- * @summary Get all users by the admin
6781
- * @request GET:/api/v1/users
6782
- * @secure
6783
- */
6784
- getAllUsers: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/users`, method: "GET", query: query, secure: true, format: "json" }, params)),
6785
- /**
6786
- * No description
6787
- *
6788
- * @tags Users
6789
- * @name UpdateProfile
6790
- * @summary Update user profile info
6791
- * @request PUT:/api/v1/users/profile
6792
- * @secure
6793
- */
6794
- 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)),
6795
- /**
6796
- * No description
6797
- *
6798
- * @tags Users
6799
- * @name GetCurrentUser
6800
- * @summary Returns current user data
6801
- * @request GET:/api/v1/users/profile
6802
- * @secure
6803
- */
6804
- getCurrentUser: (params = {}) => this.http.request(Object.assign({ path: `/api/v1/users/profile`, method: "GET", secure: true, format: "json" }, params)),
6805
- /**
6806
- * No description
6807
- *
6808
- * @tags Users
6809
- * @name GetCurrentUserSalt
6810
- * @summary Get current user's client salt
6811
- * @request GET:/api/v1/users/salt
6812
- * @secure
6813
- */
6814
- getCurrentUserSalt: (params = {}) => this.http.request(Object.assign({ path: `/api/v1/users/salt`, method: "GET", secure: true, format: "json" }, params)),
6815
- /**
6816
- * No description
6817
- *
6818
- * @tags Users
6819
- * @name GetAllWalletsFromUserId
6820
- * @summary Returns user wallets by specifying user id
6821
- * @request GET:/api/v1/users/{userId}/wallets
6822
- * @secure
6823
- */
6824
- getAllWalletsFromUserId: (_a, params) => {
6825
- var { userId } = _a; __rest(_a, ["userId"]);
6826
- if (params === void 0) { params = {}; }
6827
- return this.http.request(Object.assign({ path: `/api/v1/users/${userId}/wallets`, method: "GET", secure: true, format: "json" }, params));
6828
- },
6829
- /**
6830
- * No description
6831
- *
6832
- * @tags Users
6833
- * @name GetCurrentUserMerchantAssets
6834
- * @summary Returns user's merchant assets
6835
- * @request GET:/api/v1/users/merchants/assets
6836
- * @secure
6837
- */
6838
- getCurrentUserMerchantAssets: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/users/merchants/assets`, method: "GET", query: query, secure: true, format: "json" }, params)),
6839
- /**
6840
- * No description
6841
- *
6842
- * @tags Users
6843
- * @name GetCurrentUserMerchantAssets2
6844
- * @summary Returns user's merchant assets
6845
- * @request GET:/api/v1/users/merchant/assets
6846
- * @originalName getCurrentUserMerchantAssets
6847
- * @duplicate
6848
- * @secure
6849
- */
6850
- getCurrentUserMerchantAssets2: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/users/merchant/assets`, method: "GET", query: query, secure: true, format: "json" }, params)),
6851
- /**
6852
- * No description
6853
- *
6854
- * @tags Users
6855
- * @name GetAssetsByUserId
6856
- * @summary Returns user assets by specifying user id
6857
- * @request GET:/api/v1/users/{userId}/assets
6858
- * @secure
6859
- */
6860
- getAssetsByUserId: (_a, params) => {
6861
- var { userId } = _a, query = __rest(_a, ["userId"]);
6862
- if (params === void 0) { params = {}; }
6863
- return this.http.request(Object.assign({ path: `/api/v1/users/${userId}/assets`, method: "GET", query: query, secure: true, format: "json" }, params));
6864
- },
6865
- /**
6866
- * No description
6867
- *
6868
- * @tags Users
6869
- * @name AddAssetToUser
6870
- * @summary Add a new asset to the user's wallet based on the asset configuration
6871
- * @request POST:/api/v1/users/assets/add
6872
- * @secure
6873
- */
6874
- 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)),
6875
- /**
6876
- * No description
6877
- *
6878
- * @tags Users
6879
- * @name RemoveAssetFromUser
6880
- * @summary Remove an asset from the user's wallet based on the asset configuration
6881
- * @request DELETE:/api/v1/users/{userId}/wallets/{walletId}/assets/{assetConfigId}
6882
- * @secure
6883
- */
6884
- removeAssetFromUser: (_a, params) => {
6885
- var { assetConfigId, walletId, userId } = _a; __rest(_a, ["assetConfigId", "walletId", "userId"]);
6886
- if (params === void 0) { params = {}; }
6887
- return this.http.request(Object.assign({ path: `/api/v1/users/${userId}/wallets/${walletId}/assets/${assetConfigId}`, method: "DELETE", secure: true, format: "json" }, params));
6888
- },
6889
- /**
6890
- * No description
6891
- *
6892
- * @tags Users
6893
- * @name GetUserByUserId
6894
- * @summary Returns user public data
6895
- * @request GET:/api/v1/users/{userId}
6896
- * @secure
6897
- */
6898
- getUserByUserId: (_a, params) => {
6899
- var { userId } = _a; __rest(_a, ["userId"]);
6900
- if (params === void 0) { params = {}; }
6901
- return this.http.request(Object.assign({ path: `/api/v1/users/${userId}`, method: "GET", secure: true, format: "json" }, params));
6902
- },
6903
- /**
6904
- * No description
6905
- *
6906
- * @tags Users
6907
- * @name GetUserByExternalUserId
6908
- * @request GET:/api/v1/users/{externalUserId}/externalUserId
6909
- * @secure
6910
- */
6911
- getUserByExternalUserId: (_a, params) => {
6912
- var { externalUserId } = _a; __rest(_a, ["externalUserId"]);
6913
- if (params === void 0) { params = {}; }
6914
- return this.http.request(Object.assign({ path: `/api/v1/users/${externalUserId}/externalUserId`, method: "GET", secure: true, format: "json" }, params));
6915
- },
6916
- /**
6917
- * No description
6918
- *
6919
- * @tags Users
6920
- * @name GetParticipantsByUserId
6921
- * @summary Returns multisig participants by user id
6922
- * @request GET:/api/v1/users/{userId}/multisig-transactions
6923
- * @secure
6924
- */
6925
- getParticipantsByUserId: (_a, params) => {
6926
- var { userId } = _a, query = __rest(_a, ["userId"]);
6927
- if (params === void 0) { params = {}; }
6928
- return this.http.request(Object.assign({ path: `/api/v1/users/${userId}/multisig-transactions`, method: "GET", query: query, secure: true, format: "json" }, params));
6929
- },
6930
- };
6931
- this.adminTransactions = {
6932
- /**
6933
- * No description
6934
- *
6935
- * @tags Admin-Transactions
6936
- * @name CreateReleaseSchedule
6937
- * @summary Request the creation of a release schedule
6938
- * @request POST:/api/v1/transactions/admin/release-schedule
6939
- * @secure
6940
- */
6941
- 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)),
6942
- /**
6943
- * No description
6944
- *
6945
- * @tags Admin-Transactions
6946
- * @name ViewReleaseSchedule
6947
- * @summary View a release schedule
6948
- * @request GET:/api/v1/transactions/admin/release-schedule
6949
- * @secure
6950
- */
6951
- viewReleaseSchedule: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/admin/release-schedule`, method: "GET", query: query, secure: true, format: "json" }, params)),
6952
- /**
6953
- * No description
6954
- *
6955
- * @tags Admin-Transactions
6956
- * @name Mint
6957
- * @summary Request the minting of an asset to addresses either via mint release schedule or directly
6958
- * @request POST:/api/v1/transactions/admin/mint
6959
- * @secure
6960
- */
6961
- 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)),
6962
- /**
6963
- * No description
6964
- *
6965
- * @tags Admin-Transactions
6966
- * @name Burn
6967
- * @summary Request the burning of an asset to address(es) directly
6968
- * @request POST:/api/v1/transactions/admin/burn
6969
- * @secure
6970
- */
6971
- 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)),
6972
- /**
6973
- * No description
6974
- *
6975
- * @tags Admin-Transactions
6976
- * @name ExecutePurchase
6977
- * @summary Request purchase on the purchase contract
6978
- * @request POST:/api/v1/transactions/admin/execute-purchase
6979
- * @secure
6980
- */
6981
- 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)),
6982
- /**
6983
- * No description
6984
- *
6985
- * @tags Admin-Transactions
6986
- * @name ExecutePurchaseWithInterest
6987
- * @summary Request purchase with interest on the purchase contract
6988
- * @request POST:/api/v1/transactions/admin/execute-purchase-with-interest
6989
- * @secure
6990
- */
6991
- 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)),
6950
+ 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)),
6992
6951
  /**
6993
6952
  * No description
6994
6953
  *
6995
6954
  * @tags Admin-Transactions
6996
6955
  * @name SetIdentity
6997
6956
  * @summary Set identity via the identity registry contract
6998
- * @request POST:/api/v1/transactions/admin/set-identity
6957
+ * @request POST:/transactions/admin/set-identity
6999
6958
  * @secure
7000
6959
  */
7001
- 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)),
6960
+ 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)),
7002
6961
  /**
7003
6962
  * No description
7004
6963
  *
7005
6964
  * @tags Admin-Transactions
7006
6965
  * @name ForceClaim
7007
6966
  * @summary Force claim interest via the interest payment contract
7008
- * @request POST:/api/v1/transactions/admin/force-claim
6967
+ * @request POST:/transactions/admin/force-claim
7009
6968
  * @secure
7010
6969
  */
7011
- 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)),
6970
+ 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)),
7012
6971
  /**
7013
6972
  * No description
7014
6973
  *
7015
6974
  * @tags Admin-Transactions
7016
6975
  * @name ForceClaimPrincipal
7017
6976
  * @summary Force claim principal via the interest payment contract
7018
- * @request POST:/api/v1/transactions/admin/force-claim-principal
6977
+ * @request POST:/transactions/admin/force-claim-principal
7019
6978
  * @secure
7020
6979
  */
7021
- 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)),
6980
+ 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)),
7022
6981
  /**
7023
6982
  * No description
7024
6983
  *
7025
6984
  * @tags Admin-Transactions
7026
6985
  * @name GetCallbackPublicKey
7027
- * @request GET:/api/v1/transactions/admin/callback_pk
7028
- * @secure
6986
+ * @request GET:/transactions/admin/callback_pk
7029
6987
  */
7030
- getCallbackPublicKey: (params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/admin/callback_pk`, method: "GET", secure: true }, params)),
6988
+ getCallbackPublicKey: (params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/callback_pk`, method: "GET" }, params)),
7031
6989
  /**
7032
6990
  * No description
7033
6991
  *
7034
6992
  * @tags Admin-Transactions
7035
6993
  * @name ViewAdminTransaction
7036
6994
  * @summary View an admin transaction
7037
- * @request GET:/api/v1/transactions/admin/{referenceId}
6995
+ * @request GET:/transactions/admin/{referenceId}
7038
6996
  * @secure
7039
6997
  */
7040
6998
  viewAdminTransaction: (_a, params) => {
7041
6999
  var { referenceId } = _a; __rest(_a, ["referenceId"]);
7042
7000
  if (params === void 0) { params = {}; }
7043
- return this.http.request(Object.assign({ path: `/api/v1/transactions/admin/${referenceId}`, method: "GET", secure: true, format: "json" }, params));
7001
+ return this.http.request(Object.assign({ path: `/transactions/admin/${referenceId}`, method: "GET", secure: true, format: "json" }, params));
7044
7002
  },
7045
7003
  /**
7046
7004
  * No description
@@ -7048,30 +7006,9 @@ class Api {
7048
7006
  * @tags Admin-Transactions
7049
7007
  * @name UpsideCallback
7050
7008
  * @summary Upside callback for release schedule
7051
- * @request POST:/api/v1/transactions/admin/callback
7052
- * @secure
7009
+ * @request POST:/transactions/admin/callback
7053
7010
  */
7054
- 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)),
7055
- };
7056
- this.v1 = {
7057
- /**
7058
- * No description
7059
- *
7060
- * @name DashboardControllerGetDashboardData
7061
- * @summary Create new merchant. This endpoint is only available for super admin and republic admin
7062
- * @request GET:/api/v1/dashboard
7063
- * @secure
7064
- */
7065
- dashboardControllerGetDashboardData: (params = {}) => this.http.request(Object.assign({ path: `/api/v1/dashboard`, method: "GET", secure: true }, params)),
7066
- /**
7067
- * No description
7068
- *
7069
- * @name GetActivitiees
7070
- * @summary Get all activities. This endpoint is only available for super admin and republic admin
7071
- * @request GET:/api/v1/users-activities
7072
- * @secure
7073
- */
7074
- getActivitiees: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/users-activities`, method: "GET", query: query, secure: true }, params)),
7011
+ upsideCallback: (data, params = {}) => this.http.request(Object.assign({ path: `/transactions/admin/callback`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
7075
7012
  };
7076
7013
  this.http = http;
7077
7014
  }
@@ -7095,11 +7032,16 @@ function objectToQueryParams(obj) {
7095
7032
 
7096
7033
  class Base {
7097
7034
  constructor(config) {
7035
+ var _a, _b;
7098
7036
  const sanitizedConfig = sanitizeConfig(config);
7099
7037
  this.apiKey = sanitizedConfig.apiKey;
7100
7038
  this.baseUrl = sanitizedConfig.baseUrl;
7101
7039
  this.userId = sanitizedConfig.userId;
7102
7040
  this.options = sanitizedConfig.options;
7041
+ if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.platform) {
7042
+ this.options.platform;
7043
+ this.options.platform === 'ios' || this.options.platform === 'android';
7044
+ }
7103
7045
  this.cipher = new Cipher();
7104
7046
  this.lockManager = new LockManagerService();
7105
7047
  this._initializeClientAuthToken(sanitizedConfig.clientAuthToken);
@@ -7144,10 +7086,7 @@ class Base {
7144
7086
  }
7145
7087
  };
7146
7088
  this.api = new Api(httpClient);
7147
- this.api.http.setSecurityData({
7148
- 'x-api-key': config.apiKey,
7149
- 'x-client-jwt': config.clientAuthToken,
7150
- });
7089
+ 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));
7151
7090
  }
7152
7091
  set setClientAuthToken(token) {
7153
7092
  this._initializeClientAuthToken(token);
@@ -7594,6 +7533,24 @@ const TransactionsRoutes = {
7594
7533
  },
7595
7534
  };
7596
7535
 
7536
+ const SwapRoutes = {
7537
+ getQuote: {
7538
+ fullPath: ({ walletId }) => `/api/v1/wallets/${walletId}/swap/quote`,
7539
+ method: exports.RequestMethod.Post,
7540
+ requiresAccessToken: true,
7541
+ },
7542
+ executeSwap: {
7543
+ fullPath: ({ walletId }) => `/api/v1/wallets/${walletId}/swap`,
7544
+ method: exports.RequestMethod.Post,
7545
+ requiresAccessToken: true,
7546
+ },
7547
+ getSwaps: {
7548
+ fullPath: ({ walletId }) => `/api/v1/wallets/${walletId}/swaps`,
7549
+ method: exports.RequestMethod.Get,
7550
+ requiresAccessToken: true,
7551
+ },
7552
+ };
7553
+
7597
7554
  /* eslint-disable no-useless-catch */
7598
7555
  /**
7599
7556
  * Web Authenticator Implementation
@@ -7680,6 +7637,50 @@ class Authenticator {
7680
7637
  }
7681
7638
  }
7682
7639
 
7640
+ /**
7641
+ * Shared base64 helpers. Platform-specific files (base64.ts, base64.native.ts)
7642
+ * import from here and add or re-export as needed.
7643
+ */
7644
+ function normalizeAndPadBase64(s) {
7645
+ const normalized = s.replace(/-/g, '+').replace(/_/g, '/');
7646
+ return normalized.padEnd(normalized.length + ((4 - (normalized.length % 4)) % 4), '=');
7647
+ }
7648
+ function decodeBase64String(s) {
7649
+ return jsBase64.toUint8Array(normalizeAndPadBase64(s));
7650
+ }
7651
+ function decodeBase64URL(base64url) {
7652
+ const padded = normalizeAndPadBase64(base64url);
7653
+ const binary = jsBase64.atob(padded);
7654
+ const bytes = new Uint8Array(binary.length);
7655
+ for (let i = 0; i < binary.length; i++) {
7656
+ bytes[i] = binary.charCodeAt(i);
7657
+ }
7658
+ return bytes;
7659
+ }
7660
+
7661
+ /**
7662
+ * Web: round-trip with uint8ArrayToBase64 (which does btoa(fromUint8Array(bytes, true))).
7663
+ * Single decode first; if the result looks like a base64 string, decode again to get original bytes.
7664
+ */
7665
+ function base64ToUint8Array(base64) {
7666
+ try {
7667
+ const first = jsBase64.toUint8Array(base64);
7668
+ const asStr = String.fromCharCode.apply(null, first);
7669
+ if (/^[A-Za-z0-9+/\-_=]*$/.test(asStr) && asStr.length >= 4) {
7670
+ try {
7671
+ return decodeBase64String(asStr);
7672
+ }
7673
+ catch (_a) {
7674
+ // fall through
7675
+ }
7676
+ }
7677
+ return first;
7678
+ }
7679
+ catch (_b) {
7680
+ return decodeBase64String(base64);
7681
+ }
7682
+ }
7683
+
7683
7684
  class PasskeyService {
7684
7685
  constructor(userId, storageService, request) {
7685
7686
  this.cipher = new Cipher();
@@ -7691,7 +7692,7 @@ class PasskeyService {
7691
7692
  preparePasskeyRequestOptions(options) {
7692
7693
  var _a, _b, _c, _d, _e, _f;
7693
7694
  const prfExtensionEvaluation = ((_b = (_a = options.extensions) === null || _a === void 0 ? void 0 : _a.prf.eval) === null || _b === void 0 ? void 0 : _b.base64)
7694
- ? WebAuthn__namespace.base64URLStringToBuffer(options.extensions.prf.eval.base64)
7695
+ ? decodeBase64URL(options.extensions.prf.eval.base64)
7695
7696
  : ((_d = (_c = options.extensions) === null || _c === void 0 ? void 0 : _c.prf.eval) === null || _d === void 0 ? void 0 : _d.first) instanceof ArrayBuffer
7696
7697
  ? new Uint8Array(options.extensions.prf.eval.first)
7697
7698
  : typeof ((_f = (_e = options.extensions) === null || _e === void 0 ? void 0 : _e.prf.eval) === null || _f === void 0 ? void 0 : _f.first) === 'object'
@@ -7711,7 +7712,7 @@ class PasskeyService {
7711
7712
  preparePasskeyCreationOptions(options) {
7712
7713
  var _a, _b, _c, _d, _e, _f;
7713
7714
  const prfExtensionEvaluation = ((_b = (_a = options.extensions) === null || _a === void 0 ? void 0 : _a.prf.eval) === null || _b === void 0 ? void 0 : _b.base64)
7714
- ? WebAuthn__namespace.base64URLStringToBuffer(options.extensions.prf.eval.base64)
7715
+ ? decodeBase64URL(options.extensions.prf.eval.base64)
7715
7716
  : ((_d = (_c = options.extensions) === null || _c === void 0 ? void 0 : _c.prf.eval) === null || _d === void 0 ? void 0 : _d.first) instanceof ArrayBuffer
7716
7717
  ? new Uint8Array(options.extensions.prf.eval.first)
7717
7718
  : typeof ((_f = (_e = options.extensions) === null || _e === void 0 ? void 0 : _e.prf.eval) === null || _f === void 0 ? void 0 : _f.first) === 'object'
@@ -8112,8 +8113,50 @@ class PasskeyService {
8112
8113
  errorCode: exports.ErrorResponseCodes.sdk_passkey_prf_not_available,
8113
8114
  });
8114
8115
  }
8115
- const prfValue = new Uint8Array((_e = extensions.prf.results) === null || _e === void 0 ? void 0 : _e.first);
8116
- logger.debug('SDK::PasskeyService::handleCredentialsCreationFromPrfExtension::prfValue', !!prfValue);
8116
+ const prfResult = (_e = extensions.prf.results) === null || _e === void 0 ? void 0 : _e.first;
8117
+ let prfValue;
8118
+ if (typeof prfResult === 'string') {
8119
+ prfValue = base64ToUint8Array(prfResult);
8120
+ }
8121
+ else if (prfResult instanceof Uint8Array) {
8122
+ prfValue = prfResult;
8123
+ }
8124
+ else if (prfResult instanceof ArrayBuffer) {
8125
+ prfValue = new Uint8Array(prfResult);
8126
+ }
8127
+ else if (ArrayBuffer.isView(prfResult)) {
8128
+ prfValue = new Uint8Array(prfResult.buffer);
8129
+ }
8130
+ else if (Array.isArray(prfResult)) {
8131
+ prfValue = new Uint8Array(prfResult);
8132
+ }
8133
+ else if (prfResult && typeof prfResult === 'object') {
8134
+ const data = prfResult.data;
8135
+ if (Array.isArray(data)) {
8136
+ prfValue = new Uint8Array(data);
8137
+ }
8138
+ else {
8139
+ const values = Object.values(prfResult);
8140
+ if (values.length && values.every((value) => typeof value === 'number')) {
8141
+ prfValue = new Uint8Array(values);
8142
+ }
8143
+ else {
8144
+ throw new WallabyError({
8145
+ message: 'Unsupported PRF result type.',
8146
+ statusCode: 400,
8147
+ errorCode: exports.ErrorResponseCodes.sdk_passkey_prf_not_available,
8148
+ });
8149
+ }
8150
+ }
8151
+ }
8152
+ else {
8153
+ throw new WallabyError({
8154
+ message: 'Unsupported PRF result type.',
8155
+ statusCode: 400,
8156
+ errorCode: exports.ErrorResponseCodes.sdk_passkey_prf_not_available,
8157
+ });
8158
+ }
8159
+ logger.debug('SDK::PasskeyService::handleCredentialsCreationFromPrfExtension::prfValue', prfValue);
8117
8160
  const credentialsKeyPair = await this.cipher.getCredentialsKeyPair({
8118
8161
  prfValue,
8119
8162
  authType: exports.AuthType.Passkey,
@@ -8456,7 +8499,6 @@ class AuthService extends Base {
8456
8499
  let deviceKeyPair;
8457
8500
  // This logic needs to change and depend on data from server.
8458
8501
  if (!passkeyCredential) {
8459
- console.debug('SDK::AuthService::handleSignInWithPasskey:: creating new key pair');
8460
8502
  deviceKeyPair = createIdentity();
8461
8503
  devicePublicKey = deviceKeyPair.publicKey;
8462
8504
  await this.localStorageService.save(exports.LocalStorageItems.ClientAuthPublicKey, devicePublicKey);
@@ -10496,7 +10538,7 @@ class WalletDataService extends Base {
10496
10538
  * @param { string } address Wallet address
10497
10539
  * @param { string } symbol Token symbol
10498
10540
  * @param { BlockchainName } chainName the chain name enum. i.e. 'ETHEREUM', 'BITCOIN'
10499
- * @returns { TokenBalanceResponse } The wallet has been created successfully
10541
+ * @returns { TokenBalance } Balance of the token
10500
10542
  */
10501
10543
  async getTokenBalance({ address, symbol, tokenStandard, chainName }) {
10502
10544
  try {
@@ -10537,7 +10579,7 @@ class WalletDataService extends Base {
10537
10579
  });
10538
10580
  }
10539
10581
  const response = await this.request(WalletRoutes.getMultiTokenBalances, {
10540
- payload: { tokensAndAddressesList },
10582
+ payload: { assets: tokensAndAddressesList },
10541
10583
  });
10542
10584
  return response;
10543
10585
  }
@@ -10625,10 +10667,20 @@ class WalletDataService extends Base {
10625
10667
  * Get all assets that exist in a certain wallet, by specifying a wallet ID
10626
10668
  * @param walletId Wallaby's wallet ID
10627
10669
  * @param { BasicQueryOptions } queryOptions Optional query options
10670
+ * @param { string } [queryOptions.search] - Search assets by name or symbol (minimum 3 characters)
10671
+ * @param { BlockchainName } [queryOptions.chainName] - Filter assets by blockchain name
10628
10672
  * @returns { GetUserAssetsByWalletIdData } Returns all assets belonging in a certain wallet ID
10629
10673
  */
10630
10674
  async getWalletAssets({ walletId, queryOptions }) {
10631
10675
  try {
10676
+ // Validate search parameter if provided
10677
+ if ((queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.search) !== undefined && queryOptions.search.length < 3) {
10678
+ throw new WallabyError({
10679
+ message: 'Search parameter must be at least 3 characters long',
10680
+ statusCode: 400,
10681
+ errorCode: exports.ErrorResponseCodes.sdk_invalid_parameter,
10682
+ });
10683
+ }
10632
10684
  const response = await this.request(WalletRoutes.getWalletAssets, {
10633
10685
  payload: {
10634
10686
  walletId,
@@ -11098,6 +11150,246 @@ class HttpApi extends Base {
11098
11150
  }
11099
11151
  }
11100
11152
 
11153
+ class Swap extends Base {
11154
+ constructor(config) {
11155
+ super(config);
11156
+ this.authService = new AuthService(config);
11157
+ this.walletService = new WalletService(config);
11158
+ }
11159
+ /**
11160
+ * Gets a swap quote between two assets (from/to), including fees, min output, and slippage limits.
11161
+ *
11162
+ * @public
11163
+ * @param {SwapQuoteRequest} request - The swap quote request parameters
11164
+ * @returns {Promise<SwapQuoteResponse>} A promise that resolves with the swap quote
11165
+ */
11166
+ async getQuote({ walletId, fromAsset, toAsset, fromAmount, toAmount }) {
11167
+ try {
11168
+ if (!walletId || !fromAsset || !toAsset) {
11169
+ throw new WallabyError({
11170
+ message: 'Missing required parameters: walletId, fromAsset, and toAsset are required',
11171
+ statusCode: 400,
11172
+ errorCode: exports.ErrorResponseCodes.sdk_missing_parameter,
11173
+ });
11174
+ }
11175
+ if (!fromAmount && !toAmount) {
11176
+ throw new WallabyError({
11177
+ message: 'Either fromAmount or toAmount must be provided',
11178
+ statusCode: 400,
11179
+ errorCode: exports.ErrorResponseCodes.sdk_missing_parameter,
11180
+ });
11181
+ }
11182
+ // Build path with walletId, but exclude it from request body
11183
+ const routePayload = { walletId };
11184
+ const requestBody = Object.assign(Object.assign({ fromAsset,
11185
+ toAsset }, (fromAmount && { fromAmount })), (toAmount && { toAmount }));
11186
+ const response = await this.request(Object.assign(Object.assign({}, SwapRoutes.getQuote), { fullPath: SwapRoutes.getQuote.fullPath(routePayload) }), {
11187
+ payload: requestBody,
11188
+ });
11189
+ return response;
11190
+ }
11191
+ catch (error) {
11192
+ logger.error('SDK::Swap::getQuote::error', error);
11193
+ throw error;
11194
+ }
11195
+ }
11196
+ /**
11197
+ * Executes a swap using a previously generated quote.
11198
+ *
11199
+ * @public
11200
+ * @param {ExecuteSwapRequest} request - The execute swap request parameters
11201
+ * @returns {Promise<ExecuteSwapResponse>} A promise that resolves with the swap execution response
11202
+ */
11203
+ async executeSwap({ walletId, quoteId, authenticationOptions }) {
11204
+ try {
11205
+ // Only attempt migration if we have password auth and V2 storage might be incomplete
11206
+ if (this.deviceAuthType === exports.AuthType.Password && authenticationOptions.password) {
11207
+ try {
11208
+ await this.walletService.handleUpdateToV2({
11209
+ password: authenticationOptions.password,
11210
+ walletId: walletId,
11211
+ });
11212
+ }
11213
+ catch (error) {
11214
+ logger.error('SDK::Swap::executeSwap::handleUpdateToV2::error', error);
11215
+ throw new WallabyError({
11216
+ message: 'Error accessing user wallet on this device. Please ensure the password is correct and try again.',
11217
+ statusCode: 500,
11218
+ errorCode: exports.ErrorResponseCodes.sdk_unknown_error,
11219
+ });
11220
+ }
11221
+ }
11222
+ const { deviceAuthPublicKey, signatureMessage, readyForTransportSeedPhrase, sharesEncryptedWithWallabyPubKey, hasShares } = await this.prepareSwapAuth(authenticationOptions, walletId);
11223
+ let swapResponse;
11224
+ // Build path with walletId, but exclude it from request body
11225
+ const routePayload = { walletId };
11226
+ if (readyForTransportSeedPhrase) {
11227
+ swapResponse = await this.request(Object.assign(Object.assign({}, SwapRoutes.executeSwap), { fullPath: SwapRoutes.executeSwap.fullPath(routePayload) }), {
11228
+ payload: {
11229
+ quoteId,
11230
+ message: signatureMessage.message,
11231
+ signature: signatureMessage.signature,
11232
+ clientAuthPubKey: deviceAuthPublicKey,
11233
+ encryptedSeed: readyForTransportSeedPhrase,
11234
+ },
11235
+ });
11236
+ }
11237
+ else if (hasShares) {
11238
+ swapResponse = await this.request(Object.assign(Object.assign({}, SwapRoutes.executeSwap), { fullPath: SwapRoutes.executeSwap.fullPath(routePayload) }), {
11239
+ payload: {
11240
+ quoteId,
11241
+ message: signatureMessage.message,
11242
+ signature: signatureMessage.signature,
11243
+ clientAuthPubKey: deviceAuthPublicKey,
11244
+ encryptedShares: sharesEncryptedWithWallabyPubKey,
11245
+ },
11246
+ });
11247
+ }
11248
+ else {
11249
+ throw new WallabyError({
11250
+ message: 'No valid seed option found on this device.',
11251
+ statusCode: 400,
11252
+ errorCode: exports.ErrorResponseCodes.sdk_no_valid_seed_option,
11253
+ });
11254
+ }
11255
+ return swapResponse;
11256
+ }
11257
+ catch (error) {
11258
+ logger.error('SDK::Swap::executeSwap::error', error);
11259
+ throw error;
11260
+ }
11261
+ }
11262
+ /**
11263
+ * Lists executed swap transactions for a given wallet, with optional date and pagination filters.
11264
+ *
11265
+ * @public
11266
+ * @param {GetSwapsRequest} request - The get swaps request parameters
11267
+ * @returns {Promise<GetSwapsResponse>} A promise that resolves with the list of swaps
11268
+ */
11269
+ async getSwaps({ walletId, queryParams }) {
11270
+ try {
11271
+ if (!walletId) {
11272
+ throw new WallabyError({
11273
+ message: 'Missing required parameter: walletId',
11274
+ statusCode: 400,
11275
+ errorCode: exports.ErrorResponseCodes.sdk_missing_parameter,
11276
+ });
11277
+ }
11278
+ // Build path with walletId
11279
+ const routePayload = { walletId };
11280
+ const response = await this.request(Object.assign(Object.assign({}, SwapRoutes.getSwaps), { fullPath: SwapRoutes.getSwaps.fullPath(routePayload) }), {
11281
+ queryParams: queryParams,
11282
+ });
11283
+ return response;
11284
+ }
11285
+ catch (error) {
11286
+ logger.error('SDK::Swap::getSwaps::error', error);
11287
+ throw error;
11288
+ }
11289
+ }
11290
+ /**
11291
+ * Prepares authentication data and encrypted payload for swap requests
11292
+ * @private
11293
+ */
11294
+ async prepareSwapAuth(authenticationOptions, walletId) {
11295
+ const { password, prfValue, user, clientSalt: authClientSalt } = authenticationOptions;
11296
+ const encryptedDevicePrivateKey = await this.localStorageService.fetch(exports.LocalStorageItems.EncryptedDevicePrivateKey, {
11297
+ walletId,
11298
+ });
11299
+ if (!encryptedDevicePrivateKey) {
11300
+ throw new WallabyError({
11301
+ message: 'No private key was found on this device.',
11302
+ statusCode: 400,
11303
+ errorCode: exports.ErrorResponseCodes.sdk_private_key_not_found,
11304
+ });
11305
+ }
11306
+ // Get credentials key pair for device private key decryption
11307
+ const clientSalt = authClientSalt || user.clientSalt;
11308
+ const credentialsKeyPair = await this.cipher.getCredentialsKeyPair({
11309
+ authType: this.deviceAuthType,
11310
+ password,
11311
+ prfValue,
11312
+ salt: clientSalt,
11313
+ });
11314
+ // Decrypt device private key
11315
+ const decryptedDevicePrivateKey = await this.cipher.decrypt({
11316
+ cipherText: JSON.parse(encryptedDevicePrivateKey),
11317
+ decryptionKey: credentialsKeyPair.privateKey,
11318
+ });
11319
+ if (!decryptedDevicePrivateKey) {
11320
+ throw new WallabyError({
11321
+ message: 'Credentials are wrong, please pass the correct credentials.',
11322
+ statusCode: 400,
11323
+ errorCode: exports.ErrorResponseCodes.sdk_private_key_decryption_failed,
11324
+ });
11325
+ }
11326
+ const deviceAuthPublicKey = publicKeyByPrivateKey(decryptedDevicePrivateKey);
11327
+ // Get signature message
11328
+ const signatureMessage = await this.authService.getSignature({
11329
+ publicKey: deviceAuthPublicKey,
11330
+ privateKey: decryptedDevicePrivateKey,
11331
+ }, this.deviceAuthType === exports.AuthType.Passkey ? exports.PasskeyChallengeType.AUTHENTICATION : undefined);
11332
+ // Prepare encrypted data (seed phrase or key shares)
11333
+ const sharesEncryptedWithWallabyPubKey = [];
11334
+ let readyForTransportSeedPhrase = undefined;
11335
+ const primaryKeyShare = await this.localStorageService.fetch(exports.LocalStorageItems.PrimaryDeviceKeyShare, { walletId });
11336
+ if (!primaryKeyShare) {
11337
+ // No primary share, try seed phrase
11338
+ const encryptedSeedPhrase = await this.localStorageService.fetch(exports.LocalStorageItems.EncryptedStandardSeedPhrase, {
11339
+ walletId,
11340
+ });
11341
+ if (!encryptedSeedPhrase) {
11342
+ throw new WallabyError({
11343
+ message: 'Your device does not have a seed phrase or an operating share to sign the transaction.',
11344
+ statusCode: 400,
11345
+ errorCode: exports.ErrorResponseCodes.sdk_seed_phrase_not_found,
11346
+ });
11347
+ }
11348
+ const parsedSeedPhrase = safeJsonParse(encryptedSeedPhrase);
11349
+ readyForTransportSeedPhrase = await this.cipher.prepareStoredDataForTransport({
11350
+ storedEncryptedData: parsedSeedPhrase,
11351
+ encryptedDevicePrivateKey: JSON.parse(encryptedDevicePrivateKey),
11352
+ wallabyPublicKey: user.wallabyAuthPubKey,
11353
+ options: {
11354
+ authType: this.deviceAuthType,
11355
+ password,
11356
+ prfValue,
11357
+ salt: clientSalt,
11358
+ },
11359
+ });
11360
+ }
11361
+ else {
11362
+ // Use primary key share
11363
+ const parsedPrimaryShare = safeJsonParse(primaryKeyShare);
11364
+ const readyForTransportShare = await this.cipher.prepareStoredDataForTransport({
11365
+ storedEncryptedData: parsedPrimaryShare,
11366
+ encryptedDevicePrivateKey: JSON.parse(encryptedDevicePrivateKey),
11367
+ wallabyPublicKey: user.wallabyAuthPubKey,
11368
+ options: {
11369
+ authType: this.deviceAuthType,
11370
+ password,
11371
+ prfValue,
11372
+ salt: clientSalt,
11373
+ },
11374
+ });
11375
+ sharesEncryptedWithWallabyPubKey.push(readyForTransportShare);
11376
+ }
11377
+ return Object.freeze({
11378
+ deviceAuthPublicKey,
11379
+ signatureMessage,
11380
+ readyForTransportSeedPhrase,
11381
+ sharesEncryptedWithWallabyPubKey,
11382
+ hasShares: sharesEncryptedWithWallabyPubKey.length > 0,
11383
+ });
11384
+ }
11385
+ }
11386
+ __decorate([
11387
+ WithLock('executeSwap'),
11388
+ __metadata("design:type", Function),
11389
+ __metadata("design:paramtypes", [Object]),
11390
+ __metadata("design:returntype", Promise)
11391
+ ], Swap.prototype, "executeSwap", null);
11392
+
11101
11393
  /**
11102
11394
  * Sanitizes a Sui object ID by removing any part of the string after '::'.
11103
11395
  *
@@ -11124,13 +11416,14 @@ class System extends Base {
11124
11416
  /**
11125
11417
  * @public
11126
11418
  * Get all supported chains
11127
- * @param {null}
11419
+ * @param {Object} [options] - Optional query parameters
11420
+ * @param {boolean} [options.supportSwaps] - When true, include only chains that support swaps
11128
11421
  * @returns {Array<Blockchain>} Array of supported chains
11129
11422
  */
11130
- async getSupportedBlockchains() {
11423
+ async getSupportedBlockchains(options) {
11131
11424
  try {
11132
11425
  const response = await this.request(SystemRoutes.getSupportedBlockchains, {
11133
- payload: {},
11426
+ queryParams: (options === null || options === void 0 ? void 0 : options.supportSwaps) !== undefined ? { supportSwaps: options.supportSwaps } : undefined,
11134
11427
  });
11135
11428
  return response.chains;
11136
11429
  }
@@ -11235,13 +11528,33 @@ class System extends Base {
11235
11528
  /**
11236
11529
  * @public
11237
11530
  * Get all supported assets configuration
11238
- * @param {null}
11531
+ * @param {Object} [options] - Optional query parameters
11532
+ * @param {boolean} [options.supportsSwaps] - When true, filter to assets that support swaps
11533
+ * @param {string} [options.search] - Search assets by name or symbol (minimum 3 characters)
11534
+ * @param {BlockchainName} [options.chainName] - Filter assets by blockchain name
11239
11535
  * @returns {Array<AssetConfig>} Array of supported tokens
11240
11536
  */
11241
- async getSupportedTokens() {
11537
+ async getSupportedTokens(options) {
11242
11538
  try {
11539
+ const queryParams = {};
11540
+ if ((options === null || options === void 0 ? void 0 : options.supportsSwaps) !== undefined) {
11541
+ queryParams.supportsSwaps = options.supportsSwaps;
11542
+ }
11543
+ if ((options === null || options === void 0 ? void 0 : options.search) !== undefined) {
11544
+ if (options.search.length < 3) {
11545
+ throw new WallabyError({
11546
+ message: 'Search parameter must be at least 3 characters long',
11547
+ statusCode: 400,
11548
+ errorCode: exports.ErrorResponseCodes.sdk_invalid_parameter,
11549
+ });
11550
+ }
11551
+ queryParams.search = options.search;
11552
+ }
11553
+ if ((options === null || options === void 0 ? void 0 : options.chainName) !== undefined) {
11554
+ queryParams.chainName = options.chainName;
11555
+ }
11243
11556
  const response = await this.request(SystemRoutes.getSupportedTokens, {
11244
- payload: {},
11557
+ queryParams: Object.keys(queryParams).length > 0 ? queryParams : undefined,
11245
11558
  });
11246
11559
  return response.assets;
11247
11560
  }
@@ -11384,9 +11697,10 @@ class Transactions extends Base {
11384
11697
  * @param {string} reference
11385
11698
  * @param {AuthenticationResponse} authenticationOptions
11386
11699
  * @param {string} memo
11700
+ * @param {TransactionType} transactionType
11387
11701
  * @returns {TransactionResponse}
11388
11702
  */
11389
- async transfer({ originAddress, recipientAddress, amount, assetId, walletId, reference, authenticationOptions, memo, }) {
11703
+ async transfer({ originAddress, recipientAddress, amount, assetId, walletId, reference, authenticationOptions, memo, transactionType, }) {
11390
11704
  try {
11391
11705
  // Only attempt migration if we have password auth and V2 storage might be incomplete
11392
11706
  if (this.deviceAuthType === exports.AuthType.Password && authenticationOptions.password) {
@@ -11412,7 +11726,8 @@ class Transactions extends Base {
11412
11726
  payload: Object.assign(Object.assign({}, signatureMessage), { clientAuthPubKey: deviceAuthPublicKey, encryptedSeed: readyForTransportSeedPhrase, originAddress,
11413
11727
  recipientAddress,
11414
11728
  assetId,
11415
- amount, reference: reference || uuid.v4(), memo }),
11729
+ amount, reference: reference || uuid.v4(), memo,
11730
+ transactionType }),
11416
11731
  });
11417
11732
  }
11418
11733
  else if (hasShares) {
@@ -11420,14 +11735,15 @@ class Transactions extends Base {
11420
11735
  payload: Object.assign(Object.assign({}, signatureMessage), { clientAuthPubKey: deviceAuthPublicKey, encryptedShares: sharesEncryptedWithWallabyPubKey, originAddress,
11421
11736
  recipientAddress,
11422
11737
  assetId,
11423
- amount, reference: reference || uuid.v4(), memo }),
11738
+ amount, reference: reference || uuid.v4(), memo,
11739
+ transactionType }),
11424
11740
  });
11425
11741
  }
11426
11742
  else {
11427
11743
  throw new WallabyError({
11428
11744
  message: 'No valid seed option found on this device.',
11429
11745
  statusCode: 400,
11430
- errorCode: 'sdk_no_valid_seed_option',
11746
+ errorCode: exports.ErrorResponseCodes.sdk_no_valid_seed_option,
11431
11747
  });
11432
11748
  }
11433
11749
  return transferResponse;
@@ -11449,10 +11765,11 @@ class Transactions extends Base {
11449
11765
  * @param {string} suiObjectId
11450
11766
  * @param {string} reference
11451
11767
  * @param {string} memo
11768
+ * @param {TransactionType} transactionType
11452
11769
  * @returns {CreateAllowanceResponse}
11453
11770
  *
11454
11771
  */
11455
- async createAllowance({ authenticationOptions, walletId, ownerAddress, spenderAddress, amount, assetId, suiObjectId, contractAddress, chainName, assetSymbol, reference, memo, }) {
11772
+ async createAllowance({ authenticationOptions, walletId, ownerAddress, spenderAddress, amount, assetId, suiObjectId, contractAddress, chainName, assetSymbol, reference, memo, transactionType, }) {
11456
11773
  try {
11457
11774
  if (!suiObjectId && !contractAddress && !assetId && !assetSymbol && !chainName) {
11458
11775
  throw new WallabyError({
@@ -11493,14 +11810,14 @@ class Transactions extends Base {
11493
11810
  }
11494
11811
  const payload = Object.assign({ message,
11495
11812
  walletId,
11496
- authenticationOptions,
11497
11813
  signature, clientAuthPubKey: deviceAuthPublicKey, ownerAddress,
11498
11814
  spenderAddress,
11499
11815
  chainName,
11500
11816
  assetSymbol,
11501
11817
  amount,
11502
11818
  assetId, contractAddress: contractAddress !== null && contractAddress !== void 0 ? contractAddress : suiObjectId, reference,
11503
- memo }, (hasShares ? { encryptedShares: sharesEncryptedWithWallabyPubKey } : { encryptedSeed: readyForTransportSeedPhrase }));
11819
+ memo,
11820
+ transactionType }, (hasShares ? { encryptedShares: sharesEncryptedWithWallabyPubKey } : { encryptedSeed: readyForTransportSeedPhrase }));
11504
11821
  const response = await this.request(TransactionsRoutes.createAllowance, {
11505
11822
  payload,
11506
11823
  });
@@ -11718,6 +12035,7 @@ class Wallaby {
11718
12035
  this.auth = new AuthService(config);
11719
12036
  this.system = new System(config);
11720
12037
  this.transactions = new Transactions(config);
12038
+ this.swap = new Swap(config);
11721
12039
  this.merchants = new Merchants(config);
11722
12040
  this.httpApi = new HttpApi(config);
11723
12041
  }