Skip to content

Commit 41ba061

Browse files
committed
[docs] Add release notes for wallet 'label' API.
1 parent 189e0ef commit 41ba061

File tree

2 files changed

+32
-10
lines changed

2 files changed

+32
-10
lines changed

doc/release-notes-pr12892.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
'label' API for wallet
2+
----------------------
3+
4+
A new 'label' API has been introduced for the wallet. This is intended as a
5+
replacement for the deprecated 'account' API.
6+
7+
The label RPC methods mirror the account functionality, with the following functional differences:
8+
9+
- Labels can be set on any address, not just receiving addresses. This functionality was previously only available through the GUI.
10+
- Labels can be deleted by reassigning all addresses using the `setlabel` RPC method.
11+
- There isn't support for sending transactions _from_ a label, or for determining which label a transaction was sent from.
12+
- Labels do not have a balance.
13+
14+
Here are the changes to RPC methods:
15+
16+
| Deprecated Method | New Method | Notes |
17+
| :---------------------- | :-------------------- | :-----------|
18+
| `getaccount` | `getaddressinfo` | `getaddressinfo` returns a json object with address information instead of just the name of the account as a string. |
19+
| `getaccountaddress` | `getlabeladdress` | `getlabeladdress` throws an error by default if the label does not already exist, but provides a `force` option for compatibility with existing applications. |
20+
| `getaddressesbyaccount` | `getaddressesbylabel` | `getaddressesbylabel` returns a json object with the addresses as keys, instead of a list of strings. |
21+
| `getreceivedbyaccount` | `getreceivedbylabel` | _no change in behavior_ |
22+
| `listaccounts` | `listlabels` | `listlabels` does not return a balance or accept `minconf` and `watchonly` arguments. |
23+
| `listreceivedbyaccount` | `listreceivedbylabel` | Both methods return new `label` fields, along with `account` fields for backward compatibility. |
24+
| `move` | n/a | _no replacement_ |
25+
| `sendfrom` | n/a | _no replacement_ |
26+
| `setaccount` | `setlabel` | Both methods now: <ul><li>allow assigning labels to any address, instead of raising an error if the address is not receiving address.<li>delete the previous label associated with an address when the final address using that label is reassigned to a different label, instead of making an implicit `getaccountaddress` call to ensure the previous label still has a receiving address. |
27+
28+
| Changed Method | Notes |
29+
| :--------------------- | :------ |
30+
| `addmultisigaddress` | Renamed `account` named parameter to `label`. Still accepts `account` for backward compatibility. |
31+
| `getnewaddress` | Renamed `account` named parameter to `label`. Still accepts `account` for backward compatibility. |
32+
| `listunspent` | Returns new `label` fields, along with `account` fields for backward compatibility. |

doc/release-notes.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,6 @@ RPC changes
6363

6464
- The `createrawtransaction` RPC will now accept an array or dictionary (kept for compatibility) for the `outputs` parameter. This means the order of transaction outputs can be specified by the client.
6565
- The `fundrawtransaction` RPC will reject the previously deprecated `reserveChangeKey` option.
66-
- Wallet `getnewaddress` and `addmultisigaddress` RPC `account` named
67-
parameters have been renamed to `label` with no change in behavior.
68-
- Wallet `getlabeladdress`, `getreceivedbylabel`, `listreceivedbylabel`, and
69-
`setlabel` RPCs have been added to replace `getaccountaddress`,
70-
`getreceivedbyaccount`, `listreceivedbyaccount`, and `setaccount` RPCs,
71-
which are now deprecated. There is no change in behavior between the
72-
new RPCs and deprecated RPCs.
73-
- Wallet `listreceivedbylabel`, `listreceivedbyaccount` and `listunspent` RPCs
74-
add `label` fields to returned JSON objects that previously only had
75-
`account` fields.
7666
- `sendmany` now shuffles outputs to improve privacy, so any previously expected behavior with regards to output ordering can no longer be relied upon.
7767
- The new RPC `testmempoolaccept` can be used to test acceptance of a transaction to the mempool without adding it.
7868

0 commit comments

Comments
 (0)