Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

EOSJS v21.0.0-rc2 Release Notes

Pre-release
Pre-release
Compare
Choose a tag to compare
@blockone-devops blockone-devops released this 07 Feb 15:10
· 255 commits to release/21.0.x since this release
bc8edc8

EOSJS v21.0.0-rc2 Release Notes

This is a RELEASE CANDIDATE for version 21.0.0. The latest STABLE release is v20.0.0.

This Release Candidate can be accessed by running yarn add eosjs@RC.

Additional Helpers with elliptic

elliptic has methods to sign, verify, and recover keys and signatures. For ease of use, helper functions that perform the conversion and operation of those methods have been added. These are added to PublicKey, PrivateKey, and Signature classes located in src/eosjs-key-conversions.ts as well as re-exported in src/eosjs-jssig.ts. Usage examples of each can be found in src/tests/eosjs-jssig.test.ts. A glimpse of the functions follows:

// Retrieve the public key from a private key
const privateKey = PrivateKey.fromString(eosioK1PrivateKeyAsString);
const publicKey = privateKey.getPublicKey();

// Sign a message digest with private key
const privateKey = PrivateKey.fromString(eosioK1PrivateKeyAsString);
const signature = privateKey.sign(digest);

// Validate a public key
const publicKey = PublicKey.fromString(eosioK1PubKeyAsString);
const valid = publicKey.validate();

// Verify a signature with a message digest and public key
const publicKey = PublicKey.fromString(eosioK1PubKeyAsString);
const signature = Signature.fromString(eosioSignatureAsString);
const verified = signature.verify(digest, publicKey);

// Recover a public key from a message digest and signature
const signature = Signature.fromString(eosioSignatureAsString);
const publicKey = signature.recover(digest);

/v1/chain/get_table_rows table_key parameter deprecated

table_key has been deprecated on the chain_plugin. Replace usages of table_key with index_position and use the position of the index where 1 is your primary (first), 2 is your secondary index (in order defined by multi_index), 3 is third index, etc

Minified file convention

yarn build-web command will create both debug and minified files in the dist-web location. Please use the minified *.min.js files in production and only use the debug files for development as they are over 10 times as large as the minified versions, and importing the debug versions will increase loading times for the end user.

Other Changes

  • (#649) Merge pull request #649 from EOSIO/develop-version-bump
  • (#653) Sign, recover, verify, and validate functions
  • (#656) Removing latest npm deploy from Travis CI configuration
  • (#664) Zero padding Signature r-value/s-value to 32 bytes
  • (#666) Fix invalid symbol issue
  • (#670) Remove warnings
  • (#672) Readme Changes
  • (#676) Minified file convention
  • (#675) Removing usages of deprecated table_key
  • (#671) Rename of basic-usage was missed in doc

Disclaimer: All repositories and other materials are provided subject to this IMPORTANT notice and you must familiarize yourself with its terms. The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources, and forward-looking statements. By accessing any of our repositories and other materials, you accept and agree to the terms of the notice.