Skip to content
This repository was archived by the owner on Jul 7, 2025. It is now read-only.

Commit 4e37e90

Browse files
committed
Bump version
1 parent eaf2e33 commit 4e37e90

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+8394
-3
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "arch-cli"
3-
version = "0.1.6"
3+
version = "0.1.7"
44
edition = "2021"
55
include = [
66
"src/**/*",

templates/bip322/Cargo.lock

Lines changed: 229 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/bip322/Cargo.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "bip322"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
base64 = "0.22.1"
8+
bitcoin = "0.32.4"
9+
hex = { version = "0.4.3", default-features = false }
10+
snafu = "0.8.5"
11+
12+
[dev-dependencies]
13+
pretty_assertions = "1.4.0"

templates/bip322/src/error.rs

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
use snafu::Snafu;
2+
#[derive(Debug, Snafu)]
3+
#[snafu(context(suffix(false)), visibility(pub))]
4+
pub enum Error {
5+
#[snafu(display("Failed to parse address `{address}`"))]
6+
AddressParse {
7+
source: bitcoin::address::ParseError,
8+
address: String,
9+
},
10+
#[snafu(display("Unsuported address `{address}`, only P2TR, P2WPKH and P2SH-P2WPKH allowed"))]
11+
UnsupportedAddress { address: String },
12+
#[snafu(display("Decode error for signature `{signature}`"))]
13+
SignatureDecode {
14+
source: base64::DecodeError,
15+
signature: String,
16+
},
17+
#[snafu(display("Transaction encode error"))]
18+
TransactionEncode { source: std::io::Error },
19+
#[snafu(display("Transaction extract error"))]
20+
TransactionExtract {
21+
source: bitcoin::psbt::ExtractTxError,
22+
},
23+
#[snafu(display("To sign transaction invalid"))]
24+
ToSignInvalid,
25+
#[snafu(display("PSBT extract error"))]
26+
PsbtExtract { source: bitcoin::psbt::Error },
27+
#[snafu(display("Base64 decode error for transaction `{transaction}`"))]
28+
TransactionBase64Decode {
29+
source: base64::DecodeError,
30+
transaction: String,
31+
},
32+
#[snafu(display("Consensus decode error for transaction `{transaction}`"))]
33+
TransactionConsensusDecode {
34+
source: bitcoin::consensus::encode::Error,
35+
transaction: String,
36+
},
37+
#[snafu(display("Witness malformed"))]
38+
WitnessMalformed {
39+
source: bitcoin::consensus::encode::Error,
40+
},
41+
#[snafu(display("Witness empty"))]
42+
WitnessEmpty,
43+
#[snafu(display("Encode witness error"))]
44+
WitnessEncoding { source: std::io::Error },
45+
#[snafu(display("Signature of wrong length `{length}`"))]
46+
SignatureLength {
47+
length: usize,
48+
encoded_signature: Vec<u8>,
49+
},
50+
#[snafu(display("Invalid signature"))]
51+
SignatureInvalid { source: bitcoin::secp256k1::Error },
52+
#[snafu(display("Invalid sighash"))]
53+
SigHashTypeInvalid {
54+
source: bitcoin::sighash::InvalidSighashTypeError,
55+
},
56+
#[snafu(display("Unsupported sighash type `{sighash_type}`"))]
57+
SigHashTypeUnsupported { sighash_type: String },
58+
#[snafu(display("Not key path spend"))]
59+
NotKeyPathSpend,
60+
#[snafu(display("Invalid public key"))]
61+
InvalidPublicKey,
62+
#[snafu(display("Invalid witness"))]
63+
InvalidWitness,
64+
#[snafu(display("Public key does not match"))]
65+
PublicKeyMismatch,
66+
}

0 commit comments

Comments
 (0)