<p>I have a PSBT transaction. My code parsed it into its component parts: 3 maps - global input, output. I based on the document <a href="https://developer.bitcoin.org/reference/transactions.html#raw-transaction-format" rel="nofollow noreferrer">1</a>. I parsed each transaction into separate fields. Found all scripts and their type, and got a private key for scripts.
What steps need to be taken to sign the transaction, without using third-party libraries, step by step (which fields should be used)</p>

CC BY-SA 4.0
2023-02-16T10:45:35.213Z
It's difficult to answer your question without more information. Can you provide an example? What languages are you using? Is using `bitcoin-cli` an option?
josie
CC BY-SA 4.0
2023-02-16T10:51:24.367Z
I write ma stack on C ( embedded application). I need an understanding of what needs to be done. In the python, c++ source code and documentation, the field names do not match.
Roman Andronov
CC BY-SA 4.0
2023-02-16T10:59:01.957Z
This might help, as it at least gives a full example in Golang: https://bitcoin.stackexchange.com/questions/96283/how-to-sign-a-psbt-transaction
josie
CC BY-SA 4.0
2023-02-16T11:16:27.520Z
Now you need to understand how class members correspond to transaction fields. [link](https://btcinformation.org/en/developer-reference#raw-transaction-format)
Roman Andronov
CC BY-SA 4.0
2023-02-18T11:16:44.340Z
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Community
<segregated-witness><bip174-psbt>
How to sign SegWit Transaction without using third party libraries (step by step)
Roman Andronov
# How to sign SegWit Transaction without using third party libraries (step by step)

(Asked by: username_0 on 2023-02-14)

I have a PSBT transaction. My code parsed it into its component parts: 3 maps - global input, output. I based on the document [1](https://developer.bitcoin.org/reference/transactions.html#raw-transaction-format). I parsed each transaction into separate fields. Found all scripts and their type, and got a private key for scripts.
What steps need to be taken to sign the transaction, without using third-party libraries, step by step (which fields should be used)

**Tags:** segregated-witness, bip174-psbt

> **Comments:**
> **username_1**: It's difficult to answer your question without more information. Can you provide an example? What languages are you using? Is using `bitcoin-cli` an option?  
> **username_0**: I write ma stack on C ( embedded application). I need an understanding of what needs to be done. In the python, c++ source code and documentation, the field names do not match.  
> **username_1**: This might help, as it at least gives a full example in Golang: https://bitcoin.stackexchange.com/questions/96283/how-to-sign-a-psbt-transaction  
> **username_0**: Now you need to understand how class members correspond to transaction fields. [link](https://btcinformation.org/en/developer-reference#raw-transaction-format)  
> **username_2**: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.  

---

## 0 answers

