UNPKG

@agoric/zoe

Version:

Zoe: the Smart Contract Framework for Offer Enforcement

39 lines 2.25 kB
/** * @import {Pattern} from '@endo/patterns'; * @import {ContractMeta, Invitation, Proposal, ZCF, ZCFSeat} from '@agoric/zoe'; */ export const defaultAcceptanceMsg: "The offer has been accepted. Once the contract has been completed, please check your payout"; export function assertIssuerKeywords(zcf: any, expected: any): void; export function satisfies(_ignored: any, seat: ZcfSeatPartial, update: AmountKeywordRecord): 0 | 1; /** @type {Swap} */ export const swap: Swap; /** @type {SwapExact} */ export const swapExact: SwapExact; export function fitProposalShape(seat: ZCFSeat, proposalShape: Pattern): void; export function assertProposalShape(seat: ZCFSeat, expected: ExpectedRecord): void; export function assertNatAssetKind(zcf: any, brand: any): void; export const depositToSeatSuccessMsg: "Deposit and reallocation successful."; export function depositToSeat(zcf: ZCF, recipientSeat: ZCFSeat, amounts: AmountKeywordRecord, payments: PaymentPKeywordRecord): Promise<string>; export function withdrawFromSeat(zcf: ZCF, seat: ZCFSeat, amounts: AmountKeywordRecord): Promise<PaymentPKeywordRecord>; export function saveAllIssuers(zcf: ZCF, issuerKeywordRecord?: IssuerKeywordRecord): Promise<(ZoeIssuerRecord<any, import("@endo/patterns").Key> | undefined)[]>; /** @type {MapKeywords} */ export const mapKeywords: MapKeywords; export function offerTo<Args extends unknown, Result extends unknown>(zcf: ZCF, invitation: ERef<Invitation<Result, Args>>, keywordMapping: KeywordKeywordRecord | undefined, proposal: Proposal, fromSeat: ZCFSeat, toSeat?: ZCFSeat, offerArgs?: Args): Promise<{ userSeatPromise: Promise<UserSeat<Result>>; deposited: Promise<AmountKeywordRecord>; }>; export type ZcfSeatPartial = { getProposal: () => ProposalRecord; getCurrentAllocation: () => Allocation; }; export type ExpectedRecord = { want?: Record<string, null> | undefined; give?: Record<string, null> | undefined; exit?: Partial<Record<never, null>> | undefined; }; import type { ZCFSeat } from '@agoric/zoe'; import type { Pattern } from '@endo/patterns'; import type { ZCF } from '@agoric/zoe'; import type { Invitation } from '@agoric/zoe'; import type { Proposal } from '@agoric/zoe'; //# sourceMappingURL=zoeHelpers.d.ts.map