{"id":20004477,"url":"https://github.com/kalepail/passkey-kit","last_synced_at":"2025-05-04T16:32:30.968Z","repository":{"id":242011917,"uuid":"808446649","full_name":"kalepail/passkey-kit","owner":"kalepail","description":"TS SDK for creating and managing Stellar smart wallets","archived":false,"fork":false,"pushed_at":"2024-10-23T17:00:43.000Z","size":11234,"stargazers_count":13,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"next","last_synced_at":"2024-10-24T00:14:17.208Z","etag":null,"topics":["blockchain","crypto","passkey","secp256r1","smart","stellar","wallet"],"latest_commit_sha":null,"homepage":"https://passkey-kit-demo.pages.dev/","language":"TypeScript","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/kalepail.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}},"created_at":"2024-05-31T05:01:41.000Z","updated_at":"2024-10-12T15:32:25.000Z","dependencies_parsed_at":"2024-05-31T06:24:15.466Z","dependency_job_id":"b66a142e-bfaf-4c12-a626-d32aaeb23121","html_url":"https://github.com/kalepail/passkey-kit","commit_stats":null,"previous_names":["kalepail/passkey-kit"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalepail%2Fpasskey-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalepail%2Fpasskey-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalepail%2Fpasskey-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalepail%2Fpasskey-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kalepail","download_url":"https://codeload.github.com/kalepail/passkey-kit/tar.gz/refs/heads/next","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224398816,"owners_count":17304661,"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","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":["blockchain","crypto","passkey","secp256r1","smart","stellar","wallet"],"created_at":"2024-11-13T05:30:16.705Z","updated_at":"2025-05-04T16:32:30.953Z","avatar_url":"https://github.com/kalepail.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Passkey Kit\n\n\u003e [!WARNING]  \n\u003e Code in this repo is demo material only. It has not been audited. Do not use to hold, protect, or secure anything.\n\nPasskey kit is a basic TypeScript SDK for creating and managing Stellar smart wallets. It's intended to be used in tandem with [Launchtube](https://github.com/stellar/launchtube) for submitting passkey signed transactions onchain however this is not a requirement. This is both a client and a server side library. `PasskeyKit` on the client and `PasskeyServer` on the server.\n\nDemo site: [passkey-kit-demo.pages.dev](https://passkey-kit-demo.pages.dev/)\n\nTo get started first install the package:\n```\npnpm i passkey-kit\n```\n\nOn the client:\n```ts\nconst account = new PasskeyKit({\n    rpcUrl: env.PUBLIC_rpcUrl,\n    networkPassphrase: env.PUBLIC_networkPassphrase,\n    factoryContractId: env.PUBLIC_factoryContractId,\n});\n```\n\nOn the server:\n```ts\nconst account = new PasskeyServer({\n    rpcUrl: env.PUBLIC_rpcUrl,\n    launchtubeUrl: env.PUBLIC_launchtubeUrl,\n    launchtubeJwt: env.PRIVATE_launchtubeJwt,\n    mercuryUrl: env.PUBLIC_mercuryUrl,\n    mercuryJwt: env.PRIVATE_mercuryJwt,\n});\n```\n\nThis is a fully typed library so docs aren't provided, however there's a full example showcasing all the core public methods in the `./demo` directory. I also recommend reviewing the [Super Peach](https://github.com/kalepail/superpeach) repo for an example of how you could implement both the client and server side in a more real-world scenario.\n\nGood luck, have fun, and change the world!\n\nFor any questions or to showcase your progress please join the `#passkeys` channel on our [Discord](https://discord.gg/stellardev).\n\n## Deploy the event indexer\n\nIn order to utilize the Mercury Zephyr indexing service to track available signers and reverse lookup smart wallet contract addresses from passkey ids you'll need to deploy the Zephyr program from inside the `./zephyr` directory.\n\n```bash\ncd ./zephyr\ncargo install mercury-cli\n# Get a JWT from Mercury https://test.mercurydata.app\nexport MERCURY_JWT=\"\u003cYOUR.MERCURY.JWT\u003e\"\n# Make sure you're on Rust version 1.79.0 or newer\nmercury-cli --jwt $MERCURY_JWT --local false --mainnet false deploy\n```\n\n## TypeScript gotchas\n\nThis is a TypeScript library and the npm package doesn't export a JavaScript version. The `@stellar/stellar-sdk` library is enormous and I really don't wan't folks bundling it up twice. Therefore you'll need to ensure you're transpiling this library into your project and that goes for either a TS project or a JS one. For many of you this will \"just work\" but for others you'll need to do some fiddling.\n\nFor example if you're using NextJS this will mean modifying your `next.config.mjs` file to include the following packages in the `transpilePackages` key:\n```mjs\n/** @type {import('next').NextConfig} */\nconst nextConfig = {\n    transpilePackages: [\n        'passkey-kit', \n        'passkey-factory-sdk', \n        'passkey-kit-sdk',\n        'sac-sdk',\n    ]\n};\n\nexport default nextConfig;\n```\nIf someone smarter than me knows how to include an optional JS build from a TS library please submit a PR. I just don't want to deploy a compiled version of this and wind up having folks doubling up on an already gargantuan dependency.\n\n## Contributing \n\nPasskey kit consists of three primary directories:\n- `./src` - Contains the TypeScript files for the actual TS SDK library.\n- `./demo` - Contains a basic demo of the SDK in action.\n- `./contracts` - Contains the Rust Soroban smart contracts of the smart wallet implementation.\n- `./zephyr` - Contains the [Zephyr](https://www.mercurydata.app/products/zephyr-vm) program for processing smart wallet events.\n\nTo install dependencies:\n\n```bash\npnpm i\n```\n\nTo build:\n\n```bash\npnpm run build\n```\n\nTo run the demo:\n\n```bash\ncd ./demo\npnpm i\npnpm run start\n```\n\n\u003e [!IMPORTANT]\n\u003e If you fiddle with contracts in `./contracts` you'll need to run the make commands. Just remember to update the `SMART_WALLET_FACTORY` and `SMART_WALLET_WASM` values from the `make deploy` command before running `make init`.\n\n\u003e [!IMPORTANT]\n\u003e Keep in mind the bindings here in `./packages` have been _heavily_ modified. Be careful when rebuilding and updating. Likely you'll only want to update the `src/index.ts` files in each respective package vs swapping out entire directories.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalepail%2Fpasskey-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkalepail%2Fpasskey-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalepail%2Fpasskey-kit/lists"}