Post
Topic
Board Announcements (Altcoins)
Re: [ANN][YAC] YACoin ongoing development
by
sairon
on 01/06/2014, 18:46:40 UTC
here's a beta version of the API reference, feel free to make a pull request Smiley
https://github.com/saironiq/electrum-server/blob/master/README-API.md

also, i'm open to suggestions for new api methods if you need them.

you can test the API at electrum.unsha.net
ports: 50001 (tcp), 50002 (ssl), 8081 (http), 8082 (https)
and the brand new webocket interfaces: 8008 (websocket), 8009 (ssl websocket)

i wanna see some great new services built upon this api! Tongue

you can run your own electrum server (clone at https://github.com/saironiq/electrum-server), however, you need to apply this patch to yacoind first: https://github.com/saironiq/yacoin/commit/801d5756072bbe087cf009ad8490aff17aeb664f

Can you post an example of http request to "getdifficulty"?. I cant seem to work it out.
it's json-rpc. simply make a get or post request with data set to the actual request

eg. with curl:

Code:
curl -d '{"method": "blockchain.mempool.get", "id": 0, "params": []}' -H 'Cookie: SESSION=YOU-GET-THIS-FROM-SERVER-AFTER-FIRST-REQUEST' electrum.unsha.net:8081

the session cookie is quite important as the server will not neccessarily return the answer right away. if it doesn't, you just send an empty message ("[]" is a good example, an empty array) and the server sends you all the queued responses.