File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments