Skip to content Search Apps Documentation Source Content Run Reset Eval Playground 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.

warmpocket state

Back to all declarations

denom

untyped string

Value

"ugnot"

kindInstant

untyped string

Value

"instant"

kindPlan

untyped string

Value

"plan"

version

untyped string

Value

"warmpocket:v1"

Gift

type

Gift is the persisted record of one envelope or one recurring plan.

Value

warmpocket.Gift

gifts

map[string]*warmpocket.Gift
Open
OID
0b2c44…dad0:4
gifts details

Inspect map

seq

int64

Value

13

requireUser

func() .uverse.address
Open
OID
0b2c44…dad0:9
requireUser details

Inspect func

requireSend

func(amount int64)

requireSend verifies that the transaction attached exactly the expected amount.

Open
OID
0b2c44…dad0:11
requireSend details

Inspect func

pay

func(to .uverse.address, amount int64)

pay sends ugnot from the realm balance to the given address.

Open
OID
0b2c44…dad0:12
pay details

Inspect func

validateCode

func(code string)
Open
OID
0b2c44…dad0:13
validateCode details

Inspect func

parseRecipient

func(recipient string) .uverse.address
Open
OID
0b2c44…dad0:14
parseRecipient details

Inspect func

makeCode

func(seed string) string
Open
OID
0b2c44…dad0:15
makeCode details

Inspect func

save

func(g *warmpocket.Gift) string
Open
OID
0b2c44…dad0:16
save details

Inspect func

CreateInstant

func(code string, title string, theme string, recipient string, amount int64) string

CreateInstant funds a single-use envelope. A recipient address restricts the claim to one wallet; leaving it empty turns the code into a bearer link.

Open
OID
0b2c44…dad0:17
CreateInstant details

Inspect func

CreatePlan

func(code string, title string, theme string, recipient string, amount int64, periodMonths int, installments int, startUnix int64) string

CreatePlan funds a recurring allowance. Funds are held by the realm and released one installment at a time when the recipient calls Claim.

Open
OID
0b2c44…dad0:18
CreatePlan details

Inspect func

addMonths

func(unix int64, months int) int64
Open
OID
0b2c44…dad0:19
addMonths details

Inspect func

Claim

func(code string) string

Claim pays one installment to the caller. For an instant gift the envelope is marked claimed; for a plan the next due date is advanced by its period.

Open
OID
0b2c44…dad0:20
Claim details

Inspect func

Cancel

func(id string) string

Cancel refunds all unclaimed funds to the original sender.

Open
OID
0b2c44…dad0:21
Cancel details

Inspect func

recipientText

func(a .uverse.address) string
Open
OID
0b2c44…dad0:27
recipientText details

Inspect func

GetGift

func(id string) string

GetGift returns pipe-separated fields: id|kind|sender|recipient|code|title|theme|amount|remaining|period|installments|paid|nextDue|createdAt|claimed|canceled

Open
OID
0b2c44…dad0:28
GetGift details

Inspect func

GetByCode

func(code string) string
Open
OID
0b2c44…dad0:29
GetByCode details

Inspect func

Render

func(path string) string

Render gives gnoweb a usable, text-only dashboard for the realm.

Open
OID
0b2c44…dad0:30
Render details

Inspect func
denom : untyped string ="ugnot"
kindInstant : untyped string ="instant"
kindPlan : untyped string ="plan"
version : untyped string ="warmpocket:v1"
Gift : type =warmpocket.Gift
gifts : map[string]*warmpocket.Gift Inspect
codes : map[string]string Inspect
order : []string (len=13) Inspect
seq : int64 =13
requireUser : func() .uverse.address Inspect
requireSend : func(amount int64) Inspect
pay : func(to .uverse.address, amount int64) Inspect
validateCode : func(code string) Inspect
parseRecipient : func(recipient string) .uverse.address Inspect
makeCode : func(seed string) string Inspect
save : func(g *warmpocket.Gift) string Inspect
CreateInstant : func(code string, title string, theme string, recipient string, amount int64) string Inspect
CreatePlan : func(code string, title string, theme string, recipient string, amount int64, periodMonths int, installments int, startUnix int64) string Inspect
addMonths : func(unix int64, months int) int64 Inspect
Claim : func(code string) string Inspect
Cancel : func(id string) string Inspect
Ping : func() string Inspect
Count : func() int Inspect
IDAt : func(i int) string Inspect
clean : func(s string) string Inspect
flag : func(v bool) string Inspect
recipientText : func(a .uverse.address) string Inspect
GetGift : func(id string) string Inspect
GetByCode : func(code string) string Inspect
Render : func(path string) string Inspect