Cashu-TS - v4.1.0
    Preparing search index...

    DocumentsWallet EventsProof State Streams

    Proof state streams

    import { CheckStateEnum } from '@cashu/cashu-ts';
    const ac = new AbortController();
    (async () => {
    for await (const u of wallet.on.proofStatesStream(proofs, { signal: ac.signal })) {
    if (u.state === CheckStateEnum.SPENT) {
    console.log('Spent proof', u.proof.id);
    }
    }
    })();

    // later
    ac.abort();