rise-wallet 0.3.3 → 0.3.5
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/cli/bin/{commands-B8imwW1l.js → commands-DT48KEhi.js} +8 -8
- package/dist/cli/bin/index.js +1 -1
- package/dist/core/Dialog.d.ts.map +1 -1
- package/dist/core/Dialog.js +24 -5
- package/dist/core/Dialog.js.map +1 -1
- package/dist/core/Messenger.d.ts +3 -0
- package/dist/core/Messenger.d.ts.map +1 -1
- package/dist/core/Messenger.js +5 -2
- package/dist/core/Messenger.js.map +1 -1
- package/dist/core/internal/modes/dialog.js +2 -1
- package/dist/core/internal/modes/dialog.js.map +1 -1
- package/dist/core/internal/modes/relay.d.ts.map +1 -1
- package/dist/core/internal/modes/relay.js +3 -0
- package/dist/core/internal/modes/relay.js.map +1 -1
- package/dist/remote/Events.d.ts.map +1 -1
- package/dist/remote/Events.js +6 -7
- package/dist/remote/Events.js.map +1 -1
- package/dist/tsconfig.tmp.tsbuildinfo +1 -1
- package/dist/viem/Key.d.ts +1 -0
- package/dist/viem/Key.d.ts.map +1 -1
- package/dist/viem/Key.js +3 -3
- package/dist/viem/Key.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/bin/tsconfig.tsbuildinfo +1 -0
- package/src/core/Dialog.ts +32 -7
- package/src/core/Messenger.ts +10 -5
- package/src/core/internal/modes/dialog.ts +1 -1
- package/src/core/internal/modes/relay.ts +3 -0
- package/src/remote/Events.ts +10 -11
- package/src/tsconfig.tsbuildinfo +1 -0
- package/src/viem/Key.ts +11 -3
package/src/viem/Key.ts
CHANGED
|
@@ -971,7 +971,14 @@ export function serialize(key: Key): Serialized {
|
|
|
971
971
|
}
|
|
972
972
|
|
|
973
973
|
export async function sign(key: Key, parameters: sign.Parameters) {
|
|
974
|
-
const {
|
|
974
|
+
const {
|
|
975
|
+
address,
|
|
976
|
+
storage,
|
|
977
|
+
webAuthn,
|
|
978
|
+
wrap = true,
|
|
979
|
+
typedData,
|
|
980
|
+
verificationOptional,
|
|
981
|
+
} = parameters
|
|
975
982
|
const { privateKey, publicKey, type: keyType } = key
|
|
976
983
|
|
|
977
984
|
if (!privateKey)
|
|
@@ -1036,11 +1043,11 @@ export async function sign(key: Key, parameters: sign.Parameters) {
|
|
|
1036
1043
|
|
|
1037
1044
|
const { credential, rpId } = privateKey
|
|
1038
1045
|
|
|
1039
|
-
const cacheKey = `
|
|
1046
|
+
const cacheKey = `risewallet.webauthnVerified.${key.hash}`
|
|
1040
1047
|
const now = Date.now()
|
|
1041
1048
|
const verificationTimeout = 10 * 60 * 1_000 // 10 minutes in milliseconds
|
|
1042
1049
|
|
|
1043
|
-
let requireVerification =
|
|
1050
|
+
let requireVerification = !verificationOptional
|
|
1044
1051
|
if (storage) {
|
|
1045
1052
|
const lastVerified = await storage.getItem<number>(cacheKey)
|
|
1046
1053
|
requireVerification =
|
|
@@ -1206,6 +1213,7 @@ export declare namespace sign {
|
|
|
1206
1213
|
| prepareCalls.ReturnType['typedData']
|
|
1207
1214
|
| TypedData.Definition
|
|
1208
1215
|
| undefined
|
|
1216
|
+
verificationOptional?: boolean | undefined
|
|
1209
1217
|
}
|
|
1210
1218
|
}
|
|
1211
1219
|
|