Class: WindowMessageTransport
A transport protocol used to communicate with the Ledger Live platform
Implements
Constructors
constructor
• new WindowMessageTransport(target?
, logger?
)
Parameters
Name | Type | Default value |
---|---|---|
target | Window | window |
logger | Logger | defaultLogger |
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
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
Name | Type |
---|---|
handler | undefined | MessageHandler |
Returns
void
Implementation of
Defined in
packages/core/src/transports/WindowMessageTransport.ts:78
Methods
_onMessageEvent
▸ _onMessageEvent(event
): void
Parameters
Name | Type |
---|---|
event | MessageEvent <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
Name | Type |
---|---|
message | string |
Returns
Promise
<void
>
Implementation of
Defined in
packages/core/src/transports/WindowMessageTransport.ts:86