New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eos-ecc

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eos-ecc - npm Package Compare versions

Comparing version 1.0.1-rc to 2.0.1

12

changelog.md
# eos-ecc changelog
## Next
## V 2.0.0
### Patch
- Updated dependency `universal-ecdsa`.
- Added extra tests to private key to public key fn.
### Major

@@ -19,2 +13,4 @@

- Renamed `generate_signature` to `sign_txn`.
### Minor

@@ -28,2 +24,4 @@

- added seed to `new_eos_keys`.
### Patch

@@ -30,0 +28,0 @@

{
"name": "eos-ecc",
"version": "1.0.1-rc",
"description": "A universal JavaScript package for elliptic curve cryptography on the EOSIO blockchain.",
"version": "2.0.1",
"description": "A universal JavaScript ECDSA packaged for EOS blockchain.",
"main": "public/index.js",

@@ -6,0 +6,0 @@ "engines": {

@@ -11,3 +11,3 @@ 'use strict'

* @kind function
* @name generate_eos_signature
* @name sign_txn
* @param {object} arg Argument.

@@ -19,18 +19,18 @@ * @param {string | Uint8Array} arg.hex Data to sign.

* ```js
* import { generate_eos_signature } from 'eos-ecc'
* import { sign_txn } from 'eos-ecc'
* ```
* @example <caption>Ways to `require`.</caption>
* ```js
* const { generate_eos_signature } = require('eos-ecc')
* const { sign_txn } = require('eos-ecc')
* ```
* @example <caption>Usage of `generate_eos_signature`.</caption>
* @example <caption>Usage of `sign_hash`.</caption>
* ```js
* import crypto from 'crypto'
*
* generate_eos_signature({
* data: hello,
* sign_txn({
* hex: FDFDFDFD,
* wif_private_key: '5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3'
* }).then(console.log)
* ```
* The logged output will be SIG_K1_JxMN(…)NJ.
* The logged output will be SIG_K1_….
*/

@@ -37,0 +37,0 @@ async function sign_txn({ hex, wif_private_key }) {

@@ -9,2 +9,8 @@ ![eos ecc logo](https://raw.githubusercontent.com/pur3miish/eos-ecc/main/static/eos-ecc.svg)

# Setup
```shell
npm i eos-ecc
```
# Support

@@ -21,48 +27,7 @@

- [function generate_eos_signature](#function-generate_eos_signature)
- [function new_eos_keys](#function-new_eos_keys)
- [function public_key_from_private](#function-public_key_from_private)
- [function sign_txn](#function-sign_txn)
- [type KeyPair](#type-keypair)
## function generate_eos_signature
Generate an EOS encoded signature.
| Parameter | Type | Description |
| :-- | :-- | :-- |
| `arg` | object | Argument. |
| `arg.hex` | string \| Uint8Array | Data to sign. |
| `arg.wif_private_key` | string | An EOS wallet import format private key. |
**Returns:** string — EOS encoded signature.
### Examples
_Ways to `import`._
> ```js
> import { generate_eos_signature } from 'eos-ecc'
> ```
_Ways to `require`._
> ```js
> const { generate_eos_signature } = require('eos-ecc')
> ```
_Usage of `generate_eos_signature`._
> ```js
> import crypto from 'crypto'
>
> generate_eos_signature({
> data: hello,
> wif_private_key: '5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3'
> }).then(console.log)
> ```
>
> The logged output will be SIG_K1_JxMN(…)NJ.
---
## function new_eos_keys

@@ -154,2 +119,43 @@

## function sign_txn
Generate an EOS encoded signature.
| Parameter | Type | Description |
| :-- | :-- | :-- |
| `arg` | object | Argument. |
| `arg.hex` | string \| Uint8Array | Data to sign. |
| `arg.wif_private_key` | string | An EOS wallet import format private key. |
**Returns:** string — EOS encoded signature.
### Examples
_Ways to `import`._
> ```js
> import { sign_txn } from 'eos-ecc'
> ```
_Ways to `require`._
> ```js
> const { sign_txn } = require('eos-ecc')
> ```
_Usage of `sign_hash`._
> ```js
> import crypto from 'crypto'
>
> sign_txn({
> hex: FDFDFDFD,
> wif_private_key: '5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3'
> }).then(console.log)
> ```
>
> The logged output will be SIG_K1\_….
---
## type KeyPair

@@ -156,0 +162,0 @@

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