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.
🎇 RSS3 Protocol v0.4.0 is in hot discussion
🎉 v0.3.1
// 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 AccountID = string; // ${platform}-${identity}, for example, EVM+-0x1234567890123456789012345678901234567890 or Twitter-rss3_
type RSS3CustomItemID = string; // `${RSS3ID}-item-custom-${index}`
type RSS3AutoItemID = string; // `${RSS3ID}-item-auto-${index}`
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: AccountID;
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;
};
}
type RSS3Profile = Required<RSS3Index>['profile'];
type RSS3Account = Required<RSS3Profile>['accounts'][number];
type RSS3Links = Required<RSS3Index>['links'];
// 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 RSS3Asset = RSS3CustomAsset | RSS3AutoAsset;
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 RSS3Item = RSS3CustomItem | RSS3AutoItem;
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-${AccountID}', `assets-${RSS3Asset}` '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
};
};
}
RSS3 is a community-based project, built with an open ecosystem and creative developers, and we thank every one for the participation.
- Report irrationality or request feature in issues
- Discussion in discussions
- Submit your pull request
RSS3 - @rss3_ - [email protected]
Project Link: https://github.com/NaturalSelectionLabs/RSS3