I haved tried to run python main.py --recipient BXKidrUiYNgRmDeDX61k6 CASEJ2HjM8pUF --amount 0.12. The scripts starts but asked rpcusername and pword many times like this
Enter username for jsonrpc at 127.0.0.1:14002: xxx
Enter password for flotty in jsonrpc at 127.0.0.1:14002:
Multisig address seems valid.
Snapshot of BqyRzFtWXDmjxrYpyJD42MLE5xc8FrB4js not found on disk.
Trying to fetch online…
Newest remote snapshot for BqyRzFtWXDmjxrYpyJD42MLE5xc8FrB4js found at: dc-tcs
Updating address snapshot…
Enter username for jsonrpc at 127.0.0.1:14002: xxx
Enter password for flotty in jsonrpc at 127.0.0.1:14002:
…
I think the reason for asking username and passwd is that I start nu with a non-standard directory with these command line options -conf=d:\foo\bar\nu.conf -datadir=d:\foo\bar\. How do I tell main.py where to look for nu.conf ?
The script no longer runs nud directly, it makes http requests to the RPC server within nu -server or nud. If the RPC server runs correctly things should be ok.
I’m a bit behind testing the scripts, but will be up-to-date soon.
Thank you, @dysconnect and @ttutdxh for your efforts of creating the scripts and the rest of the FLOT to contribute in getting this started!
Looking forward to working with you guys!
It’s used for storing unspent outputs of the address in pubconfig.py. If one person git pushes it will be up-to-date. Then it can be retrieved by software that does not have access to the blockchain.
facepalm could have recognized that myself…
Well spotted, @jooize!
Fixed that. Next error:
python main.py --recipient BXKidrUiYNgRmDeDX61k6CASEJ2HjM8pUF --amount 0.1
Traceback (most recent call last):
File "main.py", line 19, in <module>
import chainutils as nbtutil
File "/home/pi/git-multisig/chainutils.py", line 21, in <module>
import config
ImportError: No module named config
It seems I don’t know how to use this fine piece of software…
My pubconfig.py looks like this - with the right nud rpc parameters of course:
cat pubconfig.py
import os
#ADDRESS: Multisig address
#ADDRESSESS: Constituents of the Multisig address
#These scripts can only track 1 address for now
ADDRESS = "BqyRzFtWXDmjxrYpyJD42MLE5xc8FrB4js"
ADDRESSES = set([])
PUBKEYS = ["034b0bd0f653d4ac0a2e9e81eb1863bb8e5743f6cb1ea40d845b939c225a1a80ff","02a144af74d018501f03d76ead130433335f969772792ec39ce389c8a234155259","03661a4370dfcfbcea25d1800057220f4572b6eecab95bb0670e8676a9e34451dc","0234139729dd413c84a71a0bfd6f236790be861b37311cef3240277c940e4b0c07","02547427fc2ea3a0ab9ef70f5e1640ff5112b113f65696948f992bd0770b942571"]
SIGN_THRESHOLD = 3
#URLs of folders from which to download address snapshots (spendable outputs etc)
#Format should be like this:
#REFERENCE_URLS = {"foo" : "https://bar", "foo2" : "https://bar2", "foo3" : "https://bar3"}
REFERENCE_URLS = {"dc-tcs" : "https://raw.githubusercontent.com/dc-tcs/flot-operations/master",
"jooize" : "https://raw.githubusercontent.com/jooize/flot-operations/master"}
GIT_ENABLED = 0
RPC_PORT = xxx
RPC_USER = xxx
RPC_PASSWORD = xxx
You’ll need to look at config-example.py and create a file called config.py. I did it this way so you can directly git pull from git-multisig without affecting your personal settings.
python main.py --recipient BXKidrUiYNgRmDeDX61k6CASEJ2HjM8pUF --amount 0.1
Address does not match given public keys (note that order matters)
Snapshot of BqyRzFtWXDmjxrYpyJD42MLE5xc8FrB4js not found on disk.
Trying to fetch online...
Newest remote snapshot for BqyRzFtWXDmjxrYpyJD42MLE5xc8FrB4js found at: dc-tcs
Updating address snapshot...
Done.
This is your transaction hex:
01000000a382535602bb2a539844c41f845d68a66baeb26765572af93801f0f3ca46f1f85c0e6edf610000000000fffffffffdd47933815da84323e55aa139e59cd355c26984bb5a6f3ff9eb5b0e12b8daad0100000000ffffffff02e80300000000000017a91426c6f88ca8a0a47b6a015eac69c442b12f715e9f873c0f00000000000017a914f35b24f264597d66ba8c366a5005824bb6a06138870000000053
Sorry for the trouble caused by the buggy software. If you feel comfortable that it git pushes, you can fork flot-operations and enable git, which will cause you to git push and update the address snapshot. After enabling git you should remove the flot-operations folder (just this once) before running the script again. Thanks for testing.
It’s weird that your first line failed despite a correct pubconfig.py; are you running on testnet?
Will do!
The script works fine if I don’t mess with the RTFM part
No, but I created a blank wallet in which I’m going to have only my key pair associated with the multisig address. Haven’t imported the private key yet…
It should work without any private key, as it only checks the sanity of pubconfig.py. Perhaps the blank wallet is read-only? By the way I’ve just forgotten a crucial part: for various use cases you need txindex=1 in nu.conf… I hope this wasn’t a problem for @jooize.