Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ sending = []
receiving = []

[dependencies]
secp256k1 = {version = "0.28.1", features = ["rand"] }
secp256k1 = { version = "0.29", default-features = false, features = ["alloc"] }
hex = "0.4"
bech32 = "0.9"
bimap = "0.6"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
bitcoin_hashes = "0.13.0"
bitcoin_hashes = "0.14"

# Optional PSBT dependencies
bitcoin = { version = "0.32.8", optional = true, default-features = false }

[dev-dependencies]
rust-bip39 = { version = "1.0.0", features = ["rand"] }
bitcoin ={ version = "0.31.1", features = ["serde"] }
bitcoin = { version = "0.32.8", features = ["serde", "std"] }
secp256k1 = { version = "0.29", features = ["std", "rand-std"] }
55 changes: 55 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Once just v1.39.0 is widely deployed, simplify with the `read` function.
NIGHTLY_VERSION := trim(shell('cat "$1"', justfile_directory() / "nightly-version"))

_default:
@just --list

# Install rbmt (Rust Bitcoin Maintainer Tools).
@_install-rbmt:
cargo install --quiet --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git --rev $(cat {{justfile_directory()}}/rbmt-version) cargo-rbmt

# Cargo check everything.
check:
cargo check --all --all-targets --all-features

# Cargo build everything.
build:
cargo build --all --all-targets --all-features

# Test everything.
test:
cargo test --all-targets --all-features

# Lint everything.
lint:
cargo +{{NIGHTLY_VERSION}} clippy --all-targets --all-features -- --deny warnings

# Run cargo fmt
fmt:
cargo +{{NIGHTLY_VERSION}} fmt --all

# Generate documentation.
docsrs *flags:
RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +{{NIGHTLY_VERSION}} doc --all-features {{flags}}

# Update the recent and minimal lock files using rbmt.
[group('tools')]
@update-lock-files: _install-rbmt
rustup run {{NIGHTLY_VERSION}} cargo rbmt lock

# Run CI tasks with rbmt.
[group('ci')]
@ci task toolchain="stable" lock="recent": _install-rbmt
RBMT_LOG_LEVEL=quiet rustup run {{toolchain}} cargo rbmt --lock-file {{lock}} {{task}}

# Test crate.
[group('ci')]
ci-test: (ci "test stable")

# Lint crate.
[group('ci')]
ci-lint: (ci "lint" NIGHTLY_VERSION)

# Bitcoin core integration tests.
[group('ci')]
ci-integration: (ci "integration")
1 change: 1 addition & 0 deletions nightly-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nightly-2025-01-21
2 changes: 1 addition & 1 deletion src/receiving.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl Serialize for SerializablePubkey {
S: serde::Serializer,
{
let mut seq = serializer.serialize_tuple(self.0.len())?;
for element in self.0.as_ref() {
for element in <[u8; 33] as AsRef<[u8]>>::as_ref(&self.0) {
seq.serialize_element(element)?;
}
seq.end()
Expand Down
Loading