hoodkit
    Preparing search index...

    Class SpendCap

    A hard cumulative spend limit in the raw units of one token. Every spending primitive here consults a SpendCap; once the cap is hit, further spends throw SpendCapExceededError rather than silently proceeding.

    Index
    cap: bigint
    • true if amount still fits under the cap.

      Parameters

      • amount: bigint

      Returns boolean

    • Reserve amount, or throw if it would breach the cap.

      Parameters

      • amount: bigint

      Returns void