@volr/sdk-core 0.1.66 → 0.1.67
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 +3 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1063,7 +1063,7 @@ function createPasskeyProvider(passkey, options) {
|
|
|
1063
1063
|
let sessionExpiresAt = null;
|
|
1064
1064
|
let lockTimer = null;
|
|
1065
1065
|
const isSessionExpired = () => {
|
|
1066
|
-
if (sessionTtlMs
|
|
1066
|
+
if (sessionTtlMs <= 0) return false;
|
|
1067
1067
|
if (!sessionExpiresAt) return true;
|
|
1068
1068
|
return Date.now() >= sessionExpiresAt;
|
|
1069
1069
|
};
|
|
@@ -1141,15 +1141,11 @@ function createPasskeyProvider(passkey, options) {
|
|
|
1141
1141
|
if (hash32.length !== 32) {
|
|
1142
1142
|
throw new Error(`${ERR_INVALID_PARAM}: Message hash must be 32 bytes, got ${hash32.length}`);
|
|
1143
1143
|
}
|
|
1144
|
-
|
|
1145
|
-
await ensureSession({ force: shouldForceFresh });
|
|
1144
|
+
await ensureSession({ });
|
|
1146
1145
|
if (!unwrappedKeypair) {
|
|
1147
1146
|
throw new Error(`${ERR_INVALID_PARAM}: Session not established`);
|
|
1148
1147
|
}
|
|
1149
1148
|
const sig = evmSign(unwrappedKeypair.privateKey, hash32);
|
|
1150
|
-
if (shouldForceFresh) {
|
|
1151
|
-
await lock();
|
|
1152
|
-
}
|
|
1153
1149
|
return {
|
|
1154
1150
|
r: sig.r,
|
|
1155
1151
|
s: sig.s,
|
|
@@ -1157,8 +1153,7 @@ function createPasskeyProvider(passkey, options) {
|
|
|
1157
1153
|
};
|
|
1158
1154
|
};
|
|
1159
1155
|
const signTypedData = async (input) => {
|
|
1160
|
-
|
|
1161
|
-
await ensureSession({ force: shouldForceFresh });
|
|
1156
|
+
await ensureSession({ });
|
|
1162
1157
|
if (!unwrappedKeypair) {
|
|
1163
1158
|
throw new Error(`${ERR_INVALID_PARAM}: Session not established`);
|
|
1164
1159
|
}
|
|
@@ -1175,9 +1170,6 @@ function createPasskeyProvider(passkey, options) {
|
|
|
1175
1170
|
msgHashBytes[i] = parseInt(hex.slice(i * 2, i * 2 + 2), 16);
|
|
1176
1171
|
}
|
|
1177
1172
|
const sig = evmSign(unwrappedKeypair.privateKey, msgHashBytes);
|
|
1178
|
-
if (shouldForceFresh) {
|
|
1179
|
-
await lock();
|
|
1180
|
-
}
|
|
1181
1173
|
const v = sig.yParity + 27;
|
|
1182
1174
|
const rHex = Array.from(sig.r).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
1183
1175
|
const sHex = Array.from(sig.s).map((b) => b.toString(16).padStart(2, "0")).join("");
|