-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
508 lines (382 loc) · 11.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Web Ledgers v0.1</title>
<meta http-equiv="refresh" content="3600" >
<script src='https://www.w3.org/Tools/respec/respec-w3c-common' class='remove'></script>
<script class='remove'>
var respecConfig = {
specStatus: "CG-DRAFT",
editors: [{
name: "Melvin Carvalho",
url: "https://melvincarvalho.com/#me",
mailto: "melvincarvalho@gmail.com"
}],
authors: [{
name: "Melvin Carvalho",
url: "https://melvincarvalho.com/#me",
mailto: "melvincarvalho@gmail.com"
}],
wg: 'W3C Payments Community Group',
wgURI: 'https://www.w3.org/community/webpayments/',
wgPublicList: "public-webpayments",
processVersion: 2019,
edDraftURI: "https://github.com/solidpayorg/webledgers/",
shortName: "webledgers",
issueBase: "https://github.com/solidpayorg/webledgers/"
};
</script>
<style>
.turtle .hll {
background-color: #ffffcc
}
pre .highlight {
font-weight: bold;
color: green;
}
pre .comment {
color: SteelBlue;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
</style>
</head>
<body>
<section id='abstract'>
<p>
<i><b>A mapping of URIs to balances for the web</b></i>
</p>
<p>
<img src="https://www.w3.org/DesignIssues/diagrams/social/simondseconoart-small.png" />
</p>
<p>
Alice sends some credits to Bob on facebook. Bob sends to Carol's email. Carol sends Dan's mobile. Dan sends to
Erin on Telegram. And so on.
</p>
<p>
The web has evolved as a number of large silos operating socially with users inside each silo. This is analagous
to a phone system within a specific country. In order to call someone in another country, you need to use a
country code which people agree on. In the same way on the web URIs can operate as global codes, that act as a way
to connect different silos together.
</p>
<p>
Web Ledgers are a way to map URIs to balances, <i>within a given context</i>, on the web leading to a global
distributed ledgers comprising of billions of people. The context can be a platform, protocol, mesh network or
anything conceivable. By using URIs you create super keys
that allow the ledger to transcend any given local ecosystem, allowing interoperable economies to take shape.
</p>
<p>
This document specifies a format, interoperability guide lines, and operations that Web ledgers may support.
</p>
</p>
</section>
<section id='sotd'>
<p>
This document in an informal draft discussed in the <a href="https://www.w3.org/community/webpayments/">w3c web
payments
community group</a>.
</p>
</section>
<section>
<h2>Introduction</h2>
<p>A ledger in its simplest sense consists of two columns. The first column is an agent, the second column is a
balance.
</p>
<p>
This document specifies a format, and operations that Web Ledgers may support.
</p>
<p class="issue">
This entire document is a work in progress.
</p>
<section class="informative">
<h2>
Design Goals
</h2>
<p>
Web Ledgers are a component of larger systems, such as
the Linked Data ecosystem [[LINKED-DATA]], which have driven
the design goals for this specification. This section summarizes the
primary design goals for this specification.
</p>
<table class="simple">
<thead>
<tr>
<th>
Goal
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Simplicity
</td>
<td>
The ledger is designed to be as simple as possible. As such you just need two data points. The user and the balance.
</td>
</tr>
<tr>
<td>
Decentralization
</td>
<td>
The ledger should not be server specific, though it may be.
</td>
</tr>
<tr>
<td>
Security
</td>
<td>
Transmission of a ledger changes tend to be over encrypted channels.
</td>
</tr>
<tr>
<td>
Discoverability
</td>
<td>
It may be possible to discover more information about a URI by standard mechanisms of dereferencing,
including, but not limited to HTTP.
</td>
</tr>
<tr>
<td>
Interoperability
</td>
<td>
URIs are used to provide wide interoperability with existing systems on the web.
</td>
</tr>
<tr>
<td>
Portability
</td>
<td>
Be system and network-independent and
enable entities to use their digital identifiers with any
system that supports Web Ledgers.
</td>
</tr>
<tr>
<td>
Extensibility
</td>
<td>
When possible, enable extensibility
provided it does not greatly hinder interoperability,
portability, or simplicity.
</td>
</tr>
</tbody>
</table>
</section>
</section>
<section id="design" class="informative">
<h3>Terminology</h3>
<h3>Terminology</h3>
<dl class="termlist">
<dt><dfn lt="agent|agent">Agent</dfn></dt>
<dd>
An Agent is a URI that denotes a person, machine or account on the web.
</dd>
<dt><dfn lt="balance|balance">balance</dfn></dt>
<dd>
Each URI maps to a balance in the Web Ledger. A balance is a numerical value with an explicit or implicit
unit of currency. If not unit is stated the unit MAY be taken from the popular electronic coin, bitcoin, and
is
equal to 1 satoshi.
</dd>
<dt><dfn lt="currency|currency">currency</dfn></dt>
<dd>
A currency is denomination of a given balance
</dd>
<dt><dfn lt="decentralized system|decentralized systems">decentralized system</dfn></dt>
<dd>
A system in which lower level components operate on local information to
accomplish global goals. For example, an ant colony is a decentralized system
as there is no central control determining when food must be collected or
how new tunnels should be excavated.
</dd>
</dl>
</section>
<section id="Data Model" class="Data Model">
<h2>Data Model</h2>
The Web Ledgers data model is designed to have varying layers of complexity depending on the use case. Each
serialization is has different trade-offs.
<h3>CSV</h3>
<p>
CSV is probably the most simple format possible for a web ledger. It is simply a 2 column file (or database), the
first column MUST be a URI, and the 2nd column is a balance. It is by definition the simplest ledger one can keep.
The currency in this scenario is not explicity stated, but assumed across the system. The default is to assume
that balances are in satoshis, if no other information is found.
</p>
<pre <pre class="example highlight" title="Example of CSV based web ledger">
https://www.w3.org/People/Berners-Lee/card#i 100
</pre>
<h3>JSON-LD</h3>
<p>
JSON-LD format for a ledger consists of a URI and a balance.
</p>
<pre class="example highlight" title="Exammple of JSON based web ledger">
{ "@id": "https://www.w3.org/People/Berners-Lee/card#i",
"https://w3id.org/ledger#balance": [{ "@value": 100 }] }
</pre>
<h3>JSON</h3>
<p>
A simple JSON format for a ledger consists of a URI and a balance.
</p>
<pre class="example highlight" title="Exammple of JSON based web ledger">
{ "https://www.w3.org/People/Berners-Lee/card#i" : 100 }
</pre>
<h3>RDF</h3>
<p>
RDF is a framework for interoperability on the web. The serialization in this example it Turtle.
</p>
<pre class="example highlight" title="Example of Turtle based web ledger">
<https://www.w3.org/People/Berners-Lee/card#i> :balance 100 .
</pre>
<p>TODO : explain :balance</p>
</section>
<section id="implementations" class="informative">
<h3>Implementations</h3>
</section>
<section id="examples" class="appendix informative">
<h2>Examples</h2>
<h3>WebID</h3>
<p>
A WebID in CSV Format.
</p>
<code>
https://www.w3.org/People/Berners-Lee/card#i 100
</code>
<h3>Github</h3>
<p>
The popular git service.
</p>
<code>
https://github.com/solid-pay#this 100
</code>
<p>
seeAlso :
<a href="https://api.github.com/users/solid-pay">https://api.github.com/users/solid-pay</a>
add urn:json: to change this to linked data
</p>
<code>
"@context": {
"@base": "urn:json:"
}
</code>
<h3>Instagram</h3>
<p>
Ihe picture sharing site.
</p>
<h3>Stack Overflow</h3>
<p>
The popular question and answer web site.
</p>
<code>
https://stackoverflow.com/users/12345/user#this 100
</code>
<h3>Twitter</h3>
<p>
The popular microblogging service.
</p>
<code>
https://twitter.com/user#this 100
</code>
<h3>Reddit</h3>
<p>
The popular news service.
</p>
<code>
https://www.reddit.com/user/user#this 100
</code>
<h3>Mixcloud</h3>
<p>
The popular social music service.
</p>
<code>
https://www.mixcloud.com/mmhradio#this 100
</code>
<h3>Twitch</h3>
<p>
The popular streaming service.
</p>
<code>
https://www.twitch.tv/exbc#this 100
</code>
<h3>Youtube</h3>
<p>
The popular video service.
</p>
<code>
https://www.youtube.com/channel/1234wxyz#this 100
</code>
<h3>Voucher</h3>
<p>
A a voucher may be implemented using the webvoucher spec.
</p>
<code>
urn:voucher:1234567890abcdef 100
</code>
<h3>Email</h3>
<p>
An email in CSV Format.
</p>
<code>
mailto:timbl@w3.org 100
</code>
<h3>Mobile</h3>
<p>
An mobile phone.
</p>
<code>
tel:+15550909090
</code>
<h3>Crypto Currencies</h3>
<p>
Crypto currency.
</p>
<code>
bitcoin:1kr...
</code>
<h3>Nostr</h3>
<p>
Notes and other stuff over relays.
</p>
<code>
nostr:pubkey:pubkeyhash 100
</code>
<h3>Transaction Outputs</h3>
<p>
Transaction outputs used by bitcoin and forks.
</p>
<code>
txo:chain:txid:output 100
</code>
<h3>TBD</h3>
<p>
Telegram
</p>
<p>
IRC
</p>
</section>
<section id="examples" class="appendix informative">
<h3>Acknowledgements</h3>
</section>
<p>
The editor would like to thank the Web Payments Community Group.
</p>
<p>
Thanks to the following individuals, in order of their first name, for their input on the specification:
</p>
</body>
</html>