Create Policy Id
status: stable
Create policy id for the wallet and a given mint/burn script.
Path parameters
-
walletId
string(hex) Required Minimum length is
40
, maximum length is40
.
Body
Required
policy_script_template
string | object Required One of: Leaf value for a script designating a cosigner co-sharing the script.
Format should match the following pattern:
^(cosigner#)[0-9]*$
.
POST
/wallets/{walletId}/policy-id
curl \
--request POST https://localhost:8090/v2/wallets/{walletId}/policy-id \
--header "Content-Type: application/json" \
--data '{"policy_script_template":"string"}'
Request examples
{
"policy_script_template": "string"
}
Response examples (415)
{
"message": "string",
"code": "an_error_code"
}
Response examples (406)
{
"message": "string",
"code": "not_acceptable"
}
Response examples (400)
{
"message": "string",
"code": "bad_request"
}
Response examples (403)
Invalid_wallet_type
{
"message": "string",
"code": "invalid_wallet_type"
}
{
"message": "string",
"code": "missing_policy_public_key"
}
{
"message": "string",
"code": "created_wrong_policy_script_template"
}
Response examples (202)
{
"policy_id": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b"
}