Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@solana/wallet-standard-util

Package Overview
Dependencies
Maintainers
13
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/wallet-standard-util - npm Package Compare versions

Comparing version 1.1.0-alpha.5 to 1.1.0-alpha.6

4

lib/cjs/verify.js
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc