Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

84
Vistas
Sending bitcoin transaction using multiple inputs and multiple outputs

My target - send to one of my users requested amount of BTC. I have many BTC wallets generated from the same mnemonic phrase with different balances.

So, my inputs data is - target wallet, target amount and list of wallets with balances. If found a set of inputs with total balance more than I need to send, I need to return difference between inputs balance and target amount to random input.

My data looks like:

[
  {
    "wallet": "xxxx1",
    "privateKey": "key1",
    "unspentAmount": 46659,
    "unspentTransactions": [
      {
        "tx_hash_big_endian": "..",
        "tx_hash": "...",
        "tx_output_n": 0,
        "script": "...",
        "value": 46659,
        "value_hex": "00b643",
        "confirmations": 757,
        "tx_index": 1156017252431081
      }
    ]
  },
  {
     "wallet": "xxx2",
    "privateKey": "key2",
    "unspentAmount": 13339,
    "unspentTransactions": [
      {
        "tx_hash_big_endian": "...",
        "tx_hash": "...",
        "tx_output_n": 0,
        "script": "...",
        "value": 13339,
        "value_hex": "00b643",
        "confirmations": 757,
        "tx_index": 1156017252431081
      }
    ]
  }
]

How to build transaction using bitcoin-core or bitcoin-lib? I need multiple inputs and multiple outputs.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda