",
27 | "pub_date": "2024-01-29T12:03:29.000Z"
28 | }
29 | ----
30 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Transaction/Burn/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Burn
2 |
3 | `Burn` indicates the action of burning token(s).
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Burn {
10 | address?: string;
11 | id?: string;
12 | value: string;
13 | name?: string;
14 | symbol?: string;
15 | uri?: string;
16 | decimals?: number;
17 | standard?: string;
18 | }
19 | ----
20 |
21 | ===== Fields
22 |
23 | `address` *Optional*:: Address of the burnt assets. If the token is a native token, this field is not required, e.g. `0x1f961BCEAEF8eDF6fb2797C0293FfBDe3E994614`.
24 | `id` *Optional*:: ID of the burnt assets.
25 | `name` *Optional*:: Name of the burnt assets, e.g. `Dingo Token`.
26 | `standard` *Optional*:: Standard of the burnt assets, e.g. `ERC-20`.
27 | `symbol` *Optional*:: Symbol of the burnt assets, e.g. `DINGO`.
28 | `value` *Required*:: Amount of the burnt assets, e.g. `9000000000000000`.
29 | `uri` *Optional*:: URI of the burnt assets, e.g. `https://ipfs.io/ipfs/QmSx9QiwjTGKb5m22UscTg3vrbMwUfFsmxVzMH57hkPD5U/1032.png`.
30 | `decimals` *Optional*:: Decimals of the burnt assets, e.g. `9`.
31 |
32 | ===== Example
33 |
34 | [,json]
35 | ----
36 | {
37 | "address": "0x1f961BCEAEF8eDF6fb2797C0293FfBDe3E994614",
38 | "value": "9000000000000000",
39 | "name": "Dingo Token",
40 | "symbol": "DINGO",
41 | "decimals": 9,
42 | "standard": "ERC-20"
43 | }
44 | ----
45 |
46 |
--------------------------------------------------------------------------------
/versions/v1.0.0/main.adoc:
--------------------------------------------------------------------------------
1 | = RSS3 Protocol v1.0.0
2 | :toc:
3 | :toc-title: Table of Contents
4 | :toclevels: 2
5 | :source-highlighter: highlight.js
6 |
7 | == Editors
8 |
9 | . BruceXC (https://github.com/brucexc[*@brucexc*])
10 | . Henry (https://github.com/HenryQW[*@HenryQW*])
11 | . KallyDev https://github.com/kallydev[*@kallydev*]
12 | . Nya Candy (https://github.com/Candinya[*@Candinya*])
13 | . Polebug (https://github.com/Polebug[*@Polebug*])
14 | . pseudoyu (https://github.com/pseudoyu[*@pseudoyu*])
15 | . Thomas (https://github.com/naaive[*@naaive*])
16 |
17 | == Abstract
18 |
19 | RSS3 Protocol v1.0.0 is completely rewritten from the ground up, replacing its predecessor v0.4.0-rc.1.
20 | It has been tested on the RSS3 DSL v0.4 - v0.9 for over 1 year and is now ready to be employed by the RSS3 DSL v1.0.0.
21 | The Protocol improves scalability, interoperability, and performance while reducing the stroage cost for the RSS3 DSL.
22 |
23 | == Specification
24 | include::Collectible/main.adoc[]
25 | include::Exchange/main.adoc[]
26 | include::Metaverse/main.adoc[]
27 | include::RSS/main.adoc[]
28 | include::Social/main.adoc[]
29 | include::Transaction/main.adoc[]
30 |
31 | == Future Compatibility
32 |
33 | This version is considered to be the first stable and production-grade version of the RSS3 Protocol.
34 | It is designed to be compatible with future versions of the RSS3 Protocol, where breaking changes are expected to be minimal.
--------------------------------------------------------------------------------
/versions/v1.0.0/Metaverse/Mint/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Mint
2 |
3 | `Mint` indicates the action of minting token(s).
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Mint {
10 | address?: string;
11 | id?: string;
12 | name?: string;
13 | standard?: string;
14 | symbol?: string;
15 | value: string;
16 | uri?: string;
17 | parsed_image_url?: string;
18 | }
19 | ----
20 |
21 | ===== Fields
22 |
23 | `address` *Optional*:: Address of the minted metaverse token, e.g. `0xFC19B4536a4b9B9EEc1C362894f7dC505457538D`.
24 | `id` *Optional*:: ID of the minted metaverse token, e.g. `696`.
25 | `name` *Optional*:: Name of the minted metaverse token, e.g. `R3FUS3`.
26 | `standard` *Optional*:: Standard of the minted metaverse token, e.g. `ERC-721`.
27 | `symbol` *Optional*:: Symbol of the minted metaverse token, e.g. `R3FUS3`.
28 | `value` *Required*:: Amount of the minted metaverse token, e.g. `1`.
29 | `uri` *Optional*:: URI of the minted metaverse token, e.g. `https://api.r3fus3.com/api/v1/token/696`.
30 | `parsed_image_url` *Optional*:: Parsed image URL of the minted metaverse token, e.g. `https://api.r3fus3.com/api/v1/token/696/image`.
31 |
32 | ===== Example
33 |
34 | [,json]
35 | ----
36 | {
37 | "address": "0x385Eeac5cB85A38A9a07A70c73e0a3271CfB54A7",
38 | "decimals": 18,
39 | "name": "Aavegotchi GHST Token (PoS)",
40 | "standard": "ERC-20",
41 | "symbol": "GHST",
42 | "value": "2200000000000000000"
43 | }
44 | ----
--------------------------------------------------------------------------------
/versions/v1.0.0/Transaction/Mint/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Mint
2 |
3 | `Mint` indicates the action of minting token(s).
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Mint {
10 | address?: string;
11 | id?: string;
12 | value: string;
13 | name?: string;
14 | symbol?: string;
15 | uri?: string;
16 | decimals?: number;
17 | standard?: string;
18 | }
19 | ----
20 |
21 | ===== Fields
22 |
23 | `address` *Optional*:: Address of the minted assets. If the token is a native token, this field is not required, e.g. `0x5F1B0A5dBc388a631F324f38C5245bC3410be991`.
24 | `id` *Optional*:: ID of the minted assets, e.g. `0`.
25 | `name` *Optional*:: Name of the minted assets, e.g. `SpaceX Voucher 71 of 100`.
26 | `standard` *Optional*:: Standard of the minted assets, e.g. `ERC-1155`.
27 | `symbol` *Optional*:: Symbol of the minted assets, e.g. `Reward at 3webx.cc`.
28 | `value` *Required*:: Amount of the minted assets, e.g. `1`.
29 | `uri` *Optional*:: URI of the minted assets, e.g. `https://3webx.cc/0.json`.
30 | `decimals` *Optional*:: Decimals of the minted assets, e.g. `18`.
31 |
32 | ===== Example
33 |
34 | [,json]
35 | ----
36 | {
37 | "address": "0x5F1B0A5dBc388a631F324f38C5245bC3410be991",
38 | "id": "0",
39 | "value": "1",
40 | "name": "SpaceX Voucher 71 of 100",
41 | "symbol": "Reward at 3webx.cc",
42 | "uri": "https://3webx.cc/0.json",
43 | "standard": "ERC-1155"
44 | }
45 | ----
46 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Social/Profile/Create.adoc:
--------------------------------------------------------------------------------
1 | ===== Create
2 |
3 | `Create` indicates the action of creating new credentials.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Create {
10 | action: string
11 | profile_id?: string
12 | address?: string
13 | handle?: string
14 | image_uri?: string
15 | bio?: string
16 | name?: string
17 | expiry?: string
18 | key?: string
19 | value?: string
20 | }
21 | ----
22 |
23 | ===== Fields
24 |
25 | `action` *Required*:: Action of creating a new profile, e.g. `create`.
26 | `profile_id` *Required*:: ID of the new profile, e.g. `0x05272f`.
27 | `address` *Required*:: Address of the new profile, e.g. `0x0b5e6100243f793e480de6088de6ba70aa9f3872`.
28 | `handle` *Required*:: Handle/username of the newly created profile, e.g. `painfjj.lens`.
29 | `image_uri` *Optional*:: Image URI of the new profile.
30 | `bio` *Optional*:: Biography of the new profile.
31 | `name` *Optional*:: Name of the new profile.
32 | `expiry` *Optional*:: Expiry date of the new profile.
33 | `key` *Optional*:: Key of the new profile.
34 | `value` *Optional*:: Value of the new profile.
35 |
36 | ===== Example
37 |
38 | [,json]
39 | ----
40 | {
41 | "action": "create",
42 | "profile_id": "3569",
43 | "address": "0x3f54953e56a0fe272f3e1e61615bda1fd6578101",
44 | "handle": "beh.csb",
45 | "image_uri": "ipfs://bafkreidj4jdpwxi6aiz43ubokv5c3tnqlf4nfpkoss2rysfjzrdetgiekm"
46 | }
47 | ----
--------------------------------------------------------------------------------
/versions/v1.0.0/Transaction/Transfer/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Transfer
2 |
3 | `Transfer` indicates the action of transferring token(s) to others.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Transfer {
10 | address?: string;
11 | id?: string;
12 | value: string;
13 | name?: string;
14 | symbol?: string;
15 | uri?: string;
16 | decimals?: number;
17 | standard?: string;
18 | }
19 | ----
20 |
21 | ===== Fields
22 |
23 | `address` *Optional*:: Address of the transferred assets. If the token is a native token, this field is not required, e.g. `0x5F82a3967f279729A7C58D741E9824A6d653317E`.
24 | `id` *Optional*:: ID of the transferred assets, e.g. `7`.
25 | `name` *Optional*:: Name of the transferred assets, e.g. `xAI`.
26 | `standard` *Optional*:: Standard of the transferred assets, e.g. `ERC-20`.
27 | `symbol` *Optional*:: Symbol of the transferred assets, e.g. `xAI`.
28 | `value` *Required*:: Amount of the transferred assets, e.g. `4593020000012345678`.
29 | `uri` *Optional*:: URI of the transferred assets, e.g. `https://ipfs.io/ipfs/QmSx9QiwjTGKb5m22UscTg3vrbMwUfFsmxVzMH57hkPD5U/1032.png`.
30 | `decimals` *Optional*:: Decimals of the transferred assets, e.g. `8`.
31 |
32 | ===== Example
33 |
34 | [,json]
35 | ----
36 | {
37 | "address": "0x5F82a3967f279729A7C58D741E9824A6d653317E",
38 | "id": "7",
39 | "value": "4593020000012345678",
40 | "name": "xAI",
41 | "symbol": "xAI",
42 | "decimals": 8,
43 | "standard": "ERC-20"
44 | }
45 | ----
46 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Metaverse/Burn/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Burn
2 |
3 | `Burn` indicates the action of burning token(s).
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Burn {
10 | address?: string;
11 | id?: string;
12 | name?: string;
13 | standard?: string;
14 | symbol?: string;
15 | value: string;
16 | uri?: string;
17 | parsed_image_url?: string;
18 | }
19 |
20 | ----
21 |
22 | ===== Fields
23 |
24 | `address` *Optional*:: Address of the burnt metaverse token, e.g. `0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1`.
25 | `id` *Optional*:: ID of the burnt metaverse token, e.g. `1685`.
26 | `name` *Optional*:: Name of the burnt metaverse token, e.g. `Lido: stETH Withdrawal NFT`.
27 | `standard` *Optional*:: Standard of the burnt metaverse token, e.g. `ERC-721`.
28 | `symbol` *Optional*:: Symbol of the burnt metaverse token, e.g. `unstETH`.
29 | `value` *Required*:: Amount/value of the burnt metaverse token, e.g. `1`.
30 | `uri` *Optional*:: URI of the burnt metaverse token, e.g. `ipfs://QmdYeDpkVZedk1mkGodjNmF35UNxwafhFLVvsHrWgJoz6A/beanz_metadata/159`.
31 | `parsed_image_url` *Optional*:: Parsed image URL of the burnt metaverse token, e.g. `https://ipfs.io/ipfs/QmdYeDpkVZedk1mkGodjNmF35UNxwafhFLVvsHrWgJoz6A/beanz_metadata/159`.
32 |
33 | ===== Example
34 |
35 | [,json]
36 | ----
37 | {
38 | "address": "0x403E967b044d4Be25170310157cB1A4Bf10bdD0f",
39 | "decimals": 18,
40 | "name": "Aavegotchi FUD",
41 | "standard": "ERC-20",
42 | "symbol": "FUD",
43 | "value": "74800000000000000000"
44 | }
45 | ----
46 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Exchange/Staking/Claim.adoc:
--------------------------------------------------------------------------------
1 | ==== Claim
2 |
3 | `Claim` indicates the action of claiming staking rewards.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Claim {
10 | action: string;
11 | tokens: {
12 | address?: string;
13 | value: string;
14 | name?: string;
15 | symbol?: string;
16 | decimals?: string;
17 | standard?: string;
18 | }[];
19 | }
20 | ----
21 |
22 | ===== Fields
23 |
24 | `action` *Required*:: Action of the staking transaction, e.g. `claim`.
25 | `tokens` *Required*:: Array of tokens claimed from the staking pool.
26 | `tokens.address` *Optional*:: Contract address of the claimed token.
27 | If the token is a native token, this field is not required, e.g. `0xc98D64DA73a6616c42117b582e832812e7B8D57F`.
28 | `tokens.value` *Required*:: Amount of the claimed token, e.g. `5764251642130434218884`.
29 | `tokens.name` *Optional*:: Name of the claimed token, e.g. `RSS3`.
30 | `tokens.symbol` *Optional*:: Symbol of the claimed token, e.g. `RSS3`.
31 | `tokens.decimals` *Optional*:: Decimals of the claimed token, e.g. `18`.
32 | `tokens.standard` *Optional*:: Standard of the claimed token, e.g. `ERC-20`.
33 |
34 | ===== Example
35 |
36 | [,json]
37 | ----
38 | {
39 | "action": "claim",
40 | "token": {
41 | "address": "0xc98D64DA73a6616c42117b582e832812e7B8D57F",
42 | "value": "5764251642130434218884",
43 | "name": "RSS3",
44 | "symbol": "RSS3",
45 | "decimals": 18,
46 | "standard": "ERC-20"
47 | }
48 | }
49 | ----
50 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Exchange/Staking/Unstake.adoc:
--------------------------------------------------------------------------------
1 | ==== Unstake
2 |
3 | `Unstake` indicates the action of unstaking token(s).
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Unstake {
10 | action: string;
11 | tokens: {
12 | address?: string;
13 | value: string;
14 | name?: string;
15 | symbol?: string;
16 | decimals?: string;
17 | standard?: string;
18 | }[];
19 | }
20 | ----
21 |
22 | ===== Fields
23 |
24 | `action` *Required*:: Action of the staking transaction, e.g. `unstake`.
25 | `tokens` *Required*:: Array of tokens unstaked from the staking pool.
26 | `tokens.address` *Optional*:: Contract address of the unstaked token.
27 | If the token is a native token, this field is not required, e.g. `0xc98D64DA73a6616c42117b582e832812e7B8D57F`.
28 | `tokens.value` *Required*:: Amount of the unstaked token, e.g. `5764251642130434218884`.
29 | `tokens.name` *Optional*:: Name of the unstaked token, e.g. `RSS3`.
30 | `tokens.symbol` *Optional*:: Symbol of the unstaked token, e.g. `RSS3`.
31 | `tokens.decimals` *Optional*:: Decimals of the unstaked token, e.g. `18`.
32 | `tokens.standard` *Optional*:: Standard of the unstaked token, e.g. `ERC-20`.
33 |
34 | ===== Example
35 |
36 | [,json]
37 | ----
38 | {
39 | "action": "unstake",
40 | "token": {
41 | "address": "0xc98D64DA73a6616c42117b582e832812e7B8D57F",
42 | "value": "4160170000000000000000",
43 | "name": "RSS3",
44 | "symbol": "RSS3",
45 | "decimals": 18,
46 | "standard": "ERC-20"
47 | }
48 | }
49 | ----
50 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Collectible/Burn/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Burn
2 |
3 | `Burn` indicates the action of burning token(s).
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Burn {
10 | address?: string;
11 | id?: string;
12 | name?: string;
13 | standard?: string;
14 | symbol?: string;
15 | value: string;
16 | uri?: string;
17 | parsed_image_url?: string;
18 | }
19 | ----
20 |
21 | ===== Fields
22 |
23 | `address` *Optional*:: Address of the burnt collectible token, e.g. `0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1`.
24 | `id` *Optional*:: ID of the burnt collectible token, e.g. `1685`.
25 | `name` *Optional*:: Name of the burnt collectible token, e.g. `Lido: stETH Withdrawal NFT`.
26 | `standard` *Optional*:: Standard of the burnt collectible token, e.g. `ERC-721`.
27 | `symbol` *Optional*:: Symbol of the burnt collectible token, e.g. `unstETH`.
28 | `value` *Required*:: Amount/value of the burnt collectible token, e.g. `1`.
29 | `uri` *Optional*:: URI of the burnt collectible token, e.g. `https://api.opensea.io/api/v1/asset/0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1/1685`.
30 | `parsed_image_url` *Optional*:: Parsed image URL of the burnt collectible token, e.g. `https://ipfs.io/ipfs/QmSx9QiwjTGKb5m22UscTg3vrbMwUfFsmxVzMH57hkPD5U/1032.png`.
31 |
32 | ===== Example
33 |
34 | [,json]
35 | ----
36 | {
37 | "address": "0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1",
38 | "id": "1685",
39 | "value": "1",
40 | "name": "Lido: stETH Withdrawal NFT",
41 | "symbol": "unstETH",
42 | "standard": "ERC-721"
43 | }
44 | ----
45 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Exchange/Liquidity/Repay.adoc:
--------------------------------------------------------------------------------
1 | ==== Repay
2 |
3 | `Repay` indicates the action of repaying tokens to a lender.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Repay {
10 | action: string;
11 | tokens: {
12 | address?: string;
13 | value: string;
14 | name?: string;
15 | symbol?: string;
16 | decimals?: string;
17 | standard?: string;
18 | }[];
19 | }
20 | ----
21 |
22 | ===== Fields
23 |
24 | `action` *Required*:: Action of the liquidity transaction, e.g. `repay`.
25 | `tokens` *Required*:: Array of tokens repaid from the liquidity pool.
26 | `tokens.address` *Optional*:: Contract address of the repaid token.
27 | If the token is a native token, this field is not required, e.g. `0xc2132D05D31c914a87C6611C10748AEb04B58e8F`.
28 | `tokens.value` *Required*:: Amount of the repaid token, e.g. `451826732`.
29 | `tokens.name` *Optional*:: Name of the repaid token, e.g. `(PoS) Tether USD`.
30 | `tokens.symbol` *Optional*:: Symbol of the repaid token, e.g. `USDT`.
31 | `tokens.decimals` *Optional*:: Decimals of the repaid token, e.g. `6`.
32 | `tokens.standard` *Optional*:: Standard of the repaid token, e.g. `ERC-20`.
33 |
34 | ===== Example
35 |
36 | [,json]
37 | ----
38 | {
39 | "action": "repay",
40 | "tokens": [
41 | {
42 | "address": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
43 | "value": "451826732",
44 | "name": "(PoS) Tether USD",
45 | "symbol": "USDT",
46 | "decimals": 6,
47 | "standard": "ERC-20"
48 | }
49 | ]
50 | }
51 | ----
52 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Exchange/Liquidity/Supply.adoc:
--------------------------------------------------------------------------------
1 | ==== Supply
2 |
3 | `Supply` indicates the action of supplying token(s) to a lender.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Supply {
10 | action: string;
11 | tokens: {
12 | address?: string;
13 | value: string;
14 | name?: string;
15 | symbol?: string;
16 | decimals?: string;
17 | standard?: string;
18 | }[];
19 | }
20 | ----
21 |
22 | ===== Fields
23 |
24 | `action` *Required*:: Action of the liquidity transaction, e.g. `supply`.
25 | `tokens` *Required*:: Array of tokens supplied from the liquidity pool.
26 | `tokens.address` *Optional*:: Contract address of the supplied token.
27 | If the token is a native token, this field is not required, e.g. `0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359`.
28 | `tokens.value` *Required*:: Amount of the supplied token, e.g. `700000000`.
29 | `tokens.name` *Optional*:: Name of the supplied token, e.g. `USD Coin`.
30 | `tokens.symbol` *Optional*:: Symbol of the supplied token, e.g. `USDC`.
31 | `tokens.decimals` *Optional*:: Decimals of the supplied token, e.g. `6`.
32 | `tokens.standard` *Optional*:: Standard of the supplied token, e.g. `ERC-20`.
33 |
34 | ===== Example
35 |
36 | [,json]
37 | ----
38 | {
39 | "action": "supply",
40 | "tokens": [
41 | {
42 | "address": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
43 | "value": "700000000",
44 | "name": "USD Coin",
45 | "symbol": "USDC",
46 | "decimals": 6,
47 | "standard": "ERC-20"
48 | }
49 | ]
50 | }
51 | ----
52 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Exchange/Liquidity/Borrow.adoc:
--------------------------------------------------------------------------------
1 | ==== Borrow
2 |
3 | `Borrow` indicates the action of borrowing token(s) from a lender.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Borrow {
10 | action: string;
11 | tokens: {
12 | address?: string;
13 | value: string;
14 | name?: string;
15 | symbol?: string;
16 | decimals?: string;
17 | standard?: string;
18 | }[];
19 | }
20 | ----
21 |
22 | ===== Fields
23 |
24 | `action` *Required*:: Action of the liquidity transaction, e.g. `borrow`.
25 | `tokens` *Required*:: Array of borrowed tokens from the liquidity pool.
26 | `tokens.address` *Optional*:: Contract address of the borrowed token.
27 | If the token is a native token, this field is not required, e.g. `0xc2132D05D31c914a87C6611C10748AEb04B58e8F`.
28 | `tokens.value` *Required*:: Amount of the borrowed token, e.g. `800000000`.
29 | `tokens.name` *Optional*:: Name of the borrowed token, e.g. `(PoS) Tether USD`.
30 | `tokens.symbol` *Optional*:: Symbol of the borrowed token, e.g. `USDT`.
31 | `tokens.decimals` *Optional*:: Decimals of the borrowed token, e.g. `6`.
32 | `tokens.standard` *Optional*:: Standard of the borrowed token, e.g. `ERC-20`.
33 |
34 | ===== Example
35 |
36 | [,json]
37 | ----
38 | {
39 | "action": "borrow",
40 | "tokens": [
41 | {
42 | "address": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
43 | "value": "800000000",
44 | "name": "(PoS) Tether USD",
45 | "symbol": "USDT",
46 | "decimals": 6,
47 | "standard": "ERC-20"
48 | }
49 | ]
50 | }
51 | ----
52 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Exchange/Liquidity/Withdraw.adoc:
--------------------------------------------------------------------------------
1 | ==== Withdraw
2 |
3 | `Withdraw` indicates the action of transferring token(s) from either a CEX or a DEX.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Withdraw {
10 | action: string;
11 | tokens: {
12 | address?: string;
13 | value: string;
14 | name?: string;
15 | symbol?: string;
16 | decimals?: string;
17 | standard?: string;
18 | }[];
19 | }
20 | ----
21 |
22 | ===== Fields
23 |
24 | `action` *Required*:: Action of the liquidity transaction, e.g. `withdraw`.
25 | `tokens` *Required*:: Array of tokens withdrawn from the liquidity pool.
26 | `tokens.address` *Optional*:: Contract address of the withdrawn token.
27 | If the token is a native token, this field is not required, e.g. `0xaf88d065e77c8cC2239327C5EDb3A432268e5831`.
28 | `tokens.value` *Required*:: Amount of the withdrawn token, e.g. `124996062957`.
29 | `tokens.name` *Optional*:: Name of the withdrawn token, e.g. `USD Coin`.
30 | `tokens.symbol` *Optional*:: Symbol of the withdrawn token, e.g. `USDC`.
31 | `tokens.decimals` *Optional*:: Decimals of the withdrawn token, e.g. `6`.
32 | `tokens.standard` *Optional*:: Standard of the withdrawn token, e.g. `ERC-20`.
33 |
34 | ===== Example
35 |
36 | [,json]
37 | ----
38 | {
39 | "action": "withdraw",
40 | "tokens": [
41 | {
42 | "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
43 | "value": "124996062957",
44 | "name": "USD Coin",
45 | "symbol": "USDC",
46 | "decimals": 6,
47 | "standard": "ERC-20"
48 | }
49 | ]
50 | }
51 | ----
52 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Metaverse/Transfer/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Transfer
2 |
3 | `Transfer` indicates the action of transfering in-game item to others.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Transfer {
10 | address?: string;
11 | id?: string;
12 | name?: string;
13 | standard?: string;
14 | symbol?: string;
15 | value: string;
16 | uri?: string;
17 | parsed_image_url?: string;
18 | }
19 | ----
20 |
21 | ===== Fields
22 |
23 | `address` *Optional*:: Address of the transferred metaverse token, e.g. `0x5452C7fB99D99fAb3Cc1875E9DA9829Cb50F7A13`.
24 | `id` *Optional*:: ID of the transferred metaverse token, e.g. `1032`.
25 | `name` *Optional*:: Name of the transferred metaverse token, e.g. `The Genesis RSS3 Avatar NFT`.
26 | `standard` *Optional*:: Standard of the transferred metaverse token, e.g. `ERC-721`.
27 | `symbol` *Optional*:: Symbol of the transferred metaverse token, e.g. `The Genesis RSS3 Avatar NFT`.
28 | `value` *Required*:: Amount/value of the transferred metaverse token, e.g. `1`.
29 | `uri` *Optional*:: URI of the transferred metaverse token, e.g. `ipfs://QmdHTECGDf8u4vNe4PLXSqBTBkYqxiCaYYfdJiUhtgiBKR/6`.
30 | `parsed_image_url` *Optional*:: Parsed image URL of the transferred metaverse token, e.g. `https://ipfs.io/ipfs/QmdHTECGDf8u4vNe4PLXSqBTBkYqxiCaYYfdJiUhtgiBKR/6.png`.
31 |
32 | ===== Example
33 |
34 | [,json]
35 | ----
36 | {
37 | "address": "0x385Eeac5cB85A38A9a07A70c73e0a3271CfB54A7",
38 | "decimals": 18,
39 | "name": "Aavegotchi GHST Token (PoS)",
40 | "standard": "ERC-20",
41 | "symbol": "GHST",
42 | "value": "50000000000000000"
43 | }
44 | ----
45 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Collectible/Approval/Approve.adoc:
--------------------------------------------------------------------------------
1 | ==== Approve
2 |
3 | `Approve` indicates the action of granting permissions to token.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Approve {
10 | action: string;
11 | address?: string;
12 | id?: string;
13 | name?: string;
14 | standard?: string;
15 | symbol?: string;
16 | value: string;
17 | uri?: string;
18 | parsed_image_url?: string;
19 | }
20 | ----
21 |
22 | ===== Fields
23 |
24 | `action` *Required*:: Action of granting permissions to collectible token, e.g. `approve`.
25 | `address` *Optional*:: Address of the approved collectible token, e.g. `0x7713Ccb297657ca84eD79bdDf5907e0196D34205`.
26 | `id` *Optional*:: ID of the approved collectible token, e.g. `6`.
27 | `name` *Optional*:: Name of the approved collectible token, e.g. `CCFC`.
28 | `standard` *Optional*:: Standard of the approved collectible token, e.g. `ERC-721`.
29 | `symbol` *Optional*:: Symbol of the approved collectible token, e.g. `CCFC`.
30 | `value` *Required*:: Amount of the approved collectible token, e.g. `1`.
31 | `uri` *Optional*:: URI of the approved collectible token, e.g. `ipfs://QmdHTECGDf8u4vNe4PLXSqBTBkYqxiCaYYfdJiUhtgiBKR/6`.
32 | `parsed_image_url` *Optional*:: Parsed image URL of the approved collectible token, e.g. `https://ipfs.io/ipfs/QmdHTECGDf8u4vNe4PLXSqBTBkYqxiCaYYfdJiUhtgiBKR`
33 |
34 | ===== Example
35 |
36 | [,json]
37 | ----
38 | {
39 | "action": "approve",
40 | "address": "0x7713Ccb297657ca84eD79bdDf5907e0196D34205",
41 | "id": "6",
42 | "name": "CCFC",
43 | "standard": "ERC-721",
44 | "symbol": "CCFC",
45 | "uri": " ipfs://QmdHTECGDf8u4vNe4PLXSqBTBkYqxiCaYYfdJiUhtgiBKR/6"
46 | }
47 | ----
48 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Collectible/Mint/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Mint
2 |
3 | `Mint` indicates the action of minting token(s).
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Mint {
10 | address?: string;
11 | id?: string;
12 | name?: string;
13 | standard?: string;
14 | symbol?: string;
15 | value: string;
16 | uri?: string;
17 | parsed_image_url?: string;
18 | }
19 | ----
20 |
21 | ===== Fields
22 |
23 | `address` *Optional*:: Address of the minted collectible token, e.g. `0xFC19B4536a4b9B9EEc1C362894f7dC505457538D`.
24 | `id` *Optional*:: ID of the minted collectible token, e.g. `696`.
25 | `name` *Optional*:: Name of the minted collectible token, e.g. `R3FUS3`.
26 | `standard` *Optional*:: Standard of the minted collectible token, e.g. `ERC-721`.
27 | `symbol` *Optional*:: Symbol of the minted collectible token, e.g. `R3FUS3`.
28 | `value` *Required*:: Amount of the minted collectible token, e.g. `1`.
29 | `uri` *Optional*:: URI of the minted collectible token, e.g. `https://highlight-creator-assets.highlight.xyz/main/base-dir/b0b61e2c-f741-48c4-94ca-f090c9f5817e/onChainDir/696`.
30 | `parsed_image_url` *Optional*:: Parsed image URL of the minted collectible token, e.g. `https://highlight-creator-assets.highlight.xyz/main/base-dir/b0b61e2c-f741-48c4-94ca-f090c9f5817e/onChainDir/696`.
31 |
32 | ===== Example
33 |
34 | [,json]
35 | ----
36 | {
37 | "address": "0xFC19B4536a4b9B9EEc1C362894f7dC505457538D",
38 | "id": "696",
39 | "value": "1",
40 | "name": "R3FUS3",
41 | "symbol": "R3FUS3",
42 | "uri": "https://highlight-creator-assets.highlight.xyz/main/base-dir/b0b61e2c-f741-48c4-94ca-f090c9f5817e/onChainDir/696",
43 | "standard": "ERC-721"
44 | }
45 | ----
46 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Social/Proxy/Remove.adoc:
--------------------------------------------------------------------------------
1 | ==== Remove
2 |
3 | `Remove` indicates the action of removing a proxy.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Remove {
10 | action: string
11 | profile: {
12 | profile_id?: string
13 | address?: string
14 | handle?: string
15 | image_uri?: string
16 | bio?: string
17 | name?: string
18 | expiry?: string
19 | key?: string
20 | value?: string
21 | }
22 | proxy_address: string
23 | }
24 | ----
25 |
26 | ===== Fields
27 |
28 | `action` *Required*:: Action of removing a proxy account, e.g. `remove`.
29 | `profile.profile_id` *Required*:: Profile ID of the profile, e.g. `32010`.
30 | `profile.address` *Required*:: Address of the profile, e.g. `0x23c46e912b34c09c4bcc97f4ed7cdd762cee408a`.
31 | `profile.handle` *Required*:: Handle/username of the profile, e.g. `brucexx.csb`.
32 | `profile.image_uri` *Optional*:: Image URI of the profile.
33 | `profile.bio` *Optional*:: Biography of the profile.
34 | `profile.name` *Optional*:: Name of the profile.
35 | `profile.expiry` *Optional*:: Expiry date of the profile.
36 | `profile.key` *Optional*:: Key of the profile.
37 | `profile.value` *Optional*:: Value of the profile.
38 | `proxy_address` *Required*:: Proxy address to be removed from the profile, e.g. `0x0f588318a494e4508a121a32b6670b5494ca3357`.
39 |
40 | ===== Example
41 |
42 | [,json]
43 | ----
44 | {
45 | "action": "remove",
46 | "proxy_address": "0x0f588318a494e4508a121a32b6670b5494ca3357",
47 | "profile": {
48 | "profile_id": "32010",
49 | "address": "0x23c46e912b34c09c4bcc97f4ed7cdd762cee408a",
50 | "handle": "brucexx.csb"
51 | }
52 | }
53 | ----
--------------------------------------------------------------------------------
/versions/v1.0.0/Social/Proxy/Appoint.adoc:
--------------------------------------------------------------------------------
1 | ==== Appoint
2 |
3 | `Appoint` indicates the action of delegating rights to a proxy address.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Appoint {
10 | action: string
11 | profile: {
12 | profile_id?: string
13 | address?: string
14 | handle?: string
15 | image_uri?: string
16 | bio?: string
17 | name?: string
18 | expiry?: string
19 | key?: string
20 | value?: string
21 | }
22 | proxy_address: string
23 | }
24 | ----
25 |
26 | ===== Fields
27 |
28 | `action` *Required*:: Action of appointing rights to a proxy account, e.g. `appoint`.
29 | `profile.profile_id` *Required*:: Profile ID of the profile, e.g. `55544`.
30 | `profile.address` *Required*:: Address of the profile, e.g. `0x8a6ddc78e3aa24f4f31980623f489a274b305762`.
31 | `profile.handle` *Required*:: Handle/username of the profile, e.g. `ordi.csb`.
32 | `profile.image_uri` *Optional*:: Image URI of the profile.
33 | `profile.bio` *Optional*:: Biography of the profile.
34 | `profile.name` *Optional*:: Name of the profile.
35 | `profile.expiry` *Optional*:: Expiry date of the profile.
36 | `profile.key` *Optional*:: Key of the profile.
37 | `profile.value` *Optional*:: Value of the profile.
38 | `proxy_address` *Required*:: Proxy address to which the profile's rights are being delegated, e.g. `0xbbc2918c9003d264c25ecae45b44a846702c0e7c`.
39 |
40 | ===== Example
41 |
42 | [,json]
43 | ----
44 | {
45 | "action": "appoint",
46 | "proxy_address": "0xbbc2918c9003d264c25ecae45b44a846702c0e7c",
47 | "profile": {
48 | "profile_id": "55544",
49 | "address": "0x8a6ddc78e3aa24f4f31980623f489a274b305762",
50 | "handle": "ordi.csb"
51 | }
52 | }
53 | ----
--------------------------------------------------------------------------------
/versions/v1.0.0/Social/Profile/Update.adoc:
--------------------------------------------------------------------------------
1 | ===== Update
2 |
3 | `Update` indicates the action of updating an existing credential.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Update {
10 | action: string
11 | profile_id?: string
12 | address?: string
13 | handle?: string
14 | image_uri?: string
15 | bio?: string
16 | name?: string
17 | expiry?: string
18 | key?: string
19 | value?: string
20 | }
21 | ----
22 |
23 | ===== Fields
24 |
25 | `action` *Required*:: Action of updating a profile, e.g. `update`.
26 | `profile_id` *Optional*:: Updated ID of the profile, e.g. `0x01766e`.
27 | `address` *Optional*:: Updated address of the profile, e.g. `0x76d4ffda8c66864fa07f0a285b8e01e11b4bb7b3`.
28 | `handle` *Optional*:: Updated handle/username of the profile, e.g. `brinse.lens`.
29 | `image_uri` *Optional*:: Updated image URI of the profile, e.g. `https://media.orb.ac/thumbnailDimension768/https://statics-polygon-lens.s3.eu-west-1.amazonaws.com/profile/nft-0x6441543C6537FF430f2e1d6fE8FFFcfc05d52D04_polygon_0x5D666F215a85B87Cb042D59662A7ecd2C8Cc44e6_3097622.gif`.
30 | `bio` *Optional*:: Updated bio of the profile.
31 | `name` *Optional*:: Updated name of the profile, e.g. `Paperhandoooooor`.
32 | `expiry` *Optional*:: Updated expiry date of the profile.
33 | `key` *Optional*:: Updated key of the profile.
34 | `value` *Optional*:: Updated value of the profile.
35 |
36 | ===== Example
37 |
38 | [,json]
39 | ----
40 | {
41 | "action": "update",
42 | "profile_id": "0x020a73",
43 | "address": "0xece7eddc02fb8f0010420d0d76911826b1536655",
44 | "handle": "gupta.lens",
45 | "image_uri": "ipfs://bafybeih5jwshcxwa73mtfdhwqs2rtevrbhl6t3blrtlb4n5dpea4iqplpu",
46 | "bio": "I'm trader.",
47 | "name": "PETE"
48 | }
49 | ----
--------------------------------------------------------------------------------
/versions/v1.0.0/Transaction/Approval/Revoke.adoc:
--------------------------------------------------------------------------------
1 | ===== Revoke
2 |
3 | `Revoke` indicates the action of removing permissions to assets.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Revoke {
10 | action: string;
11 | address?: string;
12 | id?: string;
13 | value?: string;
14 | name?: string;
15 | symbol?: string;
16 | uri?: string;
17 | decimals?: number;
18 | standard?: string;
19 | }
20 | ----
21 |
22 | ===== Fields
23 |
24 | `action` *Required*:: Action of removing permissions to assets, e.g. `revoke`.
25 | `address` *Optional*:: Address of the revoked assets. If the token is a native token, this field is not required, e.g. `0x72e4f9F808C49A2a61dE9C5896298920Dc4EEEa9`.
26 | `id` *Optional*:: ID of the revoked assets, e.g. `6`.
27 | `name` *Optional*:: Name of the revoked assets, e.g. `HarryPotterObamaSonic10Inu`.
28 | `standard` *Optional*:: Standard of the revoked assets, e.g. `ERC-20`.
29 | `symbol` *Optional*:: Symbol of the revoked assets, e.g. `BITCOIN`.
30 | `value` *Required*:: Amount of the revoked assets, e.g. `100000000000`.
31 | `uri` *Optional*:: URI of the revoked assets, e.g. `https://assets.coingecko.com/coins/images/30323/thumb/hpos10i_logo_casino_night-dexview.png?1696529224`.
32 | `decimals` *Optional*:: Decimals of the revoked assets, e.g. `8`.
33 |
34 | ===== Example
35 |
36 | [,json]
37 | ----
38 | {
39 | "action": "revoke",
40 | "address": "0x72e4f9F808C49A2a61dE9C5896298920Dc4EEEa9",
41 | "id": "6",
42 | "value": "100000000000",
43 | "name": "HarryPotterObamaSonic10Inu",
44 | "symbol": "BITCOIN",
45 | "uri": "https://assets.coingecko.com/coins/images/30323/thumb/hpos10i_logo_casino_night-dexview.png?1696529224",
46 | "decimals": 8,
47 | "standard": "ERC-20"
48 | }
49 | ----
--------------------------------------------------------------------------------
/versions/v1.0.0/Transaction/Approval/Approve.adoc:
--------------------------------------------------------------------------------
1 | ===== Approve
2 |
3 | `Approve` indicates the action of granting permissions to assets.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Approve {
10 | action: string;
11 | address?: string;
12 | id?: string;
13 | value?: string;
14 | name?: string;
15 | symbol?: string;
16 | uri?: string;
17 | decimals?: number;
18 | standard?: string;
19 | }
20 | ----
21 |
22 | ===== Fields
23 |
24 | `action` *Required*:: Action of granting permissions to assets, e.g. `approve`.
25 | `address` *Optional*:: Address of the approved assets. If the token is a native token, this field is not required, e.g. `0x72e4f9F808C49A2a61dE9C5896298920Dc4EEEa9`.
26 | `id` *Optional*:: ID of the approved assets, e.g. `6`.
27 | `name` *Optional*:: Name of the approved assets, e.g. `HarryPotterObamaSonic10Inu`.
28 | `standard` *Optional*:: Standard of the approved assets, e.g. `ERC-20`.
29 | `symbol` *Optional*:: Symbol of the approved assets, e.g. `BITCOIN`.
30 | `value` *Required*:: Amount of the approved assets, e.g. `100000000000`.
31 | `uri` *Optional*:: URI of the approved assets, e.g. `https://assets.coingecko.com/coins/images/30323/thumb/hpos10i_logo_casino_night-dexview.png?1696529224`.
32 | `decimals` *Optional*:: Decimals of the approved assets, e.g. `8`.
33 |
34 | ===== Example
35 |
36 | [,json]
37 | ----
38 | {
39 | "action": "approve",
40 | "address": "0x72e4f9F808C49A2a61dE9C5896298920Dc4EEEa9",
41 | "id": "6",
42 | "value": "100000000000",
43 | "name": "HarryPotterObamaSonic10Inu",
44 | "symbol": "BITCOIN",
45 | "uri": "https://assets.coingecko.com/coins/images/30323/thumb/hpos10i_logo_casino_night-dexview.png?1696529224",
46 | "decimals": 8,
47 | "standard": "ERC-20"
48 | }
49 | ----
--------------------------------------------------------------------------------
/versions/v1.0.0/Exchange/Liquidity/Add.adoc:
--------------------------------------------------------------------------------
1 | ==== Add
2 |
3 | `Add` indicates the action of adding token(s) to liquidity pool.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Add {
10 | action: string;
11 | tokens: {
12 | address?: string;
13 | value: string;
14 | name?: string;
15 | symbol?: string;
16 | decimals?: string;
17 | standard?: string;
18 | }[];
19 | }
20 | ----
21 |
22 | ===== Fields
23 |
24 | `action` *Required*:: Action of the liquidity transaction, e.g. `add`.
25 | `tokens` *Required*:: Array of added tokens to the liquidity pool.
26 | `tokens.address` *Optional*:: Contract address of the added token.
27 | If the token is a native token, this field is not required, e.g. `0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270`.
28 | `tokens.value` *Required*:: Amount of the added token, e.g. `1127959597785240492482`.
29 | `tokens.name` *Optional*:: Name of the added token, e.g. `Wrapped Matic`.
30 | `tokens.symbol` *Optional*:: Symbol of the added token, e.g. `WMATIC`.
31 | `tokens.decimals` *Optional*:: Decimals of the added token, e.g. `18`.
32 | `tokens.standard` *Optional*:: Standard of the added token, e.g. `ERC-20`.
33 |
34 | ===== Example
35 |
36 | [,json]
37 | ----
38 | {
39 | "action": "add",
40 | "tokens": [
41 | {
42 | "address": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
43 | "value": "1127959597785240492482",
44 | "name": "Wrapped Matic",
45 | "symbol": "WMATIC",
46 | "decimals": 18,
47 | "standard": "ERC-20"
48 | },
49 | {
50 | "address": "0x61299774020dA444Af134c82fa83E3810b309991",
51 | "value": "277872765449489056246",
52 | "name": "Render Token",
53 | "symbol": "RNDR",
54 | "decimals": 18,
55 | "standard": "ERC-20"
56 | }
57 | ]
58 | }
59 | ----
60 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Exchange/Liquidity/Remove.adoc:
--------------------------------------------------------------------------------
1 | ==== Remove
2 |
3 | `Remove` indicates the action of removing token(s) from a liquidity pool.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Remove {
10 | action: string;
11 | tokens: {
12 | address?: string;
13 | value: string;
14 | name?: string;
15 | symbol?: string;
16 | decimals?: string;
17 | standard?: string;
18 | }[];
19 | }
20 | ----
21 |
22 | ===== Fields
23 |
24 | `action` *Required*:: Action of the liquidity transaction, e.g. `remove`.
25 | `tokens` *Required*:: Array of tokens removed from the liquidity pool.
26 | `tokens.address` *Optional*:: Contract address of the removed token.
27 | If the token is a native token, this field is not required, e.g. `0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6`.
28 | `tokens.value` *Required*:: Amount of the removed token, e.g. `234654`.
29 | `tokens.name` *Optional*:: Name of the removed token, e.g. `(PoS) Wrapped BTC`.
30 | `tokens.symbol` *Optional*:: Symbol of the removed token, e.g. `WBTC`.
31 | `tokens.decimals` *Optional*:: Decimals of the removed token, e.g. `8`.
32 | `tokens.standard` *Optional*:: Standard of the removed token, e.g. `ERC-20`.
33 |
34 | ===== Example
35 |
36 | [,json]
37 | ----
38 | {
39 | "action": "remove",
40 | "tokens": [
41 | {
42 | "address": "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",
43 | "value": "234654",
44 | "name": "(PoS) Wrapped BTC",
45 | "symbol": "WBTC",
46 | "decimals": 8,
47 | "standard": "ERC-20"
48 | },
49 | {
50 | "address": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",
51 | "value": "39315876980378304",
52 | "name": "Wrapped Ether",
53 | "symbol": "WETH",
54 | "decimals": 18,
55 | "standard": "ERC-20"
56 | }
57 | ]
58 | }
59 | ----
60 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # RSS3 Protocol
2 |
3 | The RSS3 Protocol follows [the RSS3 Whitepaper](https://github.com/RSS3-Network/Whitepaper) and aims to build a decentralized, open source, and extensible protocol for the dissenmination of Open Information.
4 |
5 | ## Motivation
6 |
7 | Open Information, indexed from multiple open data protocols (ODPs), is structured according to the structure outlined in this Protocol.
8 | Therefore, the Protocol acts as the specific data structure facilitating the dissenmination of Open Information on the RSS3 Network.
9 |
10 | Given that ODPs employ diverse data structures, within any given ODP, it's common to find products, services, and protocols, each utilizing distinct data structures to meet their unique requirements.
11 | This lack of standardization means limited interoperability, posing a challenge to the development of scalable applications using Open Information.
12 |
13 | ## Objective
14 |
15 | The Protocol aims to tackle this issue by offering a comprehensive set of data structures that serve as an abstraction.
16 | The abstraction simplifies data integration processes, thus making it more manageable and scalable for developers to work with Open Information.
17 | This, in turn, promotes the free flow of Open Information.
18 |
19 | ## Historical Archive
20 |
21 | For the RSS3 Community's earlier efforts prior to this version, please refer to [the archive branch](https://github.com/RSS3-Network/Protocol/tree/archive).
22 |
23 | ## License
24 |
25 | The RSS3 Protocol is collectively maintained by the RSS3 Community. All work under this repository is marked with [CC0 1.0](./LICENSE).
26 |
27 | 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.
28 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Exchange/Liquidity/Collect.adoc:
--------------------------------------------------------------------------------
1 | ==== Collect
2 |
3 | `Collect` indicates the action of collecting token(s) from a user.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Collect {
10 | action: string;
11 | tokens: {
12 | address?: string;
13 | value: string;
14 | name?: string;
15 | symbol?: string;
16 | decimals?: string;
17 | standard?: string;
18 | }[];
19 | }
20 | ----
21 |
22 | ===== Fields
23 |
24 | `action` *Required*:: Action of the liquidity transaction, e.g. `collect`.
25 | `tokens` *Required*:: Array of tokens collected from the liquidity pool.
26 | `tokens.address` *Optional*:: Contract address of the collected token.
27 | If the token is a native token, this field is not required, e.g. `0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270`.
28 | `tokens.value` *Required*:: Amount of the collected token, e.g. `30203318448367192913`.
29 | `tokens.name` *Optional*:: Name of the collected token, e.g. `Wrapped Matic`.
30 | `tokens.symbol` *Optional*:: Symbol of the collected token, e.g. `WMATIC`.
31 | `tokens.decimals` *Optional*:: Decimals of the collected token, e.g. `18`.
32 | `tokens.standard` *Optional*:: Standard of the collected token, e.g. `ERC-20`.
33 |
34 | ===== Example
35 |
36 | [,json]
37 | ----
38 | {
39 | "action": "collect",
40 | "tokens": [
41 | {
42 | "address": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
43 | "value": "30203318448367192913",
44 | "name": "Wrapped Matic",
45 | "symbol": "WMATIC",
46 | "decimals": 18,
47 | "standard": "ERC-20"
48 | },
49 | {
50 | "address": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",
51 | "value": "70529493711267",
52 | "name": "Wrapped Ether",
53 | "symbol": "WETH",
54 | "decimals": 18,
55 | "standard": "ERC-20"
56 | }
57 | ]
58 | }
59 | ----
60 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Exchange/Staking/Stake.adoc:
--------------------------------------------------------------------------------
1 | ==== Stake
2 |
3 | `Stake` indicates the action of staking token(s).
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Stake {
10 | action: string;
11 | token: {
12 | address?: string;
13 | value: string;
14 | name?: string;
15 | symbol?: string;
16 | decimals?: string;
17 | standard?: string;
18 | };
19 | period?: {
20 | start: Date,
21 | end: Date,
22 | }
23 | }
24 | ----
25 |
26 | ===== Fields
27 |
28 | `action` *Required*:: Action of the staking transaction, e.g. `stake`.
29 | `tokens` *Required*:: Array of tokens staked from the staking pool.
30 | `tokens.address` *Optional*:: Contract address of the staked token.
31 | If the token is a native token, this field is not required, e.g. `0xc98D64DA73a6616c42117b582e832812e7B8D57F`.
32 | `tokens.value` *Required*:: Amount of the staked token, e.g. `5764251642130434218884`.
33 | `tokens.name` *Optional*:: Name of the staked token, e.g. `RSS3`.
34 | `tokens.symbol` *Optional*:: Symbol of the staked token, e.g. `RSS3`.
35 | `tokens.decimals` *Optional*:: Decimals of the staked token, e.g. `18`.
36 | `tokens.standard` *Optional*:: Standard of the staked token, e.g. `ERC-20`.
37 | `period` *Optional*:: Period of the staking (if the staking has a time locker).
38 | `period.start` *Required*:: Start time of the staking period, e.g. `2023-02-02T12:26:59Z`.
39 | `period.end` *Required*:: End time of the staking period, e.g. `2023-05-03T12:26:59Z`.
40 |
41 | ===== Example
42 |
43 | [,json]
44 | ----
45 | {
46 | "action": "stake",
47 | "token": {
48 | "address": "0xc98D64DA73a6616c42117b582e832812e7B8D57F",
49 | "value": "5931560000000000000000",
50 | "name": "RSS3",
51 | "symbol": "RSS3",
52 | "decimals": 18,
53 | "standard": "ERC-20"
54 | },
55 | "period": {
56 | "start": "2023-02-02T12:26:59Z",
57 | "end": "2023-05-03T12:26:59Z"
58 | }
59 | }
60 | ----
61 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Collectible/Transfer/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Transfer
2 |
3 | `Transfer` indicates the aciton of transferring token(s) to others.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Transfer {
10 | address?: string;
11 | id?: string;
12 | name?: string;
13 | standard?: string;
14 | symbol?: string;
15 | value: string;
16 | uri?: string;
17 | parsed_image_url?: string;
18 | }
19 | ----
20 |
21 | ===== Fields
22 |
23 | `address` *Optional*:: Address of the transferred collectible token, e.g. `0x5452C7fB99D99fAb3Cc1875E9DA9829Cb50F7A13`.
24 | `id` *Optional*:: ID of the transferred collectible token, e.g. `1032`.
25 | `name` *Optional*:: Name of the transferred collectible token, e.g. `The Genesis RSS3 Avatar NFT`.
26 | `standard` *Optional*:: Standard of the transferred collectible token, e.g. `ERC-721`.
27 | `symbol` *Optional*:: Symbol of the transferred collectible token, e.g. `The Genesis RSS3 Avatar NFT`.
28 | `value` *Required*:: Amount/value of the transferred collectible token, e.g. `1`.
29 | `uri` *Optional*:: URI of the transferred collectible token, e.g. `ipfs://QmdHTECGDf8u4vNe4PLXSqBTBkYqxiCaYYfdJiUhtgiBKR/6`.
30 | `parsed_image_url` *Optional*:: Parsed image URL of the transferred collectible token, e.g. `https://ipfs.io/ipfs/QmSX9QiwjTGbk5m22UscTg3vrbMwUfFsmxVzMI57hkPD5U/1032.png`.
31 |
32 | ===== Example
33 |
34 | [,json]
35 | ----
36 | {
37 | "address": "0x5452C7fB99D99fAb3Cc1875E9DA9829Cb50F7A13",
38 | "id": "1032",
39 | "value": "1",
40 | "name": "The Genesis RSS3 Avatar NFT",
41 | "symbol": "The Genesis RSS3 Avatar NFT",
42 | "uri": "data:application/json;base64,eyJuYW1lIjogIlRoZSBHZW5lc2lzIFJTUzMgQXZhdGFyIE5GVCAjMTAzMiIsICJkZXNjcmlwdGlvbiI6ICJUaGUgR2VuZXNpcyBSU1MzIEF2YXRhciBORlQgaXMgYSBjb2xsZWN0aW9uIG9mIDEwLDAwMCB1bmlxdWUgYXZhdGFycyBtZXRpY3Vsb3VzbHkgZGVzaWduZWQgdG8gaWRlbnRpZnkgUlNTMyBjb21tdW5pdHkgbWVtYmVycy4iLCAiaW1hZ2UiOiAiaXBmczovL1FtU1g5UWl3alRHQms1bTIyVXNjVGczdnJiTXdVZkZzbXhWek1INTdoa1BENVUvMTAzMi5wbmcifQ==",
43 | "standard": "ERC-721"
44 | }
45 | ----
46 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Social/Revise/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Revise
2 |
3 | `Revise` indicates the action of updating an existing post.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Revise {
10 | handle: string
11 | body: string
12 | title: string
13 | summary: string
14 | media: {
15 | address: string
16 | mime_type: string
17 | }[]
18 | tags: string[]
19 | author_url: string
20 | profile_id: string
21 | publication_id: string
22 | content_uri: string
23 | timestamp: number
24 | }
25 | ----
26 |
27 | ===== Fields
28 |
29 | `handle` *Optional*:: Handle/username of the user who is revising, e.g. `ordi.csb`.
30 | `body` *Optional*:: Updated content of the post, e.g. `https://cn.noxinfluencer.com/youtube-channel-rank/top-100-all...`.
31 | `title` *Optional*:: Updated title of the post, e.g. `YouTube Top100`.
32 | `summary` *Optional*:: Updated short summary of the post.
33 | `media` *Optional*:: Updated array of media objects that are attached to the post.
34 | `media.address` *Required*:: Updated url/address of the media object.
35 | `media.mime_type` *Required*:: Updated mime type of the media object.
36 | `tags` *Optional*:: Updated array of tags that the post belongs to.
37 | `author_url` *Optional*:: URL of the author.
38 | `profile_id` *Optional*:: Profile ID of the author, e.g. `55544`.
39 | `publication_id` *Optional*:: Updated publication ID of the post, e.g. `7`.
40 | `content_uri` *Optional*:: Updated content URI of the post, e.g. `ipfs://bafkreic7t3twgima3cu54r7ftyuut6h74wpdwtlqoxcd66ox5qtkptokmy`.
41 | `timestamp` *Optional*:: Updated timestamp of the post.
42 |
43 | ===== Example
44 |
45 | [,json]
46 | ----
47 | {
48 | "handle": "ordi.csb",
49 | "title": "YouTube Top100",
50 | "body": "https://cn.noxinfluencer.com/youtube-channel-rank/top-100-all-all-youtuber-sorted-by-subs-weekly\n\n\n1 T-Series https://www.youtube.com/@tseries\n",
51 | "profile_id": "55544",
52 | "publication_id": "7",
53 | "content_uri": "ipfs://bafkreic7t3twgima3cu54r7ftyuut6h74wpdwtlqoxcd66ox5qtkptokmy"
54 | }
55 | ----
--------------------------------------------------------------------------------
/versions/v1.0.0/Collectible/Approval/Revoke.adoc:
--------------------------------------------------------------------------------
1 | ==== Revoke
2 |
3 | `Revoke` indicates the action of removing permissions to token.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Revoke {
10 | action: string;
11 | address?: string;
12 | id?: string;
13 | name?: string;
14 | standard?: string;
15 | symbol?: string;
16 | value: string;
17 | uri?: string;
18 | parsed_image_url?: string;
19 | }
20 | ----
21 |
22 | ===== Fields
23 |
24 | `action` *Required*:: Action of removing permissions to collectible token, e.g. `revoke`.
25 | `address` *Optional*:: Address of the revoked collectible token, e.g. `0x5452C7fB99D99fAb3Cc1875E9DA9829Cb50F7A13`.
26 | `id` *Optional*:: ID of the revoked collectible token, e.g. `1032`.
27 | `name` *Optional*:: Name of the revoked collectible token, e.g. `The Genesis RSS3 Avatar NFT`.
28 | `standard` *Optional*:: Standard of the revoked collectible token, e.g. `ERC-721`.
29 | `symbol` *Optional*:: Symbol of the revoked collectible token, e.g. `The Genesis RSS3 Avatar NFT`.
30 | `value` *Required*:: Amount of the revoked collectible token, e.g. `1`.
31 | `uri` *Optional*:: URI of the revoked collectible token, e.g. `ipfs://QmdHTECGDf8u4vNe4PLXSqBTBkYqxiCaYYfdJiUhtgiBKR/6`.
32 | `parsed_image_url` *Optional*:: Parsed image URL of the revoked collectible token, e.g. `https://ipfs.io/ipfs/QmSx9QiwjTGKb5m22UscTg3vrbMwUfFsmxVzMH57hkPD5U/1032.png`.
33 |
34 | ===== Example
35 |
36 | [,json]
37 | ----
38 | {
39 | "action": "revoke",
40 | "address": "0x5452C7fB99D99fAb3Cc1875E9DA9829Cb50F7A13",
41 | "id": "1032",
42 | "name": "The Genesis RSS3 Avatar NFT",
43 | "symbol": "The Genesis RSS3 Avatar NFT",
44 | "uri": "data:application/json;base64,eyJuYW1lIjogIlRoZSBHZW5lc2lzIFJTUzMgQXZhdGFyIE5GVCAjMTAzMiIsICJkZXNjcmlwdGlvbiI6ICJUaGUgR2VuZXNpcyBSU1MzIEF2YXRhciBORlQgaXMgYSBjb2xsZWN0aW9uIG9mIDEwLDAwMCB1bmlxdWUgYXZhdGFycyBtZXRpY3Vsb3VzbHkgZGVzaWduZWQgdG8gaWRlbnRpZnkgUlNTMyBjb21tdW5pdHkgbWVtYmVycy4iLCAiaW1hZ2UiOiAiaXBmczovL1FtU1g5UWl3alRHQms1bTIyVXNjVGczdnJiTXdVZkZzbXhWek1INTdoa1BENVUvMTAzMi5wbmcifQ==",
45 | "standard": "ERC-721"
46 | }
47 | ----
48 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Social/Delete/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Delete
2 |
3 | `Delete` indicates the action of deleting a post.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Delete {
10 | handle?: string
11 | body?: string
12 | title?: string
13 | summary?: string
14 | media?: {
15 | address: string
16 | mime_type: string
17 | }[]
18 | tags?: string[]
19 | author_url?: string
20 | profile_id?: string
21 | publication_id?: string
22 | content_uri?: string
23 | timestamp?: number
24 | }
25 | ----
26 |
27 | ===== Fields
28 |
29 | `handle` *Optional*:: Handle/username of the user who deleted the post, e.g. `ordi.csb`.
30 | `body` *Optional*:: Main content of the deleted post, e.g. `https://cn.noxinfluencer.com/youtube-channel-rank/top-100-all-all-youtuber-sorted-by-subs-weekly\n\n\n1 T-Series https://www.youtube.com/@tseries\n`.
31 | `title` *Optional*:: Title of the deleted post, e.g. `YouTube Top100`.
32 | `summary` *Optional*:: Summary of the deleted post.
33 | `media` *Optional*:: Array of media objects that are attached to the deleted post.
34 | `media.address` *Required*:: URL/address of the media object.
35 | `media.mime_type` *Required*:: Mime type of the media object.
36 | `tags` *Optional*:: Array of tags that the deleted post belongs to.
37 | `author_url` *Optional*:: URL of the author.
38 | `profile_id` *Optional*:: Profile ID of the author, e.g. `55544`.
39 | `publication_id` *Optional*:: Publication ID of the deleted post, e.g. `7`.
40 | `content_uri` *Optional*:: Content URI of the deleted post, e.g. `ipfs://bafkreic7t3twgima3cu54r7ftyuut6h74wpdwtlqoxcd66ox5qtkptokmy`.
41 | `timestamp` *Optional*:: Timestamp of the deleted post.
42 |
43 | ===== Example
44 |
45 | [,json]
46 | ----
47 | {
48 | "handle": "ordi.csb",
49 | "title": "YouTube Top100",
50 | "body": "https://cn.noxinfluencer.com/youtube-channel-rank/top-100-all-all-youtuber-sorted-by-subs-weekly\n\n\n1 T-Series https://www.youtube.com/@tseries\n",
51 | "profile_id": "55544",
52 | "publication_id": "7",
53 | "content_uri": "ipfs://bafkreic7t3twgima3cu54r7ftyuut6h74wpdwtlqoxcd66ox5qtkptokmy"
54 | }s
55 | ----
--------------------------------------------------------------------------------
/versions/v1.0.0/Transaction/Bridge/Deposit.adoc:
--------------------------------------------------------------------------------
1 | ===== Deposit
2 |
3 | `Deposit` indicates the action of depositing token(s) from one network to another.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Deposit {
10 | action: string;
11 | source_network: string;
12 | target_network: string;
13 | token: {
14 | address?: string;
15 | id?: string;
16 | value: string;
17 | name?: string;
18 | symbol?: string;
19 | uri?: string;
20 | decimals?: number;
21 | standard?: string;
22 | }
23 | }
24 | ----
25 |
26 | ===== Fields
27 |
28 | `action` *Required*:: Action of depositing assets from one network to another, e.g. `deposit`.
29 | `source_network` *Required*:: Source network from which the tokens are deposited, e.g. `ethereum`.
30 | `target_network` *Required*:: Target network to which the tokens are deposited, e.g. `ethereum`.
31 | `token` *Required*:: Details of the deposited token.
32 | `token.address` *Optional*:: Address of the deposited token. If the token is a native token, this field is not required, e.g. `0x23b891e5C62E0955ae2bD185990103928Ab817b3`.
33 | `token.id` *Optional*:: ID of the deposited token, e.g. `0x23b891e5C62E0955ae2bD185990103928Ab817b3`.
34 | `token.value` *Required*:: Amount of the deposited token, e.g. `84265385201993306272353`.
35 | `token.name` *Optional*:: Name of the deposited token, e.g. `nUSD`.
36 | `token.symbol` *Optional*:: Symbol of the deposited token, e.g. `nUSD`.
37 | `token.uri` *Optional*:: URI of the deposited token, e.g. `https://assets.coingecko.com/coins/images/279/large/ethereum.png`.
38 | `token.decimals` *Optional*:: Decimals of the deposited token, e.g. `18`.
39 | `token.standard` *Optional*:: Standard of the deposited token, e.g. `ERC-20`.
40 |
41 | ===== Example
42 |
43 | [,json]
44 | ----
45 | {
46 | "action": "deposit",
47 | "source_network": "ethereum",
48 | "target_network": "ethereum",
49 | "token": {
50 | "address": "0x23b891e5C62E0955ae2bD185990103928Ab817b3",
51 | "value": "84265385201993306272353",
52 | "name": "nUSD",
53 | "symbol": "nUSD",
54 | "decimals": 18,
55 | "standard": "ERC-20"
56 | }
57 | }
58 | ----
--------------------------------------------------------------------------------
/versions/v1.0.0/Social/Post/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Post
2 |
3 | `Post` indicates the action of publishing a new post.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Post {
10 | handle?: string
11 | body?: string
12 | title?: string
13 | summary?: string
14 | media?: {
15 | address: string
16 | mime_type: string
17 | }[]
18 | tags?: string[]
19 | author_url?: string
20 | profile_id?: string
21 | publication_id?: string
22 | content_uri?: string
23 | timestamp?: number
24 | }
25 | ----
26 |
27 | ===== Fields
28 |
29 | `handle` *Optional*:: Handle/username of the user who is posting, e.g. `mstrbstrd.lens`.
30 | `body` *Optional*:: Main content of the post, e.g. `Missed my lens frens :) happy to be back.`.
31 | `title` *Optional*:: Title of the post.
32 | `summary` *Optional*:: Summary of the post.
33 | `media` *Optional*:: Array of media objects that are attached to the post.
34 | `media.address` *Required*:: URL/address of the media object, e.g. `ipfs://QmVKY2PnqeeRgtbzPqPuXhJokkV2TmfVeu9kk81fE93UqB`.
35 | `media.mime_type` *Required*:: Mime type of the media object, e.g. `image/jpeg`.
36 | `tags` *Optional*:: Array of tags that the post belongs to, e.g. `["orbpaidcollect"]`.
37 | `author_url` *Optional*:: URL of the author.
38 | `profile_id` *Optional*:: Profile ID of the author, e.g. `0x019c14`.
39 | `publication_id` *Optional*:: Publication ID of the post, e.g. `0x80`.
40 | `content_uri` *Optional*:: Content URI of the post, e.g. `ar://JasdNwPn2LotuM1MjquEiHrEyzpe_a9ejnCtNr3KAIo`.
41 | `timestamp` *Optional*:: Timestamp of the post, e.g. `1699329250`.
42 |
43 | ===== Example
44 |
45 | [,json]
46 | ----
47 | {
48 | "handle": "mstrbstrd.lens",
49 | "body": "Missed my lens frens :) happy to be back.",
50 | "media": [
51 | {
52 | "address": "ipfs://QmVKY2PnqeeRgtbzPqPuXhJokkV2TmfVeu9kk81fE93UqB",
53 | "mime_type": "image/jpeg"
54 | }
55 | ],
56 | "profile_id": "0x019c14",
57 | "publication_id": "0x80",
58 | "content_uri": "ar://JasdNwPn2LotuM1MjquEiHrEyzpe_a9ejnCtNr3KAIo",
59 | "tags": [
60 | "orbpaidcollect"
61 | ],
62 | "timestamp": 1699329250
63 | }
64 | ----
--------------------------------------------------------------------------------
/versions/v1.0.0/Transaction/Bridge/Withdraw.adoc:
--------------------------------------------------------------------------------
1 | ===== Withdraw
2 |
3 | `Withdraw` indicates the action of withdrawing token(s) from one network to another.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Withdraw {
10 | action: string;
11 | source_network: string;
12 | target_network: string;
13 | token: {
14 | address?: string;
15 | id?: string;
16 | value: string;
17 | name?: string;
18 | symbol?: string;
19 | uri?: string;
20 | decimals?: number;
21 | standard?: string;
22 | }
23 | }
24 | ----
25 |
26 | ===== Fields
27 |
28 | `action` *Required*:: Action of withdrawing assets from one network to another, e.g. `withdraw`.
29 | `source_network` *Required*:: Source network from which the tokens are withdrawn, e.g. `zksync_lite`.
30 | `target_network` *Required*:: Target network to which the tokens are withdrawn, e.g. `ethereum`.
31 | `token` *Required*:: Details of the withdrawn token.
32 | `token.address` *Optional*:: Address of the withdrawn token. If the token is a native token, this field is not required, e.g. `0x7713Ccb297657ca84eD79bdDf5907e0196D34205`.
33 | `token.id` *Optional*:: ID of the withdrawn token.
34 | `token.value` *Required*:: Amount of the withdrawn token, e.g. `30000000000000000`.
35 | `token.name` *Optional*:: Name of the withdrawn token, e.g. `Ethereum`.
36 | `token.symbol` *Optional*:: Symbol of the withdrawn token, e.g. `ETH`.
37 | `token.uri` *Optional*:: URI of the withdrawn token, e.g. `https://assets.coingecko.com/coins/images/279/large/ethereum.png`.
38 | `token.decimals` *Optional*:: Decimal of the withdrawn token, e.g. `18`.
39 | `token.standard` *Optional*:: Standard of the withdrawn token, e.g. `ERC20`.
40 |
41 | ===== Example
42 |
43 | [,json]
44 | ----
45 | {
46 | "action": "deposit",
47 | "source_network": "zksync_lite",
48 | "target_network": "ethereum",
49 | "token": {
50 | "address": "0x7713Ccb297657ca84eD79bdDf5907e0196D34205",
51 | "value": "30000000000000000",
52 | "name": "Ethereum",
53 | "symbol": "ETH",
54 | "uri": "https://assets.coingecko.com/coins/images/279/large/ethereum.png",
55 | "decimals": 18
56 | }
57 | }
58 | ----
59 |
60 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Social/Mint/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Mint
2 |
3 | `Mint` indicates the action of minting a post.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Mint {
10 | handle?: string
11 | body?: string
12 | title?: string
13 | summary?: string
14 | media?: {
15 | address: string
16 | mime_type: string
17 | }[]
18 | tags?: string[]
19 | author_url?: string
20 | profile_id?: string
21 | publication_id?: string
22 | content_uri?: string
23 | timestamp?: number
24 | }
25 | ----
26 |
27 | ===== Fields
28 |
29 | `handle` *Optional*:: Handle/username of the user who minted the post, e.g. `galverse.lens`.
30 | `body` *Optional*:: Main content of the minted post, e.g. `💫 **Director Ayaka featured in GQ Japan!**\n\nGQ JAPAN are highlighting Director @lens/ayaka_ohira's work as an animation artist + the upcoming Galverse anime!\n\n📸 Watch it on Instagram: instagram.com/p/C68Ms9NtSci/\n📺 Watch it on TikTok: vt.tiktok.com/ZSYdhUaLw/\n\n_Check it out + like + share ❤️_`.
31 | `title` *Optional*:: Title of the minted post.
32 | `summary` *Optional*:: Summary of the minted post.
33 | `media` *Optional*:: Array of media objects that are attached to the minted post.
34 | `media.address` *Required*:: URL/address of the media object, e.g. `ipfs://QmRqN3KTHqaV9mmxotxXa4i1vKFdaYJJPUgUCF8ccMukfP`.
35 | `media.mime_type` *Required*:: Mime type of the media object, e.g. `image/png`.
36 | `tags` *Optional*:: Array of tags that the minted post belongs to, e.g. `["orbcommunitiesGalverse"]`.
37 | `author_url` *Optional*:: URL of the author.
38 | `profile_id` *Optional*:: Profile ID of the author, e.g. `0x01c5b9`.
39 | `publication_id` *Optional*:: Publication ID of the minted post, e.g. `0x49`.
40 | `content_uri` *Optional*:: Content URI of the minted post, e.g. `ar://K8BiVK02MkWW_Qu4js66mqBwm6ZbLn9mGZaRbuyfyNc`.
41 | `timestamp` *Optional*:: Timestamp of the minted post, e.g. `1715724978`.
42 |
43 | ===== Example
44 |
45 | [,json]
46 | ----
47 | {
48 | "handle": "henryqw.lens",
49 | "body": "\"demos\", meaning people, and \"kratos\" meaning power; so democracy can be thought of as \"power of the people\": a way of governing which depends on the will of the people.",
50 | "profile_id": "0x83a6",
51 | "publication_id": "0x08",
52 | "content_uri": "https://arweave.net/aMAYipJXf9rVHnwRYnNF7eUCxBc1zfkaopBt5TJwLWw",
53 | "timestamp": 1679902646
54 | }
55 | ----
--------------------------------------------------------------------------------
/versions/v1.0.0/Exchange/Swap/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Swap
2 |
3 | `Swap` indicates the action of swapping token from one to another.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Swap {
10 | from: {
11 | address?: string;
12 | value: string;
13 | name?: string;
14 | symbol?: string;
15 | decimals?: string;
16 | standard?: string;
17 | };
18 | to: {
19 | address?: string;
20 | value: string;
21 | name?: string;
22 | symbol?: string;
23 | decimals?: number;
24 | standard?: string;
25 | };
26 | }
27 | ----
28 |
29 | ===== Fields
30 |
31 | `from` *Required*:: Token that was swapped from.
32 | `from.address` *Optional*:: Contract address of the token that was swapped from.
33 | If the token is a native token, this field is not required, e.g. null.
34 | `from.value` *Required*:: Amount of the token that was swapped from, e.g. `141100000000000000000`.
35 | `from.name` *Optional*:: Name of the token that was swapped from, e.g. `Ethereum`.
36 | `from.symbol` *Optional*:: Symbol of the token that was swapped from, e.g. `ETH`.
37 | `from.decimals` *Optional*:: Decimals of the token that was swapped from, e.g. `18`.
38 | `from.standard` *Optional*:: Standard of the token that was swapped from, e.g. null.
39 | `to` *Required*:: Token that was swapped to.
40 | `to.address` *Optional*:: Contract address of the token that was swapped to.
41 | If the token is a native token, this field is not required, e.g. `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`.
42 | `to.value` *Required*:: Amount of the token that was swapped to, e.g. `317236429301`.
43 | `to.name` *Optional*:: Name of the token that was swapped to, e.g. `USD Coin`.
44 | `to.symbol` *Optional*:: Symbol of the token that was swapped to., e.g. `USDC`.
45 | `to.decimals` *Optional*:: Decimals of the token that was swapped to, e.g. `6`.
46 | `to.standard` *Optional*:: Standard of the token that was swapped to., e.g. `ERC-20`.
47 |
48 | ===== Example
49 |
50 | [,json]
51 | ----
52 | {
53 | "from": {
54 | "value": "141100000000000000000",
55 | "name": "Ethereum",
56 | "symbol": "ETH",
57 | "decimals": 18
58 | },
59 | "to": {
60 | "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
61 | "value": "317236429301",
62 | "name": "USD Coin",
63 | "symbol": "USDC",
64 | "decimals": 6,
65 | "standard": "ERC-20"
66 | }
67 | }
68 | ----
69 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Collectible/Trade/Buy.adoc:
--------------------------------------------------------------------------------
1 | ==== Buy
2 |
3 | `Buy` indicates the action of buying token(s).
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Buy {
10 | action: string;
11 | address?: string;
12 | id?: string;
13 | name?: string;
14 | standard?: string;
15 | symbol?: string;
16 | value: string;
17 | uri?: string;
18 | parsed_image_url?: string;
19 | cost: {
20 | name?: string;
21 | symbol?: string;
22 | decimals?: number;
23 | value: string;
24 | address?: string;
25 | standard?: string;
26 | };
27 | }
28 | ----
29 |
30 | ===== Fields
31 |
32 | `action` *Required*:: Action of buying collectible token, e.g. `buy`.
33 | `address` *Optional*:: Address of the bought collectible token, e.g. `0x74EE68a33f6c9f113e22B3B77418B75f85d07D22`.
34 | `id` *Optional*:: ID of the bought collectible token, e.g. `5`.
35 | `name` *Optional*:: Name of the bought collectible token, e.g. `Zerion Genesis Collection`.
36 | `standard` *Optional*:: Standard of the bought collectible token, e.g. `ERC-1155`.
37 | `symbol` *Optional*:: Symbol of the bought collectible token, e.g. `ZGC`.
38 | `value` *Required*:: Amount of the bought collectible token, e.g. `1`.
39 | `uri` *Optional*:: URI of the bought collectible token, e.g. `ipfs://QmXBUGFTXuAeBfK9oB9G1NAhGq7AwosWjHFRHMdahETeRK`.
40 | `parsed_image_url` *Optional*:: Parsed image URL of the bought collectible token.
41 | `cost` *Required*:: Cost of the bought collectible token. Should include the following fields.
42 | `cost.name` *Optional*:: Name of the cost token, e.g. `Ethereum`.
43 | `cost.symbol` *Optional*:: Symbol of the cost token, e.g. `ETH`.
44 | `cost.decimals` *Optional*:: Decimal places of the cost token, e.g. `18`.
45 | `cost.value` *Required*:: Amount of the cost token, e.g. `14525000000000000`.
46 | `cost.address` *Optional*:: Address of the cost token. If the token is a native token, this field is not required, e.g. `0x74EE68a33f6c9f113e22B3B77418B75f85d07D22`.
47 | `cost.standard` *Optional*:: Standard of the cost token, e.g. `ERC-20`.
48 |
49 | ===== Example
50 |
51 | [,json]
52 | ----
53 | {
54 | "action": "buy",
55 | "address": "0x74EE68a33f6c9f113e22B3B77418B75f85d07D22",
56 | "id": "5",
57 | "value": "1",
58 | "name": "Zerion Genesis Collection",
59 | "symbol": "ZGC",
60 | "uri": "ipfs://QmXBUGFTXuAeBfK9oB9G1NAhGq7AwosWjHFRHMdahETeRK",
61 | "standard": "ERC-1155",
62 | "cost": {
63 | "value": "14525000000000000",
64 | "name": "Ethereum",
65 | "symbol": "ETH",
66 | "decimals": 18
67 | }
68 | }
69 | ----
70 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Metaverse/Trade/Buy.adoc:
--------------------------------------------------------------------------------
1 | ==== Buy
2 |
3 | `Buy` indicates the action of buying in-game items.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Buy {
10 | action: string;
11 | address?: string;
12 | id?: string;
13 | name?: string;
14 | standard?: string;
15 | symbol?: string;
16 | value: string;
17 | uri?: string;
18 | parsed_image_url?: string;
19 | cost: {
20 | name?: string;
21 | symbol?: string;
22 | decimals?: number;
23 | value: string;
24 | address?: string;
25 | standard?: string;
26 | };
27 | }
28 | ----
29 |
30 | ===== Fields
31 |
32 | `action` *Required*:: Action of buying metaverse token, e.g. `buy`.
33 | `address` *Optional*:: Address of the bought metaverse token, e.g. `0x74EE68a33f6c9f113e22B3B77418B75f85d07D22`.
34 | `id` *Optional*:: ID of the bought metaverse token, e.g. `5`.
35 | `name` *Optional*:: Name of the bought metaverse token, e.g. `Zerion Genesis Collection`.
36 | `standard` *Optional*:: Standard of the bought metaverse token, e.g. `ERC-1155`.
37 | `symbol` *Optional*:: Symbol of the bought metaverse token, e.g. `ZGC`.
38 | `value` *Required*:: Amount of the bought metaverse token, e.g. `1`.
39 | `uri` *Optional*:: URI of the bought metaverse token, e.g. `ipfs://QmXBUGFTXuAeBfK9oB9G1NAhGq7AwosWjHFRHMdahETeRK`.
40 | `parsed_image_url` *Optional*:: Parsed image URL of the bought metaverse token, e.g. `https://ipfs.io/ipfs/QmXBUGFTXuAeBfK9oB9G1NAhGq7AwosWjHFRHMdahETeRK/image.png`.
41 | `cost` *Required*:: Cost of the bought metaverse token. Should include the following fields.
42 | `cost.name` *Optional*:: Name of the cost token, e.g. `Ethereum`.
43 | `cost.symbol` *Optional*:: Symbol of the cost token, e.g. `ETH`.
44 | `cost.decimals` *Optional*:: Decimal places of the cost token, e.g. `18`.
45 | `cost.value` *Required*:: Amount of the cost token, e.g. `14525000000000000`.
46 | `cost.address` *Optional*:: Address of the cost token. If the token is a native token, this field is not required, e.g. `0xFC19B4536a4b9B9EEc1C362894f7dC505457538D`.
47 | `cost.standard` *Optional*:: Standard of the cost token, e.g. `ERC-20`.
48 |
49 | ===== Example
50 |
51 | [,json]
52 | ----
53 | {
54 | "action": "buy",
55 | "address": "0x86935F11C86623deC8a25696E1C19a8659CbF95d",
56 | "cost": {
57 | "address": "0x385Eeac5cB85A38A9a07A70c73e0a3271CfB54A7",
58 | "decimals": 18,
59 | "name": "Aavegotchi GHST Token (PoS)",
60 | "standard": "ERC-20",
61 | "symbol": "GHST",
62 | "value": "1500000000000000000000"
63 | },
64 | "id": "11222",
65 | "name": "Aavegotchi",
66 | "standard": "ERC-721",
67 | "symbol": "GOTCHI",
68 | "uri": "https://app.aavegotchi.com/metadata/aavegotchis/11222"
69 | }
70 | ----
71 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Metaverse/Trade/Sell.adoc:
--------------------------------------------------------------------------------
1 | ==== Sell
2 |
3 | `Sell` indicates the action of selling in-game items.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Sell {
10 | action: string;
11 | address?: string;
12 | id?: string;
13 | name?: string;
14 | standard?: string;
15 | symbol?: string;
16 | value: string;
17 | uri?: string;
18 | parsed_image_url?: string;
19 | cost: {
20 | name?: string;
21 | symbol?: string;
22 | decimals?: number;
23 | value: string;
24 | address?: string;
25 | standard?: string;
26 | };
27 | }
28 | ----
29 |
30 | ===== Fields
31 |
32 | `action` *Required*:: Action of selling metaverse token, e.g. `sell`.
33 | `address` *Optional*:: Address of the sold metaverse token, e.g. `0x306b1ea3ecdf94aB739F1910bbda052Ed4A9f949`.
34 | `id` *Optional*:: ID of the sold metaverse token, e.g. `159`.
35 | `name` *Optional*:: Name of the sold metaverse token, e.g. `Beanz`.
36 | `standard` *Optional*:: Standard of the sold metaverse token, e.g. `ERC-721`.
37 | `symbol` *Optional*:: Symbol of the sold metaverse token, e.g. `BEANZ`.
38 | `value` *Required*:: Amount of the sold metaverse token, e.g. `1`.
39 | `uri` *Optional*:: URI of the sold metaverse token, e.g. `ipfs://QmdYeDpkVZedk1mkGodjNmF35UNxwafhFLVvsHrWgJoz6A/beanz_metadata/159`.
40 | `parsed_image_url` *Optional*:: Parsed image URL of the sold metaverse token, e.g. `https://ipfs.io/ipfs/QmdYeDpkVZedk1mkGodjNmF35UNxwafhFLVvsHrWgJoz6A/beanz_metadata/159`.
41 | `cost` *Required*:: Cost of the sold metaverse token. Should include the following fields.
42 | `cost.name` *Optional*:: Name of the cost token, e.g. `Wrapped Ether`.
43 | `cost.symbol` *Optional*:: Symbol of the cost token, e.g. `WETH`.
44 | `cost.decimals` *Optional*:: Decimal places of the cost token, e.g. `18`.
45 | `cost.value` *Required*:: Amount of the cost token, e.g. `10500000000000000`.
46 | `cost.address` *Optional*:: Address of the cost token. If the token is a native token, this field is not required, e.g. `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`.
47 | `cost.standard` *Optional*:: Standard of the cost token, e.g. `ERC-20`.
48 |
49 | ===== Example
50 |
51 | [,json]
52 | ----
53 | {
54 | "action": "sell",
55 | "address": "0x86935F11C86623deC8a25696E1C19a8659CbF95d",
56 | "cost": {
57 | "address": "0x385Eeac5cB85A38A9a07A70c73e0a3271CfB54A7",
58 | "decimals": 18,
59 | "name": "Aavegotchi GHST Token (PoS)",
60 | "standard": "ERC-20",
61 | "symbol": "GHST",
62 | "value": "1500000000000000000000"
63 | },
64 | "id": "11222",
65 | "name": "Aavegotchi",
66 | "standard": "ERC-721",
67 | "symbol": "GOTCHI",
68 | "uri": "https://app.aavegotchi.com/metadata/aavegotchis/11222"
69 | }
70 | ----
71 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Metaverse/Trade/List.adoc:
--------------------------------------------------------------------------------
1 | ==== List
2 |
3 | `List` indicates the action of selling in-game items for trading.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface List {
10 | action: string;
11 | address?: string;
12 | id?: string;
13 | name?: string;
14 | standard?: string;
15 | symbol?: string;
16 | value: string;
17 | uri?: string;
18 | parsed_image_url?: string;
19 | cost: {
20 | name?: string;
21 | symbol?: string;
22 | decimals?: number;
23 | value: string;
24 | address?: string;
25 | standard?: string;
26 | };
27 | }
28 | ----
29 |
30 | ===== Fields
31 |
32 | `action` *Required*:: Action of listing metaverse token, e.g. `sell`.
33 | `address` *Optional*:: Address of the listed metaverse token, e.g. `0x306b1ea3ecdf94aB739F1910bbda052Ed4A9f949`.
34 | `id` *Optional*:: ID of the listed metaverse token, e.g. `159`.
35 | `name` *Optional*:: Name of the listed metaverse token, e.g. `Beanz`.
36 | `standard` *Optional*:: Standard of the listed metaverse token, e.g. `ERC-721`.
37 | `symbol` *Optional*:: Symbol of the listed metaverse token, e.g. `BEANZ`.
38 | `value` *Required*:: Amount of the listed metaverse token, e.g. `1`.
39 | `uri` *Optional*:: URI of the listed metaverse token, e.g. `ipfs://QmdYeDpkVZedk1mkGodjNmF35UNxwafhFLVvsHrWgJoz6A/beanz_metadata/159`.
40 | `parsed_image_url` *Optional*:: Parsed image URL of the listed metaverse token, e.g. `https://ipfs.io/ipfs/QmdYeDpkVZedk1mkGodjNmF35UNxwafhFLVvsHrWgJoz6A/beanz_metadata/159`.
41 | `cost` *Required*:: Cost of the listed metaverse token. Should include the following fields.
42 | `cost.name` *Optional*:: Name of the cost token, e.g. `Wrapped Ether`.
43 | `cost.symbol` *Optional*:: Symbol of the cost token, e.g. `WETH`.
44 | `cost.decimals` *Optional*:: Decimal places of the cost token, e.g. `18`.
45 | `cost.value` *Required*:: Amount of the cost token, e.g. `10500000000000000`.
46 | `cost.address` *Optional*:: Address of the cost token. If the token is a native token, this field is not required, e.g. `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`.
47 | `cost.standard` *Optional*:: Standard of the cost token, e.g. `ERC-20`.
48 |
49 |
50 | ===== Example
51 |
52 | [,json]
53 | ----
54 | {
55 | "action": "list",
56 | "address": "0x86935F11C86623deC8a25696E1C19a8659CbF95d",
57 | "cost": {
58 | "address": "0x385Eeac5cB85A38A9a07A70c73e0a3271CfB54A7",
59 | "decimals": 18,
60 | "name": "Aavegotchi GHST Token (PoS)",
61 | "standard": "ERC-20",
62 | "symbol": "GHST",
63 | "value": "100000000000000000"
64 | },
65 | "id": "13587",
66 | "name": "Aavegotchi",
67 | "standard": "ERC-721",
68 | "symbol": "GOTCHI",
69 | "uri": "https://app.aavegotchi.com/metadata/aavegotchis/13587"
70 | }
71 | ----
72 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Collectible/Trade/Sell.adoc:
--------------------------------------------------------------------------------
1 | ==== Sell
2 |
3 | `Sell` indicates the action of selling token(s).
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Sell {
10 | action: string;
11 | address?: string;
12 | id?: string;
13 | name?: string;
14 | standard?: string;
15 | symbol?: string;
16 | value: string;
17 | uri?: string;
18 | parsed_image_url?: string;
19 | cost: {
20 | name?: string;
21 | symbol?: string;
22 | decimals?: number;
23 | value: string;
24 | address?: string;
25 | standard?: string;
26 | };
27 | }
28 | ----
29 |
30 | ===== Fields
31 |
32 | `action` *Required*:: Action of selling collectible token, e.g. `sell`.
33 | `address` *Optional*:: Address of the sold collectible token, e.g. `0x306b1ea3ecdf94aB739F1910bbda052Ed4A9f949`.
34 | `id` *Optional*:: ID of the sold collectible token, e.g. `159`.
35 | `name` *Optional*:: Name of the sold collectible token, e.g. `Beanz`.
36 | `standard` *Optional*:: Standard of the sold collectible token, e.g. `ERC-721`.
37 | `symbol` *Optional*:: Symbol of the sold collectible token, e.g. `BEANZ`.
38 | `value` *Required*:: Amount of the sold collectible token, e.g. `1`.
39 | `uri` *Optional*:: URI of the sold collectible token, e.g. `ipfs://QmdYeDpkVZedk1mkGodjNmF35UNxwafhFLVvsHrWgJoz6A/beanz_metadata/159`.
40 | `parsed_image_url` *Optional*:: Parsed image URL of the sold collectible token, e.g. `https://ipfs.io/ipfs/QmdYeDpkVZedk1mkGodjNmF35UNxwafhFLVvsHrWgJoz6A/beanz_metadata/159`.
41 | `cost` *Required*:: Cost of the sold collectible token. Should include the following fields.
42 | `cost.name` *Optional*:: Name of the cost token, e.g. `Wrapped Ether`.
43 | `cost.symbol` *Optional*:: Symbol of the cost token, e.g. `WETH`.
44 | `cost.decimals` *Optional*:: Decimal places of the cost token, e.g. `18`.
45 | `cost.value` *Required*:: Amount of the cost token, e.g. `10500000000000000`.
46 | `cost.address` *Optional*:: Address of the cost token. If the token is a native token, this field is not required, e.g. `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`.
47 | `cost.standard` *Optional*:: Standard of the cost token, e.g. `ERC-20`.
48 |
49 | ===== Example
50 |
51 | [,json]
52 | ----
53 | {
54 | "action": "sell",
55 | "address": "0x306b1ea3ecdf94aB739F1910bbda052Ed4A9f949",
56 | "id": "159",
57 | "value": "1",
58 | "name": "Beanz",
59 | "symbol": "BEANZ",
60 | "uri": "ipfs://QmdYeDpkVZedk1mkGodjNmF35UNxwafhFLVvsHrWgJoz6A/beanz_metadata/159",
61 | "standard": "ERC-721",
62 | "cost": {
63 | "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
64 | "value": "10500000000000000",
65 | "name": "Wrapped Ether",
66 | "symbol": "WETH",
67 | "decimals": 18,
68 | "standard": "ERC-20"
69 | }
70 | }
71 | ----
72 |
--------------------------------------------------------------------------------
/versions/v1.0.0/Social/Reward/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Reward
2 |
3 | `Reward` indicates the action of rewarding a post or profile.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Reward {
10 | handle?: string
11 | body?: string
12 | title?: string
13 | summary?: string
14 | media?: {
15 | address: string
16 | mime_type: string
17 | }[]
18 | tags?: string[]
19 | author_url?: string
20 | profile_id?: string
21 | publication_id?: string
22 | content_uri?: string
23 | timestamp?: number
24 | reward: {
25 | address?: string
26 | id?: number
27 | value: number
28 | name?: string
29 | symbol?: string
30 | uri?: string
31 | decimals?: number
32 | standard?: string
33 | }
34 | }
35 | ----
36 |
37 | ===== Fields
38 |
39 | `handle` *Optional*:: Handle/username of the user who is posting, e.g. `chorsee`.
40 | `body` *Optional*:: Main content of the post.
41 | `title` *Optional*:: Title of the post, e.g. `Crying with Tama`.
42 | `summary` *Optional*:: Summary of the post, e.g. `The Resonance of the Concert to End Violence Against Women by Chorsee.`.
43 | `media` *Optional*:: Array of media objects that are attached to the post.
44 | `media.address` *Required*:: URL/address of the media object.
45 | `media.mime_type` *Required*:: Mime type of the media object.
46 | `tags` *Optional*:: Array of tags that the post belongs to.
47 | `author_url` *Optional*:: URL of the author.
48 | `profile_id` *Optional*:: Profile ID of the author.
49 | `publication_id` *Optional*:: Publication ID of the post.
50 | `content_uri` *Optional*:: Content URI of the post.
51 | `timestamp` *Optional*:: Timestamp of the post.
52 | `reward` *Required*:: Reward for specific post. Should include the following fields.
53 | `reward.address` *Optional*:: Address of the reward token, If the token is a native token, this field is not required, e.g. `0xc2132D05D31c914a87C6611C10748AEb04B58e8F`.
54 | `reward.id` *Optional*:: ID of the reward token.
55 | `reward.value` *Required*:: Amount of the reward, e.g. `690000`.
56 | `reward.name` *Optional*:: Name of the reward token, e.g. `(PoS) Tether USD`.
57 | `reward.symbol` *Optional*:: Symbol of the reward token, e.g. `USDT`.
58 | `reward.uri` *Optional*:: URI of the reward token.
59 | `reward.decimals` *Optional*:: Decimals of the reward token, e.g. `6`.
60 | `reward.standard` *Optional*:: Standard of the reward token, e.g. `ERC-20`.
61 |
62 | ===== Example
63 |
64 | [,json]
65 | ----
66 | {
67 | "reward": {
68 | "address": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
69 | "value": "690000",
70 | "name": "(PoS) Tether USD",
71 | "symbol": "USDT",
72 | "decimals": 6,
73 | "standard": "ERC-20"
74 | },
75 | "target": {
76 | "handle": "chorsee",
77 | "title": "Crying with Tama",
78 | "summary": "The Resonance of the Concert to End Violence Against Women by Chorsee."
79 | }
80 | }
81 | ----
--------------------------------------------------------------------------------
/versions/v1.0.0/Social/Share/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Share
2 |
3 | `Share` indicates the action of sharing an existing post or comment.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Share {
10 | handle?: string
11 | body?: string
12 | title?: string
13 | summary?: string
14 | media?: {
15 | address: string
16 | mime_type: string
17 | }[]
18 | tags?: string[]
19 | author_url?: string
20 | profile_id?: string
21 | publication_id?: string
22 | content_uri?: string
23 | timestamp?: number
24 | target: {
25 | handle?: string
26 | body?: string
27 | title?: string
28 | summary?: string
29 | media?: {
30 | address: string
31 | mime_type: string
32 | }[]
33 | tags?: string[]
34 | author_url?: string
35 | profile_id?: string
36 | publication_id?: string
37 | content_uri?: string
38 | }
39 | }
40 | ----
41 |
42 | ===== Fields
43 |
44 | `handle` *Optional*:: Handle/username of the user who is sharing, e.g. `rabby1.lens`.
45 | `body` *Optional*:: Main content of the post.
46 | `title` *Optional*:: Title of the post.
47 | `summary` *Optional*:: Summary of the post.
48 | `media` *Optional*:: Array of media objects that are attached to the post.
49 | `media.address` *Required*:: URL/address of the media object.
50 | `media.mime_type` *Required*:: Mime type of the media object.
51 | `tags` *Optional*:: Array of tags that the post belongs to.
52 | `author_url` *Optional*:: URL of the author.
53 | `profile_id` *Optional*:: Profile ID of the author, e.g. `0x02caf8`.
54 | `publication_id` *Optional*:: Publication ID of the post, e.g. `0x33`.
55 | `content_uri` *Optional*:: Content URI of the post.
56 | `timestamp` *Optional*:: Timestamp of the post, e.g. `1712478136`.
57 | `target` *Required*:: Post or comment being shared.
58 | `target.handle` *Optional*:: Handle/username of the user who created the original post or comment, e.g. `kayakiko.lens`.
59 | `target.body` *Optional*:: Main content of the original post or comment, e.g. `Asami did a great walkthrough earlier on how to use @lens/orb and @lens/bloomerstv✨\nWith a small detour by showing how the @lens/galverse MamaAI works too.\n\nIf you are new here, have a look!`.
60 | `target.title` *Optional*:: Title of the original post or comment.
61 | `target.summary` *Optional*:: Summary of the original post or comment.
62 | `target.media` *Optional*:: Array of media objects that are attached to the original post or comment.
63 | `target.media.address` *Required*:: URL/address of the media object.
64 | `target.media.mime_type` *Required*:: Mime type of the media object.
65 | `target.tags` *Optional*:: Array of tags that the original post or comment belongs to.
66 | `target.author_url` *Optional*:: URL of the author of the original post or comment.
67 | `target.profile_id` *Optional*:: Profile ID of the author of the original post or comment, e.g. `0x01c74b`.
68 | `target.publication_id` *Optional*:: Publication ID of the original post or comment, e.g. `0xe5`.
69 | `target.content_uri` *Optional*:: Content URI of the original post or comment, e.g. `ar://zKfqATzRdazjjYNP-SqDiIvCMxRe_gswJoLYZS5yYv8`.
70 |
71 | ===== Example
72 |
73 | [,json]
74 | ----
75 | {
76 | "handle": "sujiyan.lens",
77 | "profile_id": "0x2e62",
78 | "publication_id": "0x27",
79 | "timestamp": 1683197102,
80 | "target": {
81 | "handle": "lindao.lens",
82 | "body": "@sujiyan.lens 🇯🇵",
83 | "media": [
84 | {
85 | "address": "ipfs://QmPs5HNkak9CmXguyaYUiH4ypRgzaKQAxkVXnhq8UjaJ3r",
86 | "mime_type": "image/jpeg"
87 | }
88 | ],
89 | "profile_id": "0x01a8ae",
90 | "publication_id": "0x14",
91 | "content_uri": "https://arweave.net/8QcdcOITWAOiel6ZBE7MzlztD0gmrssLfspKCiWpXfY"
92 | }
93 | }
94 | ----
--------------------------------------------------------------------------------
/versions/v1.0.0/Social/Comment/main.adoc:
--------------------------------------------------------------------------------
1 | ==== Comment
2 |
3 | `Comment` indicates the action of commenting on an existing post.
4 |
5 | ===== Interface
6 |
7 | [,typescript]
8 | ----
9 | interface Comment {
10 | handle?: string
11 | body?: string
12 | title?: string
13 | summary?: string
14 | media?: {
15 | address: string
16 | mime_type: string
17 | }[]
18 | tags?: string[]
19 | author_url?: string
20 | profile_id?: string
21 | publication_id?: string
22 | content_uri?: string
23 | timestamp?: number
24 | target: {
25 | handle?: string
26 | body?: string
27 | title?: string
28 | summary?: string
29 | media?: {
30 | address: string
31 | mime_type: string
32 | }[]
33 | tags?: string[]
34 | author_url?: string
35 | profile_id?: string
36 | publication_id?: string
37 | content_uri?: string
38 | }
39 | }
40 | ----
41 |
42 | ===== Fields
43 |
44 | `handle` *Optional*:: Handle/username of the user who is commenting, e.g. `looktanl.lens`.
45 | `body` *Required*:: Main content of the comment, e.g. `Cool.🌸`.
46 | `title` *Optional*:: Title of the comment.
47 | `summary` *Optional*:: Summary of the comment.
48 | `media` *Optional*:: Array of media objects that are attached to the comment.
49 | `media.address` *Required*:: URL/address of the media object.
50 | `media.mime_type` *Required*:: Mime type of the media object.
51 | `tags` *Optional*:: Array of tags that the comment belongs to.
52 | `author_url` *Optional*:: URL of the commentor.
53 | `profile_id` *Optional*:: Profile ID of the commentor, e.g. `0x01ed62`.
54 | `publication_id` *Optional*:: Publication ID of the comment, e.g. `0x1d`.
55 | `content_uri` *Optional*:: Content URI of the comment, e.g. `ar://TN8jBlQja25mMgyZIDGoiMAjctKUneUyLyKdY9ZdCnE`.
56 | `timestamp` *Optional*:: Timestamp of the comment, e.g. `1712293392`.
57 | `target` *Required*:: Post or comment being commented.
58 | `target.handle` *Optional*:: Handle/username of the user who created the original post or comment, e.g. `yoginth.lens`.
59 | `target.body` *Required*:: Main content of the original post or comment, e.g. `Just dropped a song about @lens/hey, mind's blown 🤯 Made with AI.`.
60 | `target.title` *Optional*:: Title of the original post or comment.
61 | `target.summary` *Optional*:: Summary of the original post or comment.
62 | `target.media` *Optional*:: Array of media objects that are attached to the original post or comment.
63 | `target.media.address` *Required*:: URL/address of the media object.
64 | `target.media.mime_type` *Required*:: Mime type of the media object.
65 | `target.tags` *Optional*:: Array of tags that the original post or comment belongs to.
66 | `target.author_url` *Optional*:: URL of the author of the original post or comment.
67 | `target.profile_id` *Optional*:: Profile ID of the author of the original post or comment, e.g. `0x0d`.
68 | `target.publication_id` *Optional*:: Publication ID of the original post or comment, e.g. `0x0472`.
69 | `target.content_uri` *Optional*:: Content URI of the original post or comment, e.g. `ar://z_o6aXzWKxxlQkXuEfZuRl0EolTIEDYaFzibwYRLhqs`.
70 |
71 | ===== Example
72 |
73 | [,json]
74 | ----
75 | {
76 | "handle": "romain_millon.lens",
77 | "body": "You are not far, soon ahead...",
78 | "profile_id": "0x01ce63",
79 | "publication_id": "0x73",
80 | "content_uri": "ar://snYKMd1W5Hzp6Q4qkC-InfSzEVWZDx39M_7MuY4Rld4",
81 | "timestamp": 1699341732,
82 | "target": {
83 | "handle": "jessyjeanne.lens",
84 | "body": "Jessy is a queen.you want it or not. 👸🏻🍟🙊 \n\nI feel Fakemous being in the top 3 key with highest price value after @lens/stani \n\nIt gives me Britney b*tch vibes 😍😂🍟",
85 | "media": [
86 | {
87 | "address": "ipfs://QmT5tE8WeLYgjCkxJwJHAdw9HtkiAGWRuUKEGKkQwtLkat",
88 | "mime_type": "image/jpeg"
89 | }
90 | ],
91 | "profile_id": "0x73b1",
92 | "publication_id": "0x3d81",
93 | "content_uri": "ar://ggN86IfdpZL15nln0Zk3kLWVVt3lnxZOL2REaRhD9Qs"
94 | }
95 | }
96 | ----
--------------------------------------------------------------------------------
/versions/v1.0.0/create_folders.py:
--------------------------------------------------------------------------------
1 | # Use this script to create the folder structure based on tag, type, and action.
2 | # Credit to ChatGPT.
3 |
4 | import os
5 |
6 | # Add new tag, type and action here
7 | folder_structure = {
8 | "Collectible": {
9 | "Approval": ["Approve", "Revoke"],
10 | "Burn": [],
11 | "Mint": [],
12 | "Trade": ["Buy", "Sell"],
13 | "Transfer": [],
14 | },
15 | "Exchange": {
16 | "Swap": [],
17 | "Liquidity": ["Add", "Remove", "Collect"],
18 | "Staking": ["Stake", "Unstake", "Claim"],
19 | },
20 | "Metaverse": {
21 | "Burn": [],
22 | "Mint": [],
23 | "Trade": ["Buy", "Sell", "List"],
24 | "Transfer": [],
25 | },
26 | "RSS": {"Feed": []},
27 | "Social": {
28 | "Comment": [],
29 | "Mint": [],
30 | "Post": [],
31 | "Profile": ["Create", "Update"],
32 | "Revise": [],
33 | "Reward": [],
34 | "Share": [],
35 | "Delete": [],
36 | "Proxy": ["Appoint", "Remove"],
37 | },
38 | "Transaction": {
39 | "Approval": ["Approve", "Revoke"],
40 | "Bridge": ["Withdraw", "Deposit"],
41 | "Burn": [],
42 | "Mint": [],
43 | "Transfer": [],
44 | },
45 | }
46 |
47 |
48 | # Adjust the function to work with the new structure
49 | def create_folder_structure_with_action(folder_structure):
50 | for tag, types in folder_structure.items():
51 | tag_folder = tag
52 | os.makedirs(tag_folder, exist_ok=True)
53 |
54 | tag_main_adoc = os.path.join(tag_folder, "main.adoc")
55 | if not os.path.exists(tag_main_adoc):
56 | with open(tag_main_adoc, "w") as file:
57 | file.write(f"=== {tag}\n")
58 |
59 | for type, actions in types.items():
60 | type_folder = os.path.join(tag_folder, type)
61 | os.makedirs(type_folder, exist_ok=True)
62 |
63 | type_main_adoc = os.path.join(type_folder, "main.adoc")
64 | if not os.path.exists(type_main_adoc):
65 | with open(type_main_adoc, "w") as type_file:
66 | type_file.write(f"==== {type}\n")
67 |
68 | # Existing actions check
69 | existing_actions = set()
70 | if os.path.exists(type_main_adoc):
71 | with open(type_main_adoc, "r") as type_file:
72 | for line in type_file:
73 | if line.strip().startswith("include::") and ".adoc[]" in line:
74 | existing_action = line.split("::")[1].split(".")[0]
75 | existing_actions.add(existing_action)
76 |
77 | for action in actions:
78 | action_file_path = os.path.join(type_folder, f"{action}.adoc")
79 | if not os.path.exists(action_file_path):
80 | with open(action_file_path, "w") as action_file:
81 | action_file.write(f"===== {action}\n")
82 |
83 | # Append new action to type's main.adoc if not already present
84 | if action not in existing_actions:
85 | with open(type_main_adoc, "a") as type_file:
86 | type_file.write(f"include::{action}.adoc[]\n")
87 |
88 |
89 | def create_global_main_adoc(folder_structure, main_adoc_path="main.adoc"):
90 | existing_tags = set()
91 |
92 | # Check if main.adoc already exists and read its content
93 | if os.path.exists(main_adoc_path):
94 | with open(main_adoc_path, "r") as main_file:
95 | for line in main_file:
96 | if line.startswith("include::") and "/main.adoc[]" in line:
97 | existing_tag = line.split("/")[0].split("::")[1]
98 | existing_tags.add(existing_tag)
99 |
100 | # Write the new include statements to main.adoc
101 | with open(main_adoc_path, "a") as main_file:
102 | for tag in folder_structure.keys():
103 | if tag not in existing_tags:
104 | main_file.write(f"include::{tag}/main.adoc[]\n")
105 |
106 |
107 | # Function to create folder structure
108 | create_folder_structure_with_action(folder_structure)
109 |
110 | # Create the global main.adoc
111 | create_global_main_adoc(folder_structure)
112 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Creative Commons Legal Code
2 |
3 | CC0 1.0 Universal
4 |
5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12 | HEREUNDER.
13 |
14 | Statement of Purpose
15 |
16 | The laws of most jurisdictions throughout the world automatically confer
17 | exclusive Copyright and Related Rights (defined below) upon the creator
18 | and subsequent owner(s) (each and all, an "owner") of an original work of
19 | authorship and/or a database (each, a "Work").
20 |
21 | Certain owners wish to permanently relinquish those rights to a Work for
22 | the purpose of contributing to a commons of creative, cultural and
23 | scientific works ("Commons") that the public can reliably and without fear
24 | of later claims of infringement build upon, modify, incorporate in other
25 | works, reuse and redistribute as freely as possible in any form whatsoever
26 | and for any purposes, including without limitation commercial purposes.
27 | These owners may contribute to the Commons to promote the ideal of a free
28 | culture and the further production of creative, cultural and scientific
29 | works, or to gain reputation or greater distribution for their Work in
30 | part through the use and efforts of others.
31 |
32 | For these and/or other purposes and motivations, and without any
33 | expectation of additional consideration or compensation, the person
34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35 | is an owner of Copyright and Related Rights in the Work, voluntarily
36 | elects to apply CC0 to the Work and publicly distribute the Work under its
37 | terms, with knowledge of his or her Copyright and Related Rights in the
38 | Work and the meaning and intended legal effect of CC0 on those rights.
39 |
40 | 1. Copyright and Related Rights. A Work made available under CC0 may be
41 | protected by copyright and related or neighboring rights ("Copyright and
42 | Related Rights"). Copyright and Related Rights include, but are not
43 | limited to, the following:
44 |
45 | i. the right to reproduce, adapt, distribute, perform, display,
46 | communicate, and translate a Work;
47 | ii. moral rights retained by the original author(s) and/or performer(s);
48 | iii. publicity and privacy rights pertaining to a person's image or
49 | likeness depicted in a Work;
50 | iv. rights protecting against unfair competition in regards to a Work,
51 | subject to the limitations in paragraph 4(a), below;
52 | v. rights protecting the extraction, dissemination, use and reuse of data
53 | in a Work;
54 | vi. database rights (such as those arising under Directive 96/9/EC of the
55 | European Parliament and of the Council of 11 March 1996 on the legal
56 | protection of databases, and under any national implementation
57 | thereof, including any amended or successor version of such
58 | directive); and
59 | vii. other similar, equivalent or corresponding rights throughout the
60 | world based on applicable law or treaty, and any national
61 | implementations thereof.
62 |
63 | 2. Waiver. To the greatest extent permitted by, but not in contravention
64 | of, applicable law, Affirmer hereby overtly, fully, permanently,
65 | irrevocably and unconditionally waives, abandons, and surrenders all of
66 | Affirmer's Copyright and Related Rights and associated claims and causes
67 | of action, whether now known or unknown (including existing as well as
68 | future claims and causes of action), in the Work (i) in all territories
69 | worldwide, (ii) for the maximum duration provided by applicable law or
70 | treaty (including future time extensions), (iii) in any current or future
71 | medium and for any number of copies, and (iv) for any purpose whatsoever,
72 | including without limitation commercial, advertising or promotional
73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74 | member of the public at large and to the detriment of Affirmer's heirs and
75 | successors, fully intending that such Waiver shall not be subject to
76 | revocation, rescission, cancellation, termination, or any other legal or
77 | equitable action to disrupt the quiet enjoyment of the Work by the public
78 | as contemplated by Affirmer's express Statement of Purpose.
79 |
80 | 3. Public License Fallback. Should any part of the Waiver for any reason
81 | be judged legally invalid or ineffective under applicable law, then the
82 | Waiver shall be preserved to the maximum extent permitted taking into
83 | account Affirmer's express Statement of Purpose. In addition, to the
84 | extent the Waiver is so judged Affirmer hereby grants to each affected
85 | person a royalty-free, non transferable, non sublicensable, non exclusive,
86 | irrevocable and unconditional license to exercise Affirmer's Copyright and
87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the
88 | maximum duration provided by applicable law or treaty (including future
89 | time extensions), (iii) in any current or future medium and for any number
90 | of copies, and (iv) for any purpose whatsoever, including without
91 | limitation commercial, advertising or promotional purposes (the
92 | "License"). The License shall be deemed effective as of the date CC0 was
93 | applied by Affirmer to the Work. Should any part of the License for any
94 | reason be judged legally invalid or ineffective under applicable law, such
95 | partial invalidity or ineffectiveness shall not invalidate the remainder
96 | of the License, and in such case Affirmer hereby affirms that he or she
97 | will not (i) exercise any of his or her remaining Copyright and Related
98 | Rights in the Work or (ii) assert any associated claims and causes of
99 | action with respect to the Work, in either case contrary to Affirmer's
100 | express Statement of Purpose.
101 |
102 | 4. Limitations and Disclaimers.
103 |
104 | a. No trademark or patent rights held by Affirmer are waived, abandoned,
105 | surrendered, licensed or otherwise affected by this document.
106 | b. Affirmer offers the Work as-is and makes no representations or
107 | warranties of any kind concerning the Work, express, implied,
108 | statutory or otherwise, including without limitation warranties of
109 | title, merchantability, fitness for a particular purpose, non
110 | infringement, or the absence of latent or other defects, accuracy, or
111 | the present or absence of errors, whether or not discoverable, all to
112 | the greatest extent permissible under applicable law.
113 | c. Affirmer disclaims responsibility for clearing rights of other persons
114 | that may apply to the Work or any use thereof, including without
115 | limitation any person's Copyright and Related Rights in the Work.
116 | Further, Affirmer disclaims responsibility for obtaining any necessary
117 | consents, permissions or other rights required for any use of the
118 | Work.
119 | d. Affirmer understands and acknowledges that Creative Commons is not a
120 | party to this document and has no duty or obligation with respect to
121 | this CC0 or use of the Work.
122 |
--------------------------------------------------------------------------------
/versions/v0.2.0.md:
--------------------------------------------------------------------------------
1 | # RSS3 v0.2.0
2 |
3 | **Latest editor's draft:**
4 |
5 | - [https://github.com/RSS3-Network/Protocol](https://github.com/RSS3-Network/Protocol)
6 |
7 | **Editors:**
8 |
9 | - DIYgod ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
10 | - Joshua ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
11 | - Atlas ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
12 |
13 | **Reviewers**
14 |
15 | - Zui ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
16 | - Usagi ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
17 |
18 | **Participate:**
19 |
20 | - [GitHub](https://github.com/RSS3-Network/Protocol)
21 |
22 | ## 1. Abstract
23 |
24 | Derived from the best out of RSS, RSS3 is an open protocol designed for content and social networks in the Web 3.0 era.
25 |
26 | This document describes the interfaces of RSS3 files.
27 |
28 | ## 2. Status of This Document
29 |
30 | The proposal is being incubated in the [RSS3 Network](https://github.com/RSS3-Network).
31 |
32 | [GitHub](https://github.com/RSS3-Network/Protocol) [issues](https://github.com/RSS3-Network/Protocol/issues) and [discussions](https://github.com/RSS3-Network/Protocol/discussions) are preferred for discussion of this specification.
33 |
34 | ## 3. Future Compatibility
35 |
36 | 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.
37 |
38 | ## 4. Concepts
39 |
40 | - Persona - a user, either as an individual or as a group
41 | - Item - An item published by a persona
42 | - Context - One type of interactive content for an item
43 | - Link - One type of relationship to other personas from current persona
44 | - Backlink - A link from other personas to current persona
45 |
46 | ## 5. Interfaces
47 |
48 | ### 5.1 Interfaces in TypeScript
49 |
50 | ```tsx
51 | type RSS3ID = string;
52 | type RSS3ItemID = string;
53 | type RSS3ItemsID = string;
54 | type RSS3ListID = string;
55 | type ThirdPartyAddress = string[];
56 |
57 | // Common attributes for each files
58 | interface RSS3Base {
59 | "@version": "rss3.io/version/v0.2.0"; // Proposal version for current file. It should be like `rss3.io/version/v1.0.0`
60 | id: RSS3ID | RSS3ItemsID | RSS3ListID; // Unique indicate for current file and public key for current persona
61 | date_created: string; // Specifies the created date in RFC 3339 format
62 | date_updated: string; // Specifies the updated date in RFC 3339 format
63 | }
64 |
65 | // Entrance, RSS3 file, indicating a persona
66 | interface RSS3 extends RSS3Base {
67 | id: RSS3ID;
68 | 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 fields starting with `@` characters and the `signature` field itself, for example {"@a": "1", c: "2", b: {d: "3"}} -> [["b", ["d", "3"]], ["c", "2"]] or `Hi, RSS3. I'm your agent ${agent_id}` if using agent signature; Useful for the object integration verification for both server side and persona side; If the server side is trusted, then this field is optional
69 | agent_id?: string; // A random ed25519 public key generated by the client
70 | agent_signature?: string; // A signature signed by `agent_id`'s private key, its content is the same as `signature`
71 |
72 | owers?: RSS3ID[]; // Additional owner of the file other than id
73 |
74 | profile?: {
75 | name?: string;
76 | avatar?: ThirdPartyAddress;
77 | bio?: string;
78 | tags?: string[];
79 | };
80 |
81 | items?: RSS3Item[]; // Items published by current persona
82 | items_next?: RSS3ItemsID; // Next page of items
83 |
84 | links?: {
85 | // Next page of `items`. See **RSS3Items** for more details
86 | type: string; // Link type, for example: follow superfollow
87 | tags?: string[];
88 | list?: RSS3ID[]; // Personas who belong to this link
89 | }[];
90 | "@backlinks"?: {
91 | // Backlinks for this persona, for example: follow type of backlink means followers.
92 | type: string; // The same as links.type
93 | list?: RSS3ListID; // File ID of backlink list that belong to this type. See **RSS3List** for more details
94 | }[];
95 |
96 | accounts?: {
97 | platform: string; // Platform name, for example: EVM+ or Twitter
98 | identity: string; // Platform identity, for example: 0x1234567890123456789012345678901234567890 or @username
99 | signature?: string; // Signature of [["address": id], ["identity": account.identity], ["platform", account.platform]], optional for no public-key cryptography platform
100 | tags?: string[];
101 | }[];
102 |
103 | "@assets"?: {
104 | platform: string; // Corresponding to accounts.platform
105 | identity: string; // Corresponding to accounts.identity
106 | id: string; // Unique asset ID
107 | type?: string; // Asset type, for example: Ethereum-NFT xDai-POAP
108 | }[];
109 | }
110 |
111 | // RSS3Items file, used for pagination of RSS3 files
112 | interface RSS3Items extends RSS3Base {
113 | id: RSS3ItemsID; // Unique indicate for current file. Its value should be `${RSS3ID}-items-${index}`
114 | signature?: string;
115 | agent_id?: string;
116 | agent_signature?: string;
117 |
118 | items: RSS3Item[]; // List of items
119 | items_next?: RSS3ItemsID; // Next page of items
120 | }
121 |
122 | // RSS3List file, used for pagination of links and contexts
123 | interface RSS3List extends RSS3Base {
124 | id: RSS3ListID; // Unique indicate for current file. Its value should be `${RSS3ID}-list-${field}-${type}`
125 |
126 | list?: RSS3ID[] | RSS3ItemID[];
127 | list_next?: RSS3ListID;
128 | }
129 |
130 | // Indicating a content posted by a persona or a context
131 | interface RSS3Item {
132 | id: RSS3ItemID; // Unique ID of current item. Its value should be `${RSS3ID}-item-${index}`
133 | authors?: RSS3ID[];
134 | title?: string;
135 | summary?: string;
136 | tags?: string[];
137 | date_published?: string; // Specifies the published date in RFC 3339 format
138 | date_modified?: string; // Specifies the modified date in RFC 3339 format
139 |
140 | type?: string; // Item type for the not original item, for example: comment like
141 | upstream?: RSS3ItemID; // Upstream of the not original item
142 |
143 | contents?: {
144 | // Contents of current item, possibly multiple different types of content
145 | address: ThirdPartyAddress; // Content address. It is one or multiple third party addresses that link to an identical file
146 | mime_type: string; // [MIME type](https://en.wikipedia.org/wiki/Media_type) of current content
147 | name?: string;
148 | tags?: string[];
149 | size_in_bytes?: string;
150 | duration_in_seconds?: string;
151 | }[];
152 |
153 | "@contexts"?: {
154 | // Interactive items from other personas.
155 | type?: string;
156 | list: RSS3ListID; // File ID of items list that belong to this context. See **RSS3List** for more details
157 | }[];
158 | }
159 | ```
160 |
161 | ### 5.2 Fields
162 |
163 | **Fields starting with `@` characters**
164 |
165 | - Entirely the responsibility of the hosting program
166 | - May be modified by the hosting program at any time
167 | - Not allowed to be modified by the persona
168 |
169 | **Extensions**
170 |
171 | Custom objects can be used in RSS3. Names must start with an `_` character followed by a letter. Custom objects can appear anywhere in RSS3.
172 |
173 | **Empty contents**
174 |
175 | It is strongly recommended to delete fields with empty contents, including empty strings, empty arrays, empty objects
176 |
177 | ### 5.3 Examples
178 |
179 | A persona `0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944` with a published item `Hello World` and a comment to it
180 |
181 | ```yaml
182 | {
183 | "@version": "rss3.io/version/v0.2.0",
184 |
185 | "id": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944",
186 | "date_created": "2009-05-01T00:00:00.000Z",
187 | "date_updated": "2021-05-08T16:56:35.529Z",
188 |
189 | "profile": {
190 | "name": "DIYgod",
191 | "avatar": ["dweb://diygod.jpg", "https://example.com/diygod.jpg"],
192 | "bio": "写代码是热爱,写到世界充满爱!",
193 | "tags": ["demo", "lovely", "technology"]
194 | },
195 |
196 | "items": [{
197 | "id": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-item-1",
198 | "authors": ["0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944"],
199 | "summary": "Yes!!",
200 | "date_published": "2021-05-09T16:56:35.529Z",
201 | "date_modified": "2021-05-09T16:56:35.529Z",
202 |
203 | "type": "comment",
204 | "upstream": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-item-0"
205 | }, {
206 | "id": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-item-0",
207 | "authors": ["0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944"],
208 | "title": "Hello World",
209 | "summary": "Hello, this is the first item of RSS3.",
210 | "date_published": "2021-05-08T16:56:35.529Z",
211 | "date_modified": "2021-05-08T16:56:35.529Z",
212 |
213 | "contents": [{
214 | "address": ["dweb://never.html", "https://example.com/never.html"],
215 | "mime_type": "text/html"
216 | }, {
217 | "address": ["dweb://never.jpg"],
218 | "mime_type": "image/jpeg"
219 | }],
220 |
221 | "@contexts": [{
222 | "type": "comment",
223 | "list": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-context@0@comment-0"
224 | }, {
225 | "type": "like",
226 | "list": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-context@0@like-0"
227 | }]
228 | }],
229 | "items_next": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-items-0",
230 |
231 | "links": [{
232 | "type": "follow",
233 | "list": ["0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]
234 | }, {
235 | "type": "superfollow",
236 | "list": ["0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]
237 | }],
238 | "@backlinks": [{
239 | "type": "follow",
240 | "list": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-backlink@follow-0"
241 | }],
242 |
243 | "accounts": [{
244 | "platform": "EVM+",
245 | "identity": "0x1234567890123456789012345678901234567890",
246 | "signature": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
247 | }];
248 |
249 | "@assets": [{
250 | "platform": "EVM+",
251 | "identity": "0x1234567890123456789012345678901234567890",
252 | "id": "0xacbe98efe2d4d103e221e04c76d7c55db15c8e89-5",
253 | "type": "Ethereum-NFT"
254 | }]
255 | }
256 | ```
257 |
--------------------------------------------------------------------------------
/versions/v0.1.0-alpha.0.md:
--------------------------------------------------------------------------------
1 | # RSS3 v0.1.0-alpha.0
2 |
3 | **Latest editor's draft:**
4 |
5 | - [https://github.com/RSS3-Network/Protocol](https://github.com/RSS3-Network/Protocol)
6 |
7 | **Editors:**
8 |
9 | - DIYgod ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
10 | - Joshua ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
11 |
12 | **Reviewers**
13 |
14 | No one because this is the first version
15 |
16 | **Participate:**
17 |
18 | - [GitHub](https://github.com/RSS3-Network/Protocol)
19 | - [Telegram](https://link.rss3.io/telegram)
20 | - [Discord](https://link.rss3.io/discord)
21 |
22 | ## Abstract
23 |
24 | Derived from the best out of RSS, RSS3 is an open protocol designed for content and social networks in the Web 3.0 era.
25 |
26 | This document describes the interfaces of RSS3 files.
27 |
28 | ## Status of This Document
29 |
30 | This is still a work in progress. The proposal is being incubated in the [RSS3 Network](https://github.com/RSS3-Network).
31 |
32 | [GitHub Discussions](https://github.com/RSS3-Network/Protocol/discussions) is preferred for discussion of this specification.
33 |
34 | ## Future Compatibility
35 |
36 | This version is an alpha version, so it is not guaranteed to be compatible with subsequent versions.
37 |
38 | ## Concepts
39 |
40 | - Persona - a user, either as an individual or as a group
41 | - Editors - Persona who have permission to modify this file
42 | - Context - One type of interactive content for one RSS3Item
43 | - RSS3Item - An original item published by the current persona (root item) or an interactive item from other personas (context item)
44 | - RSS3Link - One type of relationship for one persona
45 |
46 | ## Interfaces
47 |
48 | ### Interfaces in TypeScript
49 |
50 | ```tsx
51 | type Address = string;
52 |
53 | // Common attributes for each file
54 | interface RSS3Base {
55 | id: Address;
56 | version: string;
57 | type: string;
58 | date_created: string;
59 | date_updated: string;
60 | editors?: {
61 | blocklist?: Address[]; // Link to RSS3Link files
62 | allowlist?: Address[]; // Link to RSS3Link files
63 | };
64 | items: any[];
65 | items_next?: Address; // T
66 | }
67 |
68 | // Entrance, RSS3Persona file
69 | interface RSS3Persona extends RSS3Base {
70 | type: "persona";
71 | editors: never;
72 |
73 | profile: {
74 | name?: string;
75 | avatar?: Address; // Link to a third party file
76 | bio?: string;
77 | tags?: string[];
78 | };
79 |
80 | links?: {
81 | id: Address; // Link to a RSS3Link file
82 | name: string;
83 | tags?: string[];
84 | }[];
85 |
86 | items: RSS3Item[];
87 | assets: {};
88 | }
89 |
90 | // RSS3Items file
91 | interface RSS3Items extends RSS3Base {
92 | type: "items";
93 | items: RSS3Item[];
94 | }
95 |
96 | // RSS3Link file
97 | interface RSS3Link extends RSS3Base {
98 | type: "relationship";
99 | items: RSS3OtherPersona[];
100 | }
101 |
102 | interface RSS3OtherPersona {
103 | id: Address; // Link to a RSS3Persona file
104 | verification?: string;
105 | name: string;
106 | avatar?: Address; // Link to a third party file
107 | bio?: string;
108 | }
109 |
110 | interface RSS3Item {
111 | id: string;
112 | authors?: RSS3OtherPersona[];
113 | title?: string;
114 | summary?: string;
115 | tags?: string[];
116 | date_published?: string;
117 | date_modified?: string;
118 |
119 | contents?: {
120 | id: Address; // Link to a third party file
121 | mime_type: string;
122 | name?: string;
123 | tags?: string[];
124 | size_in_bytes?: string;
125 | duration_in_seconds?: string;
126 | }[];
127 |
128 | contexts?: {
129 | id: Address; // Link to a RSS3Items file
130 | name?: string;
131 | tags?: string[];
132 | }[];
133 | }
134 | ```
135 |
136 | ### Examples
137 |
138 | RSS3Persona file: `persona:diygod` - `interface RSS3Persona`
139 |
140 | A persona `DIYgod` with a published item `Never`
141 |
142 | ```json
143 | {
144 | "id": "persona:diygod",
145 | "version": "rss3.io/version/v0.1.0-alpha.0",
146 | "type": "persona",
147 | "date_created": "2009-05-01T00:00:00.000Z",
148 | "date_updated": "2021-05-08T16:56:35.529Z",
149 |
150 | "profile": {
151 | "name": "DIYgod",
152 | "avatar": "dweb://diygod.jpg",
153 | "bio": "写代码是热爱,写到世界充满爱!",
154 | "tags": ["demo", "lovely", "technology"]
155 | },
156 |
157 | "links": [
158 | {
159 | "id": "link:diygod:followings",
160 | "name": "Followings"
161 | },
162 | {
163 | "id": "link:diygod:followers",
164 | "name": "Followers"
165 | },
166 | {
167 | "id": "link:diygod:blocklist",
168 | "name": "Blocklist"
169 | }
170 | ],
171 |
172 | "items": [
173 | {
174 | "id": "item:diygod:never",
175 | "authors": ["persona:diygod"],
176 | "title": "Never",
177 | "summary": "Never stop dreaming.",
178 | "date_published": "2021-05-08T16:56:35.529Z",
179 | "date_modified": "2021-05-08T16:56:35.529Z",
180 |
181 | "contents": [
182 | {
183 | "id": "dweb://never.html",
184 | "mime_type": "text/html"
185 | },
186 | {
187 | "id": "dweb://never.jpg",
188 | "mime_type": "image/jpeg"
189 | }
190 | ],
191 |
192 | "contexts": [
193 | {
194 | "id": "items:diygod:never:comments",
195 | "name": "Comments"
196 | },
197 | {
198 | "id": "items:diygod:never:likes",
199 | "name": "Likes"
200 | }
201 | ]
202 | }
203 | ],
204 | "items_next": "items:diygod:index2"
205 | }
206 | ```
207 |
208 | RSS3Link file: `link:diygod:followers` - `interface RSS3Link`
209 |
210 | ```json
211 | {
212 | "id": "link:diygod:followers",
213 | "version": "rss3.io/version/v0.1.0-alpha.0",
214 | "type": "link",
215 | "date_created": "2009-05-01T00:00:00.000Z",
216 | "date_updated": "2021-05-08T16:56:35.529Z",
217 | "editors": {
218 | "blocklist": "link:diygod:blocklist"
219 | },
220 |
221 | "items": ["persona:joshua", "persona:atlas", "persona:tuzi", "persona:zuia"]
222 | }
223 | ```
224 |
225 | RSS3Items file: `items:diygod:never:comments` - `interface RSS3Items`
226 |
227 | ```json
228 | {
229 | "id": "items:diygod:never:comments",
230 | "version": "rss3.io/version/v0.1.0-alpha.0",
231 | "type": "items",
232 | "date_created": "2009-05-01T00:00:00.000Z",
233 | "date_updated": "2021-05-08T16:56:35.529Z",
234 | "editors": {
235 | "allowlist": "link:diygod:followings"
236 | },
237 |
238 | "items": [
239 | {
240 | "id": "items:diygod:never:comments:0",
241 | "authors": [
242 | {
243 | "id": "persona:joshua",
244 | "verification": "xxxxx",
245 | "name": "Joshua",
246 | "avatar": "dweb://joshua.jpg"
247 | }
248 | ],
249 | "title": "DIYgod is the best!",
250 | "date_published": "2021-05-08T16:56:35.529Z",
251 | "date_modified": "2021-05-08T16:56:35.529Z",
252 |
253 | "contents": [
254 | {
255 | "id": "dweb://best.jpg",
256 | "mime_type": "image/jpeg"
257 | }
258 | ],
259 |
260 | "contexts": [
261 | {
262 | "id": "items:diygod:never:comments:0:sub-comments",
263 | "name": "Sub-Comments"
264 | }
265 | ]
266 | }
267 | ]
268 | }
269 | ```
270 |
271 | ### Fields
272 |
273 | **RSS3Base:** Common attributes for each file
274 |
275 | - `id`: Unique indicate for current file. It is also used to verify permissions. Its format requires further discussion
276 | - `version`: Proposal version for current file. It should be like `rss3.io/version/v1.0.0`
277 | - `type`: File type. The values `persona` `link` `items` are currently available
278 | - `date_created`: Specifies the created date in RFC 3339 format
279 | - `date_updated`: Specifies the updated date in RFC 3339 format
280 | - `editors`: Persona who have permission to modify this file other than root persona. Default to `{ allowlist: [] }`. This field can only be changed by root persona
281 | - `blocklist`: Persona here are not allowed to modify
282 | - `allowlist`: Persona here are allowed to modify. If its value is set, the `blocklist` is invalid
283 | - `items`: A list. Its type and meaning depend on the type of current file. It is explained separately below.
284 | - `items_next`: Next page of `items`
285 |
286 | **RSS3Persona:** RSS3Persona file, indicating a persona
287 |
288 | - `type`: Must be `persona`
289 | - `editors`: This field is not available for this type of file. This file can only be changed by root persona
290 | - `profile`: Profile of current persona
291 | - `name`: Name of current persona
292 | - `avatar`: Avatar of current persona. It is an address that links to a third party file
293 | - `bio`: Bio of current persona
294 | - `tags`: Tags of current persona
295 | - `links`: Relationships for this persona, for example, followings followers blocklist
296 | - `id`: It is an ID that links to an RSS3Link file
297 | - `name`: Relationship name
298 | - `tags`: The meaning is clear
299 | - `items`: Partial RSS3Items published by current persona. Its quantitative cap requires further discussion
300 | - `assets`: Assets for current persona. Its interface requires further discussion
301 |
302 | **RSS3Items:** RSS3Items file, indicating a bunch of RSS3Item. They can be root items or context items
303 |
304 | - `type`: Must be `items`
305 | - `items`: List of root item or context item
306 |
307 | **RSS3Link:** RSS3Link file, indicating one type of relationship for one persona
308 |
309 | - `type`: Must be `link`
310 | - `items`: List of `RSS3OtherPersona`
311 |
312 | **RSS3OtherPersona:** indicating other personas, used in RSS3Link and RSS3Item
313 |
314 | - `id`: It is an ID that links to an RSS3Persona file
315 | - `verification`: It is a key signed by this persona. It is used to indicate that the operation is approved by this persona, similar to GPG for git. Its implementation requires further discussion
316 | - `name`: Name of this persona
317 | - `avatar`: Avatar of this persona. It is an address that links to a third party file
318 | - `bio`: Bio of this persona
319 |
320 | **RSS3Item:** indicating content posted by a persona or a context
321 |
322 | - `id`: Unique ID of the current item
323 | - `authors`: Authors of the current item. It is a list of `RSSOtherPersona`
324 | - `title`: Title of the current item
325 | - `summary`: Content summary of the current item
326 | - `tags`: Tags of the current item
327 | - `date_published`: Specifies the published date in RFC 3339 format
328 | - `date_modified`: Specifies the modified date in RFC 3339 format
329 | - `contents`: Contents of the current item, possibly multiple different types of content
330 | - `id`: Actual content. It is an address that links to a third party file
331 | - `mime_type`: [MIME type](https://en.wikipedia.org/wiki/Media_type) of the current content
332 | - `name`: Name of the current content
333 | - `tags`: Tags of the current content
334 | - `size_in_bytes`: Size of the current content in bytes
335 | - `duration_in_seconds`: Duration of the current content in seconds. Mainly for audio and video use
336 | - `contexts`: Interactive items from other personas
337 | - `id`: It is an ID that links to an RSS3Items file
338 | - `name`: Name of the current context
339 | - `tags`: Tags of the current context
340 |
341 | **Extensions**
342 |
343 | Custom objects can be used in RSS3. Names must start with an \_ character followed by a letter. Custom objects can appear anywhere in a feed.
344 |
--------------------------------------------------------------------------------
/versions/v0.1.1.md:
--------------------------------------------------------------------------------
1 | # RSS3 v0.1.1
2 |
3 | **Latest editor's draft:**
4 |
5 | - [https://github.com/RSS3-Network/Protocol](https://github.com/RSS3-Network/Protocol)
6 |
7 | **Editors:**
8 |
9 | - DIYgod ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
10 | - Joshua ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
11 | - Atlas ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
12 |
13 | **Reviewers**
14 |
15 | - Zui ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
16 | - Usagi ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
17 |
18 | **Participate:**
19 |
20 | - [GitHub](https://github.com/RSS3-Network/Protocol)
21 | - [Telegram](https://link.rss3.io/telegram)
22 | - [Discord](https://link.rss3.io/discord)
23 | - [Twitter](https://twitter.com/rss3_)
24 |
25 | ## 1. Abstract
26 |
27 | Derived from the best out of RSS, RSS3 is an open protocol designed for content and social networks in the Web 3.0 era.
28 |
29 | This document describes the interfaces of RSS3 files.
30 |
31 | ## 2. Status of This Document
32 |
33 | The proposal is being incubated in the [RSS3 Network](https://github.com/RSS3-Network).
34 |
35 | [GitHub](https://github.com/RSS3-Network/Protocol) [issues](https://github.com/RSS3-Network/Protocol/issues) and [discussions](https://github.com/RSS3-Network/Protocol/discussions) are preferred for discussion of this specification.
36 |
37 | ## 3. Future Compatibility
38 |
39 | This version is a pre-release version, so it is not guaranteed to be compatible with subsequent versions, but breaking updates will be kept to a minimum.
40 |
41 | ## 4. Concepts
42 |
43 | - Persona - a user, either as an individual or as a group
44 | - Item - An item published by a persona
45 | - Context - One type of interactive content for an item
46 | - Link - One type of relationship to other personas from current persona
47 | - Backlink - A link from other personas to current persona
48 |
49 | ## 5. Interfaces
50 |
51 | ### 5.1 Interfaces in TypeScript
52 |
53 | ```tsx
54 | type RSS3ID = string;
55 | type RSS3ItemID = string;
56 | type RSS3ItemsID = string;
57 | type RSS3ListID = string;
58 | type ThirdPartyAddress = string[];
59 |
60 | // Common attributes for each files
61 | interface RSS3Base {
62 | id: RSS3ID | RSS3ItemsID | RSS3ListID;
63 | "@version": "rss3.io/version/v0.1.1";
64 | date_created: string;
65 | date_updated: string;
66 | }
67 |
68 | // Entrance, RSS3 file
69 | interface RSS3 extends RSS3Base {
70 | id: RSS3ID;
71 | signature?: string;
72 |
73 | profile: {
74 | name?: string;
75 | avatar?: ThirdPartyAddress;
76 | bio?: string;
77 | tags?: string[];
78 | signature?: string;
79 | };
80 |
81 | items: RSS3Item[];
82 | items_next?: RSS3ItemsID;
83 |
84 | links?: {
85 | type: string;
86 | tags?: string[];
87 | list: RSS3ID[];
88 | signature?: string;
89 | }[];
90 | "@backlinks"?: {
91 | type: string;
92 | list: RSS3ListID;
93 | }[];
94 |
95 | assets?: {
96 | type: string;
97 | tags?: string[];
98 | content: string;
99 | }[];
100 | }
101 |
102 | // RSS3Items file
103 | interface RSS3Items extends RSS3Base {
104 | id: RSS3ItemsID;
105 | signature?: string;
106 |
107 | items: RSS3Item[];
108 | items_next?: RSS3ItemsID;
109 | }
110 |
111 | // RSS3List file
112 | interface RSS3List extends RSS3Base {
113 | id: RSS3ListID;
114 |
115 | list?: RSS3ID[] | RSS3ItemID[];
116 | list_next?: RSS3ListID;
117 | }
118 |
119 | interface RSS3Item {
120 | id: RSS3ItemID;
121 | authors?: RSS3ID[];
122 | title?: string;
123 | summary?: string;
124 | tags?: string[];
125 | date_published?: string;
126 | date_modified?: string;
127 |
128 | type?: string;
129 | upstream?: RSS3ItemID;
130 |
131 | contents?: {
132 | address: ThirdPartyAddress;
133 | mime_type: string;
134 | name?: string;
135 | tags?: string[];
136 | size_in_bytes?: string;
137 | duration_in_seconds?: string;
138 | }[];
139 |
140 | "@contexts"?: {
141 | type?: string;
142 | list?: RSS3ListID;
143 | }[];
144 |
145 | signature?: string;
146 | }
147 | ```
148 |
149 | ### 5.2 Examples
150 |
151 | A persona `0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944` with a published item `Hello World` and a comment to it
152 |
153 | ```yaml
154 | {
155 | "id": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944",
156 | "@version": "rss3.io/version/v0.1.1",
157 | "date_created": "2009-05-01T00:00:00.000Z",
158 | "date_updated": "2021-05-08T16:56:35.529Z",
159 |
160 | "profile":
161 | {
162 | "name": "DIYgod",
163 | "avatar": ["dweb://diygod.jpg", "https://example.com/diygod.jpg"],
164 | "bio": "写代码是热爱,写到世界充满爱!",
165 | "tags": ["demo", "lovely", "technology"],
166 | },
167 |
168 | "items":
169 | [
170 | {
171 | "id": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-item-1",
172 | "authors": ["0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944"],
173 | "summary": "Yes!!",
174 | "date_published": "2021-05-09T16:56:35.529Z",
175 | "date_modified": "2021-05-09T16:56:35.529Z",
176 |
177 | "type": "comment",
178 | "upstream": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-item-0",
179 | },
180 | {
181 | "id": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-item-0",
182 | "authors": ["0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944"],
183 | "title": "Hello World",
184 | "summary": "Hello, this is the first item of RSS3.",
185 | "date_published": "2021-05-08T16:56:35.529Z",
186 | "date_modified": "2021-05-08T16:56:35.529Z",
187 |
188 | "contents":
189 | [
190 | {
191 | "address":
192 | ["dweb://never.html", "https://example.com/never.html"],
193 | "mime_type": "text/html",
194 | },
195 | { "address": ["dweb://never.jpg"], "mime_type": "image/jpeg" },
196 | ],
197 |
198 | "@contexts":
199 | [
200 | {
201 | "type": "comment",
202 | "list": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-context@0@comment-0",
203 | },
204 | {
205 | "type": "like",
206 | "list": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-context@0@like-0",
207 | },
208 | ],
209 | },
210 | ],
211 | "items_next": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-items-0",
212 |
213 | "links":
214 | [
215 | {
216 | "type": "follow",
217 | "list": ["0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
218 | },
219 | {
220 | "type": "superfollow",
221 | "list": ["0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
222 | },
223 | ],
224 | "@backlinks":
225 | [
226 | {
227 | "type": "follow",
228 | "list": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-backlink@follow-0",
229 | },
230 | ],
231 |
232 | "assets": [{ "type": "some experience point", "content": "100" }],
233 | }
234 | ```
235 |
236 | ### 5.3 Fields
237 |
238 | **5.3.1 General**
239 |
240 | **Fields starting with `@` characters**
241 |
242 | - Entirely the responsibility of the hosting program
243 | - May be modified by the hosting program at any time
244 | - Not allowed to be modified by the persona
245 |
246 | **The `signature` field**
247 |
248 | - Signed by persona's private key
249 | - The signature content is the Keccak-256 hash of the object to which the field belongs and excluding fields starting with `@` characters and the `signature` field itself
250 | - Useful for the object integration verification for both server side and persona side
251 | - If the server side is trusted, then this field is optional
252 | - This field can appear anywhere in RSS3, the position in the interfaces is recommended
253 |
254 | **Extensions**
255 |
256 | Custom objects can be used in RSS3. Names must start with an `_` character followed by a letter. Custom objects can appear anywhere in RSS3.
257 |
258 | **Empty contents**
259 |
260 | It is strongly recommended to delete fields with empty contents, including empty strings, empty arrays, empty objects
261 |
262 | **5.3.2 RSS3Base**
263 |
264 | Common attributes for each file
265 |
266 | - `id`: Unique indicate for current file and public key for current persona
267 | - `@version`: Proposal version for current file. It should be like `rss3.io/version/v1.0.0`
268 | - `date_created`: Specifies the created date in RFC 3339 format
269 | - `date_updated`: Specifies the updated date in RFC 3339 format
270 | - `signature`: Refer to **General**
271 |
272 | **5.3.3 RSS3**
273 |
274 | RSS3 file, indicating a persona
275 |
276 | - `profile`: Profile of current persona
277 | - `name`: Name of current persona
278 | - `avatar`: Avatar of current persona. It is one or multiple third party addresses that link to an identical file
279 | - `bio`: Bio of current persona
280 | - `tags`: Tags of current persona
281 | - `signature`: Refer to **General**
282 | - `items`: Partial items published by current persona
283 | - `items_next`: Next page of `items`. See **RSS3Items** for more details
284 | - `links`: Links for this persona
285 | - `type`: Link type, for example: follow superfollow
286 | - `tags`: Tags of current link
287 | - `list`: Personas who belong to this link
288 | - `signature`: Refer to **General**
289 | - `@backlinks`: Backlinks for this persona, for example: follow type of backlink means followers.
290 | - `type`: Ibid
291 | - `list`: File ID of backlink list that belong to this type. See **RSS3List** for more details
292 | - `assets`: Assets for current persona.
293 | - `type`: Asset type, for example: some experience point
294 | - `tags`: Tags of current assets
295 | - `content`: Content of current assets
296 |
297 | **5.3.4 RSS3Items**
298 |
299 | RSS3Items file, used for pagination of RSS3 files
300 |
301 | - `id`: Unique indicate for current file. Its value should be `${RSS3ID}-items-${index}`
302 | - `items`: List of items
303 | - `items_next`: Next page of `items`
304 |
305 | **5.3.5 RSS3List**
306 |
307 | RSS3List file, used for pagination of links and contexts
308 |
309 | - `id`: Unique indicate for current file. Its value should be `${RSS3ID}-list-${field}-${type}`
310 | - `list`: List
311 | - `list_next`: Next page of `list`
312 |
313 | **5.3.6 RSS3Item**
314 |
315 | Indicating a content posted by a persona or a context
316 |
317 | - `id`: Unique ID of current item. Its value should be `${RSS3ID}-item-${index}`
318 | - `authors`: Authors of current item. It is a list of `RSSOtherPersona`
319 | - `title`: Title of current item
320 | - `summary`: Content summary of current item
321 | - `tags`: Tags of current item
322 | - `date_published`: Specifies the published date in RFC 3339 format
323 | - `date_modified`: Specifies the modified date in RFC 3339 format
324 | - `type`: Item type for the not original item, for example: comment like
325 | - `upstream`: Upstream of the not original item
326 | - `contents`: Contents of current item, possibly multiple different types of content
327 | - `address`: Content address. It is one or multiple third party addresses that link to an identical file
328 | - `mime_type`: [MIME type](https://en.wikipedia.org/wiki/Media_type) of current content
329 | - `name`: Name of current content
330 | - `tags`: Tags of current content
331 | - `size_in_bytes`: Size of current content in bytes
332 | - `duration_in_seconds`: Duration of current content in seconds. Mainly for audio and video use
333 | - `@contexts`: Interactive items from other personas.
334 | - `type`: Same as type above
335 | - `list`: File ID of items list that belong to this context. See **RSS3List** for more details
336 | - `signature`: Refer to **General**
337 |
--------------------------------------------------------------------------------
/versions/v0.1.0.md:
--------------------------------------------------------------------------------
1 | # RSS3 v0.1.0
2 |
3 | **Latest editor's draft:**
4 |
5 | - [https://github.com/RSS3-Network/Protocol](https://github.com/RSS3-Network/Protocol)
6 |
7 | **Editors:**
8 |
9 | - DIYgod ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
10 | - Joshua ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
11 | - Atlas ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
12 |
13 | **Reviewers**
14 |
15 | - Zui ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
16 | - Usagi ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
17 |
18 | **Participate:**
19 |
20 | - [GitHub](https://github.com/RSS3-Network/Protocol)
21 | - [Telegram](https://link.rss3.io/telegram)
22 | - [Discord](https://link.rss3.io/discord)
23 | - [Twitter](https://twitter.com/rss3_)
24 |
25 | ## 1. Abstract
26 |
27 | Derived from the best out of RSS, RSS3 is an open protocol designed for content and social networks in the Web 3.0 era.
28 |
29 | This document describes the interfaces of RSS3 files.
30 |
31 | ## 2. Status of This Document
32 |
33 | The proposal is being incubated in the [RSS3 Network](https://github.com/RSS3-Network).
34 |
35 | [GitHub](https://github.com/RSS3-Network/Protocol) [issues](https://github.com/RSS3-Network/Protocol/issues) and [discussions](https://github.com/RSS3-Network/Protocol/discussions) are preferred for discussion of this specification.
36 |
37 | ## 3. Future Compatibility
38 |
39 | This version is a pre-release version, so it is not guaranteed to be compatible with subsequent versions, but breaking updates will be kept to a minimum.
40 |
41 | ## 4. Concepts
42 |
43 | - Persona - a user, either as an individual or as a group
44 | - Item - An item published by a persona
45 | - Context - One type of interactive content for an item
46 | - Link - One type of relationship to other personas from current persona
47 | - Backlink - A link from other personas to current persona
48 |
49 | ## 5. Interfaces
50 |
51 | ### 5.1 Interfaces in TypeScript
52 |
53 | ```tsx
54 | type RSS3ID = string;
55 | type RSS3ItemID = string;
56 | type RSS3ItemsID = string;
57 | type RSS3ListID = string;
58 | type ThirdPartyAddress = string[];
59 |
60 | // Common attributes for each files
61 | interface RSS3Base {
62 | id: RSS3ID | RSS3ItemsID | RSS3ListID;
63 | "@version": "rss3.io/version/v0.1.0-rc.0";
64 | date_created: string;
65 | date_updated: string;
66 | signature?: string;
67 | }
68 |
69 | // Entrance, RSS3 file
70 | interface RSS3 extends RSS3Base {
71 | id: RSS3ID;
72 |
73 | profile: {
74 | name?: string;
75 | avatar?: ThirdPartyAddress;
76 | bio?: string;
77 | tags?: string[];
78 | signature?: string;
79 | };
80 |
81 | items: RSS3Item[];
82 | items_next?: RSS3ItemsID;
83 |
84 | links?: {
85 | type: string;
86 | tags?: string[];
87 | list: RSS3ID[];
88 | list_next?: RSS3ListID;
89 | signature?: string;
90 | }[];
91 | "@backlinks"?: {
92 | type: string;
93 | list: RSS3ID[];
94 | list_next?: RSS3ListID;
95 | }[];
96 |
97 | assets?: {
98 | type: string;
99 | tags?: string[];
100 | content: string;
101 | }[];
102 | }
103 |
104 | // RSS3Items file
105 | interface RSS3Items extends RSS3Base {
106 | id: RSS3ItemsID;
107 |
108 | items: RSS3Item[];
109 | items_next?: RSS3ItemsID;
110 | }
111 |
112 | // RSS3List file
113 | interface RSS3List extends RSS3Base {
114 | id: RSS3ListID;
115 |
116 | list: RSS3ID[] | RSS3ItemID[];
117 | list_next?: RSS3ListID;
118 | }
119 |
120 | interface RSS3Item {
121 | id: RSS3ItemID;
122 | authors?: RSS3ID[];
123 | title?: string;
124 | summary?: string;
125 | tags?: string[];
126 | date_published?: string;
127 | date_modified?: string;
128 |
129 | type?: string;
130 | upstream?: RSS3ItemID;
131 |
132 | contents?: {
133 | address: ThirdPartyAddress;
134 | mime_type: string;
135 | name?: string;
136 | tags?: string[];
137 | size_in_bytes?: string;
138 | duration_in_seconds?: string;
139 | }[];
140 |
141 | "@contexts"?: {
142 | type?: string;
143 | list: RSS3ItemID[];
144 | list_next?: RSS3ListID;
145 | }[];
146 |
147 | signature?: string;
148 | }
149 | ```
150 |
151 | ### 5.2 Examples
152 |
153 | A persona `0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944` with a published item `Hello World` and a comment to it
154 |
155 | ```yaml
156 | {
157 | "id": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944",
158 | "@version": "rss3.io/version/v0.1.0-rc.0",
159 | "date_created": "2009-05-01T00:00:00.000Z",
160 | "date_updated": "2021-05-08T16:56:35.529Z",
161 |
162 | "profile":
163 | {
164 | "name": "DIYgod",
165 | "avatar": ["dweb://diygod.jpg", "https://example.com/diygod.jpg"],
166 | "bio": "写代码是热爱,写到世界充满爱!",
167 | "tags": ["demo", "lovely", "technology"],
168 | },
169 |
170 | "items":
171 | [
172 | {
173 | "id": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-item-1",
174 | "authors": ["0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944"],
175 | "summary": "Yes!!",
176 | "date_published": "2021-05-09T16:56:35.529Z",
177 | "date_modified": "2021-05-09T16:56:35.529Z",
178 |
179 | "type": "comment",
180 | "upstream": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-item-0",
181 | },
182 | {
183 | "id": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-item-0",
184 | "authors": ["0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944"],
185 | "title": "Hello World",
186 | "summary": "Hello, this is the first item of RSS3.",
187 | "date_published": "2021-05-08T16:56:35.529Z",
188 | "date_modified": "2021-05-08T16:56:35.529Z",
189 |
190 | "contents":
191 | [
192 | {
193 | "file": ["dweb://never.html", "https://example.com/never.html"],
194 | "mime_type": "text/html",
195 | },
196 | { "file": ["dweb://never.jpg"], "mime_type": "image/jpeg" },
197 | ],
198 |
199 | "@contexts":
200 | [
201 | {
202 | "type": "comment",
203 | "list": ["0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-item-1"],
204 | },
205 | {
206 | "type": "like",
207 | "list": ["0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
208 | },
209 | ],
210 | },
211 | ],
212 | "items_next": "0xC8b960D09C0078c18Dcbe7eB9AB9d816BcCa8944-items-0",
213 |
214 | "links":
215 | [
216 | {
217 | "type": "follow",
218 | "list": ["0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
219 | },
220 | {
221 | "type": "superfollow",
222 | "list": ["0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
223 | },
224 | ],
225 | "@backlinks":
226 | [
227 | {
228 | "type": "follow",
229 | "list": ["0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
230 | },
231 | ],
232 |
233 | "assets": [{ "type": "some experience point", "content": "100" }],
234 | }
235 | ```
236 |
237 | ### 5.3 Fields
238 |
239 | **5.3.1 General**
240 |
241 | **Fields starting with `@` characters**
242 |
243 | - Entirely the responsibility of the hosting program
244 | - May be modified by the hosting program at any time
245 | - Not allowed to be modified by the persona
246 |
247 | **The `signature` field**
248 |
249 | - Signed by persona's private key
250 | - The signature content is the Keccak-256 hash of the object to which the field belongs and excluding fields starting with `@` characters and the `signature` field itself
251 | - Useful for the object integration verification for both server side and persona side
252 | - If the server side is trusted, then this field is optional
253 | - This field can appear anywhere in RSS3, the position in the interfaces is recommended
254 |
255 | **Extensions**
256 |
257 | Custom objects can be used in RSS3. Names must start with an `_` character followed by a letter. Custom objects can appear anywhere in RSS3.
258 |
259 | **Empty contents**
260 |
261 | It is strongly recommended to delete fields with empty contents, including empty strings, empty arrays, empty objects
262 |
263 | **5.3.2 RSS3Base**
264 |
265 | Common attributes for each file
266 |
267 | - `id`: Unique indicate for current file and public key for current persona
268 | - `@version`: Proposal version for current file. It should be like `rss3.io/version/v1.0.0`
269 | - `date_created`: Specifies the created date in RFC 3339 format
270 | - `date_updated`: Specifies the updated date in RFC 3339 format
271 | - `signature`: Refer to **General**
272 |
273 | **5.3.3 RSS3**
274 |
275 | RSS3 file, indicating a persona
276 |
277 | - `profile`: Profile of current persona
278 | - `name`: Name of current persona
279 | - `avatar`: Avatar of current persona. It is one or multiple third party addresses that link to an identical file
280 | - `bio`: Bio of current persona
281 | - `tags`: Tags of current persona
282 | - `signature`: Refer to **General**
283 | - `items`: Partial items published by current persona
284 | - `items_next`: Next page of `items`. See **RSS3Items** for more details
285 | - `links`: Links for this persona
286 | - `type`: Link type, for example: follow superfollow
287 | - `tags`: Tags of current link
288 | - `list`: Personas who belong to this link
289 | - `list_next`: Next page of link `list`. See **RSS3List** for more details
290 | - `signature`: Refer to **General**
291 | - `@backlinks`: Backlinks for this persona, for example: follow type of backlink means followers.
292 | - `type`: Ibid
293 | - `list`: Ibid
294 | - `list_next`: Ibid
295 | - `assets`: Assets for current persona.
296 | - `type`: Asset type, for example: some experience point
297 | - `tags`: Tags of current assets
298 | - `content`: Content of current assets
299 |
300 | **5.3.4 RSS3Items**
301 |
302 | RSS3Items file, used for pagination of RSS3 files
303 |
304 | - `id`: Unique indicate for current file. Its value should be `${RSS3ID}-items-${index}`
305 | - `items`: List of items
306 | - `items_next`: Next page of `items`
307 |
308 | **5.3.5 RSS3List**
309 |
310 | RSS3List file, used for pagination of links and contexts
311 |
312 | - `id`: Unique indicate for current file. Its value should be `${RSS3ID}-list-${field}-${type}`
313 | - `list`: List
314 | - `list_next`: Next page of `list`
315 |
316 | **5.3.6 RSS3Item**
317 |
318 | Indicating a content posted by a persona or a context
319 |
320 | - `id`: Unique ID of current item. Its value should be `${RSS3ID}-item-${index}`
321 | - `authors`: Authors of current item. It is a list of `RSSOtherPersona`
322 | - `title`: Title of current item
323 | - `summary`: Content summary of current item
324 | - `tags`: Tags of current item
325 | - `date_published`: Specifies the published date in RFC 3339 format
326 | - `date_modified`: Specifies the modified date in RFC 3339 format
327 | - `type`: Item type for the not original item, for example: comment like
328 | - `upstream`: Upstream of the not original item
329 | - `contents`: Contents of current item, possibly multiple different types of content
330 | - `address`: Content address. It is one or multiple third party addresses that link to an identical file
331 | - `mime_type`: [MIME type](https://en.wikipedia.org/wiki/Media_type) of current content
332 | - `name`: Name of current content
333 | - `tags`: Tags of current content
334 | - `size_in_bytes`: Size of current content in bytes
335 | - `duration_in_seconds`: Duration of current content in seconds. Mainly for audio and video use
336 | - `@contexts`: Interactive items from other personas.
337 | - `type`: Same as type above
338 | - `list`: Items that belong to this context
339 | - `list_next`: Next page of context `list`. See **RSS3List** for more details
340 | - `signature`: Refer to **General**
341 |
--------------------------------------------------------------------------------
/versions/v0.3.0.md:
--------------------------------------------------------------------------------
1 | # RSS3 v0.3.0
2 |
3 | **Latest editor's draft:**
4 |
5 | - [https://github.com/RSS3-Network/Protocol](https://github.com/RSS3-Network/Protocol)
6 |
7 | **Editors:**
8 |
9 | - DIYgod ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
10 | - Joshua ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
11 | - Atlas ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
12 |
13 | **Reviewers**
14 |
15 | - Zui ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
16 | - Usagi ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
17 |
18 | **Participate:**
19 |
20 | - [GitHub](https://github.com/RSS3-Network/Protocol)
21 |
22 | ## 1. Abstract
23 |
24 | 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.
25 |
26 | This document describes the interfaces of RSS3 files.
27 |
28 | ## 2. Status of This Document
29 |
30 | The proposal is being incubated in the [RSS3 Network](https://github.com/RSS3-Network).
31 |
32 | [GitHub](https://github.com/RSS3-Network/Protocol) [issues](https://github.com/RSS3-Network/Protocol/issues) and [discussions](https://github.com/RSS3-Network/Protocol/discussions) are preferred for discussion of this specification.
33 |
34 | ## 3. Future Compatibility
35 |
36 | 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.
37 |
38 | ## 4. Concepts
39 |
40 | - Persona - a user, either as an individual or as a group
41 | - Item - An item published or experienced by a persona
42 | - Link - One type of relationship to other personas/item from current persona/item
43 | - Backlink - A link from other personas/items to current persona/item
44 | - Assets - Objects currently owned by the persona
45 |
46 | ## 5. Interfaces
47 |
48 | ### 5.1 Interfaces in TypeScript
49 |
50 | ```tsx
51 | // File ids
52 | type RSS3ID = string; // A 42-character hexadecimal address with 0x appended in front.
53 | type RSS3ItemsID = string; // `${RSS3ID}-items-${index}`
54 | 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}`
55 |
56 | type RSS3FileID = RSS3ID | RSS3ItemsID | RSS3ListID; // Unique indicate for current file
57 |
58 | type RSS3ItemID = string; // `${RSS3ID}-item-${index}`
59 |
60 | type ThirdPartyAddress = string[]; // A series of url or ipfs hash that link to an identical file
61 |
62 | // Common attributes for each files
63 | interface RSS3Base {
64 | version: "rss3.io/version/v0.3.0"; // Proposal version for current file. It should be like `rss3.io/version/v1.0.0`
65 | id: RSS3FileID;
66 | date_created: string; // Specifies the created date in RFC 3339 format
67 | date_updated: string; // Specifies the updated date in RFC 3339 format
68 | }
69 |
70 | // Entrance, RSS3 file, indicating a persona
71 | interface RSS3 extends RSS3Base {
72 | id: RSS3ID;
73 | 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
74 | agent_id?: string; // A random ed25519 public key generated by the client
75 | agent_signature?: string; // A signature signed by `agent_id`'s private key, its content is the same as `signature`
76 | controller?: string; // A contract address indicating ownership of the file
77 |
78 | profile?: {
79 | name?: string;
80 | avatar?: ThirdPartyAddress;
81 | bio?: string;
82 |
83 | accounts?: {
84 | tags?: string[];
85 | platform: string; // Platform name, for example: EVM+ or Twitter
86 | identity: string; // Platform identity, for example: 0x1234567890123456789012345678901234567890 or @username
87 | signature?: string; // Signature of [["address": id], ["identity": account.identity], ["platform", account.platform]], optional for no public-key cryptography platform
88 | }[];
89 | };
90 |
91 | items?: RSS3ItemsID;
92 |
93 | links?: {
94 | tags?: string[];
95 | type: string; // Link type, for example: follow superfollow
96 | list?: RSS3ListID; // Personas who belong to this link
97 | }[];
98 | backlinks?: {
99 | // Backlinks for this persona, for example: follow type of backlink means followers.
100 | auto: true;
101 | type: string; // The same as links.type
102 | list: RSS3ListID; // File ID of backlink list that belong to this type. See **RSS3List** for more details
103 | }[];
104 |
105 | assets?: RSS3ListID;
106 | }
107 |
108 | // RSS3Items file, used for pagination of RSS3 files
109 | interface RSS3Items extends RSS3Base {
110 | id: RSS3ItemsID;
111 | signature: string;
112 | agent_id?: string;
113 | agent_signature?: string;
114 |
115 | items: RSS3Item[]; // List of items
116 | items_next?: RSS3ItemsID; // Next page of items
117 | }
118 |
119 | // RSS3List file, used for pagination of links and contexts
120 | interface RSS3List extends RSS3Base {
121 | id: RSS3ListID;
122 |
123 | list?: RSS3ID[] | RSS3ItemID[] | RSS3Asset[];
124 | list_next?: RSS3ListID;
125 | }
126 |
127 | // Asset
128 | type RSS3Asset = RSS3UserAsset | RSS3NodeAsset;
129 |
130 | interface RSS3NodeAsset {
131 | auto: true;
132 | platform: string; // Corresponding to profile.accounts.platform
133 | identity: string; // Corresponding to profile.accounts.identity
134 | id: string; // Unique asset ID
135 | type: string; // Asset type, for example: Ethereum-NFT xDai-POAP
136 | }
137 |
138 | interface RSS3UserAsset {
139 | tags?: string[];
140 | platform: "custom"; // Corresponding to profile.accounts.platform
141 | identity: string; // Corresponding to profile.accounts.identity
142 | id: string; // Unique asset ID
143 | type: string; // Asset type, for example: Ethereum-NFT xDai-POAP
144 | }
145 |
146 | // Item
147 | type RSS3Item = RSS3UserItem | RSS3NodeItem;
148 |
149 | interface RSS3ItemBase {
150 | id: RSS3ItemID;
151 | date_published: string; // Specifies the published date in RFC 3339 format
152 | date_modified: string; // Specifies the modified date in RFC 3339 format
153 |
154 | backlinks?: {
155 | // Interactive items from other personas.
156 | auto: true;
157 | type: string;
158 | list: RSS3ListID; // File ID of items list that belong to this context. See **RSS3List** for more details
159 | }[];
160 | }
161 |
162 | // A type of content posted by persona itself
163 | interface RSS3UserItem extends RSS3ItemBase {
164 | tags?: string[];
165 | authors?: RSS3ID[];
166 | title?: string;
167 | summary?: string;
168 |
169 | link?: {
170 | type: string; // Link type for the non-original item, for example: comment like
171 | target: RSS3ItemID; // Target of the non-original item
172 | };
173 |
174 | contents?: {
175 | // Contents of current item, possibly multiple different types of content
176 | tags?: string[];
177 | address: ThirdPartyAddress;
178 | mime_type: string; // [MIME type](https://en.wikipedia.org/wiki/Media_type) of current content
179 | name?: string;
180 | size_in_bytes?: string;
181 | duration_in_seconds?: string;
182 | }[];
183 | }
184 |
185 | // A type of content that is automatically generated by a node to represent a change of an asset
186 | interface RSS3NodeItem extends RSS3ItemBase {
187 | auto: true;
188 | account_platform: string; // Corresponding to profile.accounts.platform
189 | account_identity: string; // Corresponding to profile.accounts.identity
190 | asset_id: string; // Corresponding to asset.id
191 | asset_type: string; // Corresponding to asset.type
192 | asset_action: {
193 | type: string;
194 | target?: string;
195 | };
196 | }
197 | ```
198 |
199 | ### 5.2 Fields
200 |
201 | **Objects with this `auto` field**
202 |
203 | - Entirely the responsibility of the hosting program
204 | - May be modified by the hosting program at any time
205 | - Not allowed to be modified by the persona
206 | - Excluded when calculating signatures
207 |
208 | **Extensions**
209 |
210 | Custom objects can be used in RSS3. Names must start with an `_` character. Custom objects can appear anywhere in RSS3.
211 |
212 | **Empty contents**
213 |
214 | It is strongly recommended to delete fields with empty contents, including empty strings, empty arrays, empty objects
215 |
216 | ### 5.3 Examples
217 |
218 | A persona `0x1234567890123456789012345678901234567890` with a published item `Hello World` and a comment to it
219 |
220 | ```yaml
221 | # Index file
222 | {
223 | "version": "rss3.io/version/v0.3.0",
224 | "id": "0x1234567890123456789012345678901234567890",
225 | "date_created": "2021-01-01T00:00:00.000Z",
226 | "date_updated": "2021-01-01T00:00:00.000Z",
227 | "signature": "0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
228 |
229 | "profile": {
230 | "name": "RSS3",
231 | "avatar": ["https://example.com/rss3.jpg", "QmT1zZNHvXxdTzHesfEdvFjMPvw536Ltbup7B4ijGVib7t"],
232 | "bio": "RSS3 is an open protocol designed for all our cyber existence in the era of Web 3.0.",
233 |
234 | "accounts": [{
235 | "platform": "EVM+",
236 | "identity": "0x1111111111111111111111111111111111111111",
237 | "signature": "0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
238 | }]
239 | },
240 |
241 | "items": "0x1234567890123456789012345678901234567890-items-0",
242 |
243 | "links": [{
244 | "type": "follow",
245 | "list": "0x1234567890123456789012345678901234567890-list-links.follow-0",
246 | }],
247 | "backlinks": [{
248 | "auto": true,
249 | "type": "follow",
250 | "list": "0x1234567890123456789012345678901234567890-list-backlinks.follow-0",
251 | }],
252 |
253 | "assets": "0x1234567890123456789012345678901234567890-list-assets-0"
254 | }
255 |
256 | # Items file
257 | {
258 | "version": "rss3.io/version/v0.3.0",
259 | "id": "0x1234567890123456789012345678901234567890-items-0",
260 | "date_created": "2021-01-01T00:00:00.000Z",
261 | "date_updated": "2021-01-01T00:00:00.000Z",
262 | "signature": "0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
263 |
264 | "items": [{
265 | "auto": true,
266 | "id": "0x1234567890123456789012345678901234567890-item-2",
267 | "date_published": "2021-01-01T00:00:00.000Z",
268 | "date_modified": "2021-01-01T00:00:00.000Z",
269 |
270 | "account_platform": "EVM+",
271 | "account_identity": "0x1111111111111111111111111111111111111111",
272 | "asset_id": "id0",
273 | "asset_type": "Ethereum-NFT",
274 | "asset_action": {
275 | "type": "transfer-to",
276 | "target": "0x2222222222222222222222222222222222222222"
277 | },
278 |
279 | "backlinks": [{
280 | "auto": true,
281 | "type": "comment",
282 | "list": "0x1234567890123456789012345678901234567890-list-backlinks.item.2.comment-0"
283 | }]
284 | }, {
285 | "id": "0x1234567890123456789012345678901234567890-item-1",
286 | "summary": "Yes!!",
287 | "date_published": "2021-01-01T00:00:00.000Z",
288 | "date_modified": "2021-01-01T00:00:00.000Z",
289 |
290 | "link": {
291 | "type": "comment",
292 | "target": "0x1234567890123456789012345678901234567890-item-0"
293 | },
294 | }, {
295 | "id": "0x1234567890123456789012345678901234567890-item-0",
296 | "title": "Hello World",
297 | "summary": "Hello, this is the first item of RSS3.",
298 | "date_published": "2021-01-01T00:00:00.000Z",
299 | "date_modified": "2021-01-01T00:00:00.000Z",
300 |
301 | "contents": [{
302 | "address": ["https://example.com/rss3.jpg"],
303 | "mime_type": "image/jpeg"
304 | }],
305 |
306 | "backlinks": [{
307 | "auto": true,
308 | "type": "comment",
309 | "list": "0x1234567890123456789012345678901234567890-list-backlinks.item.0.comment-0"
310 | }]
311 | }]
312 | }
313 |
314 | # Link list file
315 | {
316 | "version": "rss3.io/version/v0.3.0",
317 | "id": "0x1234567890123456789012345678901234567890-list-links.follow-0",
318 | "date_created": "2021-01-01T00:00:00.000Z",
319 | "date_updated": "2021-01-01T00:00:00.000Z",
320 |
321 | "list": ["0x1111111111111111111111111111111111111111", "0x2222222222222222222222222222222222222222"]
322 | }
323 |
324 | # Assets list file
325 | {
326 | "version": "rss3.io/version/v0.3.0",
327 | "id": "0x1234567890123456789012345678901234567890-list-assets-0",
328 | "date_created": "2021-01-01T00:00:00.000Z",
329 | "date_updated": "2021-01-01T00:00:00.000Z",
330 |
331 | "list": [{
332 | "platform": "EVM+",
333 | "identity": "0x1234567890123456789012345678901234567890",
334 | "id": "0xacbe98efe2d4d103e221e04c76d7c55db15c8e89-5",
335 | "type": "Ethereum-NFT"
336 | }]
337 | }
338 | ```
339 |
--------------------------------------------------------------------------------
/versions/v0.3.1.md:
--------------------------------------------------------------------------------
1 | # RSS3 v0.3.1
2 |
3 | **Latest editor's draft:**
4 |
5 | - [https://github.com/RSS3-Network/Protocol](https://github.com/RSS3-Network/Protocol)
6 |
7 | **Editors:**
8 |
9 | - DIYgod ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
10 | - Joshua ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
11 | - Atlas ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
12 |
13 | **Reviewers**
14 |
15 | - Zui ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
16 | - Usagi ([NaturalSelectionLabs](https://github.com/NaturalSelectionLabs))
17 |
18 | **Participate:**
19 |
20 | - [GitHub](https://github.com/RSS3-Network/Protocol)
21 |
22 | ## 1. Abstract
23 |
24 | 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.
25 |
26 | This document describes the interfaces of RSS3 files.
27 |
28 | ## 2. Status of This Document
29 |
30 | The proposal is being incubated in the [RSS3 Network](https://github.com/RSS3-Network).
31 |
32 | [GitHub](https://github.com/RSS3-Network/Protocol) [issues](https://github.com/RSS3-Network/Protocol/issues) and [discussions](https://github.com/RSS3-Network/Protocol/discussions) are preferred for discussion of this specification.
33 |
34 | ## 3. Future Compatibility
35 |
36 | 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.
37 |
38 | ## 4. Concepts
39 |
40 | - Persona - a user, either as an individual or as a group
41 | - Item - An item published or experienced by a persona
42 | - Link - One type of relationship to other personas/item from current persona/item
43 | - Backlink - A link from other personas/items to current persona/item
44 | - Assets - Objects currently owned by the persona
45 |
46 | ## 5. Interfaces
47 |
48 | ### 5.1 File types
49 |
50 | | ID | RSS3ID | RSS3CustomItemsListID | RSS3AutoItemsListID | RSS3CustomItemsListID | RSS3AutoItemsListID | RSS3LinksListID | RSS3BacklinksListID | RSS3ItemBacklinksListID |
51 | | ------------- | --------- | -------------------------------------- | ----------------------------- | -------------------------------------- | ----------------------------- | --------------------------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------ |
52 | | Format of ID | \ | `${RSS3ID}-list-items.custom-${index}` | `${RSS3ID}-list-items.auto-0` | `${RSS3ID}-list-items.custom-${index}` | `${RSS3ID}-list-items.auto-0` | `${RSS3ID}-list-links.${links.type}-${index}` | `${RSS3ID}-list-backlinks.${backlinks.type}-0` | `${RSS3ID}-list-item.${item.index}.backlinks.${backlinks.type}-${index}` |
53 | | Content Types | RSS3Index | RSS3CustomItemsList | RSS3AutoItemsList | RSS3CustomAssetsList | RSS3AutoItemsList | RSS3LinksList | RSS3BacklinksList | RSS3ItemBacklinksList |
54 |
55 | ### 5.2 Interfaces in TypeScript
56 |
57 | ```tsx
58 | // File ids
59 | type RSS3ID = string; // Same as ethereum address
60 | type RSS3CustomItemsListID = string; // `${RSS3ID}-list-items.custom-${index}`
61 | type RSS3AutoItemsListID = string; // `${RSS3ID}-list-items.auto-0`
62 | type RSS3CustomAssetsListID = string; // `${RSS3ID}-list-assets.custom-${index}`
63 | type RSS3AutoAssetsListID = string; // `${RSS3ID}-list-assets.auto-0`
64 | type RSS3LinksListID = string; // `${RSS3ID}-list-links.${links.id}-${index}`
65 | type RSS3BacklinksListID = string; // `${RSS3ID}-list-backlinks.${backlinks.id}-0`
66 | type RSS3ItemBacklinksListID = string; // `${RSS3ID}-list-item.${item.index}.backlinks.${backlinks.id}-0`
67 |
68 | type ThirdPartyAddress = string[]; // A series of url or ipfs hash that link to an identical file
69 |
70 | type AccountID = string; // ${platform}-${identity}, for example, EVM+-0x1234567890123456789012345678901234567890 or Twitter-rss3_
71 | type RSS3CustomItemID = string; // `${RSS3ID}-item-custom-${index}`
72 | type RSS3AutoItemID = string; // `${RSS3ID}-item-auto-${index}`
73 |
74 | type RSS3List =
75 | | RSS3CustomItemsList
76 | | RSS3AutoItemsList
77 | | RSS3CustomAssetsList
78 | | RSS3AutoAssetsList
79 | | RSS3LinksList
80 | | RSS3BacklinksList
81 | | RSS3ItemBacklinksList;
82 | type RSS3ListID =
83 | | RSS3CustomItemsListID
84 | | RSS3AutoItemsListID
85 | | RSS3CustomAssetsListID
86 | | RSS3AutoAssetsListID
87 | | RSS3LinksListID
88 | | RSS3BacklinksListID
89 | | RSS3ItemBacklinksListID;
90 | type RSS3FileID = RSS3ID | RSS3ListID;
91 | type RSS3File = RSS3Index | RSS3List;
92 |
93 | // Common attributes for each files
94 | interface RSS3Base {
95 | version: "rss3.io/version/v0.3.1"; // Proposal version for current file. It should be like `rss3.io/version/v1.0.0`
96 | id: RSS3FileID;
97 | date_created: string; // Specifies the created date in RFC 3339 format
98 | date_updated: string; // Specifies the updated date in RFC 3339 format
99 | }
100 |
101 | interface RSS3SignedBase extends RSS3Base {
102 | 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
103 | agent_id?: string; // A random ed25519 public key generated by the client
104 | agent_signature?: string; // A signature signed by `agent_id`'s private key, its content is the same as `signature`
105 | }
106 |
107 | interface RSS3UnsignedBase extends RSS3Base {
108 | auto: true;
109 | }
110 |
111 | // RSS3 index file, main entrance for a persona
112 | interface RSS3Index extends RSS3SignedBase {
113 | id: RSS3ID;
114 | controller?: string; // A contract address indicating ownership of the file
115 |
116 | profile?: {
117 | name?: string;
118 | avatar?: ThirdPartyAddress;
119 | bio?: string;
120 | accounts?: {
121 | tags?: string[];
122 | id: AccountID;
123 | signature?: string; // Signature of [["address", id], ["id", account.id], ["tags", account.tags]], optional for no public-key cryptography platform
124 | }[];
125 | };
126 |
127 | links?: {
128 | tags?: string[];
129 | id: string; // Link id, for example: following superfollowing
130 | list?: RSS3LinksListID; // Personas who belong to this link
131 | }[];
132 |
133 | backlinks?: {
134 | // Backlinks for this persona, for example: following link's backlink means followers.
135 | auto: true;
136 | id: string; // The same as links.id
137 | list: RSS3BacklinksListID; // File ID of backlink list that belong to this link. See **RSS3List** for more details
138 | }[];
139 |
140 | items?: {
141 | list_custom?: RSS3CustomItemsListID;
142 | list_auto?: RSS3AutoItemsListID;
143 | };
144 |
145 | assets?: {
146 | list_custom?: RSS3CustomAssetsListID;
147 | list_auto?: RSS3AutoAssetsListID;
148 | };
149 | }
150 |
151 | type RSS3Profile = Required["profile"];
152 | type RSS3Account = Required["accounts"][number];
153 | type RSS3Links = Required["links"];
154 |
155 | // RSS3 list files, used for list of links, backlinks, items, assets, itemsbacklinks
156 | interface RSS3ListBase {
157 | id: IDType;
158 | list?: ElementType[];
159 | list_next?: IDType;
160 | }
161 |
162 | type RSS3CustomItemsList = RSS3SignedBase &
163 | RSS3ListBase;
164 | type RSS3AutoItemsList = RSS3UnsignedBase &
165 | RSS3ListBase;
166 | type RSS3CustomAssetsList = RSS3SignedBase &
167 | RSS3ListBase;
168 | type RSS3AutoAssetsList = RSS3UnsignedBase &
169 | RSS3ListBase;
170 | type RSS3LinksList = RSS3SignedBase & RSS3ListBase;
171 | type RSS3BacklinksList = RSS3UnsignedBase &
172 | RSS3ListBase;
173 | type RSS3ItemBacklinksList = RSS3UnsignedBase &
174 | RSS3ListBase;
175 |
176 | // Asset
177 | type RSS3Asset = RSS3CustomAsset | RSS3AutoAsset;
178 | 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
179 | 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
180 |
181 | // Item
182 | type RSS3Item = RSS3CustomItem | RSS3AutoItem;
183 |
184 | interface RSS3ItemBase {
185 | date_created: string; // Specifies the published date in RFC 3339 format
186 | date_updated: string; // Specifies the modified date in RFC 3339 format
187 |
188 | title?: string;
189 | summary?: string;
190 |
191 | backlinks?: {
192 | // Interactive items from other personas.
193 | auto: true;
194 | id: string;
195 | list: RSS3ItemBacklinksListID; // File ID of items list that belong to this context. See **RSS3List** for more details
196 | }[];
197 | }
198 |
199 | interface RSS3CustomItem extends RSS3ItemBase {
200 | // A type of content posted by persona itself
201 | id: RSS3CustomItemID; // `${RSS3ID}-item-custom-${index}`
202 | tags?: string[];
203 | authors?: RSS3ID[];
204 |
205 | link?: {
206 | id: string; // Link id for the non-original item, for example: comment like
207 | target: RSS3CustomItemID | RSS3AutoItemID; // Target of the non-original item
208 | };
209 |
210 | contents?: {
211 | // Contents of current item, possibly multiple different types of content
212 | tags?: string[];
213 | address: ThirdPartyAddress;
214 | mime_type: string; // [MIME type](https://en.wikipedia.org/wiki/Media_type) of current content
215 | name?: string;
216 | size_in_bytes?: string;
217 | duration_in_seconds?: string;
218 | }[];
219 | }
220 |
221 | interface RSS3AutoItem extends RSS3ItemBase {
222 | // A type of content that is automatically generated by a node to represent a change of an asset
223 | id: RSS3AutoItemID; // `${RSS3ID}-item-auto-${index}`
224 |
225 | target: {
226 | field: string; // 'items-auto-${AccountID}', `assets-${RSS3Asset}` 'links-following', 'profile-avatar', `profile-accounts-${RSS3Account.id}`, etc
227 | action: {
228 | type: "add" | "remove" | "update";
229 | 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
230 | proof?: string; // Additional information used to make this target unique
231 | };
232 | };
233 | }
234 | ```
235 |
236 | ### 5.3 Fields
237 |
238 | **signature**
239 |
240 | - Signed by persona's private key
241 | - Used for the object integration verification for both server side and persona side
242 | - The content is
243 | - The Keccak-256 hash of the array of object sorted by alphabetical and excluding
244 | - Objects containing `auto: true`
245 | - Fields that end with `_auto`
246 | - `signature` `agent_id` `agent_signature` signature-related fields
247 | - For example `{a: "1", c: "2", b: {d: "3"}, e: {auto: true}, f_auto: "4"}` -> `[["a", "1"], ["b", ["d", "3"]], ["c", "2"]]`
248 | - Or the string `Hi, RSS3. I'm your agent ${agent_id}`
249 | - If using agent signature
250 |
251 | **Objects with the `auto` field**
252 |
253 | - Entirely the responsibility of the hosting program
254 | - May be modified by the hosting program at any time
255 | - Not allowed to be modified by the persona
256 | - Excluded when calculating signatures
257 |
258 | **Extensions**
259 |
260 | Custom objects can be used in RSS3. Names must start with an `_` character. Custom objects can appear anywhere in RSS3.
261 |
262 | **Empty contents**
263 |
264 | It is strongly recommended to delete fields with empty contents, including empty strings, empty arrays, empty objects
265 |
266 | ### 5.4 Examples
267 |
268 | A persona `0x1234567890123456789012345678901234567890` with a published item `Hello World` and a comment to it
269 |
270 | ```yaml
271 | # Index file
272 | {
273 | "version": "rss3.io/version/v0.3.1",
274 | "id": "0x1234567890123456789012345678901234567890",
275 | "date_created": "2021-01-01T00:00:00.000Z",
276 | "date_updated": "2021-01-01T00:00:00.000Z",
277 | "signature": "0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
278 |
279 | "profile": {
280 | "name": "RSS3",
281 | "avatar": ["https://example.com/rss3.jpg", "QmT1zZNHvXxdTzHesfEdvFjMPvw536Ltbup7B4ijGVib7t"],
282 | "bio": "RSS3 is an open protocol designed for all our cyber existence in the era of Web 3.0.",
283 |
284 | "accounts": [{
285 | "id": "EVM+-0x1111111111111111111111111111111111111111",
286 | "signature": "0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
287 | }]
288 | },
289 |
290 | "items": {
291 | "list_custom": "0x1234567890123456789012345678901234567890-list-items.custom-0",
292 | "list_auto": "0x1234567890123456789012345678901234567890-list-items.auto-0",
293 | },
294 |
295 | "assets": {
296 | "list_custom": "0x1234567890123456789012345678901234567890-list-assets.custom-0",
297 | "list_auto": "0x1234567890123456789012345678901234567890-list-assets.auto-0",
298 | },
299 |
300 | "links": [{
301 | "id": "following",
302 | "list": "0x1234567890123456789012345678901234567890-list-links.following-0",
303 | }],
304 | "backlinks": [{
305 | "auto": true,
306 | "id": "following",
307 | "list": "0x1234567890123456789012345678901234567890-list-backlinks.following-0",
308 | }],
309 | }
310 |
311 | # Custom items file
312 | {
313 | "version": "rss3.io/version/v0.3.1",
314 | "id": "0x1234567890123456789012345678901234567890-list-items.custom-0",
315 | "date_created": "2021-01-01T00:00:00.000Z",
316 | "date_updated": "2021-01-01T00:00:00.000Z",
317 | "signature": "0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
318 |
319 | "list": [{
320 | "id": "0x1234567890123456789012345678901234567890-item-custom-1",
321 | "summary": "Yes!!",
322 | "date_created": "2021-01-01T00:00:00.000Z",
323 | "date_updated": "2021-01-01T00:00:00.000Z",
324 |
325 | "link": {
326 | "id": "comment",
327 | "target": "0x1234567890123456789012345678901234567890-item-custom-0"
328 | },
329 | }, {
330 | "id": "0x1234567890123456789012345678901234567890-item-custom-0",
331 | "title": "Hello World",
332 | "summary": "Hello, this is the first item of RSS3.",
333 | "date_created": "2021-01-01T00:00:00.000Z",
334 | "date_updated": "2021-01-01T00:00:00.000Z",
335 |
336 | "contents": [{
337 | "address": ["https://example.com/rss3.jpg"],
338 | "mime_type": "image/jpeg"
339 | }],
340 |
341 | "backlinks": [{
342 | "auto": true,
343 | "id": "comment",
344 | "list": "0x1234567890123456789012345678901234567890-list-item.0.backlinks.comment-0"
345 | }]
346 | }]
347 | }
348 |
349 | # Auto items file
350 | {
351 | "version": "rss3.io/version/v0.3.1",
352 | "id": "0x1234567890123456789012345678901234567890-list-items.auto-0",
353 | "date_created": "2021-01-01T00:00:00.000Z",
354 | "date_updated": "2021-01-01T00:00:00.000Z",
355 | "auto": true,
356 |
357 | "list": [{
358 | "id": "0x1234567890123456789012345678901234567890-item-auto-0",
359 | "date_created": "2021-01-01T00:00:00.000Z",
360 | "date_updated": "2021-01-01T00:00:00.000Z",
361 |
362 | "target": {
363 | "field": "EVM+-0x1111111111111111111111111111111111111111-Ethereum.NFT-id0",
364 | "action": {
365 | "type": "update",
366 | "payload": "0x2222222222222222222222222222222222222222",
367 | },
368 | },
369 |
370 | "backlinks": [{
371 | "auto": true,
372 | "id": "comment",
373 | "list": "0x1234567890123456789012345678901234567890-list-item.2.backlinks.comment-0"
374 | }]
375 | }]
376 | }
377 |
378 | # Link list file
379 | {
380 | "version": "rss3.io/version/v0.3.1",
381 | "id": "0x1234567890123456789012345678901234567890-list-links.following-0",
382 | "date_created": "2021-01-01T00:00:00.000Z",
383 | "date_updated": "2021-01-01T00:00:00.000Z",
384 | "signature": "0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
385 |
386 | "list": ["0x1111111111111111111111111111111111111111", "0x2222222222222222222222222222222222222222"]
387 | }
388 |
389 | # Custom assets list file
390 | {
391 | "version": "rss3.io/version/v0.3.1",
392 | "id": "0x1234567890123456789012345678901234567890-list-assets.custom-0",
393 | "date_created": "2021-01-01T00:00:00.000Z",
394 | "date_updated": "2021-01-01T00:00:00.000Z",
395 | "signature": "0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
396 |
397 | "list": ["custom-gk-q-10035911"]
398 | }
399 |
400 | # Auto assets list file
401 | {
402 | "version": "rss3.io/version/v0.3.1",
403 | "id": "0x1234567890123456789012345678901234567890-list-assets.auto-0",
404 | "date_created": "2021-01-01T00:00:00.000Z",
405 | "date_updated": "2021-01-01T00:00:00.000Z",
406 | "auto": true,
407 |
408 | "list": ["EVM+-0x1234567890123456789012345678901234567890-Ethereum.NFT-0xacbe98efe2d4d103e221e04c76d7c55db15c8e89.5"]
409 | }
410 | ```
411 |
--------------------------------------------------------------------------------