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
- Use
PAEW_InitContextto connect device - User
PAEW_FreeContextto disconnect device.
- Invoke
PAEW_DeriveTradeAddress, withderivePath = [0, 0x8000002C, 0x800000c2, 0x80000000, 0x00000000, 0x00000000]as shown in config.json according to slip-44. - Invoke
PAEW_GetTradeAddressto get EOS address.
Please refer to eosSignTest in index.js
-
Invoke
PAEW_DeriveTradeAddress, withderivePath = {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),
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