Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Latest commit

 

History

History
58 lines (37 loc) · 1.29 KB

send-requests-to-wallet-api.md

File metadata and controls

58 lines (37 loc) · 1.29 KB

How to send requests to Wallet API

Preparing

Clone cardano-sl repository:

$ git clone git@github.com:input-output-hk/cardano-sl.git
$ cd cardano-sl

Build it:

$ ./scripts/build/cardano-sl.sh

Run tmux:

$ tmux

Then launch nodes:

$ ./scripts/launch/demo-with-wallet-api.sh

By default 3 nodes will be started.

Send requests via curl

You can send requests via curl as well. Default port for the wallet API is 8090.

Please note that since cardano-sl-0.6 we are using TLS. This is an example of request (via SSL connection without certificate):

$ curl -k https://localhost:8090/api/settings/sync/progress

Possible response:

{"Right":{"_spLocalCD":{"getChainDifficulty":19273},"_spNetworkCD":{"getChainDifficulty":19273},"_spPeers":0}}

This is an example with the certificate:

curl --cacert /home/user/projects/cardano-sl/scripts/tls-files/ca.crt http://localhost:8090/api/settings/sync/progress

Please see online documentation for wallet API for complete information.

Send requests via Postman

You can send requests using Postman program as well.