The service is now in alpha version so the API will change.
Sending transaction
Allows sending transactions for confirmation on the peer.
Answer codes:
201 - transaction sent sucessfully.
400 - sending error (there will be an error message in the error field in the reply).
500 - internal error (usually related to data parsing).
POST http://127.0.0.1:8180/v1/backlog{"commands":[{"data":{"alg":"ed25519","id":"EON-27Z6X-N77SJ-B8GEM","key":"9zUema0KRJFkx2mC4HjEZZ0xCH0MMAdGH34rXfz2p4o="},"deadline":300,"id":"CMD-GC3KG-HB3LK-2ETBN","network":"core.dev.Ti2YGY","publisher":"EON-HRAEQ-8NZL7-C9LHJ","timestamp":1592296782,"type":"core.auth.pk.new","version":1}],"confirmations":{"EON-HRAEQ-8NZL7-C9LHJ":"HyZIa5n3fKxlUY6lnJVjYhAICGnIPi2czQnW7T+h/CDJORR5gJPfmYaIP22/yHCHWhfCkWV4aLZkc2k6XcePAg=="},"deadline":300,"fee":1000,"id":"TX-GC3KG-HFN93-GHF6R","publisher":"EON-HRAEQ-8NZL7-C9LHJ","timestamp":1592296782,"version":1}
{"code":0}
Reading account status
Reading the key/verifying the account's existence
Allows to get a public key by EON-ACC-ID. If the account does not exist, it will return as 404.
GET http://{PROXY}/v1/accounts/{EON-ACC-ID}/state
Example:
GET http://127.0.0.1:8180/v1/accounts/EON-HRAEQ-8NZL7-C9LHJ/state
If the account does not exist or the requested data set does not exist it will return as empty JSON object: {}.
If you fully specify the data key, the data in the response will be located by the key ", for example core.auth.pk.alg: {"":"ed25519"}.
Reading the transaction history
Receiving recent transactions
GET http://127.0.0.1:8180/v1/accounts/EON-HRAEQ-8NZL7-C9LHJ/transactions
GET http://127.0.0.1:8180/v1/accounts/EON-HRAEQ-8NZL7-C9LHJ/transactions?page=1&limit=30
Returns 2 parameters - the size and commission for a transaction of this size. This solution should increase the accuracy of commission calculation. To get the commission per byte of a transaction it is necessary to calculate fee / size.
{"fee": 1000,"size": 1000}
Receiving the network time
GET http://127.0.0.1:8180/v1/info/timestamp
{"timestamp": 1588838916}
Account registration service (internal use only)
To access the service, you must specify the access token in the request header: Authorization: Bearer <token>.
Check account status
GET http://127.0.0.1:8180/v1/accounts/EON-HRAEQ-8NZL7-C9LHJ
POST http://127.0.0.1:8180/v1/accounts/{"id": "EON-HRAEQ-8NZL7-C9LHJ","public_key": {"algorithm":"ed25519","value":"s6X2I0RzdMIu60CR4B4bJD6gXy2541I+++BjLwpfPGE=" }}