@aries-framework/askar
Advanced tools
Comparing version 0.4.0-alpha.34 to 0.4.0-alpha.35
@@ -5,5 +5,11 @@ import type { WalletConfig } from '@aries-framework/core'; | ||
export declare const keyDerivationMethodToStoreKeyMethod: (keyDerivationMethod?: KeyDerivationMethod) => StoreKeyMethod | undefined; | ||
export declare const uriFromWalletConfig: (walletConfig: WalletConfig, basePath: string) => { | ||
/** | ||
* Creates a proper askar wallet URI value based on walletConfig | ||
* @param walletConfig WalletConfig object | ||
* @param afjDataPath framework data path (used in case walletConfig.storage.path is undefined) | ||
* @returns string containing the askar wallet URI | ||
*/ | ||
export declare const uriFromWalletConfig: (walletConfig: WalletConfig, afjDataPath: string) => { | ||
uri: string; | ||
path?: string | undefined; | ||
}; |
@@ -18,3 +18,9 @@ "use strict"; | ||
exports.keyDerivationMethodToStoreKeyMethod = keyDerivationMethodToStoreKeyMethod; | ||
const uriFromWalletConfig = (walletConfig, basePath) => { | ||
/** | ||
* Creates a proper askar wallet URI value based on walletConfig | ||
* @param walletConfig WalletConfig object | ||
* @param afjDataPath framework data path (used in case walletConfig.storage.path is undefined) | ||
* @returns string containing the askar wallet URI | ||
*/ | ||
const uriFromWalletConfig = (walletConfig, afjDataPath) => { | ||
var _a; | ||
@@ -32,3 +38,3 @@ let uri = ''; | ||
else { | ||
path = `${(_a = walletConfig.storage.path) !== null && _a !== void 0 ? _a : basePath + '/wallet'}/${walletConfig.id}/sqlite.db`; | ||
path = (_a = walletConfig.storage.path) !== null && _a !== void 0 ? _a : `${afjDataPath}/wallet/${walletConfig.id}/sqlite.db`; | ||
uri = `sqlite://${path}`; | ||
@@ -35,0 +41,0 @@ } |
@@ -196,3 +196,3 @@ "use strict"; | ||
try { | ||
const { uri } = (0, utils_1.uriFromWalletConfig)(this.walletConfig, this.fileSystem.basePath); | ||
const { uri } = (0, utils_1.uriFromWalletConfig)(this.walletConfig, this.fileSystem.dataPath); | ||
await aries_askar_shared_1.Store.remove(uri); | ||
@@ -556,3 +556,3 @@ } | ||
var _a; | ||
const { uri, path } = (0, utils_1.uriFromWalletConfig)(walletConfig, this.fileSystem.basePath); | ||
const { uri, path } = (0, utils_1.uriFromWalletConfig)(walletConfig, this.fileSystem.dataPath); | ||
// Make sure path exists before creating the wallet | ||
@@ -559,0 +559,0 @@ if (path) { |
@@ -5,3 +5,3 @@ { | ||
"types": "build/index", | ||
"version": "0.4.0-alpha.34+af384e8a", | ||
"version": "0.4.0-alpha.35+ff5596d0", | ||
"files": [ | ||
@@ -28,3 +28,3 @@ "build" | ||
"dependencies": { | ||
"@aries-framework/core": "0.4.0-alpha.34+af384e8a", | ||
"@aries-framework/core": "0.4.0-alpha.35+ff5596d0", | ||
"@hyperledger/aries-askar-shared": "^0.1.0-dev.1", | ||
@@ -44,3 +44,3 @@ "bn.js": "^5.2.1", | ||
}, | ||
"gitHead": "af384e8a92f877c647999f9356b72a8017308230" | ||
"gitHead": "ff5596d0631e93746494c017797d0191b6bdb0b1" | ||
} |
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
111063
1400