input-output-hk / cardano-sl

Cryptographic currency implementing Ouroboros PoS protocol
Apache License 2.0
3.78k stars 630 forks source link

How to use rpc api using testnet or mainnet? #4083

Open BhumikaB opened 5 years ago

BhumikaB commented 5 years ago

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 commented 5 years ago

s123

rvl commented 5 years ago

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