Signing a message
Cryptographic signatures are a key part of the blockchain. They are used to prove ownership of an address without exposing its private key. This is primarily used for signing transactions but can also be used to sign arbitrary messages.
A message signature mathematically guarantees that certain message was signed by certain (secret) private key, which corresponds to certain (non-secret) public key. After a message is signed, the message and the signature cannot be modified and thus message authentication and integrity is guaranteed.
Anyone, who knows the public key of the message signer, can verify the signature.
Signing a message with a Wallet
They are used to prove ownership of an address without exposing its private key. This is primarily used for signing transactions but can also be used to sign arbitrary messages.
caution
After a message is signed, the message and the signature cannot be modified and thus message authentication and integrity is guaranteed. Anyone, who knows the public key of the message signer, can verify the signature.
- From Code
- From Webapp
const axios = require("axios")
const startonAPI = axios.create({
baseURL: "https://api.starton.com",
headers: {
"x-api-key": "YOUR_API_KEY",
},
})
startonAPI
.post("/v3/kms/wallet/0x694F07CEEc0869aa0dB5E8157FA538268F28B23f/sign-message", {
message: "Hello Starton.",
})
.then((res) => console.log(res.data))
.catch((e) => console.log(e))
- Click ....
- Click Sign.
- Enter your message.
- Click Submit.
After loading, your signature appears.