npm install
- Get your own keys with
node src/cli.js keypair
- Save your keys
- Add your keys to
start.sh
chmod +x start.sh
./start.sh
curl http://localhost:3001/block/<block_num>
curl http://localhost:3001/count
curl http://localhost:3001/newKeyPair
curl http://localhost:3001/peers
curl http://localhost:3001/schedule
First create a valid transaction from cli and put it into a json file
node src/cli.js sign <priv_key> <user> <tx> > tmptx.json
Then send the json to the node
curl -H "Content-type:application/json" --data @tmptx.json http://localhost:3001/transact
Or all-in-one example:
curl -H "Content-type:application/json" --data $(node src/cli.js sign <key> <user> '{"type":3,"data":{"receiver": "miner1", "amount":55}}') http://localhost:3001/transact
node src/cli.js sign 34EpMEDFJwKbxaF7FhhLyEe3AhpM4dwHMLVfs4JyRto5 master '{"type":4,"data":{"link":"hello-world", "pa":"", "pp":"","json":"{\"tags\":[\"steemit\",\"example\",\"tags\"]}"}}' > tmptx.json
curl -H "Content-type:application/json" --data @tmptx.json http://localhost:3001/transact
node src/cli.js sign 34EpMEDFJwKbxaF7FhhLyEe3AhpM4dwHMLVfs4JyRto5 master '{"type":5,"data":{"link":"hello-world", "author":"master", "vt": 100}}' > tmptx.json
curl -H "Content-type:application/json" --data @tmptx.json http://localhost:3001/transact
curl http://localhost:3001/mineBlock
curl -H "Content-type:application/json" --data '{"peer" : "ws://localhost:6001"}' http://localhost:3001/addPeer
mongo <db_name>
db.accounts.findOne({name:'master'})
db.blocks.findOne({_id: 0})
Shut everything down, then db.dropDatabase()
in mongo, and restart