eosjs icon indicating copy to clipboard operation
eosjs copied to clipboard

TypeError: JsSignatureProvider is not a function

Open clockknock opened this issue 7 years ago • 1 comments

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?

clockknock avatar Dec 20 '18 11:12 clockknock

I find it out ,i work with this:

new JsSignatureProvider.default(...).

clockknock avatar Dec 21 '18 03:12 clockknock