However, I could not access the API using any certificate: (shunfan is my username)
$ curl --cacert /home/shunfan/cardano-sl/scripts/tls-files/ca.crt https://localhost:8090/api/settings/sync/progress
curl: (60) server certificate verification failed. CAfile: /home/shunfan/cardano-sl/scripts/tls-files/ca.crt CRLfile: none
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
/home/shunfan/cardano-sl/scripts/tls-files/ca.crt does exist and I tried /home/shunfan/cardano-sl/state-wallet-mainnet/tls/server.cert as well. However, both of them throw the same error.
Hi,I am a guy from China and I am a newbie for the Cardano.
I run the Cardano node withe the some intructions as the above and met the same issue with you!
I tried to add the -k in my curl command,but it only works for some get request,just like:
curl -k https://localhost:8090/api/settings/sync/progress or /api/info…
when I try the post command to create a new wallet,the command is in the below link:
curl -k -X POST https://localhost:8090/api/v1/wallets
-H “Content-Type: application/json; charset=utf-8”
-H “Accept: application/json; charset=utf-8” \
-d ‘{
“operation”: “create”,
“backupPhrase”: [“squirrel”, “material”, “silly”, “twice”, “direct”,
“slush”, “pistol”, “razor”, “become”, “junk”, “kingdom”, “flee”],
“assuranceLevel”: “normal”,
“name”: “MyFirstWallet”
}’
unfortunately,the command return nothing!
I wanna know whether you solve the issue and Could u create the new wallet with the post command?
Thanks!Looking forward to your reply!
@Shunfan Hi,friend! Could I have your several minutes??
I have created some new wallet and new accounts using the v0 api with curl command!
But I failed finally when I tried to create some new addresses.
The doc link is here:https://cardanodocs.com/technical/wallet/api/v0/#tag/V0-(Deprecated)%2Fpaths%2F~1api~1addresses%2Fpost
I think the part about creating the new addresses is not very clear.
I am really confused.I have tried the different curl command like below:
curl -k -X POST https://127.0.0.1:8090/api/addresses -H “Content-Type: application/json;charset=utf-8” -d ‘{“caId”:‘Ae2tdPwUPEZ18ZjTLnLVr9CEvUEUX4eW1LBHbxxxJgxdAYHrDeSCSbCxrvx@2329733709’}’
Neither worked!What’s wrong with the curl command??
Have you succeeded with the creating addresses with curl command??
Could u paste your curl command here?
Thanks so much!
The other curl commands I have tried:
curl -k -X POST https://127.0.0.1:8090/api/addresses -H “Content-Type: text/plain;charset=utf-8” -d “Ae2tdPwUPEZ18ZjTLnLVr9CEvUEUX4eW1LBHbxxxJgxdAYHrDeSCSbCxrvx@2329733709”
Connection #0 to host 127.0.0.1 left intact
Failed reading: not a valid json value
Both commands(“caId”:…and “CAccountId”:…) return the same response.
Maybe the last sentence is import: Failed reading:not a valid json value.
But I really don’t know how to arrage the json value from the v0 api doc!