RVMNode
This is the basic blockchain node component of RVM Coin.
// this assumes your running on localhost.
// Testnet port is 17222 for nodes
//prod 18222
Balance
http://localhost:18222/balance
payload:
{ "publicaddress":RVM2s26TKXfMCkx2mcY17yPpgP6ySPdDackgs5DDjAhEDkBM1B1U1",
amount:0
}
curl http://localhost:18222/balance -d '{ "publicaddress":RVM2s26TKXfMCkx2mcY17yPpgP6ySPdDackgs5DDjAhEDkBM1B1U1",amount:0}'
Response: (Amount as whole number. divide by 10,000 for coin amount)
{ "publicaddress":RVM2s26TKXfMCkx2mcY17yPpgP6ySPdDackgs5DDjAhEDkBM1B1U1",
amount:1234560000
}
Block
http://localhost:18222/block
payload: (use block number or hash number trumps hash)
{
"blockheight":5,
"blockhash":[]
}
curl http://localhost:18222/block -d '{"blockheight":0,"blockhash":""}'
Response:
{"BlockHeight":0,
"Difficulty":1,"LastBlockHash":"b21a23f8f31dba62df59744315469c367652bc9f71ed818d55fa3f08e264171d",
"Transactions":[
{"TransactionID":"pzLWbuyO06x+KK7Rin8lCw/9T8aBqqS99hPbHs74axQ=",
"Inputs":[
{"Address":[186,214,38,95,14,123,138,198,226,22,14,216,128,255,238,204,90,147,178,169,88,48,2,77,22,82,88,215,34,200,187,57],
"Amount":0,
"Timestamp":1619467467658,
"SignatureBytes":[8,151,184,227,216,128,173,42,67,159,27,87,208,148,44,210,38,1,55,197,120,122,30,253,249,189,115,240,89,44,16,88,66,200,32,20,90,149,29,1,190,212,34,239,22,101,100,57,154,52,231,85,107,51,162,252,164,237,100,88,10,28,32,7]
}],
"InputsHash":"TbxDaVb2inXOwt6t5+yWUFdIgadMXsO82RS6K0FFeGg=",
"Outputs":[
{"Address":[186,214,38,95,14,123,138,198,226,22,14,216,128,255,238,204,90,147,178,169,88,48,2,77,22,82,88,215,34,200,187,57],
"Amount":400000
}
],
"OutputsHash":"tlPWrdCG8bue7+Xv+2FI/e2K6xHR/6Z7qfkVGI8gK9U=",
"Messages":[
{"Key":"QkxPQ0tERVNDUklQVElPTg==","Value":"R0VORVNJUyBCTE9DSw=="}
],
"MessagesHash":"1w83T8F4S2kFSuZV57brx41kn4kAGa70B9HDDswLGl4=",
"Timestamp":1619467467658,
"Signatures":[
{"SignatureAddress":[176,136,246,228,37,2,2,193,254,189,231,132,58,50,64,84,19,143,152,140,118,63,186,64,222,93,174,212,74,140,105,244],
"SignatureBytes":[218,70,56,104,40,242,118,106,184,246,5,136,241,240,98,229,208,32,54,67,195,13,121,213,187,4,131,175,157,32,41,48,179,159,15,192,199,159,194,42,61,188,186,56,233,112,182,22,136,130,192,103,71,57,81,221,178,92,190,175,210,5,159,7]}],
"RequiredSignatures":0}],
"SignerPublicKey":"RVM1XGk9eYuUpLKPejYxXH85Vo4rivaGxQj3vLbgSkJSX8cYszju3",
"Nonce":0,
"Signature":null,
"Timestamp":1619467467659
}
Block Hash
http://localhost:18222/block
payload:
{"blockheight":0,"blockhash":""}
curl http://localhost:18222/blockhash -d '{"blockheight":5,"blockhash":[]}'
Response:
{"blockheight":0,
"blockhash":"b21a23f8f31dba62df59744315469c367652bc9f71ed818d55fa3f08e264171d"}
Block Height
http://localhost:18222/blockheight
payload:
none
curl http://localhost:18222/blockheight
Response:
{"blockheight":0,
"networkheight":0,
"blockhash":"cb0b8768f3c7ddace07580a8c83c8b5ab78bec7954b0e28a02e87d0cb88491e1",
"timestamp":1619467467659}
New Transaction
http://localhost:18222/newtransaction
payload:
ToDo
curl http://localhost:18222/newtransaction -d 'ToDo'
Response:
{"transactionhash":"cb0b8768f3c7ddace07580a8c83c8b5ab78bec7954b0e28a02e87d0cb88491e1",
"status":"PENDING",
"timestamp":1619467467659
Pending Transactions
http://localhost:18222endingtransactions
payload
none
curl http://localhost:18222endingtransactions
Response:
[]