SetPaused
func(on string)SetPaused freezes posts, replies, tips, and ticket buys when on is true/1/yes. Pass false/0/no to reopen. Ticket sells are never paused.
- OID
- 0e8c30…e513:3
SetPaused details
SetTreasury
func(next .uverse.address)SetTreasury moves future protocol fees and surplus sweeps to next.
- OID
- 0e8c30…e513:5
SetTreasury details
TransferAdmin
func(next .uverse.address)TransferAdmin rotates the pause/sweep key.
- OID
- 0e8c30…e513:6
TransferAdmin details
SetSuccessor
func(next string)SetSuccessor records the package path of a later realm. An empty path clears it. This does not move coins or shares.
- OID
- 0e8c30…e513:7
SetSuccessor details
validSuccessor
func(path string) bool- OID
- 0e8c30…e513:8
validSuccessor details
Sweep
func(confirm string)Sweep sends this realm's ugnot above TotalReserve to the treasury. confirm must be the word "sweep". Ticket collateral is not included.
- OID
- 0e8c30…e513:9
Sweep details
Post
func(body string, gated string) intPost publishes a top-level post and returns its id. gated is yes/1/true/khoa to withhold the body from Render. The body is still public chain state. Pass an empty gated value for a public post.
- OID
- 0e8c30…e513:10
Post details
Reply
func(parent int, body string) intReply publishes a reply to parent and returns the new id. Replies are public.
- OID
- 0e8c30…e513:12
Reply details
writePost
func(author *gnocial.Profile, parent int, body string, gated bool) int- OID
- 0e8c30…e513:13
writePost details
yesNo
func(v bool) string- OID
- 0e8c30…e513:14
yesNo details
Delete
func(id int)Delete soft-deletes the caller's post and clears its body from current state. The original transaction still holds the text in chain history.
- OID
- 0e8c30…e513:15
Delete details
Like
func(id int)Like adds the caller's like. One like per account.
- OID
- 0e8c30…e513:16
Like details
Unlike
func(id int)Unlike removes the caller's like.
- OID
- 0e8c30…e513:17
Unlike details
Tip
func(id int)Tip forwards the attached ugnot to the post's author. The realm does not keep it.
- OID
- 0e8c30…e513:18
Tip details
GatedBody
func(id int) stringGatedBody returns a gated post's text for the author or a current ticket holder. Chain storage is public; this only gates the convenience call and Render.
- OID
- 0e8c30…e513:19
GatedBody details
livePost
func(id int) *gnocial.Article- OID
- 0e8c30…e513:20
livePost details
Liked
func(who .uverse.address, id int) boolLiked reports whether who liked the post.
- OID
- 0e8c30…e513:21
Liked details
Register
func(handle string, name string, bio string, referrer string)Register opens a profile for the calling account. handle is 3–16 chars of a-z, 0-9 and underscore. referrer may be empty or the bech32 address of an existing member. A member can register once.
- OID
- 0e8c30…e513:22
Register details
SetCreatorFee
func(points int64)SetCreatorFee stores this member's share of each ticket trade, in basis points. Only that member can change it. The trade total stays FeeCapBps.
- OID
- 0e8c30…e513:24
SetCreatorFee details
UpdateProfile
func(name string, bio string)UpdateProfile replaces the display name and bio. The handle stays.
- OID
- 0e8c30…e513:25
UpdateProfile details
Follow
func(handle string)Follow records that the caller follows handle.
- OID
- 0e8c30…e513:26
Follow details
Unfollow
func(handle string)Unfollow removes a follow.
- OID
- 0e8c30…e513:27
Unfollow details
Following
func(from .uverse.address, handle string) boolFollowing reports whether from follows the handle.
- OID
- 0e8c30…e513:28
Following details
Holding
typeHolding is one creator's tickets in a wallet. It is a copy.
Value
gnocial.Holding
mustLimit
func(n int) int- OID
- 0e8c30…e513:29
mustLimit details
Feed
func(before int, limit int) []gnocial.ArticleFeed lists newest top-level posts with id \< before. before 0 starts at the newest.
- OID
- 0e8c30…e513:31
Feed details
PostsBy
func(addr .uverse.address, before int, limit int) []gnocial.ArticlePostsBy lists one member's newest top-level posts with id \< before.
- OID
- 0e8c30…e513:32
PostsBy details
Replies
func(parent int, after int, limit int) []gnocial.ArticleReplies lists direct replies of parent with id > after, oldest first.
- OID
- 0e8c30…e513:33
Replies details
Handles
func(after string, limit int) []gnocial.ProfileHandles lists profiles in handle order, strictly after the given handle.
- OID
- 0e8c30…e513:34
Handles details
FollowingList
func(who .uverse.address, after .uverse.address, limit int) []gnocial.ProfileFollowingList lists profiles \`who\` follows, in address order, after \`after\`.
- OID
- 0e8c30…e513:35
FollowingList details
FollowerList
func(who .uverse.address, after .uverse.address, limit int) []gnocial.ProfileFollowerList lists profiles that follow \`who\`, in address order, after \`after\`.
- OID
- 0e8c30…e513:36
FollowerList details
edgeList
func(who .uverse.address, after .uverse.address, limit int, sep string) []gnocial.Profile- OID
- 0e8c30…e513:37
edgeList details
Holdings
func(holder .uverse.address, after .uverse.address, limit int) []gnocial.HoldingHoldings lists ticket balances of holder, after the given creator address.
- OID
- 0e8c30…e513:38
Holdings details
Hot
func(limit int) []gnocial.ArticleHot ranks the newest window the same way Render does. It is not a global index.
- OID
- 0e8c30…e513:39
Hot details
MemberCount
func() intMemberCount is the number of registered handles.
- OID
- 0e8c30…e513:40
MemberCount details
FeedCount
func() intFeedCount is the number of live top-level posts still in the feed index.
- OID
- 0e8c30…e513:41
FeedCount details
LatestID
func() intLatestID is the newest post id, or 0 when nothing has been posted.
- OID
- 0e8c30…e513:42
LatestID details
hotWindow
untyped bigintValue
(30 <untyped> bigint)
scoredPost
typeValue
gnocial.scoredPost
insertRank
func(top []gnocial.scoredPost, row gnocial.scoredPost, limit int) []gnocial.scoredPost- OID
- 0e8c30…e513:43
insertRank details
recentPosts
func(before int, limit int) []*gnocial.Article- OID
- 0e8c30…e513:44
recentPosts details
Render
func(path string) stringRender is the short gnoweb page for this fund realm. The long client and Sheet live in the view realm. A realm has to declare Render, and the storage deposit of this package cannot hold both the curve and the full client.
- OID
- 0e8c30…e513:45
Render details
FeeCapBps
int64Value
1000
CreatorFeeMinBps
int64Value
100
CreatorFeeMaxBps
int64Value
700
CreatorFeeDefaultBps
int64Value
500
CreatorReferralBps
int64Value
50
TraderReferralBps
int64Value
50
TicketUnit
int64Value
10000
MaxSupply
untyped bigintValue
(2000 <untyped> bigint)
MaxTrade
untyped bigintValue
(20 <untyped> bigint)
MaxBodyRunes
untyped bigintValue
(280 <untyped> bigint)
ProtocolVersion
untyped stringValue
"2"
maxHandle
untyped bigintValue
(16 <untyped> bigint)
minHandle
untyped bigintValue
(3 <untyped> bigint)
maxNameRunes
untyped bigintValue
(32 <untyped> bigint)
maxNameBytes
untyped bigintValue
(128 <untyped> bigint)
maxBioRunes
untyped bigintValue
(160 <untyped> bigint)
maxBioBytes
untyped bigintValue
(640 <untyped> bigint)
maxBodyBytes
untyped bigintValue
(1120 <untyped> bigint)
Profile
typeProfile is a copy of a member's public record.
Value
gnocial.Profile
Article
typeArticle is a copy of one post. Gated bodies are still stored on chain; Render withholds them, and GatedBody checks the caller.
Value
gnocial.Article
book
typeValue
gnocial.book
store
typeTrees stay unexported. avl.Iterate takes a callback; handing out the tree would let another realm run that callback under this realm.
Value
gnocial.store
state
*gnocial.store- OID
- 0e8c30…e513:101
state details
init.65
func()- OID
- 0e8c30…e513:48
init.65 details
newStore
func() *gnocial.store- OID
- 0e8c30…e513:50
newStore details
Admin
func() .uverse.address- OID
- 0e8c30…e513:51
Admin details
Treasury
func() .uverse.address- OID
- 0e8c30…e513:52
Treasury details
Version
func() stringVersion is this package revision. It has no setter.
- OID
- 0e8c30…e513:53
Version details
Successor
func() stringSuccessor is the package path of a later realm, or empty. The later realm does not receive this realm's ticket reserve.
- OID
- 0e8c30…e513:54
Successor details
Paused
func() boolPaused reports whether new posts, replies, tips, and ticket buys are frozen. Sells stay open so ticket collateral can still exit.
- OID
- 0e8c30…e513:55
Paused details
TotalReserve
func() int64TotalReserve is the ugnot locked to back outstanding tickets.
- OID
- 0e8c30…e513:56
TotalReserve details
caller
func() .uverse.address- OID
- 0e8c30…e513:57
caller details
mustNoPay
func()- OID
- 0e8c30…e513:58
mustNoPay details
takeUgnot
func() int64- OID
- 0e8c30…e513:59
takeUgnot details
payout
func(to .uverse.address, amt int64, why string)- OID
- 0e8c30…e513:60
payout details
mustAdmin
func()- OID
- 0e8c30…e513:61
mustAdmin details
pad
func(n int) string- OID
- 0e8c30…e513:62
pad details
validHandle
func(s string) bool- OID
- 0e8c30…e513:63
validHandle details
reserved
func(h string) bool- OID
- 0e8c30…e513:64
reserved details
cleanLine
func(s string, maxRunes int, maxBytes int, label string, allowEmpty bool) string- OID
- 0e8c30…e513:65
cleanLine details
cleanBody
func(s string) string- OID
- 0e8c30…e513:66
cleanBody details
isYes
func(s string) bool- OID
- 0e8c30…e513:67
isYes details
profileByAddr
func(a .uverse.address) *gnocial.Profile- OID
- 0e8c30…e513:68
profileByAddr details
lookup
func(handle string) *gnocial.Profile- OID
- 0e8c30…e513:69
lookup details
mustMember
func(a .uverse.address) *gnocial.Profile- OID
- 0e8c30…e513:70
mustMember details
bookOf
func(creator .uverse.address) *gnocial.book- OID
- 0e8c30…e513:71
bookOf details
postByID
func(id int) *gnocial.Article- OID
- 0e8c30…e513:72
postByID details
shareKey
func(holder .uverse.address, creator .uverse.address) string- OID
- 0e8c30…e513:73
shareKey details
getShares
func(holder .uverse.address, creator .uverse.address) int- OID
- 0e8c30…e513:74
getShares details
setShares
func(holder .uverse.address, creator .uverse.address, n int)- OID
- 0e8c30…e513:75
setShares details
authorKey
func(a .uverse.address, id int) string- OID
- 0e8c30…e513:76
authorKey details
followKey
func(from .uverse.address, to .uverse.address) string- OID
- 0e8c30…e513:77
followKey details
fanKey
func(creator .uverse.address, fan .uverse.address) string- OID
- 0e8c30…e513:78
fanKey details
likeKey
func(id int, who .uverse.address) string- OID
- 0e8c30…e513:79
likeKey details
ProfileByHandle
func(handle string) (gnocial.Profile, bool)ProfileByHandle returns a copy of the profile, or false when the handle is unknown.
- OID
- 0e8c30…e513:80
ProfileByHandle details
ProfileOf
func(addr .uverse.address) (gnocial.Profile, bool)ProfileOf returns a copy of the profile bound to addr.
- OID
- 0e8c30…e513:81
ProfileOf details
GetPost
func(id int) (gnocial.Article, bool)GetPost returns a copy of the post. The copy does not alias storage.
- OID
- 0e8c30…e513:82
GetPost details
SharesOf
func(holder .uverse.address, handle string) intSharesOf returns how many tickets holder has of the creator's handle.
- OID
- 0e8c30…e513:83
SharesOf details
SupplyOf
func(handle string) (supply int, reserve int64, holders int)SupplyOf returns tickets outstanding, ugnot locked in that curve, and holders.
- OID
- 0e8c30…e513:84
SupplyOf details
QuoteBuy
func(handle string, amount int) (due int64, curve int64, creatorFee int64, protocolFee int64, referralFee int64)QuoteBuy is the exact ugnot a buyer must attach to mint amount tickets. The total fee is always FeeCapBps of the curve. An anonymous quote pays no trader-referrer slice, so that slice stays in the protocol fee. The amount due does not change when the buyer is known.
- OID
- 0e8c30…e513:85
QuoteBuy details
QuoteBuyFor
func(handle string, buyer string, amount int) (due int64, curve int64, creatorFee int64, protocolFee int64, referralFee int64)QuoteBuyFor is QuoteBuy with the buyer's address. Empty or a member with no referrer adds no trader-referrer slice. A bad address panics.
- OID
- 0e8c30…e513:87
QuoteBuyFor details
QuoteSell
func(handle string, amount int) (proceeds int64, curve int64, creatorFee int64, protocolFee int64, referralFee int64)QuoteSell is what a seller receives. The reserve drops by the full curve. Proceeds are the curve minus FeeCapBps, whoever the seller is.
- OID
- 0e8c30…e513:88
QuoteSell details
QuoteSellFor
func(handle string, seller string, amount int) (proceeds int64, curve int64, creatorFee int64, protocolFee int64, referralFee int64)QuoteSellFor is QuoteSell with the seller's address.
- OID
- 0e8c30…e513:89
QuoteSellFor details
Buy
func(handle string, amount int)Buy mints amount tickets of handle. Attach exactly QuoteBuy's due in ugnot. The caller's own referrer receives the trader slice. The due matches QuoteBuy.
- OID
- 0e8c30…e513:90
Buy details
Sell
func(handle string, amount int)Sell burns amount tickets and pays the caller from the reserve, minus fees. Sells stay available while the realm is paused.
- OID
- 0e8c30…e513:91
Sell details
forwardFees
func(creator *gnocial.Profile, creatorFee int64, protocolFee int64, creatorRef .uverse.address, creatorRefAmt int64, traderRef .uverse.address, traderRefAmt int64)- OID
- 0e8c30…e513:92
forwardFees details
addShares
func(holder .uverse.address, creator .uverse.address, n int)- OID
- 0e8c30…e513:93
addShares details
subShares
func(holder .uverse.address, creator .uverse.address, n int)- OID
- 0e8c30…e513:94
subShares details
quoteTotals
func(handle string, trader string, amount int, sell bool) (curve int64, creatorFee int64, protocolFee int64, referralFee int64)- OID
- 0e8c30…e513:95
quoteTotals details
tradeQuote
func(handle string, trader string, amount int, sell bool) (curve int64, creatorFee int64, protocolFee int64, creatorRefAmt int64, traderRefAmt int64, creator *gnocial.Profile, creatorRef .uverse.address, traderRef .uverse.address)tradeQuote splits FeeCapBps of the curve. trader is the buyer or seller. Empty means an anonymous quote: no trader-referrer slice. protocolFee is the cap minus the floored slices, so it cannot go negative while the configured slices fit inside the cap.
- OID
- 0e8c30…e513:96
tradeQuote details
traderReferrer
func(raw string) .uverse.address- OID
- 0e8c30…e513:97
traderReferrer details
bps
func(amount int64, points int64) int64- OID
- 0e8c30…e513:98
bps details
curveCost
func(supply int, amount int) int64curveCost is the ugnot reserve needed to move \`amount\` tickets starting at supply. Ticket i (1-based) is priced i² \* TicketUnit. The sum of squares is exact.
- OID
- 0e8c30…e513:99
curveCost details
sumSq
func(n int64) int64- OID
- 0e8c30…e513:100