What’s the correct way to send tokens in rapid succession (e.g. in a loop)? #asknostr Something tells me this isn’t the way, especially since I get an ERR_CONNECTION _REFUSED from @Minibits right after. Cc: @calle or any other #ecash dev image

Replies (5)

You're going to get rate limited by the mint if you swap in a loop. Instead, use wallet.send and set the `amountsToSend` option to an array of n times `amountPerSend`, then send it. Single interaction with the mint.
Is the answer still the same if I’m trying to send tokens to 50 different recipients? I checked the documentation and didn’t see send() accepting an array, but I did see that swap() returns splitProofsToSend (which sounds like what I need). Either way, I’ll try all of this when I get a chance. Just want to be prepared. 🙏 image