Changelly

Cryptocurrency

Help decoding transaction on bitcoin testnet

2 Mins read


I’m trying to learn more about bitcoin and I’m trying to decode a transaction I made to myself on testnet and I can’t seem to figure out a couple of things

Here is the output of getrawtransaction:
getrawtransaction ‘f013fd7f27a8c78fd52ad95253e7330dd7e5c6490f480cecd95359cfb1abcbdd’ true

{
  "txid": "f013fd7f27a8c78fd52ad95253e7330dd7e5c6490f480cecd95359cfb1abcbdd",
  "hash": "f6f699d7587a455e516be97b81b79d318d40ca9a8cc4f3382e4ba355808f7c83",
  "version": 2,
  "size": 223,
  "vsize": 142,
  "weight": 565,
  "locktime": 2133079,
  "vin": [
    {
      "txid": "246f7eb126789462a13b56658fc8095118ea9499b0c41ca5402fa38f97681d2b",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "304402200eb3153139da95c29755baaddb1f8038ad1bd850f46b56d467875d91eb49599502204a19b6798bbdbd019f0bcf63a3412d4f99f923b19a33377c714d06a6f77a71fa01",
        "036abeb6881115996db7d8fc9845adf6dabc66e03ca04ff9ff6d15d64fed1cf4b1"
      ],
      "sequence": 4294967293
    }
  ],
  "vout": [
    {
      "value": 0.00009858,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_HASH160 07a715962bfe8aec6637ea4abe38e412aa8f9f77 OP_EQUAL",
        "hex": "a91407a715962bfe8aec6637ea4abe38e412aa8f9f7787",
        "address": "2MswgsrCPRvvB6umFyCYJB6L5FFjnoce2AS",
        "type": "scripthash"
      }
    },
    {
      "value": 0.00010000,
      "n": 1,
      "scriptPubKey": {
        "asm": "0 f864afee2f6d17a22c420ee61ea21aff5d76ebd4",
        "hex": "0014f864afee2f6d17a22c420ee61ea21aff5d76ebd4",
        "address": "tb1qlpj2lm30d5t6ytzzpmnpags6lawhd675fh8265",
        "type": "witness_v0_keyhash"
      }
    }
  ],
  "hex": "020000000001012b1d68978fa32f40a51cc4b09994ea185109c88f65563ba162947826b17e6f240000000000fdffffff02822600000000000017a91407a715962bfe8aec6637ea4abe38e412aa8f9f77871027000000000000160014f864afee2f6d17a22c420ee61ea21aff5d76ebd40247304402200eb3153139da95c29755baaddb1f8038ad1bd850f46b56d467875d91eb49599502204a19b6798bbdbd019f0bcf63a3412d4f99f923b19a33377c714d06a6f77a71fa0121036abeb6881115996db7d8fc9845adf6dabc66e03ca04ff9ff6d15d64fed1cf4b1578c2000"
}

Questions:

 1.)  The address I sent some test BTC to is "2MswgsrCPRvvB6umFyCYJB6L5FFjnoce2AS". But, I don't know what "07a715962bfe8aec6637ea4abe38e412aa8f9f77" is and I can't seem to duplicate it. I can't even duplicate "2MswgsrCPRvvB6umFyCYJB6L5FFjnoce2AS".  By duplicate I mean I can't seem to recreate that label given the public key from my wallet.  The public key is "02381296c094c7284621bf3b25fb086a531d5035b7982604d15f9223cda758c7bc", so from that shouldn't I be able to take the RIPEMD160 HASH, prepend add 0x6f, take the double hash, take the first 4 bytes, then encode that into base 58 (version + hash + checksum) and get the above address? What am I doing wrong because I'm not getting that.

2.)  What are the 2 bytes after the first 4 bytes (Version)?  Bytes 5-6, which is 0001?

3.)  What about bytes 113-114?  Which is 0247 (in the raw hex dump)?  What does that represent?



Source link

Related posts
Cryptocurrency

ERTHA Listing on KuCoin

2 Mins read
Ertha Metaverse, one of blockchain gaming’s most talked about metaverses has today announced the listing of their ERTHA token on one of…
Cryptocurrency

Main Opposition Candidate for President of South Korea Pledges Support for Crypto Tax Exemptions – Taxes Bitcoin News

3 Mins read
The leading presidential candidate of the opposition in South Korea has promised voters to ease the tax burden on crypto-related profits through…
Cryptocurrency

Crypto.com finally speaks out: 483 user accounts compromised

2 Mins read
The Crypto.com security breach saga gets clarity with an official statement from the Singapore-based crypto exchange following a halt on withdrawals after detecting…

Leave a Reply

Your email address will not be published. Required fields are marked *