Internalapi

Hierarchy

Constructors

Properties

ENABLED_RELAY_SERVERS: any
activeListeners: any
appUrl?: any
client: any
eventHandlers: Map<ClientEvents, Function>
getRelevantJoinedRoom: any
getRelevantRoom: any
iconUrl?: any
ignoredRooms: any
initialEvent: any
initialListener: any
isMobileOS: (() => boolean)

Type declaration

    • (): boolean
    • Returns boolean

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

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>

  • Parameters

    • roomId: string

    Returns Promise<void>

  • 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;
    }>

  • Parameters

    • server: string

    Returns Promise<BeaconInfoResponse>

  • Returns Promise<P2PPairingRequest>

  • Get the public key

    Returns Promise<string>

  • get the public key hash

    Returns Promise<string>

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

  • Parameters

    • content: MatrixClientEventMessageContent<string>

    Returns Promise<boolean>

  • Parameters

    • event: MatrixClientEvent<MESSAGE>
    • senderPublicKey: string

    Returns Promise<boolean>

  • Parameters

    • content: MatrixClientEventMessageContent<any>

    Returns content is MatrixClientEventMessageContent<string>

  • Parameters

    • messageCallback: ((pairingResponse) => void)

    Returns Promise<void>

  • Parameters

    • senderPublicKey: string
    • messageCallback: ((message) => void)
        • (message): void
        • Parameters

          • message: string

          Returns void

    Returns Promise<void>

  • Returns Promise<void>

  • Parameters

    Returns Promise<void>

  • Returns Promise<void>

  • Returns Promise<void>

  • Parameters

    • roomId: string
    • Optional retry: number

    Returns Promise<void>

  • Parameters

    • senderPublicKey: string

    Returns Promise<void>

  • Parameters

    • sender: string
    • roomId: string

    Returns Promise<void>

  • Parameters

    • sender: string

    Returns Promise<void>

  • Parameters

    • roomId: string
    • Optional retry: number

    Returns Promise<void>

Generated using TypeDoc