Skip to content

Commit a928e26

Browse files
authored
Merge pull request #3029 from XRPLF/add-permissioneddomain-object
add permissioned domain object
2 parents 1bd8c9b + 8d4878d commit a928e26

File tree

3 files changed

+105
-0
lines changed

3 files changed

+105
-0
lines changed

docs/_snippets/common-links.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
[PaymentChannelFundトランザクション]: /docs/references/protocol/transactions/types/paymentchannelfund.md
244244
[Payment]: /docs/references/protocol/transactions/types/payment.md
245245
[Paymentトランザクション]: /docs/references/protocol/transactions/types/payment.md
246+
[PermissionedDomainSet transaction]: /docs/references/protocol/transactions/types/permissioneddomainset.md
246247
[PermissionedDomains amendment]: /resources/known-amendments.md#permissioneddomains
247248
[permissioned domain]: /docs/concepts/tokens/decentralized-exchange/permissioned-domains.md
248249
[PriceOracle amendment]: /resources/known-amendments.md#priceoracle
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
seo:
3+
description: A PermissionedDomain ledger entry represents a Permissioned Domain, which is used to limit access to other features.
4+
labels:
5+
- Compliance
6+
- Permissioned Domains
7+
---
8+
# PermissionedDomain
9+
[[Source]](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/detail/ledger_entries.macro#L451-L461 "Source")
10+
11+
A `PermissionedDomain` ledger entry describes a single [permissioned domain][] instance. You can create a permissioned domain by sending a [PermissionedDomainSet transaction][].
12+
13+
_(Requires the [PermissionedDomains amendment][] {% not-enabled /%})_
14+
15+
16+
## Example {% $frontmatter.seo.title %} JSON
17+
18+
```json
19+
{
20+
"LedgerEntryType": "PermissionedDomain",
21+
"Fee": "10",
22+
"Flags": 0,
23+
"Owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
24+
"OwnerNode": "0000000000000000",
25+
"Sequence": 390,
26+
"AcceptedCredentials": [
27+
{
28+
"Credential": {
29+
"Issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
30+
"CredentialType": "6D795F63726564656E7469616C"
31+
}
32+
}
33+
],
34+
"PreviousTxnID": "E7E3F2BBAAF48CF893896E48DC4A02BDA0C747B198D5AE18BC3D7567EE64B904",
35+
"PreviousTxnLgrSeq": 8734523,
36+
"index": "3DFA1DDEA27AF7E466DE395CCB16158E07ECA6BC4EB5580F75EBD39DE833645F"
37+
}
38+
```
39+
40+
<!-- TODO: use a real example above -->
41+
42+
## {% $frontmatter.seo.title %} Fields
43+
44+
In addition to the [common fields](../common-fields.md), {% code-page-name /%} entries have the following fields:
45+
46+
| Field | JSON Type | [Internal Type][] | Required? | Description |
47+
|:----------------------|:----------|:------------------|:----------|--------------|
48+
| `AcceptedCredentials` | Array | Array | Yes | A list of 1 to 10 [Credential](#acceptedcredentials-objects) objects that grant access to this domain. The array is stored sorted by issuer. |
49+
| `Owner` | String - [Address][] | AccountID | Yes | The address of the account that owns this domain. |
50+
| `OwnerNode` | String | UInt64 | Yes | A hint indicating which page of the owner directory links to this entry, in case the directory consists of multiple pages. |
51+
| `PreviousTxnID` | String - [Hash][] | Hash256 | Yes | The identifying hash of the transaction that most recently modified this entry. |
52+
| `PreviousTxnLgrSeq` | Number | UInt32 | Yes | The [index of the ledger][Ledger Index] that contains the transaction that most recently modified this object. |
53+
| `Sequence` | Number | UInt32 | Yes | The `Sequence` value of the transaction that created this entry. |
54+
55+
56+
### AcceptedCredentials Objects
57+
58+
Each member of the `AcceptedCredentials` array is an inner object named `Credential` with the following nested fields:
59+
60+
| Field | JSON Type | [Internal Type][] | Required? | Description |
61+
|:-----------------|:---------------------|:------------------|:----------|--------------|
62+
| `Issuer` | String - [Address][] | AccountID | Yes | The issuer of the credential. |
63+
| `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. |
64+
65+
{% admonition type="info" name="Note" %}
66+
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:
67+
68+
```json
69+
"AcceptedCredentials": [
70+
{
71+
"Credential": {
72+
"Issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
73+
"CredentialType": "6D795F63726564656E7469616C"
74+
}
75+
},
76+
// ... additional Credential inner objects ...
77+
]
78+
```
79+
{% /admonition %}
80+
81+
82+
## {% $frontmatter.seo.title %} Flags
83+
84+
There are no flags defined for {% code-page-name /%} entries.
85+
86+
87+
## {% $frontmatter.seo.title %} Reserve
88+
89+
Each {% code-page-name /%} entry counts as 1 item toward its owner's reserve requirement.
90+
91+
A {% code-page-name /%} entry is a deletion blocker, meaning an account cannot be deleted if it owns any {% code-page-name /%} entries.
92+
93+
94+
## {% $frontmatter.seo.title %} ID Format
95+
96+
The ID of a {% code-page-name /%} entry is the [SHA-512Half][] of the following values, concatenated in order:
97+
98+
1. The {% code-page-name /%} space key (`0x0082`).
99+
0. The AccountID of the {% code-page-name /%}'s owner.
100+
0. The Sequence number of the transaction that created the {% code-page-name /%}.
101+
102+
103+
{% raw-partial file="/docs/_snippets/common-links.md" /%}

sidebars.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@
345345
- page: docs/references/protocol/ledger-data/ledger-entry-types/nftokenpage.md
346346
- page: docs/references/protocol/ledger-data/ledger-entry-types/offer.md
347347
- page: docs/references/protocol/ledger-data/ledger-entry-types/oracle.md
348+
- page: docs/references/protocol/ledger-data/ledger-entry-types/permissioneddomain.md
348349
- page: docs/references/protocol/ledger-data/ledger-entry-types/paychannel.md
349350
- page: docs/references/protocol/ledger-data/ledger-entry-types/ripplestate.md
350351
- page: docs/references/protocol/ledger-data/ledger-entry-types/signerlist.md

0 commit comments

Comments
 (0)