LedgerHQ / satstack

Bitcoin full node with Ledger Live
BSD 2-Clause "Simplified" License
157 stars 32 forks source link

Implement RPC authentication using .cookie files #13

Open onyb opened 4 years ago

onyb commented 4 years ago

This is useful for people running bitcoind locally on their machine. Also consider using rpcauth.

The rationale for rpcauth: https://twitter.com/nvk/status/1306982094636232712

gabridome commented 3 years ago

(Already noted in #36) In pyhton on Mac this would mean:

with open("/Users/username/Library/Application Support/Bitcoin/.cookie", "r") as creds:
    cookie = creds.read()
rpc_user = cookie.split(":")[0]
rpc_pass = cookie.split(":")[1]

Where of course /Users/username/Library/Application Support/Bitcoinis your -data-dir