Differences

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

Link to this comparison view

Next revision
Previous revision
walletd_sendtransaction [2018/02/27 14:39]
stevebrush created
walletd_sendtransaction [2019/01/11 00:47] (current)
Line 1: Line 1:
 ==== iridium_walletd sendTransaction method ==== ==== iridium_walletd sendTransaction method ====
 +
 +The sendTransaction method allows you to send transaction to one or several addresses. It also allow you to use a payment_id for a transaction to a single address.
  
 [[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]]
  
 +Input:
 +
 +^Argument^Mandatory^Description^Format^Example^
 +|addresses| ​ No  |Array of addresses take the funds from|array||
 +|transfers| ​ Yes  | Array of address, amount|array|"​amount":​ 10000000000,"​address":​ "​ir2qzAzr1KfCk2sTsLdEq8BRSRyHnahcKJrPRZg8rHtkRCNBHJiiyNz8vWjwoM6F4PSbPQuNusEgGXc2A4NoDrQr2dH4rbmGs"​|
 +|fee|  Yes  |Transaction fee((Minimal fee in Iridium is 0.0005 IRD. This parameter should be specified in minimal available IRD units. For example, if your fee is 0.0005 IRD, you should pass it as 5000))|uint64|5000|
 +|unlockTime| ​ No  |Height of the block until which transaction is locked.|uint64|0|
 +|anonymity| ​ Yes  |Privacy level (mixin). Level 6 is the higher.|uint64|3|
 +|extra| ​ No  |String of variable length. Can contain A-Z, 0-9 characters.|string||
 +|paymentId| ​ No  |payment_id|string|somePaymentId|
 +|changeAddress| ​ No  |Valid and existing in this container address.|string| ir2qzAzr1KfCk2sTsLdEq8BRSRyHnahcKJrPRZg8rHtkRCNBHJiiyNz8vWjwoM6F4PSbPQuNusEgGXc2A4NoDrQr2dH4rbmGs|
 +
 +**Note:** if container contains only 1 address, changeAddress field can be left empty and the change is going to be sent to this address
 +
 +**Note:** if addresses field contains only 1 address, changeAddress can be left empty and the change is going to be sent to this address
 +
 +**Note:** in the rest of the cases, changeAddress field is mandatory and must contain an address.
 +
 +Output:
 +
 +^Argument^Description^Format^Example^
 +|transactionHash|Hash of the sent transaction.|string|93faedc8b8a80a084a02dfeffd163934746c2163f23a1b6022b32423ec9ae08f|
 +
 +Input Example:
 +
 +<code json>
 +{  ​
 +  '​params':​{  ​
 +     '​anonymity':​0,​
 +     '​fee':​5000,​
 +     '​unlockTime':​0,​
 +     '​paymentId':'​somePaymentId',​
 +     '​addresses':​[  ​
 +        '​ir2qzAzr1KfCk2sTsLdEq8BRSRyHnahcKJrPRZg8rHtkRCNBHJiiyNz8vWjwoM6F4PSbPQuNusEgGXc2A4NoDrQr2dH4rbmGs',​
 +        '​ir3iyNz8vWjwoM6F4PSbPQuNusEgGXc2A4NoDrQr2dH4rbmGsiyNz8vWjwoM6F4PSbPQuNusEgGXc2A4NoDrQr2dH4rbmGs',​
 +        '​ir4qzAzr1KfCk2sTsLdEq8BRSRyHnahcKJrPRZg8rHtkRCNBHJiEq8BRSRyHnahcKJrPRZg8rHtkRCEq8BRSRyHnahcKJrP'​
 +     ],
 +     '​transfers':​[  ​
 +        {  ​
 +           '​amount':​123456,​
 +           '​address':'​ir1qzAzr1KfCk2sTsLdEq8BRSRyHnahcKJrPRZg8rHtkRCNBHJiiyNz8vWjwoM6F4PSbPQuNusEgGXc2A4NoDrQr2dH4rbmGs'​
 +        },
 +        {  ​
 +           '​amount':​234567,​
 +           '​address':'​ir2qzAzr1KfCk2sTsLdEq8BRSRyHnahcKJrPRZg8rHtkRCNBHJiiyNz8vWjwoM6F4PSbPQuNusEgGXc2A4NoDrQr2dH4rbmGs'​
 +        },
 +        {  ​
 +           '​amount':​345678,​
 +           '​address':'​ir3qzAzr1KfCk2sTsLdEq8BRSRyHnahcKJrPRZg8rHtkRCNBHJiiyNz8vWjwoM6F4PSbPQuNusEgGXc2A4NoDrQr2dH4rbmGs'​
 +        }
 +     ],
 +     '​changeAddress':'​ir4qzAzr1KfCk2sTsLdEq8BRSRyHnahcKJrPRZg8rHtkRCNBHJiiyNz8vWjwoM6F4PSbPQuNusEgGXc2A4NoDrQr2dH4rbmGs'​
 +  },
 +  '​jsonrpc':'​2.0',​
 +  '​id':'​test',​
 +  '​method':'​sendTransaction'​
 +}
 +</​code>​
 +
 +Output Example:
 +
 +<code json>
 +{  ​
 +  '​jsonrpc':'​2.0',​
 +  '​id':'​test',​
 +  '​result':​{  ​
 +     '​transactionHash':'​93faedc8b8a80a084a02dfeffd163934746c2163f23a1b6022b32423ec9ae08f'​
 +  }
 +}
 +</​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]]