ZCF<CT>: {
    assertUniqueKeyword: ((keyword: Keyword) => void);
    atomicRearrange: ((transfers: TransferPart[]) => void);
    getAssetKind: GetAssetKindByBrand;
    getBrandForIssuer: (<K>(issuer: Issuer<K>) => Brand<K>);
    getInstance: (() => Instance);
    getInvitationIssuer: (() => Issuer<"set">);
    getIssuerForBrand: (<K_1>(brand: Brand<K_1>) => Issuer<K_1>);
    getOfferFilter: (() => Promise<string[]>);
    getTerms: (() => StandardTerms & CT);
    getZoeService: (() => ERef<ZoeService>);
    makeEmptySeatKit: ZCFMakeEmptySeatKit;
    makeInvitation: (<R, A>(offerHandler: OfferHandler<ERef<R>, A>, description: string, customDetails?: object, proposalShape?: Pattern) => Promise<Invitation<R, A>>);
    makeZCFMint: (<K_2>(keyword: Keyword, assetKind?: K_2, displayInfo?: AdditionalDisplayInfo, options?: @agoric/ertp) => Promise<ZCFMint<K_2>>);
    reallocate: Reallocate;
    registerFeeMint: ZCFRegisterFeeMint;
    saveIssuer: (<I>(issuerP: ERef<I>, keyword: Keyword) => Promise<I extends Issuer<infer K, infer M>
        ? IssuerRecord<K, M>
        : never>);
    setOfferFilter: ((strings: string[]) => Promise<void>);
    setTestJig: SetTestJig;
    shutdown: ((completion: Completion) => void);
    shutdownWithFailure: @agoric/swingset-vat;
    stopAcceptingOffers: (() => Promise<void>);
}

Zoe Contract Facet

The Zoe interface specific to a contract instance. The Zoe Contract Facet is an API object used by running contract instances to access the Zoe state for that instance. The Zoe Contract Facet is accessed synchronously from within the contract, and usually is referred to in code as zcf.

Type Parameters

  • CT extends unknown = Record<string, unknown>

Type declaration

  • assertUniqueKeyword: ((keyword: Keyword) => void)
    • check whether a keyword is valid and unique and could be added in saveIssuer
      • (keyword): void
      • Parameters

        • keyword: Keyword

        Returns void

  • atomicRearrange: ((transfers: TransferPart[]) => void)
    • atomically reallocate amounts among seats.
      • (transfers): void
      • Parameters

        Returns void

  • getAssetKind: GetAssetKindByBrand
  • getBrandForIssuer: (<K>(issuer: Issuer<K>) => Brand<K>)
  • getInstance: (() => Instance)
  • getInvitationIssuer: (() => Issuer<"set">)
  • getIssuerForBrand: (<K_1>(brand: Brand<K_1>) => Issuer<K_1>)
  • getOfferFilter: (() => Promise<string[]>)
      • (): Promise<string[]>
      • Returns Promise<string[]>

  • getTerms: (() => StandardTerms & CT)
      • (): StandardTerms & CT
      • Returns StandardTerms & CT

  • getZoeService: (() => ERef<ZoeService>)
  • makeEmptySeatKit: ZCFMakeEmptySeatKit
  • makeInvitation: (<R, A>(offerHandler: OfferHandler<ERef<R>, A>, description: string, customDetails?: object, proposalShape?: Pattern) => Promise<Invitation<R, A>>)

    Make a credible Zoe invitation for a particular smart contract indicated by the instance in the details of the invitation. Zoe also puts the installation and a unique handle in the details of the invitation. The contract must provide a description for the invitation and should include whatever information is necessary for a potential buyer of the invitation to know what they are getting in the customDetails. customDetails will be placed in the details of the invitation.

      • <R, A>(offerHandler, description, customDetails?, proposalShape?): Promise<Invitation<R, A>>
      • Type Parameters

        • R
        • A = undefined

        Parameters

        • offerHandler: OfferHandler<ERef<R>, A>
        • description: string
        • OptionalcustomDetails: object
        • OptionalproposalShape: Pattern

        Returns Promise<Invitation<R, A>>

  • makeZCFMint: (<K_2>(keyword: Keyword, assetKind?: K_2, displayInfo?: AdditionalDisplayInfo, options?: @agoric/ertp) => Promise<ZCFMint<K_2>>)
  • reallocate: Reallocate
    • reallocate amounts among seats.

    Use atomicRearrange instead.

  • registerFeeMint: ZCFRegisterFeeMint
  • saveIssuer: (<I>(issuerP: ERef<I>, keyword: Keyword) => Promise<I extends Issuer<infer K, infer M>
        ? IssuerRecord<K, M>
        : never>)

    Informs Zoe about an issuer and returns a promise for acknowledging when the issuer is added and ready.

      • <I>(issuerP, keyword): Promise<I extends Issuer<infer K, infer M>
            ? IssuerRecord<K, M>
            : never>
      • Type Parameters

        Parameters

        • issuerP: ERef<I>
        • keyword: Keyword

        Returns Promise<I extends Issuer<infer K, infer M>
            ? IssuerRecord<K, M>
            : never>

        the AmountMath and brand synchronously accessible after saving

  • setOfferFilter: ((strings: string[]) => Promise<void>)
      • (strings): Promise<void>
      • Parameters

        • strings: string[]

        Returns Promise<void>

  • setTestJig: SetTestJig
  • shutdown: ((completion: Completion) => void)
      • (completion): void
      • Parameters

        Returns void

  • shutdownWithFailure: @agoric/swingset-vat
  • stopAcceptingOffers: (() => Promise<void>)
      • (): Promise<void>
      • Returns Promise<void>