Documentation
    Preparing search index...

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    eventHandlers: Map<ClientEvents, Function>
    isMobileOS: () => boolean
    keyPair?: KeyPair
    relayServer:
        | undefined
        | ExposedPromise<
            { localTimestamp: number; server: string; timestamp: number },
            unknown,
        >
    replicationCount: number

    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>