Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport: trivial 2024 10 23 pr6 #6354

Merged
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
277766f
Merge bitcoin/bitcoin#27493: depends: no-longer nuke libc++abi.so* in…
fanquake May 14, 2023
bef9631
Merge bitcoin/bitcoin#27661: doc, test: Document steps to reproduce T…
fanquake May 15, 2023
105442f
Merge bitcoin/bitcoin#26422: build: Use newest `config.{guess,sub}` a…
fanquake May 16, 2023
f27778a
Merge bitcoin/bitcoin#27561: test: Explicitly specify directory where…
fanquake May 22, 2023
ee6b7d6
Merge bitcoin/bitcoin#27721: depends: remove redundant stdlib option
fanquake May 25, 2023
a21b4b1
Merge bitcoin/bitcoin#27802: Update .style.yapf
fanquake Jun 2, 2023
324db8b
Merge bitcoin/bitcoin#27603: test: added coverage to mining_basic.py
glozow Jun 2, 2023
e2fcd1d
Merge bitcoin/bitcoin#27225: doc: document json rpc endpoints
fanquake Jun 2, 2023
fbc6c6e
Merge bitcoin/bitcoin#27875: build: make sure we can overwrite config…
fanquake Jun 16, 2023
ba5f4c0
Merge bitcoin/bitcoin#27906: doc: test: update TestShell instructions
fanquake Jun 18, 2023
ece625c
Merge bitcoin/bitcoin#27914: feerate: For GetFeePerK() return nSatosh…
fanquake Jun 26, 2023
79a20f9
Merge bitcoin/bitcoin#27929: Added static_assert to check that base_b…
fanquake Jun 27, 2023
af944b7
Merge bitcoin/bitcoin#28013: doc: Fix verify-binaries link in contrib…
fanquake Jun 30, 2023
2767a13
Merge bitcoin/bitcoin#28021: docs: fixup honggfuzz fuzz patch
fanquake Jul 3, 2023
5511091
Merge bitcoin/bitcoin#28036: test: Restore unlimited timeout in Index…
fanquake Jul 7, 2023
70cbd3f
Merge bitcoin/bitcoin#28044: test: indexes, fix on error infinite loop
ryanofsky Jul 11, 2023
e3bbd1a
Merge bitcoin-core/gui#740: Show own outputs on PSBT signing window
hebasto Jul 16, 2023
d573e4f
Merge bitcoin/bitcoin#28084: doc: update windows `-fstack-clash-prote…
fanquake Jul 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions doc/JSON-RPC-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,41 @@ The headless daemon `dashd` has the JSON-RPC API enabled by default, the GUI
option. In the GUI it is possible to execute RPC methods in the Debug Console
Dialog.

## Endpoints

There are two JSON-RPC endpoints on the server:

1. `/`
2. `/wallet/<walletname>/`

### `/` endpoint

This endpoint is always active.
It can always service non-wallet requests and can service wallet requests when
exactly one wallet is loaded.

### `/wallet/<walletname>/` endpoint

This endpoint is only activated when the wallet component has been compiled in.
It can service both wallet and non-wallet requests.
It MUST be used for wallet requests when two or more wallets are loaded.

This is the endpoint used by bitcoin-cli when a `-rpcwallet=` parameter is passed in.
Copy link
Collaborator

@kwvg kwvg Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(27225) nit: Dashify


Best practice would dictate using the `/wallet/<walletname>/` endpoint for ALL
requests when multiple wallets are in use.

### Examples

```sh
# Get block count from the / endpoint when rpcuser=alice and rpcport=38332
$ curl --user alice --data-binary '{"jsonrpc": "1.0", "id": "0", "method": "getblockcount", "params": []}' -H 'content-type: text/plain;' localhost:38332/

# Get balance from the /wallet/walletname endpoint when rpcuser=alice, rpcport=38332 and rpcwallet=desc-wallet
$ curl --user alice --data-binary '{"jsonrpc": "1.0", "id": "0", "method": "getbalance", "params": []}' -H 'content-type: text/plain;' localhost:38332/wallet/desc-wallet

```

## Parameter passing

The JSON-RPC server supports both _by-position_ and _by-name_ [parameter
Expand Down