Learn to identify fundamental transaction types, build a web service and API, and secure digital assets with your blockchain identity. Create a private blockchain, and a notarization web service. Use your blockchain identity to secure digital assets on the Ethereum platform with a smart contract.
By Adrianacmy
Project_2 : Create a private blockchain ledger that persists data and validates the blockchain ledger utilizing block hashes.
Project_3 : Create web service API with Express.js.
Project_4 : Build a Private Blockchain Notary Service.
Project_5 : Decentralized Star Notary.
- ASCII(American Standard Code for Information Interchange): ascii converter
- ascii table
- hexadecimal: converter
- Base64:Encoding scheme meant to represent data as numbers in a string format
String to hex: xxd -p <<< "Blockchain Developer"
Hex to string: echo 426c6f636b636861696e20446576656c6f7065720a|xxd -r -p
String to Hex: xxd -p file.txt fileEncoded.txt
Hex to String: xxd -p -r fileEncoded.txt fileDecoded.txt
Image to Hex: xxd -p img.png img.txt
Hex to Image: xxd -p -r img.txt imgDecoded.png
- Generating Keys in Ethereum
<!-- Generate Private Key -->
openssl ecparam -name secp256k1 -genkey -noout
<!-- Generate a random Private Key & Derive a Public Key -->
openssl ecparam -name secp256k1 -genkey -noout | openssl ec -text -noout > Key
<!-- Generate the hash, and save to a file 'address' -->
cat pub | keccak-256sum -x -l | tr -d ' -' | tail -c 41 > address
-
Ethereum command line interface
- install Geth: https://ethereum.github.io/go-ethereum/install/
- Sync to the Rinkeby Test Network:
geth --rinkeby --syncmode "fast"
-
Get test ether:
-
local test/dev environment Truffle: https://truffleframework.com/docs/ganache/quickstart
npm install -g ganache-cli
sudo npm install -g ganache-cli truffle
<!-- Run Ganache CLI -->
ganache-cli
<!-- Stop Ganache and modify your Ganache command line statement to include --mnemonic "string of words". -->
ganache-cli --mnemonic 'trick core barely fold sample icon display hollow smoke task emotion pepper'
<!-- Compile smart contracts -->
truffle compile
<!-- Deploy smart contract -->
<!-- Make sure to configure your network settings. Modify truffle.js file (or truffle-config.js for windows), example below: -->
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
networks: {
development: {
host: "localhost",
port: 8545,
network_id: "*" // Match any network id
}
}
};
<!-- Run the following command to start the migrations scripts and deploy your smart contracts: -->
truffle migrate
- http-server: https://www.npmjs.com/package/http-server
npm install http-server -g
http-server [path] [options]
<!-- [path] defaults to ./public if the folder exists, and ./ otherwise. -->
- Ether Wei converter: https://www.myetherwallet.com/helpers.html
- OpenZeppelin: https://github.com/OpenZeppelin/openzeppelin-solidity
- Infura: https://infura.io/
- https://ethstats.net/
- https://github.com/ethereum/wiki/wiki/Glossary
- https://traseable.com/
- https://new.consensys.net/: wetsite color solution is great
- https://viant.io/
- https://www.originprotocol.com/en#
- https://bloom.co/
- https://dharma.io/
- https://www.cryptokitties.co/
- https://www.nytimes.com/2018/05/18/style/cryptokitty-auction.html
- N/A
- Javascript
- Nodejs
- Solidity
- LevelDB
- Crypto-js
- Experss.js
- Sails.js
- Hapi.js
n ls // list all available node versions
nvm install v0.4.12 // install certain version
nvm use v0.4.12 // user certain version
- MIT
-
core components: http, fs
-
nvm: node version manager
-
npm
-
nodejs framework: https://nordicapis.com/13-node-js-frameworks-to-build-web-apis/
-
use regnet
<!-- start regtest -->
bitcoind -regtest -daemon
<!-- generate 101 blocks -->
bitcoin-cli -regtest generate 101
<!-- get balance -->
bitcoin-cli -regtest getbalance
// 固定长度为2的静态数组:
uint[2] fixedArray;
// 固定长度为5的string类型的静态数组:
string[5] stringArray;
// 动态数组,长度不固定,可以动态添加元素:
uint[] dynamicArray;
Person[] people;