20.3.0 β€’ Published 2 years ago

@klyntar/valardohaeris v20.3.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

Alt Text

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))