@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
Name | Type |
---|---|
bytes | Uint8Array |
Returns
Promise
<TRequestBody
>
Defined in
decodeResult
• decodeResult: (bytes
: Uint8Array
) => Promise
<RequestResult
<TResultBody
>>
Type declaration
▸ (bytes
): Promise
<RequestResult
<TResultBody
>>
Parameters
Name | Type |
---|---|
bytes | Uint8Array |
Returns
Promise
<RequestResult
<TResultBody
>>
Defined in
encodeRequest
• encodeRequest: (body
: TRequestBody
) => Promise
<Uint8Array
>
Type declaration
▸ (body
): Promise
<Uint8Array
>
Parameters
Name | Type |
---|---|
body | TRequestBody |
Returns
Promise
<Uint8Array
>
Defined in
encodeResult
• encodeResult: (body
: RequestResult
<TResultBody
>) => Promise
<Uint8Array
>
Type declaration
▸ (body
): Promise
<Uint8Array
>
Parameters
Name | Type |
---|---|
body | RequestResult <TResultBody > |
Returns
Promise
<Uint8Array
>
Defined in
id
• id: string
Defined in
sendRequest
• sendRequest: (requestBody
: TRequestBody
) => Promise
<RequestResult
<TResultBody
>>
Type declaration
▸ (requestBody
): Promise
<RequestResult
<TResultBody
>>
Parameters
Name | Type |
---|---|
requestBody | TRequestBody |
Returns
Promise
<RequestResult
<TResultBody
>>