Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DappPostMessageTransport

Hierarchy

Index

Constructors

constructor

Properties

Protected _isConnected

_isConnected: TransportStatus = ...

The status of the transport

Protected client

client: PostMessageClient

The client handling the encryption/decryption of messages

Protected Readonly name

name: string

The name of the app

Protected Optional newPeerListener

newPeerListener: (peer: ExtendedPostMessagePairingResponse) => void

The listener that will be invoked when a new peer is connected

Type declaration

Protected Readonly peerManager

Readonly type

type: TransportType = ...

The type of the transport

Accessors

connectionStatus

Methods

addListener

  • addListener(listener: (message: unknown, connectionInfo: ConnectionContext) => void): Promise<void>

addPeer

connect

  • connect(): Promise<void>

disconnect

  • disconnect(): Promise<void>

getPairingRequestInfo

getPeers

listen

  • listen(publicKey: string): Promise<void>

listenForNewPeer

Protected notifyListeners

  • notifyListeners(message: unknown, connectionInfo: ConnectionContext): Promise<void>

removeAllPeers

  • removeAllPeers(): Promise<void>

removeListener

  • removeListener(listener: (message: string, connectionInfo: ConnectionContext) => void): Promise<void>

removePeer

send

  • send(message: string, peer?: PeerInfo): Promise<void>

startOpenChannelListener

  • startOpenChannelListener(): Promise<void>

stopListeningForNewPeers

  • stopListeningForNewPeers(): Promise<void>

Static getAvailableExtensions

  • getAvailableExtensions(): Promise<Extension[]>

Static isAvailable

  • isAvailable(): Promise<boolean>

Generated using TypeDoc