Author

Topic: Best practice for "hijacking" armoryd.py (Read 586 times)

newbie
Activity: 14
Merit: 1
April 12, 2015, 08:50:16 AM
#2
Ok so clearly I'm a bit of a dunce.

Please correct me if I'm wrong:

copy pasting the directory structure from an already-working and compiled binary to a dev directory and appending that new location to the sys.path in python appears to yield me with a copy of armory command line that i can now mess around with.

So if I modify and tweak some things on this copy pasted OSX source, will it still work on linux? Intuitively I'd say yes, because it's python... but the whole compiling C++ throws me a bit and i'm not sure if whatever those "missing" files were from the git clone that only exist after compiling or taking from compiled versions... afraid they are machine-specific - am I overthinking things?

Also, are there any "gotchas" with dealing with armory to make sure i dont inadvertently destroy my blockchain? There's some code comments warning about accessing same wallet file, and suggestions to copy paste it and have 2 armories access separate wallet files, but what about the blockchain itself - is that safe to have a normal stock GUI app interact, and still have a dev version running on same machine? or do i need to make sure only 1 armory is ever running?

Sorry for all the questions....
newbie
Activity: 14
Merit: 1
April 11, 2015, 02:48:01 PM
#1
Hello there,


Have been using Armory (the full UI app on OSX) for interacting with an offline air gapped PC acting as cold storage for over a year now. All is well - love the software.


Have a pretty open ended question here, hope it's not too vague:

I'd like to create a Web App that utilizes bitcoin and operates primarily on the blockchain. To that end, I need to construct a proper wallet and payment handling mechanism (among other things that are beyond scope of this thread).... but why reinvent the wheel, when armory itself suggests copy pasting any relevant bits from armoryd.py and modifying it to suit my needs. Saw that from this help resource: https://bitcoinarmory.com/using-armory-python/

However, I'm completely lost and cant seem to figure out the "right" way to go about this. Armory the application is rather complex and is more than just a plug and play python script, or so it would appear... Plenty of modules and Cpp compile events that don't come across when you clone the master git branch. I tried importing armoryd module directly after appending the root directory as a python path... missing a few modules like twisted and psutil, after some pip magic it got a little further when trying to import armoryd, but got stuck when it kept yelling about Cpp issues... so I tried doing a 'make' in the root of the git clone, but it failed not finding a CppBlockUtils.py file - which I found out is because some Cpp stuff needs to be compiled.... could not get this to work for the life of me from the git clone....

I wound up doing a full osx build from source via the /osxbuild/build-app.py script, which takes forever & then appears to just re-create the damn binary (that i already had working for awhile, and could simply inspect package contents for the "missing" cpp py file)


I ultimately just want to get all the correct dependancies and modules loaded up into my dev environment so armoryd can get imported into python code & will "just work" - then I can start messing around to see how I can adapt it for my purposes. It appears most of the help docs and examples are out-dated, and for a not-so-great programmer like myself, it's quite overwhelming. If there's any ELi5 reading material/up-to-date instructions, that would be superb!


Also, it should be worth noting this will eventually be deployed on a webserver so 99% Linux based environ when it is used "for real". But I'm on OSX right now.... so..

what's "The Right Way" to not reinvent the wheel and waste a ton of disk space in the process? I use pyenv for the dev environment so as to not mess up system install. What am I missing?

This is assuming a normally installed Qt & fully downloaded blockchain. For my purposes, I do not believe supernode mode will be necessary (if that makes any difference)


Thanks very much for any help to be afforded me!
Jump to: