Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
moving vc to dwn server to tbd-examples (#53)
Browse files Browse the repository at this point in the history
* moving vc to dwn server to tbd-examples

* dont need this

---------

Co-authored-by: Rizel Scarlett <[email protected]>
  • Loading branch information
blackgirlbytes and Rizel Scarlett authored Aug 23, 2024
1 parent 7a21057 commit 18bd246
Show file tree
Hide file tree
Showing 49 changed files with 3,294 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build & Publish Docker Image

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main

env:
REGISTRY: ghcr.io


jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./Dockerfile
image: ghcr.io/tbd54566975/customer-vc-to-dwn

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ matrix.image }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
file: Dockerfile
push: true
target: ${{ matrix.target }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
1 change: 1 addition & 0 deletions javascript/vc-to-dwn-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
Binary file added javascript/vc-to-dwn-server/DATA/AGENT/000003.log
Binary file not shown.
1 change: 1 addition & 0 deletions javascript/vc-to-dwn-server/DATA/AGENT/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000002
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000002
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024/08/23-12:56:38.795553 16ed3f000 Delete type=3 #1
Binary file not shown.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000002
Empty file.
1 change: 1 addition & 0 deletions javascript/vc-to-dwn-server/DATA/AGENT/DWN_DATASTORE/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024/08/23-12:56:38.799439 16ed3f000 Delete type=3 #1
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000002
Empty file.
1 change: 1 addition & 0 deletions javascript/vc-to-dwn-server/DATA/AGENT/DWN_EVENTLOG/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024/08/23-12:56:38.802984 16ed3f000 Delete type=3 #1
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000002
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024/08/23-12:56:38.797511 170563000 Delete type=3 #1
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000002
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024/08/23-12:56:38.795543 170563000 Delete type=3 #1
Binary file not shown.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000002
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024/08/23-12:56:38.801223 170563000 Delete type=3 #1
Binary file not shown.
Empty file.
1 change: 1 addition & 0 deletions javascript/vc-to-dwn-server/DATA/AGENT/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024/08/23-12:56:38.805961 16f54b000 Delete type=3 #1
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions javascript/vc-to-dwn-server/DATA/AGENT/VAULT_STORE/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000002
Empty file.
1 change: 1 addition & 0 deletions javascript/vc-to-dwn-server/DATA/AGENT/VAULT_STORE/LOG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024/08/23-12:56:38.795540 16f54b000 Delete type=3 #1
Binary file not shown.
17 changes: 17 additions & 0 deletions javascript/vc-to-dwn-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:20-bookworm-slim

ARG COMMIT_HASH
ENV COMMIT_HASH=${COMMIT_HASH}

WORKDIR /vc-to-dwn-server

COPY package.json ./
RUN npm install

COPY . .

RUN npm install

EXPOSE 5001

CMD [ "npm", "run", "start" ]
38 changes: 38 additions & 0 deletions javascript/vc-to-dwn-server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Customer VC to DWN Server

## DIF/TBD Hackathon KCC Challege
This project implements a DWN server that facilitates the storage of Verifiable Credentials (VCs) in Decentralized Web Nodes (DWNs).

### Prerequisites

- Node.js (version 20 or higher recommended)
- npm (comes with Node.js)

### Installation

Clone the repository:
```bash
git clone https://github.com/TBD54566975/customer-vc-to-dwn
cd customer-vc-to-dwn
```

Install dependencies:
```bash
npm install
```

### Running the Server
Start the server with:
```bash
npm run start
```
The server will run on **http://localhost:5001** .

### Functionality
- Creates and manages Decentralized Identifiers (DIDs) for customer DWN
- Implements a protocol for storing and managing VCs in DWNs
- Store protocol on server
- Provides an authorization mechanism for issuers to store credentials in a customer's DWN
- Persists DIDs across server restarts


1 change: 1 addition & 0 deletions javascript/vc-to-dwn-server/did.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"did":"did:dht:rr1w5z9hdjtt76e6zmqmyyxc5cfnwjype6prz45m6z1qsbm8yjao"}
8 changes: 8 additions & 0 deletions javascript/vc-to-dwn-server/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '3'
services:
app:
build: .
ports:
- "5001:5001"
environment:
- NODE_ENV=production
Loading

0 comments on commit 18bd246

Please sign in to comment.