gegelulu / RSS3

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.

Home Page:https://rss3.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RSS3

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.

Latest draft

Changelog

🎉 v0.3.0

// File ids
type RSS3ID = string; // A 42-character hexadecimal address with 0x appended in front.
type RSS3ItemsID = string; // `${RSS3ID}-items-${index}`
type RSS3ListID = string; // `${RSS3ID}-list-links.${links.type}-${index}`, `${RSS3ID}-list-backlinks.${backlinks.type}-${index}`, `${RSS3ID}-list-assets-${index}`, `${RSS3ID}-list-backlinks.item.${item.index}.${backlinks.type}-${index}`

type RSS3FileID = RSS3ID | RSS3ItemsID | RSS3ListID; // Unique indicate for current file

type RSS3ItemID = string; // `${RSS3ID}-item-${index}`

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

// Common attributes for each files
interface RSS3Base {
    version: 'rss3.io/version/v0.3.0'; // 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
}

// Entrance, RSS3 file, indicating a persona
interface RSS3 extends RSS3Base {
    id: RSS3ID;
    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`
    controller?: string; // A contract address indicating ownership of the file

    profile?: {
        name?: string;
        avatar?: ThirdPartyAddress;
        bio?: string;

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

    items?: RSS3ItemsID;

    links?: {
        tags?: string[];
        type: string; // Link type, for example: follow superfollow
        list?: RSS3ListID; // Personas who belong to this link
    }[];
    backlinks?: { // Backlinks for this persona, for example: follow type of backlink means followers.
        auto: true;
        type: string; // The same as links.type
        list: RSS3ListID; // File ID of backlink list that belong to this type. See **RSS3List** for more details
    }[];

    assets?: RSS3ListID;
}

// RSS3Items file, used for pagination of RSS3 files
interface RSS3Items extends RSS3Base {
    id: RSS3ItemsID;
    signature: string;
    agent_id?: string;
    agent_signature?: string;

    items: RSS3Item[]; // List of items
    items_next?: RSS3ItemsID; // Next page of items
}

// RSS3List file, used for pagination of links and contexts
interface RSS3List extends RSS3Base {
    id: RSS3ListID;

    list?: RSS3ID[] | RSS3ItemID[] | RSS3Asset[];
    list_next?: RSS3ListID;
}

// Asset
type RSS3Asset = RSS3UserAsset | RSS3NodeAsset;

interface RSS3NodeAsset {
    auto: true;
    platform: string; // Corresponding to profile.accounts.platform
    identity: string; // Corresponding to profile.accounts.identity
    id: string; // Unique asset ID
    type: string; // Asset type, for example: Ethereum-NFT xDai-POAP
}

interface RSS3UserAsset {
    tags?: string[];
    platform: 'custom'; // Corresponding to profile.accounts.platform
    identity: string; // Corresponding to profile.accounts.identity
    id: string; // Unique asset ID
    type: string; // Asset type, for example: Ethereum-NFT xDai-POAP
}

// Item
type RSS3Item = RSS3UserItem | RSS3NodeItem;

interface RSS3ItemBase {
    id: RSS3ItemID;
    date_published: string; // Specifies the published date in RFC 3339 format
    date_modified: string; // Specifies the modified date in RFC 3339 format

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

// A type of content posted by persona itself
interface RSS3UserItem extends RSS3ItemBase {
    tags?: string[];
    authors?: RSS3ID[];
    title?: string;
    summary?: string;

    link?: {
        type: string; // Link type for the non-original item, for example: comment like
        target: RSS3ItemID; // 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;
    }[];
}

// A type of content that is automatically generated by a node to represent a change of an asset
interface RSS3NodeItem extends RSS3ItemBase {
    auto: true;
    account_platform: string; // Corresponding to profile.accounts.platform
    account_identity: string; // Corresponding to profile.accounts.identity
    asset_id: string; // Corresponding to asset.id
    asset_type: string; // Corresponding to asset.type
    asset_action: {
        type: string;
        target?: string;
    };
}

Historical drafts

Contributing

RSS3 is a community-based project, built with an open ecosystem and creative developers, and we thank every one for the participation.

Contact

Twitter Telegram Discord

RSS3 - @rss3_ - contact@rss3.io

Project Link: https://github.com/NaturalSelectionLabs/RSS3

About

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.

https://rss3.io