From 00202e278365062c9da52c6b2fdcb7b3be362e8b Mon Sep 17 00:00:00 2001 From: Matthew Smith Date: Mon, 12 Jun 2017 11:23:33 +0100 Subject: [PATCH 1/5] Add subtractfeeamount parameter Source: https://github.com/bitcoin/bitcoin/blob/e4918316d80f0541189c40039095c716a09d636e/src/wallet/rpcwallet.cpp#L403 --- .../devdoc/bitcoin-core/rpcs/rpcs/sendtoaddress.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendtoaddress.md b/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendtoaddress.md index ebdbeff2..b6bba243 100644 --- a/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendtoaddress.md +++ b/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendtoaddress.md @@ -56,6 +56,16 @@ The `sendtoaddress` RPC {{summary_sendToAddress}} {% enditemplate %} +*Parameter #5---automatic fee subtraction + +{% itemplate ntpd1 %} +- n: "Subtract Fee From Amount" + t: "boolean" + p: "Optional
(0 or 1)" + d: "The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. Default is false" + +{% enditemplate %} + *Result---a TXID of the sent transaction* {% itemplate ntpd1 %} @@ -63,7 +73,7 @@ The `sendtoaddress` RPC {{summary_sendToAddress}} t: "string" p: "Required
(exactly 1)" d: "The TXID of the sent transaction, encoded as hex in RPC byte order" - + {% enditemplate %} *Example from Bitcoin Core 0.10.0* From a4ee6bb100109588db7ba3ec6ba2ffc02af512b4 Mon Sep 17 00:00:00 2001 From: Matthew Smith Date: Tue, 13 Jun 2017 09:33:20 +0100 Subject: [PATCH 2/5] Add subtractfeeamount parameter to sendmany RPC Source: https://github.com/bitcoin/bitcoin/blob/e4918316d80f0541189c40039095c716a09d636e/src/wallet/rpcwallet.cpp#L890 --- _includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md b/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md index cc2aa624..1c4b2b8c 100644 --- a/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md +++ b/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md @@ -55,6 +55,16 @@ The `sendmany` RPC {{summary_sendMany}} {% enditemplate %} +*Parameter #5---automatic fee subtraction + +{% itemplate ntpd1 %} +- n: "Subtract Fee From Amount" + t: "boolean" + p: "Optional
(0 or 1)" + d: "The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. Default is false" + +{% enditemplate %} + *Result---a TXID of the sent transaction* {% itemplate ntpd1 %} From 9824426577abb2210edbdaf77791ecf5687e167d Mon Sep 17 00:00:00 2001 From: Matthew Smith Date: Tue, 13 Jun 2017 09:43:27 +0100 Subject: [PATCH 3/5] Fix markdown formatting Add asterisk at the end of the line. --- _includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md | 2 +- _includes/devdoc/bitcoin-core/rpcs/rpcs/sendtoaddress.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md b/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md index 1c4b2b8c..6209242a 100644 --- a/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md +++ b/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md @@ -55,7 +55,7 @@ The `sendmany` RPC {{summary_sendMany}} {% enditemplate %} -*Parameter #5---automatic fee subtraction +*Parameter #5---automatic fee subtraction* {% itemplate ntpd1 %} - n: "Subtract Fee From Amount" diff --git a/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendtoaddress.md b/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendtoaddress.md index b6bba243..fac75fe5 100644 --- a/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendtoaddress.md +++ b/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendtoaddress.md @@ -56,7 +56,7 @@ The `sendtoaddress` RPC {{summary_sendToAddress}} {% enditemplate %} -*Parameter #5---automatic fee subtraction +*Parameter #5---automatic fee subtraction* {% itemplate ntpd1 %} - n: "Subtract Fee From Amount" From 886f8470180dbc1ee132961ab1805475235e31b1 Mon Sep 17 00:00:00 2001 From: Matthew Smith Date: Tue, 13 Jun 2017 09:46:01 +0100 Subject: [PATCH 4/5] Fix subtractfeefrom parameter of sendmany subtractfeefrom is an array of addresses, not a bool. --- _includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md b/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md index 6209242a..3cadb096 100644 --- a/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md +++ b/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md @@ -59,9 +59,9 @@ The `sendmany` RPC {{summary_sendMany}} {% itemplate ntpd1 %} - n: "Subtract Fee From Amount" - t: "boolean" + t: "array" p: "Optional
(0 or 1)" - d: "The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. Default is false" + d: "The fee will be equally deducted from the amount of each selected address. Those recipients will receive less bitcoins than you enter in their corresponding amount field. If no addresses are specified here, the sender pays the fee." {% enditemplate %} From 532fd7af9f4ecb880a439cbf62fed19a9af6cd6b Mon Sep 17 00:00:00 2001 From: "David A. Harding" Date: Tue, 13 Jun 2017 12:36:08 -0400 Subject: [PATCH 5/5] Dev Docs: RPCs: edits for Subtract Fee From Amount params --- .../devdoc/bitcoin-core/rpcs/rpcs/fundrawtransaction.md | 8 ++++++++ _includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md | 6 +++++- _includes/devdoc/bitcoin-core/rpcs/rpcs/sendtoaddress.md | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/_includes/devdoc/bitcoin-core/rpcs/rpcs/fundrawtransaction.md b/_includes/devdoc/bitcoin-core/rpcs/rpcs/fundrawtransaction.md index 00c49b69..c3d34d20 100644 --- a/_includes/devdoc/bitcoin-core/rpcs/rpcs/fundrawtransaction.md +++ b/_includes/devdoc/bitcoin-core/rpcs/rpcs/fundrawtransaction.md @@ -70,6 +70,14 @@ All existing inputs must have their previous output transaction be in the wallet p: "Optional
(0 or 1)" d: "A json array of integers. The fee will be equally deducted from the amount of each specified output. The outputs are specified by their zero-based index, before any change output is added." +- n: "→ →
Output index" + t: numeric (int) + p: Optional
(0 or more) + d: "A output index number (vout) from which the fee should be subtracted. + If multiple vouts are provided, the total fee will be divided by the + numer of vouts listed and each vout will have that amount subtracted + from it" + {% enditemplate %} *Result---information about the created transaction* diff --git a/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md b/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md index 3cadb096..f5a9a624 100644 --- a/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md +++ b/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendmany.md @@ -61,8 +61,12 @@ The `sendmany` RPC {{summary_sendMany}} - n: "Subtract Fee From Amount" t: "array" p: "Optional
(0 or 1)" - d: "The fee will be equally deducted from the amount of each selected address. Those recipients will receive less bitcoins than you enter in their corresponding amount field. If no addresses are specified here, the sender pays the fee." + d: "An array of addresses. The fee will be equally divided by as many addresses as are entries in this array and subtracted from each address. If this array is empty or not provided, the fee will be paid by the sender" +- n: "→
Address" + t: "string (base58)" + p: "Optional (0 or more)" + d: "An address previously listed as one of the recipients." {% enditemplate %} *Result---a TXID of the sent transaction* diff --git a/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendtoaddress.md b/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendtoaddress.md index fac75fe5..5686c062 100644 --- a/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendtoaddress.md +++ b/_includes/devdoc/bitcoin-core/rpcs/rpcs/sendtoaddress.md @@ -62,7 +62,7 @@ The `sendtoaddress` RPC {{summary_sendToAddress}} - n: "Subtract Fee From Amount" t: "boolean" p: "Optional
(0 or 1)" - d: "The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. Default is false" + d: "The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. Default is `false`" {% enditemplate %}