diff --git a/README.md b/README.md index bb599b9..eeea0df 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # The Wired -The Wired is an open protocol for the metaverse. -It is a collection of open standards focused on interactive 3D environments, -self-sovereign identity, and seamless interoperability. +The Wired is an open protocol for the metaverse. It is a collection of open +standards focused on interactive 3D environments, self-sovereign identity, and +seamless interoperability. ## Protocol @@ -11,13 +11,18 @@ self-sovereign identity, and seamless interoperability. ## Motivation -Today's VR ecosystem is fragmented by proprietary platforms that confine users and developers to isolated, controlled environments. -Each platform enforces its own set of rules and restrictions, often under leadership -that makes arbitrary decisions with no recourse for the people who live within the virtual spaces they govern. +Today's VR ecosystem is fragmented by proprietary platforms that confine users +and developers to isolated, controlled environments. Each platform enforces its +own set of rules and restrictions, often under leadership that makes arbitrary +decisions with no recourse for the people who live within the virtual spaces +they govern[^1]. -With VR our digital rights matter more than ever. -The Wired acknowledges this importance by fostering a decentralized environment where anyone -can contribute and shape the future of the metaverse. +With VR our digital rights matter more than ever. The Wired acknowledges this +importance by fostering a decentralized environment where anyone can contribute +and shape the future of the metaverse. -By embracing open source principles, The Wired doesn't just safeguard against abuse; -it unleashes a wave of creativity and collaboration not possible within walled gardens. +By embracing open source principles, The Wired doesn't just safeguard against +abuse; it unleashes a wave of creativity and collaboration not possible within +walled gardens. + +[^1]: (https://www.ign.com/articles/vrchat-bans-mods-community-angry) diff --git a/social/README.md b/social/README.md index e9066a9..0c5ad0b 100644 --- a/social/README.md +++ b/social/README.md @@ -1,41 +1,50 @@ # Social Protocol -The Wired's social protocol provides an application-agnostic self-hostable base layer for user identity and data storage. +The Wired's social protocol provides an application-agnostic self-hostable base +layer for user identity and data storage. -## Decentralized Identifiers (DIDs) +## Identity -[Decentralized Identifiers](https://en.wikipedia.org/wiki/Decentralized_identifier) (DIDs) provide a -globally unique namespace for both users and content within The Wired. +[Decentralized Identifiers](https://en.wikipedia.org/wiki/Decentralized_identifier) +(DIDs) provide a globally unique namespace for users within The Wired. -DIDs are a generic format for addressing content that can be extended to support any protocol. -For example, [`did:web`](https://w3c-ccg.github.io/did-method-web/) can be used to address content using a traditional web URL, -while [`did:ipid`](https://did-ipid.github.io/ipid-did-method/) can be used to address content over [IPFS](https://docs.ipfs.tech/). +DIDs are a generic format for addressing content that can be extended to support +any protocol. For example, [`did:web`](https://w3c-ccg.github.io/did-method-web/) +can be used to address content using a traditional web URL, while +[`did:ipid`](https://did-ipid.github.io/ipid-did-method/) can be used to address +content over [IPFS](https://docs.ipfs.tech/). -A user's DID resolves to a document containing information such as their name, -cryptographic keys that can be used to verify their identity, servers to contact them at, and anything else they want to store. +Each DID resolves to a JSON document containing information such as the user's +name, cryptographic keys that can be used to verify their identity, servers to +contact them at, and anything else they want to store. ### DID Host -A DID host is a server that remotely hosts a DID and provides convenient access to it. -For example, the server may use a method like `did:web` and host your DID document at a web domain. +A DID host is a server that remotely hosts a DID and provides convenient access +to it. For example, the server may use a method like `did:web` and host your DID +document at a web domain. -You can log in to the server with a typical login method - such as a username and password or OAuth connection - then receive -cryptographic keys which can be used to verify your ownership of the hosted DID to other parties. -This allows you to use DIDs with the convienance of traditional app logins. +You could then log in to the server with a typical login method - such as a +username and password or OAuth connection - then receive session keys which can +be used to verify your ownership of the hosted DID to other parties. This allows +you to use DIDs with the convienance of traditional app logins. -Running your own DID host server is a great first step towards self-sovereignity within The Wired. +Running your own DID host server is a great first step towards self-sovereignity +within The Wired. -## Decentralized Web Nodes (DWNs) +## Data -[Decentralized Web Nodes](https://identity.foundation/decentralized-web-node/spec/) (DWNs) are the data layer of The Wired. -DWNs build upon DIDs to store user data and provide an API for others to interact with it. -These interactions could be a simple read to view a document hosted by the user, or more complex writes to add +[Decentralized Web Nodes](https://identity.foundation/decentralized-web-node/spec/) +(DWNs) are the data layer of The Wired. DWNs build upon DIDs to store user data +and provide an API for others to interact with it. These interactions could be a +simple read to view data hosted by the user, or more complex writes to add comments or send encrypted messages. -DWNs are built using [CRDT](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type)s and will sync their data -with other DWNs. -This allows you, for example, to make use of a public cloud-hosted DWN, while at the same time running your own -local DWN to keep a backup of your data. +DWNs are built using +[CRDT](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type)s that +sync their data with other DWNs. This allows you to, for example, make use of a +public cloud-hosted DWN, while at the same time running your own local DWN to +keep a backup of your data. ## Moderation @@ -45,5 +54,6 @@ There is no central registry of users - a user cannot be "banned" from The Wired Same with any content within The Wired - files can be hosted and shared by anyone. That's just the internet. -However specific services (websites, worlds, APIs) can and WILL moderate as necessary - -but like the Web, users will always have the option of moving to a different service they are not banned from (or running their own). +However specific services (websites, worlds, APIs) can and WILL moderate as +necessary - but like the Web, users will always have the option of moving to a +different service they are not banned from (or running their own). diff --git a/social/dwn/protocols/world-host.json b/social/dwn/protocols/world-host.json index 74c82f3..b8c74c2 100644 --- a/social/dwn/protocols/world-host.json +++ b/social/dwn/protocols/world-host.json @@ -2,16 +2,16 @@ "protocol": "https://wired-protocol.org/v0/protocols/world-host.json", "published": true, "types": { - "instance": { - "schema": "https://wired-protocol.org/v0/schemas/instance.json", - "dataFormat": ["application/json"] + "connect-url": { + "dataFormat": ["text/plain"] }, - "instance-info": { - "schema": "https://wired-protocol.org/v0/schemas/instance-info.json", + "host-info": { + "schema": "https://wired-protocol.org/v0/schemas/host-info.json", "dataFormat": ["application/json"] }, - "connect-url": { - "dataFormat": ["text/plain"] + "world": { + "schema": "https://wired-protocol.org/v0/schemas/world.json", + "dataFormat": ["application/json"] } }, "structure": { @@ -27,14 +27,14 @@ } ] }, - "instance": { + "world": { "$actions": [ { "who": "anyone", "can": ["read", "write"] } ], - "instance-info": { + "host-info": { "$actions": [ { "who": "anyone", @@ -42,7 +42,7 @@ }, { "who": "recipient", - "of": "instance", + "of": "world", "can": ["write"] } ] diff --git a/social/dwn/schemas/home.json b/social/dwn/schemas/home.json index b412a23..bc019e9 100644 --- a/social/dwn/schemas/home.json +++ b/social/dwn/schemas/home.json @@ -2,6 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://wired-protocol.org/v0/schemas/home.json", "type": "object", + "description": "Defines a user's home world.", "properties": { "world": { "type": "object", diff --git a/social/dwn/schemas/host-info.json b/social/dwn/schemas/host-info.json new file mode 100644 index 0000000..d6ed6a6 --- /dev/null +++ b/social/dwn/schemas/host-info.json @@ -0,0 +1,22 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://wired-protocol.org/v0/schemas/host-info.json", + "type": "object", + "properties": { + "active": { + "description": "Whether the world is currently being hosted.", + "type": "boolean" + }, + "numPlayers": { + "description": "The number of currently connected players.", + "type": "number" + }, + "maxPlayers": { + "description": "The maximum number of players allowed to join.", + "type": "number" + }, + "extras": { + "type": "object" + } + } +} diff --git a/social/dwn/schemas/instance-info.json b/social/dwn/schemas/instance-info.json deleted file mode 100644 index 98f1eff..0000000 --- a/social/dwn/schemas/instance-info.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://wired-protocol.org/v0/schemas/instance-info.json", - "type": "object", - "properties": { - "numPlayers": { - "type": "number" - }, - "maxPlayers": { - "type": "number" - }, - "extras": { - "type": "object" - } - } -} diff --git a/social/dwn/schemas/instance.json b/social/dwn/schemas/instance.json deleted file mode 100644 index c4654eb..0000000 --- a/social/dwn/schemas/instance.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://wired-protocol.org/v0/schemas/instance.json", - "type": "object", - "properties": { - "world": { - "type": "object", - "properties": { - "did": { - "type": "string" - }, - "record_id": { - "type": "string" - } - }, - "required": ["did", "record_id"] - } - }, - "required": ["world"] -} diff --git a/social/dwn/schemas/world.json b/social/dwn/schemas/world.json index fd8fd5e..291a3d1 100644 --- a/social/dwn/schemas/world.json +++ b/social/dwn/schemas/world.json @@ -15,10 +15,6 @@ "type": "string" } }, - "host": { - "type": "string", - "description": "DID of the world host." - }, "extras": { "type": "object" } diff --git a/spatial/README.md b/spatial/README.md index f02f44c..5c4a656 100644 --- a/spatial/README.md +++ b/spatial/README.md @@ -1,35 +1,44 @@ # Spatial Protocol -The Wired's spatial protocol is concerned with running interactive user-created content in a dynamic 3D multiplayer environment. +The Wired's spatial protocol is concerned with running interactive user-created +content within a dynamic 3D multiplayer environment. ## Scenes (glXF) -The Wired uses the [glXF](https://github.com/KhronosGroup/glXF) file format for describing scenes. -glXF is a variant of [glTF](https://github.com/KhronosGroup/glTF), focused on the composition of multiple glTF (or other glXF) assets. -glTF is a well supported format for 3D models, and its extensible nature makes it a great fit for The Wired. +The Wired uses the [glXF](https://github.com/KhronosGroup/glXF) file format for +describing scenes. glXF is a variant of [glTF](https://github.com/KhronosGroup/glTF), +focused on the composition of multiple glTF (or other glXF) assets. glTF is a +well supported format for 3D models, and its extensible nature makes it a great +fit for The Wired. ## Scripts (WASM) -The Wired uses [WebAssembly](https://webassembly.org/) (WASM) as a cross-platform compilation target and sandboxed execution environment for user scripting. -Scripts use the [component model](https://github.com/WebAssembly/component-model) to interact with a set of -[WIT](https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md) interfaces defined by The Wired. -Host environments can then implement these interfaces, allowing scripts to interact with the scene in a controlled manner. +The Wired uses [WebAssembly](https://webassembly.org/) (WASM) as a cross-platform +compilation target and sandboxed execution environment for user scripting. +Scripts use the [component model](https://github.com/WebAssembly/component-model) +to interact with a set of [WIT](https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md) +interfaces defined by The Wired. Host environments can then implement these +interfaces, allowing scripts to interact with the outside world in a controlled +manner. ## Worlds -Worlds are created at a user's [DWN](../social/#decentralized-web-nodes-dwns), following to the [world schema](../social/dwn/schemas/world.json). -This countains metadata about the world such as a name and description, as well as the world scene. +A world is a hosted multiplayer environment running some glXF scene. -### Instances +### Host -To join a world you must join an **instance** of the world. -An instance is a multiplayer room running on a host server. -This server acts as a relay for communication between players within the world. -Instances are created at the host server's DWN. +Each world must be hosted by a central server. This server acts as a relay for +communication between players within the world. -Additionally the world host DWN acts as a location for world discovery, where you can, -for example, query for active instances to join. +Worlds are created at a host's [DWN](../social/#decentralized-web-nodes-dwns), +following the [world schema](../social/dwn/schemas/world.json). This countains +metadata about the world such as a name and description, as well as the glXF +scene and any used assets. + +Additionally the host DWN acts as a location for world discovery, where you can, +for example, query for active worlds to join. ## Networking -Networking within an instance follows a [Cap'n Proto](https://capnproto.org/) schema over [WebTransport](https://developer.mozilla.org/en-US/docs/Web/API/WebTransport). +Networking within an world follows a [Cap'n Proto](https://capnproto.org/) +schema over [WebTransport](https://developer.mozilla.org/en-US/docs/Web/API/WebTransport).