Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support for
fundingAddress
andfundingWif
as arrays inTokenType1.send
Due to different linting systems, the easiest way to review this PR is to check changes to
TokenType1.ts
andSLPInterfaces.ts
at this PR: https://github.com/josephroyking/slp-sdk/pull/3/filesThis highlights the only material code changes (in this PR, the numerous formatting deltas make things confusing).
Summary of changes
IMintConfig
inSLPInterfaces.ts
so thatfundingAddress
andfundingWif
acceptstring | string[]
(previouslystring
)mint
function inTokenType1.ts
to handle array inputs forfundingAddress
andfundingWif
by following similar logic to thesend
function. I.e., if the function receives astring
forfundingAddress
andfundingWif
, it executes as normal before this change. If the function receivesarrays
forfundingAddress
andfundingWif
, it executes the code reviewable here:https://github.com/josephroyking/slp-sdk/blob/multi-input-mint/src/TokenType1.ts#L133
See lines 133 to 196. The code changes are parsing changes to process output of different format from
bitboxNetwork.getAllSlpBalancesAndUtxos(mintConfig.fundingAddress);
--- which itself already accepts array inputs.