Skip to content
On this page

Function: bondMeets()

TypeScript
function bondMeets(payload: SessionPayload, need: {
  maxAgeSecs?: number;
  minDays?: number;
  minSats?: number;
}): boolean;

Defined in: auth-core/src/index.ts:231 (opens in a new tab)

True when the account is backed by a coin whose floors reach minSats and minDays, and the issuer checked it within maxAgeSecs (default: no limit). Compare against the floor ladder: a minSats of 50000 is met by a sats_floor of 100000, not 10000.

ParametersLink to this section

ParameterType
payloadSessionPayload
need{ maxAgeSecs?: number; minDays?: number; minSats?: number; }
need.maxAgeSecs?number
need.minDays?number
need.minSats?number

ReturnsLink to this section

boolean