Skip to content

Commit e6e015f

Browse files
yathishramdevpavan04koshikraj
authored
Documentation for Core APIs (#17)
* adds docstrings for core apis * adds document generation * fixes minor issues * adds main documentation * updates docs and GitHub workflow Co-authored-by: devpavan04 <pavanvsoratur@gmail.com> Co-authored-by: Koshik Raj <koshik.raj@gmail.com>
1 parent f86ad46 commit e6e015f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+4183
-27843
lines changed

.github/workflows/docs.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
9+
jobs:
10+
checks:
11+
if: github.event_name != 'push'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: '12.x'
18+
run: |
19+
npm install
20+
npm run build:docs
21+
gh-release:
22+
if: github.event_name != 'pull_request'
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v1
26+
- uses: actions/setup-node@v1
27+
with:
28+
node-version: '12.x'
29+
- name: Add key to allow access to repository
30+
env:
31+
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
32+
run: |
33+
mkdir -p ~/.ssh
34+
ssh-keyscan github.com >> ~/.ssh/known_hosts
35+
echo "${{ secrets.DOCS_DEPLOY }}" > ~/.ssh/id_rsa
36+
chmod 600 ~/.ssh/id_rsa
37+
cat <<EOT >> ~/.ssh/config
38+
Host github.com
39+
HostName github.com
40+
IdentityFile ~/.ssh/id_rsa
41+
EOT
42+
- name: Release to GitHub Pages
43+
env:
44+
USE_SSH: true
45+
GIT_USER: git
46+
run: |
47+
git config --global user.email "koshik.raj@gmail.com"
48+
git config --global user.name "koshikraj"
49+
npm install
50+
npm run deploy:docs

README.md

+38-37
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,70 @@
11
# Safient Core SDK
2-
JavaScript SDK to manage and interact with the safes on Safient protocol.
32

3+
JavaScript SDK to manage and interact with the safes on Safient protocol.
44

5-
![logo](./logo.png)
5+
<!-- ![logo](./logo.png) -->
66

77
Trustless crypto asset safe and inheritance protocol
88

9+
## Getting started
910

10-
11-
## About Safient
12-
Digital crypto assets are the talk of the town and gaining traction rapidly among all kinds of individuals and organizations. Due to the higher traction, these assets are highly valuable. So, one has to make sure that their assets are safe and sound.
13-
14-
Owning and securing the digital crypto-asset unlike other digital assets can be challenging due to the self-sovereign nature of the ownership. It means that the owner is the only safe keeper of the assets. For many users, this might be an intimidating role as they don't want to completely responsible for preserving the assets against attacks and natural disasters. Every user always desires a trusted recovery method in case of tragedies. But there is no standardized way to easily and securely back up and recover the assets.
15-
16-
Safex promises to securely and conveniently store any critical information that is needed to access and recover the assets in case of any tragic events. Safex also provides a trustless yet safe way to transfer and inherit the assets by close ones whenever such an unfortunate scenario occurs.
17-
18-
Safex uses decentralized storage, smart contracts, and cryptography techniques to build a protocol that helps to store, recover, inherit crypto assets and other confidential information. In essence, you can think of Safex as your trusted guardian even though it is completely trustless.
19-
20-
21-
## Technologies used:
22-
* [Ceramic IDX](https://idx.xyz/)
23-
* [Textile ThreadDb](https://docs.textile.io/threads/)
24-
11+
```bash
12+
npm i @safient/core
13+
```
2514

2615

27-
## Getting Started
16+
## Local installation
2817

2918
```bash
3019
git clone https://github.com/safient/safient-core.git
3120
cd safient-core
3221
npm install
22+
npm run build
3323
```
3424

3525
## Running Tests
3626

3727
Create an `.env` file in the `middleware` and `root` folder with `USER_API_KEY`, `USER_API_SECRET` and `DB_FILE_NAME='./thread.config'`
38-
##### Terminal 1
39-
40-
* Need ts compiled dist folder to run tests
41-
```bash
42-
npx tsc -w
43-
```
4428

45-
##### Terminal 2
4629

4730
```bash
4831
cd ..
4932
npm run test
5033
```
5134

35+
## Building docs
36+
37+
Update the docs markdown
38+
39+
```
40+
npm run build:docs
41+
```
42+
43+
Run the docusaurus website locally
44+
45+
```
46+
npm run serve:docs
47+
```
48+
49+
## Technologies used:
50+
51+
- [Ceramic IDX](https://idx.xyz/)
52+
- [Textile ThreadDb](https://docs.textile.io/threads/)
53+
5254
## Contributing
5355

5456
You are welcome to submit issues and enhancement requests and work on any of the existing issues. Follow this simple guide to contribute to the repository.
5557

56-
1. **Create** or pick an existing issue to work on
57-
2. **Fork** the repo on GitHub
58-
3. **Clone** the forked project to your own machine
59-
4. **Commit** changes to your own branch
60-
5. **Push** your work back up to your forked repo
61-
6. Submit a **Pull request** from the forked repo to our repo so that we can review your changes
62-
58+
1. **Create** or pick an existing issue to work on
59+
2. **Fork** the repo on GitHub
60+
3. **Clone** the forked project to your own machine
61+
4. **Commit** changes to your own branch
62+
5. **Push** your work back up to your forked repo
63+
6. Submit a **Pull request** from the forked repo to our repo so that we can review your changes
6364

64-
## Resources:
65+
## Resources:
6566

66-
* [Website](https://safient.co)
67-
* [Web App](https://app.safient.co)
68-
* [Twitter](https://twitter.con/safientio)
69-
* [Discord](https://discord.safient.io)
67+
- [Website](https://safient.io)
68+
- [Web App](https://app.safient.io)
69+
- [Twitter](https://twitter.con/safientio)
70+
- [Discord](https://discord.safient.io)

docs/.gitignore

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Dependencies
2+
/node_modules
3+
package-lock.json
4+
5+
# Production
6+
/build
7+
8+
# Generated files
9+
.docusaurus
10+
.cache-loader
11+
/docs/api
12+
13+
# Misc
14+
.DS_Store
15+
.env.local
16+
.env.development.local
17+
.env.test.local
18+
.env.production.local
19+
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*

docs/babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

docs/config.json

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"index_name": "safient_DOCS",
3+
"sitemap_urls": ["http://192.168.0.6.3000/sitemap.xml"],
4+
"sitemap_alternate_links": true,
5+
"stop_urls": [],
6+
"selectors": {
7+
"lvl0": {
8+
"selector": "(//ul[contains(@class,'menu__list')]//a[contains(@class, 'menu__link menu__link--sublist menu__link--active')]/text() | //nav[contains(@class, 'navbar')]//a[contains(@class, 'navbar__link--active')]/text())[last()]",
9+
"type": "xpath",
10+
"global": true,
11+
"default_value": "Documentation"
12+
},
13+
"lvl1": "header h1",
14+
"lvl2": "article h2",
15+
"lvl3": "article h3",
16+
"lvl4": "article h4",
17+
"lvl5": "article h5, article td:first-child",
18+
"lvl6": "article h6",
19+
"text": "article p, article li, article td:last-child"
20+
},
21+
"strip_chars": " .,;:#",
22+
"custom_settings": {
23+
"separatorsToIndex": "_",
24+
"attributesForFaceting": ["language", "version", "type", "docusaurus_tag"],
25+
"attributesToRetrieve": ["hierarchy", "content", "anchor", "url", "url_without_anchor", "type"]
26+
},
27+
"conversation_id": ["833762294"],
28+
"nb_hits": 16653
29+
}

docs/docs/core-getting-started.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
id: "core-getting-started"
3+
title: "Safient Core"
4+
sidebar_label: "Getting started"
5+
custom_edit_url: null
6+
---
7+
8+
9+
JavaScript SDK to manage and interact with the safes on Safient protocol.
10+
11+
12+
## Getting started
13+
14+
```bash
15+
npm i @safient/core
16+
```
17+
18+
19+
## Local installation
20+
21+
```bash
22+
git clone https://github.com/safient/safient-core.git
23+
cd safient-core
24+
npm install
25+
npm run build
26+
```
27+
28+
## Running Tests
29+
30+
Create an `.env` file in the `middleware` and `root` folder with `USER_API_KEY`, `USER_API_SECRET` and `DB_FILE_NAME='./thread.config'`
31+
32+
33+
```bash
34+
cd ..
35+
npm run test
36+
```

docs/docs/dev-overview.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
keywords:
3+
- digital assets
4+
- self-sovereign
5+
- Crypto Inheritance
6+
- decentralized storage
7+
- trustless mechanism
8+
description: Safient promises to securely and conveniently store any critical information that is needed to access and recover the assets in case of any tragic events. Safient also provides a trustless yet safe way to transfer and inherit the assets by close ones whenever such an unfortunate scenario occurs
9+
image: https://twitter.com/safientio/photo
10+
website: https://safient.io/
11+
app: https://safient.io/
12+
github: https://github.com/safient
13+
twitter: https://twitter.com/safientio
14+
npm: https://www.npmjs.com/package/@safient/core
15+
---
16+
17+
# Overview
18+
19+
Safient developers guide will help you understand the various implementations.
20+
21+
## Where to begin?
22+
23+
You can start by checking out our applications to understand the implementation.
24+
If you are looking to integrate with Safient protocol, checkout our SDKs.
25+
26+
- [Safient Core](./core-getting-started)
27+
- [Safient Contracts](https://contracts.safient.io/)

docs/docs/overview.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
sidebar_position: 1
3+
slug: /
4+
keywords:
5+
- digital assets
6+
- self-sovereign
7+
- Crypto Inheritance
8+
- decentralized storage
9+
- trustless mechanism
10+
description: Safient promises to securely and conveniently store any critical information that is needed to access and recover the assets in case of any tragic events. Safient also provides a trustless yet safe way to transfer and inherit the assets by close ones whenever such an unfortunate scenario occurs
11+
image: https://twitter.com/safientio/photo
12+
website: https://safient.io/
13+
app: https://safient.io/
14+
github: https://github.com/safient
15+
twitter: https://twitter.com/safientio
16+
npm: https://www.npmjs.com/package/@safient/core
17+
---
18+
19+
# Overview
20+
21+
Welcome to the Safient protocol documentation.
22+
23+
:::note what is Safient?
24+
25+
Safient aims to provide a convenient and safe way of inheriting and safekeeping mechanism for crypto assets without exposing it to any intermediaries.
26+
27+
:::
28+
29+
### Where to begin?
30+
31+
This documentation covers all the basic and advanced concepts of Safient protocol.
32+
33+
You can checkout the Developers section if you want to understand the Safient implentation or use Safient SDKs.
34+
35+
- [Safient basics](./safient-basics/basics)
36+
- [Safient for developers](getting-started)
37+
38+
### Other resources
39+
40+
You can checkout the detailed roadmap and resources at [https://resources.safient.io](https://resources.safient.io)

docs/docs/roadmap.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
sidebar_position: 5
3+
---
4+
5+
# Roadmap
6+
7+
Checkout these links for detailed roadmap and activities:
8+
9+
* [Development activities](https://resources.safient.io/51c88c11c4fa4152bc93f07320307c34?v=36efaa4d323c4f44bb669d690f221f97)
10+
* [Rlease plans](https://resources.safient.io/99930cb88b8a4d0887cc8aafc55a76ce?v=56b9338e23a0481a8abc8c71b88b6f67)
11+
12+
## 2020 - Q4
13+
### Safient concept ideation 💡
14+
15+
- We began our user research for the problem and solution that we deviced for crypto asset inheritance.
16+
- Evaluated the technical and economical feasibility of the solution
17+
18+
## 2021 - FEB
19+
### Genesis of a sister product of Safient at ETHDenver 🚀
20+
21+
We built a confidential portfolio sharing application ([Portex](https://portex.xyz)) at [ETHDenver 2021](https://devfolio.co/submissions/portex-7c58) to validate the technical feasibility. Portex gained a lot of traction for the implementation and was recognized as one of the top 20 hacks 🎊 .
22+
23+
## 2021 - APRIL
24+
### Safient design and prototype ✨
25+
26+
Taking all the feedbacks from our hackathon project, we started to design and prototype the solution for Safient. We planned all the features, integrations and layed our architecture for our initial implementation.
27+
28+
## 2021 - Q3
29+
### Private beta release 🧪
30+
31+
Closed beta release for the community. Features include:
32+
- Secret sharing mechanism using guardians
33+
- Filecoin integration for durable safes
34+
- Inheritance claims using Kleros
35+
- Identity management for users
36+
37+
## 2021 - Q4
38+
### Beta release for the community 🚀
39+
40+
Features include:
41+
- Well tested and audited contracts for inheritance claims
42+
- Well tested secret sharing with optimised incentivization mechanism
43+
44+
## 2022 - Q1
45+
### Audit and Mainnet release 🚀
46+
47+
Features include:
48+
- Safient will undergo bug bounty program and security audit before the mainnet release
49+
50+
51+
52+
53+
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "Getting to know Safient",
3+
"position": 2
4+
}

0 commit comments

Comments
 (0)