feat: add PermissionedDomains support (XLS-80)#157
Draft
Conversation
…r XLS-80 Add the Credential serde_with_tag type for wrapping issuer/credential_type pairs, and add PermissionedDomainSet and PermissionedDomainDelete variants to the TransactionType enum. Module declarations for the new transaction types are included.
Implement the PermissionedDomainSet transaction for creating and updating permissioned domains. Supports optional DomainID for updates, a list of accepted Credential entries, and the full CommonTransactionBuilder pattern with builder methods for domain-specific fields.
Implement the PermissionedDomainDelete transaction for removing an existing permissioned domain from the ledger. Takes a required DomainID field identifying the domain to delete.
Add the PermissionedDomain ledger object representing a permissioned domain on the XRP Ledger, with owner, accepted_credentials, sequence, owner_node, previous_txn_id, and previous_txn_lgr_seq fields. Register as LedgerEntryType 0x0082 and add the LedgerEntry enum variant.
Add integration test stubs for PermissionedDomainSet and PermissionedDomainDelete transactions. These tests verify transaction construction, signing, and submission against a running XRPL node, accepting temDISABLED when the amendment is not yet enabled.
e-desouza
commented
Apr 3, 2026
Collaborator
Author
e-desouza
left a comment
There was a problem hiding this comment.
Had a read through
Required Credential fields typed as Option without validation — flagged inline.
Review by ReviewBot 🤖
Review by Claude Opus 4.6 · Prompt: V12
The XLS-80 spec requires both `issuer` and `credential_type` on every Credential entry. Having them typed as `Option<String>` allowed callers to construct silently invalid transactions. - Change `Credential.issuer` and `Credential.credential_type` from `Option<String>` to `String`, matching the Signer struct pattern. - Add `get_errors()` validation in `PermissionedDomainSet` that rejects empty issuer or credential_type with `MissingField`. - Add two tests covering the new validation paths. - Update all call sites (unit tests, integration test, ledger object tests) to use non-optional field construction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements XLS-80 (PermissionedDomains) support for xrpl-rust.
New transaction types
PermissionedDomainSet— Create or update a permissioned domain with a list ofAcceptedCredentialsPermissionedDomainDelete— Delete an existing permissioned domain byDomainIDNew ledger entry type
PermissionedDomain(LedgerEntryType = 0x0082) — On-ledger permissioned domain object withOwner,AcceptedCredentials,Sequence, and audit fieldsShared types
Credential— Nested STObject (viaserde_with_tag!) with requiredIssuerandCredentialTypefieldsValidation
Credential.issuerandCredential.credential_typeare required (non-optionalStringfields)PermissionedDomainSet.get_errors()rejects emptyissuerorcredential_typevaluesRegistration
TransactionType::PermissionedDomainSet,TransactionType::PermissionedDomainDeleteadded to enumLedgerEntryType::PermissionedDomain(0x0082) added to enumTest plan
new()constructor testsget_transaction_type()variant testsAcceptedCredentialsarraytests/transactions/cargo fmt,cargo clippy --all-features,cargo test --releaseall pass