owner
.uverse.addressValue
<gnolang.StringValue>
priceUsdCents
int64Value
2500
periodSec
int64Value
2592000
creditsPerUsdCent
int64Value
1600
maxTopUpUgnot
int64Value
1000000000000
quoteUgnot
int64// ugnot for one period
Value
422749053
quotedAt
int64// when it was posted
Value
1793490004
prevUgnot
int64Value
422749053
prevUntil
int64Value
1793490904
quoteTtlSec
int64Value
900
quoteGraceSec
int64Value
900
quoteGraceBand
int64Value
4
pendingOwner
.uverse.addressValue
<zero>
operator
.uverse.addressValue
<gnolang.StringValue>
subs
map[.uverse.address]int64// addr -> expiry (unix)
- OID
- 01a52d…53ae:18
subs details
credits
map[.uverse.address]int64// addr -> credit balance
- OID
- 01a52d…53ae:20
credits details
settled
map[.uverse.address]int64- OID
- 01a52d…53ae:22
settled details
Subscribe
func()Subscribe buys pro time for the caller at the live quote. Each whole quote sent buys one period; anything left over becomes units at the same rate a top-up gets, rather than being kept, so the payer keeps the value of every ugnot they sent. Every call is priced at the quote in force when it executes, so a renewal costs what a period costs today. Pinning a renewal to the price paid at first purchase is a known trap: Unlock Protocol does it and a renewal simply reverts once the price has moved.
- OID
- 01a52d…53ae:23
Subscribe details
subscribe
func(payer .uverse.address, paid int64)subscribe holds the money math, separate from the origin/caller plumbing above so it can be exercised directly (AssertOriginCall cannot be satisfied from a test frame).
- OID
- 01a52d…53ae:25
subscribe details
Login
func()Login does nothing. Sign-In-With-Gno signs (never broadcasts) a call to it so the wallet shows a "Login" to GnoPulse rather than a token transfer; the challenge nonce rides in the tx memo.
- OID
- 01a52d…53ae:26
Login details
TopUp
func()TopUp buys prepaid credits for the caller.
- OID
- 01a52d…53ae:27
TopUp details
topUp
func(payer .uverse.address, paid int64)topUp converts the payment to units at the SAME quote the subscription uses, so a credit is worth the same in dollars whatever GNOT is doing. Paying in GNOT, priced in USD.
- OID
- 01a52d…53ae:28
topUp details
unitsFor
func(paid int64, price int64) int64unitsFor converts a ugnot payment into API units at a given quote. The payment is worth paid/price of a period, a period costs priceUsdCents, and one cent buys creditsPerUsdCent units. One helper so a top-up and the change from a subscription can never diverge.
- OID
- 01a52d…53ae:29
unitsFor details
HasAccess
func(addr .uverse.address) bool- OID
- 01a52d…53ae:30
HasAccess details
TierOf
func(addr .uverse.address) string- OID
- 01a52d…53ae:31
TierOf details
CreditsOf
func(addr .uverse.address) int64- OID
- 01a52d…53ae:32
CreditsOf details
ExpiresAt
func(addr .uverse.address) int64- OID
- 01a52d…53ae:33
ExpiresAt details
SettledOf
func(addr .uverse.address) int64- OID
- 01a52d…53ae:34
SettledOf details
Owner
func() .uverse.address- OID
- 01a52d…53ae:35
Owner details
Config
func() (int64, int64, int64, int64, int64)- OID
- 01a52d…53ae:36
Config details
Consume
func(addr .uverse.address, uptoUnits int64)Consume charges an address for metered API usage, up to a cumulative cost-unit total. The owner passes the caller's running lifetime usage, not a delta: the realm keeps the watermark itself and charges only the part it has not charged before. That makes the call idempotent (a replay is rejected, not re-billed) and means a restored or rolled-back off-chain database cannot double-charge anyone. A caller with too few credits is charged what they have and the watermark still advances; the event records both what was owed and what was actually taken, so a shortfall is visible rather than silently forgiven.
- OID
- 01a52d…53ae:37
Consume details
consume
func(addr .uverse.address, uptoUnits int64)- OID
- 01a52d…53ae:38
consume details
Forgive
func(addr .uverse.address, uptoUnits int64)Forgive advances the billing watermark without charging: usage already covered by an active time-based subscription. Separate from Consume so that "we decided not to bill this" is its own auditable on-chain act rather than an invisible gap in the watermark.
- OID
- 01a52d…53ae:39
Forgive details
forgive
func(addr .uverse.address, uptoUnits int64)- OID
- 01a52d…53ae:40
forgive details
SetQuote
func(ugnotPerPeriod int64)SetQuote posts the price of one period in ugnot. Called on a short schedule by the job that already tracks the GNOT price, which converts priceUsdCents off chain and publishes only the result. The previous quote stays payable for quoteGraceSec so payments already in flight are not repriced.
- OID
- 01a52d…53ae:41
SetQuote details
setQuote
func(ugnotPerPeriod int64)- OID
- 01a52d…53ae:42
setQuote details
Quote
func() (int64, int64, int64)Quote is what the payment page reads: the amount to send for one period, and the moment it stops being honoured. Reading it from here rather than from a price feed is what makes the figure on screen and the figure charged the same number.
- OID
- 01a52d…53ae:43
Quote details
currentPrice
func() int64currentPrice is what Subscribe charges. While a superseded quote is still inside its grace window both are live, and the payer is charged the lower of the two: we cannot tell which one they were shown, and charging the lower one guarantees it is never more than they saw.
- OID
- 01a52d…53ae:44
currentPrice details
SetConfig
func(cents int64, period int64, perUsdCent int64, ttl int64, grace int64)- OID
- 01a52d…53ae:45
SetConfig details
setConfig
func(cents int64, period int64, perUsdCent int64, ttl int64, grace int64)- OID
- 01a52d…53ae:46
setConfig details
Withdraw
func(amount int64)- OID
- 01a52d…53ae:47
Withdraw details
TransferOwnership
func(newOwner .uverse.address)TransferOwnership OFFERS the realm to newOwner. It does not hand it over: the offer stands until that address claims it with AcceptOwnership. A mistyped address therefore costs nothing, where a single-step transfer would have locked every admin function and the revenue behind an address nobody holds, permanently, because the realm cannot be redeployed.
- OID
- 01a52d…53ae:48
TransferOwnership details
transferOwnership
func(newOwner .uverse.address)transferOwnership holds the offer itself, split from the owner gate above for the same reason subscribe is split from Subscribe: assertOwner cannot be satisfied from a test frame.
- OID
- 01a52d…53ae:49
transferOwnership details
CancelOwnershipTransfer
func()CancelOwnershipTransfer withdraws a standing offer.
- OID
- 01a52d…53ae:50
CancelOwnershipTransfer details
AcceptOwnership
func()AcceptOwnership completes the handover. Only the offered address can call it, which proves the key exists and can sign before anything irreversible happens.
- OID
- 01a52d…53ae:51
AcceptOwnership details
acceptOwnership
func(caller .uverse.address)- OID
- 01a52d…53ae:52
acceptOwnership details
PendingOwner
func() .uverse.address- OID
- 01a52d…53ae:53
PendingOwner details
SetOperator
func(op .uverse.address)SetOperator appoints, rotates or (with an empty address) revokes the hot role. One step, unlike TransferOwnership, and the asymmetry is deliberate: a mistyped owner is permanent and locks the revenue, while a mistyped operator only means quotes stop until the owner sets it again. Making revocation a two-step handshake would be worse than useless, since the address being revoked is the one you no longer trust to act.
- OID
- 01a52d…53ae:54
SetOperator details
setOperator
func(op .uverse.address)- OID
- 01a52d…53ae:55
setOperator details
Operator
func() .uverse.address- OID
- 01a52d…53ae:56
Operator details
assertOwner
func()assertOwner requires a DIRECT call from the owner. cur.Previous() is the immediate caller, so a relaying realm (owner -> X -> here) would fail this, no separate origin assert needed.
- OID
- 01a52d…53ae:57
assertOwner details
isOperator
func(caller .uverse.address) boolisOperator is the routine-work gate as a pure predicate, so it is unit-testable: assertOperator below cannot be satisfied from a test frame, exactly as assertOwner cannot. The owner always passes. A fresh deploy has no operator yet, so the owner must be able to post the first quote or the realm is unusable until one is appointed, and the owner must be able to take over the moment an operator is revoked.
- OID
- 01a52d…53ae:58
isOperator details
assertOperator
func()assertOperator gates the two jobs that run on a schedule. Everything that moves money or changes the terms stays behind assertOwner, including Forgive, which is the repair for an operator that over-charges and therefore must never be reachable by one.
- OID
- 01a52d…53ae:59
assertOperator details
Render
func(path string) string- OID
- 01a52d…53ae:60
Render details
usd
func(cents int64) stringusd renders cents as dollars, keeping the two decimal places (2500 -> "25.00", 2505 -> "25.05").
- OID
- 01a52d…53ae:61