Transaction litecoin python

Hello, I would like to ask the experienced, how can I send a litecoin transaction through python?

2 Likes

Hey Shanty- I am currently working through the hurdle of not having a lot of help as well. What I’ve done through the recommendations of others is to use pip to install bitcoin-rpc. Then you can use this sample script:

from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException

rpc_connection = AuthServiceProxy(“ht<I’m not allowed to post links cuz im new>tp://%s:%s@127.0.0.1:9332”%(‘user’, ‘password’))

balances=rpc_connection.omni_getbalance(‘MK6aWjSs589Gh3SHHv2yKcniVDcS3fjBD8’,3545)
print(balances)

delete the message and ‘< >’ in the connection url

What this script does- imports bitcoin-rpc functionality which is used the same way to make a connection to omni- that right way led me to figuring stuff out by searching solutions for bitcoin core and making it work for Omni. The address my omni wallet holding an nft from the 3545 collection (Sad FrogLTC) youll know its working if it returns a balance of 1

Things to look out for:

a Litecoin Folder in %AppData% - make a litecoin.conf file and in it write ur connection options:
rpcuser=user
rpcpassword=password

if you find that Omni made a directory not in default, you can throw a litecoin .conf file in the default path and just put datadir= and itll redirect

hit me up on twitter @84isenough - we can struggle together lol

1 Like