Skip to content

Commit

Permalink
fixup! docs(ertp): ERTP walk-thru: Alice buys a ticket from Bob
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Dec 7, 2024
1 parent a4ed4ef commit b605cd1
Showing 1 changed file with 38 additions and 8 deletions.
46 changes: 38 additions & 8 deletions main/guides/ertp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,28 @@ We start by using `makeIssuerKit` to make a `Mint`, `Brand`, and `Issuer` for **
The `bucks.brand` and `bucks.issuer` don't let anyone mint new assets, so sharing
them widely is normal. We must be careful to guard the`bucksMint`, so we keep it separate.

![ERTP makeIssuerKit API](./assets/ertp-interfaces-1.svg){ width=200 height=200 }
::: tip see also ZCFMint (TODO)

...

:::

## Amount: Asset Descriptions

Next we combine the Bucks brand with a value to make an `Amount`:

<<< @/../snippets/ertp/guide/test-readme.js#bucksAmount

Amounts let us _describe_ assets without _using_ them; for example,
to display a price without giving away money.
An Amount is a value labeled with a brand.
Amounts are descriptions of digital assets,
answering the questions "how much" and "of what kind".

Amounts have no economic scarcity or intrinsic value.

:::tip More on Asset Use versus Mention
_See also [The Settlers of Blockchain](https://agoric.com/blog/technology/the-settlers-of-blockchain) by Chris Hibbert, Jun 2021_
:::

![Amount class diagram](./assets/ertp-interfaces-2a.svg){ width=200 height=200 }

## Minting Payments

Next we use the mint to make a `Payment` of 100 bucks for Alice:
Expand Down Expand Up @@ -94,7 +99,34 @@ To put it all together:

<<< @/../snippets/ertp/guide/test-readme.js#aliceBuysFromBob

---
## Non-Fungible and Semi-Fungible Assets

::: tip: TODO: Non-Fungible and Semi-Fungible Assets

...

:::

## ERTP Concepts Overview

Each digital asset has Mint, Issuer, and Brand facets:

![ERTP Interfaces 1](./assets/ertp-interfaces-1.svg){ width=200 height=200 }

Use brands to make amounts.

Use a Mint to create Payments. Use an Issuer to make Purses.
Deposit payments into purses and withdraw them back out.

![ERTP makeIssuerKit API](./assets/ertp-interfaces-2.svg)

Fungible and non-fungible kinds of assets are handled uniformly.

![ERTP object relationships](./assets/ertp-interfaces-3.svg)

# Obsolete material

_aside from TODOs above_

token standard for transferring tokens and other digital assets in
JavaScript. Using the [ERTP API](/reference/ertp-api/),
Expand All @@ -107,8 +139,6 @@ object, it can call methods on that object. If it doesn't have a
reference, it can't. For more on object capabilities, see
[Chip Morningstar's post](http://habitatchronicles.com/2017/05/what-are-capabilities/).

## ERTP Concepts Overview

### Asset

There are three kinds of assets:
Expand Down

0 comments on commit b605cd1

Please sign in to comment.