Skip to content

@armada/sdk / index / tryDecryptCommitment

Function: tryDecryptCommitment()

tryDecryptCommitment(commitment, receiver, tokenDataGetter, chain?): Promise<TransactNote | undefined>

Defined in: src/sync/note-crypto.ts:142

Scan side: try to decrypt a commitment as a note received by receiver. Derives the shared key by ECDH against the blinded sender key (the mirror of the send direction), then runs the engine's V2 decrypt. Returns undefined if the commitment is not ours (shared-key or AES-GCM auth failure) — the sync engine calls this for every commitment and keeps the ones that decrypt.

Parameters

commitment

CommitmentCiphertextV2

receiver

ReceiverNoteKeys

tokenDataGetter

TokenDataGetter

chain?

Chain = DEFAULT_EVM_CHAIN

Returns

Promise<TransactNote | undefined>