it with the necessary signatures and other components, to make it valid and complete.
Together they provide a common ground to create and use a multi signature
-infrastructure in an eterogeneous environment, and this is what I have put
+infrastructure in a heterogeneous environment, and this is what I have put
to test.
## The use case
## The role of Descriptors
If Alice and Bob cannot agree on the software to use, to monitor the same financial
-situation, the two softwares must control and produce exactly the same series
+situation, the two software must control and produce exactly the same series
of multisignature addresses.
-To make two different softwares produce the same addresses in a deterministic way
+To make two different software produce the same addresses in a deterministic way
we must ensure that they:
* produce the same pair of public keys
* combine them in the same order
Each of these two software wallets should be able to:
* Create a new address which is seen as belonging to the multi signature
-wallet in both softwares
+wallet in both software
* Express the consent of each party by partially signing the transaction in a way
the other wallet can understand and complete it with its own signature.
export core_xprv=$(echo $core_key | jq -r '.xprv')
-# Derived Extended Public key
-
-export core_xpub_84=$(bdk-cli key derive --path m/84h/0h/0h --xprv $core_xprv | jq -r '.xpub' | rev | cut -c 3- | rev)
-
-# Now I build the xpubs (one for receiving and one for the change)
+# Now I derive the xpubs (one for receiving and one for the change)
# together with informations about the derivation path to be communicated
# to BDK wallet's owner (Bob).
-export core_xpub_84_for_rec_desc="$core_xpub_84/0/*"
-export core_xpub_84_for_chg_desc="$core_xpub_84/1/*"
+export core_xpub_84_for_rec_desc=$(bdk-cli key derive --path m/84h/0h/0h/0 --xprv $core_xprv | jq -r '.xpub')
+export core_xpub_84_for_chg_desc=$(bdk-cli key derive --path m/84h/0h/0h/1 --xprv $core_xprv | jq -r '.xpub')
```
For BDK (Bob) we do the same:
# Now I build the derived xpubs to be communicated (to Alice).
-export BDK_xpub_84_for_rec_desc="$BDK_xpub_84/0/*"
-export BDK_xpub_84_for_chg_desc="$BDK_xpub_84/1/*"
+export BDK_xpub_84_for_rec_desc=$(bdk-cli key derive --path m/84h/0h/0h/1 --xprv $BDK_xprv | jq -r '.xpub')
+export BDK_xpub_84_for_chg_desc=$(bdk-cli key derive --path m/84h/0h/0h/1 --xprv $BDK_xprv | jq -r '.xpub')
```
### 2. Creation of the multi signature descriptor for each wallet