mirror of https://codeberg.org/pzp/pzp-db.git
fix some typescript
This commit is contained in:
parent
5e63142e50
commit
ac8e730b64
|
@ -150,7 +150,10 @@ function validateSignature(msg) {
|
|||
SIGNATURE_TAG_MSG_V3 + stringify(msg.metadata),
|
||||
'utf8'
|
||||
)
|
||||
const keypair = { curve: 'ed25519', public: msg.pubkey }
|
||||
const keypair = {
|
||||
curve: /** @type {const} */ ('ed25519'),
|
||||
public: msg.pubkey,
|
||||
}
|
||||
const verified = Keypair.verify(keypair, signableBuf, sig)
|
||||
if (!verified) {
|
||||
return 'invalid msg: sig is invalid\n' + JSON.stringify(msg)
|
||||
|
|
Loading…
Reference in New Issue