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

Allow multiple input addresses in mint operation #30

Open
m4ktub opened this issue Mar 16, 2019 · 2 comments
Open

Allow multiple input addresses in mint operation #30

m4ktub opened this issue Mar 16, 2019 · 2 comments

Comments

@m4ktub
Copy link

m4ktub commented Mar 16, 2019

The IMintConfig interface only allows one funding address and corresponding private key. Nevertheless a common setup is to have the baton in address A while having extra funds in another address B. Note that BitboxNetwork already includes a simpleTokenMint method that accepts multiple inputs.

Please consider extending IMintConfig to allow multiple funding addresses and private keys.

@BytesOfMan
Copy link

To support the BCH and SLP spec of BCH utxos living on 145' and SLP utxos living on 245', it could be necessary to use a fundingAddress and fundingWif as arrays pulling fundingAddresses and fundingWifs from both paths. This is currently the approach used by mint.bitcoin.com, which relies on a fork of slp-sdk proposed here in #91

Per @thr0wn:

slp-sdk master does not accept an array of values for the parameter 'fundingAddress' and 'fundingWifs'. Even if you pass only path 145' as the single funding address, you will not be able to mint, as path 145' does not have the baton. If you pass only the path 245' you will not have enough funds, as it has only slp utxos.

#91 was tabled with this comment from @SpendBCH:

Thank you for the PR @thr0wn, it's a bit big for us to consider right now though. There may be some more single -> array cases that can be solved with small changes like the ones in #90 , for more elaborate changes or more advanced use cases it may be best to use SLPJS.

In response, I'm looking into a simpler PR to solve the same issue.

In the meantime, mint.bitcoin.com has already diverged from the Bitcoin-com/master repo of slp-sdk. We are looking to ensure that we don't spin off too far on another version going forward. If it's a feature that mint needs, it's probably also a feature that should be added to slp-sdk, and we can assist for dev work and review.

@BytesOfMan
Copy link

Updated PR at #94

See #94 for summary of code change and simplified review instructions

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