0

I am stuck on a particular code: This is the raw transaction: "020000000273fb30a827cef341d0f4c898bb414ff14bf1b4060d3320e5ec2431a94542fe3a01000000fde9010048304502210081bc04e1c7103b34561bb56ec89f39500d86c61fb715bcf86a3b12a28e72590f02205db9e85c0ebcc0d82acf97be3c2f36982b9e148bd6f1f4174e2c6ef4649d98ef01483045022100d3f2e0ac8d0f8ca7303e70dee31e3f35cc99ad22e8f82c480b54e97e3e77030102200b94dc240c8aa5b9d2c6f9b62e497904583be4086d221c2224517278d4e32f0001473044022054a093971a957473939c2119c85f027f4c88f87d41ab399c099c75f222831d2102206c3926edc44ded009f4b7f45b349d6a5a67179b1c4feeabb913cd68bcf540898014d0b01534104220936c3245597b1513a9a7fe96d96facf1a840ee21432a1b73c2cf42c1810284dd730f21ded9d818b84402863a2b5cd1afe3a3d13719d524482592fb23c88a3410472225d3abc8665cf01f703a270ee65be5421c6a495ce34830061eb0690ec27dfd1194e27b6b0b659418d9f91baec18923078aac18dc19699aae82583561fefe54104a24db5c0e8ed34da1fd3b6f9f797244981b928a8750c8f11f9252041daad7b2d95309074fed791af77dc85abdd8bb2774ed8d53379d28cd49f251b9c08cab7fc4104b1fcefe17d7f1b683b85730c0667b306dd9ade464fb69ad9b8b4eb7b2bf0ff9fe305a321ca2879302248a676205614e67088938e443ec727a310f9b275cb01ec54aeffffffff5e3507eda08503368c1531b3c8b75de1cf168a03b8b914ca2b897ec0a0f6ccc001000000fde80100483045022100e0993528073d0b302d5a422e0f60930f9223ca174d50fabf0faee879ff606ede02207ddf9d53c4f6472ecaa07bd958c22bb574395a50b61d191e55a94e50022618440147304402204f0f6f848c970889aa53f4f7b0985c9fed3a2f47165b6f2d09835c2368eb576802201a18caf27e5974063fa82210e084bfde0ff7ae4d87c09ea3f0e7ce3a0f9f874e0147304402201300cbcb9d6dacb0405a20692eb364c50b2801790e3d5ac6c2dd3f7d5212c5fd0220063a01c191866a1f2b3f8b1b93e81647bf779d23c16e6fff0bf80fd4b8bffab3014d0b01534104220936c3245597b1513a9a7fe96d96facf1a840ee21432a1b73c2cf42c1810284dd730f21ded9d818b84402863a2b5cd1afe3a3d13719d524482592fb23c88a3410472225d3abc8665cf01f703a270ee65be5421c6a495ce34830061eb0690ec27dfd1194e27b6b0b659418d9f91baec18923078aac18dc19699aae82583561fefe54104a24db5c0e8ed34da1fd3b6f9f797244981b928a8750c8f11f9252041daad7b2d95309074fed791af77dc85abdd8bb2774ed8d53379d28cd49f251b9c08cab7fc4104b1fcefe17d7f1b683b85730c0667b306dd9ade464fb69ad9b8b4eb7b2bf0ff9fe305a321ca2879302248a676205614e67088938e443ec727a310f9b275cb01ec54aeffffffff0280c3c9010000000017a9141debe6db4ed763188802e98c235561d4b0e135b8872b1207000000000017a91469f376e4a10cf64c1da453f5a96514b5e3ae19868700000000"

Now the code i have presently to decode the input is this below which sees the correct number of input and version but getting the S value and R value seem to be wrong. Please can you guys the great programmers tell me what i am doing wrong and tell me what to change inorder to get the values right.

Using memr = New MemoryStream(rtx.Array, rtx.Offset, rtx.Count)

            Using reader = New BinaryReader(memr)
                tx.Version = reader.ReadInt32()
                Dim ic = reader.ReadVarInt()
                tx.Inputs = New List(Of Input)(CInt(ic))
                For i = 0 To ic - 1
                    '     For i = 0 To 2 - 1
                    Dim input As New Input()
                        input.Previous = reader.ReadBytes(32)
                        input.PreviousSeq = reader.ReadInt32()
                        input.ScriptLength = reader.ReadVarInt()
                    input.Script = reader.ReadBytes(3)
                    'Dim ht = &H30 'if its 48 it exit
                    'If Not (input.Script(1) = &H30 AndAlso (input.Script(0) = input.Script(2) + 3)) Then
                    '    Throw New Exception()
                    'End If
                    Dim vv = reader.ReadByte()
                        input.rawR = reader.ReadStringAsByteArray()
                        vv = reader.ReadByte()
                        input.rawS = reader.ReadStringAsByteArray()
                    input.HashType = reader.ReadByte()
                    input.PublicKey = reader.ReadStringAsByteArray()
                    input.Seq = reader.ReadInt32()
                        tx.Inputs.Add(input)
                    Next i

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.