A domain has a public part and a private part. Its on-chain record, the IID document, is public. Sensitive data belongs in service storage such as IXO Matrix, encrypted, with the record holding at most a reference or a proof. Use this guide to decide where each value goes before you write anything.
This page is about those two parts of a domain and the line between them. To change the IID document itself, see Update a domain's on-chain record.
This is a design guide. It helps you plan, and it gives you nothing to run. The exact API contracts are in the protocol and service references.
Before you start
- Confirm your target network and its endpoints in Networks and endpoints.
- Confirm what each API requires for authentication in the Authentication matrix.
- Confirm that you have controller authority for the domain's DID.
Which layer holds what
| Layer | What it holds |
|---|---|
| Protocol | The public DID document structure, and metadata updates made with an authorised signature |
| Service | Encrypted payload storage, and controlled retrieval |
Design steps
- Register key material and controller relationships at the protocol layer.
- Encrypt sensitive settings before you write them to service storage.
- Publish only references or proofs in public protocol metadata, and only when they are required.
- Enforce recipient authorisation on every read.
Check the design
When the design is built, confirm that no sensitive value appears in a public document field. A sound design gives these results:
- metadata updates on the domain succeed with authorised signatures
- sensitive values remain encrypted in service storage
- unauthorised reads fail