PairSession

PairSession is returned by Driver#onPair.

Instance Methods

done

(async) done(): Promise.<void>

Close the pairing session.

Returns

Promise.<void>

emit

(async) emit(event, data): Promise.<any>

Parameters

Name Type Description
event
string
data
any

Returns

Promise.<any>

nextView

(async) nextView(): Promise.<void>

Go to the next pairing step.

Returns

Promise.<void>

prevView

(async) prevView(): Promise.<void>

Go back to the previous pairing step.

Returns

Promise.<void>

setHandler

setHandler(event, handler): this

Register a handler for an event. setHandler accepts async functions that can receive and respond to messages from the pair view.

Parameters

Name Type Description
event
string
handler
PairSession.Handler

Returns

this

showView

(async) showView(viewId): Promise.<void>

Show a specific pairing step by its id.

Parameters

Name Type Description
viewId
string

Returns

Promise.<void>

Type Definitions

Handler

(async) Handler(data): Promise.<any>

Parameters

Name Type Description
data
any

Returns

Promise.<any>