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

v1 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

v1.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
04fa0e…d19c: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
04fa0e…d19c: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
04fa0e…d19c: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
04fa0e…d19c:30
Render details

Inspect func

renderOne

func(d *v1.Deal) string
Open
OID
04fa0e…d19c:31
renderOne details

Inspect func
StateOpen : untyped string ="Open"
StateSettled : untyped string ="Settled"
StateCanceled : untyped string ="Canceled"
Deal : type =v1.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) *v1.Deal Inspect
Render : func(path string) string Inspect
renderOne : func(d *v1.Deal) string Inspect
confs : func(d *v1.Deal) string Inspect
yn : func(b bool) string Inspect