-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add wallet linking, deprecations
- Add wallet linking documentation for RSS feeds, social web - Update HTML wallet linking documentation to align with other formats - Add dedicated deprecations page - Remove deprecated MonetizationEvent properties from navigation
- Loading branch information
1 parent
32ca64a
commit f624411
Showing
5 changed files
with
367 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
--- | ||
title: 'Activity Streams JSON-LD' | ||
--- | ||
|
||
Social web community servers and apps can expose the wallet address of a user’s profile or post to a Web Monetization client, such as the Web Monetization browser extension or embedded SDK. | ||
|
||
Web Monetization links are represented in [Activity Streams 2.0](https://www.w3.org/TR/activitystreams-core/) [Object Types](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-object) using the `monetization` property from the Open Payments namespace (`https://interledger.org/ns/openpayments`). | ||
|
||
### User `Profile` example | ||
|
||
```jsonc | ||
{ | ||
"@context": [ | ||
"https://www.w3.org/ns/activitystreams", | ||
"https://w3id.org/security/v1", | ||
|
||
// Add the Open Payments namespace | ||
"https://interledger.org/ns/openpayments", | ||
|
||
{ | ||
"Hashtag": "as:Hashtag" | ||
} | ||
], | ||
"id": "https://alpaca.gold/users/Jeremiah", | ||
"type": "Person", | ||
"following": "https://alpaca.gold/users/Jeremiah/following", | ||
"followers": "https://alpaca.gold/users/Jeremiah/followers", | ||
"inbox": "https://alpaca.gold/users/Jeremiah/inbox", | ||
"outbox": "https://alpaca.gold/users/Jeremiah/outbox", | ||
"preferredUsername": "Jeremiah", | ||
"name": "Jeremiah Lee", | ||
"summary": "<p>I want you to get paid when you go viral. <a href=\"https://alpaca.gold/tags/WebMonetizationRocks\" class=\"mention hashtag\" rel=\"tag\">#<span>WebMonetizationRocks</span></a></p>", | ||
"url": "https://alpaca.gold/@Jeremiah", | ||
"published": "2023-01-06T00:00:00Z", | ||
"publicKey": {}, | ||
"endpoints": { | ||
"sharedInbox": "https://alpaca.gold/inbox" | ||
}, | ||
"tag": [{ | ||
"type": "Hashtag", | ||
"href": "https://alpaca.gold/tags/WebMonetizationRocks", | ||
"name": "#WebMonetizationRocks" | ||
}], | ||
|
||
// Wallet address when viewing this user’s profile | ||
"monetization": "https://fynbos.me/jeremiah" | ||
} | ||
``` | ||
|
||
### User post (`Note`) example | ||
|
||
```jsonc | ||
{ | ||
"@context": [ | ||
"https://www.w3.org/ns/activitystreams", | ||
|
||
// Add the Open Payments namespace | ||
"https://interledger.org/ns/openpayments", | ||
|
||
{ | ||
"ostatus": "http://ostatus.org#", | ||
"atomUri": "ostatus:atomUri", | ||
"inReplyToAtomUri": "ostatus:inReplyToAtomUri", | ||
"conversation": "ostatus:conversation", | ||
"sensitive": "as:sensitive", | ||
"Hashtag": "as:Hashtag" | ||
} | ||
], | ||
"id": "https://alpaca.gold/users/Jeremiah/statuses/113677237228956618", | ||
"type": "Note", | ||
"published": "2024-12-19T02:56:24Z", | ||
"url": "https://alpaca.gold/@Jeremiah/113677237228956618", | ||
"attributedTo": "https://alpaca.gold/users/Jeremiah", | ||
"to": ["https://www.w3.org/ns/activitystreams#Public"], | ||
"cc": ["https://alpaca.gold/users/Jeremiah/followers"], | ||
"sensitive": false, | ||
"atomUri": "https://alpaca.gold/users/Jeremiah/statuses/113677237228956618", | ||
"inReplyToAtomUri": null, | ||
"conversation": "tag:alpaca.gold,2024-12-19:objectId=3727991:objectType=Conversation", | ||
"content": "<p>When you go viral, you should get paid. <a href=\"https://alpaca.gold/tags/WebMonetizationRocks\" class=\"mention hashtag\" rel=\"tag\">#<span>WebMonetizationRocks</span></a></p>", | ||
"attachment": [], | ||
"tag": [{ | ||
"type": "Hashtag", | ||
"href": "https://alpaca.gold/tags/webmonetizationrocks", | ||
"name": "#webmonetizationrocks" | ||
}], | ||
"replies": { | ||
"id": "https://alpaca.gold/users/Jeremiah/statuses/113677237228956618/replies", | ||
"type": "Collection", | ||
"first": { | ||
"type": "CollectionPage", | ||
"next": "https://alpaca.gold/users/Jeremiah/statuses/113677237228956618/replies?only_other_accounts=true&page=true", | ||
"partOf": "https://alpaca.gold/users/Jeremiah/statuses/113677237228956618/replies", | ||
"items": [] | ||
} | ||
}, | ||
"likes": { | ||
"id": "https://alpaca.gold/users/Jeremiah/statuses/113677237228956618/likes", | ||
"type": "Collection", | ||
"totalItems": 42 | ||
}, | ||
"shares": { | ||
"id": "https://alpaca.gold/users/Jeremiah/statuses/113677237228956618/shares", | ||
"type": "Collection", | ||
"totalItems": 9 | ||
}, | ||
|
||
// Wallet address when viewing this Note | ||
"monetization": "https://fynbos.me/jeremiah" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
title: 'Deprecations' | ||
--- | ||
|
||
import { LinkOut } from '@interledger/docs-design-system' | ||
|
||
## 2024-01-01 | ||
|
||
### `<meta>` element removed | ||
|
||
Earlier versions of the Web Monetization specification supported both the `<meta>` and `<link>` elements. Now, only the `<link>` element is supported. | ||
|
||
### Interledger Protocol payment pointers replaced with Open Payments wallet addresses | ||
|
||
Web Monetization now uses the [Open Payments API specification](https://openpayments.dev/) instead of the [STREAM Interledger Transport protocol](https://interledger.org/developers/rfcs/stream-protocol/). A monetization link now must be the URL of an Open Payments wallet address. Open Payments wallet addresses do not support payment pointer shorthand (e.g. `$wallet.example/alice`) and must be fully expressed URLs (e.g. `https://wallet.example/alice`). | ||
|
||
If your Web Monetization provider has not provided you a wallet address, try converting your payment pointer from a shorthand form to URL on <LinkOut href="https://paymentpointers.org">paymentpointers.org</LinkOut>. | ||
|
||
### `MonetizationEvent` attributes `amount`, `assetCode`, `assetScale`, `receipt` removed | ||
|
||
Web Monetization now uses the [Open Payments API specification](https://openpayments.dev/) instead of the [STREAM Interledger Transport protocol](https://interledger.org/developers/rfcs/stream-protocol/). | ||
|
||
`MonetizationEvent` now represents the amount sent instead of the amount received. The new `incomingPayment` attribute may be used to determine the amount received. Therefore, `amount`, `assetCode`, `assetScale` are no longer attributes on the event. Consider using [`amountSent`](/docs/references/attributes/amountsent) instead. | ||
|
||
STREAM receipts are no longer relevant to the `MonetizationEvent` and have been removed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.