@volr/sdk-core 0.1.89 → 0.1.91
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/README.md +2 -1
- package/dist/index.cjs +5 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -7
- package/dist/index.d.ts +9 -7
- package/dist/index.js +5 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ import { createPasskeyProvider } from '@volr/sdk-core';
|
|
|
30
30
|
|
|
31
31
|
// Create a passkey-based provider
|
|
32
32
|
const provider = createPasskeyProvider(adapter, {
|
|
33
|
-
prfInput: {
|
|
33
|
+
prfInput: { projectId, credentialId },
|
|
34
34
|
encryptedBlob: { cipher, nonce },
|
|
35
35
|
aad: new TextEncoder().encode('volr/master-seed/v1|userId|passkey|v1'),
|
|
36
36
|
});
|
|
@@ -245,3 +245,4 @@ MIT
|
|
|
245
245
|
|
|
246
246
|
|
|
247
247
|
|
|
248
|
+
|
package/dist/index.cjs
CHANGED
|
@@ -229,14 +229,13 @@ function createMasterKeyProvider() {
|
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
231
|
function deriveWrapKey(input) {
|
|
232
|
-
const {
|
|
233
|
-
const
|
|
234
|
-
const
|
|
235
|
-
const prfOutput = sha256.sha256(prfInput);
|
|
232
|
+
const { projectId, salt } = input;
|
|
233
|
+
const prfInputBytes = new TextEncoder().encode(`volr|${projectId}`);
|
|
234
|
+
const prfOutput = sha256.sha256(prfInputBytes);
|
|
236
235
|
const defaultSalt = salt || sha256.sha256(
|
|
237
|
-
new TextEncoder().encode(`volr/salt|${
|
|
236
|
+
new TextEncoder().encode(`volr/salt|${projectId}`)
|
|
238
237
|
);
|
|
239
|
-
const info = `volr/wrap-key/v1|${
|
|
238
|
+
const info = `volr/wrap-key/v1|${projectId}`;
|
|
240
239
|
const wrapKey = hkdfSha256(prfOutput, defaultSalt, info, 32);
|
|
241
240
|
return wrapKey;
|
|
242
241
|
}
|