limpbrains / django-cc Goto Github PK
View Code? Open in Web Editor NEWDjango wallet for Bitcoin and other cryptocurrencies
License: MIT License
Django wallet for Bitcoin and other cryptocurrencies
License: MIT License
docker-compose Start, how can DNS report errors
Hi, I am receiving the following error when i start my celery worker
KeyError: 'wallet.tasks.refill_addresses_queue'
I have my broker running, as well as bitcoind, and have an instance of my currency model within my database.
Do i require the django-celery backend in order to save the results of the task to the DB?
thanks
hello:
how to support usdt coin ?
Hi,
First off thanks for great library.
Quick question, after I initially import my address from my bitcoind wallet.dat file using the refill_address_queue
What happens when I require say another 100 address? Are they automatically generated or do I need to run a script to ensure that fresh address are being generated periodically by bitcoind.
Finally from what I understand btc address are a one use thing therefore each time a confirmed transaction hits the wallet i should generate a new address for the wallet and update the wallet model with the new address?
Thanks again
hello.
can you please help me, i cant start celery worker. i did make Currency model in python, but celery gives me error:
(venv) kamba@kubuThink:~/www/escrow$ celery worker -A tst.cel.app
Error:
Unable to load celery application.
The module tst was not found.
How to use the celery worker -A tst.cel.app
and celery call cc.tasks.refill_addresses_queue
celery commands as a python function, except for the command line?
Included in the following commands
celery call cc.tasks.process_withdraw_transactions
cc.tasks.query_transactions
import celery
def celery(self):
a = celery call cc.tasks.process_withdraw_transactions
return a
As an example; I would do it like this?
Hello,
your Project seems intressting to me but i dont know how to use it?
Can you please create a documentation where we have some examples in place. I currently dont understand how to create Wallets for my users or how to get things setup Witz the current doc.
Thanks
@limpbrains see you're still active on this project, and I was hoping to use it for a zcash fork that only uses z_ operations.
Wanted to know if you were working on adding such functionality. I've forked it and have started trying to update things on my end, but I was wondering if you might have time to talk with me to clear up some questions I have.
I've added a boolean to the currency model for 'shielded_transactions', and have been able to get refill_address_queue working:
@shared_task()
def refill_addresses_queue():
for currency in Currency.objects.all():
coin = AuthServiceProxy(currency.api_url)
count = Address.objects.filter(currency=currency, active=True, wallet=None).count()
if count < settings.CC_ADDRESS_QUEUE:
for i in range(count, settings.CC_ADDRESS_QUEUE):
try:
if currency.shielded_transactions:
Address.objects.create(address=coin.z_getnewaddress(settings.CC_ACCOUNT), currency=currency)
else:
Address.objects.create(address=coin.getnewaddress(settings.CC_ACCOUNT), currency=currency)
except (socket_error, CannotSendRequest) :
pass
Wanted to pick your brain if you're game...
1.linux ui
ml@ubuntu:~/django-cc/testproject$ python3 manage.py runserver 0.0.0.0:8332
Performing system checks...
System check identified no issues (0 silenced).
March 30, 2019 - 08:13:27
Django version 2.1.7, using settings 'testproject.settings'
Starting development server at http://0.0.0.0:8332/
Quit the server with CONTROL-C.
Invalid HTTP_HOST header: '0.0.0.0:8332'. You may need to add '0.0.0.0' to ALLOWED_HOSTS.
Bad Request: /
[30/Mar/2019 08:13:36] "GET / HTTP/1.1" 400 65136
Invalid HTTP_HOST header: '0.0.0.0:8332'. You may need to add '0.0.0.0' to ALLOWED_HOSTS.
Bad Request: /favicon.ico
[30/Mar/2019 08:13:38] "GET /favicon.ico HTTP/1.1" 400 65118
Not Found: /
[30/Mar/2019 08:14:03] "GET / HTTP/1.1" 404 2030
Not Found: /favicon.ico
[30/Mar/2019 08:14:07] "GET /favicon.ico HTTP/1.1" 404 2081
Not Found: /
[30/Mar/2019 08:14:17] "GET / HTTP/1.1" 404 2030
Not Found: /
[30/Mar/2019 08:14:25] "GET / HTTP/1.1" 404 2030
2.
Page not found (404)
Request Method: GET
Request URL: http://localhost:8332/
Using the URLconf defined in testproject.urls, Django tried these URL patterns, in this order:
admin/
^cc/
The empty path didn't match any of these.
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
when I write that command it stays as loading but absolutely nothing happens.
celery call -b redis:localhost:6379/0 cc.task.refill_addresses_queue
i want to create a address for user how i cant insert this celery task on view
i mean call task always return a address how i insert this on view? only call without write it manually
s
Tried to insert a bech32 wallet but current validator does not accept non base 58 wallets..
Could I create a PR for this feature?
I'm trying to add my cryptocurrency, Zeal, and it is not working (wallet.get_address() for a newly created wallet is None). I think my magicbyte and dust values are correct. I think it's the last_block that is throwing things off. Also, my api_url is my full node. Is that alright?
My coin is a Litecoin 0.8.7.5 fork.
Is it safe to update the balance? If different threads or processes update the balance of a wallet at the same time, will there be any problems?
Hi!
If i wanted to use multisig would I need to tweak the models myself or is it something that is already implemented?
Thanks
Hello mate.
Tell me pls, what kind of currencies do you support?
Bitcoin = BTC
BitcoinCash = BCH or BCC
Litecoin = LTC
Dash = DASH
Dogecoin = DOGE
Is this correct? What else?
Thank you for support.
Hi, I'm just integrating this repo with my django app, i' m able to do the withdraw transaction. but i don't know how to do the deposit transaction with celery . please help me out also please put the deposit transaction example in readme @limpbrains
Hi!
Just another quick question,
Currently when withdrawing the account balance will go into negative, I'm assuming this is due to blockchain transaction fee.
To prevent this from happening do you think only allowing a user to withdraw at most 98% of there funds at a time is a suitable approach?
Thanks
Hi, I'm interested in using this codebase for a project. One thing I was wondering about is why, for example, Wallet.withdraw_to_address
doesn't wrap everything in a transaction. It seems there could be various race conditions between the time when the model is first fetched from database, and when .save() is called.
I am a bit new to django as well, though, is there some reason why locking would not be necessary?
Hi there,
Just wondered if multi-sig was supported Thanks
Hi again,
Just a quick question,
I am currently running refill_address_queue
Process_withdraw_transaction and query_transaction as a celery beat task configured in settings and am calling it directly from cc.tasks is this the correct way to have it configured or should I be doing it differently?
Thanks!
hi there,
Nice project.
Have you tested with monero?
How do you derive the magic byte values for crypto (sorry couldn't find a definitive answer from google)
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.