Skip to content

@passes/reqs / Exports / Messaging

Namespace: Messaging

Table of contents

Interfaces

Functions

Functions

awaitRequest

awaitRequest(): Promise<RequestMessage>

Topic and Pass Providers should call awaitRequest when opened by a requesting app to receive the Pass Request. Under the hood, it sends a connect message to the requesting app window and returns a promise that resolves with the request when it's received.

Returns

Promise<RequestMessage>

Memberof

Messaging

Defined in

messaging/await-request.js:14


sendResult

sendResult(result, origin?): void

Topic and Pass Providers should call sendResult when they have a result to send back to the requesting app.

Parameters

NameTypeDefault valueDescription
resultUint8ArrayundefinedThe encoded result to send back to the requesting app.
origin?string'*'The origin to send the result to. Defaults to '*'.

Returns

void

Memberof

Messaging

Defined in

messaging/send-result.js:7