{"id":31572188,"url":"https://github.com/rhodey/lock.host-node","last_synced_at":"2026-04-12T23:47:45.945Z","repository":{"id":305415558,"uuid":"1016299000","full_name":"rhodey/lock.host-node","owner":"rhodey","description":"Lock.host nodejs example","archived":false,"fork":false,"pushed_at":"2025-09-11T21:50:46.000Z","size":3302,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-21T23:58:18.970Z","etag":null,"topics":["crypto","enclave","ipfs"],"latest_commit_sha":null,"homepage":"https://lock.host","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhodey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-08T19:45:43.000Z","updated_at":"2025-09-11T21:50:49.000Z","dependencies_parsed_at":"2025-07-20T01:29:42.833Z","dependency_job_id":"a0ef3f22-4e77-4b9f-aad5-2aee715234a1","html_url":"https://github.com/rhodey/lock.host-node","commit_stats":null,"previous_names":["rhodey/lock.host-node"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rhodey/lock.host-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhodey%2Flock.host-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhodey%2Flock.host-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhodey%2Flock.host-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhodey%2Flock.host-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhodey","download_url":"https://codeload.github.com/rhodey/lock.host-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhodey%2Flock.host-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278464273,"owners_count":25991177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crypto","enclave","ipfs"],"created_at":"2025-10-05T13:49:50.470Z","updated_at":"2025-10-05T13:49:52.701Z","avatar_url":"https://github.com/rhodey.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lock.host-node\nLock.host nodejs example, see: [lock.host](https://github.com/rhodey/lock.host)\n\nThis demonstration uses OpenAI to control a Solana wallet:\n+ Unmodified OpenAI lib\n+ Unmodified Solana web3.js lib\n+ Hit /api/ask?message=your best joke\u0026addr=abc123\n+ OAI is asked \"You are to decide if a joke is funny or not\"\n+ If so 0.001 SOL is sent to addr\n\n## Build app\nThis is how PCR hashes are checked:\n```\njust serve-alpine\njust build-app\n...\n{\n  \"Measurements\": {\n    \"HashAlgorithm\": \"Sha384 { ... }\",\n    \"PCR0\": \"1dec12cc87b9bb44cf66cd770f3cddeb7fe62cd622034b6dfb3f9f4473e289a506bd585020d54b2350431f94fae38f2f\",\n    \"PCR1\": \"4b4d5b3661b3efc12920900c80e126e4ce783c522de6c02a2a5bf7af3a2b9327b86776f188e4be1c1c404a129dbda493\",\n    \"PCR2\": \"29c92b2d29637f1347332b18fef6bb149890ed8abeddaad81f6c8f5b51138bef5a962b019a8b569045569b00cb95ab7b\"\n  }\n}\n```\n\nSee that [run.yml](.github/workflows/run.yml) step \"PCR\" is testing that PCRs in this readme match the build\n\n## Prod\n+ In prod all TEE I/O passes through /dev/vsock\n+ Think of /dev/vsock as a file handle\n+ How to run:\n```\njust serve-alpine\njust build-app\ncp example.env .env\njust run-app\njust run-host\n```\n\n## Test\n+ In test a container emulates a TEE\n+ Uses two fifos /tmp/read /tmp/write to emulate vsock\n+ How to run:\n```\njust serve-alpine\njust build-test-app\ncp example.env .env\njust run-test-app\njust run-test-host\njust add-funds\njust ask-funds\n...\naddr = wJQASiSgaqVJBP8iQUpyTpNcpQinMWg17unrNTbbYoC\nsol = 0\njson = {\n  signatute: 'mHPgWppbhKujn8deozVGQurtpqPAcQ1nMg99uSmwmrmSp8m8GPRiXha36D2AJ42bNRzTG9xbhar1w7MRf2mUoLp',\n  from: 'AkHqQ324DvygPxuhyYs9BTVG8b1BXzTnpbCxqG8zousm',\n  to: 'wJQASiSgaqVJBP8iQUpyTpNcpQinMWg17unrNTbbYoC'\n}\nsol = 0.001\n```\n\n## Web\nThe webapp [IPFS-boot-choo](https://github.com/rhodey/IPFS-boot-choo) demonstrates lock.host in a client-to-server environment\n\nThe webapp when hitting dev (not prod) requires an HTTPS certificate to be installed with the OS\n\nThis is because of a combination of Lock.host using HTTP2 and IPFS-boot using a service worker\n\n+ just mkcert\n+ chrome \u003e settings \u003e privacy \u0026 security\n+ security \u003e manage certificates \u003e authorities\n+ import \u003e ca.crt\n\n## Apks\nModify apk/Dockerfile.fetch to include all apks then run:\n```\njust proxy-alpine\njust fetch-alpine\n```\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhodey%2Flock.host-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhodey%2Flock.host-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhodey%2Flock.host-node/lists"}