Package Exports
- nequequam
- nequequam/dist/es/index.js
- nequequam/dist/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nequequam) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
eth-crypto
Cryptographic javascript-functions for ethereum and tutorials on how to use them together with web3js and solidity.
Tutorials
Creating Keys and use them for ethereum-transactions
In this tutorial we will create an ethereum-identity and use it so send transactions to the blockchain.
Sign and validate data with solidity
In this tutorial we will sign data in javascript and validate the signature inside of a smart-contract.
Sending encrypted and signed data to other identites
In this tutorial we will use the ethereum-identites and asymmetric cryptography to send an encrypted and signed message from Alice to Bob.
Functions
Install
npm install eth-crypto --save
// es6
import EthCrypto from 'eth-crypto';
// node
const EthCrypto = require('eth-crypto');
API
- createIdentity()
- publicKeyByPrivateKey()
- publicKey.toAddress()
- publicKey.compress()
- publicKey.decompress()
- sign()
- recover()
- recoverPublicKey()
- encryptWithPublicKey()
- decryptWithPrivateKey()
- cipher.stringify()
- cipher.parse()
- signTransaction()
- txDataByCompiled()
- calculateContractAddress()
- hex.compress() hex.decompress()