Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import example not working #189

Open
mariusk opened this issue Aug 1, 2020 · 0 comments
Open

Import example not working #189

mariusk opened this issue Aug 1, 2020 · 0 comments

Comments

@mariusk
Copy link

mariusk commented Aug 1, 2020

According to the "Getting Started" document at:

https://developer.bitcoin.com/bitbox/docs/getting-started

To use the SDK with import, the following syntax should be used:

import { BITBOX } from 'bitbox-sdk'
let bitbox = new BITBOX();
bitbox.Mnemonic.generate();

Well, that does not work. This does however:

import BITBOX from 'bitbox-sdk';
const bitbox = new BITBOX.BITBOX();
bitbox.Mnemonic.generate();

I'm not sure if it's TypeScript that messes up these interfaces, if it's done incorrectly or if the docs are out of date. But I do believe it is important to have "Getting Started" documents that work. I tested this on Node 12 btw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant