gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-depolymerization] branch master updated: add test decoding logic


From: gnunet
Subject: [taler-depolymerization] branch master updated: add test decoding logic
Date: Tue, 19 Apr 2022 12:27:37 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository depolymerization.

The following commit(s) were added to refs/heads/master by this push:
     new 40dbf1f  add test decoding logic
40dbf1f is described below

commit 40dbf1fc0daeb979fd78cdb5819b367bfd17a8d5
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Tue Apr 19 12:27:11 2022 +0200

    add test decoding logic
---
 btc-wire/src/bin/segwit-demo.rs | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/btc-wire/src/bin/segwit-demo.rs b/btc-wire/src/bin/segwit-demo.rs
index e34a1c8..891ef68 100644
--- a/btc-wire/src/bin/segwit-demo.rs
+++ b/btc-wire/src/bin/segwit-demo.rs
@@ -1,14 +1,15 @@
 use bitcoin::Amount;
 use btc_wire::{rpc_utils, segwit::encode_segwit_addr};
+use btc_wire::{segwit::decode_segwit_msg};
 use common::{
     base32::{self, Alphabet},
     rand_slice,
 };
 
 pub fn main() {
-    let address = "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4";
-    let amount = Amount::from_sat(10000000);
-    let reserve_pub = "0ZSX8SH0M30KHX8K3Y1DAMVGDQV82XEF9DG1HC4QMQ3QWYT4AF00";
+    let address = "tb1qhxrhccqexg0dv4nltgkuw4fg2ce7muplmjsn0v";
+    let amount = Amount::from_sat(5000000);
+    let reserve_pub = "54ZN9AMVN1R0YZ68ZPVHHQA4KZE1V037M05FNMYH4JQ596YAKJEG";
     let btc = amount.as_btc();
 
     println!("Ⅰ - Parse payto uri");
@@ -69,5 +70,14 @@ pub fn main() {
     }
     println!(
         "Make sure the amount show 0.10000588 BTC, else you have to change the 
base unit to BTC"
-    )
+    );
+
+
+    let key1 = "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4";
+    let key2 = "tb1qzxwu2p7urkqx0gq2ltfazf9w2jdu48ya8qwlm0";
+    let key3 = "tb1qzxwu2pef8a224xagwq8hej8akuvd63yluu3wrh";
+    let addresses = vec![key1, key2, key3];
+    let dec = decode_segwit_msg(&addresses);
+    
+    println!("Decode reserve public key: 0x{}", 
hex::encode(&dec.unwrap()[..]));
 }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]