To make transaction cration easier we made own javascript lib! LIB Please check out redstone js, it has wallet creation, transaction sumbiter, hash, sign, verfy function in the js format compleatly offline and client side.
Every json api request goes to the :8000/json_api/ There will be a lot more apis this is just start.
- ping
- submit_txn_v1
- submit_txn_np
- sign
- gettx (mempool)
- getacc
- create_wallet
- pkacc
request: <node-ip>:8000/json_api/ping
respond: Pong!
MORE INFO TAKES JSON REDSTONE TRANSACTION
post request: request: <node-ip>:8000/json_api/submit_txn
response: Failure/Not Failure
Same thing just node is doing pow for transaction
post request: request: <node-ip>:8000/json_api/submit_txn_np
response: Failure/Not Failure
- hash = hash or tx_id of your transaction
request: <node-ip>:8000/json_api/get_mem_tx/<hash>
response: Full transaction in json format if found
- public_key = public key of your wallet not address!
request: <node-ip>:8000/json_api/get_acc/<public_key>
response: Full account details (Address Balance is smart-contract)
Redstone keypairs are normal keypairs but to make things easier for future app developers we made it an api request! KEYPAIRS ARE CREATED ON SERVER SIDE FOR CLIENT SIDE CREATION PELEASE CHECK REDSTONE JS
request: <node-ip>:8000/json_api/create_wallet
response: Public key, Private Key and Address
Signs a hash without wallet doing it
- pik = private key
- message = message you want to sign
request: <node-ip>:8000/json_api/sign/<pik>/<message>
response: singature in hex format
Sends transaction without wallet doing crypto stuff
- pik = private key
- from = PUBLIC KEY!!!
- amount = float or not
- to = ADDRESS!!!
request: <node-ip>:8000/json_api/send_easy_transaction/<pik>/<from>/<amount>/<to>
From public key retrives an address!
request: <node-ip>:8000/json_api/pkacc/<public_key>
returns: {address: address}
- port of the rpc
./Redstone-node --rpc <rpc_port>
- enable test net
./Redstone-node --testnet
- if used api will not be launched
./Redstone-node --no_api