@credo-ts/react-native 0.8.0-alpha-20261102115415 → 0.8.0-alpha-20261102180159
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/index.d.mts.map +1 -1
- package/build/index.mjs +1 -0
- package/build/index.mjs.map +1 -1
- package/build/subtleDigest.mjs +11 -0
- package/build/subtleDigest.mjs.map +1 -0
- package/package.json +3 -4
package/build/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;AAmBM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
|
package/build/index.mjs
CHANGED
package/build/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import 'react-native-get-random-values'\n\nimport type { AgentDependencies } from '@credo-ts/core'\n\nimport { EventEmitter } from 'events'\n\nimport { ReactNativeFileSystem } from './ReactNativeFileSystem'\n\nexport {\n type SecureEnvironmentCreateKeyOptions,\n SecureEnvironmentKeyManagementService,\n type SecureEnvironmentKeyManagementServiceOptions,\n type SecureEnvironmentUserAuthenticationOptions,\n} from './kms/SecureEnvironmentKeyManagementService'\n\nconst fetch = global.fetch as unknown as AgentDependencies['fetch']\nconst WebSocket = global.WebSocket as unknown as AgentDependencies['WebSocketClass']\n\nconst agentDependencies: AgentDependencies = {\n FileSystem: ReactNativeFileSystem,\n fetch,\n EventEmitterClass: EventEmitter,\n WebSocketClass: WebSocket,\n}\n\nexport { agentDependencies }\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import 'react-native-get-random-values'\nimport './subtleDigest'\n\nimport type { AgentDependencies } from '@credo-ts/core'\n\nimport { EventEmitter } from 'events'\n\nimport { ReactNativeFileSystem } from './ReactNativeFileSystem'\n\nexport {\n type SecureEnvironmentCreateKeyOptions,\n SecureEnvironmentKeyManagementService,\n type SecureEnvironmentKeyManagementServiceOptions,\n type SecureEnvironmentUserAuthenticationOptions,\n} from './kms/SecureEnvironmentKeyManagementService'\n\nconst fetch = global.fetch as unknown as AgentDependencies['fetch']\nconst WebSocket = global.WebSocket as unknown as AgentDependencies['WebSocketClass']\n\nconst agentDependencies: AgentDependencies = {\n FileSystem: ReactNativeFileSystem,\n fetch,\n EventEmitterClass: EventEmitter,\n WebSocketClass: WebSocket,\n}\n\nexport { agentDependencies }\n"],"mappings":";;;;;;AAgBA,MAAM,QAAQ,OAAO;AACrB,MAAM,YAAY,OAAO;AAEzB,MAAM,oBAAuC;CAC3C,YAAY;CACZ;CACA,mBAAmB;CACnB,gBAAgB;AAClB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Hasher } from "@credo-ts/core";
|
|
2
|
+
// src/subtleDigest.ts
|
|
3
|
+
if (typeof globalThis.crypto.subtle?.digest !== "function") Object.assign(globalThis.crypto, { subtle: {
|
|
4
|
+
...globalThis.crypto.subtle,
|
|
5
|
+
digest: async (algorithm, data) => {
|
|
6
|
+
const bytes = ArrayBuffer.isView(data) ? new Uint8Array(data.buffer, data.byteOffset, data.byteLength) : new Uint8Array(data);
|
|
7
|
+
return Hasher.hash(bytes, typeof algorithm === "string" ? algorithm : algorithm.name).slice().buffer;
|
|
8
|
+
}
|
|
9
|
+
} });
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=subtleDigest.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subtleDigest.mjs","names":[],"sources":["../src/subtleDigest.ts"],"sourcesContent":["import { Hasher } from '@credo-ts/core'\n\n// jsonld and rdf-canonize hash with crypto.subtle.digest, which React Native doesn't provide.\nif (typeof globalThis.crypto.subtle?.digest !== 'function') {\n Object.assign(globalThis.crypto, {\n subtle: {\n ...globalThis.crypto.subtle,\n digest: async (algorithm: string | { name: string }, data: ArrayBuffer | ArrayBufferView) => {\n const bytes = ArrayBuffer.isView(data)\n ? new Uint8Array(data.buffer, data.byteOffset, data.byteLength)\n : new Uint8Array(data)\n return Hasher.hash(bytes, typeof algorithm === 'string' ? algorithm : algorithm.name).slice().buffer\n },\n },\n })\n}\n"],"mappings":";;AAGA,IAAI,OAAO,WAAW,OAAO,QAAQ,WAAW,YAC9C,OAAO,OAAO,WAAW,QAAQ,EAC/B,QAAQ;CACN,GAAG,WAAW,OAAO;CACrB,QAAQ,OAAO,WAAsC,SAAwC;EAC3F,MAAM,QAAQ,YAAY,OAAO,IAAI,IACjC,IAAI,WAAW,KAAK,QAAQ,KAAK,YAAY,KAAK,UAAU,IAC5D,IAAI,WAAW,IAAI;EACvB,OAAO,OAAO,KAAK,OAAO,OAAO,cAAc,WAAW,YAAY,UAAU,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;CAChG;AACF,EACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
".": "./build/index.mjs",
|
|
5
5
|
"./package.json": "./package.json"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.8.0-alpha-
|
|
7
|
+
"version": "0.8.0-alpha-20261102180159",
|
|
8
8
|
"files": [
|
|
9
9
|
"build"
|
|
10
10
|
],
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"directory": "packages/react-native"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@credo-ts/core": "0.8.0-alpha-
|
|
22
|
+
"@credo-ts/core": "0.8.0-alpha-20261102180159",
|
|
23
23
|
"events": "^3.3.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
@@ -31,8 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@animo-id/expo-secure-environment": "^0.3.0",
|
|
34
|
-
"
|
|
35
|
-
"react-native": ">=0.71.4",
|
|
34
|
+
"react-native": ">=0.74",
|
|
36
35
|
"@dr.pogodin/react-native-fs": ">= 2.37.0",
|
|
37
36
|
"react-native-fs": ">= 2",
|
|
38
37
|
"react-native-get-random-values": ">=1.11.0 <3.0.0"
|