Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit957a8e2

Browse files
authored
docs: clarify monetization property application (WICG#500)
1 parentf6b884c commit957a8e2

File tree

1 file changed

+67
-40
lines changed

1 file changed

+67
-40
lines changed

‎src/content/docs/docs/references/activitystreams.mdx‎

Lines changed: 67 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,23 @@
22
title:'Activity Streams JSON-LD'
33
---
44

5-
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.
5+
Social web community servers and apps can expose the wallet address of a user or post to a Web Monetization client, such as the Web Monetization browser extension or embedded SDK.
66

7-
Web Monetizationlinks 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 Web Monetization namespace (`https://webmonetization.org/ns.jsonld`).
7+
The`monetization` property from theWeb Monetizationnamespace (`https://webmonetization.org/ns.jsonld`) applies to an[Activity Streams 2.0](https://www.w3.org/TR/activitystreams-core/)[`Object`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-object).
88

9-
###User`Profile` example
9+
A Web Monetization wallet address may be applied to either an[`Actor`](https://www.w3.org/TR/activitystreams-vocabulary/#actor-types) performing an action of creation or an[Object Type](https://www.w3.org/TR/activitystreams-vocabulary/#object-types) created by the`Actor`.
10+
11+
A`monetization` property must only be applied to an[Object Type](https://www.w3.org/TR/activitystreams-vocabulary/#object-types) when its desired monetization attribution is distinct from the[`Actor`](https://www.w3.org/TR/activitystreams-vocabulary/#actor-types) who created it.
12+
13+
###User profile example
1014

1115
```jsonc
1216
{
1317
"@context": [
1418
"https://www.w3.org/ns/activitystreams",
1519
"https://w3id.org/security/v1",
1620

17-
// Add the Web Monetizationnamespace
21+
// Add the Web Monetizationcontext
1822
"https://webmonetization.org/ns.jsonld",
1923

2024
{
@@ -37,75 +41,98 @@ Web Monetization links are represented in [Activity Streams 2.0](https://www.w3.
3741
"sharedInbox":"https://alpaca.gold/inbox"
3842
},
3943
"tag": [{
40-
"type":"Hashtag",
41-
"href":"https://alpaca.gold/tags/WebMonetizationRocks",
42-
"name":"#WebMonetizationRocks"
44+
"type":"Hashtag",
45+
"href":"https://alpaca.gold/tags/WebMonetizationRocks",
46+
"name":"#WebMonetizationRocks"
4347
}],
4448

45-
// Wallet address when viewing this user’s profile
49+
// Wallet address when viewing this user’s profile and posts
4650
"monetization":"https://fynbos.me/jeremiah"
4751
}
4852
```
4953

5054
###User post (`Note`) example
5155

56+
```jsonc
57+
{
58+
"@context": [
59+
"https://www.w3.org/ns/activitystreams",
60+
"https://webmonetization.org/ns.jsonld",
61+
62+
// Add the Web Monetization context
63+
"https://webmonetization.org/ns.jsonld",
64+
65+
{
66+
"ostatus":"http://ostatus.org#",
67+
"atomUri":"ostatus:atomUri",
68+
"conversation":"ostatus:conversation"
69+
}
70+
],
71+
"id":"https://demo.interledger.social/users/WebMonetizationTest/statuses/113917664614618248",
72+
"type":"Note",
73+
"published":"2025-01-30T14:00:14Z",
74+
"url":"https://demo.interledger.social/@WebMonetizationTest/113917664614618248",
75+
"attributedTo":"https://demo.interledger.social/users/WebMonetizationTest",
76+
"to": ["https://www.w3.org/ns/activitystreams#Public"],
77+
"cc": [
78+
"https://demo.interledger.social/users/WebMonetizationTest/followers",
79+
"https://alpaca.gold/users/Jeremiah"
80+
],
81+
"atomUri":"https://demo.interledger.social/users/WebMonetizationTest/statuses/113917664614618248",
82+
"conversation":"tag:demo.interledger.social,2025-01-30:objectId=26:objectType=Conversation",
83+
"content":"<p>“When you go viral, you should get paid.” —<span class=\"h-card\" translate=\"no\"><a href=\"https://alpaca.gold/@Jeremiah\" class=\"u-url mention\">@<span>Jeremiah</span></a></span></p>",
84+
"contentMap": {
85+
"en":"<p>“When you go viral, you should get paid.” —<span class=\"h-card\" translate=\"no\"><a href=\"https://alpaca.gold/@Jeremiah\" class=\"u-url mention\">@<span>Jeremiah</span></a></span></p>"
86+
},
87+
"tag": [{
88+
"type":"Mention",
89+
"href":"https://alpaca.gold/users/Jeremiah",
90+
"name":"@Jeremiah@alpaca.gold"
91+
}],
92+
93+
// Wallet address distinct from the Note’s author
94+
"monetization":"https://fynbos.me/jeremiah"
95+
}
96+
```
97+
98+
###Post with multiple wallet addresses example
99+
52100
```jsonc
53101
{
54102
"@context": [
55103
"https://www.w3.org/ns/activitystreams",
56104

57-
// Add the Web Monetizationnamespace
105+
// Add the Web Monetizationcontext
58106
"https://webmonetization.org/ns.jsonld",
59107

60108
{
61109
"ostatus":"http://ostatus.org#",
62110
"atomUri":"ostatus:atomUri",
63-
"inReplyToAtomUri":"ostatus:inReplyToAtomUri",
64111
"conversation":"ostatus:conversation",
65-
"sensitive":"as:sensitive",
66112
"Hashtag":"as:Hashtag"
67113
}
68114
],
69-
"id":"https://alpaca.gold/users/Jeremiah/statuses/113677237228956618",
115+
"id":"https://alpaca.gold/users/Jeremiah/statuses/816659822732776311",
70116
"type":"Note",
71-
"published":"2024-12-19T02:56:24Z",
72-
"url":"https://alpaca.gold/@Jeremiah/113677237228956618",
117+
"published":"2025-03-03T02:03:03Z",
118+
"url":"https://alpaca.gold/@Jeremiah/816659822732776311",
73119
"attributedTo":"https://alpaca.gold/users/Jeremiah",
74120
"to": ["https://www.w3.org/ns/activitystreams#Public"],
75121
"cc": ["https://alpaca.gold/users/Jeremiah/followers"],
76-
"sensitive":false,
77-
"atomUri":"https://alpaca.gold/users/Jeremiah/statuses/113677237228956618",
78-
"inReplyToAtomUri":null,
79-
"conversation":"tag:alpaca.gold,2024-12-19:objectId=3727991:objectType=Conversation",
80-
"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>",
81-
"attachment": [],
82-
"tag": [{
83-
"type":"Hashtag",
84-
"href":"https://alpaca.gold/tags/webmonetizationrocks",
85-
"name":"#webmonetizationrocks"
86-
}],
122+
"atomUri":"https://alpaca.gold/users/Jeremiah/statuses/816659822732776311",
123+
"conversation":"tag:alpaca.gold,2025-03-03:objectId=4838002:objectType=Conversation",
124+
"content":"<p>I can’t take full credit for the awesomeness of this post.</p>",
87125
"replies": {
88-
"id":"https://alpaca.gold/users/Jeremiah/statuses/113677237228956618/replies",
126+
"id":"https://alpaca.gold/users/Jeremiah/statuses/816659822732776311/replies",
89127
"type":"Collection",
90128
"first": {
91129
"type":"CollectionPage",
92-
"next":"https://alpaca.gold/users/Jeremiah/statuses/113677237228956618/replies?only_other_accounts=true&page=true",
93-
"partOf":"https://alpaca.gold/users/Jeremiah/statuses/113677237228956618/replies",
94-
"items": []
130+
"next":"https://alpaca.gold/users/Jeremiah/statuses/816659822732776311/replies?only_other_accounts=true&page=true",
131+
"partOf":"https://alpaca.gold/users/Jeremiah/statuses/816659822732776311/replies"
95132
}
96133
},
97-
"likes": {
98-
"id":"https://alpaca.gold/users/Jeremiah/statuses/113677237228956618/likes",
99-
"type":"Collection",
100-
"totalItems":42
101-
},
102-
"shares": {
103-
"id":"https://alpaca.gold/users/Jeremiah/statuses/113677237228956618/shares",
104-
"type":"Collection",
105-
"totalItems":9
106-
},
107134

108135
// Wallet address when viewing this Note
109-
"monetization":"https://fynbos.me/jeremiah"
136+
"monetization":["https://fynbos.me/jeremiah","https://fynbos.me/adam"]
110137
}
111138
```

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp