-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: poc tweaks to get running (needs tidy up) #1
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,13 @@ services: | |
dockerfile: ./packages/server/Dockerfile | ||
restart: unless-stopped | ||
environment: | ||
- ISSUER_OOBI=${ISSUER_OOBI} | ||
- ISSUER_PRE=${ISSUER_PRE} | ||
- ISSUER_REGK=${ISSUER_REGK} | ||
- KERIA_ENDPOINT=${KERIA_ENDPOINT:-http://keria:3901} | ||
- KERIA_BOOT_ENDPOINT=${KERIA_BOOT_ENDPOINT:-http://keria:3903} | ||
- ISSUER_OOBI=${ISSUER_OOBI:-http://t10n.guild1.com:3902/oobi/EN-JeVj67PgehbEBD8W7W5aRJ8FZ9D2_WTaIlb5UprRL/agent/EKn5dfFLpsnzOA-QRBBMJM6E0VuHjmRo5DDJYYx0lp9M} | ||
- ISSUER_PRE=${ISSUER_PRE:-EN-JeVj67PgehbEBD8W7W5aRJ8FZ9D2_WTaIlb5UprRL} | ||
- ISSUER_REGK=${ISSUER_REGK:-EEPQVQ6uMfF_aTHVXn8oo6DceQKkhNvIX9UulTg1Cx1G} | ||
- KERIA_ENDPOINT=${KERIA_ENDPOINT:-http://keria-g1:3901} | ||
- KERIA_BOOT_ENDPOINT=${KERIA_BOOT_ENDPOINT:-http://keria-g1:3903} | ||
ports: | ||
- 3000:3000 | ||
- 5632:3000 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. port changes just as these were already open on the machine, ignore.. |
||
volumes: | ||
- server-data:/app/data | ||
|
||
|
@@ -24,9 +24,14 @@ services: | |
dockerfile: ./packages/ui/Dockerfile | ||
restart: unless-stopped | ||
environment: | ||
- VITE_BACKEND_BASE_URL=${VITE_BACKEND_BASE_URL:-http://localhost:3000} | ||
- VITE_BACKEND_BASE_URL=${VITE_BACKEND_BASE_URL:-http://server:3000} | ||
ports: | ||
- 5173:80 | ||
- 5633:80 | ||
|
||
volumes: | ||
server-data: | ||
|
||
# networks: | ||
# default: | ||
# name: traefik | ||
# external: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,8 @@ async function getClient(): Promise<SignifyClient> { | |
|
||
// If already resolved, this is very fast | ||
await waitAndGetDoneOp(client, await client.oobis().resolve(config.issuerOobi)); | ||
await waitAndGetDoneOp(client, await client.oobis().resolve(`http://localhost:3000/oobi/${config.schemaSaid}`)); | ||
// await waitAndGetDoneOp(client, await client.oobis().resolve(`http://server:3000/oobi/${config.schemaSaid}`)); | ||
await waitAndGetDoneOp(client, await client.oobis().resolve(`http://t10n.guild1.com:3000/oobi/EA3NRCtGF0czMPeiG5-CWbgCnmcpBDpPo2mYlxoGkk0j`)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe was some issue in the production build overriding |
||
|
||
try { | ||
await client.registries().get(config.registryId); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ enum BLOCKFROST_ASSETS_URL { | |
PREVIEW = "https://preview.blockfrost.cf-systems.org" | ||
} | ||
|
||
const BACKEND_BASE_URL = import.meta.env.VITE_BACKEND_BASE_URL ?? "http://localhost:3000"; | ||
const BACKEND_BASE_URL = import.meta.env.VITE_BACKEND_BASE_URL ?? "http://dev.keria.cf-keripy.metadata.dev.cf-deployments.org:5632"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. Whatever the case this should be the URL of the |
||
const POLICY_ID = import.meta.env.VITE_POLICY_ID ?? "d441227553a0f1a965fee7d60a0f724b368dd1bddbc208730fccebcf"; | ||
|
||
async function fetchBlockfrost(path: string) { | ||
|
@@ -21,16 +21,17 @@ async function fetchBlockfrost(path: string) { | |
} | ||
|
||
async function verifyACDC(vci: string, iss: string) { | ||
const credential = await fetch(`${BACKEND_BASE_URL}/credentials/${vci}`).catch(error => { | ||
console.error(error); // @TODO - check for actual 404 or re-throw | ||
}); | ||
// const credential = await fetch(`${BACKEND_BASE_URL}/credentials/${vci}`).catch(error => { | ||
// console.error(error); // @TODO - check for actual 404 or re-throw | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idea here was to check if it exists already and just return it if so, but fetch throws an error for 404 so I just commented it out. Would be easy to adjust. |
||
// }); | ||
|
||
if (!credential) return; | ||
// if (!credential) return; | ||
|
||
// @TODO - foconnor: If exists, re-query if not revoked. Revocation not in scope for PoC. | ||
if (credential.ok) { | ||
return await credential.json(); | ||
} | ||
//if (credential.ok) { | ||
// return await credential.json(); | ||
//} | ||
if (vci !== "EDlZ9u5_yGUiXWyNx2Tp-N4SXj5oRxF6KL8c3gMP7XbR") return; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this ACDC is from an old version. Maybe this change can be reverted, from memory I think it was just noise in the logs when I was debugging the final issues. |
||
|
||
const response = await fetch(`${BACKEND_BASE_URL}/credentials/verify`, { | ||
method: "POST", | ||
|
@@ -64,7 +65,7 @@ export function App() { | |
if (acdcMetadata.claimACDCSaid && acdcMetadata.claimIssSaid) { | ||
const result = await verifyACDC(acdcMetadata.claimACDCSaid, acdcMetadata.claimIssSaid); | ||
if (result) { | ||
setCredentials([...credentials, { data: result.sad, txid: historyItem.tx_hash }]); | ||
setCredentials([...credentials, { data: result, txid: historyItem.tx_hash }]); | ||
} | ||
} | ||
} | ||
|
@@ -77,7 +78,7 @@ export function App() { | |
fetchACDCs(); | ||
} | ||
}, [isConnected]); | ||
|
||
return ( | ||
<> | ||
<ConnectWalletButton | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me
keria-g1
is on the same traefik network (commented out below). This should becardanofoundation/cf-idw-keria:keria-3c72a12c8e8fea354b603d8406b31f6bab860a11
.It doesn't need to be the same one as the issuer, whichever works.