API documentation of Agoric SDK / Exports / @agoric/zoe / src/zoeService/types / UserSeat
Interface: UserSeat<OR>
@agoric/zoe.src/zoeService/types.UserSeat
Type parameters
Name | Type |
---|---|
OR | extends object = unknown |
Table of contents
Properties
- getExitSubscriber
- getFinalAllocation
- getOfferResult
- getPayout
- getPayouts
- getProposal
- hasExited
- numWantsSatisfied
- tryExit
Properties
getExitSubscriber
• getExitSubscriber: () => Subscriber
<any
>
returns a subscriber that will be notified when the seat has exited or failed.
Type declaration
▸ (): Subscriber
<any
>
Returns
Subscriber
<any
>
Defined in
zoe/src/zoeService/types.js:221
getFinalAllocation
• getFinalAllocation: () => Promise
<AmountKeywordRecord
>
return a promise for the final allocation. The promise will resolve after the seat has exited.
Type declaration
▸ (): Promise
<AmountKeywordRecord
>
Returns
Promise
<AmountKeywordRecord
>
Defined in
zoe/src/zoeService/types.js:218
getOfferResult
• getOfferResult: () => Promise
<OR
>
Type declaration
▸ (): Promise
<OR
>
Returns
Promise
<OR
>
Defined in
zoe/src/zoeService/types.js:203
getPayout
• getPayout: (keyword
: string
) => Promise
<Payment
<any
>>
returns a promise for the Payment corresponding to the indicated keyword. The promise will resolve after the seat has exited.
Type declaration
▸ (keyword
): Promise
<Payment
<any
>>
Parameters
Name | Type |
---|---|
keyword | string |
Returns
Promise
<Payment
<any
>>
Defined in
zoe/src/zoeService/types.js:200
getPayouts
• getPayouts: () => Promise
<PaymentPKeywordRecord
>
returns a promise for a KeywordPaymentRecord containing all the payouts from this seat. The promise will resolve after the seat has exited.
Type declaration
▸ (): Promise
<PaymentPKeywordRecord
>
Returns
Promise
<PaymentPKeywordRecord
>
Defined in
zoe/src/zoeService/types.js:197
getProposal
• getProposal: () => Promise
<ProposalRecord
>
Type declaration
▸ (): Promise
<ProposalRecord
>
Returns
Promise
<ProposalRecord
>
Defined in
zoe/src/zoeService/types.js:196
hasExited
• hasExited: () => Promise
<boolean
>
Returns true if the seat has exited, false if it is still active.
Type declaration
▸ (): Promise
<boolean
>
Returns
Promise
<boolean
>
Defined in
zoe/src/zoeService/types.js:211
numWantsSatisfied
• numWantsSatisfied: () => Promise
<0
| 1
>
returns 1 if the proposal's want clause was satisfied by the final allocation, otherwise 0. This is numeric to support a planned enhancement called "multiples" which will allow the return value to be any non-negative number. The promise will resolve after the seat has exited.
Type declaration
▸ (): Promise
<0
| 1
>
Returns
Promise
<0
| 1
>
Defined in
zoe/src/zoeService/types.js:213
tryExit
• tryExit: undefined
| () => void
Note: Only works if the seat's proposal
has an OnDemand
exit
clause. Zoe's offer-safety guarantee applies no matter how a seat's interaction with a contract ends. Under normal circumstances, the participant might be able to call tryExit()
, or the contract might do something explicitly. On exiting, the seat holder gets its current allocation
and the seat
can no longer interact with the contract.