Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Wordcel/wordcel
Core Protocol V1
https://github.com/Wordcel/wordcel
Last synced: about 1 month ago
JSON representation
Core Protocol V1
- Host: GitHub
- URL: https://github.com/Wordcel/wordcel
- Owner: Wordcel
- License: gpl-3.0
- Archived: true
- Created: 2022-02-06T17:00:52.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-19T06:15:26.000Z (over 1 year ago)
- Last Synced: 2024-10-31T11:51:43.561Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 318 KB
- Stars: 14
- Watchers: 1
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-solana - Wordcel - form blogging at the moment (Code / Social)
README
# Wordcel
Core Protocol, comprising of on-chain programs, IDL and tests.
## Account model
![worcel accounts model](https://github.com/harsh4786/wordcel/blob/master/wordcel_accounts.png)
## The program is modular and can be used to create generic content not limited to written content.
1. Create a publication
To create a publication users have to create a profile, give a suitable name of their choice. The client calls the
[```initialize```](https://github.com/Wordcel/wordcel/blob/master/programs/wordcel/src/lib.rs#L26) ix of the on-chain program to create a profile account and initialize it with user data.
2. Create a post in a publication
The post is created after the content gets published on Arweave, the [```create_post```](https://github.com/Wordcel/wordcel/blob/master/programs/wordcel/src/lib.rs#L34) instruction is called which
creates the post account on-chain and stores the Arweave metadata URI.
3. Update a post in a publication. The client calls the [```update_post```](https://github.com/Wordcel/wordcel/blob/master/programs/wordcel/src/lib.rs#L59) ix to update the post. The program also allows users to comment on posts via the [```comment```](https://github.com/Wordcel/wordcel/blob/master/programs/wordcel/src/lib.rs#L68) instruction
4. Create a follow action with [```create_connection```](https://github.com/Wordcel/wordcel/blob/master/programs/wordcel/src/lib.rs#L86) instruction
5. Unfollow a user by closing the same above connection see [```close_connection```](https://github.com/Wordcel/wordcel/blob/master/programs/wordcel/src/lib.rs#L103)
The key feature of how posts are managed is the usage of random hashes. Random hashes are randomly generated on
the client side and these are used as seeds of the [```post account```](https://github.com/Wordcel/wordcel/blob/master/programs/wordcel/src/state.rs#L23) this allows for a profile account to be associated with n no. of posts as the random hashes are very less likely to collide.