{"id":29745613,"url":"https://github.com/base/usbwallet","last_synced_at":"2025-07-26T06:16:18.765Z","repository":{"id":303896543,"uuid":"1016672634","full_name":"base/usbwallet","owner":"base","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-11T00:32:41.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-11T05:56:33.615Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/base.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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-09T10:59:25.000Z","updated_at":"2025-07-11T00:32:03.000Z","dependencies_parsed_at":"2025-07-11T05:56:36.754Z","dependency_job_id":null,"html_url":"https://github.com/base/usbwallet","commit_stats":null,"previous_names":["mdehoog/usbwallet","base/usbwallet"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/base/usbwallet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base%2Fusbwallet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base%2Fusbwallet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base%2Fusbwallet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base%2Fusbwallet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/base","download_url":"https://codeload.github.com/base/usbwallet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base%2Fusbwallet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267128006,"owners_count":24040156,"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-07-26T02:00:08.937Z","response_time":62,"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":[],"created_at":"2025-07-26T06:16:17.538Z","updated_at":"2025-07-26T06:16:18.755Z","avatar_url":"https://github.com/base.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# usbwallet\n\nFork of go-ethereum's [usbwallet package](https://github.com/ethereum/go-ethereum/tree/master/accounts/usbwallet)\nwith support for:\n - non-HID devices (recent Trezor firmware)\n - EIP-712 typed-data signatures\n - Personal message signatures\n\nShould be a drop-in replacement.\n\n### Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/ethereum/go-ethereum/accounts\"\n\t\"github.com/ethereum/go-ethereum/signer/core/apitypes\"\n\t\"github.com/base/usbwallet\"\n)\n\nfunc main() {\n\thub, _ := usbwallet.NewTrezorHubWithWebUSB()\n\twallet := hub.Wallets()[0]\n\t_ = wallet.Open(\"\")\n\tpath, _ := accounts.ParseDerivationPath(\"m/44'/60'/0'/0/0\")\n\taccount, _ := wallet.Derive(path, true)\n\tdata := apitypes.TypedData{\n\t\tTypes: map[string][]apitypes.Type{\n\t\t\t\"EIP712Domain\": {{Name: \"name\", Type: \"string\"}},\n\t\t\t\"Mail\":         {{Name: \"from\", Type: \"string\"}, {Name: \"to\", Type: \"string\"}, {Name: \"contents\", Type: \"string\"}},\n\t\t},\n\t\tPrimaryType: \"Mail\",\n\t\tDomain:      apitypes.TypedDataDomain{Name: \"example mail\"},\n\t\tMessage:     map[string]interface{}{\"from\": \"from@example.com\", \"to\": \"to@example.com\", \"contents\": \"hello world\"},\n\t}\n\tsig, _ := wallet.SignTypedData(account, data)\n\tfmt.Printf(\"Sig: 0x%x\\n\", sig)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbase%2Fusbwallet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbase%2Fusbwallet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbase%2Fusbwallet/lists"}