Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v0 state

Back to all declarations

pkgPath

untyped string

The paths Bolo's addresses derive from. pkgPath is this realm's own; a test checks it against the realm.

Value

"gno.land/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo/v0"

registryPath

untyped string

The paths Bolo's addresses derive from. pkgPath is this realm's own; a test checks it against the realm.

Value

"gno.land/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo"

slashedPath

untyped string

// where slashed bonds go; nothing ever spends it (INV-8)

Value

"slashed"

escrowPath

func(id v0.ID) string

escrowPath and bondPath are a campaign's sub-paths (API §1): one escrow and one bond address per campaign, so a bug in one campaign can't spend another's.

Open
OID
07094b…6d43:3
escrowPath details

Inspect func

escrowSub

func(c *v0.campaign) .uverse.realm
Open
OID
07094b…6d43:6
escrowSub details

Inspect func

bondSub

func(c *v0.campaign) .uverse.realm
Open
OID
07094b…6d43:7
bondSub details

Inspect func

escrowAddr

func(id v0.ID) .uverse.address
Open
OID
07094b…6d43:8
escrowAddr details

Inspect func

bondAddr

func(id v0.ID) .uverse.address
Open
OID
07094b…6d43:9
bondAddr details

Inspect func

slashedAddr

func() .uverse.address
Open
OID
07094b…6d43:10
slashedAddr details

Inspect func

realmAddr

func() .uverse.address
Open
OID
07094b…6d43:11
realmAddr details

Inspect func

depositAddr

func() .uverse.address
Open
OID
07094b…6d43:12
depositAddr details

Inspect func

registryAddr

func() .uverse.address
Open
OID
07094b…6d43:13
registryAddr details

Inspect func

registryDepositAddr

func() .uverse.address
Open
OID
07094b…6d43:14
registryDepositAddr details

Inspect func

adminAddr

.uverse.address

Value

<gnolang.StringValue>

assertCodeCaller

func()

assertCodeCaller refuses any caller but a deployed realm (API C11). A maketx run script is ephemeral and code at once: it is refused here, as is a user.

Open
OID
07094b…6d43:15
assertCodeCaller details

Inspect func

assertSigner

func(who .uverse.address)

assertSigner runs right after C11's branch: no session key, in either branch (C11), then the caller must be who (API §3.6).

Open
OID
07094b…6d43:17
assertSigner details

Inspect func

ProposeAdmin

func(next .uverse.address)

ProposeAdmin proposes next as the admin, who takes over by accepting. None of Bolo's own addresses can ever accept, so none can be proposed. A second proposal replaces the first.

Open
OID
07094b…6d43:18
ProposeAdmin details

Inspect func

AcceptAdmin

func()

AcceptAdmin makes the proposed admin the admin, and ends the proposal.

Open
OID
07094b…6d43:19
AcceptAdmin details

Inspect func

SetParams

func(deposit int64, dormancyDays int, exitDelayDays int, bondHoldDays int)

SetParams sets the Params new campaigns get; every live campaign keeps its own (INV-5).

Open
OID
07094b…6d43:20
SetParams details

Inspect func

SetTipRecipient

func(addr .uverse.address)

SetTipRecipient sets where tips and swept strays go: never one of Bolo's own addresses.

Open
OID
07094b…6d43:21
SetTipRecipient details

Inspect func

SetMinDonation

func(amount int64)

SetMinDonation sets the smallest gift Donate accepts, in ugnot, for new gifts.

Open
OID
07094b…6d43:22
SetMinDonation details

Inspect func

SetPresets

func(a int64, b int64, c int64, d int64)

SetPresets sets the four one-click amounts, in ugnot. Display only.

Open
OID
07094b…6d43:23
SetPresets details

Inspect func

SetEscrowCap

func(max int64)

SetEscrowCap sets the most one campaign's tracked escrow balance may reach; 0 removes the cap. It gates gifts only, never money going out (INV-4).

Open
OID
07094b…6d43:24
SetEscrowCap details

Inspect func

AddCategory

func(code string)

AddCategory adds a category. There is no remove and no rename: every campaign keeps a valid category.

Open
OID
07094b…6d43:25
AddCategory details

Inspect func

Sunset

func()

Sunset stops CreateCampaign for good. It names no successor: where new campaigns start is the registry's Current() (API §3.7). A second call changes nothing.

Open
OID
07094b…6d43:26
Sunset details

Inspect func

Pause

func()

Pause stops CreateCampaign, Donate and PostBond — money coming in, never money going out. Pausing while paused changes nothing.

Open
OID
07094b…6d43:27
Pause details

Inspect func

Unpause

func()

Unpause lifts a pause. Unpausing while running changes nothing.

Open
OID
07094b…6d43:28
Unpause details

Inspect func

checkParams

func(deposit int64, dormancyDays int, exitDelayDays int, bondHoldDays int) v0.Params

checkParams returns the Params for SetParams' arguments, or panics with ErrSetting when one is out of bounds (API §3.6). The upper bounds keep the conversion to seconds far from overflowing.

Open
OID
07094b…6d43:29
checkParams details

Inspect func

between

func(n int, min int, max int) bool
Open
OID
07094b…6d43:30
between details

Inspect func

checkPresets

func(a int64, b int64, c int64, d int64) [4]int64

checkPresets returns the four amounts, or panics with ErrSetting unless they are positive and strictly ascending (API §3.6).

Open
OID
07094b…6d43:31
checkPresets details

Inspect func

checkOutsideBolo

func(a .uverse.address)

checkOutsideBolo refuses, with ErrSetting, a malformed address (C12) and every address of Bolo's own (API §3.6): the realm's, where tips would stay (INV-3); the escrow and bond addresses derived so far, where an escrow would count tips as untracked money; slashed, where they would be burned; the storage-deposit address, the keeper's (Q8); and the registry, with its storage-deposit address. Tips must not go there, and none of them can ever accept the admin role.

Open
OID
07094b…6d43:32
checkOutsideBolo details

Inspect func

checkNewCategory

func(code string)

checkNewCategory refuses a code that isn't 3 to 20 lowercase letters, one already listed, or one past the cap (API §3.6).

Open
OID
07094b…6d43:33
checkNewCategory details

Inspect func

Close

func(id string)

Close closes campaign id to new donations. Its organizer can, at any time; anyone can, once it is past its deadline or inactive for long enough — the campaign's page says when. Closing stops gifts only: what the campaign holds still goes to the beneficiary, or back to its donors. Its branch follows state, never the caller (API §3.1, Q7). Past its deadline, Close records the close if nothing has yet, and never fails. A dormant campaign closes as dormant, whoever calls. Only an open campaign nobody else may close yet takes the organizer's branch, which checks how the call arrived (C11) before it reads who sent it.

Open
OID
07094b…6d43:34
Close details

Inspect func

closeNow

func(c *v0.campaign, reason string, by .uverse.address)

closeNow closes the open campaign c now, for reason, and takes it out of the active indexes; Closed names by, who sent the call (API §3.1, §6).

Open
OID
07094b…6d43:36
closeNow details

Inspect func

closeNotYet

untyped string

closeNotYet is CanClose's reason while only the organizer may close.

Value

"not_yet"

CanClose

func(id string, caller .uverse.address) (bool, string)

CanClose says what Close(id), sent by caller from a wallet, would do now (API §4): true, with the reason it would record — "deadline" or "dormant" for anyone, "organizer" for the organizer alone — or false, with "closed" once closed or settled, and "not\_yet" while only the organizer may close.

Open
OID
07094b…6d43:37
CanClose details

Inspect func

maxDeadlineDays

untyped bigint

maxDeadlineDays bounds how far ahead a deadline may be, so no timer computed from it can overflow (API §3.1).

Value

(3650 <untyped> bigint)

CreateCampaign

func(title string, description string, category string, imageCID string, imageAlt string, beneficiary .uverse.address, goal int64, mode string, deadline int64) string

CreateCampaign opens a campaign, which you organize, and returns its ID. Send the creation deposit with it — Bolo's "Start a campaign" link attaches it — and it comes back when the campaign completes. title and description are public, and the description may hold links, never an image. category is one of Bolo's categories. imageCID and imageAlt are a photo on IPFS and what it shows, or both empty. beneficiary is the address the money goes to, which can never change. goal is in ugnot, 0 for none. mode is "escrow" or "direct". deadline is a Unix time, 0 for none. It opens a campaign for its caller, the organizer (API §3.1). The envelope is exactly the creation deposit, which goes to the campaign's bond address: the realm keeps nothing (INV-3).

Open
OID
07094b…6d43:38
CreateCampaign details

Inspect func

checkCampaignText

func(title string, description string, imageCID string, imageAlt string) *v0.campaignText

checkCampaignText checks a campaign's text (API §2.3) and returns it normalized: the title, the story, and the photo with its description.

Open
OID
07094b…6d43:40
checkCampaignText details

Inspect func

checkCampaignTerms

func(category string, mode string, goal int64, deadline int64)

checkCampaignTerms refuses a category not listed, a mode that isn't one, a negative goal, and a deadline neither 0 nor in the future, at most maxDeadlineDays ahead (API §3.1).

Open
OID
07094b…6d43:41
checkCampaignTerms details

Inspect func

checkBeneficiary

func(b .uverse.address, id v0.ID)

checkBeneficiary refuses a malformed address (C12) and every address a campaign must never pay (API §1): the realm's, slashed, the storage-deposit address, the registry and its storage-deposit address, every escrow and bond address handed out — and those of id, the campaign about to be created, which paying itself would trap every gift.

Open
OID
07094b…6d43:42
checkBeneficiary details

Inspect func

recordDeadline

func(c *v0.campaign)

recordDeadline records a passed deadline (API §3.1): an open campaign whose deadline has passed becomes closed, at its deadline, for reason deadline, and leaves the active indexes; Closed is emitted, naming the caller there and only there. Every crossing function that takes a campaign ID calls it before any other precondition; queries and Render compute the same with effective, writing nothing.

Open
OID
07094b…6d43:43
recordDeadline details

Inspect func

addActive

func(c *v0.campaign)

addActive puts c in the two active indexes, which list the open, listed campaigns (API §2.5).

Open
OID
07094b…6d43:45
addActive details

Inspect func

dropActive

func(c *v0.campaign)

dropActive takes c out of the two active indexes (API §2.5).

Open
OID
07094b…6d43:46
dropActive details

Inspect func

Donate

func(id string, tip int64, message string, anonymous bool) string

Donate gives to campaign id, and returns your receipt's ID. Send the gift and any tip together: tip is the part of what you send that goes to Bolo, in ugnot — 0 for none. message is optional, and public. anonymous, if true, keeps your address off Bolo's pages; the chain still shows it. In a direct campaign the gift goes straight to the beneficiary; in escrow, to the campaign's escrow, until the beneficiary withdraws it. Any user, by a direct transaction, the donor being the caller (API §3.2). The envelope is the gift plus the tip. The gift goes to the beneficiary, or to the campaign's escrow, and the tip to the tip recipient: the realm keeps nothing (INV-3), and coins found there are never credited (C4).

Open
OID
07094b…6d43:47
Donate details

Inspect func

checkGift

func(c *v0.campaign, total int64, tip int64) int64

checkGift returns the gift in an envelope of total ugnot carrying tip, or panics (API §3.2), in this order: a negative tip, or nothing left for the gift; a campaign that isn't open; a paused Bolo; a gift under the minimum.

Open
OID
07094b…6d43:49
checkGift details

Inspect func

checkRoom

func(c *v0.campaign, amount int64)

checkRoom refuses a gift of amount that c can't take (API §3.2): one that would push Raised past int64, or, in escrow mode with a cap set, the tracked balance — never the bank's — past MaxEscrowBalance.

Open
OID
07094b…6d43:50
checkRoom details

Inspect func

receiptID

func(campaign v0.ID, seq v0.ID) string

receiptID is a receipt's ID: its campaign's, a slash, and its sequence number (API C9).

Open
OID
07094b…6d43:51
receiptID details

Inspect func

SweepStrays

func() int64

SweepStrays sends the coins someone sent to Bolo's own address by mistake to the tip recipient, and returns how much: anyone can. It sends the ugnot at the realm's address to the tip recipient (API §3.4). The realm holds nothing between transactions (INV-3), so all of it is strays; anyone may call, and with nothing there it sends nothing and emits nothing (Q3).

Open
OID
07094b…6d43:52
SweepStrays details

Inspect func

envelopeUgnot

func() int64

envelopeUgnot returns the ugnot attached to this call (API C3, C4): an envelope is one ugnot coin, or nothing; anything else is ErrWrongDenom. It is the one place Bolo reads OriginSend, and only user-only writes reach it: C11's keyed refusal, then AssertOriginCall, in their own body (make check). Never a write behind C11's realm branch, which a deployed realm passes with an envelope paid to itself.

Open
OID
07094b…6d43:53
envelopeUgnot details

Inspect func

Error

type

Error is the type of every failure Bolo reports (API C10, §7). Each one is a constant, never a variable another realm could reassign (C6), and its text starts with its copy key, which a client turns into a message (UI spec §8).

Value

v0.Error

ErrNotFound

v0.Error

Value

<gnolang.StringValue>

ErrNotUserCall

v0.Error

Value

<gnolang.StringValue>

ErrSessionKey

v0.Error

Value

<gnolang.StringValue>

ErrWrongDenom

v0.Error

Value

<gnolang.StringValue>

ErrBadAmount

v0.Error

Value

<gnolang.StringValue>

ErrDepositMismatch

v0.Error

Value

<gnolang.StringValue>

ErrPaused

v0.Error

Value

<gnolang.StringValue>

ErrNotOrganizer

v0.Error

Value

<gnolang.StringValue>

ErrNotBeneficiary

v0.Error

Value

<gnolang.StringValue>

ErrNotAdmin

v0.Error

Value

<gnolang.StringValue>

ErrCampaignClosed

v0.Error

Value

<gnolang.StringValue>

ErrCampaignSettled

v0.Error

Value

<gnolang.StringValue>

ErrBondSlashed

v0.Error

Value

<gnolang.StringValue>

ErrNoBond

v0.Error

Value

<gnolang.StringValue>

ErrHoldEnded

v0.Error

Value

<gnolang.StringValue>

ErrWrongMode

v0.Error

Value

<gnolang.StringValue>

ErrNothingToRefund

v0.Error

Value

<gnolang.StringValue>

ErrRefundWindowClosed

v0.Error

Value

<gnolang.StringValue>

ErrExitOpen

v0.Error

Value

<gnolang.StringValue>

ErrNotClosable

v0.Error

Value

<gnolang.StringValue>

ErrNotFinalizable

v0.Error

Value

<gnolang.StringValue>

ErrNothingToWithdraw

v0.Error

Value

<gnolang.StringValue>

ErrTitle

v0.Error

Value

<gnolang.StringValue>

ErrDescription

v0.Error

Value

<gnolang.StringValue>

ErrMessage

v0.Error

Value

<gnolang.StringValue>

ErrUpdate

v0.Error

Value

<gnolang.StringValue>

ErrNotice

v0.Error

Value

<gnolang.StringValue>

ErrImage

v0.Error

Value

<gnolang.StringValue>

ErrMarkup

v0.Error

Value

<gnolang.StringValue>

ErrBeneficiary

v0.Error

Value

<gnolang.StringValue>

ErrCategory

v0.Error

Value

<gnolang.StringValue>

ErrMode

v0.Error

Value

<gnolang.StringValue>

ErrDeadline

v0.Error

Value

<gnolang.StringValue>

ErrGoal

v0.Error

Value

<gnolang.StringValue>

ErrSetting

v0.Error

Value

<gnolang.StringValue>

ErrSunset

v0.Error

Value

<gnolang.StringValue>

ErrCapReached

v0.Error

Value

<gnolang.StringValue>

ErrBooksMismatch

v0.Error

Value

<gnolang.StringValue>

evCampaignCreated

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"CampaignCreated"

evBondPosted

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"BondPosted"

evBondReleased

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"BondReleased"

evDonated

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"Donated"

evWithdrawn

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"Withdrawn"

evRefunded

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"Refunded"

evUpdatePosted

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"UpdatePosted"

evClosed

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"Closed"

evSettled

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"Settled"

evDelisted

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"Delisted"

evRelisted

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"Relisted"

evNoticeSet

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"NoticeSet"

evStraysSwept

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"StraysSwept"

evImageHidden

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"ImageHidden"

evMessageHidden

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"MessageHidden"

evParamsChanged

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"ParamsChanged"

evAdminProposed

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"AdminProposed"

evAdminChanged

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"AdminChanged"

evPaused

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"Paused"

evUnpaused

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"Unpaused"

evTipRecipientChanged

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"TipRecipientChanged"

evMinDonationChanged

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"MinDonationChanged"

evPresetsChanged

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"PresetsChanged"

evEscrowCapChanged

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"EscrowCapChanged"

evCategoryAdded

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"CategoryAdded"

evSunset

untyped string

The events Bolo emits (API §6), for the web app's indexer. Their attributes are strings.

Value

"Sunset"

itoa

func(n int64) string

itoa formats an amount, a timestamp or a sequence number as an attribute.

Open
OID
07094b…6d43:55
itoa details

Inspect func

Finalize

func(id string)

Finalize completes closed campaign id: anyone can, once the campaign's page offers it. It returns the organizer's deposit, and sends the beneficiary the coins someone sent to the escrow outside Bolo. What donors can still reclaim stays theirs. It settles a closed campaign, and forwards what no donor is owed (API §3.4): anyone may call, with no identity. At its first call it settles the campaign; every call forwards the coins sent to the escrow outside Bolo to the beneficiary, and everything at the bond address but a bond still on hold to the organizer — the deposit, and the bond once its hold has ended. It never moves the tracked balance: that stays the donors' (INV-16).

Open
OID
07094b…6d43:57
Finalize details

Inspect func

settlement

type

settlement is what one Finalize call moves, and announces.

Value

v0.settlement

bookFinalize

func(c *v0.campaign) v0.settlement

bookFinalize checks a Finalize call on c and enters it in the books, before any coin moves (API §3.4): the first settles c, if checkFinalizable allows; every one works out what to forward, and releases a bond whose hold has ended.

Open
OID
07094b…6d43:59
bookFinalize details

Inspect func

checkFinalizable

func(c *v0.campaign)

checkFinalizable refuses c's first settlement (API §3.4), with ErrNotFinalizable, unless it is closed and its FinalizableAt has come: at once in direct mode or with no tracked balance, else once its exit window opens. The view, CanFinalize and this share one rule, finalizableAt.

Open
OID
07094b…6d43:60
checkFinalizable details

Inspect func

pending

func(c *v0.campaign) v0.settlement

pending works out what a Finalize call would move from c now, without writing: the escrow's coins above its books, to the beneficiary; the bond address's coins but a bond still on hold — not slashed, not released, its hold not ended — to the organizer, the bond itself included once its hold has ended. Books above the bank, at either address, are ErrBooksMismatch (INV-1, INV-7).

Open
OID
07094b…6d43:61
pending details

Inspect func

CanFinalize

func(id string) (bool, string)

CanFinalize says what Finalize(id) would do now (API §4), a passed deadline counted as recorded: true with "settle" for the first settlement, or "forward" on a settled campaign with something to move; false with "open", "not\_yet" while a tracked balance waits for its exit window, or "settled" with nothing to move.

Open
OID
07094b…6d43:62
CanFinalize details

Inspect func

assertCurrent

func()

assertCurrent is the first statement of every crossing function (API C2).

Open
OID
07094b…6d43:63
assertCurrent details

Inspect func

checkAddress

func(a .uverse.address, err v0.Error)

checkAddress refuses an address argument that isn't a well-formed address (API C12): exactly 40 characters, a lowercase "g" first, then IsValid(). MsgCall passes an address argument through unchecked, and a malformed one stored once would make every later send to it fail. IsValid alone also accepts an address in capitals, which the bank pays as the same account but which never equals the lowercase spelling; it refuses mixed case, so a lowercase "g" means a lowercase address. The length comes first, so IsValid only ever parses address-sized input.

Open
OID
07094b…6d43:65
checkAddress details

Inspect func

secondsPerDay

untyped bigint

Value

(86400 <untyped> bigint)

daysToSeconds

func(days int, err v0.Error) int64

daysToSeconds converts a duration in whole days to seconds, refusing a negative one and one whose seconds would overflow (API §2.3).

Open
OID
07094b…6d43:66
daysToSeconds details

Inspect func

now

func() int64

now is block time in Unix seconds (API C8).

Open
OID
07094b…6d43:67
now details

Inspect func

parseID

func(s string) (v0.ID, bool)

parseID returns the campaign ID s names, if s is canonical (API C9): the decimal form of a positive ID — digits only, no sign, no leading zero, no space. "042" names nothing, never campaign 42: one ID has one spelling, and so one set of addresses (INV-18).

Open
OID
07094b…6d43:68
parseID details

Inspect func

idString

func(id v0.ID) string

idString is the canonical decimal form of id.

Open
OID
07094b…6d43:70
idString details

Inspect func

maxPageSize

untyped bigint

Value

(50 <untyped> bigint)

idKeyLen

untyped bigint

idKeyLen is the length of a campaign's key, seqid.ID.Binary().

Value

(8 <untyped> bigint)

pageSize

func(size int) int

pageSize clamps a requested size to 1–50.

Open
OID
07094b…6d43:73
pageSize details

Inspect func

ListCampaigns

func(after string, size int, category string) ([]v0.CampaignView, string)

ListCampaigns returns the open, listed campaigns, newest first, from below after ("" for the newest), and the cursor to pass next, "" at the end; category may be "". A campaign past a deadline nobody recorded is left out (Q6). One call reads at most four times size entries, so a page can be short while the cursor isn't "".

Open
OID
07094b…6d43:75
ListCampaigns details

Inspect func

ListByOrganizer

func(addr .uverse.address, after string, size int) ([]v0.CampaignView, string)

ListByOrganizer returns the campaigns addr organizes, delisted included, newest first, from below after, and the cursor to pass next. An address is compared as given (C12).

Open
OID
07094b…6d43:76
ListByOrganizer details

Inspect func

ListByBeneficiary

func(addr .uverse.address, after string, size int) ([]v0.CampaignView, string)

ListByBeneficiary returns the campaigns naming addr as beneficiary, delisted included — the beneficiary must keep seeing them (INV-4) — newest first, from below after, and the cursor to pass next.

Open
OID
07094b…6d43:77
ListByBeneficiary details

Inspect func

ListByDonor

func(addr .uverse.address, after string, size int) ([]v0.CampaignView, string)

ListByDonor returns the campaigns addr gave to at least once without anonymity, newest first, from below after, and the cursor to pass next: a campaign where all of addr's gifts were anonymous is in no index under addr.

Open
OID
07094b…6d43:78
ListByDonor details

Inspect func

everyCampaign

func(*v0.campaign) bool
Open
OID
07094b…6d43:79
everyCampaign details

Inspect func

campaignPage

func(index *v0.Tree, prefix string, after string, size int, budget int, keep func(...)) ([]v0.CampaignView, string)

campaignPage reads index newest first: the keys under prefix — a category's or an address's range, which ends at the "/" after it, or the whole index for "" — below after's key. It reads at most budget entries, keeps size views of those keep accepts, and returns them with the ID of the last entry read when more remain, "" when the range is done. A non-canonical after is ErrNotFound (C9).

Open
OID
07094b…6d43:80
campaignPage details

Inspect func

pageOffset

func(page int, size int, n int) (int, bool)

pageOffset returns where page starts, newest first, in a tree of n entries paged by size, and false past the end. A page counts from 1; below 1 reads as 1.

Open
OID
07094b…6d43:81
pageOffset details

Inspect func

ListReceipts

func(id string, page int, size int) []v0.ReceiptView

ListReceipts returns a page of the campaign's gifts, newest first.

Open
OID
07094b…6d43:82
ListReceipts details

Inspect func

WithdrawalView

type

WithdrawalView is one payout to the beneficiary (API §2.4): its tracked amount and the coins sent outside Bolo it carried, apart.

Value

v0.WithdrawalView

ListWithdrawals

func(id string, page int, size int) []v0.WithdrawalView

ListWithdrawals returns a page of the campaign's withdrawals, newest first.

Open
OID
07094b…6d43:83
ListWithdrawals details

Inspect func

RefundView

type

RefundView is one payout to a donor (API §2.4). Donor is empty when all of that donor's gifts to the campaign were anonymous; Kind is "open" or "exit".

Value

v0.RefundView

ListRefunds

func(id string, page int, size int) []v0.RefundView

ListRefunds returns a page of the campaign's refunds, newest first.

Open
OID
07094b…6d43:84
ListRefunds details

Inspect func

UpdateView

type

UpdateView is one organizer update (API §2.4).

Value

v0.UpdateView

ListUpdates

func(id string, page int, size int) []v0.UpdateView

ListUpdates returns a page of the campaign's updates, newest first.

Open
OID
07094b…6d43:85
ListUpdates details

Inspect func

Delist

func(id string, notice string, slash bool)

Delist takes the campaign off the active lists, with a public notice, and with slash moves its bond to the slashed address, where nothing ever spends it (INV-8). Delisting again replaces the notice, and may slash a bond not yet slashed.

Open
OID
07094b…6d43:86
Delist details

Inspect func

bookSlash

func(c *v0.campaign) int64

bookSlash checks a slash of c's bond and enters it in the books, before the coins move (API §3.5), and returns what moves: the bond, never the deposit. It refuses, in order, no bond posted, a bond already slashed, a hold that has ended — once closed, BondHold after closedAt, settled or not — and a bond address holding less than the bond (INV-7).

Open
OID
07094b…6d43:88
bookSlash details

Inspect func

Relist

func(id string)

Relist puts a delisted campaign back on the lists, and into the active indexes if it is still open (API §3.5). Its notice stays, as does a slash. Relisting a listed campaign changes nothing.

Open
OID
07094b…6d43:89
Relist details

Inspect func

SetNotice

func(id string, notice string)

SetNotice attaches a public warning to the campaign without delisting it, or clears it with "" (API §3.5). An unchanged notice changes nothing.

Open
OID
07094b…6d43:90
SetNotice details

Inspect func

checkNotice

func(c *v0.campaign, notice string) string

checkNotice returns notice as SetNotice stores it (API §3.5): "" clears, except on a delisted campaign, which keeps a public reason; any other text is normalized, 1–280 characters. It panics with ErrNotice otherwise.

Open
OID
07094b…6d43:91
checkNotice details

Inspect func

HideMessage

func(id string, seq int64)

HideMessage hides one gift's message (API §3.5): visibility only. The receipt, its amount and its donor stay, and so does the stored text. Hiding a hidden message, or a receipt without one, changes nothing.

Open
OID
07094b…6d43:92
HideMessage details

Inspect func

hiderOrganizer

untyped string

Who hid a campaign's photo: ImageHidden's by (API §6).

Value

"organizer"

hiderModerator

untyped string

Who hid a campaign's photo: ImageHidden's by (API §6).

Value

"moderator"

PostBond

func(id string)

PostBond adds what you send to campaign id's bond: a stake its organizer may post, lost if Bolo's moderator delists the campaign for fraud. It is not a guarantee. The organizer only, while the campaign is open. It adds the envelope to the campaign's bond (API §3.1): its organizer only, by a direct transaction, while the campaign is open, its bond unslashed and Bolo not paused. The bond only grows, and the coins go on to the bond address: the realm keeps nothing (INV-3).

Open
OID
07094b…6d43:93
PostBond details

Inspect func

checkBond

func(c *v0.campaign, amount int64)

checkBond refuses amount as more bond for c (API §3.1), in this order: nothing sent, a campaign that isn't open, a slashed bond, a paused Bolo, and a bond that would pass int64.

Open
OID
07094b…6d43:95
checkBond details

Inspect func

assertOpen

func(c *v0.campaign)

assertOpen refuses a campaign that isn't open, by its stored status: ErrCampaignSettled once settled, ErrCampaignClosed otherwise. A passed deadline is recorded before (API §3.1).

Open
OID
07094b…6d43:96
assertOpen details

Inspect func

PostUpdate

func(id string, body string) string

PostUpdate posts an update on campaign id, shown under its story, and returns the update's number: its organizer only. body may hold links, never an image. It appends an update to the campaign (API §3.1): its organizer only, by a direct transaction, in every status and while paused. Updates are append-only, and each resets the dormancy clock.

Open
OID
07094b…6d43:97
PostUpdate details

Inspect func

HideImage

func(id string)

HideImage hides campaign id's photo, for good: its organizer can, and so can Bolo's moderator. Its organizer may, by a direct transaction, and so may the moderator, with the master key — a DAO realm, once one holds the role, through C11's realm branch (API §3.1, §3.5). The CID stays: it is a fingerprint, and never replaced. Hiding a hidden photo, or a campaign with none, changes nothing.

Open
OID
07094b…6d43:98
HideImage details

Inspect func

windowOpen

untyped string

The refund windows' names: Refund's kind, GetContribution's window (API §3.2).

Value

"open"

windowExit

untyped string

The refund windows' names: Refund's kind, GetContribution's window (API §3.2).

Value

"exit"

Withdraw

func(id string) int64

Withdraw sends everything campaign id's escrow holds to its beneficiary, and returns how much: the beneficiary only, until the exit window opens — the campaign's page says when. The beneficiary only — a user by a direct transaction, or a deployed realm, through C11's realm branch (API §3.3). The tracked part counts as Withdrawn, and only it ends the open refund window; coins sent to the escrow outside Bolo go along, recorded apart.

Open
OID
07094b…6d43:99
Withdraw details

Inspect func

bookWithdrawal

func(c *v0.campaign) *v0.withdrawal

bookWithdrawal checks a withdrawal from c and enters it in the books, before any coin moves (API §3.3): the refusals of checkWithdrawable; nothing at the escrow; INV-1. Everything at the escrow goes, the tracked part as Withdrawn — ending the open refund window only when above 0 — and the rest recorded apart. It returns the stored record.

Open
OID
07094b…6d43:101
bookWithdrawal details

Inspect func

checkWithdrawable

func(c *v0.campaign)

checkWithdrawable refuses a withdrawal from c (API §3.3), in this order: a direct campaign, a settled one, and a closed one whose exit window has opened — what is left belongs to the exit process then.

Open
OID
07094b…6d43:102
checkWithdrawable details

Inspect func

Refund

func(id string) int64

Refund gives you back, from campaign id's escrow, what you can take back now, and returns how much: your whole gift until the beneficiary first withdraws, or, once the beneficiary's window after the campaign closes has passed, your share of what they left uncollected. The campaign's page offers it when a donor can. It pays the caller back from their own contribution to the campaign (API §3.2, INV-13): a donor, by a direct transaction, while a refund window is open to them. The open window — no tracked withdrawal ever — pays everything not yet refunded.

Open
OID
07094b…6d43:103
Refund details

Inspect func

bookRefund

func(c *v0.campaign, donor .uverse.address) *v0.refund

bookRefund checks a refund of donor's contribution to c and enters it in the books, before any coin moves (API §3.2): the refusals of checkRefund, then INV-1, on the books as they stand. An exit claim freezes the pool and its base if it is the first, uses the donor's one claim, and may not exceed the tracked balance (INV-17). It returns the stored record.

Open
OID
07094b…6d43:104
bookRefund details

Inspect func

checkRefund

func(c *v0.campaign, donor .uverse.address) (*v0.contribution, string, int64)

checkRefund returns donor's contribution to c, the window Refund would use and what it would pay, or panics (API §3.2), in this order: a direct campaign; nothing to refund; no window open, a used exit claim included; an exit claim that rounds down to 0.

Open
OID
07094b…6d43:105
checkRefund details

Inspect func

refundable

func(c *v0.campaign, k *v0.contribution) (string, int64)

refundable returns the window Refund would use for k now, and what it would pay (API §3.2). The open window, while no tracked withdrawal ever happened, pays all not yet refunded. After one, the exit window opens once the campaign is closed and ExitDelay has passed, while a tracked balance is left: one claim per donor, pro-rata against the pool and base the first claim froze — or would freeze now. It reads the effective status, as GetContribution can't record a passed deadline.

Open
OID
07094b…6d43:106
refundable details

Inspect func

exitClaim

func(left int64, pool int64, base int64) int64

exitClaim is left × pool / base, rounded down (API §3.2): computed in 128 bits, as both factors fit in 63 bits but their product doesn't. A claimant's left is part of the base, so the base is above 0 and the quotient at most the pool, and Div64's own panics, keyless, can't be reached; both conditions are asserted first.

Open
OID
07094b…6d43:107
exitClaim details

Inspect func

assertBooks

func(c *v0.campaign)

assertBooks panics with ErrBooksMismatch when c's books hold more than its escrow does (INV-1). It runs before every payout from an escrow, on the books as they stand, so a bug in the books stops a payment instead of paying out coins they can't account for.

Open
OID
07094b…6d43:108
assertBooks details

Inspect func

contributionOf

func(c *v0.campaign, donor .uverse.address) *v0.contribution

contributionOf returns donor's record in c, or nil.

Open
OID
07094b…6d43:109
contributionOf details

Inspect func

ContributionView

type

ContributionView is one donor's record in one campaign (API §2.4), with what Refund would pay them now: a copy.

Value

v0.ContributionView

GetContribution

func(id string, donor .uverse.address) v0.ContributionView

GetContribution returns donor's record in campaign id (API §4): zeros and no window for an address that never gave, and no window for an exit claim that rounds to 0, which Refund refuses. An address is compared as given (C12).

Open
OID
07094b…6d43:110
GetContribution details

Inspect func

ReceiptView

type

ReceiptView is one gift, as the receipt page and the campaign page show it (API §2.4): a copy, holding nothing of the realm's state.

Value

v0.ReceiptView

GetReceipt

func(id string, seq int64) v0.ReceiptView

GetReceipt returns gift seq of campaign id (API §4): an unknown campaign or sequence number is ErrNotFound.

Open
OID
07094b…6d43:111
GetReceipt details

Inspect func

receiptOf

func(c *v0.campaign, seq int64) *v0.receipt

receiptOf returns gift seq of c, or panics with ErrNotFound.

Open
OID
07094b…6d43:113
receiptOf details

Inspect func

ListRecent

func(id string) []v0.ReceiptView

ListRecent returns the campaign's last gifts, newest first, at most recentSize (API §4): read through the ring of sequence numbers in its hot state.

Open
OID
07094b…6d43:114
ListRecent details

Inspect func

receiptView

func(c *v0.campaign, r *v0.receipt) v0.ReceiptView

receiptView builds r's view (API §2.4): the donor blanked when the gift was anonymous, the message when moderation hid it, and what this donor was refunded since, so a receipt can't vouch for money taken back (INV-12).

Open
OID
07094b…6d43:115
receiptView details

Inspect func

webPath

untyped string

// this realm on gnoweb

Value

"/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo/v0"

maxPathLen

untyped bigint

// longer than any valid path

Value

(256 <untyped> bigint)

listPage

untyped bigint

// entries a list page shows

Value

(20 <untyped> bigint)

updatesPage

untyped bigint

// updates a page shows: each can cost 0.18 billion gas to render

Value

(5 <untyped> bigint)

addressSection

untyped bigint

// entries each address-page section shows

Value

(10 <untyped> bigint)

barWide

untyped bigint

// a progress bar's width across a page, scaled down to fit

Value

(1000 <untyped> bigint)

barCard

untyped bigint

// and in a card, half a row

Value

(400 <untyped> bigint)

notFound

untyped string

Value

"# Not found\n\nThere is nothing here. [Bolo](/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo/v0)\n"

Render

func(path string) string

Render returns the markdown page for path (API §5).

Open
OID
07094b…6d43:116
Render details

Inspect func

route2page

func(route string, q map[string]string) (string, bool)

route2page renders route, or reports false when route names nothing or a value in q doesn't parse. Every prefix of a route renders a page, as gnoweb's header links each one: "c" the home page, "c/{id}/r" the gifts, "u" the form to find an address.

Open
OID
07094b…6d43:118
route2page details

Inspect func

parseQuery

func(raw string) (map[string]string, bool)

parseQuery splits a query into its key=value pairs: an empty pair is skipped, a key given twice fails. Values are taken as they are: the routes parse them.

Open
OID
07094b…6d43:119
parseQuery details

Inspect func

pageOf

func(q map[string]string, render func(...)) (string, bool)

pageOf calls render with the page q asks for, 1 when it asks none, or fails when its page isn't a canonical number of at least 1.

Open
OID
07094b…6d43:120
pageOf details

Inspect func

parsePage

func(s string) (int, bool)

parsePage parses a page number: canonical decimal — no sign, no leading zero — from 1, at most nine digits.

Open
OID
07094b…6d43:121
parsePage details

Inspect func

parseAddress

func(s string) (.uverse.address, bool)
Open
OID
07094b…6d43:122
parseAddress details

Inspect func

renderHome

func(q map[string]string) (string, bool)

renderHome is the home page: the guarantees in one line, how it works, the links to start a campaign and to find an address, the newest active campaigns in a category or all, 20 at a time by cursor, and the categories.

Open
OID
07094b…6d43:123
renderHome details

Inspect func

writeStart

func(b *strings.Builder)

writeStart writes the link to start a campaign — CreateCampaign's form, the creation deposit attached — while this version takes new campaigns, or why it doesn't; then the link to find an address.

Open
OID
07094b…6d43:124
writeStart details

Inspect func

writeCards

func(b *strings.Builder, views []v0.CampaignView)

writeCards writes campaigns as cards, two to a row in gnoweb's columns (UI spec §4.13): the title as a link, the progress bar, raised of the goal and donors, then the mode, the category, the time left or how it ended, and a bond or a moderator's notice when there is one. The one user text, the title, goes through inline, whose InlineText escapes "\<": nothing in it can open, separate or close a block. A separator is written self-closing, the spelling every gnoweb reads as one.

Open
OID
07094b…6d43:125
writeCards details

Inspect func

timeWord

func(v v0.CampaignView) string

timeWord says where a campaign stands in time, on a card: the time left, no deadline, or how it ended.

Open
OID
07094b…6d43:126
timeWord details

Inspect func

renderCampaign

func(c *v0.campaign) string

renderCampaign is a campaign's page (API §5, UI spec §4.13), Bolo's own blocks before the organizer's words: the notice, the photo, the title and byline, the figures, the mode, the state banner, the donate links, where the money is, the verification block; then the story as a quote; then the recent gifts, the latest update, and last the actions of the organizer, the beneficiary and anyone.

Open
OID
07094b…6d43:127
renderCampaign details

Inspect func

writeFigures

func(b *strings.Builder, v v0.CampaignView)

writeFigures writes the progress bar, then three figures, a short line each, which stay short on a phone: raised, of the goal; donors and gifts; the time left, or how it ended.

Open
OID
07094b…6d43:128
writeFigures details

Inspect func

writeMode

func(b *strings.Builder, v v0.CampaignView)

writeMode writes the custody mode in words and what it means now (UI spec §4.3, ModeChip), with the refund link while a refund window is open to some donor — as far as the books can tell: after every donor's exit claim, rounding can leave a few ugnot that keep the window open in the books (API §2.4, §5).

Open
OID
07094b…6d43:129
writeMode details

Inspect func

writeBanner

func(b *strings.Builder, v v0.CampaignView, space int64, dormant bool)

writeBanner writes the one state banner the UI spec's state matrix gives the campaign now (§6), as gnoweb's alert box, which no user text can open (API §5): how it was closed and what remains to happen, that it completed, that Bolo is paused, that the escrow cap leaves no room for a gift, or that anyone may close it as it is dormant. space is the room the cap leaves.

Open
OID
07094b…6d43:130
writeBanner details

Inspect func

closedText

func(v v0.CampaignView) string

closedText says how a campaign was closed and, in escrow, what remains: the beneficiary's countdown to the exit window, or the window open to donors.

Open
OID
07094b…6d43:131
closedText details

Inspect func

room

func(v v0.CampaignView) int64

room is how much more campaign v can take: what the escrow cap leaves, in escrow with a cap (checkRoom); otherwise as much as an amount can be.

Open
OID
07094b…6d43:132
room details

Inspect func

writeGive

func(b *strings.Builder, v v0.CampaignView, space int64)

writeGive writes the one-click donate links (API §5): while the campaign is open, listed and Bolo isn't paused, one per preset Donate would take — at least the smallest gift, and no more than the room the escrow cap leaves, space — then the page for another amount, with the room said when it left a preset out.

Open
OID
07094b…6d43:133
writeGive details

Inspect func

renderGive

func(c *v0.campaign, q map[string]string) string

renderGive is the page for another amount (API §5). gnoweb's function form attaches only the coins a link carries, so this page asks the amount in gnoweb's own form, which submits back as ?amount=, and answers an amount Donate would take with its one-click link. Any other amount gets the form again with what the campaign can take, echoing nothing; a campaign Bolo offers no gift link for says so.

Open
OID
07094b…6d43:135
renderGive details

Inspect func

parseGNOT

func(s string) (int64, bool)

parseGNOT parses an amount in GNOT into ugnot (API §5): digits without a sign or a leading zero, at most 12 of them, then optionally a decimal point — "." or, as a form sends a comma, "%2C" — and one to six digits; but not a comma and exactly three, which may be a thousands separator. The spaces a form sends around a value, as "+", are dropped first.

Open
OID
07094b…6d43:136
parseGNOT details

Inspect func

writeMoney

func(b *strings.Builder, v v0.CampaignView)

writeMoney writes where the money is, a table of amounts: given, then, in escrow, refunded, raised net of refunds, withdrawn and held; in direct mode, sent straight to the beneficiary.

Open
OID
07094b…6d43:137
writeMoney details

Inspect func

writeVerify

func(b *strings.Builder, v v0.CampaignView)

writeVerify writes the verification block: where to check every figure on the chain itself (UI spec §2, level 3), each address in full.

Open
OID
07094b…6d43:138
writeVerify details

Inspect func

writeManage

func(b *strings.Builder, v v0.CampaignView, anyone bool)

writeManage writes the actions of the organizer, the beneficiary and anyone, each with who may take it, when that call could succeed for someone (API §5): last, as the web app puts maintenance last (UI spec §4.3). anyone is whether CanClose lets anyone close it.

Open
OID
07094b…6d43:139
writeManage details

Inspect func

writeGift

func(b *strings.Builder, r v0.ReceiptView)

writeGift writes one gift in two lines: its amount, and its message unless moderation hid it; then who gave it — a short address linking to its page, or anonymous — when, how much its donor was refunded since (INV-12), and its receipt.

Open
OID
07094b…6d43:140
writeGift details

Inspect func

renderReceipt

func(c *v0.campaign, seq int64) string

renderReceipt is a gift's receipt: the shareable object (PRD §5). When its donor was refunded since, the refund banner comes first, so a refunded receipt never looks like a live gift (UI spec §4.5, INV-12).

Open
OID
07094b…6d43:141
renderReceipt details

Inspect func

renderDonations

func(c *v0.campaign, page int) string

renderDonations is a page of a campaign's gifts, newest first, under one line of totals.

Open
OID
07094b…6d43:142
renderDonations details

Inspect func

renderLedger

func(c *v0.campaign, page int) string

renderLedger is a page of a campaign's money out of its escrow: withdrawals, then refunds, each newest first. In direct mode, it says that nothing goes out: Withdraw and Refund refuse a direct campaign, so neither list ever holds one.

Open
OID
07094b…6d43:143
renderLedger details

Inspect func

renderUpdates

func(c *v0.campaign, page int) string

renderUpdates is a page of a campaign's updates, newest first, each as a quote.

Open
OID
07094b…6d43:144
renderUpdates details

Inspect func

empty

func(page int, first string, later string) string

empty says a page of a campaign's list has nothing on it: first on the list's first page, where it means the list is empty, later past it (API §5).

Open
OID
07094b…6d43:145
empty details

Inspect func

writePager

func(b *strings.Builder, base string, page int, size int, n int)

writePager writes links to the pages before and after page, of n entries, size a page.

Open
OID
07094b…6d43:146
writePager details

Inspect func

addressList

func(name string) (func(...), string)

addressList returns the address page's list a path segment names, and its heading; nil for any other segment. They show listed campaigns only, as they promote (API §5).

Open
OID
07094b…6d43:147
addressList details

Inspect func

renderAddress

func(addr .uverse.address) string

renderAddress is the public address page: the short address as its title and the full one under it, then the 10 newest campaigns of each list, as cards, with "More" while a list goes on.

Open
OID
07094b…6d43:148
renderAddress details

Inspect func

renderAddressList

func(addr .uverse.address, name string, heading string, list func(...), after string) string

renderAddressList is one of the address page's lists, 20 at a time by cursor.

Open
OID
07094b…6d43:149
renderAddressList details

Inspect func

writeListed

func(b *strings.Builder, views []v0.CampaignView, paged bool)

writeListed writes the cards of the listed campaigns among views: a delisted one is left out of a list that promotes. With none to show, it says so, and whether this is only one page of the list: a later one, or one a "More" follows (paged).

Open
OID
07094b…6d43:150
writeListed details

Inspect func

renderLookup

func(q map[string]string) string

renderLookup is the page that finds an address: gnoweb's form, which submits back here as ?address=. A valid address gets its page; anything else, the form again with one fixed line, echoing nothing from the request (API §5).

Open
OID
07094b…6d43:151
renderLookup details

Inspect func

renderAbout

func() string

renderAbout is the guarantees table, what Bolo costs, where tips go, how to check it, and what not to do (PRD §3, UI spec §4.11).

Open
OID
07094b…6d43:152
renderAbout details

Inspect func

renderParams

func() string

renderParams shows the parameters new campaigns get, the live settings in words, and the admin.

Open
OID
07094b…6d43:153
renderParams details

Inspect func

progressBar

func(net int64, goal int64, width int) string

progressBar draws how much of its goal a campaign raised (UI spec §5, ProgressBar): an SVG image of two numbers, which gnoweb accepts inline as a data URI, width wide. It fills min(net, goal) of goal; its text, the percentage, is uncapped. With no goal, there is no bar.

Open
OID
07094b…6d43:154
progressBar details

Inspect func

percent

func(net int64, goal int64) string

percent writes net as a share of goal, rounded down and uncapped: "124%".

Open
OID
07094b…6d43:155
percent details

Inspect func

share

func(part int64, whole int64, scale int64) int64

share is part×scale/whole rounded down, for whole > 0, and 0 for part ≤ 0: exact for any part up to math.MaxInt64/scale, past every amount of ugnot there is, and held there beyond, so the product never overflows.

Open
OID
07094b…6d43:156
share details

Inspect func

short

func(a .uverse.address) string

short shortens an address where a reader recognizes it rather than checks it: its first eight and last six characters (UI spec §4.13).

Open
OID
07094b…6d43:157
short details

Inspect func

gnot

func(ugnot int64) string

gnot writes an amount of ugnot in GNOT: up to six decimals, trailing zeros dropped.

Open
OID
07094b…6d43:159
gnot details

Inspect func

amount

func(ugnot int64) string

amount writes an amount of ugnot as a number of GNOT, for a column headed GNOT.

Open
OID
07094b…6d43:160
amount details

Inspect func

when

func(unix int64) string

when writes a Unix time in UTC.

Open
OID
07094b…6d43:161
when details

Inspect func

stamp

func(unix int64) string

stamp writes a Unix time in UTC without saying so, for a column that does.

Open
OID
07094b…6d43:162
stamp details

Inspect func

day

func(unix int64) string

day writes a Unix time's day in UTC, where the minute is written nearby: a figure's caption, under the full time in the dates line.

Open
OID
07094b…6d43:163
day details

Inspect func

left

func(until int64) string

left writes a real timer's countdown (UI spec §5, Countdown): whole days left, then "less than a day left".

Open
OID
07094b…6d43:164
left details

Inspect func

count

func(n int, one string, many string) string

count writes n of something: one, or many.

Open
OID
07094b…6d43:165
count details

Inspect func

days

func(seconds int64) string

days writes a duration in seconds as whole days.

Open
OID
07094b…6d43:166
days details

Inspect func

statusWord

func(status string) string

statusWord names a status in the UI spec's words (§8.1).

Open
OID
07094b…6d43:167
statusWord details

Inspect func

modeWord

func(mode string) string

modeWord names a custody mode in the UI spec's words (§8.1).

Open
OID
07094b…6d43:168
modeWord details

Inspect func

inline

func(s string) string

inline escapes text for an inline slot: sanitize.InlineText, which leaves no link and no image, then the mentions gnoweb would still make links of — "@name", and an address after a space — each to a page whose owner writes it (API §5). A backslash keeps "@" as it reads; a no-break space looks like the space it replaces.

Open
OID
07094b…6d43:169
inline details

Inspect func

lineStart

func(s string) string

lineStart escapes text for an inline slot that opens a line — the title's heading, the notice's line — where gnoweb also links an address with nothing before it: "&#103;" reads as the "g" it replaces. Only there: gnoweb's table of contents shows a card's heading as written, and a card's title sits in a link's text, where gnoweb makes no mention (API §5).

Open
OID
07094b…6d43:170
lineStart details

Inspect func

launchDeposit

int64

// ugnot

Value

1000000

launchDormancy

int64

Phase 0's values (API §2.2): placeholders for the deposit, the minimum donation and the escrow cap, whose launch values API §2.2 proposes, and the three durations it proposes. All are settled before Phase 1 (README), and only the admin changes them afterwards.

Value

7776000

launchExitDelay

int64

Phase 0's values (API §2.2): placeholders for the deposit, the minimum donation and the escrow cap, whose launch values API §2.2 proposes, and the three durations it proposes. All are settled before Phase 1 (README), and only the admin changes them afterwards.

Value

5184000

launchBondHold

int64

Phase 0's values (API §2.2): placeholders for the deposit, the minimum donation and the escrow cap, whose launch values API §2.2 proposes, and the three durations it proposes. All are settled before Phase 1 (README), and only the admin changes them afterwards.

Value

2592000

launchMinDonation

int64

// ugnot, a placeholder

Value

1000000

launchEscrowCap

int64

// ugnot (1,000 GNOT), a placeholder

Value

1000000000

maxCategories

untyped bigint

Phase 0's values (API §2.2): placeholders for the deposit, the minimum donation and the escrow cap, whose launch values API §2.2 proposes, and the three durations it proposes. All are settled before Phase 1 (README), and only the admin changes them afterwards.

Value

(50 <untyped> bigint)

admin

.uverse.address

// a realm once a DAO accepts the role (ADR D11)

Value

<gnolang.StringValue>

pendingAdmin

.uverse.address

// the proposed admin until it accepts; "" for none

Value

<zero>

params

v0.Params

The admin and the settings only it changes (API §2.2, §3.6). Package state, all unexported (C6).

Open
OID
07094b…6d43:174
params details

Inspect ref

presets

[4]int64

The admin and the settings only it changes (API §2.2, §3.6). Package state, all unexported (C6).

Open
OID
07094b…6d43:176
presets details

Inspect array

minDonation

int64

The admin and the settings only it changes (API §2.2, §3.6). Package state, all unexported (C6).

Value

1000000

escrowCap

int64

// 0: no cap

Value

1000000000

tipRecipient

.uverse.address

The admin and the settings only it changes (API §2.2, §3.6). Package state, all unexported (C6).

Value

<gnolang.StringValue>

paused

bool

The admin and the settings only it changes (API §2.2, §3.6). Package state, all unexported (C6).

Value

false

sunset

bool

The admin and the settings only it changes (API §2.2, §3.6). Package state, all unexported (C6).

Value

false

categories

v0.Tree

// code → true

Open
OID
07094b…6d43:183
categories details

Inspect ref

categoryOrder

[]string (len=16)

The admin and the settings only it changes (API §2.2, §3.6). Package state, all unexported (C6).

Open
OID
07094b…6d43:185
categoryOrder details (len=16)

+16 more Inspect slice

SettingsView

type

SettingsView is the live settings (API §2.4): a copy, holding nothing of the realm's state.

Value

v0.SettingsView

GetParams

func() v0.Params

GetParams returns the Params a campaign created now would get (API §4).

Open
OID
07094b…6d43:186
GetParams details

Inspect func

GetSettings

func() v0.SettingsView

GetSettings returns the live settings (API §4).

Open
OID
07094b…6d43:188
GetSettings details

Inspect func

GetAdmin

func() (.uverse.address, .uverse.address)

GetAdmin returns the admin and the proposed admin, "" when there is none (API §4).

Open
OID
07094b…6d43:189
GetAdmin details

Inspect func

Params

type

Params are the settings snapshotted into each campaign when it is created (API §2.2): its deposit and its timers never change afterwards (INV-5). Durations are in seconds.

Value

v0.Params

modeDirect

untyped string

Custody modes, statuses and close reasons (API §2.1).

Value

"direct"

modeEscrow

untyped string

Custody modes, statuses and close reasons (API §2.1).

Value

"escrow"

statusOpen

untyped string

Custody modes, statuses and close reasons (API §2.1).

Value

"open"

statusClosed

untyped string

Custody modes, statuses and close reasons (API §2.1).

Value

"closed"

statusSettled

untyped string

Custody modes, statuses and close reasons (API §2.1).

Value

"settled"

reasonOrganizer

untyped string

Custody modes, statuses and close reasons (API §2.1).

Value

"organizer"

reasonDeadline

untyped string

Custody modes, statuses and close reasons (API §2.1).

Value

"deadline"

reasonDormant

untyped string

Custody modes, statuses and close reasons (API §2.1).

Value

"dormant"

campaign

type

campaign holds what never changes once a campaign is created (INV-10), and points to what does. Gno re-saves a changed object and every object that owns it, up to the first with two owners, so each donation re-saves this object with its hot state and its trees: it holds only small fields, and the organizer's text lives in its own object, written once (API §2.5).

Value

v0.campaign

campaignText

type

campaignText is what the organizer wrote, which never changes (INV-10): written once, off the path every donation re-saves.

Value

v0.campaignText

recentSize

untyped bigint

Value

(20 <untyped> bigint)

campaignState

type

campaignState is a campaign's hot object: small, rewritten on every donation.

Value

v0.campaignState

contribution

type

contribution is one donor's record in one campaign (API §3.2).

Value

v0.contribution

receipt

type

receipt is one donation.

Value

v0.receipt

withdrawal

type

withdrawal is one payout to the beneficiary.

Value

v0.withdrawal

refund

type

refund is one payout to a donor.

Value

v0.refund

update

type

update is one organizer update: append-only.

Value

v0.update

nextID

v0.ID

// the last campaign ID given out

Value

<zero>

campaigns

v0.Tree

// seqid.Binary() → \*campaign

Open
OID
07094b…6d43:192
campaigns details

Inspect ref

derived

v0.Tree

// address → true

Open
OID
07094b…6d43:194
derived details

Inspect ref

active

v0.Tree

// seqid.Binary() → true: the open, listed campaigns

Open
OID
07094b…6d43:196
active details

Inspect ref

activeByCategory

v0.Tree

// category + "/" + seqid.Binary() → true: the same

Open
OID
07094b…6d43:198
activeByCategory details

Inspect ref

byOrganizer

v0.Tree

// organizer + "/" + seqid.Binary() → true

Open
OID
07094b…6d43:200
byOrganizer details

Inspect ref

byBeneficiary

v0.Tree

// beneficiary + "/" + seqid.Binary() → true

Open
OID
07094b…6d43:202
byBeneficiary details

Inspect ref

byDonor

v0.Tree

// donor + "/" + seqid.Binary() → true: a gift that wasn't anonymous

Open
OID
07094b…6d43:204
byDonor details

Inspect ref

statsState

type

statsState holds Bolo-wide counters (API §2.4), kept as things happen, never by walking the campaigns. Gift and refund totals aren't kept: an indexer sums them.

Value

v0.statsState

StatsView

type

StatsView is what GetStats returns (API §2.4).

Value

v0.StatsView

GetStats

func() v0.StatsView

GetStats returns Bolo-wide figures (API §4). Open counts a campaign past a deadline nobody recorded until someone does (§3.1).

Open
OID
07094b…6d43:207
GetStats details

Inspect func

titleMin

untyped bigint

Text limits in characters — Unicode code points — after normalization (API §2.3). Every text also has a byte cap of four times its character limit, on the argument as sent.

Value

(4 <untyped> bigint)

titleMax

untyped bigint

Text limits in characters — Unicode code points — after normalization (API §2.3). Every text also has a byte cap of four times its character limit, on the argument as sent.

Value

(80 <untyped> bigint)

descriptionMax

untyped bigint

Text limits in characters — Unicode code points — after normalization (API §2.3). Every text also has a byte cap of four times its character limit, on the argument as sent.

Value

(5000 <untyped> bigint)

messageMax

untyped bigint

Text limits in characters — Unicode code points — after normalization (API §2.3). Every text also has a byte cap of four times its character limit, on the argument as sent.

Value

(140 <untyped> bigint)

updateMin

untyped bigint

Text limits in characters — Unicode code points — after normalization (API §2.3). Every text also has a byte cap of four times its character limit, on the argument as sent.

Value

(1 <untyped> bigint)

updateMax

untyped bigint

Text limits in characters — Unicode code points — after normalization (API §2.3). Every text also has a byte cap of four times its character limit, on the argument as sent.

Value

(2000 <untyped> bigint)

noticeMin

untyped bigint

Text limits in characters — Unicode code points — after normalization (API §2.3). Every text also has a byte cap of four times its character limit, on the argument as sent.

Value

(1 <untyped> bigint)

noticeMax

untyped bigint

Text limits in characters — Unicode code points — after normalization (API §2.3). Every text also has a byte cap of four times its character limit, on the argument as sent.

Value

(280 <untyped> bigint)

altMin

untyped bigint

Text limits in characters — Unicode code points — after normalization (API §2.3). Every text also has a byte cap of four times its character limit, on the argument as sent.

Value

(1 <untyped> bigint)

altMax

untyped bigint

Text limits in characters — Unicode code points — after normalization (API §2.3). Every text also has a byte cap of four times its character limit, on the argument as sent.

Value

(250 <untyped> bigint)

cidMaxBytes

untyped bigint

Text limits in characters — Unicode code points — after normalization (API §2.3). Every text also has a byte cap of four times its character limit, on the argument as sent.

Value

(100 <untyped> bigint)

normalize

func(s string, multiline bool) string

normalize prepares user text for checking and storing (API C7, §2.3). Bidi and zero-width characters go first, through the very function sanitize.Block calls when it renders, so that no check can be dodged by what rendering removes. Line breaks are unified — CR-LF, CR, NEL and the Unicode line and paragraph separators all become "\\n" — and kept in multiline text; elsewhere they become a space. Tabs and the other whitespace controls (a vertical tab, a form feed, the information separators) become a space everywhere, so words never join. Then every character that only pads a text goes (invisible), and surrounding whitespace is trimmed. Stripping more than Block does only makes the checks stricter, and the stripped text is what gets stored.

Open
OID
07094b…6d43:209
normalize details

Inspect func

invisible

func(r int32) bool

invisible reports whether r shows nothing and only pads a text: a control or a format character (Unicode Cc, Cf: a word joiner, a soft hyphen), one Unicode lists as Other\_Default\_Ignorable\_Code\_Point (a Hangul filler, the combining grapheme joiner), or a blank symbol (the Braille blank, the musical null notehead). A Latin-1 character skips the tables, which are costly and which English or French text seldom leaves: of them, only the controls and the soft hyphen are invisible (TestLatin1 holds this to the tables). Every control is Latin-1.

Open
OID
07094b…6d43:211
invisible details

Inspect func

checkText

func(s string, min int, max int, multiline bool, err v0.Error) string

checkText checks one text argument and returns it normalized, the form Bolo stores (API §2.3): valid UTF-8 and at most four bytes per allowed character as sent; then, normalized, at most max characters, of which at least min show on their own. It panics with err otherwise.

Open
OID
07094b…6d43:212
checkText details

Inspect func

visible

func(s string, min int) bool

visible reports whether at least min characters of s show on their own — letters, digits, punctuation, symbols and spacing marks — counting the spaces between two of them. A mark that takes no space (an accent, a variation selector) only changes the character before it, a private-use character or a code point Unicode hasn't assigned shows nothing a reader can count on, and a space shows only between characters that do. They all stay in the text, but don't count toward a minimum. Latin-1 skips the tables, as in invisible: there, every character shows on its own but the controls, the soft hyphen and the two spaces, ' ' and U+00A0. Counting stops once min characters have shown, so a long text pays the tables only until then, and a story, whose minimum is 0, never.

Open
OID
07094b…6d43:213
visible details

Inspect func

checkStory

func(s string, min int, max int, err v0.Error) string

checkStory checks a story or an update, the organizer's own text, and returns it normalized (API §2.3): the limits of checkText, then no image and no raw HTML, judged on the normalized text that sanitize.Block will render.

Open
OID
07094b…6d43:214
checkStory details

Inspect func

checkMarkup

func(s string)

checkMarkup refuses an image or raw HTML (API §2.3): \`!\[\`, or \`\<\` followed by a letter, \`/\`, \`!\` or \`?\` — every way CommonMark opens raw HTML. The campaign photo is the only image a campaign shows, and \`\<3\` still passes.

Open
OID
07094b…6d43:215
checkMarkup details

Inspect func

checkImage

func(cid string, alt string) (string, string)

checkImage checks a campaign photo's CID and its description (API §2.3, ADR D16), and returns both, the description normalized: no photo, no description; a photo, a description of 1 to 250 characters.

Open
OID
07094b…6d43:216
checkImage details

Inspect func

validCID

func(s string) bool

validCID reports whether s has the shape of an IPFS CID Bolo accepts: v0, "Qm" and 44 more base58btc characters; or v1 in lowercase base32, "b" then that alphabet; at most 100 bytes. Render writes the CID into \`(ipfs://…)\` as it is, so the character set is the escaping (API §2.3).

Open
OID
07094b…6d43:217
validCID details

Inspect func

base58btc

untyped string

Value

"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"

base32Lower

untyped string

Value

"abcdefghijklmnopqrstuvwxyz234567"

allIn

func(s string, set string) bool
Open
OID
07094b…6d43:218
allIn details

Inspect func

CampaignView

type

CampaignView is a campaign as clients see it (API §2.4): a copy, holding nothing of the realm's state, its derived fields computed at now without writing.

Value

v0.CampaignView

GetCampaign

func(id string) v0.CampaignView

GetCampaign returns campaign id's view (API §4). An unknown or non-canonical ID is ErrNotFound (C9).

Open
OID
07094b…6d43:219
GetCampaign details

Inspect func

campaignOf

func(id string) *v0.campaign

campaignOf returns the campaign id names, or panics with ErrNotFound (C9).

Open
OID
07094b…6d43:221
campaignOf details

Inspect func

lookup

func(id string) (*v0.campaign, bool)

lookup returns the campaign id names, if id is canonical and the campaign exists.

Open
OID
07094b…6d43:222
lookup details

Inspect func

effective

func(c *v0.campaign) (status string, reason string, closedAt int64)

effective returns c's status, close reason and close time at now, counting a passed deadline as recorded (API §2.4, §3.1), without writing.

Open
OID
07094b…6d43:223
effective details

Inspect func

trackedBalance

func(c *v0.campaign) int64

trackedBalance is what the books say the escrow holds (API §2.4): 0 in direct mode.

Open
OID
07094b…6d43:224
trackedBalance details

Inspect func

campaignView

func(c *v0.campaign) v0.CampaignView

campaignView builds c's view at now (API §2.4).

Open
OID
07094b…6d43:225
campaignView details

Inspect func

dormantAt

func(c *v0.campaign) int64

dormantAt is when anyone may close c for dormancy: its last activity plus its snapshot's dormancy period (API §3.1).

Open
OID
07094b…6d43:226
dormantAt details

Inspect func

lastActivity

func(c *v0.campaign) int64

lastActivity is the latest of c's creation, its last gift and its last update: dormancy counts from it (API §3.1).

Open
OID
07094b…6d43:227
lastActivity details

Inspect func

finalizableAt

func(c *v0.campaign, closedAt int64, balance int64) int64

finalizableAt is when Finalize first succeeds for c closed at closedAt (API §2.4, §3.4): at once in direct mode or with nothing tracked, else once the exit opens.

Open
OID
07094b…6d43:228
finalizableAt details

Inspect func
pkgPath : untyped string ="gno.land/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo/v0"
registryPath : untyped string ="gno.land/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo"
slashedPath : untyped string ="slashed"
escrowPath : func(id v0.ID) string Inspect
bondPath : func(id v0.ID) string Inspect
escrowSub : func(c *v0.campaign) .uverse.realm Inspect
bondSub : func(c *v0.campaign) .uverse.realm Inspect
escrowAddr : func(id v0.ID) .uverse.address Inspect
bondAddr : func(id v0.ID) .uverse.address Inspect
slashedAddr : func() .uverse.address Inspect
realmAddr : func() .uverse.address Inspect
depositAddr : func() .uverse.address Inspect
registryAddr : func() .uverse.address Inspect
registryDepositAddr : func() .uverse.address Inspect
adminAddr : .uverse.address =<gnolang.StringValue>
assertCodeCaller : func() Inspect
assertSigner : func(who .uverse.address) Inspect
ProposeAdmin : func(next .uverse.address) Inspect
AcceptAdmin : func() Inspect
SetParams : func(deposit int64, dormancyDays int, exitDelayDays int, bondHoldDays int) Inspect
SetTipRecipient : func(addr .uverse.address) Inspect
SetMinDonation : func(amount int64) Inspect
SetPresets : func(a int64, b int64, c int64, d int64) Inspect
SetEscrowCap : func(max int64) Inspect
AddCategory : func(code string) Inspect
Sunset : func() Inspect
Pause : func() Inspect
Unpause : func() Inspect
checkParams : func(deposit int64, dormancyDays int, exitDelayDays int, bondHoldDays int) v0.Params Inspect
between : func(n int, min int, max int) bool Inspect
checkPresets : func(a int64, b int64, c int64, d int64) [4]int64 Inspect
checkOutsideBolo : func(a .uverse.address) Inspect
checkNewCategory : func(code string) Inspect
Close : func(id string) Inspect
closeNow : func(c *v0.campaign, reason string, by .uverse.address) Inspect
closeNotYet : untyped string ="not_yet"
CanClose : func(id string, caller .uverse.address) (bool, string) Inspect
maxDeadlineDays : untyped bigint =(3650 <untyped> bigint)
CreateCampaign : func(title string, description string, category string, imageCID string, imageAlt string, beneficiary .uverse.address, goal int64, mode string, deadline int64) string Inspect
checkCampaignText : func(title string, description string, imageCID string, imageAlt string) *v0.campaignText Inspect
checkCampaignTerms : func(category string, mode string, goal int64, deadline int64) Inspect
checkBeneficiary : func(b .uverse.address, id v0.ID) Inspect
recordDeadline : func(c *v0.campaign) Inspect
addActive : func(c *v0.campaign) Inspect
dropActive : func(c *v0.campaign) Inspect
Donate : func(id string, tip int64, message string, anonymous bool) string Inspect
checkGift : func(c *v0.campaign, total int64, tip int64) int64 Inspect
checkRoom : func(c *v0.campaign, amount int64) Inspect
receiptID : func(campaign v0.ID, seq v0.ID) string Inspect
SweepStrays : func() int64 Inspect
envelopeUgnot : func() int64 Inspect
Error : type =v0.Error
ErrNotFound : v0.Error =<gnolang.StringValue>
ErrNotUserCall : v0.Error =<gnolang.StringValue>
ErrSessionKey : v0.Error =<gnolang.StringValue>
ErrWrongDenom : v0.Error =<gnolang.StringValue>
ErrBadAmount : v0.Error =<gnolang.StringValue>
ErrDepositMismatch : v0.Error =<gnolang.StringValue>
ErrPaused : v0.Error =<gnolang.StringValue>
ErrNotOrganizer : v0.Error =<gnolang.StringValue>
ErrNotBeneficiary : v0.Error =<gnolang.StringValue>
ErrNotAdmin : v0.Error =<gnolang.StringValue>
ErrCampaignClosed : v0.Error =<gnolang.StringValue>
ErrCampaignSettled : v0.Error =<gnolang.StringValue>
ErrBondSlashed : v0.Error =<gnolang.StringValue>
ErrNoBond : v0.Error =<gnolang.StringValue>
ErrHoldEnded : v0.Error =<gnolang.StringValue>
ErrWrongMode : v0.Error =<gnolang.StringValue>
ErrNothingToRefund : v0.Error =<gnolang.StringValue>
ErrRefundWindowClosed : v0.Error =<gnolang.StringValue>
ErrExitOpen : v0.Error =<gnolang.StringValue>
ErrNotClosable : v0.Error =<gnolang.StringValue>
ErrNotFinalizable : v0.Error =<gnolang.StringValue>
ErrNothingToWithdraw : v0.Error =<gnolang.StringValue>
ErrTitle : v0.Error =<gnolang.StringValue>
ErrDescription : v0.Error =<gnolang.StringValue>
ErrMessage : v0.Error =<gnolang.StringValue>
ErrUpdate : v0.Error =<gnolang.StringValue>
ErrNotice : v0.Error =<gnolang.StringValue>
ErrImage : v0.Error =<gnolang.StringValue>
ErrMarkup : v0.Error =<gnolang.StringValue>
ErrBeneficiary : v0.Error =<gnolang.StringValue>
ErrCategory : v0.Error =<gnolang.StringValue>
ErrMode : v0.Error =<gnolang.StringValue>
ErrDeadline : v0.Error =<gnolang.StringValue>
ErrGoal : v0.Error =<gnolang.StringValue>
ErrSetting : v0.Error =<gnolang.StringValue>
ErrSunset : v0.Error =<gnolang.StringValue>
ErrCapReached : v0.Error =<gnolang.StringValue>
ErrBooksMismatch : v0.Error =<gnolang.StringValue>
evCampaignCreated : untyped string ="CampaignCreated"
evBondPosted : untyped string ="BondPosted"
evBondReleased : untyped string ="BondReleased"
evDonated : untyped string ="Donated"
evWithdrawn : untyped string ="Withdrawn"
evRefunded : untyped string ="Refunded"
evUpdatePosted : untyped string ="UpdatePosted"
evClosed : untyped string ="Closed"
evSettled : untyped string ="Settled"
evDelisted : untyped string ="Delisted"
evRelisted : untyped string ="Relisted"
evNoticeSet : untyped string ="NoticeSet"
evStraysSwept : untyped string ="StraysSwept"
evImageHidden : untyped string ="ImageHidden"
evMessageHidden : untyped string ="MessageHidden"
evParamsChanged : untyped string ="ParamsChanged"
evAdminProposed : untyped string ="AdminProposed"
evAdminChanged : untyped string ="AdminChanged"
evPaused : untyped string ="Paused"
evUnpaused : untyped string ="Unpaused"
evTipRecipientChanged : untyped string ="TipRecipientChanged"
evMinDonationChanged : untyped string ="MinDonationChanged"
evPresetsChanged : untyped string ="PresetsChanged"
evEscrowCapChanged : untyped string ="EscrowCapChanged"
evCategoryAdded : untyped string ="CategoryAdded"
evSunset : untyped string ="Sunset"
itoa : func(n int64) string Inspect
Finalize : func(id string) Inspect
settlement : type =v0.settlement
bookFinalize : func(c *v0.campaign) v0.settlement Inspect
checkFinalizable : func(c *v0.campaign) Inspect
pending : func(c *v0.campaign) v0.settlement Inspect
CanFinalize : func(id string) (bool, string) Inspect
assertCurrent : func() Inspect
checkAddress : func(a .uverse.address, err v0.Error) Inspect
secondsPerDay : untyped bigint =(86400 <untyped> bigint)
daysToSeconds : func(days int, err v0.Error) int64 Inspect
now : func() int64 Inspect
parseID : func(s string) (v0.ID, bool) Inspect
idString : func(id v0.ID) string Inspect
init.130 : func() Inspect
maxPageSize : untyped bigint =(50 <untyped> bigint)
idKeyLen : untyped bigint =(8 <untyped> bigint)
pageSize : func(size int) int Inspect
ListCampaigns : func(after string, size int, category string) ([]v0.CampaignView, string) Inspect
ListByOrganizer : func(addr .uverse.address, after string, size int) ([]v0.CampaignView, string) Inspect
ListByBeneficiary : func(addr .uverse.address, after string, size int) ([]v0.CampaignView, string) Inspect
ListByDonor : func(addr .uverse.address, after string, size int) ([]v0.CampaignView, string) Inspect
everyCampaign : func(*v0.campaign) bool Inspect
campaignPage : func(index *v0.Tree, prefix string, after string, size int, budget int, keep func(...)) ([]v0.CampaignView, string) Inspect
pageOffset : func(page int, size int, n int) (int, bool) Inspect
ListReceipts : func(id string, page int, size int) []v0.ReceiptView Inspect
WithdrawalView : type =v0.WithdrawalView
ListWithdrawals : func(id string, page int, size int) []v0.WithdrawalView Inspect
RefundView : type =v0.RefundView
ListRefunds : func(id string, page int, size int) []v0.RefundView Inspect
UpdateView : type =v0.UpdateView
ListUpdates : func(id string, page int, size int) []v0.UpdateView Inspect
Delist : func(id string, notice string, slash bool) Inspect
bookSlash : func(c *v0.campaign) int64 Inspect
Relist : func(id string) Inspect
SetNotice : func(id string, notice string) Inspect
checkNotice : func(c *v0.campaign, notice string) string Inspect
HideMessage : func(id string, seq int64) Inspect
hiderOrganizer : untyped string ="organizer"
hiderModerator : untyped string ="moderator"
PostBond : func(id string) Inspect
checkBond : func(c *v0.campaign, amount int64) Inspect
assertOpen : func(c *v0.campaign) Inspect
PostUpdate : func(id string, body string) string Inspect
HideImage : func(id string) Inspect
windowOpen : untyped string ="open"
windowExit : untyped string ="exit"
Withdraw : func(id string) int64 Inspect
bookWithdrawal : func(c *v0.campaign) *v0.withdrawal Inspect
checkWithdrawable : func(c *v0.campaign) Inspect
Refund : func(id string) int64 Inspect
bookRefund : func(c *v0.campaign, donor .uverse.address) *v0.refund Inspect
checkRefund : func(c *v0.campaign, donor .uverse.address) (*v0.contribution, string, int64) Inspect
refundable : func(c *v0.campaign, k *v0.contribution) (string, int64) Inspect
exitClaim : func(left int64, pool int64, base int64) int64 Inspect
assertBooks : func(c *v0.campaign) Inspect
contributionOf : func(c *v0.campaign, donor .uverse.address) *v0.contribution Inspect
ContributionView : type =v0.ContributionView
GetContribution : func(id string, donor .uverse.address) v0.ContributionView Inspect
ReceiptView : type =v0.ReceiptView
GetReceipt : func(id string, seq int64) v0.ReceiptView Inspect
receiptOf : func(c *v0.campaign, seq int64) *v0.receipt Inspect
ListRecent : func(id string) []v0.ReceiptView Inspect
receiptView : func(c *v0.campaign, r *v0.receipt) v0.ReceiptView Inspect
webPath : untyped string ="/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo/v0"
maxPathLen : untyped bigint =(256 <untyped> bigint)
listPage : untyped bigint =(20 <untyped> bigint)
updatesPage : untyped bigint =(5 <untyped> bigint)
addressSection : untyped bigint =(10 <untyped> bigint)
barWide : untyped bigint =(1000 <untyped> bigint)
barCard : untyped bigint =(400 <untyped> bigint)
notFound : untyped string ="# Not found\n\nThere is nothing here. [Bolo](/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo/v0)\n"
Render : func(path string) string Inspect
route2page : func(route string, q map[string]string) (string, bool) Inspect
parseQuery : func(raw string) (map[string]string, bool) Inspect
pageOf : func(q map[string]string, render func(...)) (string, bool) Inspect
parsePage : func(s string) (int, bool) Inspect
parseAddress : func(s string) (.uverse.address, bool) Inspect
renderHome : func(q map[string]string) (string, bool) Inspect
writeStart : func(b *strings.Builder) Inspect
writeCards : func(b *strings.Builder, views []v0.CampaignView) Inspect
timeWord : func(v v0.CampaignView) string Inspect
renderCampaign : func(c *v0.campaign) string Inspect
writeFigures : func(b *strings.Builder, v v0.CampaignView) Inspect
writeMode : func(b *strings.Builder, v v0.CampaignView) Inspect
writeBanner : func(b *strings.Builder, v v0.CampaignView, space int64, dormant bool) Inspect
closedText : func(v v0.CampaignView) string Inspect
room : func(v v0.CampaignView) int64 Inspect
writeGive : func(b *strings.Builder, v v0.CampaignView, space int64) Inspect
renderGive : func(c *v0.campaign, q map[string]string) string Inspect
parseGNOT : func(s string) (int64, bool) Inspect
writeMoney : func(b *strings.Builder, v v0.CampaignView) Inspect
writeVerify : func(b *strings.Builder, v v0.CampaignView) Inspect
writeManage : func(b *strings.Builder, v v0.CampaignView, anyone bool) Inspect
writeGift : func(b *strings.Builder, r v0.ReceiptView) Inspect
renderReceipt : func(c *v0.campaign, seq int64) string Inspect
renderDonations : func(c *v0.campaign, page int) string Inspect
renderLedger : func(c *v0.campaign, page int) string Inspect
renderUpdates : func(c *v0.campaign, page int) string Inspect
empty : func(page int, first string, later string) string Inspect
writePager : func(b *strings.Builder, base string, page int, size int, n int) Inspect
addressList : func(name string) (func(...), string) Inspect
renderAddress : func(addr .uverse.address) string Inspect
renderAddressList : func(addr .uverse.address, name string, heading string, list func(...), after string) string Inspect
writeListed : func(b *strings.Builder, views []v0.CampaignView, paged bool) Inspect
renderLookup : func(q map[string]string) string Inspect
renderAbout : func() string Inspect
renderParams : func() string Inspect
progressBar : func(net int64, goal int64, width int) string Inspect
percent : func(net int64, goal int64) string Inspect
share : func(part int64, whole int64, scale int64) int64 Inspect
short : func(a .uverse.address) string Inspect
gnot : func(ugnot int64) string Inspect
amount : func(ugnot int64) string Inspect
when : func(unix int64) string Inspect
stamp : func(unix int64) string Inspect
day : func(unix int64) string Inspect
left : func(until int64) string Inspect
count : func(n int, one string, many string) string Inspect
days : func(seconds int64) string Inspect
statusWord : func(status string) string Inspect
modeWord : func(mode string) string Inspect
inline : func(s string) string Inspect
lineStart : func(s string) string Inspect
launchDeposit : int64 =1000000
launchDormancy : int64 =7776000
launchExitDelay : int64 =5184000
launchBondHold : int64 =2592000
launchMinDonation : int64 =1000000
launchEscrowCap : int64 =1000000000
maxCategories : untyped bigint =(50 <untyped> bigint)
admin : .uverse.address =<gnolang.StringValue>
pendingAdmin : .uverse.address =<zero>
params : v0.Params Inspect
presets : [4]int64 Inspect
minDonation : int64 =1000000
escrowCap : int64 =1000000000
tipRecipient : .uverse.address =<gnolang.StringValue>
paused : bool =false
sunset : bool =false
categories : v0.Tree Inspect
categoryOrder : []string (len=16) Inspect
SettingsView : type =v0.SettingsView
GetParams : func() v0.Params Inspect
GetSettings : func() v0.SettingsView Inspect
GetAdmin : func() (.uverse.address, .uverse.address) Inspect
Params : type =v0.Params
modeDirect : untyped string ="direct"
modeEscrow : untyped string ="escrow"
statusOpen : untyped string ="open"
statusClosed : untyped string ="closed"
statusSettled : untyped string ="settled"
reasonOrganizer : untyped string ="organizer"
reasonDeadline : untyped string ="deadline"
reasonDormant : untyped string ="dormant"
campaign : type =v0.campaign
campaignText : type =v0.campaignText
recentSize : untyped bigint =(20 <untyped> bigint)
campaignState : type =v0.campaignState
contribution : type =v0.contribution
receipt : type =v0.receipt
withdrawal : type =v0.withdrawal
refund : type =v0.refund
update : type =v0.update
nextID : v0.ID =<zero>
campaigns : v0.Tree Inspect
derived : v0.Tree Inspect
active : v0.Tree Inspect
activeByCategory : v0.Tree Inspect
byOrganizer : v0.Tree Inspect
byBeneficiary : v0.Tree Inspect
byDonor : v0.Tree Inspect
statsState : type =v0.statsState
stats : v0.statsState Inspect
StatsView : type =v0.StatsView
GetStats : func() v0.StatsView Inspect
titleMin : untyped bigint =(4 <untyped> bigint)
titleMax : untyped bigint =(80 <untyped> bigint)
descriptionMax : untyped bigint =(5000 <untyped> bigint)
messageMax : untyped bigint =(140 <untyped> bigint)
updateMin : untyped bigint =(1 <untyped> bigint)
updateMax : untyped bigint =(2000 <untyped> bigint)
noticeMin : untyped bigint =(1 <untyped> bigint)
noticeMax : untyped bigint =(280 <untyped> bigint)
altMin : untyped bigint =(1 <untyped> bigint)
altMax : untyped bigint =(250 <untyped> bigint)
cidMaxBytes : untyped bigint =(100 <untyped> bigint)
normalize : func(s string, multiline bool) string Inspect
invisible : func(r int32) bool Inspect
checkText : func(s string, min int, max int, multiline bool, err v0.Error) string Inspect
visible : func(s string, min int) bool Inspect
checkStory : func(s string, min int, max int, err v0.Error) string Inspect
checkMarkup : func(s string) Inspect
checkImage : func(cid string, alt string) (string, string) Inspect
validCID : func(s string) bool Inspect
base58btc : untyped string ="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
base32Lower : untyped string ="abcdefghijklmnopqrstuvwxyz234567"
allIn : func(s string, set string) bool Inspect
CampaignView : type =v0.CampaignView
GetCampaign : func(id string) v0.CampaignView Inspect
campaignOf : func(id string) *v0.campaign Inspect
lookup : func(id string) (*v0.campaign, bool) Inspect
effective : func(c *v0.campaign) (status string, reason string, closedAt int64) Inspect
trackedBalance : func(c *v0.campaign) int64 Inspect
campaignView : func(c *v0.campaign) v0.CampaignView Inspect
dormantAt : func(c *v0.campaign) int64 Inspect
lastActivity : func(c *v0.campaign) int64 Inspect
finalizableAt : func(c *v0.campaign, closedAt int64, balance int64) int64 Inspect