A mapping of URIs to balances for the web

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.

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.

Web Ledgers are a way to map URIs to balances, within a given context, 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.

This document specifies a format, interoperability guide lines, and operations that Web ledgers may support.

This document in an informal draft discussed in the w3c web payments community group.

Introduction

A ledger in its simplest sense consists of two columns. The first column is an agent, the second column is a balance.

This document specifies a format, and operations that Web Ledgers may support.

This entire document is a work in progress.

Design Goals

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.

Goal Description
Simplicity The ledger is designed to be as simple as possible. As such you just need two data points. The user and the balance.
Decentralization The ledger should not be server specific, though it may be.
Security Transmission of a ledger changes tend to be over encrypted channels.
Discoverability It may be possible to discover more information about a URI by standard mechanisms of dereferencing, including, but not limited to HTTP.
Interoperability URIs are used to provide wide interoperability with existing systems on the web.
Portability Be system and network-independent and enable entities to use their digital identifiers with any system that supports Web Ledgers.
Extensibility When possible, enable extensibility provided it does not greatly hinder interoperability, portability, or simplicity.

Terminology

Terminology

Agent
An Agent is a URI that denotes a person, machine or account on the web.
balance
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.
currency
A currency is denomination of a given balance
decentralized system
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.

Data Model

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.

CSV

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.

    https://www.w3.org/People/Berners-Lee/card#i 100
    

JSON-LD

JSON-LD format for a ledger consists of a URI and a balance.

            { "@id": "https://www.w3.org/People/Berners-Lee/card#i",
              "https://w3id.org/ledger#balance": [{ "@value": 100 }] }
        

JSON

A simple JSON format for a ledger consists of a URI and a balance.

        { "https://www.w3.org/People/Berners-Lee/card#i" : 100 }
    

RDF

RDF is a framework for interoperability on the web. The serialization in this example it Turtle.

        <https://www.w3.org/People/Berners-Lee/card#i> :balance 100 .
    

TODO : explain :balance

Implementations

Examples

WebID

A WebID in CSV Format.

https://www.w3.org/People/Berners-Lee/card#i 100

Github

The popular git service.

https://github.com/solid-pay#this 100

seeAlso : https://api.github.com/users/solid-pay add urn:json: to change this to linked data

"@context": { "@base": "urn:json:" }

Instagram

Ihe picture sharing site.

Stack Overflow

The popular question and answer web site.

https://stackoverflow.com/users/12345/user#this 100

Twitter

The popular microblogging service.

https://twitter.com/user#this 100

Reddit

The popular news service.

https://www.reddit.com/user/user#this 100

Mixcloud

The popular social music service.

https://www.mixcloud.com/mmhradio#this 100

Twitch

The popular streaming service.

https://www.twitch.tv/exbc#this 100

Youtube

The popular video service.

https://www.youtube.com/channel/1234wxyz#this 100

Voucher

A a voucher may be implemented using the webvoucher spec.

urn:voucher:1234567890abcdef 100

Email

An email in CSV Format.

mailto:timbl@w3.org 100

Mobile

An mobile phone.

tel:+15550909090

Crypto Currencies

Crypto currency.

bitcoin:1kr...

Nostr

Notes and other stuff over relays.

nostr:pubkey:pubkeyhash 100

Transaction Outputs

Transaction outputs used by bitcoin and forks.

txo:chain:txid:output 100

TBD

Telegram

IRC

Acknowledgements

The editor would like to thank the Web Payments Community Group.

Thanks to the following individuals, in order of their first name, for their input on the specification: