interface UserSeat {
    getExitSubscriber: (() => Subscriber<any>);
    getFinalAllocation: (() => Promise<AmountKeywordRecord>);
    getOfferResult: (() => Promise<OR>);
    getPayout: ((keyword) => Promise<Payment<any>>);
    getPayouts: (() => Promise<PaymentPKeywordRecord>);
    getProposal: (() => Promise<ProposalRecord>);
    hasExited: (() => Promise<boolean>);
    numWantsSatisfied: (() => Promise<0 | 1>);
    tryExit: undefined | (() => void);
}

Type Parameters

  • OR extends object = unknown

Properties

getExitSubscriber: (() => Subscriber<any>)

Type declaration

    • (): Subscriber<any>
    • returns a subscriber that will be notified when the seat has exited or failed.

      Returns Subscriber<any>

getFinalAllocation: (() => Promise<AmountKeywordRecord>)

Type declaration

getOfferResult: (() => Promise<OR>)

Type declaration

    • (): Promise<OR>
    • Returns Promise<OR>

getPayout: ((keyword) => Promise<Payment<any>>)

Type declaration

    • (keyword): Promise<Payment<any>>
    • returns a promise for the Payment corresponding to the indicated keyword. The promise will resolve after the seat has exited.

      Parameters

      • keyword: string

      Returns Promise<Payment<any>>

getPayouts: (() => Promise<PaymentPKeywordRecord>)

Type declaration

    • (): Promise<PaymentPKeywordRecord>
    • returns a promise for a KeywordPaymentRecord containing all the payouts from this seat. The promise will resolve after the seat has exited.

      Returns Promise<PaymentPKeywordRecord>

getProposal: (() => Promise<ProposalRecord>)

Type declaration

hasExited: (() => Promise<boolean>)

Type declaration

    • (): Promise<boolean>
    • Returns true if the seat has exited, false if it is still active.

      Returns Promise<boolean>

numWantsSatisfied: (() => Promise<0 | 1>)

Type declaration

    • (): 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.

      Returns Promise<0 | 1>

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.

Type declaration

    • (): void
    • Returns void

Generated using TypeDoc