Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: store verifiable credentials in cord blockchain #152

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions services/certificate-api/config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const CUSTOM_TEMPLATE_DELIMITERS = process.env.CUSTOM_TEMPLATE_DELIMITERS?.split(',') || "{{,}}".split(",")
export const CORD_CHAIN_ADDRESS = process.env.CORD_CHAIN_ADDRESS ?? 'ws://127.0.0.1:9944'
19 changes: 19 additions & 0 deletions services/certificate-api/config/keys.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export const publicKeyPem = process.env.CERTIFICATE_PUBLIC_KEY || '';
// eslint-disable-next-line max-len
export const privateKeyPem = process.env.CERTIFICATE_PRIVATE_KEY || '';
export const qrType = process.env.QR_TYPE || 'W3C-VC';
export const certDomainUrl = process.env.CERTIFICATE_DOMAIN_URL || "https://dev.sunbirded.org";
export const smsAuthKey = "";

export default {
publicKeyPem, privateKeyPem,
qrType,
certDomainUrl,
smsAuthKey
}

/*
// openssl genrsa -out key.pem; cat key.pem;
// openssl rsa -in key.pem -pubout -out pubkey.pem;
// cat pubkey.pem; rm key.pem pubkey.pem
*/
4 changes: 0 additions & 4 deletions services/certificate-api/configs/config.js

This file was deleted.

19 changes: 0 additions & 19 deletions services/certificate-api/configs/keys.js

This file was deleted.

4 changes: 2 additions & 2 deletions services/certificate-api/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const certificateController = require("./src/routes/certificate_controller");
const http = require('http');
import certificateController from "./src/routes/certificate_controller.js";
import http from 'http';
const port = process.env.PORT || 4321;

const server = http.createServer(async (req, res) => {
Expand Down
Loading