@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 CHANGED
@@ -1069,7 +1069,7 @@ function createPasskeyProvider(passkey, options) {
1069
1069
  let sessionExpiresAt = null;
1070
1070
  let lockTimer = null;
1071
1071
  const isSessionExpired = () => {
1072
- if (sessionTtlMs === 0) return true;
1072
+ if (sessionTtlMs <= 0) return false;
1073
1073
  if (!sessionExpiresAt) return true;
1074
1074
  return Date.now() >= sessionExpiresAt;
1075
1075
  };
@@ -1147,15 +1147,11 @@ function createPasskeyProvider(passkey, options) {
1147
1147
  if (hash32.length !== 32) {
1148
1148
  throw new Error(`${ERR_INVALID_PARAM}: Message hash must be 32 bytes, got ${hash32.length}`);
1149
1149
  }
1150
- const shouldForceFresh = sessionTtlMs === 0;
1151
- await ensureSession({ force: shouldForceFresh });
1150
+ await ensureSession({ });
1152
1151
  if (!unwrappedKeypair) {
1153
1152
  throw new Error(`${ERR_INVALID_PARAM}: Session not established`);
1154
1153
  }
1155
1154
  const sig = evmSign(unwrappedKeypair.privateKey, hash32);
1156
- if (shouldForceFresh) {
1157
- await lock();
1158
- }
1159
1155
  return {
1160
1156
  r: sig.r,
1161
1157
  s: sig.s,
@@ -1163,8 +1159,7 @@ function createPasskeyProvider(passkey, options) {
1163
1159
  };
1164
1160
  };
1165
1161
  const signTypedData = async (input) => {
1166
- const shouldForceFresh = sessionTtlMs === 0;
1167
- await ensureSession({ force: shouldForceFresh });
1162
+ await ensureSession({ });
1168
1163
  if (!unwrappedKeypair) {
1169
1164
  throw new Error(`${ERR_INVALID_PARAM}: Session not established`);
1170
1165
  }
@@ -1181,9 +1176,6 @@ function createPasskeyProvider(passkey, options) {
1181
1176
  msgHashBytes[i] = parseInt(hex.slice(i * 2, i * 2 + 2), 16);
1182
1177
  }
1183
1178
  const sig = evmSign(unwrappedKeypair.privateKey, msgHashBytes);
1184
- if (shouldForceFresh) {
1185
- await lock();
1186
- }
1187
1179
  const v = sig.yParity + 27;
1188
1180
  const rHex = Array.from(sig.r).map((b) => b.toString(16).padStart(2, "0")).join("");
1189
1181
  const sHex = Array.from(sig.s).map((b) => b.toString(16).padStart(2, "0")).join("");