Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pubkey/eth-crypto
Cryptographic javascript-functions for ethereum and tutorials to use them with web3js and solidity
https://github.com/pubkey/eth-crypto
blockchain cipher dapp encryption eth ethereum ethereum-identity privatekey publickey sign sign-data signature signtransaction smart-contracts solidity transaction truffle tutorial web3 web3js
Last synced: 5 days ago
JSON representation
Cryptographic javascript-functions for ethereum and tutorials to use them with web3js and solidity
- Host: GitHub
- URL: https://github.com/pubkey/eth-crypto
- Owner: pubkey
- License: mit
- Created: 2018-01-21T20:02:28.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-25T18:35:38.000Z (3 months ago)
- Last Synced: 2024-10-29T15:12:00.271Z (3 months ago)
- Topics: blockchain, cipher, dapp, encryption, eth, ethereum, ethereum-identity, privatekey, publickey, sign, sign-data, signature, signtransaction, smart-contracts, solidity, transaction, truffle, tutorial, web3, web3js
- Language: JavaScript
- Homepage:
- Size: 592 KB
- Stars: 877
- Watchers: 19
- Forks: 158
- Open Issues: 5
-
Metadata Files:
- Readme: README
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- Library-of-Ethereum - ETH Crypto - Cryptographic javascript-functions for ethereum and tutorials on how to use them together with web3js and solidity (Cryptography / Cairo)
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](./tutorials/creating-transactions.md)**
In this tutorial we will create an ethereum-identity and use it so send transactions to the blockchain.
- **[Sign and validate data with solidity](./tutorials/signed-data.md)**
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](./tutorials/encrypted-message.md)**
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
```bash
npm install eth-crypto --save
``````javascript
// es6
import EthCrypto from 'eth-crypto';// node
const EthCrypto = require('eth-crypto');
```## API
- [createIdentity()](https://github.com/pubkey/eth-crypto#createidentity)
- [publicKeyByPrivateKey()](https://github.com/pubkey/eth-crypto#publickeybyprivatekey)
- [publicKey.toAddress()](https://github.com/pubkey/eth-crypto#publickeytoaddress)
- [publicKey.compress()](https://github.com/pubkey/eth-crypto#publickeycompress)
- [publicKey.decompress()](https://github.com/pubkey/eth-crypto#publickeydecompress)
- [sign()](https://github.com/pubkey/eth-crypto#sign)
- [recover()](https://github.com/pubkey/eth-crypto#recover)
- [recoverPublicKey()](https://github.com/pubkey/eth-crypto#recoverpublickey)
- [encryptWithPublicKey()](https://github.com/pubkey/eth-crypto#encryptwithpublickey)
- [decryptWithPrivateKey()](https://github.com/pubkey/eth-crypto#decryptwithprivatekey)
- [cipher.stringify()](https://github.com/pubkey/eth-crypto#cipherstringify)
- [cipher.parse()](https://github.com/pubkey/eth-crypto#cipherparse)
- [signTransaction()](https://github.com/pubkey/eth-crypto#signtransaction)
- [txDataByCompiled()](https://github.com/pubkey/eth-crypto#txdatabycompiled)
- [calculateContractAddress()](https://github.com/pubkey/eth-crypto#calculatecontractaddress)
- [hex.compress() hex.decompress()](https://github.com/pubkey/eth-crypto#hex-compressdecompress)# [READ THE FULL DOCUMENTATION ON GITHUB](https://github.com/pubkey/eth-crypto)