{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["amendment-disclaimer","admonition","repo-link","tabs","tab","code-snippet"]},"type":"markdown"},"seo":{"title":"Manage Permissioned Domains","siteUrl":"https://xrpl.org/","llmstxt":{"hide":false,"title":"XRPL Developer Portal & Documentation","description":"Explore XRP Ledger documentation, blogs, and other blockchain developer resources needed to start building and integrating with the ledger.","details":{"content":"XRP Ledger concepts, use cases, tutorials, references, and other blockchain developer resources. Also, stay up to date with release announcements and more through the XRPL Blog."},"sections":[{"title":"Introduction","description":"A high-level introduction to the XRP Ledger.","includeFiles":["docs/introduction/**/*.*","about/faq.md"],"excludeFiles":["docs/introduction/index.md"]},{"title":"Use Cases","description":"Real-world applications and business scenarios for the XRP Ledger.","includeFiles":["docs/use-cases/**/*.*"],"excludeFiles":["docs/use-cases/index.md","docs/use-cases/defi/index.md"]},{"title":"Agentic Transactions","description":"XRPL AI Starter Kit to help autonomous agents discover, set up, and execute agentic transactions on the XRP Ledger.","includeFiles":["docs/agents/**/*.*"],"excludeFiles":[]},{"title":"Concepts","description":"Core concepts including accounts, tokens, transactions, consensus, and more.","includeFiles":["docs/concepts/**/*.*"],"excludeFiles":["docs/concepts/index.md","docs/concepts/decentralized-storage/index.md","docs/concepts/payment-types/index.md"]},{"title":"Tutorials","description":"Step-by-step guides for building on the XRP Ledger in JavaScript, Python, Go, and more.","includeFiles":["docs/tutorials/**/*.*"],"excludeFiles":[]},{"title":"References","description":"Protocol specification, transaction types, ledger entries, and API methods.","includeFiles":["docs/references/**/*.*"],"excludeFiles":["docs/references/xrp-api.md","docs/references/data-api.md","docs/references/protocol/index.md","docs/references/protocol/ledger-data/ledger-entry-types/index.md","docs/references/protocol/transactions/index.md","docs/references/protocol/transactions/types/index.md","docs/references/http-websocket-apis/api-conventions/index.md","docs/references/http-websocket-apis/public-api-methods/*/index.md","docs/references/http-websocket-apis/admin-api-methods/*/index.md"]},{"title":"Infrastructure","description":"Install, configure, and troubleshoot xrpld and Clio servers.","includeFiles":["docs/infrastructure/**/*.*"],"excludeFiles":["docs/infrastructure/index.md","docs/infrastructure/*/index.md","docs/infrastructure/installation/build-run-xrpld-in-reporting-mode.md","docs/infrastructure/configuration/data-retention/index.md","docs/infrastructure/configuration/server-modes/index.md"]},{"title":"Blog (2023+)","description":"Recent XRPL Blog posts (showing 2023 and newer).","includeFiles":["blog/2023/**/*.*","blog/2024/**/*.*","blog/2025/**/*.*","blog/2026/**/*.*"],"excludeFiles":[]},{"title":"Resources","description":"Developer resources and contribution guidelines.","includeFiles":["resources/**/*.*"],"excludeFiles":["resources/index.md"]}],"excludeFiles":[]},"description":"Create and manage a permissioned domain to restrict access to financial services that meet compliance requirements."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"manage-permissioned-domains","__idx":0},"children":["Manage Permissioned Domains"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial shows how to create a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/docs/concepts/tokens/decentralized-exchange/permissioned-domains"},"children":["permissioned domain"]},", which can be used to grant access to specific other features like ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/docs/concepts/tokens/decentralized-exchange/permissioned-dexes"},"children":["Permissioned DEXes"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/docs/concepts/tokens/single-asset-vaults"},"children":["Single Asset Vaults"]},". It also shows how to modify a domain to update its set of accepted credentials and how to delete a permissioned domain."]},{"$$mdtype":"Tag","name":"AmendmentDisclaimer","attributes":{"name":"PermissionedDomains","compact":false,"statusOnly":false,"mode":""},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"goals","__idx":1},"children":["Goals"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["By following this tutorial, you should learn how to:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a permissioned domain."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Modify or delete a permissioned domain."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":2},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To complete this tutorial, you should:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Have a basic understanding of the XRP Ledger, including what ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/docs/concepts/tokens/decentralized-exchange/permissioned-domains"},"children":["permissioned domains"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/docs/concepts/decentralized-storage/credentials"},"children":["credentials"]}," are."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Have an ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/docs/references/client-libraries"},"children":["XRP Ledger client library"]},", such as ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["xrpl.js"]},", installed."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"success","name":"Tip"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial doesn't cover issuing and accepting credentials, which aren't necessary for creating and managing a permissioned domain. Valid credentials ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["are"]}," necessary for actually using something that's gated by a permissioned domain. For examples of issuing and accepting credentials, see:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/docs/tutorials/compliance-features/manage-credentials"},"children":["Manage Credentials"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/docs/tutorials/sample-apps/credential-issuing-service-in-javascript"},"children":["Build a Credential Issuing Service in JavaScript"]}," or ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/docs/tutorials/sample-apps/credential-issuing-service-in-python"},"children":["in Python"]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"source-code","__idx":3},"children":["Source Code"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can find the complete source code for this tutorial's examples in the ",{"$$mdtype":"Tag","name":"RepoLink","attributes":{"path":"_code-samples/permissioned-domains/","github_fork":"https://github.com/XRPLF/xrpl-dev-portal","github_branch":"master"},"children":["code samples section of this website's repository"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"steps","__idx":4},"children":["Steps"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"1-install-dependencies","__idx":5},"children":["1. Install dependencies"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["From the code sample folder, use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["npm"]}," to install dependencies:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sh","header":{"controls":{"copy":{}}},"source":"npm i\n","lang":"sh"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["From the code sample folder, set up a virtual environment and use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pip"]}," to install dependencies:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sh","header":{"controls":{"copy":{}}},"source":"python -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n","lang":"sh"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"2-connect-and-get-accounts","__idx":6},"children":["2. Connect and get account(s)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To get started, import the client library and instantiate an API client. You also need an issuer address and credential type for the credential that will grant access to your domain. The credentials themselves don't have to be issued yet; you can do that separately before or after setting up the domain, or you can rely on credentials issued by a third party."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"/_code-samples/permissioned-domains/js/create-domain.js","language":"js","header":{"controls":{"copy":{}}},"lang":"js","source":"import xrpl from 'xrpl'\nimport { stringToHex } from '@xrplf/isomorphic/dist/utils/index.js'\nimport fs from 'fs'\n\n// Get issuer wallet and define constants -------------------------------------\nconst client = new xrpl.Client('wss://s.altnet.rippletest.net:51233')\nawait client.connect()\nconsole.log('Getting a new account from the faucet.')\nconst { wallet } = await client.fundWallet()\nconsole.log(`Account funded:\n  Address: ${wallet.address}\n  Seed: ${wallet.seed}\n`)\n\nconst issuerAddress = wallet.address // Can also use a third-party issuer\nconst credentialType = stringToHex(\"my-credential\")"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"/_code-samples/permissioned-domains/py/create_domain.py","language":"py","header":{"controls":{"copy":{}}},"lang":"py","source":"#!/usr/bin/env python\nimport json\nimport sys\n\nfrom xrpl.clients import JsonRpcClient\nfrom xrpl.models.transactions import PermissionedDomainSet\nfrom xrpl.models.transactions.deposit_preauth import Credential\nfrom xrpl.transaction import submit_and_wait\nfrom xrpl.utils import str_to_hex\nfrom xrpl.wallet import generate_faucet_wallet\n\n# Get issuer wallet and define constants ---------------------------------------\nclient = JsonRpcClient(\"https://s.altnet.rippletest.net:51234\")\nwallet = generate_faucet_wallet(client, debug=True)\n\nissuer_address = wallet.address # Can also use a different credential issuer\ncredential_type = str_to_hex(\"my-credential\")"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"3-send-permissioneddomainset-transaction","__idx":7},"children":["3. Send PermissionedDomainSet transaction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To create a permissioned domain, send a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/references/protocol/transactions/types/permissioneddomainset"},"children":["PermissionedDomainSet transaction"]}," omitting the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DomainID"]}," field. In the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AcceptedCredentials"]}," field, specify the credentials that grant access to the domain."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"/_code-samples/permissioned-domains/js/create-domain.js","language":"js","header":{"controls":{"copy":{}}},"lang":"js","source":"// Create a domain ------------------------------------------------------------\nconst pDomainSet = {\n  TransactionType: \"PermissionedDomainSet\",\n  Account: wallet.address,\n  AcceptedCredentials: [\n    {\n      Credential: {\n        Issuer: issuerAddress,\n        CredentialType: credentialType\n      }\n    }\n  ]\n}\n\nconsole.log('Submitting transaction', JSON.stringify(pDomainSet, null, 2))\nconst response = await client.submitAndWait(pDomainSet, { wallet, autofill: true})\nconsole.log(response)\nconst resultCode = response.result.meta.TransactionResult\nif (resultCode !== 'tesSUCCESS') {\n  console.error(`PermissionedDomainSet failed with code ${resultCode}`)\n  client.disconnect()\n  process.exit(2)\n}\n\nconsole.log('Successfully created permissioned domain.')"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"/_code-samples/permissioned-domains/py/create_domain.py","language":"py","header":{"controls":{"copy":{}}},"lang":"py","source":"# Create a domain --------------------------------------------------------------\np_domain_set = PermissionedDomainSet(\n    account=wallet.address,\n    accepted_credentials=[\n        Credential(\n            issuer=issuer_address,\n            credential_type=credential_type\n        )\n    ]\n)\nprint(\"Submitting transaction\", p_domain_set)\npds_response = submit_and_wait(p_domain_set, client=client, wallet=wallet)\nif pds_response.status != \"success\":\n    print(\"Transaction submission failed:\", pds_response)\n    sys.exit(1)\nprint(json.dumps(pds_response.result, indent=2))\nresult_code = pds_response.result[\"meta\"][\"TransactionResult\"]\nif result_code != \"tesSUCCESS\":\n    print(\"Transaction failed with result code\", result_code)\n    sys.exit(2)\nprint(\"Successfully created permissioned domain.\")"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"4-find-the-domain-id","__idx":8},"children":["4. Find the Domain ID"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To identify the permissioned domain later, you need its Domain ID. It is possible to calculate this using the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/references/protocol/ledger-data/ledger-entry-types/permissioneddomain#permissioneddomain-id-format"},"children":["Permissioned Domain ID format"]},", but it is often easier to find it in the metadata of the transaction that created the domain. Look through the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/references/protocol/transactions/metadata"},"children":["transaction metadata"]}," for a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CreatedNode"]}," of type ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PermissionedDomain"]},". The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LedgerIndex"]}," field of that entry is the Domain ID."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"/_code-samples/permissioned-domains/js/create-domain.js","language":"js","header":{"controls":{"copy":{}}},"lang":"js","source":"// Find Domain ID in metadata -------------------------------------------------\nlet domainID\nfor (const modifiedNode of response.result.meta.AffectedNodes) {\n  if (modifiedNode.CreatedNode?.LedgerEntryType === 'PermissionedDomain') {\n    domainID = modifiedNode.CreatedNode.LedgerIndex\n    break\n  }\n}\nif (!domainID) {\n  console.error(\"Couldn't find a created PermissionedDomain in transaction \"+\n    \"metadata. This is not typical.\")\n  client.disconnect()\n  process.exit(3)\n}\nconsole.log('Domain ID of created domain:', domainID)\n\nclient.disconnect()"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"/_code-samples/permissioned-domains/py/create_domain.py","language":"py","header":{"controls":{"copy":{}}},"lang":"py","source":"# Find Domain ID in metadata ---------------------------------------------------\n# Look for a created ledger entry of type PermissionedDomain and get \n# its ledger entry ID from the AffectedNodes part of the metadata.\n#\n# Note, an alternative way to get the Domain ID is to calculate it as the\n# SHA-512Half of the PermissionedDomain space key, owner's account ID, and the\n# sequence number of the transaction that created it.\n\ndomain_id = None\nfor modified_node in pds_response.result[\"meta\"][\"AffectedNodes\"]:\n    if \"CreatedNode\" in modified_node.keys():\n        if modified_node[\"CreatedNode\"][\"LedgerEntryType\"] == \"PermissionedDomain\":\n            domain_id = modified_node[\"CreatedNode\"][\"LedgerIndex\"]\n            break\nif not domain_id:\n    print(\"Couldn't find a created PermissionedDomain in transaction metadata.\"\n          \" This is not typical.\")\n    sys.exit(3)\nprint(\"Domain ID of created domain:\", domain_id)"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You need to know the Domain ID to modify or delete the domain, as well as when setting up a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/tokens/decentralized-exchange/permissioned-dexes"},"children":["permissioned DEX"]}," or anything else that uses the permissioned domain for access."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The sample code saves the domain owner account's address and seed, along with the configured issuer address and generated domain ID, to a JSON file for use with other sample scripts. Saving secret keys in plaintext on disk is not ideal from a security perspective, but it's acceptable for Testnet accounts with no real-world value. You should use a more robust system when working with Mainnet accounts."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"other-tasks","__idx":9},"children":["Other Tasks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Other tasks you might do with a permissioned domain include modifying it to change the set of accepted credentials, or deleting it. The code samples below omit the redundant setup steps for these tasks, but you can see the ",{"$$mdtype":"Tag","name":"RepoLink","attributes":{"path":"_code-samples/permissioned-domains/","github_fork":"https://github.com/XRPLF/xrpl-dev-portal","github_branch":"master"},"children":["full source code"]}," for specifics."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"modify-a-permissioned-domain","__idx":10},"children":["Modify a Permissioned Domain"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To modify an existing domain, send a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/references/protocol/transactions/types/permissioneddomainset"},"children":["PermissionedDomainSet transaction"]}," like the one that created it, except this time you actually ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["do"]}," specify the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DomainID"]}," field."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"/_code-samples/permissioned-domains/js/modify-domain.js","language":"js","header":{"controls":{"copy":{}}},"lang":"js","source":"// Modify a permissioned domain -----------------------------------------------\n// To demonstrate updating the domain, this tutorial uses a different credential\n// type (issued by the same issuer, unless you modified setup.json)\nconst credentialType = stringToHex(\"new-credential-type\")\n\nconst pDomainSet = {\n  TransactionType: \"PermissionedDomainSet\",\n  Account: wallet.address,\n  DomainID: domainID,\n  AcceptedCredentials: [\n    {\n      Credential: {\n        Issuer: issuerAddress,\n        CredentialType: credentialType\n      }\n    }\n  ]\n}\nconsole.log('Submitting transaction', JSON.stringify(pDomainSet, null, 2))\nconst response = await client.submitAndWait(pDomainSet, { wallet, autofill: true})\nconsole.log(response)\nconst resultCode = response.result.meta.TransactionResult\nif (resultCode !== 'tesSUCCESS') {\n  console.error(`PermissionedDomainSet failed with code ${resultCode}`)\n  client.disconnect()\n  process.exit(3)\n}\nconsole.log('Successfully modified permissioned domain.')\nclient.disconnect()\n"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"/_code-samples/permissioned-domains/py/modify_domain.py","language":"py","header":{"controls":{"copy":{}}},"lang":"py","source":"# Modify a permissioned domain ------------------------------------------------\n# To demonstrate updating the domain, this tutorial uses a different credential\n# type (issued by the same issuer, unless you modified setup.json)\ncredential_type = str_to_hex(\"new-credential-type\")\n\np_domain_set = PermissionedDomainSet(\n    account=wallet.address,\n    domain_id=domain_id,\n    accepted_credentials=[\n        Credential(\n            issuer=issuer_address,\n            credential_type=credential_type\n        )\n    ]\n)\nprint(\"Submitting transaction\", p_domain_set)\npds_response = submit_and_wait(p_domain_set, client=client, wallet=wallet)\nif pds_response.status != \"success\":\n    print(\"Transaction submission failed:\", pds_response)\n    sys.exit(1)\nprint(json.dumps(pds_response.result, indent=2))\nresult_code = pds_response.result[\"meta\"][\"TransactionResult\"]\nif result_code != \"tesSUCCESS\":\n    print(\"Transaction failed with result code\", result_code)\n    sys.exit(3)\nprint(\"Successfully modified permissioned domain.\")\n"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"delete-a-permissioned-domain","__idx":11},"children":["Delete a Permissioned Domain"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To delete a permissioned domain that you own, send a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/references/protocol/transactions/types/permissioneddomaindelete"},"children":["PermissionedDomainDelete transaction"]}," with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DomainID"]}," of the domain to delete."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"JavaScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"/_code-samples/permissioned-domains/js/delete-domain.js","language":"js","header":{"controls":{"copy":{}}},"lang":"js","source":"// Delete a permissioned domain -----------------------------------------------\nconst pDomainDel = {\n  TransactionType: \"PermissionedDomainDelete\",\n  Account: wallet.address,\n  DomainID: domainID\n}\nconsole.log('Submitting transaction', JSON.stringify(pDomainDel, null, 2))\nconst response = await client.submitAndWait(pDomainDel, { wallet, autofill: true})\nconsole.log(response)\nconst resultCode = response.result.meta.TransactionResult\nif (resultCode !== 'tesSUCCESS') {\n  console.error(`PermissionedDomainDelete failed with code ${resultCode}`)\n  client.disconnect()\n  process.exit(3)\n}\nconsole.log('Successfully deleted permissioned domain.')\nclient.disconnect()\n"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make sure to import the correct transaction type first."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"py","header":{"controls":{"copy":{}}},"source":"from xrpl.models.transactions import PermissionedDomainDelete\n","lang":"py"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"/_code-samples/permissioned-domains/py/delete_domain.py","language":"py","header":{"controls":{"copy":{}}},"lang":"py","source":"# Delete a permissioned domain ------------------------------------------------\np_domain_del = PermissionedDomainDelete(\n    account=wallet.address,\n    domain_id=domain_id\n)\nprint(\"Submitting transaction\", p_domain_del)\npdd_response = submit_and_wait(p_domain_del, client=client, wallet=wallet)\nif pdd_response.status != \"success\":\n    print(\"Transaction submission failed:\", pdd_response)\n    sys.exit(1)\nprint(json.dumps(pdd_response.result, indent=2))\nresult_code = pdd_response.result[\"meta\"][\"TransactionResult\"]\nif result_code != \"tesSUCCESS\":\n    print(\"Transaction failed with result code\", result_code)\n    sys.exit(3)\nprint(\"Successfully deleted permissioned domain.\")\n"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"see-also","__idx":12},"children":["See Also"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Concepts:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/decentralized-storage/credentials"},"children":["Credentials"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/tokens/decentralized-exchange/permissioned-domains"},"children":["Permissioned Domains"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/tokens/decentralized-exchange/permissioned-dexes"},"children":["Permissioned DEXes"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/concepts/tokens/single-asset-vaults"},"children":["Single Asset Vaults"]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tutorials:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/docs/tutorials/compliance-features/manage-credentials"},"children":["Manage Credentials"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/docs/tutorials/sample-apps/credential-issuing-service-in-javascript"},"children":["Build a Credential Issuing Service in JavaScript"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/docs/tutorials/sample-apps/credential-issuing-service-in-python"},"children":["Build a Credential Issuing Service in Python"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/docs/tutorials/defi/dex/trade-in-the-decentralized-exchange"},"children":["Trade in the Decentralized Exchange"]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["References:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/references/protocol/transactions/types/permissioneddomainset"},"children":["PermissionedDomainSet transaction"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/references/protocol/transactions/types/permissioneddomaindelete"},"children":["PermissionedDomainDelete transaction"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/references/protocol/ledger-data/ledger-entry-types/permissioneddomain"},"children":["PermissionedDomain entry"]}]}]}]}]}]},"headings":[{"value":"Manage Permissioned Domains","id":"manage-permissioned-domains","depth":1},{"value":"Goals","id":"goals","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Source Code","id":"source-code","depth":2},{"value":"Steps","id":"steps","depth":2},{"value":"1. Install dependencies","id":"1-install-dependencies","depth":3},{"value":"2. Connect and get account(s)","id":"2-connect-and-get-accounts","depth":3},{"value":"3. Send PermissionedDomainSet transaction","id":"3-send-permissioneddomainset-transaction","depth":3},{"value":"4. Find the Domain ID","id":"4-find-the-domain-id","depth":3},{"value":"Other Tasks","id":"other-tasks","depth":2},{"value":"Modify a Permissioned Domain","id":"modify-a-permissioned-domain","depth":3},{"value":"Delete a Permissioned Domain","id":"delete-a-permissioned-domain","depth":3},{"value":"See Also","id":"see-also","depth":2}],"frontmatter":{"seo":{"description":"Create and manage a permissioned domain to restrict access to financial services that meet compliance requirements.","title":"Manage Permissioned Domains"},"labels":["Decentralized Finance","Permissioned Domains"]},"editPage":{"to":"https://github.com/XRPLF/xrpl-dev-portal/tree/master/docs/tutorials/compliance-features/manage-permissioned-domains.md"},"lastModified":"2026-07-10T21:27:34.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/docs/tutorials/compliance-features/manage-permissioned-domains","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}