Private preview: this is rolling out and may not be available on your account yet.
Read a spending ceiling
readScopeCeiling reads the ceiling one scope states. It works offline on the scope string alone, so you can use it on the scopes from the exchange.
max is always in the display unit of the currency: max=25¤cy=USD is 25.00 US dollars, never 25 cents. amount comes back as an exact decimal string, padded to the currency’s precision. Compare it as a decimal, never as a floating-point number.
Spending scopes belong to payments, which arrive in a fast-follow release. Identity scopes such as
sr:us:pint:sigil:proof_of_personhood state no ceiling.Read every scope
The reader handles one scope at a time. Read every scope on the mandate, not only the first.When it refuses
The reader refuses rather than guesses. It throws aScopeCeilingError whose reason is one of:
errand:search takes an optional max but names no currency, and that max is not enforced (see Scopes). A max written there has no currency to read, so the reader refuses it as missing-denomination. The ceiling that counts is on spend:visa_checkout.