summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark "Murch" Erhardt <murch@murch.one>2024-05-13 12:53:58 -0400
committerGitHub <noreply@github.com>2024-05-13 12:53:58 -0400
commit77f081789ff33c9ae271862c47e24c752af69acb (patch)
tree0692bbcd6a8b5985c71e25678aa42b4a484dc681
parent10e5f62a3851fe465f8d7067d5b19d00adc78513 (diff)
parent4c689f7cf9f38c939416b2cda5ceea31c275b08c (diff)
downloadbips-77f081789ff33c9ae271862c47e24c752af69acb.tar.xz
Merge pull request #1593 from jonatack/2024-05-bip388-fixups
BIP388 fixups
-rw-r--r--bip-0388.mediawiki6
-rwxr-xr-x[-rw-r--r--]bip-0388/wallet_policies.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/bip-0388.mediawiki b/bip-0388.mediawiki
index a797643..dc1b508 100644
--- a/bip-0388.mediawiki
+++ b/bip-0388.mediawiki
@@ -65,7 +65,7 @@ We set two fundamental design goals:
* Minimize the amount of information that is shown on screen - so that the user can actually validate it.
* Minimize the number of times the user has to validate such information.
-Designing a secure protocol for the coordination of a descriptor wallet among distant parties is also a challenging problem that is out of scope in this document. See [[bip-00129.mediawiki|BIP-129 (Bitcoin Secure Multisig Setup)]] for an approach designed for multisignature wallets. Regardless of the approach, the ability for the user to carefully verify all the details of the spending policies using the hardware signer's screen is a prerequisite for security in adversarial environments.
+Designing a secure protocol for the coordination of a descriptor wallet among distant parties is also a challenging problem that is out of scope in this document. See [[bip-0129.mediawiki|BIP-129 (Bitcoin Secure Multisig Setup)]] for an approach designed for multisignature wallets. Regardless of the approach, the ability for the user to carefully verify all the details of the spending policies using the hardware signer's screen is a prerequisite for security in adversarial environments.
=== Policy registration as a solution ===
@@ -136,7 +136,7 @@ A ''wallet descriptor template'' is a <tt>SCRIPT</tt> expression.
* ''always'' followed by either:
** the string <tt>/**</tt>, or
** a string of the form <tt>/<NUM;NUM>/*</tt>, for two distinct decimal numbers <tt>NUM</tt> representing unhardened derivations, or
-** any of the additional, implementation-specific valid derivation path patterns (see [[#Optional_derivation_paths|Optional derivation paths]] below).
+** any of the additional, implementation-specific valid derivation path patterns (see [[#optional-derivation-paths|Optional derivation paths]] below).
The <tt>/**</tt> in the placeholder template represents commonly used paths for receive/change addresses, and is equivalent to <tt><0;1>/*</tt>.
@@ -294,7 +294,7 @@ Wallet policies are implemented in
* the [https://github.com/digitalbitbox/bitbox02-firmware BitBox02 firmware] since version v9.15.0;
* [https://github.com/Blockstream/Jade Blockstream Jade] since version v1.0.24, via [https://github.com/ElementsProject/libwally-core libwally-core] v1.0.0.
-For development and testing purposes, we provide a [[bip-wallet-policies/wallet_policies.py|Python 3.7 reference implementation]] of simple classes to handle wallet policies, and the conversion to/from output script descriptors.
+For development and testing purposes, we provide a [[bip-0388/wallet_policies.py|Python 3.7 reference implementation]] of simple classes to handle wallet policies, and the conversion to/from output script descriptors.
The reference implementation is for demonstration purposes only and not to be used in production environments.
==Footnotes==
diff --git a/bip-0388/wallet_policies.py b/bip-0388/wallet_policies.py
index 42f615a..4cd5031 100644..100755
--- a/bip-0388/wallet_policies.py
+++ b/bip-0388/wallet_policies.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python3
+
from typing import Iterable, List, Mapping, Tuple, Generator