eosjs
eosjs copied to clipboard
TypeError: JsSignatureProvider is not a function
Version of EOSJS 20.0.0-beta3
Describe the bug
i use follow code to get JsSignatrueProvider:
let JsSignatureProvider=require("eosjs/dist/eosjs-jssig")
let privateKeys=["privateKey01","privateKey02"];
let jssig=new JsSignatureProvider(privateKeys);
and get this error:
TypeError: JsSignatureProvider is not a function
i'm not that good at JS, but after i google it, i think it's closure problem?
I find it out ,i work with this:
new JsSignatureProvider.default(...).