Host your DID document
Your DID document is the public part of your identity on the Notabene network. It holds your public keys and tells other institutions where to deliver Travel Rule messages to you. In production you publish it on your own domain, at the address your DID points to, while in sandbox Notabene publishes it and you have nothing to do.
1. Get your DID document
Notabene creates your DID document together with your account. Download it from Settings › My Organization in the dashboard, or read it through the API with an access token, as described in Authentication.
curl https://sandbox.notabene.id/api/v1/identity \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'const response = await fetch('https://sandbox.notabene.id/api/v1/identity', { method: 'GET', headers: { Authorization: 'Bearer YOUR_ACCESS_TOKEN', }, }); const answer = response.status === 204 ? null : await response.json();import requests response = requests.get( 'https://sandbox.notabene.id/api/v1/identity', headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}, ) answer = None if response.status_code == 204 else response.json()
{
"did": "did:web:example.com:pt",
"document": {
"@context": [
"https://www.w3.org/ns/did/v1" ,
"https://w3id.org/security/suites/jws-2020/v1"
],
"id": "did:web:example.com:pt",
"verificationMethod": [
{
"id": "did:web:example.com:pt#nb-signing",
"type": "JsonWebKey2020",
"controller": "did:web:example.com:pt",
"publicKeyJwk": {
"kty": "OKP",
"crv": "Ed25519",
"x": "Qm3P8a5DdOU1x9xKq0GZ4vFgk2Yc7Wbz2rNnT0sJmVw"
}
},
{
"id": "did:web:example.com:pt#nb-key-agreement",
"type": "JsonWebKey2020",
"controller": "did:web:example.com:pt",
"publicKeyJwk": {
"kty": "OKP",
"crv": "X25519",
"x": "hS9pQmV4c2tXbk1hY0w2ZlJ0eUJ3c0ZqNXpQa0h1dE0"
}
},
{
"id": "did:web:example.com:pt#nb-pii",
"type": "JsonWebKey2020",
"controller": "did:web:example.com:pt",
"publicKeyJwk": {
"kty": "EC",
"crv": "P-256",
"x": "QPd12KIDz9nFplcr_zn0aUHZlS5xeAxF1yBhevpPixU",
"y": "eyqRi-hjnxxItYmZjWiHKvmJF3yMvCcz0T3lvVhZLXU"
}
}
],
"authentication": [
"did:web:example.com:pt#nb-signing"
],
"assertionMethod": [
"did:web:example.com:pt#nb-signing"
],
"keyAgreement": [
"did:web:example.com:pt#nb-key-agreement",
"did:web:example.com:pt#nb-pii"
],
"service": [
{
"id": "did:web:example.com:pt#didcomm",
"type": "DIDCommMessaging",
"serviceEndpoint": {
"uri": "https://eu-a.notabene.id/didcomm",
"accept": [
"didcomm/v2"
],
"routingKeys": []
}
}
]
}
}curl https://sandbox.notabene.id/api/v1/identity \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'const response = await fetch('https://sandbox.notabene.id/api/v1/identity', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_ACCESS_TOKEN',
},
});
const answer = response.status === 204 ? null : await response.json();import requests
response = requests.get(
'https://sandbox.notabene.id/api/v1/identity',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
)
answer = None if response.status_code == 204 else response.json(){
"did": "did:web:example.com:pt",
"document": {
"@context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/suites/jws-2020/v1"
],
"id": "did:web:example.com:pt",
"verificationMethod": [
{
"id": "did:web:example.com:pt#nb-signing",
"type": "JsonWebKey2020",
"controller": "did:web:example.com:pt",
"publicKeyJwk": {
"kty": "OKP",
"crv": "Ed25519",
"x": "Qm3P8a5DdOU1x9xKq0GZ4vFgk2Yc7Wbz2rNnT0sJmVw"
}
},
{
"id": "did:web:example.com:pt#nb-key-agreement",
"type": "JsonWebKey2020",
"controller": "did:web:example.com:pt",
"publicKeyJwk": {
"kty": "OKP",
"crv": "X25519",
"x": "hS9pQmV4c2tXbk1hY0w2ZlJ0eUJ3c0ZqNXpQa0h1dE0"
}
},
{
"id": "did:web:example.com:pt#nb-pii",
"type": "JsonWebKey2020",
"controller": "did:web:example.com:pt",
"publicKeyJwk": {
"kty": "EC",
"crv": "P-256",
"x": "QPd12KIDz9nFplcr_zn0aUHZlS5xeAxF1yBhevpPixU",
"y": "eyqRi-hjnxxItYmZjWiHKvmJF3yMvCcz0T3lvVhZLXU"
}
}
],
"authentication": [
"did:web:example.com:pt#nb-signing"
],
"assertionMethod": [
"did:web:example.com:pt#nb-signing"
],
"keyAgreement": [
"did:web:example.com:pt#nb-key-agreement",
"did:web:example.com:pt#nb-pii"
],
"service": [
{
"id": "did:web:example.com:pt#didcomm",
"type": "DIDCommMessaging",
"serviceEndpoint": {
"uri": "https://eu-a.notabene.id/didcomm",
"accept": [
"didcomm/v2"
],
"routingKeys": []
}
}
]
}
}Publish only the document object, because the response also holds your DID.
2. Find where it must be hosted
The address comes from your DID: your domain, then your jurisdiction as a folder, then did.json. It must be served over HTTPS on exactly that host, and example.com and www.example.com count as two different addresses.
| DID | Address of its document |
|---|---|
did:web:example.com:pt | https:/ |
did:web:static.example.com:pt | https:/ |
| DID | Address of its document |
|---|---|
did:web:example.com:pt | https://example.com/pt/did.json |
did:web:static.example.com:pt | https://static.example.com/pt/did.json |
3. Publish it
Either host a copy of the document at that address, or redirect the address to Notabene’s copy.
| Option | What you do |
|---|---|
| Host a copy | Save the document as did.json at that address, served over HTTPS as JSON. Publish it again whenever it changes. Only a copy can hold your own key. |
| Redirect | Redirect that address to the address of Notabene’s copyplaceholder. The document then stays up to date without any action from you, but it cannot hold your own key. |
| Option | What you do |
|---|---|
| Host a copy | Save the document as did.json at that address, served over HTTPS as JSON. Publish it again whenever it changes. Only a copy can hold your own key. |
| Redirect | Redirect that address to the address of Notabene’s copy (placeholder). The document then stays up to date without any action from you, but it cannot hold your own key. |
To receive personal data that only you can decrypt, add your own public key to your copy next to Notabene’s keys, as described in Encryption. Leave the keys already in it in place, including the PII key whose id ends in #nb-pii, because Notabene uses them for more than personal data. The format and id your own key should use are still to be published. (placeholder)
4. Check that it is online
Open the address in a browser or with curl, and check that it returns your DID document with your DID as its id.
curl -sL https://example.com/pt/did.json
curl -sL https://example.com/pt/did.jsonMost often the problem is a redirect from example.com to www.example.com, a login page or firewall in front of the file, or an HTML error page instead of JSON. If the document stops answering later, the dashboard Inbox shows the warning “Your DID doc is unreachable”.
What the document contains
Notabene generates the document for you, as in the response of step 1. Publish it as it is, unless you add your own key for end-to-end encryption.
| Part | What it is |
|---|---|
id | Your DID. It must match the address the document is served from. |
verificationMethod | Your public keys. The private keys stay with your node. |
authentication, assertionMethod | The key that signs your messages. |
keyAgreement | The keys counterparty institutions use to encrypt data for you. |
service | Where counterparty institutions deliver Travel Rule messages to you: your node’s DIDComm endpoint. |
| Part | What it is |
|---|---|
id | Your DID. It must match the address the document is served from. |
verificationMethod | Your public keys. The private keys stay with your node. |
authentication, assertionMethod | The key that signs your messages. |
keyAgreement | The keys counterparty institutions use to encrypt data for you. |
service | Where counterparty institutions deliver Travel Rule messages to you: your node’s DIDComm endpoint. |
To learn more about DID documents, see the W3C DID specification.
How it works
Optional
Notabene creates your DID document together with your account, and 1. Get your DID document shows how to download or read it.
Your DID tells you where the document must be hosted, and 2. Find where it must be hosted gives the rule with examples.
Save the document as did.json at that address, served over HTTPS as JSON. See 3. Publish it.
To receive Travel Rule data that only you can decrypt, add your own public key to the copy, next to Notabene’s keys. See 3. Publish it.
Redirect that address to Notabene’s copy, which stays up to date by itself. See 3. Publish it.
Open the address in a browser or with curl and check that it returns your DID document, as in 4. Check that it is online.
Activating your account is a separate step, step 5 of Create your account, and it does not wait for your DID document.
Updated about 6 hours ago
