Skip to main content

Class: WindowMessageTransport

A transport protocol used to communicate with the Ledger Live platform

Implements

Constructors

constructor

new WindowMessageTransport(target?, logger?)

Parameters

NameTypeDefault value
targetWindowwindow
loggerLoggerdefaultLogger

Defined in

packages/core/src/transports/WindowMessageTransport.ts:13

Properties

_onMessage

Private _onMessage: undefined | MessageHandler

Defined in

packages/core/src/transports/WindowMessageTransport.ts:11


logger

Private logger: Logger

Defined in

packages/core/src/transports/WindowMessageTransport.ts:9


target

Private target: Window

Defined in

packages/core/src/transports/WindowMessageTransport.ts:7

Accessors

onMessage

get onMessage(): undefined | MessageHandler

A function to handle new messages coming from the Ledger Live platform

Returns

undefined | MessageHandler

Implementation of

Transport.onMessage

Defined in

packages/core/src/transports/WindowMessageTransport.ts:82

set onMessage(handler): void

A function to handle new messages coming from the Ledger Live platform

Parameters

NameType
handlerundefined | MessageHandler

Returns

void

Implementation of

Transport.onMessage

Defined in

packages/core/src/transports/WindowMessageTransport.ts:78

Methods

_onMessageEvent

_onMessageEvent(event): void

Parameters

NameType
eventMessageEvent<any>

Returns

void

Defined in

packages/core/src/transports/WindowMessageTransport.ts:40


connect

connect(): void

Returns

void

Defined in

packages/core/src/transports/WindowMessageTransport.ts:18


disconnect

disconnect(): void

Returns

void

Defined in

packages/core/src/transports/WindowMessageTransport.ts:29


send

send(message): Promise<void>

A function to send new messages to the Ledger Live platform

Parameters

NameType
messagestring

Returns

Promise<void>

Implementation of

Transport.send

Defined in

packages/core/src/transports/WindowMessageTransport.ts:86