RequestNetwork

@requestnetwork/request-client.jsGlobals"api/request-network"RequestNetwork

Entry point of the request-client.js library. Create requests, get requests, manipulate requests.

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

+ new RequestNetwork(dataAccess: IDataAccess, signatureProvider?: SignatureProviderTypes.ISignatureProvider, decryptionProvider?: DecryptionProviderTypes.IDecryptionProvider, bitcoinDetectionProvider?: PaymentTypes.IBitcoinDetectionProvider): RequestNetwork

Defined in request-client.js/src/api/request-network.ts:35

Parameters:

NameTypeDescription
dataAccessIDataAccessinstance of data-access layer
signatureProvider?SignatureProviderTypes.ISignatureProvidermodule in charge of the signatures
decryptionProvider?DecryptionProviderTypes.IDecryptionProvidermodule in charge of the decryption
bitcoinDetectionProvider?PaymentTypes.IBitcoinDetectionProviderbitcoin detection provider

Returns: RequestNetwork

Properties

Private advancedLogic

advancedLogic: IAdvancedLogic

Defined in request-client.js/src/api/request-network.ts:33


Optional bitcoinDetectionProvider

bitcoinDetectionProvider? : PaymentTypes.IBitcoinDetectionProvider

Defined in request-client.js/src/api/request-network.ts:28


Private contentData

contentData: ContentDataExtension

Defined in request-client.js/src/api/request-network.ts:35


Private requestLogic

requestLogic: IRequestLogic

Defined in request-client.js/src/api/request-network.ts:31


supportedIdentities

supportedIdentities: TYPE[] = Utils.identity.supportedIdentities

Defined in request-client.js/src/api/request-network.ts:29


Private transaction

transaction: ITransactionManager

Defined in request-client.js/src/api/request-network.ts:32

Methods

_createEncryptedRequest

_createEncryptedRequest(parameters: ICreateRequestParameters, encryptionParams: IEncryptionParameters[]): Promise‹Request

Defined in request-client.js/src/api/request-network.ts:94

Creates an encrypted request.

Parameters:

NameTypeDescription
parametersICreateRequestParametersParameters to create a request
encryptionParamsIEncryptionParameters[]Request encryption parameters

Returns: Promise‹Request

The created encrypted request


computeRequestId

computeRequestId(parameters: ICreateRequestParameters): Promise‹RequestLogicTypes.RequestId›

Defined in request-client.js/src/api/request-network.ts:129

Gets the ID of a request without creating it.

Parameters:

NameType
parametersICreateRequestParameters

Returns: Promise‹RequestLogicTypes.RequestId›

The requestId


createRequest

createRequest(parameters: ICreateRequestParameters): Promise‹Request

Defined in request-client.js/src/api/request-network.ts:62

Creates a request.

Parameters:

NameType
parametersICreateRequestParameters

Returns: Promise‹Request

The created request


fromIdentity

fromIdentity(identity: IIdentity, updatedBetween?: Types.ITimestampBoundaries, options?: undefined | object): Promise‹Request[]›

Defined in request-client.js/src/api/request-network.ts:189

Create an array of request instances from an identity

Parameters:

NameTypeDescription
identityIIdentity-
updatedBetween?Types.ITimestampBoundariesfilter the requests with time boundaries
options?undefined | objectoptions

Returns: Promise‹Request[]›

the Requests


fromMultipleIdentities

fromMultipleIdentities(identities: IIdentity[], updatedBetween?: Types.ITimestampBoundaries, options?: undefined | object): Promise‹Request[]›

Defined in request-client.js/src/api/request-network.ts:208

Create an array of request instances from multiple identities

Parameters:

NameTypeDescription
identitiesIIdentity[]-
updatedBetween?Types.ITimestampBoundariesfilter the requests with time boundaries
options?undefined | object-

Returns: Promise‹Request[]›

the requests


fromMultipleTopics

fromMultipleTopics(topics: any[], updatedBetween?: Types.ITimestampBoundaries, options?: undefined | object): Promise‹Request[]›

Defined in request-client.js/src/api/request-network.ts:286

Create an array of request instances from a multiple topics

Parameters:

NameTypeDescription
topicsany[]-
updatedBetween?Types.ITimestampBoundariesfilter the requests with time boundaries
options?undefined | objectoptions

Returns: Promise‹Request[]›

the Requests


fromRequestId

fromRequestId(requestId: RequestLogicTypes.RequestId, options?: undefined | object): Promise‹Request

Defined in request-client.js/src/api/request-network.ts:143

Create a Request instance from an existing Request's ID

Parameters:

NameTypeDescription
requestIdRequestLogicTypes.RequestIdThe ID of the Request
options?undefined | objectoptions

Returns: Promise‹Request

the Request


fromTopic

fromTopic(topic: any, updatedBetween?: Types.ITimestampBoundaries, options?: undefined | object): Promise‹Request[]›

Defined in request-client.js/src/api/request-network.ts:232

Create an array of request instances from a topic

Parameters:

NameTypeDescription
topicany-
updatedBetween?Types.ITimestampBoundariesfilter the requests with time boundaries
options?undefined | objectoptions

Returns: Promise‹Request[]›

the Requests


Private prepareRequestParameters

prepareRequestParameters(parameters: ICreateRequestParameters): Promise‹object›

Defined in request-client.js/src/api/request-network.ts:338

A helper to validate and prepare the parameters of a request.

Parameters:

NameTypeDescription
parametersICreateRequestParametersParameters to create a request

Returns: Promise‹object›

the parameters, ready for request creation, the topics, and the paymentNetwork