Skip to main content
added 1 character in body
Source Link

I'm running a Bitcoin testnet node on a Ubuntu 22.04 VM using UTM for Macbooks M1.

I'm trying to connect via json-rpc using https://github.com/jgarzik/python-bitcoinrpc.

1 - I installed the package etc..

2 - I edited my .conf file in /home/kk/snap/bitcoin-core/common/.bitcoin/bitcoin.conf:

server=1
testnet=1
daemon=1
prune=1000
fallbackfee=0.00001
rpcuser=kk
rpcpassword=testpass
rpcallowip=127.0.0.1
[test]
rpcbind=127.0.0.1
rpcport=18332

3 - I created a file called "btcrpc.py":

from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from print import pprint

# rpc_user and rpc_password are set in the bitcoin. conf file
rpc_user = "kk"
rpc_pass = "testpass"
rpc_host = "127.0.0.1"
pc_clientrpc_client = AuthServiceProxy(f'http://frpc_user}:{rpc_pass}@{rpc_host}:18332", timeout=120)

block_count = rpc_client.getblockcount()
print (block_count)

When I run btcrpc.py that's the error:

Why is it unauthorized?

What am I doing wrong?

I'm running a Bitcoin testnet node on a Ubuntu 22.04 VM using UTM for Macbooks M1.

I'm trying to connect via json-rpc using https://github.com/jgarzik/python-bitcoinrpc.

1 - I installed the package etc..

2 - I edited my .conf file in /home/kk/snap/bitcoin-core/common/.bitcoin/bitcoin.conf:

server=1
testnet=1
daemon=1
prune=1000
fallbackfee=0.00001
rpcuser=kk
rpcpassword=testpass
rpcallowip=127.0.0.1
[test]
rpcbind=127.0.0.1
rpcport=18332

3 - I created a file called "btcrpc.py":

from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from print import pprint

# rpc_user and rpc_password are set in the bitcoin. conf file
rpc_user = "kk"
rpc_pass = "testpass"
rpc_host = "127.0.0.1"
pc_client = AuthServiceProxy(f'http://frpc_user}:{rpc_pass}@{rpc_host}:18332", timeout=120)

block_count = rpc_client.getblockcount()
print (block_count)

When I run btcrpc.py that's the error:

Why is it unauthorized?

What am I doing wrong?

I'm running a Bitcoin testnet node on a Ubuntu 22.04 VM using UTM for Macbooks M1.

I'm trying to connect via json-rpc using https://github.com/jgarzik/python-bitcoinrpc.

1 - I installed the package etc..

2 - I edited my .conf file in /home/kk/snap/bitcoin-core/common/.bitcoin/bitcoin.conf:

server=1
testnet=1
daemon=1
prune=1000
fallbackfee=0.00001
rpcuser=kk
rpcpassword=testpass
rpcallowip=127.0.0.1
[test]
rpcbind=127.0.0.1
rpcport=18332

3 - I created a file called "btcrpc.py":

from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from print import pprint

# rpc_user and rpc_password are set in the bitcoin. conf file
rpc_user = "kk"
rpc_pass = "testpass"
rpc_host = "127.0.0.1"
rpc_client = AuthServiceProxy(f'http://frpc_user}:{rpc_pass}@{rpc_host}:18332", timeout=120)

block_count = rpc_client.getblockcount()
print (block_count)

When I run btcrpc.py that's the error:

Why is it unauthorized?

What am I doing wrong?

deleted 6 characters in body
Source Link

I'm running a Bitcoin testnet node on a Ubuntu 22.04 VM using UTM for Macbooks M1.

I'm trying to connect via json-rpc using https://github.com/jgarzik/python-bitcoinrpc.

1 - I installed the package etc..

2 - I edited my .conf file in /home/kk/snap/bitcoin-core/common/.bitcoin/bitcoin.conf:

server=1
testnet=1
daemon=1
prune=1000
fallbackfee=0.00001
rpcuser=kk
rpcpassword=testpass
rpcallowip=127.0.0.1
[test]
rpcbind=127.0.0.1
rpcport=18332
server=1
testnet=1
daemon=1
prune=1000
fallbackfee=0.00001
rpcuser=kk
rpcpassword=testpass
rpcallowip=127.0.0.1
[test]
rpcbind=127.0.0.1
rpcport=18332

3 - I created a file called "btcrpc.py":

from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from print import pprint

# rpc_user and rpc_password are set in the bitcoin. conf file
rpc_user = "kk"
rpc_pass = "testpass"
rpc_host = "127.0.0.1"
pc_client = AuthServiceProxy(f'http://frpc_user}:{rpc_pass}@{rpc_host}:18332", timeout=120)

block_count = rpc_client.getblockcount()
print (block_count)

When I run btcrpc.py that's the error:

Why is it unauthorized?

What am I doing wrong?

I'm running a Bitcoin testnet node on a Ubuntu 22.04 VM using UTM for Macbooks M1.

I'm trying to connect via json-rpc using https://github.com/jgarzik/python-bitcoinrpc.

1 - I installed the package etc..

2 - I edited my .conf file in /home/kk/snap/bitcoin-core/common/.bitcoin/bitcoin.conf:

server=1
testnet=1
daemon=1
prune=1000
fallbackfee=0.00001
rpcuser=kk
rpcpassword=testpass
rpcallowip=127.0.0.1
[test]
rpcbind=127.0.0.1
rpcport=18332

3 - I created a file called "btcrpc.py":

from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from print import pprint

# rpc_user and rpc_password are set in the bitcoin. conf file
rpc_user = "kk"
rpc_pass = "testpass"
rpc_host = "127.0.0.1"
pc_client = AuthServiceProxy(f'http://frpc_user}:{rpc_pass}@{rpc_host}:18332", timeout=120)

block_count = rpc_client.getblockcount()
print (block_count)

When I run btcrpc.py that's the error:

Why is it unauthorized?

What am I doing wrong?

I'm running a Bitcoin testnet node on a Ubuntu 22.04 VM using UTM for Macbooks M1.

I'm trying to connect via json-rpc using https://github.com/jgarzik/python-bitcoinrpc.

1 - I installed the package etc..

2 - I edited my .conf file in /home/kk/snap/bitcoin-core/common/.bitcoin/bitcoin.conf:

server=1
testnet=1
daemon=1
prune=1000
fallbackfee=0.00001
rpcuser=kk
rpcpassword=testpass
rpcallowip=127.0.0.1
[test]
rpcbind=127.0.0.1
rpcport=18332

3 - I created a file called "btcrpc.py":

from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from print import pprint

# rpc_user and rpc_password are set in the bitcoin. conf file
rpc_user = "kk"
rpc_pass = "testpass"
rpc_host = "127.0.0.1"
pc_client = AuthServiceProxy(f'http://frpc_user}:{rpc_pass}@{rpc_host}:18332", timeout=120)

block_count = rpc_client.getblockcount()
print (block_count)

When I run btcrpc.py that's the error:

Why is it unauthorized?

What am I doing wrong?

added 16 characters in body
Source Link

I'm running a Bitcoin testnet node on a Ubuntu 22.04 VM using UTM for Macbooks M1.

I'm trying to connect via json-rpc using https://github.com/jgarzik/python-bitcoinrpc.

1 - I installed the package etc..

2 - I edited my .conf file in /home/kk/snap/bitcoin-core/common/.bitcoin/bitcoin.conf:

testnet=1
daemon=1
prune=1000
fallbackfee=0.00001
rpcuser=kk
rpcpassword=testpass
rpcallowip=127.0.0.1
[test]
rpcbind=127.0.0.1
rpcport=18332
server=1
testnet=1
daemon=1
prune=1000
fallbackfee=0.00001
rpcuser=kk
rpcpassword=testpass
rpcallowip=127.0.0.1
[test]
rpcbind=127.0.0.1
rpcport=18332

3 - I created a file called "btcrpc.py":

from print import pprint

# rpc_user and rpc_password are set in the bitcoin. conf file
rpc_user = "kk"
rpc_pass = "testpass"
rpc_host = "127.0.0.1"
pc_client = AuthServiceProxy(f'http://frpc_user}:{rpc_pass}@{rpc_host}:18332", timeout=120)

block_count = rpc_client.getblockcount()
print (block_count)
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from print import pprint

# rpc_user and rpc_password are set in the bitcoin. conf file
rpc_user = "kk"
rpc_pass = "testpass"
rpc_host = "127.0.0.1"
pc_client = AuthServiceProxy(f'http://frpc_user}:{rpc_pass}@{rpc_host}:18332", timeout=120)

block_count = rpc_client.getblockcount()
print (block_count)

When I run btcrpc.py that's the error:

Why is it unauthorized?

What am I doing wrong?

I'm running a Bitcoin testnet node on a Ubuntu 22.04 VM using UTM for Macbooks M1.

I'm trying to connect via json-rpc using https://github.com/jgarzik/python-bitcoinrpc.

1 - I installed the package etc..

2 - I edited my .conf file in /home/kk/snap/bitcoin-core/common/.bitcoin/bitcoin.conf:

testnet=1
daemon=1
prune=1000
fallbackfee=0.00001
rpcuser=kk
rpcpassword=testpass
rpcallowip=127.0.0.1
[test]
rpcbind=127.0.0.1
rpcport=18332

3 - I created a file called "btcrpc.py":

from print import pprint

# rpc_user and rpc_password are set in the bitcoin. conf file
rpc_user = "kk"
rpc_pass = "testpass"
rpc_host = "127.0.0.1"
pc_client = AuthServiceProxy(f'http://frpc_user}:{rpc_pass}@{rpc_host}:18332", timeout=120)

block_count = rpc_client.getblockcount()
print (block_count)

When I run btcrpc.py that's the error:

Why is it unauthorized?

What am I doing wrong?

I'm running a Bitcoin testnet node on a Ubuntu 22.04 VM using UTM for Macbooks M1.

I'm trying to connect via json-rpc using https://github.com/jgarzik/python-bitcoinrpc.

1 - I installed the package etc..

2 - I edited my .conf file in /home/kk/snap/bitcoin-core/common/.bitcoin/bitcoin.conf:

server=1
testnet=1
daemon=1
prune=1000
fallbackfee=0.00001
rpcuser=kk
rpcpassword=testpass
rpcallowip=127.0.0.1
[test]
rpcbind=127.0.0.1
rpcport=18332

3 - I created a file called "btcrpc.py":

from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from print import pprint

# rpc_user and rpc_password are set in the bitcoin. conf file
rpc_user = "kk"
rpc_pass = "testpass"
rpc_host = "127.0.0.1"
pc_client = AuthServiceProxy(f'http://frpc_user}:{rpc_pass}@{rpc_host}:18332", timeout=120)

block_count = rpc_client.getblockcount()
print (block_count)

When I run btcrpc.py that's the error:

Why is it unauthorized?

What am I doing wrong?

edited tags
Link
Loading
Source Link
Loading