Closed EvanYan1024 closed 1 year ago
const data = {
"address":
"0x578f679b0547555b0a37637944e14c813ec11ad04a225e81add82ab34cbd6cd7",
"application": "https://aptos-labs.github.io",
"chainId": 2,
"message": "Hello from Aptos Wallet Adapter",
"nonce": "0.74df1280af10e",
"fullMessage": "APTOS\naddress: 0x578f679b0547555b0a37637944e14c813ec11ad04a225e81add82ab34cbd6cd7\napplication: https://aptos-labs.github.io\nmessage: Hello from Aptos Wallet Adapter\nnonce: 0.74df1280af10e",
"prefix": "APTOS",
"signature": "0xf7bbb8b38a864155b23e406c9faea1456425c928eb280ced8c071f0ce5b0afb57a889c290fa03da0ea76f37f290fa0584427c98ca8417033e8080100fc8dcf02"
}
use data.message instead data.fullMessage can pass the verify, but the mobile wallet sign action is different from chrome wallet.
https://aptos-labs.github.io/aptos-wallet-adapter/ I use this address to connect to the Petra mobile APP, then sign the message, and then use the method of verifying the signature on the official website to verify, but it fails. First, an error is reported as bad signature size. I noticed that the signature of the mobile APP has 130 characters, and there is an extra' in front of it. 0x', then I remove the '0x', then the validation returns false