Fan Out Unspents

Overview

You can fan out unspents by taking a single unspent and splitting it into multiple smaller unspents. This is useful for creating unspents for multiple smaller transactions, especially if you have a high volume of transactions at once. Fanning out unspents can also help protect privacy, since it makes it more difficult for external observers to link the different transactions together, as occurs with dusting attacks. The opposite of fanning out unspents is to Consolidate Unspents.

Fanning-out transactions follow the normal transaction flow, requiring signatures, approvals, and sending, as outlined in Wallets Overview.

Fan-out transactions follow the normal transaction flow, requiring signatures, approvals, and sending, as outlined in Wallets Overview.

All fan-out transactions for bitcoin automatically opt-in to acceleration using Replace-By-Fee (RBF). Should the transaction become stuck, you can follow up with an RBF transaction that includes a higher fee.

Prerequisites

Steps

  • SDK
  • Express
1 2 3 4 5 6 7 8 9 10 11 12 13 let params = { maxNumInputsToUse: 20, numUnspentsToMake: 200, minValue: 100000, maxValue: 47000000, minHeight: 1, minConfirms: 2, walletPassphrase: 'secretpassphrase1a5df8380e0e30', }; wallet.fanoutUnspents(params).then(function (transactionInfo) { // print transaction info console.dir(transactionInfo); });

Step Result

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 { "transfer": { "coin": "btc", "id": "59cd72485007a239fb00282ed480da1f", "wallet": "59cd72485007a239fb00282ed480da1f", "enterprise": "59cd72485007a239fb00282ed480da1f", "txid": "b8a828b98dbf32d9fd1875cbace9640ceb8c82626716b4a64203fdc79bb46d26", "height": 0, "heightId": "string", "date": "2019-08-24T14:15:22Z", "type": "send", "value": 0, "valueString": "string", "baseValue": 0, "baseValueString": "string", "feeString": "string", "payGoFee": 0, "payGoFeeString": "string", "usd": 0, "usdRate": 0, "state": "confirmed", "tags": [ "59cd72485007a239fb00282ed480da1f" ], "history": [ { "date": "2019-08-24T14:15:22Z", "user": "59cd72485007a239fb00282ed480da1f", "action": "created", "comment": "string" } ], "comment": "string", "vSize": 0, "nSegwitInputs": 0, "coinSpecific": {}, "sequenceId": "string", "entries": [ { "address": "2NAUwNgXaoFj2VVnSEvNLGuez8CfdU2UCMZ", "wallet": "string", "value": 0 } ], "usersNotified": true }, "txid": "string", "tx": "string", "status": "signed" }

Next

Sign the transaction.

See Also

API Reference: Fan Out Unspents