rise-wallet 0.3.4 → 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-BlFKgr_f.js → commands-DT48KEhi.js} +5 -5
- package/dist/cli/bin/index.js +1 -1
- package/dist/core/Dialog.d.ts.map +1 -1
- package/dist/core/Dialog.js +16 -0
- 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/relay.d.ts.map +1 -1
- package/dist/core/internal/modes/relay.js +1 -0
- package/dist/core/internal/modes/relay.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 +20 -0
- package/src/core/Messenger.ts +10 -5
- package/src/core/internal/modes/relay.ts +1 -0
- 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)
|
|
@@ -1040,7 +1047,7 @@ export async function sign(key: Key, parameters: sign.Parameters) {
|
|
|
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 =
|
|
@@ -1056,7 +1063,7 @@ export async function sign(key: Key, parameters: sign.Parameters) {
|
|
|
1056
1063
|
credentialId: credential.id,
|
|
1057
1064
|
getFn: webAuthn?.getFn,
|
|
1058
1065
|
rpId,
|
|
1059
|
-
userVerification: requireVerification ? 'required' : '
|
|
1066
|
+
userVerification: requireVerification ? 'required' : 'preferred',
|
|
1060
1067
|
})
|
|
1061
1068
|
|
|
1062
1069
|
const response = raw.response as AuthenticatorAssertionResponse
|
|
@@ -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
|
|