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

NameType
target?Window
logger?Logger

Defined in

packages/core/lib/transports/WindowMessageTransport.d.ts:7

Properties

_onMessage

Private _onMessage: any

Defined in

packages/core/lib/transports/WindowMessageTransport.d.ts:6


_onMessageEvent

_onMessageEvent: (event: MessageEvent<any>) => void

Type declaration

▸ (event): void

Parameters
NameType
eventMessageEvent<any>
Returns

void

Defined in

packages/core/lib/transports/WindowMessageTransport.d.ts:10


connect

connect: () => void

Type declaration

▸ (): void

Returns

void

Defined in

packages/core/lib/transports/WindowMessageTransport.d.ts:8


disconnect

disconnect: () => void

Type declaration

▸ (): void

Returns

void

Defined in

packages/core/lib/transports/WindowMessageTransport.d.ts:9


logger

Private logger: any

Defined in

packages/core/lib/transports/WindowMessageTransport.d.ts:5


send

send: (message: string) => Promise<void>

Type declaration

▸ (message): Promise<void>

Parameters
NameType
messagestring
Returns

Promise<void>

Implementation of

Transport.send

Defined in

packages/core/lib/transports/WindowMessageTransport.d.ts:13


target

Private target: any

Defined in

packages/core/lib/transports/WindowMessageTransport.d.ts:4

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/lib/transports/WindowMessageTransport.d.ts:12

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/lib/transports/WindowMessageTransport.d.ts:11