{"id":32151459,"url":"https://github.com/boilertalk/keystore.swift","last_synced_at":"2026-02-21T03:02:27.393Z","repository":{"id":32685718,"uuid":"138932085","full_name":"Boilertalk/Keystore.swift","owner":"Boilertalk","description":"Ethereum and ETH2 (BLS) keystore creation / private key extraction for Swift","archived":false,"fork":false,"pushed_at":"2024-04-10T12:31:59.000Z","size":635,"stargazers_count":18,"open_issues_count":6,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-01-28T23:58:46.876Z","etag":null,"topics":["bls","eip2335","eth2","ethereum","keystore","swift","web3"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/Boilertalk.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-06-27T20:55:03.000Z","updated_at":"2025-11-26T23:20:01.000Z","dependencies_parsed_at":"2024-04-10T13:42:46.070Z","dependency_job_id":"be398bd4-d59e-482a-aa6d-2c6f5a375274","html_url":"https://github.com/Boilertalk/Keystore.swift","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.25,"last_synced_commit":"a48385e4ae9d83fd08e8b066584dd2c56ef3c9ad"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/Boilertalk/Keystore.swift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boilertalk%2FKeystore.swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boilertalk%2FKeystore.swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boilertalk%2FKeystore.swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boilertalk%2FKeystore.swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Boilertalk","download_url":"https://codeload.github.com/Boilertalk/Keystore.swift/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boilertalk%2FKeystore.swift/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29672261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T00:11:43.526Z","status":"online","status_checked_at":"2026-02-21T02:00:07.432Z","response_time":107,"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":["bls","eip2335","eth2","ethereum","keystore","swift","web3"],"created_at":"2025-10-21T10:45:28.576Z","updated_at":"2026-02-21T03:02:27.388Z","avatar_url":"https://github.com/Boilertalk.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://github.com/Boilertalk/Keystore.swift\"\u003e\n  \u003cimg src=\"https://crypto-bot-main.fra1.digitaloceanspaces.com/old/keystore-swift.svg\" width=\"100%\" height=\"256\"\u003e\n\u003c/a\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://travis-ci.com/Boilertalk/Keystore.swift\"\u003e\n    \u003cimg src=\"https://travis-ci.com/Boilertalk/Keystore.swift.svg?branch=master\" alt=\"CI Status\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://t.me/joinchat/BPk3DE6CTFaiOolSIZNLyg\"\u003e  \n    \u003cimg src=\"https://img.shields.io/badge/chat-on%20telegram-blue.svg?longCache=true\u0026style=flat\" alt=\"Telegram\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# :alembic: Keystore\n\nKeystore.swift makes it easy to extract private keys from Ethereum keystore files and generate keystore files from existing private keys.    \nThis library belongs to our Swift Crypto suite. For a pure Swift Ethereum Web3 library check out [Web3.swift](https://github.com/Boilertalk/Web3.swift)!\n\nThis library also supports EIP 2335 (BLS/ETH2) keystores.\n\n## Example\n\nCheck the usage below or look through the repositories tests.\n\n## Installation\n\nWe only support Swift Package Manager. Everything else is outdated.\n\n### Swift Package Manager\n\nKeystore is compatible with Swift Package Manager v5 (Swift 5 and above). Simply add it to the dependencies in your `Package.swift`.\n\n```Swift\ndependencies: [\n    .package(url: \"https://github.com/Boilertalk/Keystore.swift.git\", from: \"0.3.0\")\n]\n```\n\nAnd then add it to your target dependencies:\n\n```Swift\ntargets: [\n    .target(\n        name: \"MyProject\",\n        dependencies: [\n            .product(name: \"Keystore\", package: \"Keystore.swift\"),\n        ]),\n    .testTarget(\n        name: \"MyProjectTests\",\n        dependencies: [\"MyProject\"])\n]\n```\n\nAfter the installation you can import `Keystore` in your `.swift` files.\n\n```Swift\nimport Keystore\n```\n\n## Usage\n\n### ETH1 / Normal Keystore\n\nTo extract a private key from an existing keystore file, just do the following.\n\n```Swift\nimport Keystore\n\nlet decoder = JSONDecoder()\n\nlet keystoreData: Data = ... // Load keystore data from file?\nlet keystore = try decoder.decode(Keystore.self, from: keystoreData)\n\nlet password = \"your_super_secret_password\"\nlet privateKey = try keystore.privateKey(password: password)\n\nprint(privateKey)    // Your decrypted private key\n```\n\nAnd to generate a keystore file from an existing private key, your code should look a little bit like the following.\n\n```Swift\nlet privateKey: [UInt8] = ... // Get your private key as a byte array\n\nlet password = \"your_super_secret_password\"\nlet keystore = try Keystore(privateKey: privateKey, password: password)\n\nlet keystoreJson = try JSONEncoder().encode(keystore)\nprint(String(data: keystoreJson, encoding: .utf8))       // Your encrypted keystore as a json string\n```\n\n### ETH2 / BLS Keystore\n\nTo extract a private key from an existing keystore file, just do the following.\n\n```Swift\nimport Keystore\n\nlet decoder = JSONDecoder()\n\nlet keystoreData: Data = ... // Load keystore data from file?\nlet keystore = try decoder.decode(KeystoreETH2.self, from: keystoreData)\n\nlet password = \"your_super_secret_password\"\nlet privateKey = try keystore.privateKey(password: password)\n\nprint(privateKey)    // Your decrypted private key\n```\n\n## Author\n\nThe awesome guys at Boilertalk :alembic:    \n...and even more awesome members from the community :purple_heart:\n\nCheck out the [contributors list](https://github.com/Boilertalk/Keystore.swift/graphs/contributors) for a complete list.\n\n## License\n\nKeystore is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboilertalk%2Fkeystore.swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboilertalk%2Fkeystore.swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboilertalk%2Fkeystore.swift/lists"}