cardano-sl icon indicating copy to clipboard operation
cardano-sl copied to clipboard

How to use rpc api using testnet or mainnet?

Open BhumikaB opened this issue 6 years ago • 2 comments

I have followed the following step mention in Documents:

input-output-hk/cardano-sl/blob/master/docs/exchange-onboarding.md#where-can-i-find-the-api-documentation

I have install wallet using comand:

nix-build -A connectScripts.mainnet.wallet -o "./launch_$(date -I)_$(git rev-parse --short HEAD)"

Now, i am confused i can i performed rpc api call because when i am trying the follweing command i m getting error:

curl https://localhost:8090/api/v1/node-info Generate error :

curl: (35) gnutls_handshake() failed: Unknown certificate

curl https://localhost:8090/api/v0/node-info Generate error :

curl: (35) gnutls_handshake() failed: Error in the push function

I am not getting if i have missed anything

BhumikaB avatar Feb 20 '19 11:02 BhumikaB

s123

BhumikaB avatar Feb 21 '19 05:02 BhumikaB

Hello @BhumikaB,

The wallet uses TLS client authentication by default, so you need to add the following options to your curl commands:

--cacert ./state-wallet-mainnet/tls/client/ca.crt --cert ./state-wallet-mainnet/tls/client/client.pem

rvl avatar Feb 27 '19 01:02 rvl