secretkeylabs / sats-connect

Sats connect is a simple javascript library that connects apps to Bitcoin wallets
https://www.npmjs.com/package/sats-connect
107 stars 40 forks source link

Automatic Distribution of Funds on Initial Mint #110

Closed stoXmod closed 6 months ago

stoXmod commented 6 months ago

I am developing a runes platform and I have a specific functionality in mind regarding the distribution of funds during the minting process.

Is there a way to automatically send 1% of the minting fees (or any specified amount) to a particular wallet each time a new item is minted? This feature would be crucial for automatically distributing royalties or similar payments.

Requirement

The goal is to ensure that every time an item is minted on our platform, a predetermined percentage of the transaction (in this case, 1%) is sent to a designated wallet address.

Questions

This feature is intended to streamline the process of royalties or fee distribution, making it more efficient and less prone to errors. Your advice on how to best achieve this would be greatly appreciated.

Thank you for your support and guidance!

emilcondrea commented 6 months ago

If I understand correctly you are interested to take a fee on each mint operation done on your platform. This is supported already, you can use appServiceFee & appServiceFeeAddress parameters. This will be added to the total amount that the user will pay, and will be sent automatically to fee address. https://docs.xverse.app/sats-connect/bitcoin-methods/mint-runes/runes_mint