Web Ledgers provide a standardized method for mapping Uniform Resource Identifiers (URIs) to numerical balances on the web, enabling distributed ledger systems that transcend platform boundaries. This specification defines data models, serialization formats, and interoperability guidelines for creating decentralized economic systems using web-native identifiers.
By utilizing URIs as universal identifiers, Web Ledgers enable seamless value transfer between heterogeneous systems including social platforms, blockchain networks, communication protocols, and decentralized identity systems. The specification supports multiple serialization formats (JSON) and provides extensible entry types for different use cases.
This document defines the core data model, JSON Schema validation rules, and provides comprehensive examples demonstrating interoperability across platforms including Nostr, WebID, traditional web services, and cryptocurrency systems.
This document is an informal draft being discussed in the W3C Web Payments Community Group. It is not a W3C Standard nor is it on the W3C Standards Track.
This is a living document that may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
Comments and feedback on this specification are welcome and should be directed to the GitHub issues for this specification.
The modern web consists of numerous independent platforms and services, each maintaining their own user accounts and value systems. Traditional ledgers, in their simplest form, consist of two columns: an identifier for an agent and their corresponding balance. Web Ledgers extend this concept to the web scale by utilizing [[RFC3986]] Uniform Resource Identifiers (URIs) as universal identifiers that transcend platform boundaries.
This specification defines a standardized approach for representing and exchanging balance information across heterogeneous systems including social networks, blockchain platforms, communication protocols, and decentralized identity systems. By leveraging web standards and providing multiple serialization formats, Web Ledgers enable interoperability between previously incompatible systems.
The Web Ledgers specification provides:
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [[RFC2119]].
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. |
A structured JSON format for a ledger consists of an entries array with metadata and typed entries. The ledger can include a human-readable name and description to provide context about its purpose and contents. The amount field supports both simple string values (for single currency) and arrays of currency objects (for multi-currency entries).
{ "@context": "https://w3id.org/webledgers", "type": "WebLedger", "id": "https://example.com/ledger/1", "name": "WebLedgers Example", "description": "A ledger tracking balances across multiple platforms", "created": 1705316200, "updated": 1705316200, "defaultCurrency": "satoshi", "entries": [ { "type": "Entry", "url": "did:nostr:de7ecd1e2976a6adb2ffa5f4db81a7d812c8bb6698aa00dcf1e76adb55efd645", "amount": "132500" }, { "type": "Entry", "url": "https://www.w3.org/People/Berners-Lee/card#i", "amount": "100000" } ] }
All entries use the same "Entry" type but can have different properties depending on their purpose. The amount field can be either a simple string (for single currency in default denomination) or an array of currency objects (for multi-currency entries):
{ "@context": "https://w3id.org/webledgers", "type": "WebLedger", "id": "https://gaming.example.com/ledger/tournament", "name": "Gaming Tournament Rewards", "description": "Prize distribution ledger for esports tournament participants", "defaultCurrency": "satoshi", "entries": [ { "type": "Entry", "url": "did:nostr:de7ecd1e2976a6adb2ffa5f4db81a7d812c8bb6698aa00dcf1e76adb55efd645", "amount": "132500" }, { "type": "Entry", "url": "https://www.w3.org/People/Berners-Lee/card#i", "amount": [ {"currency": "satoshi", "value": "50000"}, {"currency": "USD", "value": "25.00"} ] }, { "type": "Entry", "url": "urn:voucher:1234567890abcdef", "amount": [ {"currency": "points", "value": "100"} ] } ] }
The amount field supports flexible serialization based on the currency context:
"amount": "100000"
"amount": [{"currency": "USD", "value": "25.00"}]
Web Ledgers can use descriptive names to clarify their purpose and context:
{ "@context": "https://w3id.org/webledgers", "type": "WebLedger", "id": "https://community.example.com/reputation", "name": "Developer Community Reputation", "description": "Reputation scores for open source contributors based on code contributions and peer reviews", "defaultCurrency": "reputation-points", "entries": [ { "type": "Entry", "url": "https://github.com/alice-dev#this", "amount": "2750" } ] }
{ "@context": "https://w3id.org/webledgers", "type": "WebLedger", "id": "https://university.example.edu/course-credits", "name": "Computer Science Course Credits", "description": "Academic credit tracking for CS degree program students", "defaultCurrency": "credit-hours", "entries": [ { "type": "Entry", "url": "mailto:student@university.example.edu", "amount": "120" } ] }
Web Ledgers implementations SHOULD consider the following security aspects:
Implementations SHOULD provide mechanisms to authenticate ledger updates and authorize balance modifications. Without proper authentication, malicious actors could manipulate balances or create fraudulent entries.
Recommended approaches include:
Implementations SHOULD implement mechanisms to ensure data integrity and prevent tampering. This includes:
All ledger data transmission MUST occur over secure channels (HTTPS/TLS) to prevent man-in-the-middle attacks and ensure confidentiality.
Web Ledgers may contain sensitive financial information. Implementations SHOULD consider the following privacy aspects:
Implementations SHOULD only store and transmit the minimum amount of information necessary for ledger functionality. Sensitive metadata should be avoided unless essential.
URIs used as identifiers may reveal personal information. Implementations SHOULD:
Implementations MUST provide appropriate access controls to prevent unauthorized access to balance information. This includes:
This section is informative and provides guidance for implementers of Web Ledgers systems.
A reference implementation is available at https://github.com/solidpayorg/webledgers-reference.
The following implementations are known to support Web Ledgers:
Nostr public keys represented as DIDs for decentralized social networking.
{ "type": "Entry", "url": "did:nostr:de7ecd1e2976a6adb2ffa5f4db81a7d812c8bb6698aa00dcf1e76adb55efd645", "amount": "132500" }
A WebID representing a person's web identity.
{ "type": "Entry", "url": "https://www.w3.org/People/Berners-Lee/card#i", "amount": "100000" }
The popular git service platform.
{ "type": "Entry", "url": "https://github.com/solid-pay#this", "amount": "75000" }
The microblogging service.
{ "type": "Entry", "url": "https://x.com/user#this", "amount": "50000" }
The video sharing platform.
{ "type": "Entry", "url": "https://www.youtube.com/channel/UCabcdef1234567890#this", "amount": "25000" }
Traditional email addresses as identifiers.
{ "type": "Entry", "url": "mailto:timbl@w3.org", "amount": "15000" }
Phone numbers as global identifiers.
{ "type": "Entry", "url": "tel:+15550909090", "amount": "10000" }
Bitcoin addresses as payment identifiers.
{ "type": "Entry", "url": "bitcoin:1Kr6QSydW9bFQG1mXiPNNu6WpJGmUa9i1g", "amount": "2100000" }
Bitcoin transaction outputs (UTXOs) as specific balance holders.
{ "type": "Entry", "url": "txo:btc:f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16:0", "amount": "5000000000" }
Digital vouchers following the webvoucher specification.
{ "type": "Entry", "url": "urn:voucher:1234567890abcdef", "amount": "25000" }
A complete ledger with multiple entry variations demonstrating the full data model with descriptive naming for clarity, including both simple string amounts and multi-currency arrays.
{ "@context": "https://w3id.org/webledgers", "type": "WebLedger", "id": "https://example.com/ledger/global", "name": "Universal Web Credits", "description": "Cross-platform ledger demonstrating interoperability between social networks, blockchain systems, and communication protocols", "created": 1705276800, "updated": 1705316200, "defaultCurrency": "satoshi", "entries": [ { "type": "Entry", "url": "did:nostr:de7ecd1e2976a6adb2ffa5f4db81a7d812c8bb6698aa00dcf1e76adb55efd645", "amount": "132500" }, { "type": "Entry", "url": "https://www.w3.org/People/Berners-Lee/card#i", "amount": [ {"currency": "satoshi", "value": "100000"}, {"currency": "USD", "value": "50.00"}, {"currency": "reputation-points", "value": "500"} ] }, { "type": "Entry", "url": "https://github.com/solid-pay#this", "amount": "75000" }, { "type": "Entry", "url": "mailto:timbl@w3.org", "amount": [ {"currency": "EUR", "value": "12.50"} ] }, { "type": "Entry", "url": "urn:voucher:1234567890abcdef", "amount": "25000" } ] }
The editor would like to thank the W3C Web Payments Community Group for their support and feedback during the development of this specification.
Special thanks to the following individuals and organizations for their contributions, feedback, and implementation efforts:
This specification builds upon the foundational work of the World Wide Web Consortium, particularly the URI specification [[RFC3986]] and the JSON-LD specification [[JSON-LD11]].