Socket
Socket
Sign inDemoInstall

@aries-framework/askar

Package Overview
Dependencies
11
Maintainers
3
Versions
198
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.0-alpha.34 to 0.4.0-alpha.35

8

build/utils/askarWalletConfig.d.ts

@@ -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;
};

10

build/utils/askarWalletConfig.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc