Sign Message and Verify
Sign and verify challenges for off-chain authentication
$ yarn add @blocto/sdkUse web3.js
import Web3 from "web3";
import BloctoSDK from "@blocto/sdk";
const bloctoSDK = new BloctoSDK({
ethereum: {
chainId: "0xa4b1", // (required) chainId to be used
rpc: `https://rpc.ankr.com/arbitrum` // (required for Ethereum) JSON RPC endpoint
}
});
const web3 = new Web3(bloctoSDK.ethereum);
const handleSignMessage = () => {
web3.eth.sign(message, address);
};Verify Signature (personal.sign)
Demo
PersonalSign Technical Details
Verify Signature (typed data sign)
Demo
Migration Guide for dApps which Follow the Old Protocol ERC-1654
Last updated
Was this helpful?