error:
error TypeError: Expected Private
at Object.generateSignature (/Users/talbeery/WebstormProjects/Binance-test/node_modules/@binance-chain/javascript-sdk/lib/crypto/index.js:199:41)
at Transaction.sign (/Users/talbeery/WebstormProjects/Binance-test/node_modules/@binance-chain/javascript-sdk/lib/tx/index.js:141:30)
at BncClient._callee$ (/Users/talbeery/WebstormProjects/Binance-test/node_modules/@binance-chain/javascript-sdk/lib/client/index.js:54:49)
at tryCatch (/Users/talbeery/WebstormProjects/Binance-test/node_modules/regenerator-runtime/runtime.js:65:40)
at Generator.invoke [as _invoke] (/Users/talbeery/WebstormProjects/Binance-test/node_modules/regenerator-runtime/runtime.js:303:22)
at Generator.prototype.(anonymous function) [as next] (/Users/talbeery/WebstormProjects/Binance-test/node_modules/regenerator-runtime/runtime.js:117:21)
at asyncGeneratorStep (/Users/talbeery/WebstormProjects/Binance-test/node_modules/@binance-chain/javascript-sdk/lib/client/index.js:26:103)
at _next (/Users/talbeery/WebstormProjects/Binance-test/node_modules/@binance-chain/javascript-sdk/lib/client/index.js:28:194)
at /Users/talbeery/WebstormProjects/Binance-test/node_modules/@binance-chain/javascript-sdk/lib/client/index.js:28:364
at new Promise ()
Tried to follow code from tests (https://github.com/binance-chain/javascript-sdk/blob/master/__tests__/client.test.js) and example from wiki (https://github.com/binance-chain/javascript-sdk/wiki/API-Examples)
in all of them I get "TypeError: Expected Private" when calling to transfer
bnbClient.transfer(addressFrom, addressTo, amount, asset)
error: error TypeError: Expected Private at Object.generateSignature (/Users/talbeery/WebstormProjects/Binance-test/node_modules/@binance-chain/javascript-sdk/lib/crypto/index.js:199:41) at Transaction.sign (/Users/talbeery/WebstormProjects/Binance-test/node_modules/@binance-chain/javascript-sdk/lib/tx/index.js:141:30) at BncClient._callee$ (/Users/talbeery/WebstormProjects/Binance-test/node_modules/@binance-chain/javascript-sdk/lib/client/index.js:54:49) at tryCatch (/Users/talbeery/WebstormProjects/Binance-test/node_modules/regenerator-runtime/runtime.js:65:40) at Generator.invoke [as _invoke] (/Users/talbeery/WebstormProjects/Binance-test/node_modules/regenerator-runtime/runtime.js:303:22) at Generator.prototype.(anonymous function) [as next] (/Users/talbeery/WebstormProjects/Binance-test/node_modules/regenerator-runtime/runtime.js:117:21) at asyncGeneratorStep (/Users/talbeery/WebstormProjects/Binance-test/node_modules/@binance-chain/javascript-sdk/lib/client/index.js:26:103) at _next (/Users/talbeery/WebstormProjects/Binance-test/node_modules/@binance-chain/javascript-sdk/lib/client/index.js:28:194) at /Users/talbeery/WebstormProjects/Binance-test/node_modules/@binance-chain/javascript-sdk/lib/client/index.js:28:364 at new Promise ()
Calling directly to
crypto.generateSignature('aaaaaa', bnbClient.privateKey);
gives the same error