7

Daedalus is a full node wallet application, but can I use the full node to query the ledger?

9

Daedalus runs its own instance of cardano-node under the hood, so by installing and using cardano-cli, one can connect to this node and interact with the blockchain directly.

  1. Start Daedalus, and wait until it reaches the wallet home screen; the cardano-node.socket file is only made available after the cardano-node has started fully.
  2. Use cardano-cli: [Documentation]

Ubuntu Example (Bash)

export CARDANO_NODE_SOCKET_PATH=/home/$USER/.local/share/Daedalus/mainnet/cardano-node.socket
cardano-cli query tip --mainnet

MacOS Example

export CARDANO_NODE_SOCKET_PATH=~/Library/Application\ Support/Daedalus\ Mainnet/cardano-node.socket
cardano-cli query tip --mainnet

Windows Example (PowerShell)

On Windows, a socket file isn't used, instead we specify the pipe used, which has a different name every time Daedalus runs.

cd "C:\Program Files\Daedalus Mainnet"
$ENV:CARDANO_NODE_SOCKET_PATH = (Get-ChildItem \\.\pipe\ | Where-Object {$_.name -like "cardano-node*"}).FullName
.\cardano-cli.exe query tip --mainnet
7
  • 1
    Would be nice to have Windows and MacOS examples too, at least the default socket paths
    – Ben NOBLE
    May 4 at 2:20
  • Ah I forgot how awkward it was to get the Windows named pipe :D May 4 at 10:02
  • 1
    @soccer193 Trying it via PowerShell doesn't appear to work. Deadalus is running, node fully sync'd. "Shelley command failed: query tip Error: Error while looking up environment variable: CARDANO_NODE_SOCKET_PATH Error: "CARDANO_NODE_SOCKET_PATH"" If I run: Get-ChildItem \\.\pipe\ | Where-Object {$_.name -like "cardano-node-mainnet*"} It returns nothing. Currently using PowerShell 7.1.3 May 5 at 2:28
  • Hey @ChadCarter, left you a response in the 'Cardano' chat room on the right of this page.
    – soccer193
    May 5 at 2:54
  • @soccer193 I posted a response in the chat the other day. If you have any ideas on where the socket path should be in Windows, I'd love to know. May 6 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.