Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: re-enable Prettier for docs #3147

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ build
**/styles/*.css
.docusaurus
.cache-loader
packages/documentation/**
.astro
6 changes: 3 additions & 3 deletions packages/documentation/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ export default defineConfig({
],
plugins: [
starlightLinksValidator({
errorOnLocalLinks: false,
}),
],
errorOnLocalLinks: false
})
]
}),
GraphQL({
schema: '../backend/src/graphql/schema.graphql',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ You can either trigger the debugger by adding `debugger` statements in the code
#### Debugging with VS Code:

To debug with VS Code, add this configuration to your `.vscode/launch.json`:

```json
{
"name": "Attach to docker (cloud-nine-backend)",
Expand Down Expand Up @@ -220,7 +221,7 @@ The following are the most commonly used commands:
| pnpm localenv:compose up | Start (with TigerBeetle) |
| pnpm localenv:compose up -d | Start (with TigerBeetle) detached |
| pnpm localenv:compose down | Down (with TigerBeetle) |
| pnpm localenv:compose down --volumes | Down and kill volumes (with TigerBeetle)
| pnpm localenv:compose down --volumes | Down and kill volumes (with TigerBeetle) |
| pnpm localenv:compose down --volumes --rmi all | Down, kill volumes (with TigerBeetle) and images |
| pnpm localenv:compose:psql config | Show all merged config (with PostgreSQL) |
| pnpm localenv:compose build | Build all the containers (with TigerBeetle) |
Expand Down Expand Up @@ -292,4 +293,4 @@ test.rafiki.viXmy1OVHgvmQakNjX1C6kQMri92DzHeISEv-5VzTDuFhrpsrkDzsq5OO9Lfa9yed0L2

#### TigerBeetle container exists with code 137

There is a known <LinkOut href='https://docs.tigerbeetle.com/operating/docker/#exited-with-code-137'>issue</LinkOut> when running TigerBeetle in Docker. The container exits without logs and simply shows error code 137. To fix this, increase the Docker memory limit. If you run the local Docker playground on a Windows machine via the Windows Subsystem for Linux (WSL), you can increase the memory limit by <LinkOut href='https://learn.microsoft.com/en-us/windows/wsl/wsl-config#example-wslconfig-file'>configuring</LinkOut> your `.wslconfig` file.
There is a known <LinkOut href='https://docs.tigerbeetle.com/operating/docker/#exited-with-code-137'>issue</LinkOut> when running TigerBeetle in Docker. The container exits without logs and simply shows error code 137. To fix this, increase the Docker memory limit. If you run the local Docker playground on a Windows machine via the Windows Subsystem for Linux (WSL), you can increase the memory limit by <LinkOut href='https://learn.microsoft.com/en-us/windows/wsl/wsl-config#example-wslconfig-file'>configuring</LinkOut> your `.wslconfig` file.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ Deploy a general purpose VM with the following minimum specifications:

Install the following software on the VM:

- <LinkOut href='https://docs.docker.com/engine/install/'>Docker Engine</LinkOut>
- <LinkOut href='https://docs.docker.com/compose/install/#scenario-two-install-the-compose-plugin'>Docker Compose</LinkOut>
- <LinkOut href='https://docs.docker.com/engine/install/'>
Docker Engine
</LinkOut>
- <LinkOut href='https://docs.docker.com/compose/install/#scenario-two-install-the-compose-plugin'>
Docker Compose
</LinkOut>

### Install Nginx and Certbot

Expand Down Expand Up @@ -263,7 +267,7 @@ Create nginx configuration files for every exposed domain:
| Open Payments resource server | DOMAIN | myrafiki.com | /etc/nginx/sites-available/open_payments_resource_server.config |
| ILP Connector | ilp.DOMAIN | ilp.myrafiki.com | /etc/nginx/sites-available/ilp.config |
| Open Payments auth server | auth.DOMAIN | auth.myrafiki.com | /etc/nginx/sites-available/open_payments_auth_server.config |
| Admin UI | admin.DOMAIN | admin.myrafiki.com | /etc/nginx/sites-available/admin.config |
| Admin UI | admin.DOMAIN | admin.myrafiki.com | /etc/nginx/sites-available/admin.config |

</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Each payment account belonging to your users (e.g., customers) must have at leas

- Your Rafiki instance must be set up for at least one asset before wallet addresses can be created as each wallet address must have an asset assigned to it.
- Wallet address URLs are treated as case-insensitive, meaning that both lowercase and uppercase variations of the same address will be recognized as identical.

:::

## Create wallet addresses
Expand Down Expand Up @@ -84,12 +85,12 @@ We strongly recommend you store at least the `walletAddress.id` in your internal

<div class="overflow-table">

|Variable | Description |
|-------- | ----------- |
| `assetId` | The unique ID of the asset, assigned by Rafiki when the asset was created, that the wallet address's underlying payment account is denominated in |
| `publicName` | The public name associated with the wallet address |
| `url` | The wallet address's case-insensitive URL |
| `additionalProperties` | Optional [additional properties](/apis/graphql/backend/inputobjects/#additionalpropertyinput) associated with the wallet address |
| Variable | Description |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `assetId` | The unique ID of the asset, assigned by Rafiki when the asset was created, that the wallet address's underlying payment account is denominated in |
| `publicName` | The public name associated with the wallet address |
| `url` | The wallet address's case-insensitive URL |
| `additionalProperties` | Optional [additional properties](/apis/graphql/backend/inputobjects/#additionalpropertyinput) associated with the wallet address |

</div>

Expand Down Expand Up @@ -194,11 +195,11 @@ Open Payments <LinkOut href="https://openpayments.dev/apis/wallet-address-server

<div class="overflow-table">

| Parameter | Required value | Description |
| --------- | -------------- | ----------- |
| `alg` | `EdDSA` | The algorithm used to generate the key pair |
| `kty` | `OKP` | The key type identifying the cryptographic algorithm family used with the key |
| `crv` | `Ed25519` | The cryptographic curve used with the key |
| Parameter | Required value | Description |
| --------- | -------------- | ----------------------------------------------------------------------------- |
| `alg` | `EdDSA` | The algorithm used to generate the key pair |
| `kty` | `OKP` | The key type identifying the cryptographic algorithm family used with the key |
| `crv` | `Ed25519` | The cryptographic curve used with the key |

</div>

Expand Down Expand Up @@ -285,4 +286,4 @@ mutation RevokeWalletAddressKey($input: RevokeWalletAddressKeyInput!) {
}
```

</CodeBlock>
</CodeBlock>
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ Rafiki-Signature: t=<timestamp>, v<version>=<signature_digest>
### Prepare the signed payload string

To recreate the signed payload string, concatenate the following.

- The timestamp extracted from the header
- A period (.) character
- The actual JSON payload from the request body, containing the `id`, `type`, and `data` attributes
Expand All @@ -178,6 +179,7 @@ Use HMAC SHA-256 with the `SIGNATURE_SECRET` environment variable as the key and
Finally, compare the signature in the header to the expected signature you generated. For security, use a constant-time comparison function to prevent timing attacks.

### Example

Below is an example in JavaScript to verify Rafiki's webhook signature:

<CodeBlock title="Verify webhook signature example">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,23 +167,23 @@ When the `ENABLE_TELEMETRY` variable is `true`, the following are required.

<div class="overflow-table">

| Variable name | Type | Description |
| ------------- | ---- | ----------- |
| `INSTANCE_NAME` | String | Your Rafiki instance's name used to communicate for telemetry and auto-peering. For telemetry, it's used to distinguish between the different instances pushing data to the telemetry collector. | Y |
| Variable name | Type | Description |
| --------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --- |
| `INSTANCE_NAME` | String | Your Rafiki instance's name used to communicate for telemetry and auto-peering. For telemetry, it's used to distinguish between the different instances pushing data to the telemetry collector. | Y |

</div>

#### Optional

<div class="overflow-table">

| Variable name | Type | Description |
| ------------- | ---- | ----------- |
| `ENABLE_TELEMETRY` | Boolean | Enables the telemetry service on Rafiki. Defaults to `true`. |
| `LIVENET` | Boolean | Determines where to send metrics. Defaults to `false`, resulting in metrics being sent to the testnet OTEL Collector. <p>Set to `true` on production environments dealing with real money.</p> |
| `OPEN_TELEMETRY_COLLECTOR_URLS` | String | A CSV of URLs for OTEL Collectors (e.g., `http://otel-collector-NLB-e3172ff9d2f4bc8a.elb.eu-west-2.amazonaws.com:4317,http://happy-life-otel-collector:4317`). |
| `OPEN_TELEMETRY_EXPORT_INTERVAL` | Number | Indicates, in milliseconds, how often the instrumented Rafiki instance should send metrics. Defaults to`15000`. |
| `TELEMETRY_EXCHANGE_RATES_URL` | String | <p>Defines the endpoint Rafiki will query for exchange rates. Used as a fallback if/when [exchange rates](/integration/requirements/exchange-rates) aren’t provided.</p><p>When set, the response format of the external exchange rates API should be of type `rates`, as is expected by the rate service.</p><p>Defaults to `https://telemetry-exchange-rates.s3.amazonaws.com/exchange-rates-usd.json`, which points to a public S3 that has the previously mentioned required format, updated daily.</p> |
| Variable name | Type | Description |
| -------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ENABLE_TELEMETRY` | Boolean | Enables the telemetry service on Rafiki. Defaults to `true`. |
| `LIVENET` | Boolean | Determines where to send metrics. Defaults to `false`, resulting in metrics being sent to the testnet OTEL Collector. <p>Set to `true` on production environments dealing with real money.</p> |
| `OPEN_TELEMETRY_COLLECTOR_URLS` | String | A CSV of URLs for OTEL Collectors (e.g., `http://otel-collector-NLB-e3172ff9d2f4bc8a.elb.eu-west-2.amazonaws.com:4317,http://happy-life-otel-collector:4317`). |
| `OPEN_TELEMETRY_EXPORT_INTERVAL` | Number | Indicates, in milliseconds, how often the instrumented Rafiki instance should send metrics. Defaults to`15000`. |
| `TELEMETRY_EXCHANGE_RATES_URL` | String | <p>Defines the endpoint Rafiki will query for exchange rates. Used as a fallback if/when [exchange rates](/integration/requirements/exchange-rates) aren’t provided.</p><p>When set, the response format of the external exchange rates API should be of type `rates`, as is expected by the rate service.</p><p>Defaults to `https://telemetry-exchange-rates.s3.amazonaws.com/exchange-rates-usd.json`, which points to a public S3 that has the previously mentioned required format, updated daily.</p> |

</div>

Expand Down
11 changes: 5 additions & 6 deletions packages/documentation/src/content/docs/resources/glossary.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ An API standard and a set of APIs that allows clients to securely retrieve accou

## Outgoing payment

An object created by the sender’s ASE, on their resource server, that represents a payment being sent. This object contains information about the outgoing payment, such as the amount, currency, receiver’s wallet address, and payment status.
An object created by the sender’s ASE, on their resource server, that represents a payment being sent. This object contains information about the outgoing payment, such as the amount, currency, receiver’s wallet address, and payment status.

## Payment pointer

Expand All @@ -78,21 +78,20 @@ An object created by the sender’s ASE, on their resource server, that represen

## Resource server

A server that hosts and manages access to protected Open Payments resources for incoming payments, quotes, and outgoing payments.
A server that hosts and manages access to protected Open Payments resources for incoming payments, quotes, and outgoing payments.

Rafiki's `backend` service runs an Open Payments resource server.

## Simple Payment Setup Protocol (SPSP)

An Interledger application layer protocol for exchanging payment information between two counterparties to facilitate direct payments over Interledger. The information is then used to set up a STREAM connection. You can read more about SPSP in its <LinkOut href="https://interledger.org/developers/rfcs/simple-payment-setup-protocol/">specification
</LinkOut>.
An Interledger application layer protocol for exchanging payment information between two counterparties to facilitate direct payments over Interledger. The information is then used to set up a STREAM connection. You can read more about SPSP in its <LinkOut href="https://interledger.org/developers/rfcs/simple-payment-setup-protocol/">specification</LinkOut>.

## Streaming Transport for the Real-Time Exchange of Assets and Messages (STREAM)

An Interledger transport layer protocol for sending and receiving authenticated ILP packets between peers and determining the path exchange rate. See the <LinkOut href="https://interledger.org/developers/rfcs/stream-protocol/">STREAM specification</LinkOut> for more information.

## Wallet address

A secure, unique URL that identifies an Open Payments-enabled account. It acts as an entry point to the Open Payments APIs, facilitating interactions like sending and receiving payments.
A secure, unique URL that identifies an Open Payments-enabled account. It acts as an entry point to the Open Payments APIs, facilitating interactions like sending and receiving payments.

A wallet address is publicly shareable and used to interact with the underlying payment account without compromising its security. Wallet address URLs are treated as case-insensitive, meaning that both lowercase and uppercase variations of the same address will be recognized as identical.
A wallet address is publicly shareable and used to interact with the underlying payment account without compromising its security. Wallet address URLs are treated as case-insensitive, meaning that both lowercase and uppercase variations of the same address will be recognized as identical.
Loading
Loading