Skip to content

@armada/sdk / index / tryDecryptSentCommitment

Function: tryDecryptSentCommitment() ​

tryDecryptSentCommitment(commitment, sender, tokenDataGetter, chain?): Promise<TransactNote | undefined>

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

Sender side: recover a note WE sent from its on-chain ciphertext, using our own viewing key + the note's annotationData (only the author can decrypt it). The returned TransactNote has receiverAddressData = the RECIPIENT and outputType marking it a transfer / broadcaster fee / change. Returns undefined for commitments we did not author. Uses only the viewing key, so a view-only wallet recovers its shared identity's send history too.

Parameters ​

commitment ​

CommitmentCiphertextV2

sender ​

ReceiverNoteKeys

tokenDataGetter ​

TokenDataGetter

chain? ​

Chain = DEFAULT_EVM_CHAIN

Returns ​

Promise<TransactNote | undefined>