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

v0 state

Back to all declarations

StateOpen

untyped string

State constants for a deal's lifecycle.

Value

"Open"

StateSettled

untyped string

State constants for a deal's lifecycle.

Value

"Settled"

StateCanceled

untyped string

State constants for a deal's lifecycle.

Value

"Canceled"

Deal

type

Deal is a 2-party escrow record. Accounting only: no funds move, this tracks agreement and mutual confirmation between two parties.

Value

v0.Deal

nextID

int

Value

0

Create

func(counterparty .uverse.address, terms string) int

Create opens a new escrow deal between the caller (creator) and the given counterparty, governed by a free-form terms string. Returns the new deal id. Panics on invalid input (cross-realm abort).

Open
OID
03d6cb…8f9f:25
Create details

Inspect func

Confirm

func(id int)

Confirm records confirmation by whichever party is calling. Once both parties have confirmed, the deal transitions to Settled.

Open
OID
03d6cb…8f9f:27
Confirm details

Inspect func

Cancel

func(id int)

Cancel voids an open deal. Only the creator may cancel, and only before the deal has settled.

Open
OID
03d6cb…8f9f:28
Cancel details

Inspect func

Render

func(path string) string

Render lists all escrow deals with their parties, terms, and state. When path is a numeric id, renders just that deal.

Open
OID
03d6cb…8f9f:30
Render details

Inspect func

renderOne

func(d *v0.Deal) string
Open
OID
03d6cb…8f9f:31
renderOne details

Inspect func

short

func(a .uverse.address) string
Open
OID
03d6cb…8f9f:34
short details

Inspect func

escapePipe

func(s string) string
Open
OID
03d6cb…8f9f:35
escapePipe details

Inspect func
StateOpen : untyped string ="Open"
StateSettled : untyped string ="Settled"
StateCanceled : untyped string ="Canceled"
Deal : type =v0.Deal
deals : *v0.Tree Inspect
nextID : int =0
errNotFound : *errors.errorString Inspect
errNotParty : *errors.errorString Inspect
errNotOpen : *errors.errorString Inspect
errNotCreator : *errors.errorString Inspect
errBadAddr : *errors.errorString Inspect
errSelfDeal : *errors.errorString Inspect
Create : func(counterparty .uverse.address, terms string) int Inspect
Confirm : func(id int) Inspect
Cancel : func(id int) Inspect
mustGet : func(id int) *v0.Deal Inspect
Render : func(path string) string Inspect
renderOne : func(d *v0.Deal) string Inspect
confs : func(d *v0.Deal) string Inspect
yn : func(b bool) string Inspect
short : func(a .uverse.address) string Inspect
escapePipe : func(s string) string Inspect