Create Policy Key
status: stable
Create policy key for the wallet.
In order to be able to mint/burn assets with POST Construct
endpoint there needs to be
a policy key set for the wallet. Invoking this endpoint would be required for all wallets instantiated
before introducing mint/burn feature prior to making a mint/burn transaction from them.
To get a hash of the policy key instead of the policy key,
use query parameter hash=true
.
Path parameters
-
walletId
string(hex) Required Minimum length is
40
, maximum length is40
.
Body
Required
-
passphrase
string Required A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)
Minimum length is
10
, maximum length is255
.
POST
/wallets/{walletId}/policy-key
curl \
--request POST https://localhost:8090/v2/wallets/{walletId}/policy-key \
--header "Content-Type: application/json" \
--data '{"passphrase":"Secure Passphrase"}'
Request examples
{
"passphrase": "Secure Passphrase"
}
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 (202)
string