@solana/wallet-standard-util
Advanced tools
Comparing version 1.1.0-alpha.5 to 1.1.0-alpha.6
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createSignInMessageText = exports.createSignInMessage = exports.parseSignInMessageText = exports.parseSignInMessage = exports.deriveSignInMessageText = exports.deriveSignInMessage = exports.verifySignIn = exports.verifySignMessage = exports.verifyMessageSignature = void 0; | ||
const tweetnacl_1 = require("tweetnacl"); | ||
const ed25519_1 = require("@noble/curves/ed25519"); | ||
function verifyMessageSignature({ message, signedMessage, signature, publicKey, }) { | ||
// TODO: implement https://github.com/solana-labs/solana/blob/master/docs/src/proposals/off-chain-message-signing.md | ||
return bytesEqual(message, signedMessage) && tweetnacl_1.sign.detached.verify(signedMessage, signature, publicKey); | ||
return bytesEqual(message, signedMessage) && ed25519_1.ed25519.verify(signature, signedMessage, publicKey); | ||
} | ||
@@ -9,0 +9,0 @@ exports.verifyMessageSignature = verifyMessageSignature; |
@@ -1,5 +0,5 @@ | ||
import { sign } from 'tweetnacl'; | ||
import { ed25519 } from '@noble/curves/ed25519'; | ||
export function verifyMessageSignature({ message, signedMessage, signature, publicKey, }) { | ||
// TODO: implement https://github.com/solana-labs/solana/blob/master/docs/src/proposals/off-chain-message-signing.md | ||
return bytesEqual(message, signedMessage) && sign.detached.verify(signedMessage, signature, publicKey); | ||
return bytesEqual(message, signedMessage) && ed25519.verify(signature, signedMessage, publicKey); | ||
} | ||
@@ -6,0 +6,0 @@ export function verifySignMessage(input, output) { |
{ | ||
"name": "@solana/wallet-standard-util", | ||
"version": "1.1.0-alpha.5", | ||
"version": "1.1.0-alpha.6", | ||
"author": "Solana Maintainers <maintainers@solana.foundation>", | ||
@@ -29,3 +29,3 @@ "repository": "https://github.com/solana-labs/wallet-standard", | ||
"dependencies": { | ||
"tweetnacl": "^1.0.3", | ||
"@noble/curves": "^1.1.0", | ||
"@solana/wallet-standard-chains": "^1.0.0", | ||
@@ -32,0 +32,0 @@ "@solana/wallet-standard-features": "^1.1.0-alpha.4" |
@@ -7,3 +7,3 @@ import type { | ||
} from '@solana/wallet-standard-features'; | ||
import { sign } from 'tweetnacl'; | ||
import { ed25519 } from '@noble/curves/ed25519'; | ||
@@ -22,3 +22,3 @@ export function verifyMessageSignature({ | ||
// TODO: implement https://github.com/solana-labs/solana/blob/master/docs/src/proposals/off-chain-message-signing.md | ||
return bytesEqual(message, signedMessage) && sign.detached.verify(signedMessage, signature, publicKey); | ||
return bytesEqual(message, signedMessage) && ed25519.verify(signature, signedMessage, publicKey); | ||
} | ||
@@ -25,0 +25,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61869
+ Added@noble/curves@^1.1.0
+ Added@noble/curves@1.6.0(transitive)
+ Added@noble/hashes@1.5.0(transitive)
- Removedtweetnacl@^1.0.3
- Removedtweetnacl@1.0.3(transitive)