Skip to content
Draft
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
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ categories = ["cryptography", "parsing"]
readme = "README.md"

[dependencies]
bitcoin = { version = "0.32.7", default-features = false }
bitcoin = { version = "0.32.7", default-features = true }

[lib]
crate-type = ["lib"]
Expand All @@ -21,3 +21,7 @@ default = ["debug", "satisfy"]
# Enable Debug trait implementations for error types
debug = []
satisfy = []
kani = []

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(loom)', 'cfg(fuzzing)'] }
1 change: 1 addition & 0 deletions kani/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target
143 changes: 143 additions & 0 deletions kani/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions kani/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "kani"
version = "0.1.0"
edition = "2024"

[dependencies]


[dependencies.tinyminiscript]
path = ".."
13 changes: 13 additions & 0 deletions kani/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
fn main() {
println!("Hello, world!");
}

#[cfg(kani)]
mod verification {
use super::*;

#[kani::proof]
pub fn check_something() {
assert!(1 == 2)
}
}
13 changes: 13 additions & 0 deletions src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1208,3 +1208,16 @@ fn parse_bool<'a>(ctx: &mut ParserContext<'a>) -> Result<AST, ParseError<'a>> {
}
}
}



#[cfg(kani)]
mod verification {
use super::*;

#[kani::proof]
pub fn check_something() {
let ctx = parse("wsh(or_d(pk({}),older(12960)))");
assert!(ctx.is_ok());
}
}