Skip to content

chore: rebase master onto main, merge master into main, delete master #102

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

Merged
merged 9 commits into from
May 20, 2025
Binary file added .gitbook/assets/1-LayersPresentation.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/2-AdvancedRequestPresentation.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/2-Encryption.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/2-RequestPresentation.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/3-AdvancedLogicFlow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/3-DataAccessFlow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/3-RequestLogicFlow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/3-StorageFlow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/3-TransactionFlow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/3-TransactionFlowEncrypted.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/4-DataAccessAndStorageFlow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/4-DataAccessFlow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/4-RequestLogicFlow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/4-RequestLogicFlowInvalid.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/4-TransactionFlow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/Gitbook - Request Network.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/Lifecycle of a Request.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/LinkedIn, Cover image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/Request Network Ecosystem.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions .gitbook/assets/decrypting-requests-overview.drawio (1).svg

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .gitbook/assets/decrypting-requests-overview.drawio.svg

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .gitbook/assets/encrypting-requests-overview.drawio (1).svg

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .gitbook/assets/encrypting-requests-overview.drawio (3).svg

Large diffs are not rendered by default.

Binary file added .gitbook/assets/image (1).png
Binary file added .gitbook/assets/image (10).png
Binary file added .gitbook/assets/image (11).png
Binary file added .gitbook/assets/image (2).png
Binary file added .gitbook/assets/image (3).png
Binary file added .gitbook/assets/image (4).png
Binary file added .gitbook/assets/image (5).png
Binary file added .gitbook/assets/image (6).png
Binary file added .gitbook/assets/image (7).png
Binary file added .gitbook/assets/image (8).png
Binary file added .gitbook/assets/image (9).png
Binary file added .gitbook/assets/image.jpg
Binary file added .gitbook/assets/image.png
Binary file added .gitbook/assets/image7.png
Binary file added .gitbook/assets/image9.png
36 changes: 33 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
# docs.request.network
---
description: >-
Request Network is a protocol for creating payment requests and reconciling
payments.
layout:
title:
visible: true
description:
visible: true
tableOfContents:
visible: true
outline:
visible: true
pagination:
visible: false
---

GitBook-hosted content for [docs.request.network](https://docs.request.network/).
Contributions are welcomed!
# Request Network Docs

{% hint style="info" %}
**Talk to an expert**

Learn how Request Network can streamline Web3 invoicing and payments for your app - [book a call](https://calendly.com/mariana-rn/request-network-demo-docs) with us.
{% endhint %}

## What you can do with Request Network

* Easily add invoicing features to your app
* Enable crypto payments in just a few clicks
* Reconcile invoices and payments with 100% accuracy

## Start Building with Request Network

<table data-card-size="large" data-view="cards" data-full-width="false"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><h2><strong>Request Network API</strong></h2></td><td><ul><li>Fast</li><li>Easy to Integrate</li></ul></td><td><a href="broken-reference">Broken link</a></td><td><a href=".gitbook/assets/Screenshot from 2025-02-13 14-45-27.png">Screenshot from 2025-02-13 14-45-27.png</a></td></tr><tr><td><h2>API Demo App: EasyInvoice</h2></td><td><ul><li>Try out Request Network</li><li>Create and Pay Invoices</li></ul></td><td><a href="request-network-api/easyinvoice-api-demo-app.md">easyinvoice-api-demo-app.md</a></td><td><a href=".gitbook/assets/Screenshot from 2025-02-13 14-48-47.png">Screenshot from 2025-02-13 14-48-47.png</a></td></tr></tbody></table>
115 changes: 115 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Table of contents

* [Request Network Docs](README.md)

## Request Network API

* [Create and Pay Requests](request-network-api/create-and-pay-requests.md)
* [Crosschain Payments](request-network-api/crosschain-payments.md)
* [EasyInvoice: API Demo App](request-network-api/easyinvoice-api-demo-app.md)
* [API Portal: Manage API Keys and Webhooks](request-network-api/api-portal-manage-api-keys-and-webhooks/README.md)
* [Manage API Keys and Webhooks programmatically](request-network-api/api-portal-manage-api-keys-and-webhooks/manage-api-keys-and-webhooks-programmatically.md)
* [Full API Reference](https://api.request.network/open-api)

## General

* [Lifecycle of a Request](general/lifecycle-of-a-request.md)
* [Request Scan](general/request-scan.md)
* [Supported Chains](general/supported-chains/README.md)
* [Smart Contract Addresses](general/supported-chains/smart-contract-addresses.md)
* [Request Network Token List](general/request-network-token-list.md)

## Advanced

* [Request Network SDK](advanced/request-network-sdk/README.md)
* [Get Started](advanced/request-network-sdk/get-started/README.md)
* [Quickstart - Browser](advanced/request-network-sdk/get-started/quickstart-browser.md)
* [Quickstart - Node.js](advanced/request-network-sdk/get-started/quickstart-node.js.md)
* [Installation](advanced/request-network-sdk/get-started/installation.md)
* [SDK Injector](advanced/request-network-sdk/get-started/sdk-injector.md)
* [Request Node Gateways](advanced/request-network-sdk/get-started/request-node-gateways.md)
* [SDK Demo Apps](advanced/request-network-sdk/sdk-demo-apps/README.md)
* [Request Invoicing](advanced/request-network-sdk/sdk-demo-apps/request-invoicing/README.md)
* [Pay from Safe Multisig](advanced/request-network-sdk/sdk-demo-apps/request-invoicing/pay-from-safe-multisig.md)
* [Request Checkout](advanced/request-network-sdk/sdk-demo-apps/request-checkout.md)
* [Components](advanced/request-network-sdk/sdk-demo-apps/components/README.md)
* [Create Invoice Form](advanced/request-network-sdk/sdk-demo-apps/components/create-invoice-form.md)
* [Invoice Dashboard](advanced/request-network-sdk/sdk-demo-apps/components/invoice-dashboard.md)
* [Payment Widget](advanced/request-network-sdk/sdk-demo-apps/components/payment-widget.md)
* [Add Stakeholder](advanced/request-network-sdk/sdk-demo-apps/components/add-stakeholder.md)
* [SDK Guides](advanced/request-network-sdk/sdk-guides/README.md)
* [Request Client](advanced/request-network-sdk/sdk-guides/request-client/README.md)
* [Configure the Request Client](advanced/request-network-sdk/sdk-guides/request-client/configure-the-request-client.md)
* [Updating a Request](advanced/request-network-sdk/sdk-guides/request-client/updating-a-request.md)
* [Payment Reference](advanced/request-network-sdk/sdk-guides/request-client/payment-reference.md)
* [Compute a Request ID without creating the request](advanced/request-network-sdk/sdk-guides/request-client/retrieve-a-request.md)
* [Use your own signature mechanism](advanced/request-network-sdk/sdk-guides/request-client/use-your-own-signature-mechanism.md)
* [Support a new currency](advanced/request-network-sdk/sdk-guides/request-client/support-a-new-currency.md)
* [In-Memory Requests](advanced/request-network-sdk/sdk-guides/request-client/in-memory-requests.md)
* [Encryption and Decryption](advanced/request-network-sdk/sdk-guides/encryption-and-decryption/README.md)
* [Encrypt with a wallet signature using Lit Protocol](advanced/request-network-sdk/sdk-guides/encryption-and-decryption/handle-encryption-with-a-web3-wallet.md)
* [Encrypt with an Ethereum private key](advanced/request-network-sdk/sdk-guides/encryption-and-decryption/handling-encryption-with-the-js-library.md)
* [Share an encrypted request](advanced/request-network-sdk/sdk-guides/encryption-and-decryption/share-an-encrypted-request.md)
* [Payment](advanced/request-network-sdk/sdk-guides/payment/README.md)
* [Detect a payment](advanced/request-network-sdk/sdk-guides/payment/detect-a-payment.md)
* [Native Payment](advanced/request-network-sdk/sdk-guides/payment/native-payment.md)
* [Conversion Payment](advanced/request-network-sdk/sdk-guides/payment/conversion-request.md)
* [Declarative Payment](advanced/request-network-sdk/sdk-guides/payment/declarative-request.md)
* [Configuring Payment Fees](advanced/request-network-sdk/sdk-guides/payment/configuring-payment-fees.md)
* [Single Request Forwarder](advanced/request-network-sdk/sdk-guides/payment/single-request-forwarder.md)
* [Batch Payment](advanced/request-network-sdk/sdk-guides/payment/batch-payment.md)
* [Swap-to-Pay Payment](advanced/request-network-sdk/sdk-guides/payment/swap-to-pay-request.md)
* [Swap-to-Conversion Payment](advanced/request-network-sdk/sdk-guides/payment/swap-to-conversion-request.md)
* [Transferable Receivable Payment](advanced/request-network-sdk/sdk-guides/payment/transferable-receivable-payment.md)
* [Meta Payments](advanced/request-network-sdk/sdk-guides/payment/meta-payments.md)
* [Escrow Payment](advanced/request-network-sdk/sdk-guides/payment/escrow-request.md)
* [Streaming Payment](advanced/request-network-sdk/sdk-guides/payment/streaming-request.md)
* [Pay through a proxy-contract with a multisig](advanced/request-network-sdk/sdk-guides/payment/pay-through-a-proxy-contract-with-a-multisig.md)
* [Hinkal Private Payments](advanced/request-network-sdk/sdk-guides/payment/hinkal-private-payments.md)
* [Mobile using Expo](advanced/request-network-sdk/sdk-guides/mobile-using-expo.md)
* [SDK Reference](advanced/request-network-sdk/sdk-api-reference/README.md)
* [request-client.js](advanced/request-network-sdk/sdk-api-reference/request-client.js/README.md)
* [RequestNetwork](advanced/request-network-sdk/sdk-api-reference/request-client.js/requestnetwork/README.md)
* [createRequest()](advanced/request-network-sdk/sdk-api-reference/request-client.js/requestnetwork/createrequest.md)
* [computeRequestId()](advanced/request-network-sdk/sdk-api-reference/request-client.js/requestnetwork/computerequestid.md)
* [fromRequestId()](advanced/request-network-sdk/sdk-api-reference/request-client.js/requestnetwork/fromrequestid.md)
* [fromIdentity()](advanced/request-network-sdk/sdk-api-reference/request-client.js/requestnetwork/fromidentity.md)
* [fromTopic()](advanced/request-network-sdk/sdk-api-reference/request-client.js/requestnetwork/fromtopic.md)
* [Request](advanced/request-network-sdk/sdk-api-reference/request-client.js/request/README.md)
* [waitForConfirmation()](advanced/request-network-sdk/sdk-api-reference/request-client.js/request/waitforconfirmation.md)
* [getData()](advanced/request-network-sdk/sdk-api-reference/request-client.js/request/getdata.md)
* [refresh()](advanced/request-network-sdk/sdk-api-reference/request-client.js/request/refresh.md)
* [cancel()](advanced/request-network-sdk/sdk-api-reference/request-client.js/request/cancel.md)
* [accept()](advanced/request-network-sdk/sdk-api-reference/request-client.js/request/accept.md)
* [increaseExpectedAmountRequest()](advanced/request-network-sdk/sdk-api-reference/request-client.js/request/increaseexpectedamountrequest.md)
* [reduceExpectedAmountRequest()](advanced/request-network-sdk/sdk-api-reference/request-client.js/request/reduceexpectedamountrequest.md)
* [IIdentity](advanced/request-network-sdk/sdk-api-reference/request-client.js/iidentity.md)
* [IRequestDataWithEvents](advanced/request-network-sdk/sdk-api-reference/request-client.js/irequestdatawithevents.md)
* [PaymentReferenceCalculator](advanced/request-network-sdk/sdk-api-reference/request-client.js/paymentreferencecalculator.md)
* [payment-processor](advanced/request-network-sdk/sdk-api-reference/payment-processor/README.md)
* [payRequest()](advanced/request-network-sdk/sdk-api-reference/payment-processor/payrequest.md)
* [web3-signature](advanced/request-network-sdk/sdk-api-reference/web3-signature/README.md)
* [Web3SignatureProvider](advanced/request-network-sdk/sdk-api-reference/web3-signature/web3signatureprovider.md)
* [epk-signature](advanced/request-network-sdk/sdk-api-reference/epk-signature/README.md)
* [EthereumPrivateKeySignatureProvider](advanced/request-network-sdk/sdk-api-reference/epk-signature/ethereumprivatekeysignatureprovider.md)
* [epk-decryption](advanced/request-network-sdk/sdk-api-reference/epk-decryption/README.md)
* [EthereumPrivateKeyDecryptionProvider](advanced/request-network-sdk/sdk-api-reference/epk-decryption/ethereumprivatekeydecryptionprovider.md)
* [Protocol Overview](advanced/protocol-overview/README.md)
* [SDK and Request Node Overview](advanced/protocol-overview/request-client-and-request-node.md)
* [Payment Networks](advanced/protocol-overview/how-payment-networks-work.md)
* [Private Requests using Encryption](advanced/protocol-overview/private-requests-using-encryption.md)
* [Smart Contracts Overview](advanced/protocol-overview/contracts.md)
* [Internal SDK Architecture](advanced/introduction-to-the-request-protocol/README.md)
* [Request Logic](advanced/introduction-to-the-request-protocol/request-logic.md)
* [Advanced Logic](advanced/introduction-to-the-request-protocol/advanced-logic.md)
* [Transaction](advanced/introduction-to-the-request-protocol/transaction.md)
* [Data-access](advanced/introduction-to-the-request-protocol/data-access.md)
* [Storage](advanced/introduction-to-the-request-protocol/storage.md)
* [Data flow](advanced/introduction-to-the-request-protocol/data-flow.md)
* [Request IPFS network](advanced/introduction-to-the-request-protocol/request-ipfs-network.md)

***

* [FAQ](faq.md)
* [Glossary](glossary.md)
* [Contributing](https://github.com/RequestNetwork/requestNetwork/blob/master/CONTRIBUTING.md)
30 changes: 30 additions & 0 deletions advanced/introduction-to-the-request-protocol/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Internal SDK Architecture

Request is an open database for any type of payment request - from business invoices to reimbursements between friends. It aims to support products at any scale from startups to large organizations, from the private to the public sector.

The Request Protocol is the core of Request. It's the bottom layer that defines and handles the data of a request and persists it to a distributed ledger to make Request open, trustless, secure, and resilient.

This section is aimed at helping you understand how the protocol is structured, how it works and meets its requirements. It is particularly useful if you want to propose changes or implement them yourself.

## Overview

The Request Protocol has one fundamental purpose: **to persist, on a distributed ledger, data representing requests and to be able to retrieve these data efficiently**.

To achieve this, the Request Protocol follows the layered architecture pattern. Each layer is responsible for a specific task and a specific level of abstraction. This layered architecture is highly extensible and hopefully easy to understand.

The protocol is composed of four layers:

* Request logic
* Transaction
* Data Access
* Storage

<figure><img src="../../.gitbook/assets/1-LayersPresentation.jpg" alt=""><figcaption><p><em>Layers of the Request Protocol, each layer is described in the next section.</em></p></figcaption></figure>

This layered architecture allows package reusability and makes the protocol more upgradeable. For example, our current implementation uses Ethereum and IPFS. Still, suppose Arweave turns out to be a better solution for storing data in a decentralized database than IPFS. In that case, we can create a new storage layer that uses Arweave and make the data-access layer using this new package instead.

### Interface vs implementation

The protocol follows a defined interface; each layer has to implement a specific interface. The interfaces for each layer can be found in the Types package of Request Network repository: [https://github.com/RequestNetwork/requestNetwork/tree/master/packages/types](https://github.com/RequestNetwork/requestNetwork/tree/master/packages/types).

The following pages present the first implementation of the protocol used for the released version of Request V2 on mainnet.
11 changes: 11 additions & 0 deletions advanced/introduction-to-the-request-protocol/advanced-logic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Advanced Logic

Simplicity is one of the most important characteristics we want to achieve in the Protocol. This is why the actions available in Request Logic are the minimal set of actions needed for any kind of request for payment. In the same way, the basic request state is universally common to any request, every request has a payee (a recipient), a currency (what requested), an expected amount (how much requested) and a basic state (accepted, canceled). To enable more advanced features for the users, we conceived Advanced Logic.

Advanced Logic is a package that allows the user to define extensions that can be added to the request. An extension is an isolated context inside the request that contains his actions and his state. For example, the extension `content-data` allows the user to add metadata to a request (e.g. the additional data needed for an invoice). The Advanced Logic layer is also where the payment networks allowing payment detection are implemented.

Similar to Request Logic, a specific extension can define different actions related to it. There is the Create action of the extension and, eventually different update actions. The extension is initialized at the same time as the request, and any action of the Request Logic can add extension data. There is a specific action, `AddExtensionData`, in Request Logic, only intended to add extension data to the request with no other side-effect.

<figure><img src="../../.gitbook/assets/2-AdvancedRequestPresentation.jpg" alt=""><figcaption><p><em>Example of a request with extension data: the payee creates a request with content data and declarative payment information, the payer accepts the request and declares a sent payment in the same time, and finally, the payee declares the received payment</em></p></figcaption></figure>

The specification for each extension can be found at this link: [https://github.com/RequestNetwork/requestNetwork/tree/master/packages/advanced-logic/specs](https://github.com/RequestNetwork/requestNetwork/tree/master/packages/advanced-logic/specs)
25 changes: 25 additions & 0 deletions advanced/introduction-to-the-request-protocol/data-access.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Data-access

Data-Access is the layer that organizes the data in the correct format before having them stored in the storage layer. This layer is similar as the persistence layer in the classical layered architecture pattern.

[https://github.com/RequestNetwork/requestNetwork/tree/master/packages/data-access](https://github.com/RequestNetwork/requestNetwork/tree/master/packages/data-access)

#### Blocks

Heavy communication with the Storage layer can be costly. For example, for a solution using Ethereum, every Ethereum transactions cost some gas.

Data-Access layer will gather transactions and batch them into blocks. This solution allows for less communication with the Storage layer. In this case, it will allow consuming less gas for Ethereum transactions.

#### Local cache for accessing transaction

Data-Access is also responsible for other side tasks:

* Indexing transactions to allow retrieval
* Accessing transactions through a local cache
* Synchronizing with the storage

The storage phase is only complete when indexing has completed. Because this indexing is an Ethereum transaction, you cannot know how long it will take.

It is because when a block is created or read from the storage, the transactions inside it will be indexed and kept in a local cache. When a user wants to get information about a request, Data-Access will directly fetch them from this local cache.

Data-Access stays synchronized with the storage layer. For example, it pulls for new blocks, added by other users, in the storage every 10 seconds.
Loading