This highlights the only material code changes (in this PR, the numerous formatting deltas make things confusing).
Summary of changes
Modified IMintConfig in SLPInterfaces.ts so that fundingAddress and fundingWif accept string | string[] (previously string)
Modified the mint function in TokenType1.ts to handle array inputs for fundingAddress and fundingWif by following similar logic to the send function. I.e., if the function receives a string for fundingAddress and fundingWif, it executes as normal before this change. If the function receives arrays for fundingAddress and fundingWif, it executes the code reviewable here:
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.
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.