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

@cardano-foundation/cardano-verify-datasignature

Package Overview
Dependencies
Maintainers
6
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cardano-foundation/cardano-verify-datasignature - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

7

CHANGELOG.md
# Changelog
## [1.0.3](https://github.com/cardano-foundation/cardano-verify-datasignature/compare/v1.0.2...v1.0.3) (2022-12-12)
### Bug Fixes
* resolve bundle error unknown this ([b17be8f](https://github.com/cardano-foundation/cardano-verify-datasignature/commit/b17be8fd78b5a16d2a17e58650ffd75dd85975f1))
## [1.0.2](https://github.com/cardano-foundation/cardano-verify-datasignature/compare/v1.0.1...v1.0.2) (2022-12-12)

@@ -4,0 +11,0 @@

2

package.json
{
"name": "@cardano-foundation/cardano-verify-datasignature",
"version": "1.0.2",
"version": "1.0.3",
"description": "A lightweight typescript library to verify a cip30 datasignature for browser and nodejs",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -22,11 +22,29 @@ # Cardano Verify Datasignature

The plain message and/or the readable address can be provided for testing optionally. [Checkout these examples](index.test.ts).
The plain message and/or the readable address can be provided optionally.
```ts
verifySignature: (
signature: string,
key: string,
message?: string,
address?: string
) => boolean;
```js
const verifyDataSignature = require('@cardano-foundation/cardano-verify-datasignature');
const key =
'a4010103272006215820b89526fd6bf4ba737c55ea90670d16a27f8de6cc1982349b3b676705a2f420c6';
const signature =
'84582aa201276761646472657373581de118987c1612069d4080a0eb247820cb987fea81bddeaafdd41f996281a166686173686564f458264175677573746120416461204b696e672c20436f756e74657373206f66204c6f76656c61636558401712458b19f606b322982f6290c78529a235b56c0f1cec4f24b12a8660b40cd37f4c5440a465754089c462ed4b0d613bffaee3d1833516569fda4852f42a4a0f';
const message = 'Augusta Ada King, Countess of Lovelace';
const stakeAddress =
'stake1uyvfslqkzgrf6syq5r4jg7pqewv8l65phh024lw5r7vk9qgznhyty';
console.log(verifyDataSignature(signature, key)); // true
console.log(verifyDataSignature(signature, key, message)); // true
console.log(verifyDataSignature(signature, key, message, stakeAddress)); // true
console.log(
verifyDataSignature(
signature,
key,
message,
'stake1_test1hweafkafrwf9ets85rs9gtk9qgzegwtg'
)
); // false
console.log(
verifyDataSignature(signature, key, 'Augusta Ada King, Countess of Lovelace!')
); // false
```

@@ -17,2 +17,3 @@ const webpack = require('webpack');

libraryTarget: 'umd',
globalObject: 'this',
},

@@ -19,0 +20,0 @@ experiments: {

Sorry, the diff of this file is too big to display

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