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

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”

This slash is sent as a part of the JSON:

image

And it shouldn’t be there.

UPD: Just for history: api/v1/wallets · Issue #2719 · input-output-hk/cardano-sl · GitHub

thank you very much.

1 Like

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?

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

1 Like