Skip to content

Commit

Permalink
Adding docs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnx25bd committed Jul 4, 2024
1 parent 5e912f1 commit 23c6a8e
Show file tree
Hide file tree
Showing 62 changed files with 1,965 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
41 changes: 41 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
12 changes: 12 additions & 0 deletions docs/blog/2019-05-28-first-blog-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
slug: first-blog-post
title: First Blog Post
authors:
name: Gao Wei
title: Docusaurus Core Team
url: https://github.com/wgao19
image_url: https://github.com/wgao19.png
tags: [hola, docusaurus]
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
44 changes: 44 additions & 0 deletions docs/blog/2019-05-29-long-blog-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
slug: long-blog-post
title: Long Blog Post
authors: endi
tags: [hello, docusaurus]
---

This is the summary of a very long blog post,

Use a `<!--` `truncate` `-->` comment to limit blog post size in the list view.

<!--truncate-->

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
20 changes: 20 additions & 0 deletions docs/blog/2021-08-01-mdx-blog-post.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
slug: mdx-blog-post
title: MDX Blog Post
authors: [slorber]
tags: [docusaurus]
---

Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).

:::tip

Use the power of React to create interactive blog posts.

```js
<button onClick={() => alert('button clicked!')}>Click me!</button>
```

<button onClick={() => alert('button clicked!')}>Click me!</button>

:::
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions docs/blog/2021-08-26-welcome/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
slug: welcome
title: Welcome
authors: [slorber, yangshun]
tags: [facebook, hello, docusaurus]
---

[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).

Simply add Markdown files (or folders) to the `blog` directory.

Regular blog authors can be added to `authors.yml`.

The blog post date can be extracted from filenames, such as:

- `2019-05-30-welcome.md`
- `2019-05-30-welcome/index.md`

A blog post folder can be convenient to co-locate blog post images:

![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg)

The blog supports tags as well!

**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.
17 changes: 17 additions & 0 deletions docs/blog/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
endi:
name: Endilie Yacop Sucipto
title: Maintainer of Docusaurus
url: https://github.com/endiliey
image_url: https://github.com/endiliey.png

yangshun:
name: Yangshun Tay
title: Front End Engineer @ Facebook
url: https://github.com/yangshun
image_url: https://github.com/yangshun.png

slorber:
name: Sébastien Lorber
title: Docusaurus maintainer
url: https://sebastienlorber.com
image_url: https://github.com/slorber.png
16 changes: 16 additions & 0 deletions docs/blog/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
facebook:
label: Facebook
permalink: /facebook
description: Facebook tag description
hello:
label: Hello
permalink: /hello
description: Hello tag description
docusaurus:
label: Docusaurus
permalink: /docusaurus
description: Docusaurus tag description
hola:
label: Hola
permalink: /hola
description: Hola tag description
1 change: 1 addition & 0 deletions docs/docs/core-concepts/decentralized-spatial-data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Decentralized spatial data
1 change: 1 addition & 0 deletions docs/docs/core-concepts/location-proofs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Location proofs
1 change: 1 addition & 0 deletions docs/docs/core-concepts/onchain-geospatial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Onchain geospatial
1 change: 1 addition & 0 deletions docs/docs/core-concepts/what-is-spatial-data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# What is spatial data?
1 change: 1 addition & 0 deletions docs/docs/developer-resources/location-attestations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Location attestations
1 change: 1 addition & 0 deletions docs/docs/developer-resources/quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Quickstart
1 change: 1 addition & 0 deletions docs/docs/developer-resources/spatial-registries.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Spatial registries
1 change: 1 addition & 0 deletions docs/docs/examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Content goes here...
10 changes: 10 additions & 0 deletions docs/docs/hello.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
sidebar_label: "Hi!"
sidebar_position: 3
---

# Hello

This is my **first Docusaurus document**!# Hello

This is my **first Docusaurus document**!
47 changes: 47 additions & 0 deletions docs/docs/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
sidebar_position: 1
---

# Tutorial Intro

Let's discover **Docusaurus in less than 5 minutes**.

## Getting Started

Get started by **creating a new site**.

Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.

### What you'll need

- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.

## Generate a new site

Generate a new Docusaurus site using the **classic template**.

The classic template will automatically be added to your project after you run the command:

```bash
npm init docusaurus@latest my-website classic
```

You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.

The command also installs all necessary dependencies you need to run Docusaurus.

## Start your site

Run the development server:

```bash
cd my-website
npm run start
```

The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.

The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.

Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
1 change: 1 addition & 0 deletions docs/docs/introducing-astral.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Introduction
33 changes: 33 additions & 0 deletions docs/docs/location-proof-protocol/architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Architecture

We are designing the overall architecture of the onchain component of the generalized location proof protocol. If you'd like to weigh in —
or help us build it! — reach out on [Telegram](https://t.me/+UkTOSXnDcDM5ZTBk).

Here's the top-level abstract of the work we're doing:

## Abstract

This spike examines two approaches of extensible contracts, managed by a `*RecipeCoordinator.sol*` contract that controls the addition and
upgrade of multiple implementation contracts. These implementation contracts each hold a _recipe_ for a “proof-of-location” strategy.

The primary purpose of this design is to coordinate the addition, use and upgrade of these recipes / strategies, through one coordinating
contract — `RecipeCoordinator.sol`. Adding recipes is a **permissionless**, public action taken through the `RecipeCoordinator`. Upgrade
functionality is required for both the RecipeCoordinator and, optionally, on recipe implementation contracts.

In this spike, we consider two architectural design patterns to serve this purpose: the Diamond pattern and ERC-165 interface matching.

:::note

For example, a team developing a proof-of-location strategy that requires users to scan NFC devices would implement the Solidity code to
record and verify location proofs, then register the implementation with the `RecipeCoordinator`.

The “recipe” would describe the shape + content of the data that needs to be included in a location proof for it to adhere to that strategy.
The implementation contract developed by the strategy designers would include a `verify` method.

:::

:::warning

This is all work in progress, we'd love input!

:::
25 changes: 25 additions & 0 deletions docs/docs/location-proof-protocol/eas-schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# EAS Schema

## Location Proof Protocol: Core Schema v0.1 (Sepolia Testnet)

The core layer of the Location Proof Protocol includes a standard data model. v0.1 of the data model is described in this document. The
current working schema is deployed on Ethereum Sepolia testnet, UID `0xd928da08c10180b639e31c5f46acf4ea011d88ec7ac44bd95f32385e2d66032b`
([view on EASScan](https://sepolia.easscan.org/schema/view/0xd928da08c10180b639e31c5f46acf4ea011d88ec7ac44bd95f32385e2d66032b)).

| Field | Description | Key | Data Type | Source |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ---------- | ---------------------------------------------------------------------------------------------------------------- |
| Identifier | Unique ID for the location proof. | `uid` | `bytes32` | EAS provides this |
| Prover Address | Address of the prover. | `from` | `address` | Sender address, as specified by EAS |
| Subject Identifier | Unique ID for the subject/event. | `subject` | `address` | EAS provides this, however future iterations may require IDs that are not Ethereum addresses (DIDs, for example) |
| Timestamp | Time the location proof was created. | `timestamp` | `uint256` | EAS |
| Event Timestamp | Time of the event referenced by the location proof. | `eventTimestamp` | `uint256` | User input |
| Spatial Reference System | Coordinate system within which the object is positioned. | `srs` | `string` | in v0.1, hard coded to "EPSG:4326" |
| Location Type | A string defining how the location field is structured. | `locationType` | `string` | Depends on the `recipe` / strategy, or user input |
| Location | The location of the object/event. | `location` | `bytes` | Depends on the `recipe` / strategy, or user input |
| Proof Recipe Identifier | Indicates the proof recipe used. | `recipeType` | `string[]` | Defined from a set of registered recipes, to be stored in the @/recipes directory |
| Proof Recipe Payload | Encoded data specific to the proof recipe, which could include encrypted location data, a zero-knowledge proof, or references to other verification data. | `recipePayload` | `bytes[]` | Specified in recipe definition |
| Media Type | A unique string referring to the media to be included in a `bytes` field, Media Data. This pattern is similar to OpenGraph Protocol’s `type` definition. | `mediaType` | `string[]` | Defined from a set of supported media types, to be stored in the @/media directory |
| Media Data | A `bytes` field allowing the attachment of arbitrary data to a location proof. This data is intended to be irrelevant to the location proof and not required/utilized in the proof recipe verification. | `mediaData` | `bytes[]` | Specified in media type definition |
| Memo | An arbitrary message | `memo` | `string` | User input |

Note that this design supports location proofs that include multiple recipe types / recipe payloads and media type / media data.
19 changes: 19 additions & 0 deletions docs/docs/location-proof-protocol/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Introduction

The Location Proof Protocol aims to address the challenge of proving location on the decentralized web in a flexible, yet standardized way.

Given the diverse requirements and approaches for location proofs, our goal is to support innovation across a wide range of proof strategies
while providing a standard data model for creating and verifying these proofs.

This section of the monorepo currently contains:

- Specifications of the core [Ethereum Attestation Service (EAS) schema](./eas-schema.md) for the protocol
- Details on how to create location proofs using different [location types](./location-types.md)
- A framework (in development) for building ["recipes"](./strategies-recipes.md) that allow for many different strategies for proving
location to be added (WIP)
- Information on attaching differet types of [media](./media-types.md) to location proofs (WIP)

## Contributing

We welcome contributions to improve the protocol and tools. Please read our
[contributing guidelines](https://github.com/AstralProtocol/astralprotocol/wiki/Contributing-guidelines) for more details.
Loading

0 comments on commit 23c6a8e

Please sign in to comment.