{"id":34525182,"url":"https://github.com/kiva/aries-key-guardian","last_synced_at":"2025-12-24T05:07:43.383Z","repository":{"id":39583135,"uuid":"274476850","full_name":"kiva/aries-key-guardian","owner":"kiva","description":"Interoperable key guardian and recovery system for self sovereign identity wallets","archived":false,"fork":false,"pushed_at":"2023-02-11T13:38:03.000Z","size":2552,"stargazers_count":2,"open_issues_count":8,"forks_count":3,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-04-13T09:17:38.052Z","etag":null,"topics":["protocol","protocol-backend"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.txt","support":null}},"created_at":"2020-06-23T18:13:00.000Z","updated_at":"2022-01-14T20:18:05.000Z","dependencies_parsed_at":"2023-02-18T05:31:33.338Z","dependency_job_id":null,"html_url":"https://github.com/kiva/aries-key-guardian","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":"mac-arrap/sample-os-standard-repo","purl":"pkg:github/kiva/aries-key-guardian","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiva%2Faries-key-guardian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiva%2Faries-key-guardian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiva%2Faries-key-guardian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiva%2Faries-key-guardian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiva","download_url":"https://codeload.github.com/kiva/aries-key-guardian/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiva%2Faries-key-guardian/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27995843,"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-12-24T02:00:07.193Z","response_time":83,"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":["protocol","protocol-backend"],"created_at":"2025-12-24T05:07:41.045Z","updated_at":"2025-12-24T05:07:43.371Z","avatar_url":"https://github.com/kiva.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aries-key-guardian\n\nInteroperable key guardian and recovery system for self sovereign identity wallets\n\n\n### Setup\n\n1. Copy the contents of dummy.env into a .env file at the top level of the `aries-key-guardian` repo. You can either do\n   this manually, or you can run the provided script from the top level of the `aries-key-guardian` repo:\n   ```\n   ./scripts/useDummyEnv.sh\n   ```\n2. Start up the agency-network from aries-guardianship-agency repo.\n   ```\n   npm install\n   docker-compose up\n   ```\n\n#### Just-in-Time Wallets\n\n\"Just-in-Time Wallets\" refers to the ability to create a wallet for a given ID if one is missing. While you can always\ndo this by hitting the /v1/escrow/create route, you might also want this to happen automatically if you instead hit the\n/v1/escrow/verify route and discover that you don't have a wallet to verify access to.\n\nTo enable Just-in-Time Wallets, you need to set 2 environment variables:\n1. `JIT_WALLETS_ENABLED` should be set to `true`. This enabled the Just-in-Time wallet flow.\n2. `INTEGRATION_CONTROLLER` should be set to the address of the Controller which is responsible for coordinating access\n   to the guardianship system. This controller is expected to have a `/v1/api/onboard` route which accepts a base ID and\n   returns the ID of the agent that was created. This route should be responsible for coordinating the onboarding of new\n   users of the system. Typically, this means creating a new wallet, configuring an access mechanism, and issuing a \n   credential to that new wallet. As an example, it might be set to `\"http://kiva-controller:8081\"`.\n\nYou can set these environment variables locally in your generated .env file, using kubernetes secrets, or in whichever\nmanner works best for your deployment.\n\n### Testing\n\nTo run tests, you can either run them from inside a docker container or locally from your Mac.\n1. To run them from a docker-container:\n   ```\n   docker exec -it aries-key-guardian npm run test\n   ```\n2. To run them locally from your Mac:\n   ```\n   npm run test\n   ```\n\n\n### DB Migrations\n\nFor more details about TypeORM migrations, take a look at [their documentation](https://github.com/typeorm/typeorm/blob/master/docs/migrations.md).\n\nTo create a new database migration, run the following command from the top level of the `aries-key-guardian` repo:\n   ```\n   npm run typeorm:migration NameOfNewMigration\n   ```\n\nThis will create a new typescript class in the `src/migration` folder that concatenates the timestamp of when you ran\nthe migration and the name you provided. For example, `src/migration/1610566582191-CreateTables.ts` contains a class\ncalled `CreateTables1610566582191`.\n\nNote that the timestamp is meaningful and important as the relative timestamps of the migrations determines the order in\nwhich they are run. So please actually use this npm command to generate migrations instead of crafting them by hand.\n\nIn this class, there's an empty `up(queryRunner: QueryRunner)` and `down(queryRunner: QueryRunner)` function for you to\ncomplete.\n * `up(queryRunner: QueryRunner)` is the code that will be executed when the migration is run\n * `down(queryRunner: QueryRunner)` is the code that will be executed if we need to rollback the migration\n\nAs a matter of style, we strongly prefer migrations to be written in sql. That means using `queryRunner.query(...)`\ninstead of TypeORM's query runner api. This gives us a lot more control and certainty over what actually runs on the db.\n\n#### Developing Migrations\n\nThe process or writing and testing migrations can be a little tedious if you have to create a new docker image every\ntime you make a minor change to the migration file. To that end, it's recommended to spin up `docker-compose.yml`,\nadd an entry for escrow-db to your `etc/hosts`, and run the service locally. Every time you run the service locally, it\nwill attempt to apply your migration.\n\nThe Process:\n1. Edit `etc/hosts` to contain the following lines:\n   ```\n   127.0.0.1       escrow-db\n   ::1             escrow-db\n   ```\n2. Comment everything above `# ----------LOCAL MODE----------` and uncomment everything below that same line in `docker-compose.yml`\n3. Spin up the local docker-compose: `docker-compose -f docker-compose.yml up --force-recreate`\n4. Author/Edit your migration.\n5. Build your migration: `npm run build`\n6. Test out your migration: `npm run start:debug`\n\nIf you see any errors or the migration doesn't do what you expect, go back to step 4. Rinse, repeat.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiva%2Faries-key-guardian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiva%2Faries-key-guardian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiva%2Faries-key-guardian/lists"}