ts-algochat
    Preparing search index...

    Function discoverEncryptionKeyFromMessages

    • Discover encryption key from a chat message transaction.

      This extracts the sender's public key from the envelope header of any AlgoChat message they've sent.

      Parameters

      • indexer: IndexerClient

        The indexer client to use

      • address: string

        The Algorand address to find the key for

      • isChatMessage: (note: Uint8Array) => boolean

        Function to check if a note is an AlgoChat message

      • decodeEnvelope: (note: Uint8Array) => { senderPublicKey: Uint8Array }

        Function to decode envelope and extract public key

      • searchDepth: number = 200

        Maximum transactions to search (default: 200)

      Returns Promise<DiscoveredKey | undefined>

      DiscoveredKey if found, undefined otherwise