Hi everyone,
I’m using the skeleton template with ‘Asset’ and I would like to reproduce what is done in the setup script with HTTP requests ( Alice create a token, give it to bob then Bob give it back to Alice).
I can do through the navigator without any issues.
But when I try to create an Asset with a HTTP request I have this error:
"INVALID_ARGUMENT: INVALID_PARTY_IDENTIFIER(8,34158d9c): The given party is not a valid Canton party identifier: Unable to parse party: Invalid unique identifier `alice` with missing namespace."
This is my curl command :
curl --location --request POST 'http://localhost:7575/v1/create' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwczovL2RhbWwuY29tL2xlZGdlci1hcGkiOnsibGVkZ2VySWQiOiJzYW5kYm94IiwiYXBwbGljYXRpb25JZCI6IkN1cmwiLCJhY3RBcyI6WyJBbGljZSJdfX0.dm5C8ayxtj9jxlLU_ziVqqOE4cKYbcpeW5y4_LP78vI' \
--header 'Content-Type: application/json' \
--data-raw '{
"templateId": "Main:Asset",
"payload": {
"issuer": "Alice",
"owner": "Alice",
"name": "something"
}
}'
Created with Postman
And my JWT has been built with this :
{
"https://daml.com/ledger-api": {
"ledgerId": "sandbox",
"applicationId": "Curl",
"actAs": ["Alice"]
}
}
I’m working on sdk 2.1.1
What am I doing wrong with the Party ?
IIt seems to me that I did the same as the ‘Create a new Contract’ section here : HTTP JSON API Service — Daml SDK 2.1.1 documentation