The request contents. Returned by waitForConfirmation(), getData() and many other methods.
| Name | Description |
|---|---|
| on() | Event subscriber |
| emit() | Event emitter |
graph TD
IRequest --> IRequestData
IRequestData --> IRequestDataWithEvents
| Name | Type | Required? | Description |
|---|---|---|---|
| currency | string | true | The currency in which the request is denominated. |
| meta | IReturnMeta | false | Metadata from the layer below (transaction manager), including ignored actions, if any. |
| balance | IBalanceWithEvents | false | The balance object |
| contentData | object | false | Arbitrary content data. Consider using rnf_invoice v0.0.3 from @requestnetwork/data-format package. |
| currencyInfo | ICurrency | true | Additional info about the currency in which the request is denominated: type, value, and network |
| pending | IPendingRequest | false | Shows recently submitted request contents that have not yet been persisted and indexed. Call waitForConfirmation(). |
| Name | Type | Required? | Description |
|---|---|---|---|
| version | string | true | The Request Network protocol version |
| requestId | string | true | The ID of the request |
| creator | IIdentity | true | Identity of the request creator |
| state | Types.RequestLogic.STATE | true | The state of the request |
| expectedAmount | number | string | true | The requested amount |
| payee | IIdentity | false | Identity of the payee. Not necessarily payment recipient address. |
| payer | IIdentity | false | Identity of the payer. Not necessarily payment sender address. |
| extensions | IExtensionStates | true | The state of the extensions |
| extensionsData | any[] | true | Extensions raw data |
| events | IEvent[] | true | Historical list of actions that have occurred on the request (create, accept, cancel, etc.) |
| timestamp | number (Unix timestamp) | true | Timestamp when request is created. User provided, so this is an agreement between payee and payer. |
| nonce | number | false | Optional nonce to differentiate identical requests. |
| Name | Value |
|---|---|
| PENDING | 'pending' |
| CREATED | 'created' |
| ACCEPTED | 'accepted' |
| CANCELED | 'canceled' |
| Name | Type | Required? | Description |
|---|---|---|---|
| balance | string | false | The sum of all payments and refunds related to this request. If this is >= expectedAmount, then the request is paid in full. |
| events | IPaymentNetworkEvent[] | false | Array of payment events |
| error | IBalanceError | false | Error occured while retrieiving payment events and calculating the balance |
| escrowEvents | EscrowNetworkEvent[] | false | Array of escrow events |
| Name | Type | Required? | Description |
|---|---|---|---|
| amount | string | true | The amount of the detected payment |
| parameters | TEventParameters | false | Depends on the Payment Network ID |
| Name | Type | Required? | Description |
|---|---|---|---|
| type | Types.RequestLogic.CURRENCY | true | Currency type |
| value | string | true | Depends on type.
|
| network | ChainName | false | The chain on which the currency exists |
| Name | Value | |
|---|---|---|
| ETH | 'ETH' | Native (ETH, XDAI, etc.) |
| BTC | 'BTC' | Bitcoin |
| ISO4217 | 'ISO4217' | Fiat (USD, EUR, etc.) |
| ERC20 | 'ERC20' | Non-native fungible currency (USDC, REQ, etc.) |
| ERC777 | 'ERC777' | Streamable fungible currency (USDCx, REQx, etc.) |