Last active
September 10, 2020 07:36
-
-
Save p-alik/e22f8addd9e6cdd4f8e688dd73ddb82f to your computer and use it in GitHub Desktop.
list accounts, list wallet transactions history
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://cardanodocs.com/technical/wallet/api/ | |
# create a new wallet | |
$ curl -H "Content-Type: application/json" --cacert cardano-sl/scripts/tls-files/ca.crt https://localhost:8090/api/wallets/new -d '{ | |
"cwInitMeta": { | |
"cwName": "my-cardano-wallet", | |
"cwAssurance": "CWAStrict", | |
"cwUnit": 0 | |
}, | |
"cwBackupPhrase": { | |
"bpToList": [ | |
] | |
} | |
}' | |
{"Right":{"cwId":"Ae2tdPwUPEZ18ZjTLnLVr9CEvUEUX4eW1LBHbxxxJgxdAYHrDeSCSbCxrvx","cwMeta":{"cwName":"my-cardano-wallet","cwAssurance":"CWAStrict","cwUnit":0},"cwAccountsNumber":1,"cwAmount":{"getCCoin":"0"},"cwHasPassphrase":false,"cwPassphraseLU":1.514813538881684483e9}} | |
# list wallets | |
$ curl -H "Content-Type: application/json" --cacert cardano-sl/scripts/tls-files/ca.crt https://localhost:8090/api/wallets | |
{"Right":[{"cwId":"Ae2tdPwUPEZ18ZjTLnLVr9CEvUEUX4eW1LBHbxxxJgxdAYHrDeSCSbCxrvx","cwMeta":{"cwName":"my-cardano-wallet","cwAssurance":"CWAStrict","cwUnit":0},"cwAccountsNumber":1,"cwAmount":{"getCCoin":"0"},"cwHasPassphrase":false,"cwPassphraseLU":1.514813538881684483e9}]} | |
# delete wallet | |
$ curl -XDELETE -H "Content-Type: application/json" --cacert cardano-sl/scripts/tls-files/ca.crt https://localhost:8090/api/wallets/Ae2tdPwUPEZ18ZjTLnLVr9CEvUEUX4eW1LBHbxxxJgxdAYHrDeSCSbCxrvx | |
{"Right":[]} | |
# list accounts | |
curl -k -H "Content-Type: application/json" --cacert scripts/tls-files/ca.crt https://localhost:8090/api/account | |
# wallet transactions history | |
curl -k -H "Content-Type: application/json" --cacert scripts/tls-files/ca.crt https://localhost:8090/api/txs/histories?walletId=YOUR-WALLET-ID |
I can not add the certificate file in my javascript post request :(
How do i perform the above operation in javascript ?
I never did it, but it looks like, you could use swagger editor to generate code for the language of your choice. See Playing with the API.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do i perform the above operation in javascript ?