Skip to content

Commit

Permalink
chore: address feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <timo@animo.id>
  • Loading branch information
TimoGlastra committed Jun 4, 2024
1 parent 7b13eff commit eb61886
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/documentation-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ body:
description: You may select more than one.
options:
- label: React Native
- label: Node.JS
- label: Node.js
- type: checkboxes
id: contribute
attributes:
Expand Down
2 changes: 1 addition & 1 deletion guides/concepts/platform-and-environment.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Platform and Environment

[Credo](https://github.com/openwallet-foundation/credo-ts) is developed to support a [Node.JS](https://nodejs.org) and [React Native](https://reactnative.dev) environment. With this it is entirely possible to build an entire SSI ecosystem with Credo. This would use Node.JS as an issuer as a verifier, and uses React Native as a holder.
[Credo](https://github.com/openwallet-foundation/credo-ts) is developed to support a [Node.js](https://nodejs.org) and [React Native](https://reactnative.dev) environment. With this it is entirely possible to build an entire SSI ecosystem with Credo. This would use Node.js as an issuer as a verifier, and uses React Native as a holder.
2 changes: 1 addition & 1 deletion guides/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import DocCardList from '@theme/DocCardList';

# Getting started

In this section we will go over everything you need to get started on a technical level. First there are some general prerequisites for Node.JS and React Native. Credo works for creating both server-side applications (commonly but not always for creating issuer and verifier agents) and mobile applications (commonly holder agents).
In this section we will go over everything you need to get started on a technical level. First there are some general prerequisites for Node.js and React Native. Credo works for creating both server-side applications (commonly but not always for creating issuer and verifier agents) and mobile applications (commonly holder agents).

Based on the platform you want to work on, the installation guides you should follow are the same, but some steps may differ.

Expand Down
18 changes: 9 additions & 9 deletions guides/getting-started/prerequisites.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Prerequisites

To work with [Credo](https://github.com/openwallet-foundation/credo-ts) we need to install some dependencies and set-up our Node.JS environment. Even when creating a mobile app in React Native, we need Node.JS installed. We will go over the specific installation process for each platform. Go ahead and pick your system of choice to get started!
To work with [Credo](https://github.com/openwallet-foundation/credo-ts) we need to install some dependencies and set-up our Node.js environment. Even when creating a mobile app in React Native, we need Node.js installed. We will go over the specific installation process for each platform. Go ahead and pick your system of choice to get started!

The specific items that we set-up:

- [Node.JS](https://nodejs.org) - v16 or v18
- [Node.js](https://nodejs.org) - v16 or v18
- [yarn](https://classic.yarnpkg.com/lang/en/docs/install) or [npm](https://www.npmjs.com/)
- Node.JS or React Native project.
- Node.js or React Native project.

### Node.JS
### Node.js

NodeJS is the most popular JavaScript runtime environment excluding browsers. It can run on your desktop or even a server.

<!--tabs-->

#### Windows

You can download it from the [Node.JS Website](https://nodejs.org/en/download/)
You can download it from the [Node.js Website](https://nodejs.org/en/download/)

#### macOS

Expand All @@ -26,17 +26,17 @@ Make sure you have [Homebrew](https://brew.sh/) installed. If not you can instal
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

Then install Node.JS with the following command:
Then install Node.js with the following command:

```console
brew install nodejs
```

Alternatively, you can download it from the [Node.JS Website](https://nodejs.org/en/download/)
Alternatively, you can download it from the [Node.js Website](https://nodejs.org/en/download/)

#### Linux

Either follow one of the specific steps for installing Node.JS on linux below, or you can download it directly from the [Node.JS Website](https://nodejs.org/en/download/)
Either follow one of the specific steps for installing Node.js on linux below, or you can download it directly from the [Node.js Website](https://nodejs.org/en/download/)

##### Arch Linux

Expand Down Expand Up @@ -76,4 +76,4 @@ npm install --global yarn

### Project Setup

Finally, you need to make sure you have a project set-up using Node.JS or React Native. If you're not familiar with setting up a project, we suggest following the [Introduction to Node.JS](https://nodejs.dev/en/learn/) or [React Native Quickstart](https://reactnative.dev/docs/environment-setup) guides.
Finally, you need to make sure you have a project set-up using Node.js or React Native. If you're not familiar with setting up a project, we suggest following the [Introduction to Node.js](https://nodejs.dev/en/learn/) or [React Native Quickstart](https://reactnative.dev/docs/environment-setup) guides.
6 changes: 3 additions & 3 deletions guides/getting-started/set-up/anoncreds.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ The AnonCreds module provides functionality for issuing and verifying [AnonCreds

### Installing

When using Credo with AnonCreds, there are a few extra dependencies that need to be installed. We need to install `@credo-ts/anoncreds` package, which contains the interfaces, and `@hyperledger/anoncreds-<platform>` package which is an implementation which depends on a wrapper of anoncreds-rs. Currently there are bindings for Node.JS, as `@hyperledger/anoncreds-nodejs`, and React Native as `@hyperlegder/anoncreds-react-native`.
When using Credo with AnonCreds, there are a few extra dependencies that need to be installed. We need to install `@credo-ts/anoncreds` package, which contains the interfaces, and `@hyperledger/anoncreds-<platform>` package which is an implementation which depends on a wrapper of anoncreds-rs. Currently there are bindings for Node.js, as `@hyperledger/anoncreds-nodejs`, and React Native as `@hyperlegder/anoncreds-react-native`.

<!--tabs-->

# Node.JS
# Node.js

```console
yarn add @credo-ts/anoncreds@^0.5.3 @hyperledger/anoncreds-nodejs@^0.2.2
Expand All @@ -28,7 +28,7 @@ After installing the dependencies, we should register the `AnonCredsModule` on t

<!--tabs-->

# Node.JS
# Node.js

```typescript showLineNumbers set-up-anoncreds.ts section-1

Expand Down
6 changes: 3 additions & 3 deletions guides/getting-started/set-up/aries-askar.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ If you're upgrading from the Indy SDK to Aries Askar, see [Migrating from an Ind

### Installing Aries Askar

When using Credo with Aries Askar, there are a few extra dependencies that need to be installed. We need to install the `@credo-ts/askar` package, which implements the needed interfaces for the agent. Secondly, we need to add native bindings for the specific platform `@hyperledger/aries-askar-<platform>`. Currently there are bindings for Node.JS, as `@hyperledger/aries-askar-nodejs`, and React Native as `@hyperlegder/aries-askar-react-native`.
When using Credo with Aries Askar, there are a few extra dependencies that need to be installed. We need to install the `@credo-ts/askar` package, which implements the needed interfaces for the agent. Secondly, we need to add native bindings for the specific platform `@hyperledger/aries-askar-<platform>`. Currently there are bindings for Node.js, as `@hyperledger/aries-askar-nodejs`, and React Native as `@hyperlegder/aries-askar-react-native`.

<!--tabs-->

# Node.JS
# Node.js

```console
yarn add @credo-ts/askar@^0.5.3 @hyperledger/aries-askar-nodejs@^0.2.1
Expand All @@ -34,7 +34,7 @@ After installing the dependencies, we can register the Askar Module on the agent

<!--tabs-->

# Node.JS
# Node.js

```typescript showLineNumbers set-up-askar.ts section-1

Expand Down
8 changes: 4 additions & 4 deletions guides/getting-started/set-up/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import DocCardList from '@theme/DocCardList';
:::info

This guide assumes you have followed the [Prerequisites](./prerequisites), and you have a valid
[Node.JS](https://nodejs.org) or [React Native](https://reactnative.dev) project setup.
[Node.js](https://nodejs.org) or [React Native](https://reactnative.dev) project setup.

:::

Expand All @@ -31,7 +31,7 @@ First we have to install the minimal amount of dependencies that are required fo

<!--tabs-->

# Node.JS
# Node.js

```console
yarn add @credo-ts/core@^0.5.3 @credo-ts/node@^0.5.3
Expand All @@ -51,7 +51,7 @@ yarn add @credo-ts/core@^0.5.3 @credo-ts/react-native@^0.5.3 react-native-fs rea

# Node.js

No additional setup is required for Node.JS
No additional setup is required for Node.js

# React Native

Expand Down Expand Up @@ -113,7 +113,7 @@ enough for your specific use cases. Please refer to the

<!--tabs-->

# Node.JS
# Node.js

```typescript showLineNumbers set-up.ts section-1

Expand Down
6 changes: 3 additions & 3 deletions guides/getting-started/set-up/indy-vdr.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

### Installing Indy VDR

When using Credo with Indy VDR, there are a few extra dependencies that need to be installed. We need to install the `@hyperledger/indy-vdr`, which contains all the functionality to register objects on an Hyperledger Indy VDR. Secondly, we need to add native bindings for the specific platform `@hyperledger/indy-vdr-<platform>`. Currently there are bindings for Node.JS, as `@hyperledger/indy-vdr-nodejs`, and React Native as `@hyperlegder/indy-vdr-react-native`.
When using Credo with Indy VDR, there are a few extra dependencies that need to be installed. We need to install the `@hyperledger/indy-vdr`, which contains all the functionality to register objects on an Hyperledger Indy VDR. Secondly, we need to add native bindings for the specific platform `@hyperledger/indy-vdr-<platform>`. Currently there are bindings for Node.js, as `@hyperledger/indy-vdr-nodejs`, and React Native as `@hyperlegder/indy-vdr-react-native`.

<!--tabs-->

# Node.JS
# Node.js

```console
yarn add @credo-ts/indy-vdr@^0.5.3 @hyperledger/indy-vdr-nodejs@^0.2.2
Expand All @@ -28,7 +28,7 @@ After installing the dependencies, we can register the Indy VDR module on the ag

<!--tabs-->

# Node.JS
# Node.js

```typescript showLineNumbers set-up-indy-vdr.ts section-1

Expand Down
4 changes: 2 additions & 2 deletions guides/getting-started/set-up/openid4vc.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ After installing the dependencies, we can register the the different modules on

#### Issuer and Verifier

If you want to issue or verify credentials using OpenID for Verifiable Credentials, you can add the `OpenId4VcIssuerModule` and the `OpenId4VcVerifierModule`. These modules can only run on the server, in Node.JS and don't work in a React Native environment. These modules can be added separately, it's not required to use both modules. The set up for the issuer and verifier module can be combined with the set up for the holder module below to support issuance, holding, and verification OpenID4VC flows within the same agent.
If you want to issue or verify credentials using OpenID for Verifiable Credentials, you can add the `OpenId4VcIssuerModule` and the `OpenId4VcVerifierModule`. These modules can only run on the server, in Node.js and don't work in a React Native environment. These modules can be added separately, it's not required to use both modules. The set up for the issuer and verifier module can be combined with the set up for the holder module below to support issuance, holding, and verification OpenID4VC flows within the same agent.

In the example we haven't implemented the `credentialRequestToCredentialMapper` method for the issuer module yet, this is covered in the [OpenID4VC Guides](/guides/tutorials/openid4vc).

Expand All @@ -30,7 +30,7 @@ In the example we haven't implemented the `credentialRequestToCredentialMapper`

### Holder

If you want to receive and present credentials using OpenID for Verifiable Credentials, you can add the `OpenId4VcHolderModule`. This module can run in both Node.JS and React Native.
If you want to receive and present credentials using OpenID for Verifiable Credentials, you can add the `OpenId4VcHolderModule`. This module can run in both Node.js and React Native.

```typescript showLineNumbers set-up-openid4vc-holder.ts section-1

Expand Down
2 changes: 1 addition & 1 deletion guides/updating/update-assistant.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ await updateAssistant.initialize()
if (!(await updateAssistant.isUpToDate())) {
await updateAssistant.update({
// If you don't want to create a backup before the update process starts
// (see )
// (see "Disabling Backups")
createBackupBeforeUpdate: false,
})
}
Expand Down
8 changes: 4 additions & 4 deletions guides/updating/update-indy-sdk-to-askar.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This documentation explains the process of migrating your Indy SDK wallet to [Ar

:::danger

While the migration script technically works on Node.JS, it is strongly advised not to use it, yet. The migration of issuer records (such as Schemas and Credential Definitions) is not implemented yet. When a credential definition is detected it will revert the migration process and no harm is done.
While the migration script technically works on Node.js, it is strongly advised not to use it, yet. The migration of issuer records (such as Schemas and Credential Definitions) is not implemented yet. When a credential definition is detected it will revert the migration process and no harm is done.

:::

Expand Down Expand Up @@ -54,7 +54,7 @@ This update script does not transform did records. This is fine for something li

:::danger

Updating of credential definitions is not yet supported. This is why it is strongly advised not to run this script in a node.js environment.
Updating of credential definitions is not yet supported. This is why it is strongly advised not to run this script in a Node.js environment.

:::

Expand Down Expand Up @@ -171,6 +171,6 @@ function getMobileIndySdkDatabasePath(walletId: string) {
}
```

#### Node.JS
#### Node.js

Migration of data from Indy SDK to Aries Askar is not supported yet in Node.JS. If you are using Node.JS or Postgres and need to update to Aries Askar, please open an issue on [GitHub](https://github.com/openwallet-foundation/credo-ts).
Migration of data from Indy SDK to Aries Askar is not supported yet in Node.js. If you are using Node.js or Postgres and need to update to Aries Askar, please open an issue on [GitHub](https://github.com/openwallet-foundation/credo-ts).
2 changes: 1 addition & 1 deletion guides/updating/versions/0.4-to-0.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ If you have custom modules take into account there could be a lot more breaking

Starting from Credo 0.5, Node 16 has been deprecated and is no longer supported. The supported versions for Credo are Node 18 and 20. We aim to keep support for all LTS releases (the even version numbers) that are either Current, Active, or in Maintenance. Other versions may work, but are not part of our testing and release process.

See the [Release Schedule](https://nodejs.org/en/about/previous-releases#release-schedule) on the Node.JS website for information on past and upcoming Node.JS releases.
See the [Release Schedule](https://nodejs.org/en/about/previous-releases#release-schedule) on the Node.js website for information on past and upcoming Node.js releases.

### Aries to Credo

Expand Down
4 changes: 2 additions & 2 deletions snippets/current/src/set-up-openid4vc-issuer-verifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const config: InitConfig = {

// start-section-1
import { Agent } from '@credo-ts/core'
// OpenID4VC issuer and verifier modules only work in Node.JS
// OpenID4VC issuer and verifier modules only work in Node.js
import { agentDependencies } from '@credo-ts/node'

import express, { Router } from 'express'
Expand Down Expand Up @@ -55,7 +55,7 @@ const agent = new Agent({
},
}),

// openId4VcVerifier module can only be used in Node.JS
// openId4VcVerifier module can only be used in Node.js
openId4VcVerifier: new OpenId4VcVerifierModule({
baseUrl: 'http://127.0.0.1:3000/siop',

Expand Down

0 comments on commit eb61886

Please sign in to comment.