{"id":50948131,"url":"https://github.com/poyea/crypto-signer","last_synced_at":"2026-06-17T22:31:10.842Z","repository":{"id":347472896,"uuid":"1194158227","full_name":"poyea/crypto-signer","owner":"poyea","description":"🤑 High-performance, low-latency, lightweight multi-chain signing primitives in Rust","archived":false,"fork":false,"pushed_at":"2026-03-28T04:00:26.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-28T08:30:00.876Z","etag":null,"topics":["bitcoin","btc","crypto","cryptocurrency","eip712","eth","ethereum","multichain","solana"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/poyea.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-28T01:45:17.000Z","updated_at":"2026-03-28T04:04:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/poyea/crypto-signer","commit_stats":null,"previous_names":["poyea/crypto-signer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/poyea/crypto-signer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Fcrypto-signer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Fcrypto-signer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Fcrypto-signer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Fcrypto-signer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poyea","download_url":"https://codeload.github.com/poyea/crypto-signer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Fcrypto-signer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34468766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"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":["bitcoin","btc","crypto","cryptocurrency","eip712","eth","ethereum","multichain","solana"],"created_at":"2026-06-17T22:31:09.866Z","updated_at":"2026-06-17T22:31:10.837Z","avatar_url":"https://github.com/poyea.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crypto-signer\n\n[![CI](https://github.com/poyea/crypto-signer/actions/workflows/ci.yml/badge.svg)](https://github.com/poyea/crypto-signer/actions/workflows/ci.yml)\n[![Coverage \u003e= 90%](https://img.shields.io/badge/coverage-%3E%3D90%25-brightgreen)](https://github.com/poyea/crypto-signer/actions/workflows/ci.yml)\n[![Crates.io](https://img.shields.io/crates/v/crypto-signer)](https://crates.io/crates/crypto-signer)\n[![docs.rs](https://img.shields.io/docsrs/crypto-signer)](https://docs.rs/crypto-signer)\n[![Rust 1.94+](https://img.shields.io/badge/rust-1.94%2B-orange)](https://www.rust-lang.org)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue)](https://github.com/poyea/crypto-signer/blob/main/LICENSE)\n\nHigh-performance, low-latency, lightweight multi-chain signing primitives in Rust.\n\n## Feature Flags\n\n- `evm`: EIP-712 domain/message signing primitives\n- `bitcoin`: Bitcoin module stubs\n- `solana`: Solana module stubs\n- `cosmos`: Cosmos SignDoc protobuf encoding and SHA-256 signing hash\n- `kms`: KMS backend extension point\n- `hw`: hardware wallet extension point\n- `k256-signer`: local secp256k1 signer backend\n- `ed25519-signer`: local Ed25519 signer backend\n- `serde`: serde derives\n- `std`: standard library support\n\nDefault features: `std`, `evm`, `k256-signer`.\n\n## Specs \u0026 Standards\n\nAll implementations are spec-driven and validated against official test vectors:\n\n- **EIP-712**: [Official Mail example](https://github.com/ethereum/EIPs/blob/master/assets/eip-712/Example.js)\n- **EIP-2612**: Permit typehash constant verified against reference implementations\n- **EIP-55**: Address checksum verified against official test vectors\n- **Cosmos**: Protobuf SignDoc SHA-256 signing as per Tendermint/Cosmos SDK\n\n## Usage\n\nThe core pattern is generic and typestate-driven:\n\n- `TypedMessage\u003cT, Unsigned\u003e` for pre-signing\n- `TypedMessage\u003cT, Signed\u003e` for post-signing\n- `Eip712Type` implemented once per payload type\n\nEach new EIP-712 message requires only a data struct + one trait impl.\n\n## Performance\n\nBenchmarks on modern hardware (LTO + fat codegen):\n\n| Operation | Time |\n|-----------|------|\n| EIP-712 Permit sign | ~4.7 µs |\n| EIP-712 Order sign | ~4.6 µs |\n\nRun locally: `cargo bench --bench eip712 --features evm,k256-signer`\n\n## Quick Start\n\n```rust\nuse crypto_signer::{Address, Domain, NetworkConfig, PermitBuilder, SignerType};\n\n// Use a network preset or pass your own addresses\nlet net = NetworkConfig::polygon_mainnet();\nlet domain = Domain::new(\"USDC\", \"1\", net.chain_id, net.usdc);\n\nlet _unsigned = PermitBuilder::new(domain)\n    .spender(Address::new([0x22; 20]))\n    .value(1_000_000)\n    .nonce(0)\n    .deadline(1_700_000_000);\n\n// Distinguish EOA from Safe — never confuse the signing key address with the maker\nlet signer_type = SignerType::Safe { funder: Address::new([0xAA; 20]) };\nlet maker_address = signer_type.clob_address(Address::new([0xBB; 20])); // returns funder\n```\n\n### Verify a signature locally\n\n```rust\nuse crypto_signer::recover_signer;\n\nlet recovered = recover_signer(digest, \u0026sig).unwrap();\nassert_eq!(recovered, signer.address()); // confirms key/config without a live endpoint\n```\n\n## Quality Gates and Getting Started\n\nCI runs on every push and pre-commit hook (`.githooks/pre-commit`):\n\nTo enable the pre-commit hook locally:\n\n```bash\ngit config core.hooksPath .githooks\n```\n\n- `cargo fmt --check` — code style\n- `cargo clippy --all-targets --all-features -- -D warnings` — lint warnings denied\n- `cargo test --all-features --all-targets` — all tests with all feature combinations\n- `cargo check --no-default-features` — `no_std` compatibility gate\n- `cargo bench --bench eip712` — performance regression detection\n- `cargo audit` — vulnerability scanning\n- `cargo deny check advisories licenses bans sources` — supply chain policy enforcement\n- `cargo llvm-cov --all-features --summary-only --fail-under-lines 90` — code coverage floor at 90%\n\n## Buy me a coffee\n* ETH/Polygon: 0xCba7FBDe48C6F7A496f7c8304eCB8a813c234C02\n* BTC: bc1qf5jenprghcuazckeycx0k3h5hn46a3qetec4m2\n* SOL: 9NRLGeyxQA6nJ2b1wkFpJGtQJ7xudFEqthXRKguXzdd4\n\nThank you!\n\n## LICENSE\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoyea%2Fcrypto-signer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoyea%2Fcrypto-signer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoyea%2Fcrypto-signer/lists"}