@@ -96,7 +96,7 @@ def serialize_dict_bytes_bytes(
96
96
97
97
98
98
def encode_leaf_scripts (
99
- dict_ : Mapping [bytes , tuple [bytes , int ]]
99
+ dict_ : Mapping [bytes , tuple [bytes , int ]],
100
100
) -> dict [str , tuple [str , int ]]:
101
101
"""Return the json representation of a tap_leaf_script.
102
102
@@ -107,7 +107,7 @@ def encode_leaf_scripts(
107
107
108
108
109
109
def decode_leaf_scripts (
110
- map_ : Mapping [Octets , tuple [Octets , int ]] | None
110
+ map_ : Mapping [Octets , tuple [Octets , int ]] | None ,
111
111
) -> dict [bytes , tuple [bytes , int ]]:
112
112
"""Return a tap_leaf_script from its json representation."""
113
113
if map_ is None :
@@ -136,7 +136,7 @@ def parse_leaf_script(v: bytes) -> tuple[bytes, int]:
136
136
137
137
138
138
def encode_taproot_tree (
139
- list_ : list [tuple [int , int , bytes ]]
139
+ list_ : list [tuple [int , int , bytes ]],
140
140
) -> list [tuple [int , int , str ]]:
141
141
"""Return the json representation of a tap_tree.
142
142
@@ -146,7 +146,7 @@ def encode_taproot_tree(
146
146
147
147
148
148
def decode_taproot_tree (
149
- list_ : Sequence [tuple [int , int , Octets ]] | None
149
+ list_ : Sequence [tuple [int , int , Octets ]] | None ,
150
150
) -> list [tuple [int , int , bytes ]]:
151
151
"""Return a tap_tree from its json representation."""
152
152
if list_ is None :
@@ -184,7 +184,7 @@ def parse_taproot_tree(v: bytes) -> list[tuple[int, int, bytes]]:
184
184
185
185
186
186
def taproot_bip32_to_dict (
187
- taproot_hd_key_paths : dict [bytes , tuple [list [bytes ], BIP32KeyOrigin ]]
187
+ taproot_hd_key_paths : dict [bytes , tuple [list [bytes ], BIP32KeyOrigin ]],
188
188
) -> list [dict [str , Any ]]:
189
189
"""Return the json representation of a tap_bip32_derivation.
190
190
@@ -203,7 +203,7 @@ def taproot_bip32_to_dict(
203
203
204
204
205
205
def taproot_bip32_from_dict (
206
- taproot_hd_key_paths : list [dict [str , str ]]
206
+ taproot_hd_key_paths : list [dict [str , str ]],
207
207
) -> dict [bytes , tuple [list [bytes ], BIP32KeyOrigin ]]:
208
208
"""Return a tap_bip32_derivation from its json representation."""
209
209
return {
@@ -219,7 +219,7 @@ def taproot_bip32_from_dict(
219
219
220
220
221
221
def decode_taproot_bip32 (
222
- dict_ : Mapping [Octets , tuple [Sequence [Octets ], BIP32KeyOrigin ]] | None
222
+ dict_ : Mapping [Octets , tuple [Sequence [Octets ], BIP32KeyOrigin ]] | None ,
223
223
) -> dict [bytes , tuple [list [bytes ], BIP32KeyOrigin ]]:
224
224
"""Parse correctly the tap_bip32_derivation init arguments."""
225
225
if dict_ is None :
@@ -315,7 +315,7 @@ def assert_valid_taproot_tree(tree: list[tuple[int, int, bytes]]) -> None:
315
315
316
316
317
317
def assert_valid_taproot_bip32_derivation (
318
- derivations : dict [bytes , tuple [list [bytes ], BIP32KeyOrigin ]]
318
+ derivations : dict [bytes , tuple [list [bytes ], BIP32KeyOrigin ]],
319
319
) -> None :
320
320
"""Fails when the public keys have not the correct length."""
321
321
for pubkey in derivations :
0 commit comments