Skip to content

Commit

Permalink
update readmes + world model
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhhh committed Oct 2, 2024
1 parent 75ad465 commit 4035d8b
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 104 deletions.
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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)
60 changes: 35 additions & 25 deletions social/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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).
20 changes: 10 additions & 10 deletions social/dwn/protocols/world-host.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -27,22 +27,22 @@
}
]
},
"instance": {
"world": {
"$actions": [
{
"who": "anyone",
"can": ["read", "write"]
}
],
"instance-info": {
"host-info": {
"$actions": [
{
"who": "anyone",
"can": ["read"]
},
{
"who": "recipient",
"of": "instance",
"of": "world",
"can": ["write"]
}
]
Expand Down
1 change: 1 addition & 0 deletions social/dwn/schemas/home.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
22 changes: 22 additions & 0 deletions social/dwn/schemas/host-info.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
16 changes: 0 additions & 16 deletions social/dwn/schemas/instance-info.json

This file was deleted.

20 changes: 0 additions & 20 deletions social/dwn/schemas/instance.json

This file was deleted.

4 changes: 0 additions & 4 deletions social/dwn/schemas/world.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
"type": "string"
}
},
"host": {
"type": "string",
"description": "DID of the world host."
},
"extras": {
"type": "object"
}
Expand Down
45 changes: 27 additions & 18 deletions spatial/README.md
Original file line number Diff line number Diff line change
@@ -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).

0 comments on commit 4035d8b

Please sign in to comment.