Skip to content

Import example not working #189

@mariusk

Description

@mariusk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions