Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What kind of argument deserialize_script() requires? #174

Open
morfin opened this issue Jul 31, 2017 · 0 comments
Open

What kind of argument deserialize_script() requires? #174

morfin opened this issue Jul 31, 2017 · 0 comments

Comments

@morfin
Copy link

morfin commented Jul 31, 2017

I assume this function expects the input's sig. script, so according to this:
https://bitcoin.org/en/developer-reference#raw-transaction-format

Which part of the script is ? starting from 49? or just the actual sig.script?

| 49 ....................................... Bytes in sig. script: 73
| | 48 ..................................... Push 72 bytes as data
| | | 30450221008949f0cb400094ad2b5eb3
| | | 99d59d01c14d73d8fe6e96df1a7150de
| | | b388ab8935022079656090d7f6bac4c9
| | | a94e0aad311a4268e082a725f8aeae05
| | | 73fb12ff866a5f01 ..................... Secp256k1 signature

deserialize_script("494830450221008949f0cb400094ad2b5eb399d59d01c14d73d8fe6e96df1a7150deb388ab8935022079656090d7f6bac4c9a94e0aad311a4268e082a725f8aeae0573fb12ff866a5f01") or just

deserialize_script("30450221008949f0cb400094ad2b5eb399d59d01c14d73d8fe6e96df1a7150deb388ab8935022079656090d7f6bac4c9a94e0aad311a4268e082a725f8aeae0573fb12ff866a5f01")
And how the return value is broken down? what data structure should I expect from this function?

I'm expecting 4 parts:

  • The signature
  • SIGHASH_ALL
  • Size of public key
  • Public Key

Is this the right function to get this data, or am I pointing to the wrong direction?
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant