Skip to content

Commit

Permalink
Documentation updates: Services, Profiles (#27)
Browse files Browse the repository at this point in the history
* Add sdk concepts and individual services

* Insert record PH

* Additional search documentation

* Separate docs in folders

* Profiles section

* Profile data format

* Add configuration docs for CLI and SDK

* Add plugins

* Separate concepts

* Create wallet docs

* Add faq. Reorganize top level links

* Provider Service - Onboarding

* Change typescript

* Installation docs

* Available languages

* issue credential + insert item

* Remove PR trigger

* Typo

* Cleanup README

* Create proof doc

* Verify proof + data exchange

* SDK clarify

* Add PR review comment

Co-authored-by: Tomislav Markovski <tomislav@trinsic.id>
  • Loading branch information
tmarkovski and tmarkovski committed Jun 2, 2021
1 parent 20611b9 commit fb9517e
Show file tree
Hide file tree
Showing 17 changed files with 650 additions and 209 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/add-pr-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PR Review Bot

on:
pull_request:
types: [opened]
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: mshick/add-pr-comment@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: |
This PR can be [reviewed in Gitpod](https://gitpod.io/#${{ github.event.pull_request.html_url }})
allow-repeats: false
11 changes: 5 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Docs: Build
name: Build Documentation

on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -14,6 +13,6 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install git+https://${{secrets.MKDOCS_INSIDERS_TOKEN}}@github.com/squidfunk/mkdocs-material-insiders.git
- run: pip install git+https://${{ secrets.MKDOCS_INSIDERS_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git
- run: mkdocs gh-deploy --site-dir ./docs-site --force

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -342,4 +342,5 @@ Cargo.lock
**/*.rs.bk
.DS_Store

.ionide
.ionide
docs-site/
56 changes: 4 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,17 @@


# Trinsic SDK

[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/trinsic-id/sdk)
[![NET](https://github.com/trinsic-id/sdk/actions/workflows/dotnet.yml/badge.svg)](https://github.com/trinsic-id/sdk/actions/workflows/dotnet.yml)
[![Rust](https://github.com/trinsic-id/sdk/actions/workflows/rust.yml/badge.svg)](https://github.com/trinsic-id/sdk/actions/workflows/rust.yml)
[![Node](https://github.com/trinsic-id/sdk/actions/workflows/node.yml/badge.svg)](https://github.com/trinsic-id/sdk/actions/workflows/node.yml)

**Only available for beta customers at this time**

- .NET
- TS/WASM
- Rust CLI

dotnet/

nodejs/

cli/

# High Level Features

- Connect to Trinsic Platform v2 Service
- Generate Proto for each platform
- Write wrappers for each calls
- Use DIDComm v2 features for key/transport management
- Sign, Pack/Unpack
- Generate ED keys

# CLI

The cli is built with a rust gRPC library named [tonic](https://github.com/hyperium/tonic)

# npm
protoc --proto_path=../proto --js_out=library=trinsic,binary:./ ../proto/IssuerService.proto
## gitpod
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/trinsic-id/sdk)
- TypeScript
- Command Line

## Working with submodules
Immediately after cloning, do `git submodule update --init --recursive`

## Documentation
We're using [mkdocs](https://www.mkdocs.org/) with [`mkdocs-material`](https://squidfunk.github.io/mkdocs-material/).
*Dependancies*:
- the gitpod environment is already set up with everything need to generate the documentation site.
- Install mkdocs using a package manager: https://www.mkdocs.org/#installation
- Install mkdocs-material with`pip`: https://squidfunk.github.io/mkdocs-material/getting-started/#installation

**Running Locally**:
- Just `mkdocs serve` in this repo's root is all you need.

**Editing**:
The docs are easy to edit. Find the `nav` tag in [./mkdocs.yml](.mkdocs.yml) file to change the side bar.

Write markdown in the `docs` folder. You can use normal markdown, html, or any of our theme's features - [Reference](https://squidfunk.github.io/mkdocs-material-insiders/reference/abbreviations/)

**Build and deploy**
When finished editing, just make a PR.
They'll be built and deployed automatically using the [`docs.yml`](./.github/workflows/docs.yml)
Docs can be viewed here: https://trinsic-id.github.io/sdk
Immediately after cloning, do `git submodule update --init --recursive` to initialize and update all dependent submodules.

** Using Insiders Features on Local env (For Trinsineers) **
- ping @michaeldboyd for shared secret
- run `pip install git+https://<SHARED_SECRET}>@github.com/squidfunk/mkdocs-material-insiders.git`
- use any features included in the [reference guide](https://squidfunk.github.io/mkdocs-material/reference/abbreviations/) with tag `insiders only`
15 changes: 10 additions & 5 deletions cli/src/cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,9 @@ subcommands:
- type:
long: type
value_name: STRING
help: Item type
help: (Optional) Item type
takes_value: true
required: false
- item:
long: item
value_name: FILE
Expand Down Expand Up @@ -253,28 +254,32 @@ subcommands:
args:
- reveal-document:
long: reveal-document
value_name: STRING
value_name: JSONLD_FRAME_FILE
help: Document
takes_value: true
required: true
- document-id:
long: document-id
value_name: STRING
help: Document id
takes_value: true
required: true
- out:
long: out
value_name: FILE
value_name: OUTPUT_FILE
help: output location for created_proof
takes_value: true
required: true
- verify-proof:
about: Verify a proof
version: "0.1"
args:
- proof-document:
long: proof-document
value_name: STRING
help: Document
value_name: JSONLD_FILE
help: Input Document
takes_value: true
required: true
- authentication:
about: Authentication service
version: "0.1"
Expand Down
4 changes: 2 additions & 2 deletions cli/src/services/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ use crate::parser::config::{Command, ProfileArgs, ServerArgs};

pub(crate) static DEFAULT_SERVER_ADDRESS: &str = "http://localhost:5000/";
#[cfg(not(test))]
pub static CONFIG_FILENAME: &str = "okapi.toml";
pub static CONFIG_FILENAME: &str = "config.toml";
#[cfg(test)]
pub static CONFIG_FILENAME: &str = "okapi.test.toml";
pub static CONFIG_FILENAME: &str = "config.test.toml";

#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
pub(crate) struct Config {
Expand Down
31 changes: 31 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Documentation

We're using [mkdocs](https://www.mkdocs.org/) with [`mkdocs-material`](https://squidfunk.github.io/mkdocs-material/).

### Dependencies

- the gitpod environment is already set up with everything need to generate the documentation site.
- Install mkdocs using a package manager: https://www.mkdocs.org/#installation
- Install mkdocs-material with `pip`: https://squidfunk.github.io/mkdocs-material/getting-started/#installation

### Running locally

Type `mkdocs serve` in this repo's root. The command will start a server at http://127.0.0.0:5000/ with automatic refresh.

### Editing

The docs are easy to edit. Find the `nav` tag in [./mkdocs.yml](.mkdocs.yml) file to change the side bar.

Write markdown in the `docs` folder. You can use normal markdown, html, or any of our theme's features - [Reference](https://squidfunk.github.io/mkdocs-material-insiders/reference/abbreviations/)

### Build and deploy

When finished editing, just make a PR.
They'll be built and deployed automatically using the [`docs.yml`](./.github/workflows/docs.yml)
Docs can be viewed here: https://trinsic-id.github.io/sdk

### Using Insiders Features on Local env (For Trinsineers)

- ping @michaeldboyd for shared secret
- run `pip install git+https://<SHARED_SECRET>@github.com/squidfunk/mkdocs-material-insiders.git`
- use any features included in the [reference guide](https://squidfunk.github.io/mkdocs-material/reference/abbreviations/) with tag `insiders only`
10 changes: 6 additions & 4 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@

## What are Linked Data Proofs?

## What are Zero Knowledge Proofs?

## What are Verifiable Credentials? (mdb)

## What are Decentralized Identifiers? (mdb)

## How should I manage my keys?
## How should I manage my keys?

## How do the signatures and verifications work?
## How do the signatures and verifications work?

## How is the data securely stored?
## How is the data securely stored?

## How is data securely exchanged?

## What's the performance here? Load test results?
## What's the performance here? Load test results?

## What are some good use cases for this tech? (mdb)

Expand Down
110 changes: 0 additions & 110 deletions docs/reference.md

This file was deleted.

Loading

0 comments on commit fb9517e

Please sign in to comment.