You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: main/glossary/README.md
+11-13Lines changed: 11 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -251,12 +251,12 @@ For details, see [`E(zoe).offer(...)`](/reference/zoe-api/zoe.md#proposals).
251
251
## Facet
252
252
253
253
A *facet* is an object that exposes an API or particular view of some larger entity, which may be an object itself.
254
-
You can make any number of facets of an entity. In JavaScript, you often make a facet by selecting methods from the entity,
255
-
either directly or by destructuring:
254
+
You can make any number of facets of an entity. In JavaScript, you often make a facet that forwards method calls:
256
255
```js
257
-
constfacet= {
258
-
myMethod:oldObject.method,
259
-
}
256
+
import { Far } from'@endo/far';
257
+
constfacet=Far('FacetName', {
258
+
myMethod: (...args) =>oldObject.method(...args),
259
+
});
260
260
```
261
261
Two Agoric uses are:
262
262
-*Deposit Facet*: A facet of a [purse](#purse). Anyone with a reference to its deposit facet object can add
@@ -285,7 +285,7 @@ its [section in the JavaScript Distributed Programming Guide](https://github.com
285
285
## Hardened JavaScript (SES)
286
286
287
287
Hardened JavaScript is a standards-track extension to the JavaScript standard.
288
-
Hardening JavaScript turns the sandbox into firm ground, where you can code run
288
+
Hardening JavaScript turns the sandbox into firm ground, where you can run code
289
289
you don't completely trust, without being vulnerable to their bugs or bad
290
290
intentions.
291
291
See the [Endo and Hardened JavaScript Programming
@@ -554,13 +554,11 @@ it set at $10. They can specify the instance's minimum bid amount in its terms.
554
554
555
555
## Value
556
556
557
-
Values are the part of an [amount](#amount) that describe the value of something
558
-
that can be owned or shared: How much, how many, or a description of a unique asset, such as
559
-
Pixel(3,2), $3, or “Seat J12 for the show September 27th at 9:00pm”.
560
-
[Fungible](#fungible) values are usually represented by natural numbers.
561
-
Other values may be represented as a CopySet of strings naming particular rights or
562
-
arbitrary objects representing the rights directly (usually [non-fungible](#non-fungible) assets).
563
-
Values must be [Keys](#key).
557
+
A value is the part of an [Amount](#amount) that describes the value of something
558
+
that can be owned or shared: how much, how many, or a description of a unique asset, such as
559
+
$3, Pixel(3,2), or “Seat J12 for the show September 27th at 9:00pm”.
560
+
For a [fungible](#fungible) Amount, the Value is usually a non-negative **BigInt** such as `10n` or `137n`.
561
+
For a [non-fungible](#non-fungible) Amount, the Value might be a [CopySet](/guides/js-programming/far.md#pass-styles-and-harden) containing strings naming particular rights or objects representing the rights directly.
564
562
565
563
For more information, see the [ERTP documentation's Value section](/guides/ertp/amounts.md#values).
Copy file name to clipboardExpand all lines: main/reference/ertp-api/ertp-data-types.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -36,12 +36,12 @@ someAmountShape: {
36
36
37
37
## Value
38
38
39
-
**Values**describe how much of something can be owned or shared.
40
-
For fungible **[Amounts](#amount)**, **Values** are non-negative **BigInts**.
41
-
For non-fungible **Amounts**, **Values** are [copyArrays](/guides/js-programming/far.md#passstyleof-api)
42
-
(e.g., a hardened array of strings).
43
-
44
-
Recall that **BigInt**s are written with an *n* at the end: **10n**, **137n**, etc.
39
+
A **Value**is the part of an [Amount](#amount) that describes the value of something
40
+
that can be owned or shared: how much, how many, or a description of a unique asset, such as
41
+
$3, Pixel(3,2), or “Seat J12 for the show September 27th at 9:00pm”.
42
+
For a fungible **Amount**, the **Value** is usually a non-negative **BigInt** such as `10n` or `137n`.
43
+
For a non-fungible **Amount**, the **Value** might be a [CopySet](/guides/js-programming/far.md#pass-styles-and-harden) containing strings naming particular rights or objects representing the rights directly.
0 commit comments