https://github.com/iskyd/walle
Bitcoin wallet written in Zig
https://github.com/iskyd/walle
Last synced: 9 months ago
JSON representation
Bitcoin wallet written in Zig
- Host: GitHub
- URL: https://github.com/iskyd/walle
- Owner: iskyd
- License: mit
- Created: 2023-08-12T09:41:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-11T19:38:19.000Z (10 months ago)
- Last Synced: 2025-04-24T20:51:30.359Z (9 months ago)
- Language: Zig
- Homepage:
- Size: 462 KB
- Stars: 23
- Watchers: 1
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zig - iskyd/walle - A Bitcoin Wallet written in Zig. (Web3 Framework / Large Language Model)
README
# WALL•E
Wall•E is a Bitcoin Wallet written in Zig.
> **WARNING**: This is just an attempt to learn Bitcoin and Zig. Do not use this project with real BTC.
#### Run
Run src/main.zig
``` bash
zig build run
```
Run src/p.zig (used for debugging)
``` bash
zig build run-p
```
#### Testing
``` bash
zig build test
zig build test --summary all -- src/bip39/bip39.zig src/bip38/bip38.zig
```
### Dev Environment
See devbox.json
``` bash
devbox shell
```
### Bitcoin Node
Use Dockerfile to run bitcoin node using bitcoin-core. node/bitcoin.conf can be used as bitcoin config to run regtest with rpcuser walle and pwd password.
``` bash
docker build -t btcnode .
docker volume create btcnode
docker run --rm --name btcnode -v btcnode:/bitcoin-25.0/data -p 18444:18443 btcnode
```
For mac users use this code to build docker image.
``` bash
docker build -t btcnode -f Dockerfile.arm .
```
The first time you run the node you need to create a new wallet (it is no longer created automatically, if the walle was already created use loadwallet) then you can getnewaddress.
``` bash
bitcoin-cli -rpcuser=walle -rpcpassword=password -rpcport=18443 createwallet walle
bitcoin-cli -rpcuser=walle -rpcpassword=password -rpcport=18443 getnewaddress
```
Test bitcoin node from outside container:
```bash
curl --verbose -L --user walle --data-binary '{"jsonrpc": "1.0", "id": "walle", "method": "getblockchaininfo", "params": []}' -H 'content-type: text/plain;' 0.0.0.0:18444
```
### Contributing
Join [WALL•E's Discord channel](https://discord.gg/9e9qnzQAH6) to chat with the contributors and understand next steps, available tasks and bugs to be fixed.
### TODO
- [x] BIP39 (Mnemonic generation)
- [x] BIP32 (HD Wallets)
- [x] Serialized Extendend Private/Public Key (https://learnmeabitcoin.com/technical/keys/hd-wallets/extended-keys/)
- [x] BIP38 (Encrypting Bitcoin Private Key)
- [x] BIP44
- [x] ECDSA Signatures
- [x] Segwit
- [x] Bech32
- [x] BTC Node integration
- [x] Wallet Sync
- [ ] Legacy Wallet
- [ ] Script Hash (P2SH, P2WSH)
- [ ] Transactions
- [ ] CLI
- [ ] Taproot