Skip to content

estimateFusion

AxVultis edited this page Nov 12, 2022 · 2 revisions

The estimateFusion method allows you to check how many inputs you can fuse for a given threshold. Then you can use that information to use sendFusionTransaction. Fusion transactions allow you to optimize your wallet(s) when there are too many small outputs to fit in a transaction.

Request Format

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "estimateFusion",
  "params": {
    "threshold": 1000000,
    "addresses": [
      "ccx7dehAGh837bfSfo18wJ1WzeCUWnzv3D23hvR8npyhHxoa6E3WXqNgTfHaWbAYRPdUhEXXEeKeEG7okKGHA8CZ3onHHofFDJ",
      "ccx7Sh1w3q9jmrzw3XkKPRBa4ZB8mxp5rH4Rm4cWJgDYNNahMKoEuYxgTfHaWbAYRPdUhEXXEeKeEG7okKGHA8CZ3onHF7W6gc"
    ]
  }
}

Request Details:

Argument Mandatory Description Format
threshold Yes Value that determines which outputs will be optimized. Only the outputs lesser than the threshold value will be included into a fusion transaction. int
addresses No Addresses to check for fuse-able outputs. array of strings

Response Format

JSON-RPC

 {
  "jsonrpc": "2.0",
  "id": 4,
  "result": {
    "totalOutputCount": 1000,
    "fusionReadyCount": 50
  }
}

Response Details:

Argument Description Format
totalOutputCount The total output count int
fusionReadyCount The number of outputs ready to be included in a fusion transaction int
Clone this wiki locally