This API enables the verification of Polkadot signatures and addresses, ensuring the authenticity of signed messages and associated addresses.
- Validate Polkadot signatures.
- Verify the authenticity of Polkadot addresses.
Checks if the API server is running.
- 200 OK: Indicates the server is operational.
"ok"
Validates a Polkadot signature against a message and address.
| Field | Type | Required | Description |
|---|---|---|---|
message |
string |
Yes | The original message that was signed. |
address |
string |
Yes | The Polkadot address associated with the signer. |
signature |
string |
Yes | The signature to be validated. |
{
"message": "Hello, Polkadot!",
"address": "12ABCDEF1234567890",
"signature": "0x1234567890ABCDEF"
}200 OK: Signature is valid.
{
"ok": true,
"message": "Signature is valid."
}401 Unauthorized: Signature is invalid.
{
"ok": false,
"message": "Signature is invalid."
}400 Bad Request: Invalid input data.
{
"errors": [
{
"msg": "Message is required and must be a string.",
"param": "message",
"location": "body"
}
]
}Before using the API, ensure the following tools are installed:
- Node.js (version 18 or later)
- pnpm
git clone https://github.com/AssetPortal/polkadot-auth-api
cd polkadot-auth-apipnpm installpnpm devThe server will start at http://localhost:3000.
Run Unit Tests
pnpm testContributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes.
- Submit a pull request.