Skip to content

Commit

Permalink
docs: update on zoe.installBundle and zoe.installBundleId
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Hibbert committed Jan 21, 2025
1 parent 30637d4 commit 7b4f006
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions main/reference/zoe-api/zoe.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,16 @@ const invitation = await invitationIssuer.claim(untrustedInvitation);
const invitationValue = await E(Zoe).getInvitationDetails(invitation);
```

## E(Zoe).install(bundle)
## E(Zoe).install(bundle, bundleLabel?)

- **bundle**: **SourceBundle**
- **bundleLabel**: string - Optional
- Returns: **Promise<Installation>**

Takes bundled source code for a Zoe contract as an argument and installs the code on Zoe.
Returns a **Promise** for an **Installation** object.
Takes bundled source code for a Zoe contract as an argument and
installs the code with Zoe. The _bundleLabel_ will be accessible on the
**Installation** object. Returns a **Promise** for an **Installation**
object.

```js
// bundleSource takes source code files and
Expand All @@ -157,6 +160,22 @@ const bundle = await bundleSource(pathResolve(`./src/contract.js`));
const installationP = await E(Zoe).install(bundle);
```

## E(Zoe).installBundleID(bundleId, bundleLabel?)

- **bundleId**: **BundleId**
- **bundleLabel**: string - Optional
- Returns: **Promise<Installation>**

Takes a bundleId for a Zoe contract (often generated in a [coreEval
proposal](/guides/coreeval/local-testnet.html#deploying-contracts-using-core-eval-proposals)
as an argument and installs the code with Zoe. The _bundleLabel_ will be
accessible on the **Installation** object. Returns a **Promise** for
an **Installation** object.

```js
const installationP = await E(Zoe).installBundleID(bundleId, bundleLabel);
```

## E(Zoe).getConfiguration()

- Returns: **Promise<Object>**
Expand Down Expand Up @@ -406,13 +425,6 @@ const paymentKeywordRecord = harden({ Asset: quatloosPayment });
[`zcf.makeInvitation(...)`](./zoe-contract-facet#zcf-makeinvitation-offerhandler-description-customdetails-proposalshape).
Each contract can define the properties it supports and which are required.

## E(Zoe).installBundleID(bundleId)

- bundleId: **BundleId**
- Returns: **Promise<Installation>**

Reserved for future use.

## E(Zoe).getBundleIDFromInstallation(installation)

- **installation**: **Installation**
Expand Down

0 comments on commit 7b4f006

Please sign in to comment.