{"id":37020037,"url":"https://github.com/moonstoneid/siwe-java","last_synced_at":"2026-03-07T13:05:29.574Z","repository":{"id":63686684,"uuid":"512171637","full_name":"moonstoneid/siwe-java","owner":"moonstoneid","description":"Java lib for Sign-In with Ethereum (EIP-4361)","archived":false,"fork":false,"pushed_at":"2025-08-31T19:57:05.000Z","size":170,"stargazers_count":17,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-14T04:47:28.384Z","etag":null,"topics":["eip-4361","java","sign-in-with-ethereum","siwe"],"latest_commit_sha":null,"homepage":"","language":"Java","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/moonstoneid.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-07-09T11:45:18.000Z","updated_at":"2025-09-01T07:05:37.000Z","dependencies_parsed_at":"2024-03-09T18:30:23.679Z","dependency_job_id":null,"html_url":"https://github.com/moonstoneid/siwe-java","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/moonstoneid/siwe-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonstoneid%2Fsiwe-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonstoneid%2Fsiwe-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonstoneid%2Fsiwe-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonstoneid%2Fsiwe-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moonstoneid","download_url":"https://codeload.github.com/moonstoneid/siwe-java/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonstoneid%2Fsiwe-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30214637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T12:15:00.571Z","status":"ssl_error","status_checked_at":"2026-03-07T12:15:00.217Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["eip-4361","java","sign-in-with-ethereum","siwe"],"created_at":"2026-01-14T02:15:11.753Z","updated_at":"2026-03-07T13:05:29.569Z","avatar_url":"https://github.com/moonstoneid.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"![siwe-java Logo](header.png \"siwe-java Logo\")\n\n[![Build](https://github.com/moonstoneid/siwe-java/actions/workflows/build-badge.yml/badge.svg)](https://github.com/moonstoneid/siwe-java/actions/workflows/build-badge.yml)\n[![Unit Tests](https://github.com/moonstoneid/siwe-java/actions/workflows/unit-tests-badge.yml/badge.svg)](https://github.com/moonstoneid/siwe-java/actions/workflows/unit-tests-badge.yml)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.moonstoneid/siwe-java/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/com.moonstoneid/siwe-java?style=flat)\n# Siwe-java\n\nSiwe-java is a Java lib that implements Sign-In with Ethereum ([EIP-4361](https://eips.ethereum.org/EIPS/eip-4361)).\n\nSign-In with Ethereum (Siwe) defines how Ethereum accounts can authenticate with off-chain services by signing a\n[standardized plaintext message](https://eips.ethereum.org/EIPS/eip-4361#example-message-to-be-signed).\nSiwe-java provides methods to create a Siwe message from scratch, to parse existing Siwe strings and to validate its \nsignature.\n\n## Installation\nAdd the following Maven dependency to your project (requires Java 17 or higher).\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.moonstoneid\u003c/groupId\u003e\n    \u003cartifactId\u003esiwe-java\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.9\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Usage\nThe following examples briefly show how to use siwe-java.\n\nA full example can be found [here](example/src/main/java/com/moonstoneid/siwe/Example.java).\n\n### Create new message\nCreate a new Siwe message from scratch and get a valid EIP-4361 string representation.\n```java\ntry {\n    // Create new SiweMessage\n    SiweMessage siwe = new SiweMessage.Builder(domain, address, uri, version, chainId, nonce, issuedAt)\n        .statement(statement).build();\n    \n    // Create EIP-4361 string from SiweMessage\n    String msg = siwe.toMessage();     \n} catch (SiweException e) {\n    // Handle exception\n}\n ```\n### Parse existing message\nParse an EIP-4361 string into a Siwe message and verify its signature:\n```java\nString message = \"example.com wants you to sign in with your Ethereum account:\\n\" +\n    \"0xAd472fbB6781BbBDfC4Efea378ed428083541748\\n\\n\" +\n    \"Sign in to use the app.\\n\\n\" +\n    \"URI: https://example.com\\n\" +\n    \"Version: 1\\n\" +\n    \"Chain ID: 1\\n\" +\n    \"Nonce: EnZ3CLrm6ap78uiNE0MU\\n\" +\n    \"Issued At: 2022-06-17T22:29:40.065529400+02:00\";\n\nString signature = \"0x2ce1f57908b3d1cfece352a90cec9beab0452829a0bf741d26016d60676d63\" +\n        \"807b5080b4cc387edbe741203387ef0b8a6e79743f636512cc48c80cbb12ffa8261b\";\ntry {\n    // Parse string to SiweMessage\n    SiweMessage siwe = new SiweMessage.Parser().parse(message);\n\n    // Verify integrity of SiweMessage by matching its signature\n    siwe.verify(\"example.com\", \"EnZ3CLrm6ap78uiNE0MU\", signature);\n} catch (SiweException e) {\n    // Handle exception\n}\n ```\n\n## Specification\nThe EIP-4361 specification can be found [here](https://eips.ethereum.org/EIPS/eip-4361).\n\n## Contributing\nPlease use the [issue tracker](https://github.com/moonstoneid/siwe-java/issues) to report any bugs.\n\nIf you would like to contribute code, fork the repository and send a pull request. When submitting code, please make \nevery effort to follow existing conventions and style in order to keep the code as readable as possible.\n\n## Disclaimer \nThis project has not undergone any formal security audit. Use at your own risk.\n\n## Credits\nThanks to [@wyc](https://github.com/wyc) and [Spruce Systems, Inc.](https://github.com/spruceid) for pushing EIP-4361\nforward.\n\n## License\nThis project is distributed under the Apache License, Version 2.0 (see LICENSE file).\n\nBy submitting a pull request to this project, you agree to license your contribution under the Apache License, \nVersion 2.0.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoonstoneid%2Fsiwe-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoonstoneid%2Fsiwe-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoonstoneid%2Fsiwe-java/lists"}