Skip to content

Instantly share code, notes, and snippets.

@scalahub
Last active October 8, 2019 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scalahub/ed96d7e8321dedf0c1b84ab1ac593409 to your computer and use it in GitHub Desktop.
Save scalahub/ed96d7e8321dedf0c1b84ab1ac593409 to your computer and use it in GitHub Desktop.
Request body
See description of /wallet/transaction/generate
Examples:
{"requests":[{"address":"4MQyML64GnzMxZgm","value":123456,"assets":[],"registers":{"R4":"0e20f091616c10378d94b04ed7afb6e7e8da3ec8dd2a9be4a343f886dd520f688563","R5":"061913aaf504e4bc1e62173f87a4378c37b49c8ccff196ce3f0ad2","R6":"0e061a2b3c4d5e6f"}},{"address":"7g5LhysK7mxX8xmZdPLtFE42wwxGFjpp8VofStb","value":123456,"assets":[],"registers":{"R4":"0e20f091616c10378d94b04ed7afb6e7e8da3ec8dd2a9be4a343f886dd520f688563","R5":"061913aaf504e4bc1e62173f87a4378c37b49c8ccff196ce3f0ad2","R6":"0e061a2b3c4d5e6f"}}],"fee":1000000,"inputsRaw":[]}
Execute
Clear
Responses
Curl
curl -X POST "http://localhost:9053/wallet/transaction/send" -H "accept: application/json" -H "api_key: hello" -H "Content-Type: application/json" -d "{\"requests\":[{\"address\":\"4MQyML64GnzMxZgm\",\"value\":123456,\"assets\":[],\"registers\":{\"R4\":\"0e20f091616c10378d94b04ed7afb6e7e8da3ec8dd2a9be4a343f886dd520f688563\",\"R5\":\"061913aaf504e4bc1e62173f87a4378c37b49c8ccff196ce3f0ad2\",\"R6\":\"0e061a2b3c4d5e6f\"}},{\"address\":\"7g5LhysK7mxX8xmZdPLtFE42wwxGFjpp8VofStb\",\"value\":123456,\"assets\":[],\"registers\":{\"R4\":\"0e20f091616c10378d94b04ed7afb6e7e8da3ec8dd2a9be4a343f886dd520f688563\",\"R5\":\"061913aaf504e4bc1e62173f87a4378c37b49c8ccff196ce3f0ad2\",\"R6\":\"0e061a2b3c4d5e6f\"}}],\"fee\":1000000,\"inputsRaw\":[]}"
Request URL
http://localhost:9053/wallet/transaction/send
Server response
Code Details
200
Response body
Download
"fb8261828d8955c15d9ff6d7e1e0c3d6935228ff3c0af5effd95ce08018ecc76"
Response headers
access-control-allow-credentials: true
access-control-allow-headers: Authorization, Content-Type, X-Requested-With
access-control-allow-origin: *
content-length: 66
content-type: application/json
date: Mon, 07 Oct 2019 18:34:09 GMT
server: akka-http/10.1.9
Responses
Code Description Links
200
@scalahub
Copy link
Author

scalahub commented Oct 8, 2019

Info about the node

{
"currentTime": 1570379329678,
"name": "n1",
"stateType": "utxo",
"difficulty": 154889405595648,
"bestFullHeaderId": "65d85e94ad0a570eacb5b53557b31824ef39460eda7fda038085e3e0bb44261e",
"bestHeaderId": "65d85e94ad0a570eacb5b53557b31824ef39460eda7fda038085e3e0bb44261e",
"peersCount": 8,
"unconfirmedCount": 0,
"appVersion": "3.1.0",
"stateRoot": "859794c9b07c48027edb4c83974b668c51acd44198dcb8c3f196d9c41757d38314",
"genesisBlockId": "b0244dfc267baca974a4caee06120321562784303a8a688976ae56170e4d175b",
"previousFullHeaderId": "7262a472750d8d727797d098dad97d7b06fd5eec42f069354567f3eada4b5cfb",
"fullHeight": 70233,
"headersHeight": 70233,
"stateVersion": "65d85e94ad0a570eacb5b53557b31824ef39460eda7fda038085e3e0bb44261e",
"fullBlocksScore": 9361174391804658000,
"launchTime": 1570379267586,
"headersScore": 9361174391804658000,
"parameters": {
"outputCost": 100,
"tokenAccessCost": 100,
"maxBlockCost": 1000000,
"height": 69632,
"maxBlockSize": 524288,
"dataInputCost": 100,
"blockVersion": 1,
"inputCost": 2000,
"storageFeeFactor": 1250000,
"minValuePerByte": 360
},
"isMining": false
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment