@volr/sdk-core 0.1.67 → 0.1.68
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/dist/index.cjs +0 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +0 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1081,7 +1081,6 @@ function createPasskeyProvider(passkey, options) {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
sessionExpiresAt = Date.now() + sessionTtlMs;
|
|
1083
1083
|
lockTimer = setTimeout(async () => {
|
|
1084
|
-
console.log("[PasskeyProvider] Session expired, auto-locking");
|
|
1085
1084
|
await lock();
|
|
1086
1085
|
}, sessionTtlMs);
|
|
1087
1086
|
};
|
|
@@ -1092,7 +1091,6 @@ function createPasskeyProvider(passkey, options) {
|
|
|
1092
1091
|
}
|
|
1093
1092
|
sessionExpiresAt = null;
|
|
1094
1093
|
if (unwrappedKeypair) {
|
|
1095
|
-
console.log("[PasskeyProvider] lock(): zeroizing sensitive data from memory");
|
|
1096
1094
|
zeroize(unwrappedKeypair.privateKey);
|
|
1097
1095
|
zeroize(unwrappedKeypair.publicKey);
|
|
1098
1096
|
unwrappedKeypair = null;
|
|
@@ -1100,7 +1098,6 @@ function createPasskeyProvider(passkey, options) {
|
|
|
1100
1098
|
};
|
|
1101
1099
|
const ensureSession = async (opts) => {
|
|
1102
1100
|
if (opts?.force && unwrappedKeypair) {
|
|
1103
|
-
console.log("[PasskeyProvider] force=true: zeroizing existing session");
|
|
1104
1101
|
await lock();
|
|
1105
1102
|
}
|
|
1106
1103
|
if (unwrappedKeypair && !isSessionExpired()) {
|
|
@@ -1108,10 +1105,8 @@ function createPasskeyProvider(passkey, options) {
|
|
|
1108
1105
|
return;
|
|
1109
1106
|
}
|
|
1110
1107
|
if (unwrappedKeypair && isSessionExpired()) {
|
|
1111
|
-
console.log("[PasskeyProvider] Session expired, re-authenticating");
|
|
1112
1108
|
await lock();
|
|
1113
1109
|
}
|
|
1114
|
-
console.log("[PasskeyProvider] Triggering WebAuthn prompt for hardware-backed authentication");
|
|
1115
1110
|
const prfSalt = deriveWrapKey(options.prfInput);
|
|
1116
1111
|
const { prfOutput } = await passkey.authenticate({
|
|
1117
1112
|
salt: prfSalt,
|
|
@@ -1163,13 +1158,8 @@ function createPasskeyProvider(passkey, options) {
|
|
|
1163
1158
|
if (!unwrappedKeypair) {
|
|
1164
1159
|
throw new Error(`${ERR_INVALID_PARAM}: Session not established`);
|
|
1165
1160
|
}
|
|
1166
|
-
console.log("[PasskeyProvider] signTypedData input:", JSON.stringify(
|
|
1167
|
-
input,
|
|
1168
|
-
(_key, value) => typeof value === "bigint" ? value.toString() : value
|
|
1169
|
-
));
|
|
1170
1161
|
const hash = ethers.TypedDataEncoder.hash(input.domain, input.types, input.message);
|
|
1171
1162
|
const msgHash = hash;
|
|
1172
|
-
console.log("[PasskeyProvider] msgHash:", msgHash);
|
|
1173
1163
|
const msgHashBytes = new Uint8Array(32);
|
|
1174
1164
|
const hex = msgHash.startsWith("0x") ? msgHash.slice(2) : msgHash;
|
|
1175
1165
|
for (let i = 0; i < 32; i++) {
|