- Proof-of-stake algorithm
- Verify blockchain (to prevent tampering)
- Generate wallet (private/public key)
- Sign transactions
- P2P Enabled
npm install --save blockmec Send transactions
{"to":"Address", "amount":Number,"type": "TRANSACTION"| "STAKE" | "VALIDATOR_FEE" }Returns the content of the transaction pool
Returns the public-key of the node
Returns the balance of the node
Run a few nodes with different HTTP and Socket Ports
1st Node
HTTP_PORT=3001 P2P_PORT=5001 npm run dev2nd Node - add the 1st node as peer
HTTP_PORT=3002 P2P_PORT=5002 PEERS=wc://localhost:5001 npm run dev3rd Node - add the 1st and 2nd node as peer
HTTP_PORT=3003 P2P_PORT=5003 PEERS=wc://localhost:5001,wc://localhost:5002 npm run dev
