AddAccountPermission
Adds permissions to a specific account on the Shamwari Network.
Request
POST /nxt?requestType=add-account-permission
All endpoints use port 22024 by default.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
recipient | string | Account ID or SHAMWARI address to modify | Yes |
permission | string | Permission to add (see permission bit values) | Yes |
secretPhrase | string | Sender's secret passphrase | Yes |
accountType | int | Account type | Optional |
gender | string | Gender (M/F/Other) | Optional |
nationality | string | Nationality code | Optional |
dateOfBirth | int | Date of birth (YYYYMMDD) | Optional |
Permission Values
| Permission | Description |
|---|---|
OUTGOING_TRANSACTIONS_ALLOWED | Allow outgoing transactions |
INCOMING_TRANSACTIONS_ALLOWED | Allow incoming transactions |
ASSET_ISSUANCE_ALLOWED | Allow asset issuance |
CURRENCY_ISSUANCE_ALLOWED | Allow currency issuance |
ACCOUNT_PROPERTY_SET_ALLOWED | Allow account property setting |
ACCOUNT_CONTROLLER_ALLOWED | Allow account controlling |
GRAYLISTING_ALLOWED | Allow graylisting |
Response
{
"transaction": "1234567890123456789",
"fullHash": "abc123def456...",
"transactionJSON": {
"type": 2,
"subtype": 10,
"timestamp": 123456789,
"deadline": 14400,
"senderPublicKey": "abc123...",
"amountNQT": "0",
"feeNQT": "100000000",
"signature": "def456...",
"attachment": {
"version.AddAccountPermission": 1,
"recipient": "0987654321",
"permission": "CURRENCY_ISSUANCE_ALLOWED"
}
},
"errorCode": 0,
"errorDescription": ""
}
Example
curl -X POST "http://localhost:22024/nxt?requestType=add-account-permission" \
-d "recipient=SHAMWARI-ABCD-EFGH-IJKL-MNOPQ" \
-d "permission=CURRENCY_ISSUANCE_ALLOWED" \
-d "secretPhrase=your_secret_passphrase"