Skip to content

Bitcoin, Hippocrat, DID and Data Wallet SDK for Node, Browser and Mobile

License

Notifications You must be signed in to change notification settings

hippocrat-dao/hippocrat-wallet-sdk

Repository files navigation

hippocrat-wallet-sdk

Bitcoin, Hippocrat, DID and Data Wallet SDK for Node, Browser and Mobile

Easy Peasy Lemon Squeezy to Use. Including

  • generate, encrypt and decrypt mnemonic (following bip39)
  • derive account, address, and child of address (following bip32, bip44 and bip84)
  • make transaction on Bitcoin either to transfer Bitcoin or write data on Bitcoin
  • make transaction on Ethereum to transfer Hippocrat token
  • encrypt & decrypt data following ECIES (AES-CTR with ECDH derived key)
  • create Hippocrat(HPO) DID, sign with DID, verify signature with DID

...and more!

Install

npm install hippocrat-wallet-sdk
  • generate HD wallet mnemonic

  • derive Bitcoin account level BtcAccount From mnemonic (BIP84[m/84'/0'/account_index'])

  • derive Bitcoin address level BtcAccount From Bitcoin account level BtcAccount (BIP84[m/84'/0'/account_index'/change_index/address_index])

  • generate Bitcoin address string from BtcAccount (Segwit, starting from "bc1")

  • encrypt & decrypt mnemonic to generate secure vault (scrypt & aes-ctr)

  • get Bitcoin signer to sign Bitcoin transaction from mnemonic

  • make transaction to write messages on Bitcoin as OP_RETURN

  • make transaction to transfer Bitcoin to target addresses

  • make transaction to transfer Hippocrat to target addresses
  • generate ethereum address from private key to receive ethereum and hippocrat
  • encrypt & decrypt data following ECIES (AES-CTR with ECDH derived key)
  • create HPO DID
  • sign message with HPO DID private key
  • verify signed message(signature) with HPO DID public key