wallaby-cash 3.0.2 → 3.1.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.
- package/dist/generated/api.d.ts +724 -1320
- package/dist/index.cjs.js +69 -178
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +69 -178
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +54 -171
- package/dist/index.js.map +1 -1
- package/dist/lib/auth/authenticator.d.ts +1 -0
- package/dist/package.json +12 -21
- package/dist/types/auth.d.ts +1 -0
- package/dist/types/storage.d.ts +2 -0
- package/dist/types/wallet.d.ts +1 -2
- package/package.json +12 -21
package/dist/index.js
CHANGED
|
@@ -201,7 +201,6 @@ var KeyTypeName;
|
|
|
201
201
|
KeyTypeName["WallabyShare"] = "wallaby_share";
|
|
202
202
|
KeyTypeName["OwnerMainDeviceShare"] = "owner_main_device_share";
|
|
203
203
|
KeyTypeName["OwnerBackupDeviceShare"] = "owner_backup_device_share";
|
|
204
|
-
KeyTypeName["AddedUserShare"] = "added_user_share";
|
|
205
204
|
})(KeyTypeName || (KeyTypeName = {}));
|
|
206
205
|
var SeedPhraseType;
|
|
207
206
|
(function (SeedPhraseType) {
|
|
@@ -257,6 +256,7 @@ var AuthType;
|
|
|
257
256
|
var LocalStorageItems;
|
|
258
257
|
(function (LocalStorageItems) {
|
|
259
258
|
LocalStorageItems["AccessToken"] = "access-token";
|
|
259
|
+
LocalStorageItems["RefreshToken"] = "refresh-token";
|
|
260
260
|
LocalStorageItems["EncryptedStandardSeedPhrase"] = "encrypted-standard-seedPhrase";
|
|
261
261
|
LocalStorageItems["EncryptedKeyShares"] = "encrypted-key-shares";
|
|
262
262
|
LocalStorageItems["PrimaryDeviceKeyShare"] = "primary-device-key-share";
|
|
@@ -291,6 +291,7 @@ var V1KeyNames;
|
|
|
291
291
|
var V2KeyNames;
|
|
292
292
|
(function (V2KeyNames) {
|
|
293
293
|
V2KeyNames["AccessToken"] = "access-token";
|
|
294
|
+
V2KeyNames["RefreshToken"] = "refresh-token";
|
|
294
295
|
V2KeyNames["BackupDeviceKeyShare"] = "backup-device-key-share";
|
|
295
296
|
V2KeyNames["ClientAuthPublicKey"] = "client-auth-pub-key";
|
|
296
297
|
V2KeyNames["ClientAuthToken"] = "republic-jwt";
|
|
@@ -573,7 +574,7 @@ const env = {
|
|
|
573
574
|
isNative: false,
|
|
574
575
|
isWeb,
|
|
575
576
|
};
|
|
576
|
-
const currentPackageVersion = "3.0
|
|
577
|
+
const currentPackageVersion = "3.1.0" ;
|
|
577
578
|
|
|
578
579
|
/**
|
|
579
580
|
* Storage keys adapter for Storage interface across different platforms.
|
|
@@ -4753,7 +4754,12 @@ class StorageService {
|
|
|
4753
4754
|
V2KeyNames.PrimaryDeviceKeyShare,
|
|
4754
4755
|
V2KeyNames.BackupDeviceKeyShare,
|
|
4755
4756
|
];
|
|
4756
|
-
this._keysProtectedByMasterKey = [
|
|
4757
|
+
this._keysProtectedByMasterKey = [
|
|
4758
|
+
V2KeyNames.AccessToken,
|
|
4759
|
+
V2KeyNames.RefreshToken,
|
|
4760
|
+
V2KeyNames.PasskeyCredential,
|
|
4761
|
+
V2KeyNames.ClientAuthToken,
|
|
4762
|
+
];
|
|
4757
4763
|
this.userId = userId;
|
|
4758
4764
|
this.environment = environment !== null && environment !== void 0 ? environment : defaultEnvironment;
|
|
4759
4765
|
this.shortenedEnv = this.environment.slice(0, 1); // d for development
|
|
@@ -5115,6 +5121,7 @@ class StorageService {
|
|
|
5115
5121
|
async clearLocalStorage(walletId) {
|
|
5116
5122
|
const userKeysToRemove = [
|
|
5117
5123
|
LocalStorageItems.AccessToken,
|
|
5124
|
+
LocalStorageItems.RefreshToken,
|
|
5118
5125
|
V2KeyNames.EncryptedDevicePrivateKey,
|
|
5119
5126
|
V2KeyNames.WallabyAuthPubKey,
|
|
5120
5127
|
V2KeyNames.PasskeyCredential,
|
|
@@ -5323,7 +5330,7 @@ var ContentType;
|
|
|
5323
5330
|
})(ContentType || (ContentType = {}));
|
|
5324
5331
|
class HttpClient {
|
|
5325
5332
|
constructor(apiConfig = {}) {
|
|
5326
|
-
this.baseUrl = "https://
|
|
5333
|
+
this.baseUrl = "https://dev-testnet.wallaby.cash";
|
|
5327
5334
|
this.securityData = null;
|
|
5328
5335
|
this.abortControllers = new Map();
|
|
5329
5336
|
this.customFetch = (...fetchParams) => fetch(...fetchParams);
|
|
@@ -5458,7 +5465,7 @@ class HttpClient {
|
|
|
5458
5465
|
/**
|
|
5459
5466
|
* @title STAGING
|
|
5460
5467
|
* @version 1.0
|
|
5461
|
-
* @baseUrl https://
|
|
5468
|
+
* @baseUrl https://dev-testnet.wallaby.cash
|
|
5462
5469
|
* @contact
|
|
5463
5470
|
*
|
|
5464
5471
|
* The STAGING is an API that manages the wallets of the Republic Crypto
|
|
@@ -5543,18 +5550,17 @@ class Api {
|
|
|
5543
5550
|
*
|
|
5544
5551
|
* @tags Auth
|
|
5545
5552
|
* @name RefreshAccessToken
|
|
5546
|
-
* @summary
|
|
5553
|
+
* @summary Exchange a refresh token for a new access token and refresh token pair
|
|
5547
5554
|
* @request POST:/api/v1/auth/refresh-access-token
|
|
5548
|
-
* @deprecated
|
|
5549
5555
|
* @secure
|
|
5550
5556
|
*/
|
|
5551
|
-
refreshAccessToken: (params = {}) => this.http.request(Object.assign({ path: `/api/v1/auth/refresh-access-token`, method: "POST", secure: true, format: "json" }, params)),
|
|
5557
|
+
refreshAccessToken: (data, params = {}) => this.http.request(Object.assign({ path: `/api/v1/auth/refresh-access-token`, method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params)),
|
|
5552
5558
|
/**
|
|
5553
|
-
*
|
|
5559
|
+
* @description Invalidates the current access token and its associated refresh token. Other active sessions are preserved.
|
|
5554
5560
|
*
|
|
5555
5561
|
* @tags Auth
|
|
5556
5562
|
* @name Logout
|
|
5557
|
-
* @summary
|
|
5563
|
+
* @summary Revoke the current session by invalidating the access token and its linked refresh token.
|
|
5558
5564
|
* @request POST:/api/v1/auth/logout
|
|
5559
5565
|
* @secure
|
|
5560
5566
|
*/
|
|
@@ -5647,6 +5653,20 @@ class Api {
|
|
|
5647
5653
|
* @secure
|
|
5648
5654
|
*/
|
|
5649
5655
|
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)),
|
|
5656
|
+
/**
|
|
5657
|
+
* No description
|
|
5658
|
+
*
|
|
5659
|
+
* @tags Assets
|
|
5660
|
+
* @name GetAssetConfigById
|
|
5661
|
+
* @summary Get asset configuration by ID
|
|
5662
|
+
* @request GET:/api/v1/assets/configurations/{assetConfigId}
|
|
5663
|
+
* @secure
|
|
5664
|
+
*/
|
|
5665
|
+
getAssetConfigById: (_a, params) => {
|
|
5666
|
+
var { assetConfigId } = _a; __rest(_a, ["assetConfigId"]);
|
|
5667
|
+
if (params === void 0) { params = {}; }
|
|
5668
|
+
return this.http.request(Object.assign({ path: `/api/v1/assets/configurations/${assetConfigId}`, method: "GET", secure: true, format: "json" }, params));
|
|
5669
|
+
},
|
|
5650
5670
|
/**
|
|
5651
5671
|
* No description
|
|
5652
5672
|
*
|
|
@@ -5979,26 +5999,6 @@ class Api {
|
|
|
5979
5999
|
* @secure
|
|
5980
6000
|
*/
|
|
5981
6001
|
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)),
|
|
5982
|
-
/**
|
|
5983
|
-
* No description
|
|
5984
|
-
*
|
|
5985
|
-
* @tags Wallets, MPC
|
|
5986
|
-
* @name ShareWallet
|
|
5987
|
-
* @summary Share an entity wallet with another user
|
|
5988
|
-
* @request POST:/api/v1/wallets/initiate-share-wallet
|
|
5989
|
-
* @secure
|
|
5990
|
-
*/
|
|
5991
|
-
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)),
|
|
5992
|
-
/**
|
|
5993
|
-
* No description
|
|
5994
|
-
*
|
|
5995
|
-
* @tags Wallets, MPC
|
|
5996
|
-
* @name UnshareWallet
|
|
5997
|
-
* @summary Unshare an entity wallet with a user previously granted access
|
|
5998
|
-
* @request POST:/api/v1/wallets/unshare-wallet
|
|
5999
|
-
* @secure
|
|
6000
|
-
*/
|
|
6001
|
-
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)),
|
|
6002
6002
|
/**
|
|
6003
6003
|
* No description
|
|
6004
6004
|
*
|
|
@@ -6063,16 +6063,6 @@ class Api {
|
|
|
6063
6063
|
* @secure
|
|
6064
6064
|
*/
|
|
6065
6065
|
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)),
|
|
6066
|
-
/**
|
|
6067
|
-
* No description
|
|
6068
|
-
*
|
|
6069
|
-
* @tags Wallets, Multisig
|
|
6070
|
-
* @name CreateMultisigAsset
|
|
6071
|
-
* @summary Initiate creation for a new multisig asset, by specifying participants and the threshold
|
|
6072
|
-
* @request POST:/api/v1/wallets/create-multisig-asset
|
|
6073
|
-
* @secure
|
|
6074
|
-
*/
|
|
6075
|
-
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)),
|
|
6076
6066
|
/**
|
|
6077
6067
|
* No description
|
|
6078
6068
|
*
|
|
@@ -6080,6 +6070,7 @@ class Api {
|
|
|
6080
6070
|
* @name InitiateWalletRecovery
|
|
6081
6071
|
* @summary Wallet Recovery - Step 1: Initiate wallet recovery
|
|
6082
6072
|
* @request POST:/api/v1/wallets/recover/init
|
|
6073
|
+
* @deprecated
|
|
6083
6074
|
* @secure
|
|
6084
6075
|
*/
|
|
6085
6076
|
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)),
|
|
@@ -6090,19 +6081,10 @@ class Api {
|
|
|
6090
6081
|
* @name RecoverWallet
|
|
6091
6082
|
* @summary Wallet Recovery - Step 2 and final: Recover the lost wallet and its assets
|
|
6092
6083
|
* @request POST:/api/v1/wallets/recover
|
|
6084
|
+
* @deprecated
|
|
6093
6085
|
* @secure
|
|
6094
6086
|
*/
|
|
6095
6087
|
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)),
|
|
6096
|
-
/**
|
|
6097
|
-
* No description
|
|
6098
|
-
*
|
|
6099
|
-
* @tags Wallets, Algorand
|
|
6100
|
-
* @name ConvertStandardPhraseToAlgoSpecific
|
|
6101
|
-
* @summary Convert BIP39 Standard seed phrase to Algorand fixed 25 words mnemonic phrase
|
|
6102
|
-
* @request POST:/api/v1/wallets/convert-mnemonic-seed
|
|
6103
|
-
* @secure
|
|
6104
|
-
*/
|
|
6105
|
-
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)),
|
|
6106
6088
|
/**
|
|
6107
6089
|
* No description
|
|
6108
6090
|
*
|
|
@@ -6148,7 +6130,7 @@ class Api {
|
|
|
6148
6130
|
/**
|
|
6149
6131
|
* No description
|
|
6150
6132
|
*
|
|
6151
|
-
* @tags Wallets,
|
|
6133
|
+
* @tags Wallets, Swaps
|
|
6152
6134
|
* @name ExecuteSwap
|
|
6153
6135
|
* @summary Execute a swap transaction between supported assets
|
|
6154
6136
|
* @request POST:/api/v1/wallets/execute-swap
|
|
@@ -6207,46 +6189,6 @@ class Api {
|
|
|
6207
6189
|
* @secure
|
|
6208
6190
|
*/
|
|
6209
6191
|
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)),
|
|
6210
|
-
/**
|
|
6211
|
-
* No description
|
|
6212
|
-
*
|
|
6213
|
-
* @tags Transactions
|
|
6214
|
-
* @name InitMultisigTransfer
|
|
6215
|
-
* @summary User initiating and signing a multi-sig transfer request
|
|
6216
|
-
* @request POST:/api/v1/transactions/init-multisig-transfer
|
|
6217
|
-
* @secure
|
|
6218
|
-
*/
|
|
6219
|
-
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)),
|
|
6220
|
-
/**
|
|
6221
|
-
* No description
|
|
6222
|
-
*
|
|
6223
|
-
* @tags Transactions, Multisig
|
|
6224
|
-
* @name InitMultisigAssetOptin
|
|
6225
|
-
* @summary User initiating a multi-sig asset optin request and subsequently signs the first signature on the request
|
|
6226
|
-
* @request POST:/api/v1/transactions/init-multisig-asset-optin
|
|
6227
|
-
* @secure
|
|
6228
|
-
*/
|
|
6229
|
-
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)),
|
|
6230
|
-
/**
|
|
6231
|
-
* No description
|
|
6232
|
-
*
|
|
6233
|
-
* @tags Transactions, Multisig
|
|
6234
|
-
* @name InitMultisigAppOptin
|
|
6235
|
-
* @summary User initiating a multi-sig app optin request and subsequently signs the first signature on the request
|
|
6236
|
-
* @request POST:/api/v1/transactions/init-multisig-app-optin
|
|
6237
|
-
* @secure
|
|
6238
|
-
*/
|
|
6239
|
-
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)),
|
|
6240
|
-
/**
|
|
6241
|
-
* No description
|
|
6242
|
-
*
|
|
6243
|
-
* @tags Transactions, Multisig
|
|
6244
|
-
* @name SignOnMultisigTransactionRequest
|
|
6245
|
-
* @summary Append signature to an existing multisig transaction request: It can be a request to transfer, optin, etc, ...
|
|
6246
|
-
* @request POST:/api/v1/transactions/sign-multisig-request
|
|
6247
|
-
* @secure
|
|
6248
|
-
*/
|
|
6249
|
-
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)),
|
|
6250
6192
|
/**
|
|
6251
6193
|
* No description
|
|
6252
6194
|
*
|
|
@@ -6277,16 +6219,6 @@ class Api {
|
|
|
6277
6219
|
* @secure
|
|
6278
6220
|
*/
|
|
6279
6221
|
getEstimateFee: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/estimate-fee`, method: "GET", query: query, secure: true, format: "json" }, params)),
|
|
6280
|
-
/**
|
|
6281
|
-
* @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
|
|
6282
|
-
*
|
|
6283
|
-
* @tags Transactions, Raw, Transactions
|
|
6284
|
-
* @name SignAndBroadcastRawTx
|
|
6285
|
-
* @summary Sign and broadcast raw transaction API
|
|
6286
|
-
* @request POST:/api/v1/transactions/sign-broadcast-rawtx
|
|
6287
|
-
* @secure
|
|
6288
|
-
*/
|
|
6289
|
-
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)),
|
|
6290
6222
|
/**
|
|
6291
6223
|
* No description
|
|
6292
6224
|
*
|
|
@@ -6297,16 +6229,6 @@ class Api {
|
|
|
6297
6229
|
* @secure
|
|
6298
6230
|
*/
|
|
6299
6231
|
fetchTransactionByHashOrReference: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/status`, method: "GET", query: query, secure: true, format: "json" }, params)),
|
|
6300
|
-
/**
|
|
6301
|
-
* No description
|
|
6302
|
-
*
|
|
6303
|
-
* @tags Transactions, Transactions, Multisig, Raw
|
|
6304
|
-
* @name InitMultisigRawTransaction
|
|
6305
|
-
* @summary Initiate a multisig raw transaction and sign the first signature on that same transaction
|
|
6306
|
-
* @request POST:/api/v1/transactions/init-sign-broadcast-multisig-rawtx
|
|
6307
|
-
* @secure
|
|
6308
|
-
*/
|
|
6309
|
-
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)),
|
|
6310
6232
|
/**
|
|
6311
6233
|
* No description
|
|
6312
6234
|
*
|
|
@@ -6317,20 +6239,6 @@ class Api {
|
|
|
6317
6239
|
* @secure
|
|
6318
6240
|
*/
|
|
6319
6241
|
getDetailedRawTransactionDataByReference: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/raw-status`, method: "GET", query: query, secure: true, format: "json" }, params)),
|
|
6320
|
-
/**
|
|
6321
|
-
* No description
|
|
6322
|
-
*
|
|
6323
|
-
* @tags Transactions, Query
|
|
6324
|
-
* @name FetchTransactionParticipants
|
|
6325
|
-
* @summary Fetch transaction's participants
|
|
6326
|
-
* @request GET:/api/v1/transactions/{reference}/participants
|
|
6327
|
-
* @secure
|
|
6328
|
-
*/
|
|
6329
|
-
fetchTransactionParticipants: (_a, params) => {
|
|
6330
|
-
var { reference } = _a; __rest(_a, ["reference"]);
|
|
6331
|
-
if (params === void 0) { params = {}; }
|
|
6332
|
-
return this.http.request(Object.assign({ path: `/api/v1/transactions/${reference}/participants`, method: "GET", secure: true, format: "json" }, params));
|
|
6333
|
-
},
|
|
6334
6242
|
/**
|
|
6335
6243
|
* No description
|
|
6336
6244
|
*
|
|
@@ -6354,7 +6262,7 @@ class Api {
|
|
|
6354
6262
|
/**
|
|
6355
6263
|
* No description
|
|
6356
6264
|
*
|
|
6357
|
-
* @tags Transactions
|
|
6265
|
+
* @tags Transactions
|
|
6358
6266
|
* @name CheckAssetOptinForAddress
|
|
6359
6267
|
* @summary Get the list of all assets that the current account has opted into. This is only relevant for the Algorand chain
|
|
6360
6268
|
* @request GET:/api/v1/transactions/check-asset-optin
|
|
@@ -6364,7 +6272,7 @@ class Api {
|
|
|
6364
6272
|
/**
|
|
6365
6273
|
* No description
|
|
6366
6274
|
*
|
|
6367
|
-
* @tags Transactions
|
|
6275
|
+
* @tags Transactions
|
|
6368
6276
|
* @name CheckAppOptinForAddress
|
|
6369
6277
|
* @summary Get the list of all apps that the current account has opted into. This is only relevant for the Algorand chain
|
|
6370
6278
|
* @request GET:/api/v1/transactions/check-app-optin
|
|
@@ -6455,26 +6363,6 @@ class Api {
|
|
|
6455
6363
|
fetchAssetPairPrice: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/query/get-asset-price`, method: "GET", query: query, secure: true, format: "json" }, params)),
|
|
6456
6364
|
};
|
|
6457
6365
|
this.mpc = {
|
|
6458
|
-
/**
|
|
6459
|
-
* No description
|
|
6460
|
-
*
|
|
6461
|
-
* @tags Mpc
|
|
6462
|
-
* @name InitKeyExchange
|
|
6463
|
-
* @summary Initialize key exchange process, the keys exchanged will be later used for encryption/decryption of the payloads exchanged
|
|
6464
|
-
* @request POST:/api/v1/mpc/init-key-exchange
|
|
6465
|
-
* @secure
|
|
6466
|
-
*/
|
|
6467
|
-
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)),
|
|
6468
|
-
/**
|
|
6469
|
-
* No description
|
|
6470
|
-
*
|
|
6471
|
-
* @tags Mpc
|
|
6472
|
-
* @name RequestSeedphraseSplit
|
|
6473
|
-
* @summary Request seed phrase split and return shares that can be used later for recovery
|
|
6474
|
-
* @request POST:/api/v1/mpc/request-seed-split
|
|
6475
|
-
* @secure
|
|
6476
|
-
*/
|
|
6477
|
-
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)),
|
|
6478
6366
|
/**
|
|
6479
6367
|
* No description
|
|
6480
6368
|
*
|
|
@@ -6627,20 +6515,6 @@ class Api {
|
|
|
6627
6515
|
if (params === void 0) { params = {}; }
|
|
6628
6516
|
return this.http.request(Object.assign({ path: `/api/v1/users/${externalUserId}/externalUserId`, method: "GET", secure: true, format: "json" }, params));
|
|
6629
6517
|
},
|
|
6630
|
-
/**
|
|
6631
|
-
* No description
|
|
6632
|
-
*
|
|
6633
|
-
* @tags Users
|
|
6634
|
-
* @name GetParticipantsByUserId
|
|
6635
|
-
* @summary Returns multisig participants by user id
|
|
6636
|
-
* @request GET:/api/v1/users/{userId}/multisig-transactions
|
|
6637
|
-
* @secure
|
|
6638
|
-
*/
|
|
6639
|
-
getParticipantsByUserId: (_a, params) => {
|
|
6640
|
-
var { userId } = _a, query = __rest(_a, ["userId"]);
|
|
6641
|
-
if (params === void 0) { params = {}; }
|
|
6642
|
-
return this.http.request(Object.assign({ path: `/api/v1/users/${userId}/multisig-transactions`, method: "GET", query: query, secure: true, format: "json" }, params));
|
|
6643
|
-
},
|
|
6644
6518
|
};
|
|
6645
6519
|
this.adminTransactions = {
|
|
6646
6520
|
/**
|
|
@@ -6742,7 +6616,7 @@ class Api {
|
|
|
6742
6616
|
* @request GET:/api/v1/transactions/admin/callback_pk
|
|
6743
6617
|
* @secure
|
|
6744
6618
|
*/
|
|
6745
|
-
getCallbackPublicKey: (params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/admin/callback_pk`, method: "GET", secure: true }, params)),
|
|
6619
|
+
getCallbackPublicKey: (query, params = {}) => this.http.request(Object.assign({ path: `/api/v1/transactions/admin/callback_pk`, method: "GET", query: query, secure: true }, params)),
|
|
6746
6620
|
/**
|
|
6747
6621
|
* No description
|
|
6748
6622
|
*
|
|
@@ -6768,19 +6642,23 @@ class Api {
|
|
|
6768
6642
|
*/
|
|
6769
6643
|
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)),
|
|
6770
6644
|
};
|
|
6771
|
-
this.
|
|
6645
|
+
this.dashboard = {
|
|
6772
6646
|
/**
|
|
6773
6647
|
* No description
|
|
6774
6648
|
*
|
|
6649
|
+
* @tags Dashboard
|
|
6775
6650
|
* @name GetDashboardData
|
|
6776
6651
|
* @summary Create new merchant. This endpoint is only available for super admin and republic admin
|
|
6777
6652
|
* @request GET:/api/v1/dashboard
|
|
6778
6653
|
* @secure
|
|
6779
6654
|
*/
|
|
6780
6655
|
getDashboardData: (params = {}) => this.http.request(Object.assign({ path: `/api/v1/dashboard`, method: "GET", secure: true }, params)),
|
|
6656
|
+
};
|
|
6657
|
+
this.userActivity = {
|
|
6781
6658
|
/**
|
|
6782
6659
|
* No description
|
|
6783
6660
|
*
|
|
6661
|
+
* @tags UserActivity
|
|
6784
6662
|
* @name GetActivitiees
|
|
6785
6663
|
* @summary Get all activities. This endpoint is only available for super admin and republic admin
|
|
6786
6664
|
* @request GET:/api/v1/users-activities
|
|
@@ -7976,6 +7854,9 @@ let PasskeyService$1 = class PasskeyService {
|
|
|
7976
7854
|
key: LocalStorageItems.AccessToken,
|
|
7977
7855
|
value: authenticationResponse.accessToken,
|
|
7978
7856
|
},
|
|
7857
|
+
...(authenticationResponse.refreshToken
|
|
7858
|
+
? [{ key: LocalStorageItems.RefreshToken, value: authenticationResponse.refreshToken }]
|
|
7859
|
+
: []),
|
|
7979
7860
|
]);
|
|
7980
7861
|
}
|
|
7981
7862
|
/**
|
|
@@ -8123,10 +8004,8 @@ class AuthService extends Base {
|
|
|
8123
8004
|
*/
|
|
8124
8005
|
async validateSession() {
|
|
8125
8006
|
const accessToken = await this.localStorageService.fetch(LocalStorageItems.AccessToken);
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
}
|
|
8129
|
-
return !jwtHasExpired(accessToken);
|
|
8007
|
+
const refreshToken = await this.localStorageService.fetch(LocalStorageItems.RefreshToken);
|
|
8008
|
+
return (!!accessToken && !jwtHasExpired(accessToken)) || !!refreshToken;
|
|
8130
8009
|
}
|
|
8131
8010
|
/**
|
|
8132
8011
|
* @description Validates the user's password by decrypting the stored private key.
|
|
@@ -8311,6 +8190,9 @@ class AuthService extends Base {
|
|
|
8311
8190
|
});
|
|
8312
8191
|
}
|
|
8313
8192
|
await this.localStorageService.save(LocalStorageItems.AccessToken, authentication.accessToken);
|
|
8193
|
+
if (authentication.refreshToken) {
|
|
8194
|
+
await this.localStorageService.save(LocalStorageItems.RefreshToken, authentication.refreshToken);
|
|
8195
|
+
}
|
|
8314
8196
|
return Object.freeze(Object.assign(Object.assign({}, authentication), input));
|
|
8315
8197
|
}
|
|
8316
8198
|
catch (error) {
|
|
@@ -8512,6 +8394,7 @@ class AuthService extends Base {
|
|
|
8512
8394
|
key: LocalStorageItems.AccessToken,
|
|
8513
8395
|
value: authResponse.accessToken,
|
|
8514
8396
|
},
|
|
8397
|
+
...(authResponse.refreshToken ? [{ key: LocalStorageItems.RefreshToken, value: authResponse.refreshToken }] : []),
|
|
8515
8398
|
]);
|
|
8516
8399
|
return authResponse;
|
|
8517
8400
|
});
|
|
@@ -8635,8 +8518,8 @@ class WalletHandlersService extends Base {
|
|
|
8635
8518
|
encryptedSeed: readyForTransportSeedPhrase,
|
|
8636
8519
|
clientAuthPubKey: deviceAuthKeys.publicKey,
|
|
8637
8520
|
returnWalletOption: importWalletInput.returnWalletOption,
|
|
8638
|
-
numShares: numberOfKeyShares
|
|
8639
|
-
threshold: threshold
|
|
8521
|
+
numShares: numberOfKeyShares,
|
|
8522
|
+
threshold: threshold,
|
|
8640
8523
|
walletOwnershipType: WalletOwnershipType.SingleOwner,
|
|
8641
8524
|
wallabyKeepsOne: (_d = (_c = importWalletInput.keyShareOptions) === null || _c === void 0 ? void 0 : _c.storeOneKeyShareWithWallaby) !== null && _d !== void 0 ? _d : false,
|
|
8642
8525
|
};
|
|
@@ -8724,8 +8607,8 @@ class WalletHandlersService extends Base {
|
|
|
8724
8607
|
hashedMessage,
|
|
8725
8608
|
clientAuthPubKey: deviceAuthKeys.publicKey,
|
|
8726
8609
|
returnWalletOption: walletCreationInput.returnWalletOption,
|
|
8727
|
-
numShares: numberOfKeyShares
|
|
8728
|
-
threshold: threshold
|
|
8610
|
+
numShares: numberOfKeyShares,
|
|
8611
|
+
threshold: threshold,
|
|
8729
8612
|
wallabyKeepsOne: (_c = (_b = walletCreationInput.keyShareOptions) === null || _b === void 0 ? void 0 : _b.storeOneKeyShareWithWallaby) !== null && _c !== void 0 ? _c : false,
|
|
8730
8613
|
walletOwnershipType: (_d = walletCreationInput.walletOwnershipType) !== null && _d !== void 0 ? _d : WalletOwnershipType.SingleOwner,
|
|
8731
8614
|
};
|