Coder Social home page Coder Social logo

protocol's Introduction

RSS3 Protocol

The RSS3 Protocol follows the RSS3 Whitepaper and aims to build a decentralized, open source, and extensible protocol for the dissenmination of Open Information.

Motivation

Open Information, indexed from multiple permissionless data sources (PDSs), is structured according to the structure outlined in this Protocol. Therefore, the Protocol acts as the specific data structure facilitating the dissenmination of Open Information on the RSS3 Network.

Given that PDSs employ diverse data structures, within any given PDS, it's common to find products, services, and protocols, each utilizing distinct data structures to meet their unique requirements. This lack of standardization means limited interoperability, posing a challenge to the development of scalable applications using Open Information.

Objective

The Protocol aims to tackle this issue by offering a comprehensive set of data structures that serve as an abstraction. The abstraction simplifies data integration processes, thus making it more manageable and scalable for developers to work with Open Information. This, in turn, promotes the free flow of Open Information.

Historical Archive

For the RSS3 Community's earlier efforts prior to this version, please refer to the archive branch.

License

The RSS3 Protocol is collectively maintained by the RSS3 Community. All work under this repository is marked with CC0 1.0.

By marking the work with a CC0 public domain dedication, the creator is giving up their copyright and allowing reusers to distribute, remix, adapt, and build upon the material in any medium or format, even for commercial purposes.

protocol's People

Contributors

azuic avatar chungzh avatar diygod avatar henryqw avatar joshuattl avatar sljeff avatar usagiryu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

protocol's Issues

Set RSS3-specific `link` tags

The tag, which points to a link to an rss file, is an integral part of the RSS ecosystem, which helps people find the rss file for that content.

They look like this

  • <link rel="alternate" type="application/rss+xml" title="Percy » RSS 2.0" href="/feed/">
  • <link rel="alternate" type="application/rdf+xml" title="Percy » RSS 1.0" href="/feed/rss/">
  • <link rel="alternate" type="application/atom+xml" title="Percy » ATOM 1.0" href="/feed/atom/">

RSS3 is currently lacking a standard for this.

Maybe they can look like this

<link rel="alternate" type="application/rss3+json" title="Percy » RSS3" href="https://rss3.io/kecrily">

We need to be able to find that content on RSS3 from the site.

How will RSS3 address the issue of distributing CSAM (and similar) contents?

As per the RSS3 light paper and the reply in #13, I believe it's correct to say that anyone can upload anything to the RSS3 network.

Therefore, how will RSS3 do with CSAM contents (or similar things that violates others' rights)?

As the censorship can only be done per-platform or application basis, ...

This sounds like one can write an application that distributes CSAM content without having concerns about being censored or blocked.

We know that Apple is planning to deploy a client-side CSAM scanner which is pretty creepy and violates their privacy promise. However, such contents also violate one or multiple rights of the subject shown in them.

As the RSS3 network will have no censorship, my questions are

  1. If any content violates one's fundamental rights, can they claim their rights and demand to take down corresponding contents?
  2. If the RSS3 network becomes one of the world's largest CSAM content distribution platforms, will RSS3 do anything to address this problem?

Please note that in question 1, by any content, it literally means anything including but not limited to one's personal information, address(es), photo of their ID and daily routines.

[Typo Report] `address` in Definition, `file` in Examples

It seems there's a typo in field RSS3Item - contents, as described in title.

In Line 133 (Definition) using address to record third'party files, while in Line 187 / 190 (Example) using file. It might be a typo. Can you please help fix that? Thanks.

v0.3.1-rc

RSS3 v0.3.1

Latest editor's draft:

Editors:

Reviewers

Participate:

1. Abstract

Derived from the best out of RSS, RSS3 is an open protocol designed for all our cyber existence in the era of Web 3.0.

This document describes the interfaces of RSS3 files.

2. Status of This Document

The proposal is being incubated in the NaturalSelectionLabs.

GitHub issues and discussions are preferred for discussion of this specification.

3. Future Compatibility

This version is a beta version, so it is not guaranteed to be compatible with subsequent versions, but breaking updates will be kept to a minimum.

4. Concepts

  • Persona - a user, either as an individual or as a group
  • Item - An item published or experienced by a persona
  • Link - One type of relationship to other personas/item from current persona/item
  • Backlink - A link from other personas/items to current persona/item
  • Assets - Objects currently owned by the persona

5. Interfaces

5.1 File types

ID RSS3ID RSS3CustomItemsListID RSS3AutoItemsListID RSS3LinksListID RSS3BacklinksListID RSS3AssetsListID RSS3ItemBacklinksListID
Format of ID \ ${RSS3ID}-list-items.custom-${index} ${RSS3ID}-list-items.auto-${index} ${RSS3ID}-list-links.${links.type}-${index} ${RSS3ID}-list-backlinks.${backlinks.type}-${index} ${RSS3ID}-list-assets-${index} ${RSS3ID}-list-item.${item.index}.backlinks.${backlinks.type}-${index}
Content Types RSS3Index RSS3CustomItemsList RSS3AutoItemsList RSS3LinksList RSS3BacklinksList RSS3AssetsList RSS3ItemBacklinksList

5.2 Interfaces in TypeScript

// File ids
type RSS3ID = string; // Same as ethereum address
type RSS3CustomItemsListID = string; // `${RSS3ID}-list-items.custom-${index}`
type RSS3AutoItemsListID = string; // `${RSS3ID}-list-items.auto-0`
type RSS3CustomAssetsListID = string; // `${RSS3ID}-list-assets.custom-${index}`
type RSS3AutoAssetsListID = string; // `${RSS3ID}-list-assets.auto-0`
type RSS3LinksListID = string; // `${RSS3ID}-list-links.${links.id}-${index}`
type RSS3BacklinksListID = string; // `${RSS3ID}-list-backlinks.${backlinks.id}-0`
type RSS3ItemBacklinksListID = string; // `${RSS3ID}-list-item.${item.index}.backlinks.${backlinks.id}-0`

type ThirdPartyAddress = string[]; // A series of url or ipfs hash that link to an identical file

type RSS3List =  RSS3CustomItemsList | RSS3AutoItemsList | RSS3CustomAssetsList | RSS3AutoAssetsList | RSS3LinksList | RSS3BacklinksList | RSS3ItemBacklinksList;
type RSS3ListID = RSS3CustomItemsListID | RSS3AutoItemsListID | RSS3CustomAssetsListID | RSS3AutoAssetsListID | RSS3LinksListID | RSS3BacklinksListID | RSS3ItemBacklinksListID;
type RSS3FileID = RSS3ID | RSS3ListID;
type RSS3File = RSS3Index | RSS3List;

// Common attributes for each files
interface RSS3Base {
    version: 'rss3.io/version/v0.3.1'; // Proposal version for current file. It should be like `rss3.io/version/v1.0.0`
    id: RSS3FileID;
    date_created: string; // Specifies the created date in RFC 3339 format
    date_updated: string; // Specifies the updated date in RFC 3339 format
}

interface RSS3SignedBase extends RSS3Base {
    signature: string; // Signed by persona's private key; The signature content is the Keccak-256 hash of the array of object sorted by alphabetical and excluding objects containing `auto: true` field and the `signature` field itself(for example {a: "1", c: "2", b: {d: "3"}, e: {auto: true}} -> [["a", "1"], ["b", ["d", "3"]], ["c", "2"]]) or the string `Hi, RSS3. I'm your agent ${agent_id}` if using agent signature; Used for the object integration verification for both server side and persona side
    agent_id?: string; // A random ed25519 public key generated by the client
    agent_signature?: string; // A signature signed by `agent_id`'s private key, its content is the same as `signature`
}

interface RSS3UnsignedBase extends RSS3Base {
    auto: true;
}

// RSS3 index file, main entrance for a persona
interface RSS3Index extends RSS3SignedBase {
    id: RSS3ID;
    controller?: string; // A contract address indicating ownership of the file

    profile?: {
        name?: string;
        avatar?: ThirdPartyAddress;
        bio?: string;
        accounts?: {
            tags?: string[];
            id: string; // ${platform}-${identity}, for example, EVM+-0x1234567890123456789012345678901234567890 or Twitter-rss3_
            signature?: string; // Signature of [["address", id], ["id", account.id], ["tags", account.tags]], optional for no public-key cryptography platform
        }[];
    };

    links?: {
        tags?: string[];
        id: string; // Link id, for example: following superfollowing
        list?: RSS3LinksListID; // Personas who belong to this link
    }[];

    backlinks?: {
        // Backlinks for this persona, for example: following link's backlink means followers.
        auto: true;
        id: string; // The same as links.id
        list: RSS3BacklinksListID; // File ID of backlink list that belong to this link. See **RSS3List** for more details
    }[];

    items?: {
        list_custom?: RSS3CustomItemsListID;
        list_auto?: RSS3AutoItemsListID;
    };

    assets?: {
        list_custom?: RSS3CustomAssetsListID;
        list_auto?: RSS3AutoAssetsListID;
    };
}

// RSS3 list files, used for list of links, backlinks, items, assets, itemsbacklinks
interface RSS3ListBase<IDType, ElementType> {
    id: IDType;
    list: ElementType[];
    list_next?: IDType;
}

type RSS3CustomItemsList = RSS3SignedBase & RSS3ListBase<RSS3CustomItemsListID, RSS3CustomItem>;
type RSS3AutoItemsList = RSS3UnsignedBase & RSS3ListBase<RSS3AutoItemsListID, RSS3AutoItem>;
type RSS3CustomAssetsList = RSS3SignedBase & RSS3ListBase<RSS3CustomAssetsListID, RSS3CustomAsset>;
type RSS3AutoAssetsList = RSS3UnsignedBase & RSS3ListBase<RSS3AutoAssetsListID, RSS3AutoAsset>;
type RSS3LinksList = RSS3SignedBase & RSS3ListBase<RSS3LinksListID, RSS3ID>;
type RSS3BacklinksList = RSS3UnsignedBase & RSS3ListBase<RSS3BacklinksListID, RSS3ID>;
type RSS3ItemBacklinksList = RSS3UnsignedBase & RSS3ListBase<RSS3ItemBacklinksListID, RSS3CustomItemID>;

// Asset
type RSS3CustomAsset = string; // A type of asset posted by persona itself, custom-${identity}-${type}-${uniqueID}, for example, persona's cute(q) Garage Kit(gk) (uniqueID 10035911): custom-gk-q-10035911
type RSS3AutoAsset = string; // A type of asset that is automatically generated by a node, ${platform}-${identity}-${type}-${uniqueID}, for example, a NFT(uniqueID 0x456.5) in the Ethereum chain owned by apersona's EVM+ account(0x123): EVM+-0x123-Ethereum.NFT-0x456.5

// Item
type RSS3CustomItemID = string; // `${RSS3ID}-item-custom-${index}`
type RSS3AutoItemID = string; // `${RSS3ID}-item-auto-${index}`

interface RSS3ItemBase {
    date_created: string; // Specifies the published date in RFC 3339 format
    date_updated: string; // Specifies the modified date in RFC 3339 format

    title?: string;
    summary?: string;

    backlinks?: {
        // Interactive items from other personas.
        auto: true;
        id: string;
        list: RSS3ItemBacklinksListID; // File ID of items list that belong to this context. See **RSS3List** for more details
    }[];
}

interface RSS3CustomItem extends RSS3ItemBase { // A type of content posted by persona itself
    id: RSS3CustomItemID; // `${RSS3ID}-item-custom-${index}`
    tags?: string[];
    authors?: RSS3ID[];

    link?: {
        id: string; // Link id for the non-original item, for example: comment like
        target: RSS3CustomItemID | RSS3AutoItemID; // Target of the non-original item
    };

    contents?: { // Contents of current item, possibly multiple different types of content
        tags?: string[];
        address: ThirdPartyAddress;
        mime_type: string; // [MIME type](https://en.wikipedia.org/wiki/Media_type) of current content
        name?: string;
        size_in_bytes?: string;
        duration_in_seconds?: string;
    }[];
}

interface RSS3AutoItem extends RSS3ItemBase { // A type of content that is automatically generated by a node to represent a change of an asset
    id: RSS3AutoItemID; // `${RSS3ID}-item-auto-${index}`

    target: {
        field: string; // 'items-auto', `assets-${RSS3CustomAsset}` 'links-following', 'profile-avatar', `profile-accounts-${RSS3Account.id}`, etc
        action: {
            type: 'add' | 'remove' | 'update';
            payload?: string; // If the type is `add` or `remove`, then it is the added or removed content, empty means the content is itself, if the type is `update`, then it is the content after updating
            proof?: string; // Additional information used to make this target unique
        };
    };
}

5.3 Fields

signature

  • Signed by persona's private key
  • Used for the object integration verification for both server side and persona side
  • The content is
    • The Keccak-256 hash of the array of object sorted by alphabetical and excluding
      • Objects containing auto: true
      • Fields that end with _auto
      • The signature field itself
      • For example {a: "1", c: "2", b: {d: "3"}, e: {auto: true}, f_auto: "4"} -> [["a", "1"], ["b", ["d", "3"]], ["c", "2"]]
    • Or the string Hi, RSS3. I'm your agent ${agent_id}
      • If using agent signature

Objects with this auto field

  • Entirely the responsibility of the hosting program
  • May be modified by the hosting program at any time
  • Not allowed to be modified by the persona
  • Excluded when calculating signatures

Extensions

Custom objects can be used in RSS3. Names must start with an _ character. Custom objects can appear anywhere in RSS3.

Empty contents

It is strongly recommended to delete fields with empty contents, including empty strings, empty arrays, empty objects

5.4 Examples

A persona 0x1234567890123456789012345678901234567890 with a published item Hello World and a comment to it

# Index file
{
    "version": "rss3.io/version/v0.3.1",
    "id": "0x1234567890123456789012345678901234567890",
    "date_created": "2021-01-01T00:00:00.000Z",
    "date_updated": "2021-01-01T00:00:00.000Z",
    "signature": "0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",

    "profile": {
        "name": "RSS3",
        "avatar": ["https://example.com/rss3.jpg", "QmT1zZNHvXxdTzHesfEdvFjMPvw536Ltbup7B4ijGVib7t"],
        "bio": "RSS3 is an open protocol designed for all our cyber existence in the era of Web 3.0.",

        "accounts": [{
            "id": "EVM+-0x1111111111111111111111111111111111111111",
            "signature": "0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        }]
    },

    "items": {
        "custom": "0x1234567890123456789012345678901234567890-list-items.custom-0",
        "auto": "0x1234567890123456789012345678901234567890-list-items.auto-0",
    },

    "links": [{
        "id": "following",
        "list": "0x1234567890123456789012345678901234567890-list-links.following-0",
    }],
    "backlinks": [{
        "auto": true,
        "id": "following",
        "list": "0x1234567890123456789012345678901234567890-list-backlinks.following-0",
    }],

    "assets": "0x1234567890123456789012345678901234567890-list-assets-0"
}

# Custom items file
{
    "version": "rss3.io/version/v0.3.1",
    "id": "0x1234567890123456789012345678901234567890-list-items.custom-0",
    "date_created": "2021-01-01T00:00:00.000Z",
    "date_updated": "2021-01-01T00:00:00.000Z",
    "signature": "0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",

    "list": [{
        "id": "0x1234567890123456789012345678901234567890-item-custom-1",
        "summary": "Yes!!",
        "date_created": "2021-01-01T00:00:00.000Z",
        "date_updated": "2021-01-01T00:00:00.000Z",

        "link": {
            "id": "comment",
            "target": "0x1234567890123456789012345678901234567890-item-custom-0"
        },
    }, {
        "id": "0x1234567890123456789012345678901234567890-item-custom-0",
        "title": "Hello World",
        "summary": "Hello, this is the first item of RSS3.",
        "date_created": "2021-01-01T00:00:00.000Z",
        "date_updated": "2021-01-01T00:00:00.000Z",

        "contents": [{
            "address": ["https://example.com/rss3.jpg"],
            "mime_type": "image/jpeg"
        }],

        "backlinks": [{
            "auto": true,
            "id": "comment",
            "list": "0x1234567890123456789012345678901234567890-list-item.0.backlinks.comment-0"
        }]
    }]
}

# Auto items file
{
    "version": "rss3.io/version/v0.3.1",
    "id": "0x1234567890123456789012345678901234567890-list-items.auto-0",
    "date_created": "2021-01-01T00:00:00.000Z",
    "date_updated": "2021-01-01T00:00:00.000Z",
    "signature": "0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",

    "list": [{
        "auto": true,
        "id": "0x1234567890123456789012345678901234567890-item-auto-0",
        "date_created": "2021-01-01T00:00:00.000Z",
        "date_updated": "2021-01-01T00:00:00.000Z",

        "content": {
            "field": "EVM+-0x1111111111111111111111111111111111111111-Ethereum.NFT-id0",
            "action": {
                "type": "update",
                "payload": "0x2222222222222222222222222222222222222222",
            },
        },

        "backlinks": [{
            "auto": true,
            "id": "comment",
            "list": "0x1234567890123456789012345678901234567890-list-item.2.backlinks.comment-0"
        }]
    }]
}

# Link list file
{
    "version": "rss3.io/version/v0.3.1",
    "id": "0x1234567890123456789012345678901234567890-list-links.following-0",
    "date_created": "2021-01-01T00:00:00.000Z",
    "date_updated": "2021-01-01T00:00:00.000Z",

    "list": ["0x1111111111111111111111111111111111111111", "0x2222222222222222222222222222222222222222"]
}

# Assets list file
{
    "version": "rss3.io/version/v0.3.1",
    "id": "0x1234567890123456789012345678901234567890-list-assets-0",
    "date_created": "2021-01-01T00:00:00.000Z",
    "date_updated": "2021-01-01T00:00:00.000Z",
    "auto": true,

    "list": [{
        "platform": "EVM+",
        "identity": "0x1234567890123456789012345678901234567890",
        "id": "0xacbe98efe2d4d103e221e04c76d7c55db15c8e89.5",
        "type": "Ethereum.NFT"
    }]
}

RSS3 Protocol v0.4.0 Adventure Yes, it's a lot more convenient

Discussed in #25

Originally posted by DIYgod February 2, 2022
Please note that this forum is for serious discussion of the protocol v0.4.0, do not discuss unrelated content in this forum, spam will be reported and blacklisted on GitHub.

Those who participate in meaningful discussions will be rewarded with a special POAP or NFT(RSS Fruit Token) to be used in future DAO. A separate email will be sent after v0.4.0 is released. Please ensure that the email is visible and available in your GitHub profile. For related queries please contact [email protected]

Let's get the adventure started!

We prepared a draft proposal v0.4.0 based on many problems encountered in the use of v0.3.1. But limited by the ability of a few people, the draft may contain many errors and poor design, which is the reason for the need for extensive participation in the discussion and this draft may differ significantly from the published version depending on the discussion and feedback.

URI

Inspired by Manifesto for Ubiquitous Linking and 让链接无处不在——《泛在链接宣言》的理论与理想, we have replaced a large number of id fields in the previous version with accessible URIs to make it easier for users to access the data.

These URIs meet the RFC 3986 specification, the scheme is rss3, userinfo is the instance address and host is the account platform, e.g. evm solana flow.

type SignableAccount = string;          // ${address}@${SignablePlatform}, for example, 0x1234567890123456789012345678901234567890@evm
type UnsignableAccount = string;        // ${address}@${UnsignablePlatform}, for example, rss3_@twitter

type InstanceURI = string;              // rss3://${SignableAccount}

type ItemURI = string;                  // ${InstanceURI}/${'notes' | 'assets'}/${uuid}
type ItemsPageListURI = string;         // ${InstanceURI}/list/${'notes' | 'assets'}/page/${index}
type ItemsListURI = string;             // ${InstanceURI}/list/${'notes' | 'assets'}

type LinksListURI = string;             // ${InstanceURI}/list/links/${InstanceURI | NoteURI | AssetURI}/${index}
type BacklinksListURI = string;         // ${InstanceURI}/list/backlinks/${URI}

type URI = string;                      // Any uri
type URIs = URI[] | URI;                // A series of uris pointing to accessible resources

File Base

Each file has a number of base fields, and the files are classified as signed or unsigned, signed files are used for user submitted and authorized files, unsigned files are used for files that are automatically indexed by the nodes of the RSS3 network

InstanceURI ItemsPageListURI ItemsListURI LinksListURI BacklinksListURI five URIs point to RSS3 files, the ItemsPageListURI and LinksListURI are user-signed files, the index at the end is to facilitate file signing and paging, the first page is 0, the second page is 1... ItemsListURI and BacklinksListURI are unsigned files, generated by the nodes of the RSS3 network, and do not require signature verification

interface Base {
    version: 'v0.4.0'; // Proposal version for current file. It should be like `rss3.io/version/v1.0.0`
    identifier: InstanceURI | ItemsPageListURI | ItemsListURI | LinksListURI | BacklinksListURI;
    date_created: string; // Specifies the created date in RFC 3339 format
    date_updated: string; // Specifies the updated date in RFC 3339 format
}

interface SignedBase extends Base {
    signature: string; // Signed by instance's private key, the signature message is JSON string sorted by key alphabet: `[RSS3] I am confirming the results of changes to my file ${identifier}: JSON.stringify(file, Object.keys(file).sort())`
    agent?: {
        pubkey: string[]; // A random ed25519 public key generated by the client
        signature: string[]; // A signature signed by pubkey's private key, the message is the same as `signature`
        authorization: string; // A signature signed by instance's private key, the message is `[RSS3] I am well aware that this APP (name: ${app}) can use the following agent instead of me (${InstanceURI}) to modify my files and I would like to authorize this agent (${pubkey})`
        app: string; // Name of the app using this agent, eg: Revery
    }[];
}

interface UnsignedBase extends Base {
    auto: true;
}

Index File

The Index file is the entry for each RSS3 instance and is the most important file.

The standard and implementation of controller is uncertain and it is a reserved field.

profile defines the information about the instance itself, the accounts field is used to bind other accounts, both centralised and decentralised, e.g. evm solana twitter playstation; the banner websites field has been added.

links defines the relationship between the current instance and any other URI, e.g. defining a relationship called following, its list can contain other RSS3 instance, an RSS address, or an RSS3 Note; identifier_back is the reverse relationship, i.e. the relationship that other URI point to the current instance.

items is the most important field, and the one we consider most and least certain; notes (the name derives from Misskey, previously called items) are used for the feed, identifier_page contains the dynamics of the user's own posting, confirmed by the user's signature, such as a blog post or a message, and identifier additionally contains the dynamics automatically indexed by the nodes of the RSS3 network, such as the acquisition of an NFT; assets are assets owned by the instance, such as an NFT or a trophy won in PlayStation

interface Index extends SignedBase {
    identifier: InstanceURI;
    controller?: string; // A contract address indicating ownership of the file

    profile?: {
        name?: string;
        avatar?: URIs;
        bio?: string;
        banner?: URIs;
        websites?: URIs;
        accounts?: ({
            account: SignableAccount;
            signature: string; // Signature of `[RSS3] I am adding ${SignableAccount} to my RSS3 instance ${InstanceURI}`
        } | UnsignableAccount)[];
    };

    links: {
        identifiers?: LinksListURI[];
        identifier_back: BacklinksListURI;
    };

    items: {
        notes: {
            identifier_page?: ItemsPageListURI;
            identifier: ItemsListURI;
        };
        assets: {
            identifier_page?: ItemsPageListURI;
            identifier: ItemsListURI;
        };
    };
}

Items

Items is the biggest change apart from the URI.

Previous versions of items have been renamed notes and previous versions of items+assets have been combined as items.

notes and assets have the same format

links of items are in the same format as links of instances

contents in the previous version renamed to attachments to record resources such as images attached to notes or assets.

metadata added to standardise the content indexed by the nodes of the RSS3 network.

type Item = {
    identifier: ItemURI;
    date_created: string; // Specifies the published date in RFC 3339 format
    date_updated: string; // Specifies the modified date in RFC 3339 format

    links: {
        identifier_back: BacklinksListURI;
        identifiers?: LinksListURI[];
    };

    tags?: string[];
    authors?: InstanceURI[];
    title?: string;
    summary?: string;
    attachments?: {
        content: URIs;
        mime_type: string; // [MIME type](https://en.wikipedia.org/wiki/Media_type)
        name?: string;
        size_in_bytes?: string;
    }[];

    metadata?: {
        proof: string; // transaction, url, etc.
        type: AutoAssetType | AutoNoteType;
        from?: string;
        to?: string;
        id: string; // unique id, eg: ${token_address}-${token_id}
    }

    auto?: true; // For auto items
};

List Files

The format of the list file is simple and has not been changed significantly.

interface ListBase<URIType, ElementType> {
    identifier: URIType;
    identifier_next?: URIType;
    list?: ElementType[];
}

type ItemPageList = SignedBase & ListBase<ItemsPageListURI, Item>;
type ItemsList = UnsignedBase & ListBase<ItemsListURI, Item>;

type LinksList = SignedBase & ListBase<LinksListURI, URI>;
type BacklinksList = UnsignedBase & ListBase<BacklinksListURI, InstanceURI | ItemURI>;

Overall

// word lists
type SignablePlatform = 'evm' | 'solana' | 'flow';
type UnsignablePlatform = 'twitter' | 'misskey' | 'jike';
type LinkType = 'following' | 'comment' | 'like' | 'collection';
type AutoAssetType = 'evm_gitcoin_donation' | 'evm_xdai_poap' | 'evm_bsc_nft' | 'evm_ethereum_nft' | 'evm_polygon_nft';
type AutoNoteType = AutoAssetType | 'evm_mirror_entry' | 'twitter_tweet' | 'misskey_note' | 'jike_node';

// unique id
type SignableAccount = string;          // ${address}@${SignablePlatform}, for example, 0x1234567890123456789012345678901234567890@evm
type UnsignableAccount = string;        // ${address}@${UnsignablePlatform}, for example, rss3_@twitter

// uri
type InstanceURI = string;              // rss3://${SignableAccount}

type ItemURI = string;                  // ${InstanceURI}/${'notes' | 'assets'}/${uuid}
type ItemsPageListURI = string;         // ${InstanceURI}/list/${'notes' | 'assets'}/page/${index}
type ItemsListURI = string;             // ${InstanceURI}/list/${'notes' | 'assets'}

type LinksListURI = string;             // ${InstanceURI}/list/links/${InstanceURI | NoteURI | AssetURI}/${index}
type BacklinksListURI = string;         // ${InstanceURI}/list/backlinks/${URI}

type URI = string;                      // Any uri
type URIs = URI[] | URI;                // A series of uris pointing to accessible resources

// Common attributes for each files
interface Base {
    version: 'v0.4.0'; // Proposal version for current file. It should be like `rss3.io/version/v1.0.0`
    identifier: InstanceURI | ItemsPageListURI | ItemsListURI | LinksListURI | BacklinksListURI;
    date_created: string; // Specifies the created date in RFC 3339 format
    date_updated: string; // Specifies the updated date in RFC 3339 format
}

interface SignedBase extends Base {
    signature: string; // Signed by instance's private key, the signature message is JSON string sorted by key alphabet: `[RSS3] I am confirming the results of changes to my file ${identifier}: JSON.stringify(file, Object.keys(file).sort())`
    agent?: {
        pubkey: string[]; // A random ed25519 public key generated by the client
        signature: string[]; // A signature signed by pubkey's private key, the message is the same as `signature`
        authorization: string; // A signature signed by instance's private key, the message is `[RSS3] I am well aware that this APP (name: ${app}) can use the following agent instead of me (${InstanceURI}) to modify my files and I would like to authorize this agent (${pubkey})`
        app: string; // Name of the app using this agent, eg: Revery
    }[];
}

interface UnsignedBase extends Base {
    auto: true;
}

// RSS3 index files, main entrance for a instance
interface Index extends SignedBase {
    identifier: InstanceURI;
    controller?: string; // A contract address indicating ownership of the file

    profile?: {
        name?: string;
        avatar?: URIs;
        bio?: string;
        banner?: URIs;
        websites?: URIs;
        accounts?: ({
            account: SignableAccount;
            signature: string; // Signature of `[RSS3] I am adding ${SignableAccount} to my RSS3 instance ${InstanceURI}`
        } | UnsignableAccount)[];
    };

    links: {
        identifiers?: LinksListURI[];
        identifier_back: BacklinksListURI;
    };

    items: {
        notes: {
            identifier_page?: ItemsPageListURI;
            identifier: ItemsListURI;
        };
        assets: {
            identifier_page?: ItemsPageListURI;
            identifier: ItemsListURI;
        };
    };
}

// items
type Item = {
    identifier: ItemURI;
    date_created: string; // Specifies the published date in RFC 3339 format
    date_updated: string; // Specifies the modified date in RFC 3339 format

    links: {
        identifier_back: BacklinksListURI;
        identifiers?: LinksListURI[];
    };

    tags?: string[];
    authors?: InstanceURI[];
    title?: string;
    summary?: string;
    attachments?: {
        content: URIs;
        mime_type: string; // [MIME type](https://en.wikipedia.org/wiki/Media_type)
        name?: string;
        size_in_bytes?: string;
    }[];

    metadata?: {
        proof: string; // transaction, url, etc.
        type: AutoAssetType | AutoNoteType;
        from?: string;
        to?: string;
        id: string; // unique id, eg: ${token_address}-${token_id}
    }

    auto?: true; // For auto items
};

// RSS3 list files
interface ListBase<URIType, ElementType> {
    identifier: URIType;
    identifier_next?: URIType;
    list?: ElementType[];
}

type ItemPageList = SignedBase & ListBase<ItemsPageListURI, Item>;
type ItemsList = UnsignedBase & ListBase<ItemsListURI, Item>;

type LinksList = SignedBase & ListBase<LinksListURI, URI>;
type BacklinksList = UnsignedBase & ListBase<BacklinksListURI, InstanceURI | ItemURI>;

Edited By NaturalSelectionLabs

  • [ ]

Make RSS3 index data submmited on Arweave

Motivation

We realize that all data submitted on Arweave can be natively verified the ownership, thanks to the owner and signature attributes on its tx data. While RSS3 is an information distributed protocol incorporated with data ownership verification, it's nature to think about bridging the data between RSS3 and Arweave, to liberate the information flow as much as possible as well as flourish the Web3.0 ecosystem.

Proposal

Here we propose an automatic crawler to crawl the txs on Arweave, using ArQL probably. The crawler only focuses on some specific tags patterns, defined by Arweave-based applications implementation, specifically, by how the data is uploaded. Then the crawler on RSS3 side can generate the RSS3 files for each user who has been indexed and distribute it on RSS3 network. In such way, the information is generated on Arweave, but distributed on RSS3.

Roadmap

Such a "bridge crawler" is generally made up of two components: a crawler on Arweave, and the other RSS3 base stuff. For the crawler, it shall be implemented in a centralized way at the beginning for POC purpose, but supposed to be in a decentralized way eventually, eg. like the Graph. And for the other RSS3 base stuff, we believe it would grow up along with the RSS3 protocol itself step by step.

Would it be dumplicate to start `id` field with `type` ?

It seems that every file's id starts with its type as described in type field in Examples.

Would that cause dumplicate, or it's just some features helping files be more easily identified in other referrals? If that, what about just keep the type in id field and drop the type ?

[Protocol Design] Support content exchange?

As we have designed, we are able to exchange the whole persona along with all its contents created. Then there's a question furthermore, should we support the exchange of some specific content created by one persona, kinda like NFT?

We might not consider designing it at our first stage. Just mark it here for some discussion first.

[Protocol Design] Who owns "comment"?

Assume there's a post P, owned by its author obviously. Then there's a controversial debate on who owns the comments to P? By commenters themselves or original poster. In case of ownership, we mean the permission to delete the content.

We can propose three types of ownership:

  1. owned by original poster (which also means delete cascade)
  2. owned by commenter
  3. co-owned by both original poster and commenter

Or even can we design that 4) the poster is able to determine the rule of its own ownership?

We almost have the agreement that 1 is not good for the healthy and free information flow. But whatever 1 makes sense on the point that the post owner can protect himself/herself facing cyberbullying in this way. Out of this reason, we propose an auxiliary mechanism: one can only comment with paying some social tokens issued by the poster or some party.

In case of the design and implementation details, it requires more discussions and considerations.

[Bounty] RSS3 X Mask Network: Maskbook Integration

Intro

The plugin syncs the encrypted content published by users via Maskbook to the RSS3 network, and there is already a working SDK to help you do this faster. User should be able to control the sync status inside the Mask

Prize

  • 1000 USDC From RSS3 Team
  • 1000 USDC From Mask Network

UI Part

There's really not a UI part. Just follow up the image below and generate a plugin then it should be auto generated
1
2

Resource

Demo needed

Still quite confused about the final implement of RSS3, a runable demo should be helpful~

About name service: how to find a persona

The proposal has unique ids in persona files for finding files and authentication, but finding and subscribing to personas through complex and meaningless ids is a bad idea, so a name service is needed

There are two ways that come to mind

  1. name as filename, i.e. names take over the function of finding files, the advantage of this is that it is more efficient, the disadvantage is that the name service would be tied to the corresponding distributed network, which would make the different networks more fragmented and require two pieces of information to find a persona: network + name

  2. id as a filename and making a DNS-like system, which has the opposite advantages and disadvantages of 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.