-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scaffold library, CLI program, and HTTP server
- Loading branch information
Showing
9 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: ci | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout DIDKit repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Checkout SSI library | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: spruceid/ssi | ||
token: ${{ secrets.GH_ACCESS_TOKEN_CEL }} | ||
|
||
- name: Cache Cargo registry and build artifacts | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml', '**.rs') }} | ||
restore-keys: | | ||
${{ runner.os }}-cargo- | ||
- name: Build | ||
run: cargo build --verbose --workspace | ||
|
||
- name: Test | ||
run: cargo test --verbose --workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/target | ||
Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[workspace] | ||
members = [ | ||
"http", | ||
"cli", | ||
"lib", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[package] | ||
name = "didkit-cli" | ||
version = "0.0.1" | ||
authors = ["Charles E. Lehner <[email protected]>"] | ||
edition = "2018" | ||
|
||
[dependencies] | ||
didkit = { path = "../lib" } | ||
structopt = "0.3" | ||
|
||
[[bin]] | ||
path = "src/main.rs" | ||
name = "didkit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
use structopt::StructOpt; | ||
|
||
#[derive(StructOpt, Debug)] | ||
enum DIDKit { | ||
// DID Functionality | ||
/// Create new DID Document. | ||
DIDCreate {}, | ||
/// Resolve a DID to a DID Document. | ||
DIDResolve {}, | ||
/// Dereference a DID URL to a resource. | ||
DIDDereference {}, | ||
/// Update a DID Document’s authentication. | ||
DIDUpdateAuthentication {}, | ||
/// Update a DID Document’s service endpoint(s). | ||
DIDUpdateServiceEndpoints {}, | ||
/// Deactivate a DID. | ||
DIDDeactivate {}, | ||
/// Create a Signed IETF JSON Patch to update a DID document. | ||
DIDPatch {}, | ||
|
||
// VC Functionality | ||
/// Issue Credential | ||
VCIssueCredential {}, | ||
/// Verify Credential | ||
VCVerifyCredential {}, | ||
/// Issue Presentation | ||
VCIssuePresentation {}, | ||
/// Verify Presentation | ||
VCVerifyPresentation {}, | ||
/// Revoke Credential | ||
VCRevokeCredential {}, | ||
|
||
// DIDComm Functionality (???) | ||
/// Discover a messaging endpoint from a DID which supports DIDComm. | ||
DIDCommDiscover {}, | ||
/// Send a DIDComm message. | ||
DIDCommSend {}, | ||
/// Receive a DIDComm message. | ||
DIDCommReceive {}, | ||
} | ||
|
||
fn main() { | ||
let opt = DIDKit::from_args(); | ||
println!("{:?}", opt); | ||
// TODO | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "didkit-http" | ||
version = "0.0.1" | ||
authors = ["Charles E. Lehner <[email protected]>"] | ||
edition = "2018" | ||
|
||
[dependencies] | ||
didkit = { path = "../lib" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main() { | ||
// TODO | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "didkit" | ||
version = "0.0.1" | ||
authors = ["Charles E. Lehner <[email protected]>"] | ||
edition = "2018" | ||
|
||
[dependencies] | ||
ssi = { path = "../../ssi" } |
Empty file.