IRequestDataWithEvents

Description

The request contents. Returned by waitForConfirmation(), getData() and many other methods.

Instance Methods

NameDescription

on()

Event subscriber

emit()

Event emitter

Inherited Properties

IRequestData

NameTypeRequired?Description

currency

string

The currency in which the request is denominated.

meta

IReturnMeta

Metadata from the layer below (transaction manager), including ignored actions, if any.

balance

The balance object

contentData

object

Arbitrary content data. Consider using rnf_invoice v0.0.3 from @requestnetwork/data-format package.

currencyInfo

Additional info about the currency in which the request is denominated: type, value, and network

pending

IPendingRequest

Shows recently submitted request contents that have not yet been persisted and indexed. Call waitForConfirmation().

IRequest

NameTypeRequired?Description

version

string

The Request Network protocol version

requestId

string

The ID of the request

creator

Identity of the request creator

state

The state of the request

expectedAmount

number | string

The requested amount

payee

Identity of the payee. Not necessarily payment recipient address.

payer

Identity of the payer. Not necessarily payment sender address.

extensions

IExtensionStates

The state of the extensions

extensionsData

any[]

Extensions raw data

events

IEvent[]

Historical list of actions that have occurred on the request (create, accept, cancel, etc.)

timestamp

number (Unix timestamp)

Timestamp when request is created. User provided, so this is an agreement between payee and payer.

nonce

number

Optional nonce to differentiate identical requests.

Types and Interfaces

Types.RequestLogic.STATE

NameValue

PENDING

'pending'

CREATED

'created'

ACCEPTED

'accepted'

CANCELED

'canceled'

IBalanceWithEvents

NameTypeRequired?Description

balance

string

The sum of all payments and refunds related to this request. If this is >= expectedAmount, then the request is paid in full.

events

Array of payment events

error

IBalanceError

Error occured while retrieiving payment events and calculating the balance

escrowEvents

EscrowNetworkEvent[]

Array of escrow events

IPaymentNetworkEvent

NameTypeRequired?Description

amount

string

The amount of the detected payment

parameters

TEventParameters

Depends on the Payment Network ID

ICurrency

NameTypeRequired?Description

type

Currency type

value

string

Depends on type.

  • ERC20 contract address '0x123'

  • Fiat symbol 'USD'

  • Native symbol 'ETH'

network

ChainName

The chain on which the currency exists

Types.RequestLogic.CURRENCY

NameValue

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.)

Last updated