how to get the this value [floor(33/len(private-key-version))]?

+4 votes

ex ) private-key-version = 904b240b

this value hexadecimal string shown on the params.dat

this value change to binary and len(private-key-version)?

if not calculate len(904b240b)?

and len is length?, floor() is Math.floor()?
i don't understand this process. i need to help you!
asked Jan 8 by Harry

2 Answers

0 votes

In the documentation for address and key formatting, this floor() and len() are pseudocode, which should map to whichever programming language you're using:

floor(x) means x rounded down, so in JavaScript you can indeed use Math.floor()

len(str) means the length of the string str when represented in bytes, so in JavaScript that would be hex.length/2 assuming that hex is in the version bytes in hexadecimal format

 

answered Jan 9 by MultiChain
thank you! :)
0 votes

The trick here is know that two digits of hexadecimal string makes up a byte so the length of private key version is 4 bytes and by applying given floor function(yes it's math.floor function only) you will get 8. So, you will insert each subsequent byte of it after every 8 bytes of the key

answered Jan 9 by gimmick
...