Skip to content

bitxenia/astrawiki-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Knowledge Repository

Descentralized, community driven alternative to Wikipedia. Implemented in Blockchain, IPFS, and Freenet.

Ecosystem interface

To implement the logic to connect, view and edit the repository in a specific ecosystem, a class with these functions should be implemented:

Article object

class Article {
  name: string,
  changelog: Change[],
}

Fetch an article

function fetchArticle(name: string): Promise<Article | null>;

Fetches an article given it's name, or null if the article doesn't exist.

Create an article

function addArticle(name: string): Promise<boolean>;

Adds empty article to repository, returns true if it was successful, false otherwise. An article name must be unique.

Edit an article

function editArticle(name: string, change: Change): Promise<boolean>;

Edits an article in a git style, where only the changes are passed to the method. TODO: standarize change declaration.

Ethereum Ecosystem

There is a directory with the solidity contracts used for this ecosystem. It needs to be provided with a Sepolia API key in the .env file (see .env.example) as well as the deployer wallet's private key.

To compile and deploy the smart contracts run the following:

npm run compile-contracts
npm run deploy-contracts

this will create the bytecode and ABI, once deployed it will also save the contract address in a file for later use in the application.

About

Frontend for Astrawiki

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •