Skip to content

Split nn sapling: HASH160 calculated from Raddress#15

Open
phm87 wants to merge 2 commits intoDeckerSU:masterfrom
phm87:split_nn_sapling_HASH160_from_Raddress
Open

Split nn sapling: HASH160 calculated from Raddress#15
phm87 wants to merge 2 commits intoDeckerSU:masterfrom
phm87:split_nn_sapling_HASH160_from_Raddress

Conversation

@phm87
Copy link

@phm87 phm87 commented May 30, 2022

Sources:
https://github.com/KMDLabs/LabsNotary/blob/master/splitfunds.sh#L60
base58 decode by grondilu https://github.com/grondilu/bitcoin-bash-tools/blob/master/bitcoin.sh

Tested Ok merged with another PR:
#4
with:
CHANGE_HASH160=$FROM_HASH160
curl -s https://morty.explorer.dexstats.info/insight-api-komodo/addr/$FROM_ADDRESS/utxo > split_nn.utxos

Test evidence:
tx id on MORTY assetchain:
ba7143dcbc93adf6a0813ee0b246ea2e81e7540449fcd17a6b30dee48b7f14f2

@phm87 phm87 changed the title Split nn sapling: hash160 calculated from raddress Split nn sapling: HASH160 calculated from Raddress May 30, 2022
@phm87
Copy link
Author

phm87 commented Jun 1, 2022

It is also possible to calculate the HASH160 using OpenSSL:

hash160() {
    openssl dgst -sha256 -binary |
    openssl dgst -rmd160 -binary |
    xxd -p -c 80
}

Source:
https://gist.github.com/colindean/5239812#file-generate_bitcoin_address-sh-L51

Example of usage:
https://github.com/phm87/p2sh/blob/master/2_gen_P2SH.sh#L67
Remark: the whole script 2_gen_P2SH.sh doesn't work but the usage of hash160 at line 67 is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant