Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 6.28 KB

File metadata and controls

46 lines (30 loc) · 6.28 KB

Installation

The best way to access Request Network is using the Request Network SDK with a Request Node. In this way, the Request Node operator pays the protocol fee for creating requests and reduces the number of transactions signed by the end user resulting in a better user experience.

The Request Network SDK is split into multiple packages so that Builders can pick and choose the features they need.

SDK Packages

These are the packages that we think would be most commonly used by Builders to build applications.

PackageDescription
@requestnetwork/request-client.jsCreate, update, and retrieve requests.
@requestnetwork/web3-signatureSign requests using web3 wallets like Metamask
@requestnetwork/epk-signatureSign requests using Ethereum private keys
@requestnetwork/data-formatStandards for data stored on Request, like invoice format
@requestnetwork/epk-decryptionDecrypt encrypted requests using Ethereum private keys
@requestnetwork/payment-processorPay a request using a web3 wallet
@requestnetwork/request-nodeWeb server that allows easy access to the Request system
@requestnetwork/currencyTools for managing currency definitions

For a list of internal SDK packages, see Internal SDK Packages.

Component Packages

These packages offer pre-built components for quickly integrating certain Request Network features.

PackageDescription
@requestnetwork/create-invoice-formA form for creating invoices in Request Network
@requestnetwork/invoice-dashboardA dashboard for viewing and paying invoices in Request Network
@requestnetwork/add-stakeholderA dialog box for granting third-party access to an encrypted invoice created via Request Finance

Import the packages

The Request Client library can be imported as ES6 or CommonJS modules.

{% tabs %} {% tab title="ES6" %}

import { RequestNetwork } from '@requestnetwork/request-client.js';
import { Web3SignatureProvider } from '@requestnetwork/web3-signature';
import { payRequest } from '@requestnetwork/payment-processor';

{% endtab %}

{% tab title="CommonJS" %}

const { RequestNetwork } = require('@requestnetwork/request-client.js');
const { Web3SignatureProvider } = require('@requestnetwork/web3-signature');
const { payRequest } = require("@requestnetwork/payment-processor");

{% endtab %} {% endtabs %}

Internal SDK Packages

These packages are published publicly but contain functions that are considered internal to the SDK Packages. It is less likely that a Builder would need to use these packages.

PackageDescription
@requestnetwork/advanced-logicExtensions to the protocol
@requestnetwork/data-accessIndexing and batching of transactions
@requestnetwork/ethereum-storageStorage of Request data on Ethereum and IPFS, with custom indexing
@requestnetwork/multi-formatSerialize and deserialize object in the Request Network protocol
@requestnetwork/payment-detectionPayment detection, to compute the balance.
@requestnetwork/request-logicThe Request business logic: properties and actions of requests
@requestnetwork/smart-contractsSources and artifacts of the smart contracts
@requestnetwork/thegraph-data-accessStorage of Request data on Ethereum and IPFS, indexed by TheGraph
@requestnetwork/transaction-managerCreates transactions to be sent to Data Access, managing encryption
@requestnetwork/typesTypescript types shared across @requestnetwork packages
@requestnetwork/utilsCollection of tools shared between the @requestnetwork packages