Skip to content

extropiescom/Solo-node-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solo-node-API

node ffi wrapper for Solo C-level API and simple sample

Supported OS list:

macOS Mavericks (10.9) and above

Windows 7/8/8.1/10 x64

tested on nodejs v8.9.3

use the following commands to run:

npm install
node index.js

All the APIs are defined in PAEWallet.h

1. How to connect and disconnect:

  • Use PAEW_InitContext to connect device
  • User PAEW_FreeContext to disconnect device.

2. How to get EOS address:

  • Invoke PAEW_DeriveTradeAddress, with derivePath = [0, 0x8000002C, 0x800000c2, 0x80000000, 0x00000000, 0x00000000] as shown in config.json according to slip-44.
  • Invoke PAEW_GetTradeAddress to get EOS address.

3. How to sign EOS transaction:

Please refer to eosSignTest in index.js

  • Invoke PAEW_DeriveTradeAddress, with derivePath = {0, 0x8000002C, 0x800000c2, 0x80000000, 0x00000000, 0x00000000}; as shown in config.json according to slip-44.

  • Invoke PAEW_EOS_TXSign(void * const pPAEWContext, const size_t nDevIndex, const unsigned char * const pbCurrentTX, const size_t nCurrentTXLen, unsigned char * const pbTXSig, size_t * const pnTXSigLen),

4. How to sign BTC and ETH transaction:

Please refer to btcSignTest and ethSignTest in index.js Similar to EOS, Invoke PAEW_DeriveTradeAddress first, then call PAEW_BTC_TXSign or PAEW_ETH_TXSign to get sign result

About

node ffi wrapper for Solo C-level API and simple sample

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published