I have a java code that I need to pass to python but I don't know which libraries to use and how to start and if you can help me I would really appreciate it

MNEMONIC = "twenty four mnemonic words hereí" ACCOUNT_KEY = "" WALLET_PRIVATE_KEY = ""

// We will generate 3 parameters here // 1. hashSecret // 2. encryptedSecret // 3. hashPublicKey

const epochTimeNow = Fecha.ahora().toString()

const secret = getDeterministicTradeSecret(MNEMONIC, epochTimeNow) // This function is defined below 

const hashSecret = hash160(secret)

const encryptedSecret = encryptTradeSecret (secreto, ACCOUNT_KEY, indefinido)

const publicKey = privateKeyToPublic(privateKey) 

const hashPublicKey = hash160(publicKey)

const btc_trade_secrets = {crypted_secret:cryptedSecret, hash_secret:hashedSecret,hashed_public_key:hashedPublicKey,}
  • 1
    I’m voting to close this question because this is not a place for coding assistance or general software development questions. Commented May 5, 2023 at 17:02

1 Answer 1


I have a java code that I need to pass to python

Unless the same library has been ported to both languages, there will probably be no direct equivalent.

Instead it will probably be best to describe what you want to achieve and select a well-known Python bitcoin library and work from the examples

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.