()
| 55 | } |
| 56 | |
| 57 | async function ethSign() { |
| 58 | const msg = ethers.toUtf8Bytes("Hello eth_sign"); |
| 59 | const hexMsg = ethers.hexlify(msg); |
| 60 | |
| 61 | const sig = await provider.request({ |
| 62 | method: "eth_sign", |
| 63 | params: [ledgerAddress, hexMsg], |
| 64 | }); |
| 65 | |
| 66 | const verifiedAddress = ethers.verifyMessage("Hello eth_sign", sig); |
| 67 | |
| 68 | assert.equal(verifiedAddress, ledgerAddress); |
| 69 | } |
| 70 | |
| 71 | async function personalSign() { |
| 72 | const message = "Hello personal_sign"; |