StateOpen
untyped stringState constants for a deal's lifecycle.
Value
"Open"
StateSettled
untyped stringState constants for a deal's lifecycle.
Value
"Settled"
StateCanceled
untyped stringState constants for a deal's lifecycle.
Value
"Canceled"
Deal
typeDeal is a 2-party escrow record. Accounting only: no funds move, this tracks agreement and mutual confirmation between two parties.
Value
v0.Deal
deals
*v0.Tree// id (string) -> \*Deal
- OID
- 03d6cb…8f9f:4
deals details
nextID
intValue
0
errNotFound
*errors.errorString- OID
- 03d6cb…8f9f:8
errNotFound details
errNotParty
*errors.errorString- OID
- 03d6cb…8f9f:11
errNotParty details
errNotOpen
*errors.errorString- OID
- 03d6cb…8f9f:14
errNotOpen details
errNotCreator
*errors.errorString- OID
- 03d6cb…8f9f:17
errNotCreator details
errBadAddr
*errors.errorString- OID
- 03d6cb…8f9f:20
errBadAddr details
errSelfDeal
*errors.errorString- OID
- 03d6cb…8f9f:23
errSelfDeal details
Create
func(counterparty .uverse.address, terms string) intCreate 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).
- OID
- 03d6cb…8f9f:25
Create details
Confirm
func(id int)Confirm records confirmation by whichever party is calling. Once both parties have confirmed, the deal transitions to Settled.
- OID
- 03d6cb…8f9f:27
Confirm details
Cancel
func(id int)Cancel voids an open deal. Only the creator may cancel, and only before the deal has settled.
- OID
- 03d6cb…8f9f:28
Cancel details
mustGet
func(id int) *v0.Deal- OID
- 03d6cb…8f9f:29
mustGet details
Render
func(path string) stringRender lists all escrow deals with their parties, terms, and state. When path is a numeric id, renders just that deal.
- OID
- 03d6cb…8f9f:30
Render details
renderOne
func(d *v0.Deal) string- OID
- 03d6cb…8f9f:31
renderOne details
confs
func(d *v0.Deal) string- OID
- 03d6cb…8f9f:32
confs details
yn
func(b bool) string- OID
- 03d6cb…8f9f:33
yn details
short
func(a .uverse.address) string- OID
- 03d6cb…8f9f:34
short details
escapePipe
func(s string) string- OID
- 03d6cb…8f9f:35