Skip to content

Commit

Permalink
feat: write address lowercase and format if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
britsta committed Dec 5, 2024
1 parent d645ad9 commit 7aacdbf
Show file tree
Hide file tree
Showing 35 changed files with 87 additions and 89 deletions.
14 changes: 7 additions & 7 deletions _docs_explore/60-addresses.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ title: "enmeshed Addresses"
permalink: /explore/addresses
---

The Address is the primary identifier for an enmeshed Identity. It is public and created out of the Identity’s Signature Public Key. Thus, the Identity’s root signature key and its corresponding Address are interlinked with each other and cannot be changed. Nobody is able to change the public key for a corresponding Address and everybody has the possibility to check, if a given public key matches a given Address without having to trust someone. Both are important security features.
The `address` is the primary identifier for an enmeshed [Identity]({% link _docs_integrate/data-model-overview.md %}#identity). It is public and created out of the Identity’s Signature Public Key. Thus, the Identity’s root signature key and its corresponding address are interlinked with each other and cannot be changed. Nobody is able to change the public key for a corresponding address and everybody has the possibility to check, if a given public key matches a given address without having to trust someone. Both are important security features.

- As Addresses do not contain special characters, copy and pasting via double-click is supported.
- As they do have a checksum included, syntactically wrong Addresses can be checked by a computer program locally.
- As addresses do not contain special characters, copy and pasting via double-click is supported.
- As they do have a checksum included, syntactically wrong addresses can be checked by a computer program locally.

Enmeshed uses [Decentralized Identifiers](https://www.w3.org/TR/did-core/), also called DIDs, which are specified by the W3C and commonly used with W3C's [Verifiable Credentials](https://www.w3.org/TR/vc-overview/). Enmeshed plans to launch its own DID method `did:e`, and already uses those DIDs for Addresses even though the method is not yet constructed.
Enmeshed uses [Decentralized Identifiers](https://www.w3.org/TR/did-core/), also called DIDs, which are specified by the W3C and commonly used with W3C's [Verifiable Credentials](https://www.w3.org/TR/vc-overview/). Enmeshed plans to launch its own DID method `did:e`, and already uses those DIDs for addresses even though the method is not yet constructed.

## Addresses are Backbone-specific

An Address is fixed to a certain backbone. The same Identity (Identity Signature Key Pair) may act within different backbones, but will have different Addresses. Additionally, there are many open questions with regards to using multiple backbones, e.g. which one is in charge for the synchronization.
An address is fixed to a certain backbone. The same Identity (Identity Signature Key Pair) may act within different backbones, but will have different addresses. Additionally, there are many open questions with regards to using multiple backbones, e.g. which one is in charge for the synchronization.

## Syntax

An Address follows the DID syntax and is `did:e:<backbone-hostname>:dids:<public-key-hash><checksum>`. Public-Key-Hash and Checksum are lowercase hexadecimal-encoded, 10 bytes for the hash of the Identity’s Signature Public Key, 1 byte for the checksum of the Address.
An address follows the DID syntax and is `did:e:<backbone-hostname>:dids:<public-key-hash><checksum>`. Public-Key-Hash and Checksum are lowercase hexadecimal-encoded, 10 bytes for the hash of the Identity’s Signature Public Key, 1 byte for the checksum of the address.

## Address Creation

Expand Down Expand Up @@ -48,7 +48,7 @@ Address = EnmeshedSpecificPart + BackboneSpecificPart + IdentitySpecificPart + C

## Examples

Below there are a few examples for valid enmeshed Addresses.
Below there are a few examples for valid enmeshed addresses.

```text
backboneHostname: "example.com"
Expand Down
30 changes: 15 additions & 15 deletions _docs_integrate/attribute-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,11 @@ It is not recommended to send a DigitalIdentityDescriptor to another Identity by

**Properties**

| Name | Type | Required | Validation |
| ------------ | ----------------------------- | :------: | ---------------------------------------------------- |
| `@type` | `"DigitalIdentityDescriptor"` || |
| `address` | `string` || The Address of the Identity that owns the statement. |
| `attributes` | `string []` || see [`Identity Attributes`](#identity-attributes) |
| Name | Type | Required | Validation |
| ------------ | ----------------------------- | :------: | -------------------------------------------------------------------------------------------------------------------- |
| `@type` | `"DigitalIdentityDescriptor"` || |
| `address` | `string` || The `address` of the [Identity]({% link _docs_integrate/data-model-overview.md %}#identity) that owns the statement. |
| `attributes` | `string []` || see [`Identity Attributes`](#identity-attributes) |

## StatementAuthorityType

Expand Down Expand Up @@ -582,11 +582,11 @@ It is not recommended to send a object to another Identity by its own. Instead,

**Properties**

| Name | Type | Required | Validation |
| ------------ | ------------------- | :------: | ---------------------------------------------------- |
| `@type` | `"StatementObject"` || |
| `address` | `string` || The Address of the Identity that owns the statement. |
| `attributes` | `string []` || see [`Identity Attributes`](#identity-attributes) |
| Name | Type | Required | Validation |
| ------------ | ------------------- | :------: | -------------------------------------------------------------------------------------------------------------------- |
| `@type` | `"StatementObject"` || |
| `address` | `string` || The `address` of the [Identity]({% link _docs_integrate/data-model-overview.md %}#identity) that owns the statement. |
| `attributes` | `string []` || see [`Identity Attributes`](#identity-attributes) |

## StatementPredicate

Expand All @@ -611,11 +611,11 @@ It is not recommended to send a subject to another Identity by its own. Instead,

**Properties**

| Name | Type | Required | Validation |
| ------------ | -------------------- | :------: | ---------------------------------------------------- |
| `@type` | `"StatementSubject"` || |
| `address` | `string` || The Address of the Identity that owns the statement. |
| `attributes` | `string []` || see [`Identity Attributes`](#identity-attributes) |
| Name | Type | Required | Validation |
| ------------ | -------------------- | :------: | -------------------------------------------------------------------------------------------------------------------- |
| `@type` | `"StatementSubject"` || |
| `address` | `string` || The `address` of the [Identity]({% link _docs_integrate/data-model-overview.md %}#identity) that owns the statement. |
| `attributes` | `string []` || see [`Identity Attributes`](#identity-attributes) |

## Street

Expand Down
4 changes: 2 additions & 2 deletions _docs_integrate/create-attributes-for-peer.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The following table provides an overview of the possible kinds of Attributes tha

### Example of creating an IdentityAttribute

We assume that the Integrator of the Sender wants to create an IdentityAttribute of type [EMailAddress]({% link _docs_integrate/attribute-values.md %}#emailaddress) for the Recipient. To request the creation of this IdentityAttribute, the Sender needs to insert it into the `attribute` property of the [CreateAttributeRequestItem]({% link _docs_integrate/data-model-overview.md %}#createattributerequestitem) contained within the `items` property of the [Request]({% link _docs_integrate/data-model-overview.md %}#request) for creating Attributes. As the IdentityAttribute should be owned by the Recipient, an empty string is specified for its `owner` property. If the Sender sends the corresponding [Request via a Message]({% link _docs_integrate/create-attributes-for-peer.md %}#request-via-message), the Address of the Recipient could alternatively be specified explicitly. In our example, we have chosen to set the value of the `mustBeAccepted` property of the CreateAttributeRequestItem to `true`. Please note that the `<...>` notation is used as a placeholder for the actual data as usual.
We assume that the Integrator of the Sender wants to create an IdentityAttribute of type [EMailAddress]({% link _docs_integrate/attribute-values.md %}#emailaddress) for the Recipient. To request the creation of this IdentityAttribute, the Sender needs to insert it into the `attribute` property of the [CreateAttributeRequestItem]({% link _docs_integrate/data-model-overview.md %}#createattributerequestitem) contained within the `items` property of the [Request]({% link _docs_integrate/data-model-overview.md %}#request) for creating Attributes. As the IdentityAttribute should be owned by the Recipient, an empty string is specified for its `owner` property. If the Sender sends the corresponding [Request via a Message]({% link _docs_integrate/create-attributes-for-peer.md %}#request-via-message), the address of the Recipient could alternatively be specified explicitly. In our example, we have chosen to set the value of the `mustBeAccepted` property of the CreateAttributeRequestItem to `true`. Please note that the `<...>` notation is used as a placeholder for the actual data as usual.

```jsonc
{
Expand Down Expand Up @@ -95,7 +95,7 @@ We now consider the case in which the Sender has an active [Relationship]({% lin
"mustBeAccepted": true,
"attribute": {
"@type": "RelationshipAttribute",
"owner": "<Address of Sender>",
"owner": "<address of Sender>",
"key": "<key of RelationshipAttribute>",
"confidentiality": "public",
"value": {
Expand Down
Loading

0 comments on commit 7aacdbf

Please sign in to comment.