{"id":13465925,"url":"https://github.com/limpbrains/django-cc","last_synced_at":"2026-03-07T01:34:55.669Z","repository":{"id":20820389,"uuid":"24106159","full_name":"limpbrains/django-cc","owner":"limpbrains","description":"Django wallet for Bitcoin and other cryptocurrencies","archived":false,"fork":false,"pushed_at":"2020-05-14T11:45:35.000Z","size":70,"stargazers_count":122,"open_issues_count":1,"forks_count":33,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-09-29T02:27:26.816Z","etag":null,"topics":["bitcoin","cryptocurrencies","django","django-cc","dogecoin","litecoin","python","wallet"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/limpbrains.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-16T15:47:14.000Z","updated_at":"2025-07-19T00:30:59.000Z","dependencies_parsed_at":"2022-07-25T08:02:05.819Z","dependency_job_id":null,"html_url":"https://github.com/limpbrains/django-cc","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/limpbrains/django-cc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limpbrains%2Fdjango-cc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limpbrains%2Fdjango-cc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limpbrains%2Fdjango-cc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limpbrains%2Fdjango-cc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/limpbrains","download_url":"https://codeload.github.com/limpbrains/django-cc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limpbrains%2Fdjango-cc/sbom","scorecard":{"id":590251,"data":{"date":"2025-08-11","repo":{"name":"github.com/limpbrains/django-cc","commit":"3af391ebac929c46f24e6ea6019e5edb3e410e61"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":1,"reason":"Found 3/26 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating python:3 to python:3@sha256:50cbf8e58ca53a806b99250b1ba2d16c19433e8c42e7eb4ac4ea924b095e280b","Warn: pipCommand not pinned by hash: Dockerfile:6","Warn: pipCommand not pinned by hash: Dockerfile:8","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"30 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-858 / GHSA-q4xr-rc97-m4xx","Warn: Project is vulnerable to: PYSEC-2015-8 / GHSA-6565-fg86-6jcx","Warn: Project is vulnerable to: PYSEC-2021-98 / GHSA-68w8-qjq3-2gfm","Warn: Project is vulnerable to: PYSEC-2015-7 / GHSA-6g95-x6cj-mg4v","Warn: Project is vulnerable to: PYSEC-2015-11 / GHSA-6wcr-wcqm-3mfh","Warn: Project is vulnerable to: PYSEC-2015-9 / GHSA-7fq8-4pv5-5w5c","Warn: Project is vulnerable to: PYSEC-2015-4 / GHSA-7qfw-j7hp-v45g","Warn: Project is vulnerable to: GHSA-7xr5-9hcq-chf9","Warn: Project is vulnerable to: GHSA-8x94-hmjh-97hq","Warn: Project is vulnerable to: PYSEC-2016-2 / GHSA-c8c8-9472-w52h","Warn: Project is vulnerable to: PYSEC-2016-3 / GHSA-crhm-qpjc-cm64","Warn: Project is vulnerable to: PYSEC-2016-16 / GHSA-fp6p-5xvw-m74f","Warn: Project is vulnerable to: PYSEC-2015-5 / GHSA-gv98-g628-m9x5","Warn: Project is vulnerable to: PYSEC-2015-20 / GHSA-h582-2pch-3xv3","Warn: Project is vulnerable to: GHSA-hmr4-m2h5-33qx","Warn: Project is vulnerable to: PYSEC-2015-18 / GHSA-j3j3-jrfh-cm2w","Warn: Project is vulnerable to: PYSEC-2015-6 / GHSA-jhjg-w2cp-5j44","Warn: Project is vulnerable to: PYSEC-2015-22 / GHSA-pgxh-wfw4-jx2v","Warn: Project is vulnerable to: PYSEC-2016-15 / GHSA-pw27-w7w4-9qc7","Warn: Project is vulnerable to: PYSEC-2015-10 / GHSA-q5qw-4364-5hhm","Warn: Project is vulnerable to: GHSA-rrqc-c2jx-6jgv","Warn: Project is vulnerable to: PYSEC-2019-16 / GHSA-vfq6-hq5r-27r6","Warn: Project is vulnerable to: PYSEC-2015-23 / GHSA-x38m-486c-2wr9","Warn: Project is vulnerable to: PYSEC-2016-18","Warn: Project is vulnerable to: GHSA-29gw-9793-fvw7","Warn: Project is vulnerable to: PYSEC-2015-24 / GHSA-4vwq-x64q-j4cj","Warn: Project is vulnerable to: PYSEC-2017-46 / GHSA-66gw-5xpf-gfp5","Warn: Project is vulnerable to: PYSEC-2015-25 / GHSA-92mr-v722-f48m","Warn: Project is vulnerable to: PYSEC-2022-12 / GHSA-pq7m-3gw7-gq5x","Warn: Project is vulnerable to: PYSEC-2017-47"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T21:41:02.923Z","repository_id":20820389,"created_at":"2025-08-20T21:41:02.923Z","updated_at":"2025-08-20T21:41:02.923Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30205195,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","cryptocurrencies","django","django-cc","dogecoin","litecoin","python","wallet"],"created_at":"2024-07-31T15:00:36.988Z","updated_at":"2026-03-07T01:34:55.623Z","avatar_url":"https://github.com/limpbrains.png","language":"Python","funding_links":[],"categories":["Python Libraries","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# django-cc #\n[![Build Status](https://travis-ci.org/limpbrains/django-cc.svg?branch=master)](https://travis-ci.org/limpbrains/django-cc)\n\nDjango-cryptocurrencies web wallet for Bitcoin and a few other cryptocurrencies.\n\nSimple pluggable application inspired by django-bitcoin.\n\nPython 3\n\n## Features ##\n* Multi-currency\n* Celery support\n* Withdraw and Deposit\n* 3 types of balances: balance, unconfirmed, holded\n* Works over bitcoind json-rpc\n\n## Quick start ##\n\nEdit Currency model\n```python\n\nfrom cc.models import Currency\n\ncurrency = Currency.objects.create(\n    label = 'Bitcoin',\n    ticker = 'BTC',\n    api_url = 'http://root:toor@localhost:8332'\n)\n```\n\nStart Celery worker\n```bash\n$ celery worker -A tst.cel.app\n```\n\nGet new addresses for wallets\n\n```bash\n$ celery call cc.tasks.refill_addresses_queue\n```\n\nNow you can create wallets, deposit and withdraw funds\n\n```python\nfrom cc.models import Wallet\n\nwallet = Wallet.objects.create(\n    currency=currency\n)\n\nwallet.get_address()\n\nwallet.withdraw_to_address('mvEnyQ9b9iTA11QMHAwSVtHUrtD4CTfiDB', Decimal('0.01'))\n```\n\nAfter creating a withdraw transaction, you need to run\n\n```bash\n$ celery call cc.tasks.process_withdraw_transactions\n```\n\nQuery for new deposit transactions:\n```bash\n$ cc.tasks.query_transactions\n```\n\nIf you want to catch event from bitcoind, but these calls options in bitcoin.conf file\n\n```\nwalletnotify=~/env/bin/celery call cc.tasks.query_transaction --args='[\"BTC\", \"'%s'\"]'\nblocknotify=~/env/bin/celery call cc.tasks.query_transactions --args='[\"BTC\"]'\n```\nwhere \"BTC\" - ticker (short name) of the Currency\n\n## More details\n\n### Limitations ###\n* Works with full node. For each cryptocurrency you will need to run a full node, which usually requires a lot of disk space. But by running full node you are actually helping the network, so it is a good thing.\n* Coins are mixed between wallets. When you withdraw funds from the wallet, you can't choose which UTXO will be used.\n* During the withdrawal you can't choose transaction fee. 'Django-cc' uses 'send_many' RPC call, bitcoind calculates how much you will spend on transaction fee. When withdraw is finished, spent fee will be subtracted from wallet balance. To reduce fees, change 'txconfirmtarget' in your bitcoin.conf.\n\n### Configuring Celery tasks ###\nThis library relies heavily on Celery for running tasks in the background. You need to add it to your Project. There are a few tasks which djano-cc should do periodically:\n\n* 'refill_addresses_queue'. It queries bitcoind for new addresses and store them in DB. Each time you create a wallet and call 'wallet.get_address()' unused address will be attached to the wallet. By default, it keeps amount for new addresses to 20. You can tune this by changing 'CC_ADDRESS_QUEUE' in your project settings. Usually running this task once in an hour is enought.\n* 'process_withdraw_transactions'. It queries DB for any new withdraw transactions and executes them. By running it not so often, you can batch transactions, this will help you reduce network fees.\n* 'query-transactions'. It queries bitcoind for new incoming transactions and updates wallets balances. Bitcoin network creates one block per approximately 10 minutes, so no need to run it more often.\n\nBut it is better to run 'query-transactions' in response to new events from bitcoind. You can do this by adding these lines to bitcoin.conf\n```\nwalletnotify=~/env/bin/celery call cc.tasks.query_transaction --args='[\"BTC\", \"'%s'\"]'\nblocknotify=~/env/bin/celery call cc.tasks.query_transactions --args='[\"BTC\"]'\n```\nEach time bitcoin will receive new tx or block, you will get an instant update on balances.\n\nIf bitcoind works in another environment, you can send this events by HTTP hooks. Expose 'django-cc' views in urls.py:\n```python\nurlpatterns = [\n...\nurl(r'^cc/', include('cc.urls')),\n]\n```\nThen you can send http requests to trigger actions:\n```bash\ncurl -k \"https://yourhost/cc/blocknotify/?currency=BTC\"\ncurl -k \"https://yourhost/cc/walletnotify/?currency=BTC\u0026txid=$1\"\n```\n\n### API ###\n\nWithdraw to network:\n```python\nwallet.withdraw_to_address('mvEnyQ9b9iTA11QMHAwSVtHUrtD4CTfiDB', Decimal('0.01'))\n```\n\nTransfer from wallet to wallet:\n```python\nwallet1.transfer(wallet1.balance, wallet2, None, 'description')\n```\n\nGet wallet history:\n```python\nfor operation in wallet.get_operations():\n    print(operation.created)\n    print(operation.balance)\n    print(operation.reason.txid)\n    print(operation.reason.address)\n```\n\n### Database transactions\n\nWhen you write applications that are working with money, it is extremely important to use Database transactions. Currenly django-cc doesn't inclues any '@transaction.atomic'. You should do this by yourself.\n\nIn my code I have a higher level wrapper with @transaction.atomic and to get wallets I'm always using select for update, like 'Wallet.objects.select_for_update().get(addresses=address)' to get a lock over the Wallet.\n\n## Supported cryptocurrencies\n\nIn general django-cc should work with most Bitcoin forks. I've tested it against: Bitcoin, Litecoin, Zcash (not anonymous transactions), Dogecoin and Dash. \n\nWhen you are adding any other than Bitcoin `Currency`, you should define `magicbyte` and `dust` values. Use tables below to get the values.\n\n### Magic bytes\n\nMagic bytes are used to verify withdraw addresses. They are different for each cryptocurrency.\n\n| CC       | Mainnet | Testnet |\n| -------- | ------- | ------- |\n| Bitcoin  | 0,5     | 111,196 | \n| Litecoin | 48,50   | 58      | \n| Zcash    | 28      | 29      | \n| Dogecoin | 30,22   |         | \n| Dash     | 76,16   | 140     | \n\n### Dust\n\nMinimal amount of valid transaction\n\n| CC       | Dust size    |\n| -------- | ------------ |\n| Bitcoin  | `0.00005430` |\n| Litecoin | `0.00054600` |\n\n### Settings ###\n\nCC_CONFIRMATIONS - how many confirmations incoming transaction needs to increase wallet balance. Default is 2.\nCC_ADDRESS_QUEUE - how many addresses generate during `refill_addresses_queue`. Default is 20.\nCC_ALLOW_NEGATIVE_BALANCE - minimal amount of Wallet to be able to withdraw funds from it. Default is Decimal('0.001').\nCC_ACCOUNT - Bitcoind once had an account system. Now it is deprecated. Do not change this.  Default is '' — empty string.\nCC_ALLOWED_HOSTS - list of addresses how can call `/cc/blocknotify` and `/cc/walletnotify`. Default is `['localhost', '127.0.0.1']`.\n\n### Testing\n\nTests are written using Regtest. To run them you need docker and docker-compose. Simply run `docker-compose up` and it will build and run all tests for you. Usually it takes about 5 min to run all the tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimpbrains%2Fdjango-cc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flimpbrains%2Fdjango-cc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimpbrains%2Fdjango-cc/lists"}