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

typescript definitions not exported by default #215

Open
jacobcoro opened this issue Dec 20, 2021 · 6 comments
Open

typescript definitions not exported by default #215

jacobcoro opened this issue Dec 20, 2021 · 6 comments

Comments

@jacobcoro
Copy link

when I do import Ledger from '@lunie/cosmos-ledger';
I don't get the types. I have a red squiggly saying no types found.

Screen Shot 2021-12-20 at 1 47 58 PM

I opened the node_modules folder and found the types there and when I do import Ledger from '@lunie/cosmos-ledger/lib/cosmos-ledger'; it works.

You might need to change something to get these loaded by default

@faboweb
Copy link
Contributor

faboweb commented Dec 20, 2021

Hi Jacob, this library is discontinued. Please use https://github.com/Zondax/ledger-cosmos-js

@jacobcoro
Copy link
Author

Hi Jacob, this library is discontinued. Please use https://github.com/Zondax/ledger-cosmos-js

Looks like that library has also not been updated for 2 years

@faboweb
Copy link
Contributor

faboweb commented Dec 20, 2021

You could check how Keplr does it: https://github.com/chainapsis/keplr-wallet

@jacobcoro
Copy link
Author

You could check how Keplr does it: https://github.com/chainapsis/keplr-wallet

Thanks so much! I could not get it working until I checked Keplr's code as you suggested. This library seemed to handle this step for us, and the new library requires an extra step:

import { signatureImport } from "secp256k1";
    // Parse a DER ECDSA signature
    return signatureImport(result.signature);

source

@jacobcoro
Copy link
Author

I think the library devs should make it clear this library is not maintained anymore and point to the new one.
But the new one feels like a bit of a downgrade, being written in js not ts. It's a very small library, it wouldn't be so hard to change to ts, and then it would be a lot easier/nicer to use.
I'm willing to help with that effort if need be.

@faboweb
Copy link
Contributor

faboweb commented Dec 21, 2021

You are invited to create a PR with the TS additions. I will flag this library as not maintained.

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

2 participants