PermissionedDomainSet
Create a permissioned domain, or modify one that you own.
(Requires the PermissionedDomains amendment )
Example PermissionedDomainSet JSON
{
"TransactionType": "PermissionedDomainSet",
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Fee": "10",
"Sequence": 390,
"AcceptedCredentials": [
{
"Credential": {
"Issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"CredentialType": "6D795F63726564656E7469616C"
}
}
]
}
PermissionedDomainSet Fields
In addition to the common fields, PermissionedDomainSet transactions use the following fields:
Field | JSON Type | Internal Type | Required? | Description |
---|---|---|---|---|
DomainID | String - Hash | Hash256 | No | The ledger entry ID of an existing permissioned domain to modify. If omitted, creates a new permissioned domain. |
AcceptedCredentials | Array | Array | Yes | A list of 1 to 10 Accepted Credentials objects that grant access to this domain. The list does not need to be sorted, but it cannot contain duplicates. When modifying an existing domain, this list replaces the existing list. |
AcceptedCredentials Objects
Each member of the AcceptedCredentials
array is an inner object named Credential
with the following nested fields:
Field | JSON Type | Internal Type | Required? | Description |
---|---|---|---|---|
Issuer | String - Address | AccountID | Yes | The issuer of the credential. |
CredentialType | String | Blob | Yes | The type of credential, as hexadecimal. This is an arbitrary value from 1 to 64 bytes that the issuer sets when they issue a credential. |
Note
In the usual JSON format, inner objects are wrapped in an object with one field, whose name defines the inner object type. In this case, the wrapping field is named Credential
. For example:
"AcceptedCredentials": [
{
"Credential": {
"Issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"CredentialType": "6D795F63726564656E7469616C"
}
},
// ... additional Credential inner objects ...
]
PermissionedDomainSet Flags
There are no flags defined for PermissionedDomainSet transactions.
Error Cases
Besides errors that can occur for all transactions, PermissionedDomainSet transactions can result in the following transaction result codes:
Error Code | Description |
---|---|
tecDIR_FULL | The transaction would create a new PermissionedDomain, but the sender's owner directory is full. |
tecINSUFFICIENT_RESERVE | The transaction would create a new PermissionedDomain, but the sender does not have enough XRP to meet the increased owner reserve. |
tecNO_ENTRY | The transaction attempted to modify a Domain that does not exist. Check the DomainID field of the transaction. |
tecNO_ISSUER | At least one of the issuers specified in the AcceptedCredentials field is does not exist in the XRP Ledger. Check the Issuer field of each member of the array. |
tecNO_PERMISSION | The transaction attempted to modify an existing Domain, but the sender of the transaction is not the owner of the specified Domain. |
temDISABLED | Either the PermissionedDomains amendment is not enabled, or the Credentials amendment is not enabled. |