Skip to content

@passes/reqs / Exports / IRequestTopic

Interface: IRequestTopic<TRequestBody, TResultBody>

Type parameters

Name
TRequestBody
TResultBody

Table of contents

Properties

Properties

decodeRequest

decodeRequest: (bytes: Uint8Array) => Promise<TRequestBody>

Type declaration

▸ (bytes): Promise<TRequestBody>

Parameters
NameType
bytesUint8Array
Returns

Promise<TRequestBody>

Defined in

request-topic.jsdoc.mjs:7


decodeResult

decodeResult: (bytes: Uint8Array) => Promise<RequestResult<TResultBody>>

Type declaration

▸ (bytes): Promise<RequestResult<TResultBody>>

Parameters
NameType
bytesUint8Array
Returns

Promise<RequestResult<TResultBody>>

Defined in

request-topic.jsdoc.mjs:9


encodeRequest

encodeRequest: (body: TRequestBody) => Promise<Uint8Array>

Type declaration

▸ (body): Promise<Uint8Array>

Parameters
NameType
bodyTRequestBody
Returns

Promise<Uint8Array>

Defined in

request-topic.jsdoc.mjs:6


encodeResult

encodeResult: (body: RequestResult<TResultBody>) => Promise<Uint8Array>

Type declaration

▸ (body): Promise<Uint8Array>

Parameters
NameType
bodyRequestResult<TResultBody>
Returns

Promise<Uint8Array>

Defined in

request-topic.jsdoc.mjs:8


id

id: string

Defined in

request-topic.jsdoc.mjs:5


sendRequest

sendRequest: (requestBody: TRequestBody) => Promise<RequestResult<TResultBody>>

Type declaration

▸ (requestBody): Promise<RequestResult<TResultBody>>

Parameters
NameType
requestBodyTRequestBody
Returns

Promise<RequestResult<TResultBody>>

Defined in

request-topic.jsdoc.mjs:10