@credo-ts/react-native 0.6.0-alpha-20250805173148 → 0.6.0-alpha-20250807200316
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/build/ReactNativeFileSystem.d.ts +1 -1
- package/build/ReactNativeFileSystem.js +7 -17
- package/build/ReactNativeFileSystem.js.map +1 -1
- package/build/index.d.ts +0 -1
- package/build/index.js +1 -3
- package/build/index.js.map +1 -1
- package/package.json +6 -12
- package/build/kms/SecureEnvironmentKeyManagementService.d.ts +0 -18
- package/build/kms/SecureEnvironmentKeyManagementService.js +0 -133
- package/build/kms/SecureEnvironmentKeyManagementService.js.map +0 -1
- package/build/kms/secureEnvironment.d.ts +0 -8
- package/build/kms/secureEnvironment.js +0 -13
- package/build/kms/secureEnvironment.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FileSystem, DownloadToFileOptions } from '@credo-ts/core';
|
|
2
2
|
export declare class ReactNativeFileSystem implements FileSystem {
|
|
3
3
|
readonly dataPath: string;
|
|
4
4
|
readonly cachePath: string;
|
|
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
26
|
exports.ReactNativeFileSystem = void 0;
|
|
37
27
|
const core_1 = require("@credo-ts/core");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactNativeFileSystem.js","sourceRoot":"","sources":["../src/ReactNativeFileSystem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReactNativeFileSystem.js","sourceRoot":"","sources":["../src/ReactNativeFileSystem.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,yCAA0F;AAC1F,+CAAuC;AACvC,sDAAuC;AAEvC,MAAa,qBAAqB;IAKhC;;;;;;;;;;;;;;OAcG;IACH,YAAmB,OAAkF;QACnG,IAAI,CAAC,QAAQ,GAAG,GAAG,OAAO,EAAE,YAAY,IAAI,IAAI,CAAC,qBAAqB,OAAO,CAAA;QAC7E,uEAAuE;QACvE,IAAI,CAAC,SAAS,GAAG,OAAO,EAAE,aAAa;YACrC,CAAC,CAAC,GAAG,OAAO,EAAE,aAAa,OAAO;YAClC,CAAC,CAAC,GAAG,IAAI,CAAC,mBAAmB,QAAQ,uBAAQ,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAA;QAClF,IAAI,CAAC,QAAQ,GAAG,OAAO,EAAE,YAAY;YACnC,CAAC,CAAC,GAAG,OAAO,EAAE,YAAY,OAAO;YACjC,CAAC,CAAC,GAAG,IAAI,CAAC,sBAAsB,QAAQ,uBAAQ,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC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AAO,CAAA;QAEb,IAAI,OAAO,EAAE,UAAU,EAAE,CAAC;YACxB,2BAA2B;YAC3B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;YACpE,MAAM,cAAc,GAAG,aAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;YAEnD,qDAAqD;YACrD,IAAI,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC1D,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;gBACvB,MAAM,IAAI,iBAAU,CAClB,mEAAmE,wBAAiB,CAAC,QAAQ,CAC3F,OAAO,CAAC,UAAU,CAAC,IAAI,CACxB,aAAa,wBAAiB,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAC3D,CAAA;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAEO,mBAAmB,CAAC,GAAW;QACrC,kDAAkD;QAClD,qDAAqD;QACrD,OAAO,GAAG,KAAK,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;IACtD,CAAC;CACF;AA7FD,sDA6FC"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import 'react-native-get-random-values';
|
|
2
2
|
import '@azure/core-asynciterator-polyfill';
|
|
3
3
|
import type { AgentDependencies } from '@credo-ts/core';
|
|
4
|
-
export { SecureEnvironmentKeyManagementService } from './kms/SecureEnvironmentKeyManagementService';
|
|
5
4
|
declare const agentDependencies: AgentDependencies;
|
|
6
5
|
export { agentDependencies };
|
package/build/index.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.agentDependencies =
|
|
3
|
+
exports.agentDependencies = void 0;
|
|
4
4
|
require("react-native-get-random-values");
|
|
5
5
|
require("@azure/core-asynciterator-polyfill");
|
|
6
6
|
const events_1 = require("events");
|
|
7
7
|
const ReactNativeFileSystem_1 = require("./ReactNativeFileSystem");
|
|
8
|
-
var SecureEnvironmentKeyManagementService_1 = require("./kms/SecureEnvironmentKeyManagementService");
|
|
9
|
-
Object.defineProperty(exports, "SecureEnvironmentKeyManagementService", { enumerable: true, get: function () { return SecureEnvironmentKeyManagementService_1.SecureEnvironmentKeyManagementService; } });
|
|
10
8
|
const fetch = global.fetch;
|
|
11
9
|
const WebSocket = global.WebSocket;
|
|
12
10
|
const agentDependencies = {
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,0CAAuC;AACvC,8CAA2C;AAI3C,mCAAqC;AAErC,mEAA+D;AAE/D,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,0CAAuC;AACvC,8CAA2C;AAI3C,mCAAqC;AAErC,mEAA+D;AAE/D,MAAM,KAAK,GAAG,MAAM,CAAC,KAA8C,CAAA;AACnE,MAAM,SAAS,GAAG,MAAM,CAAC,SAA2D,CAAA;AAEpF,MAAM,iBAAiB,GAAsB;IAC3C,UAAU,EAAE,6CAAqB;IACjC,KAAK;IACL,iBAAiB,EAAE,qBAAY;IAC/B,cAAc,EAAE,SAAS;CAC1B,CAAA;AAEQ,8CAAiB"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@credo-ts/react-native",
|
|
3
3
|
"main": "build/index",
|
|
4
4
|
"types": "build/index",
|
|
5
|
-
"version": "0.6.0-alpha-
|
|
5
|
+
"version": "0.6.0-alpha-20250807200316",
|
|
6
6
|
"files": [
|
|
7
7
|
"build"
|
|
8
8
|
],
|
|
@@ -19,25 +19,19 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@azure/core-asynciterator-polyfill": "^1.0.2",
|
|
21
21
|
"events": "^3.3.0",
|
|
22
|
-
"@credo-ts/core": "0.6.0-alpha-
|
|
22
|
+
"@credo-ts/core": "0.6.0-alpha-20250807200316"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"react-native": "^0.
|
|
25
|
+
"react-native": "^0.71.4",
|
|
26
26
|
"react-native-fs": "^2.20.0",
|
|
27
27
|
"react-native-get-random-values": "^1.8.0",
|
|
28
|
-
"rimraf": "^
|
|
29
|
-
"typescript": "~5.
|
|
28
|
+
"rimraf": "^4.4.0",
|
|
29
|
+
"typescript": "~5.5.2"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react-native": ">=0.71.4",
|
|
33
33
|
"react-native-fs": "^2.20.0",
|
|
34
|
-
"react-native-get-random-values": "^1.8.0"
|
|
35
|
-
"@animo-id/expo-secure-environment": "^0.1.1"
|
|
36
|
-
},
|
|
37
|
-
"peerDependenciesMeta": {
|
|
38
|
-
"@animo-id/expo-secure-environment": {
|
|
39
|
-
"optional": true
|
|
40
|
-
}
|
|
34
|
+
"react-native-get-random-values": "^1.8.0"
|
|
41
35
|
},
|
|
42
36
|
"scripts": {
|
|
43
37
|
"build": "pnpm run clean && pnpm run compile",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { AgentContext } from '@credo-ts/core';
|
|
2
|
-
import { Kms } from '@credo-ts/core';
|
|
3
|
-
export declare class SecureEnvironmentKeyManagementService implements Kms.KeyManagementService {
|
|
4
|
-
readonly backend = "secureEnvironment";
|
|
5
|
-
private readonly secureEnvironment;
|
|
6
|
-
isOperationSupported(_agentContext: AgentContext, operation: Kms.KmsOperation): boolean;
|
|
7
|
-
randomBytes(_agentContext: AgentContext, _options: Kms.KmsRandomBytesOptions): Kms.KmsRandomBytesReturn;
|
|
8
|
-
getPublicKey(_agentContext: AgentContext, keyId: string): Promise<Kms.KmsJwkPublic | null>;
|
|
9
|
-
importKey(): Promise<Kms.KmsImportKeyReturn<Kms.KmsJwkPrivate>>;
|
|
10
|
-
deleteKey(_agentContext: AgentContext, options: Kms.KmsDeleteKeyOptions): Promise<boolean>;
|
|
11
|
-
encrypt(): Promise<Kms.KmsEncryptReturn>;
|
|
12
|
-
decrypt(): Promise<Kms.KmsDecryptReturn>;
|
|
13
|
-
createKey(_agentContext: AgentContext, options: Kms.KmsCreateKeyOptions): Promise<Kms.KmsCreateKeyReturn>;
|
|
14
|
-
sign(_agentContext: AgentContext, options: Kms.KmsSignOptions): Promise<Kms.KmsSignReturn>;
|
|
15
|
-
verify(): Promise<Kms.KmsVerifyReturn>;
|
|
16
|
-
private publicJwkFromPublicKeyBytes;
|
|
17
|
-
private getKeyAsserted;
|
|
18
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SecureEnvironmentKeyManagementService = void 0;
|
|
4
|
-
const core_1 = require("@credo-ts/core");
|
|
5
|
-
const secureEnvironment_1 = require("./secureEnvironment");
|
|
6
|
-
class SecureEnvironmentKeyManagementService {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.backend = 'secureEnvironment';
|
|
9
|
-
this.secureEnvironment = (0, secureEnvironment_1.importSecureEnvironment)();
|
|
10
|
-
}
|
|
11
|
-
isOperationSupported(_agentContext, operation) {
|
|
12
|
-
if (operation.operation === 'createKey') {
|
|
13
|
-
return operation.type.kty === 'EC' && operation.type.crv === 'P-256';
|
|
14
|
-
}
|
|
15
|
-
if (operation.operation === 'sign') {
|
|
16
|
-
return operation.algorithm === 'ES256';
|
|
17
|
-
}
|
|
18
|
-
if (operation.operation === 'deleteKey') {
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
randomBytes(_agentContext, _options) {
|
|
24
|
-
throw new core_1.Kms.KeyManagementError(`Generating random bytes is not supported for backend '${this.backend}'`);
|
|
25
|
-
}
|
|
26
|
-
async getPublicKey(_agentContext, keyId) {
|
|
27
|
-
try {
|
|
28
|
-
return await this.getKeyAsserted(keyId);
|
|
29
|
-
}
|
|
30
|
-
catch (error) {
|
|
31
|
-
if (error instanceof core_1.Kms.KeyManagementKeyNotFoundError)
|
|
32
|
-
return null;
|
|
33
|
-
throw error;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
async importKey() {
|
|
37
|
-
throw new core_1.Kms.KeyManagementError(`Importing a key is not supported for backend '${this.backend}'`);
|
|
38
|
-
}
|
|
39
|
-
async deleteKey(_agentContext, options) {
|
|
40
|
-
try {
|
|
41
|
-
await this.secureEnvironment.deleteKey(options.keyId);
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
catch (error) {
|
|
45
|
-
if (error instanceof this.secureEnvironment.KeyNotFoundError) {
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
throw new core_1.Kms.KeyManagementError(`Error deleting key with id '${options.keyId}' in backend '${this.backend}'`, {
|
|
49
|
-
cause: error,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
async encrypt() {
|
|
54
|
-
throw new core_1.Kms.KeyManagementError(`Encryption is not supported for backend '${this.backend}'`);
|
|
55
|
-
}
|
|
56
|
-
async decrypt() {
|
|
57
|
-
throw new core_1.Kms.KeyManagementError(`Decryption is not supported for backend '${this.backend}'`);
|
|
58
|
-
}
|
|
59
|
-
async createKey(_agentContext, options) {
|
|
60
|
-
if (options.type.kty !== 'EC') {
|
|
61
|
-
throw new core_1.Kms.KeyManagementAlgorithmNotSupportedError(`kty ${options.type.kty}. Only EC P-256 supported.`, this.backend);
|
|
62
|
-
}
|
|
63
|
-
if (options.type.crv !== 'P-256') {
|
|
64
|
-
throw new core_1.Kms.KeyManagementAlgorithmNotSupportedError(`kty ${options.type.kty} with crv ${options.type.crv}. Only EC P-256 supported.`, this.backend);
|
|
65
|
-
}
|
|
66
|
-
const keyId = options.keyId ?? core_1.utils.uuid();
|
|
67
|
-
try {
|
|
68
|
-
await this.secureEnvironment.generateKeypair(keyId);
|
|
69
|
-
return {
|
|
70
|
-
keyId,
|
|
71
|
-
publicJwk: await this.getKeyAsserted(keyId),
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
catch (error) {
|
|
75
|
-
if (error instanceof core_1.Kms.KeyManagementError)
|
|
76
|
-
throw error;
|
|
77
|
-
if (error instanceof this.secureEnvironment.KeyAlreadyExistsError) {
|
|
78
|
-
throw new core_1.Kms.KeyManagementKeyExistsError(keyId, this.backend);
|
|
79
|
-
}
|
|
80
|
-
throw new core_1.Kms.KeyManagementError('Error creating key', { cause: error });
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
async sign(_agentContext, options) {
|
|
84
|
-
if (options.algorithm !== 'ES256') {
|
|
85
|
-
throw new core_1.Kms.KeyManagementAlgorithmNotSupportedError(`algorithm '${options.algorithm}'. Only 'ES256' supported.`, this.backend);
|
|
86
|
-
}
|
|
87
|
-
try {
|
|
88
|
-
// TODO: can we store something like 'use' for the key in secure environment?
|
|
89
|
-
// Kms.assertKeyAllowsSign(publicJwk)
|
|
90
|
-
// Perform the signing operation
|
|
91
|
-
const signature = await this.secureEnvironment.sign(options.keyId, options.data);
|
|
92
|
-
return {
|
|
93
|
-
signature,
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
catch (error) {
|
|
97
|
-
if (error instanceof this.secureEnvironment.KeyNotFoundError) {
|
|
98
|
-
throw new core_1.Kms.KeyManagementKeyNotFoundError(options.keyId, this.backend);
|
|
99
|
-
}
|
|
100
|
-
throw new core_1.Kms.KeyManagementError('Error signing with key', { cause: error });
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
async verify() {
|
|
104
|
-
throw new core_1.Kms.KeyManagementError(`verification of signatures is not supported for backend '${this.backend}'`);
|
|
105
|
-
}
|
|
106
|
-
publicJwkFromPublicKeyBytes(key, keyId) {
|
|
107
|
-
const publicJwk = core_1.Kms.PublicJwk.fromPublicKey({
|
|
108
|
-
kty: 'EC',
|
|
109
|
-
crv: 'P-256',
|
|
110
|
-
publicKey: key,
|
|
111
|
-
}).toJson();
|
|
112
|
-
return {
|
|
113
|
-
...publicJwk,
|
|
114
|
-
kid: keyId,
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
async getKeyAsserted(keyId) {
|
|
118
|
-
try {
|
|
119
|
-
const publicKeyBytes = await this.secureEnvironment.getPublicBytesForKeyId(keyId);
|
|
120
|
-
return this.publicJwkFromPublicKeyBytes(publicKeyBytes, keyId);
|
|
121
|
-
}
|
|
122
|
-
catch (error) {
|
|
123
|
-
if (error instanceof this.secureEnvironment.KeyNotFoundError) {
|
|
124
|
-
throw new core_1.Kms.KeyManagementKeyNotFoundError(keyId, this.backend);
|
|
125
|
-
}
|
|
126
|
-
throw new core_1.Kms.KeyManagementError(`Error retrieving key with id '${keyId}' from backend ${this.backend}`, {
|
|
127
|
-
cause: error,
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
exports.SecureEnvironmentKeyManagementService = SecureEnvironmentKeyManagementService;
|
|
133
|
-
//# sourceMappingURL=SecureEnvironmentKeyManagementService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SecureEnvironmentKeyManagementService.js","sourceRoot":"","sources":["../../src/kms/SecureEnvironmentKeyManagementService.ts"],"names":[],"mappings":";;;AAEA,yCAA2C;AAE3C,2DAA6D;AAE7D,MAAa,qCAAqC;IAAlD;QACkB,YAAO,GAAG,mBAAmB,CAAA;QAC5B,sBAAiB,GAAG,IAAA,2CAAuB,GAAE,CAAA;IAwJhE,CAAC;IAtJQ,oBAAoB,CAAC,aAA2B,EAAE,SAA2B;QAClF,IAAI,SAAS,CAAC,SAAS,KAAK,WAAW,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AI,CAAC,OAAO,GAAG,CAAC,CAAA;IAC/G,CAAC;IAEO,2BAA2B,CAAC,GAAe,EAAE,KAAa;QAChE,MAAM,SAAS,GAAG,UAAG,CAAC,SAAS,CAAC,aAAa,CAAiC;YAC5E,GAAG,EAAE,IAAI;YACT,GAAG,EAAE,OAAO;YACZ,SAAS,EAAE,GAAG;SACf,CAAC,CAAC,MAAM,EAAE,CAAA;QAEX,OAAO;YACL,GAAG,SAAS;YACZ,GAAG,EAAE,KAAK;SACkB,CAAA;IAChC,CAAC;IAEO,KAAK,CAAC,cAAc,CAAC,KAAa;QACxC,IAAI,CAAC;YACH,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAA;YACjF,OAAO,IAAI,CAAC,2BAA2B,CAAC,cAAc,EAAE,KAAK,CAAC,CAAA;QAChE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,EAAE,CAAC;gBAC7D,MAAM,IAAI,UAAG,CAAC,6BAA6B,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;YAClE,CAAC;YAED,MAAM,IAAI,UAAG,CAAC,kBAAkB,CAAC,iCAAiC,KAAK,kBAAkB,IAAI,CAAC,OAAO,EAAE,EAAE;gBACvG,KAAK,EAAE,KAAK;aACb,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF;AA1JD,sFA0JC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare function importSecureEnvironment(): {
|
|
2
|
-
sign: (id: string, message: Uint8Array) => Promise<Uint8Array>;
|
|
3
|
-
getPublicBytesForKeyId: (id: string) => Promise<Uint8Array>;
|
|
4
|
-
generateKeypair: (id: string) => Promise<void>;
|
|
5
|
-
deleteKey: (id: string) => Promise<void>;
|
|
6
|
-
KeyAlreadyExistsError: typeof Error;
|
|
7
|
-
KeyNotFoundError: typeof Error;
|
|
8
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.importSecureEnvironment = importSecureEnvironment;
|
|
4
|
-
function importSecureEnvironment() {
|
|
5
|
-
try {
|
|
6
|
-
const secureEnvironment = require('@animo-id/expo-secure-environment');
|
|
7
|
-
return secureEnvironment;
|
|
8
|
-
}
|
|
9
|
-
catch (_error) {
|
|
10
|
-
throw new Error('@animo-id/expo-secure-environment must be installed as a peer dependency');
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=secureEnvironment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"secureEnvironment.js","sourceRoot":"","sources":["../../src/kms/secureEnvironment.ts"],"names":[],"mappings":";;AAAA,0DAcC;AAdD,SAAgB,uBAAuB;IAQrC,IAAI,CAAC;QACH,MAAM,iBAAiB,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAA;QACtE,OAAO,iBAAiB,CAAA;IAC1B,CAAC;IAAC,OAAO,MAAM,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAA;IAC7F,CAAC;AACH,CAAC"}
|