Internalapi

Hierarchy

Constructors

Properties

ENABLED_RELAY_SERVERS: NodeDistributions
activeListeners: Map<string, ((event) => void)> = ...

Type declaration

    • (event): void
    • Parameters

      • event: MatrixClientEvent<any>

      Returns void

appUrl?: string
client: ExposedPromise<MatrixClient, unknown> = ...
eventHandlers: Map<ClientEvents, Function>
iconUrl?: string
ignoredRooms: string[] = []
initialEvent: undefined | MatrixClientEvent<MESSAGE>
initialListener: undefined | ((event) => void)

Type declaration

    • (event): void
    • Parameters

      • event: MatrixClientEvent<MESSAGE>

      Returns void

isMobileOS: (() => boolean)

Type declaration

    • (): boolean
    • Returns boolean

keyPair?: KeyPair
loginCounter: number = 0
name: string
relayServer: undefined | ExposedPromise<{
    localTimestamp: number;
    server: string;
    timestamp: number;
}, unknown>
replicationCount: number
selectedRegion?: Regions
storage: Storage

Methods

  • Create a cryptobox client

    Parameters

    • otherPublicKey: string
    • selfKeypair: KeyPair

    Returns Promise<SessionKeys>

  • Create a cryptobox server

    Parameters

    • otherPublicKey: string
    • selfKeypair: KeyPair

    Returns Promise<SessionKeys>

  • Encrypt a message for a specific publicKey (receiver, asymmetric)

    Parameters

    • recipientPublicKey: string
    • message: string

    Returns Promise<string>

  • To get the fastest region, we can't simply do one request, because sometimes, DNS and SSL handshakes make "faster" connections slower. So we need to do 2 requests and check which request was the fastest after 1s.

    Returns Promise<undefined | {
        server: string;
        timestamp: number;
    }>

  • Get the public key

    Returns Promise<string>

  • get the public key hash

    Returns Promise<string>

Generated using TypeDoc