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
v1.Deal
deals
*v0.Tree// id (string) -> \*Deal
- OID
- 04fa0e…d19c:4
deals details
nextID
intValue
0
errNotFound
*errors.errorString- OID
- 04fa0e…d19c:8
errNotFound details
errNotParty
*errors.errorString- OID
- 04fa0e…d19c:11
errNotParty details
errNotOpen
*errors.errorString- OID
- 04fa0e…d19c:14
errNotOpen details
errNotCreator
*errors.errorString- OID
- 04fa0e…d19c:17
errNotCreator details
errBadAddr
*errors.errorString- OID
- 04fa0e…d19c:20
errBadAddr details
errSelfDeal
*errors.errorString- OID
- 04fa0e…d19c: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
- 04fa0e…d19c: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
- 04fa0e…d19c: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
- 04fa0e…d19c:28
Cancel details
mustGet
func(id int) *v1.Deal- OID
- 04fa0e…d19c: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
- 04fa0e…d19c:30
Render details
renderOne
func(d *v1.Deal) string- OID
- 04fa0e…d19c:31
renderOne details
confs
func(d *v1.Deal) string- OID
- 04fa0e…d19c:32
confs details
yn
func(b bool) string- OID
- 04fa0e…d19c:33