Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
walletd_estimatefusion [2018/02/27 13:40]
stevebrush created
walletd_estimatefusion [2019/01/10 23:47] (current)
Line 1: Line 1:
 ==== iridium_walletd estimateFusion method ==== ==== iridium_walletd estimateFusion method ====
 +
 +The estimateFusion method counts the number of unspent outputs of the specified addresses and returns how many of those outputs can be optimized.
  
 [[iridium_walletd_rpc_call#​Iridium RPC Wallet API methods summary|back to methods summary]] [[iridium_walletd_rpc_call#​Iridium RPC Wallet API methods summary|back to methods summary]]
  
 +This method is used to understand if a fusion transaction can be created. If fusionReadyCount returns a value = 0, then a fusion transaction cannot be created.
 +
 +Input:
 +
 +^Argument^Mandatory^Description^Format^Example^
 +|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.))|uint64|1000000|
 +|addresses| ​ No  |Array of string((where each string is an address to take the funds from.))|array||
 +
 +Output:
 +
 +^Argument^Description^Format^Example^
 +|totalOutputCount|Total number of unspent outputs of the specified addresses.|uint64|1000|
 +|fusionReadyCount|Number of outputs that can be optimized.|uint64|50|
 +
 +Input example:
 +
 +<code json>
 +{  ​
 +  '​params':​{  ​
 +     '​threshold':​1000000,​
 +     '​addresses':​[  ​
 +        '​ir2qzAzr1KfCk2sTsLdEq8BRSRyHnahcKJrPRZg8rHtkRCNBHJiiyNz8vWjwoM6F4PSbPQuNusEgGXc2A4NoDrQr2dH4rbmGs',​
 +        '​ir3iyNz8vWjwoM6F4PSbPQuNusEgGXc2A4NoDrQr2dH4rbmGsiyNz8vWjwoM6F4PSbPQuNusEgGXc2A4NoDrQr2dH4rbmGs',​
 +        '​ir4qzAzr1KfCk2sTsLdEq8BRSRyHnahcKJrPRZg8rHtkRCNBHJiEq8BRSRyHnahcKJrPRZg8rHtkRCEq8BRSRyHnahcKJrP'​
 +     ]
 +  },
 +  '​jsonrpc':'​2.0',​
 +  '​id':'​test',​
 +  '​method':'​estimateFusion'​
 +}
 +</​code>​
 +
 +Output example:
 +
 +<code json>
 +{
 +  '​jsonrpc':'​2.0',​
 +  '​id':'​test',​
 +  '​result':​{  ​
 +     '​totalOutputCount':​1000,​
 +     '​fusionReadyCount':​50
 +  }
 +}
 +</​code>​
  
 [[iridium_walletd_rpc_call#​Iridium RPC Wallet API methods summary|back to methods summary]] [[iridium_walletd_rpc_call#​Iridium RPC Wallet API methods summary|back to methods summary]]