diff --git a/packages/neon-dappkit/NEON-SIGNER.md b/packages/neon-dappkit/NEON-SIGNER.md index f90c430..11d02b6 100644 --- a/packages/neon-dappkit/NEON-SIGNER.md +++ b/packages/neon-dappkit/NEON-SIGNER.md @@ -29,7 +29,7 @@ The process of signing and then verifying a message is useful to prove that the truly signed your specific message. ```ts // 1) sign a message -const mySignedMessage = await signer.signMessage({ message: 'My message', version: 2 }) +const mySignedMessage = await signer.signMessage({ message: 'My message' }) // the signed message contains the message, messageHex, data, publicKey and salt // 2) store or share these information to be verified later or by someone else @@ -37,10 +37,19 @@ const mySignedMessage = await signer.signMessage({ message: 'My message', versio // 3) check if the signature is valid, if the method returns true, it is certain that that specific publicKey signed that messageHex const valid = await signer.verifyMessage(mySignedMessage) ``` -You can use different **versions**: -1. The same format as Neoline, with salt. -2. The more readable version, easier to verify by other means (with salt). -3. The same format as Neoline, without salt. +You can use different signing **versions**: +1. CLASSIC: The same format as Neoline, with salt. +2. DEFAULT: The more human-readable version, easier to verify with neon-js (with salt). +3. WITHOUT_SALT: The same format as Neoline, but without salt. + +```ts +import { SignMessageVersion } from '@cityofzion/neon-dappkit-types' +// ... +const mySignedMessage = await signer.signMessage({ + message: 'My message', + version: SignMessageVersion.CLASSIC +}) +``` ### Encrypt and Decrypt data