Friday, February 23, 2024
HomeBitcoinbitcoin core - create BitcoinSigningInput from hex (WalletCore)

bitcoin core – create BitcoinSigningInput from hex (WalletCore)


Good morning everybody!

We try to implement BTC/LTC/DOGE sending by our backend in our cellular app. Earlier than that, we used the WalletCore library.

Our earlier steps had been:

  1. Creating BitcoinUnspentTransaction.
  2. Creating BitcoinSigningInput with BitcoinUnspentTransaction in utxos params.
  3. Signing BitcoinSigningInput.
  4. Broadcasting.

At this second, our new move is:

  1. Requesting inputs from the backend.
  2. Signing inputs.
  3. Sending all needed information to the backend (quantity, signing inputs).
  4. Broadcasting utilizing the backend.

So, I obtained inputs from the backend and encountered some points. I want BitcoinSigningInput (a WalletCore class) to signal it. Subsequently, I feel that I ought to create BitcoinSigningInput from the inputs which I obtain from our backend. Nonetheless, I utterly do not perceive how one can convert these inputs (which I obtain in HEX format) to BitcoinSigningInput kind, which I can signal utilizing WalletCore.

I am making an attempt some alternative ways, the final one:

let information = Knowledge(hex:utxosBackend)
let enter = attempt BitcoinSigningInput(serializedData: information)

however this produce error : truncated

Thanks quite a bit on your assist!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments