@klyntar/valardohaeris
v20.3.0
Published
Preparation for VD release for Klyntar. Feel free to use in your own projects as a useful module🐱🚀
Downloads
83
Readme
How to use
//CRYPTO is klyntar,algorand,arweave,eos,eth_like,filecoin,harmony,helium,mina,polkadot,ripple,solana,stellar,zilliqa(unimplemented)
//TIP: Check the directories of package to get available formats or https://github.com/KLYN74R/ValarDohaeris
import VD from '@klyntar/valardohaeris/<CRYPTO>/vd.js'
//_______________________________ USE DEFAULT SETS OF FUNCTIONS _______________________________
let keys=await VD.generate()
console.log(keys)//Make sure format is OK
//Sign data in the string format
let data='SIGN ME',
signature=await VD.sign(data,keys.privateKey)
console.log('Your signature in transportable format => ',signature)
console.log('Is ok => ',await VD.verify('ANOTHER DATA',signature,keys.address),` (should be ❌)`)
console.log('Is ok => ',await VD.verify(data,signature,keys.address),'(should be ✔️)')
//_______________________________ AND EXPLORE SPECIFIC FUNCTIONS _______________________________
console.log('Address in another format: ',VD.toPUB_K1(keys.address))