Skip to content
This repository was archived by the owner on Sep 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
24 changes: 12 additions & 12 deletions _content/0028-web-monetization.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ Web Monetization is a proposed browser API that uses ILP micropayments to moneti

### Design Goals

- Should be extremely simple for webmasters to use in their site.
- Backend infrastructure should be optional; should be usable on a static site.
- Should be extremely simple for webmasters to use in their sites.
- Back-end infrastructure should be optional, and should be usable on a static site.
- Should not require any interaction with the user.
- Should give user's browser a choice about how much to spend, and which sites to support.
- Should give the user's browser a choice about how much to spend, and which sites to support.
- Should give advanced webmasters a way to associate payments with their users, in order to unlock premium experiences.
- Should pay continuously as the user consumes content.
- Should be compatible with existing application and transport protocols on Interledger.

### Relation to Other Protocols

The W3C have published two payments related APIs for browsers, the Payment Request API and the Payment Handler API.
The W3C has published two payments-related APIs for browsers, the Payment Request API and the Payment Handler API.

The reason this API is not using the Payment Request API directly is that Web Monetization is intended for continuous payments rather than discrete payments. It is also not designed to have any user interaction. It is intended to provide a direct alternative to advertisements, rather than an alternative to existing checkout methods.
The reason this Web Monetization API is not using the Payment Request API directly is that Web Monetization is intended for continuous payments rather than discrete payments. It is also not designed to have any user interaction. It is intended to provide a direct alternative to advertisements, rather than an alternative to existing checkout methods.

Some changes will be required to Payment Request and Payment Handler to fully support Web Monetization in future, however this API brings the necessary features to the browser in a way that allows for tighter integration in the future.
Some changes will be required to Payment Request and Payment Handler to fully support Web Monetization in the future, however this API brings the necessary features to the browser in a way that allows for tighter integration in the future.

With advertisements, the user's browser decides whether to display the ads and the user decides whether to engage with the ads. With Web Monetization, the user's provider decides whether to pay the site and, if so, how much to pay.

Expand All @@ -45,9 +45,9 @@ This flow refers to the user's **browser** and the user's **provider**, [defined
- The user's browser sets `document.monetization` to an Object which implements [EventTarget](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget).
- The user's browser sets `document.monetization.state` to `pending`.
- The user's browser observes the `<head>` and looks for a Web Monetization `<meta name="monetization">` tag ([specified below](#meta-tags-set)).
- There MUST be only one `<meta name="monetization">` tag at any given time
- There MUST be only one `<meta name="monetization">` tag at any given time.
- The `<meta>` Tags Set MUST be in the `<head>` of the document.
- The `<meta>` Tags Set MUST be in the top level window (i.e. not inside an iframe)
- The `<meta>` Tags Set MUST be in the top level window (i.e., not inside an iframe)

- Below is repeated for every semantically (consider `meta.content = meta.content`) new `<meta name="monetization">` tag seen for the life of the page:
- If any of the Web Monetization `<meta>` Tags Set are malformed, the browser will stop here. The user's browser SHOULD report a warning via the console.
Expand All @@ -64,10 +64,10 @@ This flow refers to the user's **browser** and the user's **provider**, [defined
- This event has a `detail` field with an object containing the Payment Setup Endpoint and the Monetization ID ([specified below](#monetizationstart)).
- The user's browser also emits a `monetizationprogress` ([specified below](#monetizationprogress)) event from `document.monetization`, corresponding to this first packet. If there are no listeners the event MAY NOT be emitted.
- Payment continues for the lifetime of a given meta tag (or semantically equivalent)
- The provider MAY decide to stop/start payment at any time, e.g. if the user is idle, backgrounds the page, or instructs the browser to do so.
- The provider MAY decide to stop/start payment at any time, such as if the user is idle, backgrounds the page, or instructs the browser to do so.
- If the STREAM connection is severed, the provider will redo the SPSP query to the same Payment Setup Endpoint as before with the same Monetization ID. The user's browser MUST NOT re-process the `<meta>` Tags Set.
- Each time a packet with a nonzero amount is fulfilled, the provider notifies the browser, and the browser emits an event on `document.monetization`. The event's type is `monetizationprogress`. The event has a `detail` field containing the details of the packet ([specified below](#monetizationprogress)). If there are no listeners the event MAY NOT be emitted.
- When a stream is closed the `document.monetization.state` MUST be set back to 'pending'
- When a stream is closed, the `document.monetization.state` MUST be set back to 'pending'

### Payment Handler Flow

Expand All @@ -94,7 +94,7 @@ A provider can be implemented as a Payment Handler supporting the 'webmonetizati

The `<meta>` Tags Set MUST be in the document's `<head>`. The `<meta>` Tags Set allows the user's browser to pay a site via Web Monetization by specifying a [Payment Pointer](../0026-payment-pointers/0026-payment-pointers.md) or [SPSP](../0009-simple-payment-setup-protocol) url.

The `name` of the `<meta>` tags all start with `monetization`. The table below lists the different `name`s and the formats of their `content`. Currently there is only one tag, but this may be expanded in the future so care MUST be given to altering a Tags Set such that `<meta name="monetization">` is the last one modified.
The `name` of the `<meta>` tags all start with `monetization`. The table below lists the different `name` values and the formats of their `content`. Currently there is only one tag, but this may be expanded in the future so care MUST be given to altering a Tags Set such that `<meta name="monetization">` is the last one modified.


| Name | Required? | Format | Description |
Expand Down Expand Up @@ -171,4 +171,4 @@ Contains the `Monetization ID` (currently referred to as `requestId` in the even

```http
Web-Monetization-Id: dcd479ad-7d8d-4210-956a-13c14b8c67eb
```
```
8 changes: 4 additions & 4 deletions _content/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The official Interledger community forum can be found [forum.interledger.org][4]

## Bi-Weekly Calls

We have open community calls **every other Wednesday at 4pm UTC** to discuss the latest in Interledger spec development, the implementations, and to answer any questions people have. Agendas are sent out via the mailing list and anyone can suggest an agenda item by adding to the [topic][5] created for that purpose in the forum.
We have open community calls **every other Wednesday at 4pm UTC** to discuss the latest in Interledger spec development, the implementations, and to answer any questions people have. Agendas are sent out via the mailing list and anyone can suggest an agenda item by adding to the [topic][5] created for that purpose in the forum.

Recordings of previous calls are available [here][6].

Expand All @@ -25,15 +25,15 @@ Recordings of previous calls are available [here][6].

All announcements, including about upcoming in-person meetings, and many technical discussions are done through the W3C Interledger Community Group Mailing List. Have ideas to share or just want to keep up with the latest developments? [Join the Community Group][7].

The mailing list archive is available [here][8].
The mailing list archive is available [here][8].

### IETF

Since presenting the Interledger project at IETF Berlin, the IETF have established another mailing list for the IETF community interested in the project; [[email protected]][9]

## Slack

Want to chat about Interledger or have a question to ask? [Join on Slack][10]
Want to chat about Interledger or have a question to ask? [Join on Slack][10].

## Twitter

Expand All @@ -54,4 +54,4 @@ You can watch the videos from the 2019 summit [here][12]. Sign up on the forum o
[9]: https://www.ietf.org/mailman/listinfo/ledger
[10]: https://communityinviter.com/apps/interledger/interledger-working-groups-slack
[11]: https://twitter.com/interledger
[12]: /summit-2019.html
[12]: /summit-2019.html
5 changes: 2 additions & 3 deletions _content/connect-ilp-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ This tutorial describes how to:

For this tutorial you will need to:

1. Install `moneyd` and SPSP. You can learn how to install `moneyd`
and SPSP from the [Getting Started](getting-started.html) tutorial.
1. Install `moneyd` and SPSP. You can learn how to install `moneyd` and SPSP from the [Getting Started](getting-started.html) tutorial.
2. Install the [moneyd XRP uplink](https://github.com/interledgerjs/moneyd#uplinks) using the command:

npm install -g moneyd-uplink-xrp
Expand All @@ -38,7 +37,7 @@ To configure `moneyd`:
js1.xpring.dev


3. Press enter for all other default options.
3. Press Enter for all other default options.


## Starting moneyd
Expand Down
34 changes: 17 additions & 17 deletions _content/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@

This tutorial describes how to:

1. Install [`moneyd`](https://github.com/interledgerjs/moneyd) on your system
2. Start an [Interledger node](https://github.com/interledgerjs/ilp-connector) on a local test network using moneyd
3. Send and receive value using the [SPSP](https://github.com/interledgerjs/ilp-protocol-spsp) (Simple Payment Setup Protocol) API
1. Install [`moneyd`](https://github.com/interledgerjs/moneyd) on your system.
2. Start an [Interledger node](https://github.com/interledgerjs/ilp-connector) on a local test network using moneyd.
3. Send and receive value using the [SPSP](https://github.com/interledgerjs/ilp-protocol-spsp) (Simple Payment Setup Protocol) API.


## Before you begin

Install a stable version of [Node.js](https://nodejs.org/en/) (10.16.0 LTS is recommended)
Install a stable version of [Node.js](https://nodejs.org/en/) (10.16.0 LTS is recommended).

**Note:** For this tutorial you *do not* need to use any cryptocurrency. Since you will be running ILP
on a local test network, settlement (moving real money) does not take place.
**Note:** For this tutorial you *do not* need to use any cryptocurrency. Since you will be running ILP
on a local test network, settlement (moving real money) does not take place.


## Installing moneyd
## Install moneyd

To install `moneyd`, open a terminal and run the following command:

```shell
$ npm install -g moneyd
```

## Starting moneyd
## Start moneyd
After you’ve installed `moneyd`, run the following command to start your local node:

```shell
Expand All @@ -31,39 +31,39 @@ $ moneyd local
Running the above command creates an Interledger node that listens on port 7768.


## Sending and receiving value
## Send and receive value

Once you have `moneyd` running, you can send and receive value over ILP using the SPSP API. For this tutorial,
Once you have `moneyd` running, you can send and receive value over ILP using the SPSP API. For this tutorial,
we’ll use the SPSP command line tool.

### Installing the SPSP client and server
### Install the SPSP client and server

To install an SPSP client and server, open a new terminal and run:

```shell
$ npm install -g ilp-spsp ilp-spsp-server
```

### Starting the SPSP server
### Start the SPSP server

By default, the SPSP server uses [localtunnel](https://localtunnel.github.io/www/) to create an HTTP endpoint.
By default, the SPSP server uses [localtunnel](https://localtunnel.github.io/www/) to create an HTTP endpoint.
Alternatively, you can set up the server on `localhost` and `port` by disabling localtunnel.

To receive value, start the SPSP server using the following command:

```shell
$ ilp-spsp-server --localtunnel false --port 8080
```
The above command will create `http://localhost:8080` as your HTTP endpoint.
The above command will create `http://localhost:8080` as your HTTP endpoint.

### Sending value
### Send value

Now, to send value, open another terminal and run:

```shell
$ ilp-spsp send --amount 10 --receiver 'http://localhost:8080'
```

You should see `sent!` on the sending terminal and `got packet for 10 units` on the receiving terminal confirming
that you have successfully sent and received value through the Interledger protocol. You are now ready to [use
You should see `sent!` on the sending terminal and `got packet for 10 units` on the receiving terminal confirming
that you have successfully sent and received value through the Interledger protocol. You are now ready to [use
SPSP in your applications.](sending-value-programmatically.html)
Loading