-
Notifications
You must be signed in to change notification settings - Fork 10
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 liquidjs interfaces in index.d.ts #38
Comments
nACK to import a liquidjs-lib dep in this repo in my opinion. As far as I remember, we add that index.d.ts to avoid errors while importing it in our Typescript libraries. So it's just a way to typedef the index.js file. The right way would be to migrate the project to full typescript and let |
This also works |
that being said, there is way to not import the full liquidJS but only the type that was suggested by @nicofuccella |
@louisinger ideally you'd do something like this in your index.d.ts file
and should work just fine. By doing this you don't have to maintain the same interface (thus exposing yourself to misalignments between the two) in both places (liquidjs-lib and secp256k1-zkp) |
In my mind this is not common and add a dependency on liquidjs.
If we want to be compliant with bitcoinjs philosophy, each libs using the secp256k1 implementations must define (and export) its own interface. Thus I think it's fine to keep liquidjs-lib If we look at
|
I agree. You may want to use only I think we should create a third package,
@louisinger what do you think? |
ACK for me, seems like a nice trade-off between 2 discordant but legit philosophies. |
ACK |
#42 should solve this and compile the .d.ts file from typescript |
In
lib/index.d.ts
we should import and export liquidjs interfaces rather than redefining them.The text was updated successfully, but these errors were encountered: