OptionalencryptionOptions: EncryptionOptionsOptionaladdress: stringDiscovers a user's encryption public key from their transaction history.
Uses paginated indexer queries to search exhaustively. Results are cached in an LRU cache to avoid repeated full scans for the same address.
Algorand address to discover key for
OptionalsearchDepth: numberMax transactions to search (default: undefined = exhaustive)
Discovers a user's encryption public key with full metadata.
Uses paginated indexer queries with the next-token cursor to walk the
full transaction history. Falls back to a single batch when searchDepth
is provided for backward compatibility.
Algorand address to discover key for
OptionalsearchDepth: numberMax transactions to search (default: undefined = exhaustive)
Fetches all conversations for an account
Scans transaction history and groups messages by participant. Returns conversations sorted by most recent message.
Fetches messages with a participant
The user's chat account
Address of the conversation participant
OptionalafterRound: numberOnly fetch messages after this round (for polling new messages)
Maximum number of messages to fetch
OptionalbeforeRound: numberOnly fetch messages before this round (for pagination/loading older)
Gets account balance in microAlgos
Publishes the account's encryption key to the blockchain
Sends an encrypted message to a recipient
The sender's chat account
Recipient's Algorand address
Recipient's encryption public key
Message content
Send options (waitForConfirmation, waitForIndexer, etc.)
Sends a reply to a message
The sender's chat account
Recipient's Algorand address
Recipient's encryption public key
Message content
Transaction ID of the message being replied to
Preview text of the message being replied to
Send options (waitForConfirmation, waitForIndexer, etc.)
Checks if a transaction exists in the indexer
Transaction ID to check
Waits for transaction confirmation
Transaction ID to wait for
Timeout in rounds (default: 10)
Confirmed round number
Waits for a transaction to be indexed
Uses exponential backoff with jitter for efficient polling.
Transaction ID to wait for
Timeout in milliseconds (default: 30000)
Initial polling interval (default: 500ms)
Maximum polling interval (default: 5000ms)
Backoff multiplier (default: 1.5)
true if indexed, false if timeout
Clears the public key cache, or removes a specific address.