Skip to content

Commit

Permalink
refactor: Rename E(Zoe).offer argument paymentKeywordRecord to `pay…
Browse files Browse the repository at this point in the history
…mentPKeywordRecord`
  • Loading branch information
gibson042 committed Dec 1, 2023
1 parent 6079c5c commit 95f4e80
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion main/glossary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ For more details, see [What developers need to know about inter-blockchain commu
A [payment](#payment) whose amount represents (and is required for) participation in a contract instance.
Contracts often return a creator invitation on their instantiation, in case the contract instantiator wants
to immediately participate. Otherwise, the contract instance must create any additional invitations.
Every [offer](#offer) to participate in a contract instance must include an invitation to that instance in the first argument to [`E(zoe).offer(...)`](/reference/zoe-api/zoe.md#e-zoe-offer-invitation-proposal-paymentkeywordrecord-offerargs), and any wallet receiving one will validate it via the [InvitationIssuer](#invitationissuer).
Every [offer](#offer) to participate in a contract instance must include an invitation to that instance in the first argument to [`E(zoe).offer(...)`](/reference/zoe-api/zoe.md#e-zoe-offer-invitation-proposal-paymentpkeywordrecord-offerargs), and any wallet receiving one will validate it via the [InvitationIssuer](#invitationissuer).

An invitation's [amount](#amount) includes the following properties:
- The contract's installation in Zoe, including access to its source code.
Expand Down
2 changes: 1 addition & 1 deletion main/guides/getting-started/contract-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The [vstorage-viewer](https://github.com/p2p-org/p2p-agoric-vstorage-viewer) con
## Specifying Offers

Recall that for an agent within the JavaScript VM,
[E(zoe).offer(...)](../../reference/zoe-api/zoe.md#e-zoe-offer-invitation-proposal-paymentkeywordrecord-offerargs) takes an `Invitation` and optionally a `Proposal` with `{ give, want, exit }`, a `PaymentPKeywordRecord`, and `offerArgs`; it returns a `UserSeat` from which we can [getPayouts()](../../reference/zoe-api/user-seat.md#e-userseat-getpayouts).
[`E(zoe).offer(...)`](../../reference/zoe-api/zoe.md#e-zoe-offer-invitation-proposal-paymentpkeywordrecord-offerargs) takes an `Invitation` and optionally a `Proposal` with `{ give, want, exit }`, a `PaymentPKeywordRecord`, and `offerArgs`; it returns a `UserSeat` from which we can [getPayouts()](../../reference/zoe-api/user-seat.md#e-userseat-getpayouts).

![Zoe API diagram, simplified](./assets/zoe-simp.svg)

Expand Down
2 changes: 1 addition & 1 deletion main/guides/zoe/proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Making An offer

To make an offer, you use [`E(zoe).offer(...)`](/reference/zoe-api/zoe.md#e-zoe-offer-invitation-proposal-paymentkeywordrecord-offerargs), which takes up to four arguments:
To make an offer, you use [`E(zoe).offer(...)`](/reference/zoe-api/zoe.md#e-zoe-offer-invitation-proposal-paymentpkeywordrecord-offerargs), which takes up to four arguments:
- An **invitation** to participate in this contract instance.
- A **proposal** stating your offer conditions.
- The **payments** escrowed for the offer, each corresponding with a **give** [Keyword](/reference/zoe-api/zoe-data-types.md#keyword) in **proposal**.
Expand Down
2 changes: 1 addition & 1 deletion main/reference/zoe-api/zcfseat.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ to get back from Zoe. It has keys **give**, **want**, and
**exit**. **give** and **want** are records with **[Keywords](./zoe-data-types.md#keyword)** as keys and
**[Amounts](/reference/ertp-api/ertp-data-types.md#amount)** as values. The **proposal** is a user's understanding of the
contract that they are entering when they make an offer. See
[**E(zoe).offer()**](./zoe.md#e-zoe-offer-invitation-proposal-paymentkeywordrecord-offerargs) for full details.
[`E(zoe).offer(...)`](./zoe.md#e-zoe-offer-invitation-proposal-paymentpkeywordrecord-offerargs) for full details.

- Example:
```js
Expand Down
2 changes: 1 addition & 1 deletion main/reference/zoe-api/zoe-contract-facet.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The returned **Invitation**'s **amount** specifies:

**offerHandler** is a required function accepting a **ZCFSeat** and **offerArgs**
(which will be present if and only if provided to
[`E(Zoe).offer(...)`](/reference/zoe-api/zoe.md#e-zoe-offer-invitation-proposal-paymentkeywordrecord-offerargs))
[`E(Zoe).offer(...)`](/reference/zoe-api/zoe.md#e-zoe-offer-invitation-proposal-paymentpkeywordrecord-offerargs))
and returning arbitrary offer results.

**description** is a required string describing the **Invitation**,
Expand Down
7 changes: 4 additions & 3 deletions main/reference/zoe-api/zoe.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,12 @@ const { creatorFacet, publicFacet, creatorInvitation } = await E(Zoe).startInsta
installation, issuerKeywordRecord, terms);
```

<a id="e-zoe-offer-invitation-proposal-paymentkeywordrecord-offerargs"></a>

## E(Zoe).offer(invitation, proposal?, paymentKeywordRecord?, offerArgs?)
## E(Zoe).offer(invitation, proposal?, paymentPKeywordRecord?, offerArgs?)
- **invitation**: **[Invitation](./zoe-data-types.md#invitation) | Promise&lt;[Invitation](./zoe-data-types.md#invitation)>**
- **proposal**: **[Proposal](/glossary/#proposal)** - Optional.
- **paymentKeywordRecord**: **[PaymentPKeywordRecord](./zoe-data-types.md#keywordrecord)** - Optional.
- **paymentPKeywordRecord**: **[PaymentPKeywordRecord](./zoe-data-types.md#keywordrecord)** - Optional.
- **offerArgs**: **[CopyRecord](/glossary/#copyrecord)** - Optional.
- Returns: **Promise&lt;[UserSeat](./user-seat.md)>**

Expand Down Expand Up @@ -329,7 +330,7 @@ the Keywords might be "Asset" and "Bid".

### Payments

**paymentKeywordRecord** must be either `undefined` or a **[PaymentPKeywordRecord](./zoe-data-types.md#keywordrecord)**
**paymentPKeywordRecord** must be either `undefined` or a **[PaymentPKeywordRecord](./zoe-data-types.md#keywordrecord)**
containing the actual **payments** to be escrowed by Zoe.
Every **Keyword** in **give** must also have a corresponding **payment**.

Expand Down

0 comments on commit 95f4e80

Please sign in to comment.