are you able to please present me the era code, i’m struggling to generate a p2sh-p2wsh handle from the given redeem script, truly there isn’t a witness program key given , so is it even doable for me to generate the handle which is 32…… on this case, i simply wished to recheck whether or not my generated handle and the given handle comes out to be identical
Transaction Spec
Personal Key 1: 39dc0a9f0b185a2ee56349691f34716e6e0cda06a7f9707742ac113c4e2317bf
Personal Key 2: 5077ccd9c558b7d04a81920d38aa11b4a9f9de3b23fab45c3ef28039920fdd6d
Redeem Script (ASM): OP_2 032ff8c5df0bc00fe1ac2319c3b8070d6d1e04cfbf4fedda499ae7b775185ad53b 039bbc8d24f89e5bc44c5b0d1980d6658316a6b2440023117c3c03a4975b04dd56 OP_2 OP_CHECKMULTISIG
Redeem Script (HEX): 5221032ff8c5df0bc00fe1ac2319c3b8070d6d1e04cfbf4fedda499ae7b775185ad53b21039bbc8d24f89e5bc44c5b0d1980d6658316a6b2440023117c3c03a4975b04dd5652ae
Transaction ought to include precisely 1 enter with:
Outpoint:
Hash: 0000000000000000000000000000000000000000000000000000000000000000
Index: 0
Sequence: 0xffffffff
Transaction ought to include precisely 1 output with:
Worth: 0.001
Tackle: 325UUecEQuyrTd28Xs2hvAxdAjHM7XzqVF
Locktime: 0
i’ve been doing this in python
# Given Redeem Script (HEX)
redeem_script_hex = "5221032ff8c5df0bc00fe1ac2319c3b8070d6d1e04cfbf4fedda499ae7b775185ad53b21039bbc8d24f89e5bc44c5b0d1980d6658316a6b2440023117c3c03a4975b04dd5652ae"
script_bytes = bytes.fromhex(redeem_script_hex)
sha256_hash = hashlib.sha256(script_bytes).digest()
redeem_script_hash = hashlib.new("ripemd160", sha256_hash).digest()
prefixed_hash = b'x05' + redeem_script_hash
checksum = hashlib.sha256(hashlib.sha256(prefixed_hash).digest()).digest()[:4]
final_data = prefixed_hash + checksum
handle = base58.b58encode(final_data).decode()
print(handle)
to which the putput comews to be
h-multisig-tx-jatin-2708/python$ python principal.py
39C5GaHDocqYVgyCq2TrMfknTL45LPPcKF
but it surely ought to come
Tackle: 325UUecEQuyrTd28Xs2hvAxdAjHM7XzqVF (as given in ques)
looks like the witness is lacking thats why addresses are coming completely different , can anybody clarify…?
