Socket
Book a DemoInstallSign in
Socket

@albedo-link/signature-verification

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@albedo-link/signature-verification

Utility for the verification of ED25519 message signatures generated by Albedo signer app.

0.1.2
latest
Source
npmnpm
Version published
Weekly downloads
29
222.22%
Maintainers
1
Weekly downloads
 
Created
Source

Signature verification

Utility for the verification of ED25519 message signatures generated by Albedo signer app.

Installation

npm i -S @albedo-link/signature-verification

Usage

import {verifyMessageSignature} from '@albedo-link/signature-verification'

const isValid = verifyMessageSignature(
    'GDWPMRQSLXNEHCXC7RTISZAHULB7FDDIOPR6CF5B5IUWOQXN2CUWN4LO',
    'DGmk7s8gkhXMqRNsiCBanwL76Kt+5+WUzAOlWoh0nDs=',
    '049a26b40c1a30be1cef3ef7a64af8ae305e7567ee2cac57e5a494e0036860b81dc417c005e4f4dff6ad6bc52f56f0e61e9d084c2718638bc4f78130fc14d20e'
)

Parameters

  • publicKey (string) - Ed25519 public key in StrKey encoding (e.g. "GDWP...N4LO").
  • message (string) - Arbitrary text message signed by the given public key.
  • signature (string|Buffer|Uint8Array) - Hex-encoded message signature.

Returns

(boolean) - Returns true if a signature is valid and false otherwise.

Direct usage without bundler

The library can be also used directly in the browser without a package bundler:

<script src="https://unpkg.com/@albedo-link/signature-verification/lib/albedo.signature.verification.js"></script>
albedoSignatureVerification.verifyMessageSignature(
    'GDWPMRQSLXNEHCXC7RTISZAHULB7FDDIOPR6CF5B5IUWOQXN2CUWN4LO',
    'DGmk7s8gkhXMqRNsiCBanwL76Kt+5+WUzAOlWoh0nDs=',
    '049a26b40c1a30be1cef3ef7a64af8ae305e7567ee2cac57e5a494e0036860b81dc417c005e4f4dff6ad6bc52f56f0e61e9d084c2718638bc4f78130fc14d20e'
)

Development

To create UMD library bundle, run the following NPM script:

npm run build

Running tests:

npm run test

Keywords

albedo

FAQs

Package last updated on 16 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.