Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

Pay to Many API #13

Open
p0o opened this issue Apr 26, 2020 · 2 comments
Open

Pay to Many API #13

p0o opened this issue Apr 26, 2020 · 2 comments

Comments

@p0o
Copy link
Member

p0o commented Apr 26, 2020

At the moment we support pay to one person transactions like this:

await user.pay(1000, "SAT", bchAddress);

We need to add multi output transactions which is crucial for web app developers to make money from their payments or pay affiliate fees as suggested by @readcash

This is what I'm thinking in terms of API for these transactions:

await user.process([
  user.pay(1000, "SAT", bchAddress),
  user.pay(0.00005, "BCH", bchAddress2),
  user.pay(0.5, "USD", bchAddress3)
]);

This API has many benefits in my mind, because we can use .process later for anything else like:

user.process([
  user.payToSLP(100, 'SPICE')
]);

But there are definitely more edge cases to cover like having a transaction of BCH and SLP together should lead into 2 transactions, not one.

@readcash
Copy link

👍 Sounds good! If signup.cash could support SLP token that would be totally awesome!

@p0o
Copy link
Member Author

p0o commented Apr 26, 2020

BCH transactions in Signup are already excluding SLP outputs to avoid burning the tokens so full SLP support is possible quite soon. Tracked here #3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants