Skip to content

Commit 590fa57

Browse files
authored
Merge pull request #11 from Steake/copilot/implement-wallet-core-functionality
Implement core functionality of BitCell wallet
2 parents edbd07c + 8177b20 commit 590fa57

15 files changed

Lines changed: 5938 additions & 0 deletions

.github/copilot-setup-steps.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Configuration for GitHub Copilot Coding Agent
2+
# This file specifies the runner and setup steps for Copilot
3+
4+
runs-on: ubuntu-22.04-xl
5+
6+
steps:
7+
- name: Install Rust toolchain
8+
uses: dtolnay/rust-toolchain@stable
9+
with:
10+
components: rustfmt, clippy
11+
12+
- name: Cache cargo registry
13+
uses: actions/cache@v4
14+
with:
15+
path: |
16+
~/.cargo/registry
17+
~/.cargo/git
18+
target
19+
key: ${{ runner.os }}-cargo-stable-${{ hashFiles('**/Cargo.lock') }}
20+
restore-keys: |
21+
${{ runner.os }}-cargo-

.github/workflows/release.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
workflow_dispatch:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
RUST_BACKTRACE: 1
11+
12+
jobs:
13+
build:
14+
name: Build ${{ matrix.target }}
15+
runs-on: ${{ matrix.os }}
16+
permissions:
17+
contents: read
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- os: ubuntu-latest
23+
target: x86_64-unknown-linux-gnu
24+
artifact_name: bitcell-linux-x86_64
25+
- os: macos-latest
26+
target: x86_64-apple-darwin
27+
artifact_name: bitcell-macos-x86_64
28+
- os: macos-14 # Native ARM64 runner
29+
target: aarch64-apple-darwin
30+
artifact_name: bitcell-macos-aarch64
31+
- os: windows-latest
32+
target: x86_64-pc-windows-msvc
33+
artifact_name: bitcell-windows-x86_64
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Install Rust
39+
uses: dtolnay/rust-toolchain@stable
40+
with:
41+
targets: ${{ matrix.target }}
42+
43+
- name: Cache cargo registry
44+
uses: actions/cache@v4
45+
with:
46+
path: |
47+
~/.cargo/registry
48+
~/.cargo/git
49+
target
50+
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
51+
restore-keys: |
52+
${{ runner.os }}-${{ matrix.target }}-cargo-
53+
54+
- name: Build release binaries
55+
run: cargo build --release --target ${{ matrix.target }} -p bitcell-node -p bitcell-admin
56+
57+
- name: Create artifact directory
58+
shell: bash
59+
run: mkdir -p artifacts
60+
61+
- name: Copy binaries (Unix)
62+
if: runner.os != 'Windows'
63+
shell: bash
64+
run: |
65+
cp target/${{ matrix.target }}/release/bitcell-node artifacts/
66+
cp target/${{ matrix.target }}/release/bitcell-admin artifacts/
67+
68+
- name: Copy binaries (Windows)
69+
if: runner.os == 'Windows'
70+
shell: bash
71+
run: |
72+
cp target/${{ matrix.target }}/release/bitcell-node.exe artifacts/
73+
cp target/${{ matrix.target }}/release/bitcell-admin.exe artifacts/
74+
75+
- name: Create archive (Unix)
76+
if: runner.os != 'Windows'
77+
shell: bash
78+
run: |
79+
cd artifacts
80+
tar -czvf ../${{ matrix.artifact_name }}.tar.gz *
81+
cd ..
82+
83+
- name: Create archive (Windows)
84+
if: runner.os == 'Windows'
85+
shell: pwsh
86+
run: |
87+
Compress-Archive -Path artifacts/* -DestinationPath ${{ matrix.artifact_name }}.zip
88+
89+
- name: Upload artifact (Unix)
90+
if: runner.os != 'Windows'
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: ${{ matrix.artifact_name }}
94+
path: ${{ matrix.artifact_name }}.tar.gz
95+
retention-days: 7
96+
97+
- name: Upload artifact (Windows)
98+
if: runner.os == 'Windows'
99+
uses: actions/upload-artifact@v4
100+
with:
101+
name: ${{ matrix.artifact_name }}
102+
path: ${{ matrix.artifact_name }}.zip
103+
retention-days: 7
104+
105+
release:
106+
name: Upload Release Assets
107+
needs: build
108+
runs-on: ubuntu-latest
109+
if: github.event_name == 'release'
110+
permissions:
111+
contents: write
112+
113+
steps:
114+
- name: Download all artifacts
115+
uses: actions/download-artifact@v4
116+
with:
117+
path: artifacts
118+
119+
- name: Display structure of downloaded files
120+
run: ls -la artifacts/
121+
122+
- name: Upload release assets
123+
uses: softprops/action-gh-release@v2
124+
with:
125+
files: |
126+
artifacts/bitcell-linux-x86_64/bitcell-linux-x86_64.tar.gz
127+
artifacts/bitcell-macos-x86_64/bitcell-macos-x86_64.tar.gz
128+
artifacts/bitcell-macos-aarch64/bitcell-macos-aarch64.tar.gz
129+
artifacts/bitcell-windows-x86_64/bitcell-windows-x86_64.zip
130+
env:
131+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ members = [
1111
"crates/bitcell-network",
1212
"crates/bitcell-node",
1313
"crates/bitcell-admin",
14+
"crates/bitcell-wallet",
1415
]
1516
resolver = "2"
1617

@@ -74,6 +75,7 @@ parking_lot = "0.12"
7475
rayon = "1.8"
7576
dashmap = "5.5"
7677
bytes = "1.5"
78+
zeroize = { version = "1.8", features = ["derive"] }
7779

7880
[profile.release]
7981
opt-level = 3

crates/bitcell-wallet/Cargo.toml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[package]
2+
name = "bitcell-wallet"
3+
version.workspace = true
4+
authors.workspace = true
5+
edition.workspace = true
6+
rust-version.workspace = true
7+
license.workspace = true
8+
repository.workspace = true
9+
description = "Modular wallet for BitCell blockchain with multi-chain support"
10+
11+
[dependencies]
12+
bitcell-crypto = { path = "../bitcell-crypto" }
13+
bitcell-state = { path = "../bitcell-state" }
14+
15+
# Cryptography
16+
sha2.workspace = true
17+
blake3.workspace = true
18+
k256.workspace = true
19+
rand.workspace = true
20+
rand_core.workspace = true
21+
hex.workspace = true
22+
23+
# BIP39/BIP32 seed phrases
24+
bip39 = "2.0"
25+
hmac = "0.12"
26+
pbkdf2 = { version = "0.12", default-features = false }
27+
28+
# Encoding
29+
bs58 = "0.5"
30+
31+
# Serialization
32+
serde.workspace = true
33+
serde_json = "1.0"
34+
bincode.workspace = true
35+
36+
# Error handling
37+
thiserror.workspace = true
38+
39+
# Utilities
40+
zeroize.workspace = true
41+
parking_lot.workspace = true
42+
43+
[dev-dependencies]
44+
proptest.workspace = true
45+
46+
[features]
47+
default = []
48+
bitcoin = []
49+
ethereum = []

0 commit comments

Comments
 (0)