API V1 - Create wallet failed [solved, json problem]


#1

create wallet t failed by api on mainnet, desc as follow:

ubuntu@ip-172-31-19-183:~/ada/cardano-sl$ 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"                      \
 --cacert ./scripts/tls-files/ca.crt                               \
 -d '{                                                             \

“operation”: “create”,
“backupPhrase”: [“squirrel”, “material”, “silly”, “twice”, “direct”,
“slush”, “pistol”, “razor”, “become”, “junk”, “kingdom”, “flee”],
“assuranceLevel”: “normal”,
“name”: “FirstWallet”
}’
{
“status”: “error”,
“diagnostic”: {
“validationError”: “Error in $: Failed reading: satisfy”
},
“message”: “JSONValidationFailed”


#2

This slash is sent as a part of the JSON:

And it shouldn’t be there.

UPD: Just for history: https://github.com/input-output-hk/cardano-sl/issues/2719#issuecomment-384571284


#3

thank you very much.


#4

Hi, I am really curious how could you make v1 api work? I build and run the cardano-sl follow the instruction of github , but I found it only work with v0 api. Why you can use api in v1?


#5

You need to switch to develop branch, unfrotunately this important detail is not documented at all.