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

Multi input mint #94

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

BytesOfMan
Copy link

Support for fundingAddress and fundingWif as arrays in TokenType1.send

Due to different linting systems, the easiest way to review this PR is to check changes to TokenType1.ts and SLPInterfaces.ts at this PR: https://github.com/josephroyking/slp-sdk/pull/3/files

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:

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.

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

Successfully merging this pull request may close these issues.

1 participant