UNPKG

@agoric/zoe

Version:

Zoe: the Smart Contract Framework for Offer Enforcement

69 lines 3.43 kB
export * from "../types-index.js"; export type ZoeKit = ReturnType<typeof makeDurableZoeKit>; /** * @import {VatAdminSvc, ShutdownWithFailure} from '@agoric/swingset-vat'; * @import {Baggage} from '@agoric/vat-data'; * @import {FeeIssuerConfig, FeeMintAccess, ZCFSpec, ZoeService} from './types.js'; */ /** * Create a durable instance of Zoe. * * @param {object} options * @param {Baggage} options.zoeBaggage - the baggage for Zoe durability. Must be provided by caller * @param {Promise<VatAdminSvc> | VatAdminSvc} [options.vatAdminSvc] - The vatAdmin Service, which carries the * power to create a new vat. If it's not available when makeZoe() is called, it * must be provided later using setVatAdminService(). * @param {ShutdownWithFailure} [options.shutdownZoeVat] - a function to * shutdown the Zoe Vat. This function needs to use the vatPowers * available to a vat. * @param {FeeIssuerConfig} [options.feeIssuerConfig] * @param {ZCFSpec} [options.zcfSpec] - Pointer to the contract facet bundle. */ export function makeDurableZoeKit({ zoeBaggage, vatAdminSvc, shutdownZoeVat, feeIssuerConfig, zcfSpec, }: { zoeBaggage: Baggage; vatAdminSvc?: VatAdminSvc | Promise<VatAdminSvc> | undefined; shutdownZoeVat?: ShutdownWithFailure | undefined; feeIssuerConfig?: FeeIssuerConfig | undefined; zcfSpec?: ZCFSpec | undefined; }): { zoeService: import("@endo/exo").Guarded<ZoeService>; zoeConfigFacet: import("@endo/exo").Guarded<{ updateZcfBundleId(bundleId: any): void; }>; /** @type {FeeMintAccess} */ feeMintAccess: FeeMintAccess; setVatAdminService: ((lateVatAdminSvc: any) => void) & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, (lateVatAdminSvc: any) => void>; }; /** * @deprecated * Create an instance of Zoe. * * This will fail upgrades and should only be used in tests through the helper * `makeZoeKitForTest`. * * @param {Promise<VatAdminSvc> | VatAdminSvc} [vatAdminSvc] - The vatAdmin Service, which carries the * power to create a new vat. If it's not available when makeZoe() is called, it * must be provided later using setVatAdminService(). * @param {ShutdownWithFailure} [shutdownZoeVat] - a function to * shutdown the Zoe Vat. This function needs to use the vatPowers * available to a vat. * @param {FeeIssuerConfig} [feeIssuerConfig] * @param {ZCFSpec} [zcfSpec] - Pointer to the contract facet bundle. */ export function makeZoeKit(vatAdminSvc?: Promise<VatAdminSvc> | VatAdminSvc, shutdownZoeVat?: ShutdownWithFailure, feeIssuerConfig?: FeeIssuerConfig, zcfSpec?: ZCFSpec): { zoeService: import("@endo/exo").Guarded<ZoeService>; zoeConfigFacet: import("@endo/exo").Guarded<{ updateZcfBundleId(bundleId: any): void; }>; /** @type {FeeMintAccess} */ feeMintAccess: FeeMintAccess; setVatAdminService: ((lateVatAdminSvc: any) => void) & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, (lateVatAdminSvc: any) => void>; }; import type { Baggage } from '@agoric/vat-data'; import type { VatAdminSvc } from '@agoric/swingset-vat'; import type { ShutdownWithFailure } from '@agoric/swingset-vat'; import type { FeeIssuerConfig } from './types.js'; import type { ZCFSpec } from './types.js'; import type { ZoeService } from './types.js'; import type { FeeMintAccess } from './types.js'; //# sourceMappingURL=zoe.d.ts.map