Skip to content

Commit

Permalink
fix: rebuild links and reformat docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceanis committed Sep 1, 2021
1 parent 8c223da commit cb6c501
Show file tree
Hide file tree
Showing 28 changed files with 371 additions and 210 deletions.
2 changes: 1 addition & 1 deletion blog/2021-04-27-new-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ those for best compatibility.
## Some changes to the CLI configuration

There are some slight changes to the `@veramo/cli` configuration, mostly around the `veramo server`. options. Check out
the [veramo docs](https://veramo.io/docs/veramo_agent/configuration_internals) to see how the CLI configuration file
the [veramo docs](../docs/veramo_agent/configuration_internals.md) to see how the CLI configuration file
works.

### Ngrok is no longer included
Expand Down
18 changes: 9 additions & 9 deletions blog/2021-07-14-veramo-2.0-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ using `Veramo` you might be impacted by some breaking changes that had to be add
Our `@veramo/did-comm` package got a boost of functionality with new support for DIDComm v2 over HTTP. This plugin now
exports 3 new methods:

- [`packDIDCommMessage()`](/docs/api/did-comm.didcomm.packdidcommmessage.md) - encrypt and/or sign a message for
- [`packDIDCommMessage()`](../docs/api/did-comm.didcomm.packdidcommmessage) - encrypt and/or sign a message for
sending.
- [`sendDIDCommMessage()`](/docs/api/did-comm.didcomm.senddidcommmessage.md) - send a packed message to a recipient DID.
- [`unpackDIDCommMessage()`](/docs/api/did-comm.didcomm.unpackdidcommmessage.md) - decode stored messages.
- [`sendDIDCommMessage()`](../docs/api/did-comm.didcomm.senddidcommmessage) - send a packed message to a recipient DID.
- [`unpackDIDCommMessage()`](../docs/api/did-comm.didcomm.unpackdidcommmessage) - decode stored messages.

As you may have guessed, the existing `sendMessageDIDCommAlpha1()` method should no longer be used. We hope that the
name of the method already suggested instability. This will be removed in Veramo 4.x.
Expand Down Expand Up @@ -80,16 +80,16 @@ stores, or find DIDs by keys or by .well-known/did-config matches... you name it

The `@veramo/key-manager` now exports 2 new methods:

- [`keyManagerSign()`](/docs/api/key-manager.keymanager.keymanagersign.md) - support all signing algorithms that lower
- [`keyManagerSign()`](../docs/api/key-manager.keymanager.keymanagersign.md) - support all signing algorithms that lower
level key management systems provide.
- [`keyManagerSharedSecret()`](/docs/api/key-manager.abstractkeymanagementsystem.sharedsecret.md) - compute shared
- [`keyManagerSharedSecret()`](../docs/api/key-manager.abstractkeymanagementsystem.sharedsecret.md) - compute shared
secrets between a locally managed secret key and an external public key.

These are supposed to start phasing out the previous methods `keyManagerSignJWT()`, `keyManagerSignEthTX()`
and `keyManagerEncryptJWE()`/`keyManagerDecryptJWE()`.

The new signer can accommodate multiple algorithms implemented by
your [`AbstractKeyManagementSystem`](/docs/api/kms-local.md) implementations:
your [`AbstractKeyManagementSystem`](../docs/api/kms-local.md) implementations:

Example 1. signing JWT:

Expand Down Expand Up @@ -123,8 +123,8 @@ const rawTx = await agent.keyManagerSign({

## Get `DIDComm v2` out of the box with `@veramo/remote-server` & `did:web`

If you are using [`@veramo/remote-server#WebDidDocRouter`](/docs/api/remote-server.webdiddocrouter.md)
and [`@veramo/did-provider-web`](/docs/api/did-provider-web.md) it is now easier than ever to receive DIDComm messages.
If you are using [`@veramo/remote-server#WebDidDocRouter`](../docs/api/remote-server.webdiddocrouter.md)
and [`@veramo/did-provider-web`](../docs/api/did-provider-web.md) it is now easier than ever to receive DIDComm messages.
The `did-provider-web` bootstraps your new `did:web` with Ed25519 and X25519 keys to be used for `keyAgreement` as well
as listing an HTTP `DIDCommMessaging` endpoint by default.

Expand All @@ -136,7 +136,7 @@ identifiers.
`@veramo/kms-local-react-native` is not needed any more. It is now replaced by `@veramo/kms-local` which can be used in
all environments. Some extra ceremony is still needed on react-native but the overall experience should be simpler.

Take a look at the [React-native tutorial](/docs/react_native_tutorials/react_native_setup_identifiers.md) to see how to
Take a look at the [React-native tutorial](../docs/react_native_tutorials/react_native_setup_identifiers.md) to see how to
set that up.

---
Expand Down
24 changes: 18 additions & 6 deletions docs/basics/identifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ id: identifiers
title: Identifiers
---

`Decentralized Identifier` or `DID` is a critical component of verifiable data. A `DID` is a new type of unique identifier which can be created independent of a central authority and that is designed to prove control over the DID using cryptographic proofs. In a verifiable data context, a DID can be used to verify the provenance and ownership of attested data by verifying the proof that is attached to the assertion.
`Decentralized Identifier` or `DID` is a critical component of verifiable data. A `DID` is a new type of unique
identifier which can be created independent of a central authority and that is designed to prove control over the DID
using cryptographic proofs. In a verifiable data context, a DID can be used to verify the provenance and ownership of
attested data by verifying the proof that is attached to the assertion.

## Decentralized Identifier

Different flavors of `DIDs` exist today. The flavor of a `DID` or more accurately the `DID Method` defines how CRUD operations for a DID of that `DID Method` are executed. Each `DID Method` has different tradeoffs in specific use cases. For example, a web DID can be created without a Blockchain but `DID Methods` exist that have a dependency on a Blockchain. All of them are valid `DIDs` but have different guaranteees.
Different flavors of `DIDs` exist today. The flavor of a `DID` or more accurately the `DID Method` defines how CRUD
operations for a DID of that `DID Method` are executed. Each `DID Method` has different tradeoffs in specific use cases.
For example, a web DID can be created without a Blockchain but `DID Methods` exist that have a dependency on a
Blockchain. All of them are valid `DIDs` but have different guaranteees.

The example below shows how a web DID for veramo.dev might look like.

Expand All @@ -17,15 +23,21 @@ did:web:veramo.dev

### DID Creation

When a `DID` is created, it is typically associated with a private and public key pair. The public key will be visible in the `DID Document`. This allows the controller/subject of the `DID` to generate proofs that are verifiable by anyone that has the corresponding `DID Document` for that `DID`. The process of retrieving the `DID Document` from a `DID` is called `DID Resolution`.
When a `DID` is created, it is typically associated with a private and public key pair. The public key will be visible
in the `DID Document`. This allows the controller/subject of the `DID` to generate proofs that are verifiable by anyone
that has the corresponding `DID Document` for that `DID`. The process of retrieving the `DID Document` from a `DID` is
called `DID Resolution`.

### DID Resolution

A `DID Resolver` can take `DID` as input and resolve the `DID Document`. This is an important concept in how data flows in verifiable data systems.
A `DID Resolver` can take `DID` as input and resolve the `DID Document`. This is an important concept in how data flows
in verifiable data systems.

### DID Document

Every `DID` has a `DID Document` that describes the `DID` subject. In the case of `did:web` the `DID Document` is hosted on the website in the following format. It contains essential cryptographic information and also services that the `DID` has available. This is the foundation of how `DIDs` can start to communicate with each other.
Every `DID` has a `DID Document` that describes the `DID` subject. In the case of `did:web` the `DID Document` is hosted
on the website in the following format. It contains essential cryptographic information and also services that the `DID`
has available. This is the foundation of how `DIDs` can start to communicate with each other.

```json
// 20201110152830
Expand Down Expand Up @@ -61,4 +73,4 @@ Every `DID` has a `DID Document` that describes the `DID` subject. In the case o

### DID Methods

Explainer on what a DID method is and links to supported [DID Methods](/docs/veramo_agent/did_methods) page
Explainer on what a DID method is and links to supported [DID Methods](../veramo_agent/did_methods.md) page
43 changes: 32 additions & 11 deletions docs/basics/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,55 @@ sidebar_label: Introduction

:::info

Veramo is in a public beta. There will be some breaking changes in the coming months, and we endeavor to communicate these in advance via our blog. However, we expect the core APIs to remain relatively stable. You can keep up to date here and get involved in our growing community. We are excited to see what you build with Veramo!
Veramo is in a public beta. There will be some breaking changes in the coming months, and we endeavor to communicate
these in advance via our blog. However, we expect the core APIs to remain relatively stable. You can keep up to date
here and get involved in our growing community. We are excited to see what you build with Veramo!

:::

Veramo is a JavaScript framework that makes it easy for anyone to use cryptographically verifiable data in their applications. It was designed to make it easy for developers who want to use DIDs, verifiable credentials, and data-centric protocols to bring next-generation features to their users.
Veramo is a JavaScript framework that makes it easy for anyone to use cryptographically verifiable data in their
applications. It was designed to make it easy for developers who want to use DIDs, verifiable credentials, and
data-centric protocols to bring next-generation features to their users.

These docs are written for anyone wishing to learn more about the grounding principles behind verifiable data and develop a deeper understanding of the Veramo framework to build next-generation apps that leverage the many benefits of trust networks.
These docs are written for anyone wishing to learn more about the grounding principles behind verifiable data and
develop a deeper understanding of the Veramo framework to build next-generation apps that leverage the many benefits of
trust networks.

### How to use these docs

If you are new to the concept of verifiable data, it would be best to read the fundamentals section linearly as each section builds on knowledge and terminology gained in the previous.
If you are new to the concept of verifiable data, it would be best to read the fundamentals section linearly as each
section builds on knowledge and terminology gained in the previous.

If you are more experienced with verifiable data concepts and/or development in general, you can dive into the architecture section where more specifics of how the internals work is covered. You can also jump over to the [API reference](/docs/api/core) section. Links and more info about these packages can also be found in the [Plugins](/docs/veramo_agent/plugins) section.
If you are more experienced with verifiable data concepts and/or development in general, you can dive into the
architecture section where more specifics of how the internals work is covered. You can also jump over to
the [API reference](../api/index.md) section. Links and more info about these packages can also be found in
the [Plugins](../veramo_agent/plugins.md) section.

### Mission

> Our mission is to empower developers to build better trust layers in their applications.
We obsess over standards and interop so developers and product owners can focus on building their next-generation applications that leverage verifiable data and their decentralized verification benefits.
We obsess over standards and interop so developers and product owners can focus on building their next-generation
applications that leverage verifiable data and their decentralized verification benefits.

### Why Veramo?

The verifiable data landscape has grown exponentially in the past few years and continues to grow at an accelerated rate. Where you have accelerated innovation, you will also have a lot of competing standards. This anomaly makes interoperability challenging. Veramo was designed to be flexible, modular, and scalable. It allows developers to orchestrate a custom system from a growing list of standards without worrying about interoperability and fast-changing specs.
The verifiable data landscape has grown exponentially in the past few years and continues to grow at an accelerated
rate. Where you have accelerated innovation, you will also have a lot of competing standards. This anomaly makes
interoperability challenging. Veramo was designed to be flexible, modular, and scalable. It allows developers to
orchestrate a custom system from a growing list of standards without worrying about interoperability and fast-changing
specs.

Competing standards can create an unnecessary burden and confusion for product owners and developers who prefer not to be tied to a specific vendor or invest too much building on standards that will most likely change. There is a complex [dependency tree](/docs/advanced/data_flow) per platform on top of changing standards that requires considerable effort to manage.
Competing standards can create an unnecessary burden and confusion for product owners and developers who prefer not to
be tied to a specific vendor or invest too much building on standards that will most likely change. There is a complex
dependency tree per platform on top of changing standards that requires considerable effort to manage.

However, this should not prevent businesses from bringing the immense value of verifiable data to their users. We envision an ecosystem of interoperable functionality made possible through specialized community plugins that respect open standards.
However, this should not prevent businesses from bringing the immense value of verifiable data to their users. We
envision an ecosystem of interoperable functionality made possible through specialized community plugins that respect
open standards.

At Veramo, we work closely with the [W3C](https://www.w3.org/) and [DIF](https://identity.foundation/) to build compatibility across many projects and initiatives in the space.
At Veramo, we work closely with the [W3C](https://www.w3.org/) and [DIF](https://identity.foundation/) to build
compatibility across many projects and initiatives in the space.

Using Veramo, you can design your agent how you want it by using the [core plugins](/docs/veramo_agent/plugins). We have plugins for DID Methods, Messaging Protocols, Storage, Key Management, Authentication, and many more.
Using Veramo, you can design your agent how you want it by using the [core plugins](../veramo_agent/plugins.md). We have
plugins for DID Methods, Messaging Protocols, Storage, Key Management, Authentication, and many more.
3 changes: 2 additions & 1 deletion docs/basics/signing_keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ id: signing_keys
title: Signing & Keys
---

To understand how verifiable data works it is important to have an understanding public keys and signing. The following videos provide an excellent overview.
To understand how verifiable data works it is important to have an understanding public keys and signing. The following
videos provide an excellent overview.

Robert Miles PhD Student at University of Nottingham

Expand Down
41 changes: 30 additions & 11 deletions docs/basics/verifiable_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,48 @@ id: verifiable_data
title: Verifiable Data
---

Verifiable data is simply data that has been digitally signed using a cryptographic algorithm. If data has been signed in this way, someone can verify the signature. Here we can look a the most common standard of verifiable data - Verifiable Credentials.
Verifiable data is simply data that has been digitally signed using a cryptographic algorithm. If data has been signed
in this way, someone can verify the signature. Here we can look a the most common standard of verifiable data -
Verifiable Credentials.

### W3C Verifiable Credential

To summarise the W3C definition of a [Verifiable Credential](https://www.w3.org/TR/vc-data-model/#what-is-a-verifiable-credential), it is a piece of data that conforms to the `VerifiableCredential` type. It has attributes such as issuer, subject, proofs, and data being made verifiable. Like a physical credential, a verifiable credential is issued from one entity known as the `issuer` to another entity, the `subject`.
To summarise the W3C definition of
a [Verifiable Credential](https://www.w3.org/TR/vc-data-model/#what-is-a-verifiable-credential), it is a piece of data
that conforms to the `VerifiableCredential` type. It has attributes such as issuer, subject, proofs, and data being made
verifiable. Like a physical credential, a verifiable credential is issued from one entity known as the `issuer` to
another entity, the `subject`.

Let's imagine a physical document such as a passport or driver's license; these documents can be issued by the government that asserts your personal information and 'permissions' such as the type of vehicle you can drive or if you can vote. A physical credential has encoded watermarks, which can be scanned to prove that the issuer is who is stated on the document. To trust the document, you would need to trust the issuer of the document. Some facilities will have the ability to scan these documents to verify the authenticity of the document. This would be considered a 'trust network'.
Let's imagine a physical document such as a passport or driver's license; these documents can be issued by the
government that asserts your personal information and 'permissions' such as the type of vehicle you can drive or if you
can vote. A physical credential has encoded watermarks, which can be scanned to prove that the issuer is who is stated
on the document. To trust the document, you would need to trust the issuer of the document. Some facilities will have
the ability to scan these documents to verify the authenticity of the document. This would be considered a 'trust
network'.

You trust the government and the scanner they approve; therefore, you will trust the person whose document is verified by the scanner. The same model exists here, except the verification or proof is purely digital and cryptographic. Also, it should be noted when anything moves from analog to digital, it usually has more applications outside of the traditional analog version.
You trust the government and the scanner they approve; therefore, you will trust the person whose document is verified
by the scanner. The same model exists here, except the verification or proof is purely digital and cryptographic. Also,
it should be noted when anything moves from analog to digital, it usually has more applications outside of the
traditional analog version.

This is the current v1 format for a W3C compliant Verifiable Credential:

```json
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/v1"
],
"type": ["VerifiableCredential"],
"issuer": {"id": "did:web:veramo.dev"},
"type": [
"VerifiableCredential"
],
"issuer": {
"id": "did:web:veramo.dev"
},
"issuanceDate": "2010-01-01T19:73:24Z",
"credentialSubject": {
"id": "did:example:user",
"community": {
"rank": "rockstar"
"rank": "rockstar"
}
},
"proof": {
Expand All @@ -35,9 +53,10 @@ This is the current v1 format for a W3C compliant Verifiable Credential:
"proofPurpose": "assertionMethod",
"verificationMethod": "https://example.edu/issuers/keys/1",
"jws": "eyJhbGciOiJSUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..TCYt5X
sITJX1CxPCT8yAV-TVkIEq_PbChOMqsLfRoPsnsgw5WEuts01mq-pQy7UJiN5mgRxD-WUc
X16dUEMGlv50aqzpqh4Qktb3rk-BuQy72IFLOqV0G_zS245-kronKb78cPN25DGlcTwLtj
PAYuNzVBAh4vGHSrQyHUdBBPM"
sITJX1CxPCT8yAV-TVkIEq_PbChOMqsLfRoPsnsgw5WEuts01mq-pQy7UJiN5mgRxD-WUc
X16dUEMGlv50aqzpqh4Qktb3rk-BuQy72IFLOqV0G_zS245-kronKb78cPN25DGlcTwLtj
PAYuNzVBAh4vGHSrQyHUdBBPM
"
}
}
```
Loading

0 comments on commit cb6c501

Please sign in to comment.