Sign Message
This scenario is mainly used to sign information. that can be used for login verification.
Sign Message
This method is used for sign message.
interface SignedData {
publicKey: string;
data: string;
signature: {
field: string;
scalar: string;
};
}
interface ProviderError extends Error {
message: string;
code: number;
data?: unknown;
}
type SignMessageArgs = {
message:string
}
const content = `Click "Sign" to sign in. No password needed!
This request will not trigger a blockchain transaction or cost any gas fees.
I accept the Auro Test zkApp Terms of Service: ${window.location.href}
address: ${currentAccount}
iat: ${new Date().getTime()}`;
const signContent:SignMessageArgs = {
message:content
}
const signResult: SignedData|ProviderError = await window.mina?
.signMessage(signContent)
.catch((err: any) => err);
console.log(signResult)Sign Json Message
This method is used for sign JSON data , Auro Wallet will format message.
Verify Message
This methods is used for verify signed Message.
Last updated