Skip to content

Commit 873f05e

Browse files
committed
Updated derive child keys for Taproot compatability.
1 parent 795fa9f commit 873f05e

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/wallet/proof_of_payment.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#[cfg(test)]
2+
mod tests {
3+
use std::str::FromStr;
4+
5+
use super::*;
6+
use crate::config::{WalletConfig, DEFAULT_TESTNET_NODE};
7+
use crate::e::S5Error;
8+
use crate::key::{derivation, ec, seed};
9+
use bdk::bitcoin::Txid;
10+
use bdk::blockchain::GetTx;
11+
12+
#[test]
13+
fn test_proof_of_payment() {
14+
// given a master key, txid and a message
15+
// create a proof that the payment was made by signing a custom message
16+
let txid_str = "69ec8f72a3e601e807adb5d778ad0ad27cf5f14dcab59f5fbadf3754442cdcfd";
17+
let txid = Txid::from_str(txid_str).unwrap();
18+
19+
let message = "This transaction was made by Vishal Menon to epik.com for the aquisition of the sats.at domain";
20+
let config = WalletConfig::new("*", DEFAULT_TESTNET_NODE, None).unwrap();
21+
let transaction = config.client.unwrap().get_tx(&txid).unwrap();
22+
print!("{:#?}", transaction);
23+
}
24+
}
25+
// hexdump -C -s 8 -n 285 blk00000.dat

0 commit comments

Comments
 (0)