Skip to content

Commit 50e6d65

Browse files
committed
docs: update description for verifySignedMessage
1 parent 4cdcada commit 50e6d65

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

website/docs/Hooks/useWallet.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ function App() {
114114
message: msgBytes
115115
})
116116
// verify signature with publicKey and SignedMessage (params are all included in result)
117-
const verifyResult = wallet.verifySignedMessage(result)
117+
const verifyResult = await wallet.verifySignedMessage(result, wallet.account.publicKey)
118118
if (!verifyResult) {
119119
console.log('signMessage succeed, but verify signedMessage failed')
120120
} else {
@@ -293,13 +293,13 @@ The function is for message signing.
293293

294294
### verifySignedMessage
295295

296-
This function is for verifying the output of `signMessage` following the Sui standard. Uses `tweetnacl.sign.detached.verify` method under the hood. Returns `true` if the returned signature matches the message to be signed and the signer's publicKey.
296+
This function is for verifying the output of `signMessage` following the Sui standard. Returns `true` if the returned signature matches the message to be signed and the signer's publicKey.
297297

298298
For details please check [here](https://github.com/suiet/wallet-kit/blob/main/packages/sdk/src/utils/verifySignedMessage.ts#L10)
299299

300-
| Type | Default |
301-
| ------------------------------------------------------------ | ------- |
302-
| `(input: {signature: string; messageBytes: string}) => boolean` | |
300+
| Type | Default |
301+
|--------------------------------------------------------------------------| ------- |
302+
| `(input: {signature: string; messageBytes: string}) => Promise<boolean>` | |
303303

304304
### on
305305

@@ -345,4 +345,4 @@ Deprecated, use [account.publicKey](#account) instead.
345345
const wallet = useWallet();
346346
- console.log(wallet.getPublicKey());
347347
+ console.log(wallet.account.publicKey);
348-
```
348+
```

0 commit comments

Comments
 (0)