p2pk – How to determine the output tackle when there isn’t a “tackle” key in vout[“scriptPubKey”]

0
63


Context:
I’ve a bitcoin core node(v.24), and utilizing bitcoinrpc library.

So, when I’m working the getrawtransaction() perform, typically the vout does not have the important thing “tackle”, and the important thing “desc” appears like pk(….)#…. .

How can I work out the id of the future tackle ? I already checked in two bitcoin explorers, that the output tackle of this transaction: “9b0fc92260312ce44e74ef369f5c66bbb85848f2eddd5a7a1cde251e54ccfdd5” it’s : 11HLoD9E4SDFFPDiYfNYnkBLQ85Y51J3Zb1

As well as, I additionally tried to decode the hex valur of the vout, however there isn’t a tackle key. Subsequently, there’s a p2sh key with and worth that appears like an tackle id: 3ARTFmbLhbpY4BAhV6Ukvb9ULa6eHawAWW

What it’s the strategy to acquire the proper future tackle?

Instance:

blockid: 2
txid: 9b0fc92260312ce44e74ef369f5c66bbb85848f2eddd5a7a1cde251e54ccfdd5

Output of getrawtransaction(txid,1):

{'txid': '9b0fc92260312ce44e74ef369f5c66bbb85848f2eddd5a7a1cde251e54ccfdd5',
 'hash': '9b0fc92260312ce44e74ef369f5c66bbb85848f2eddd5a7a1cde251e54ccfdd5',
 'model': 1,
 'dimension': 134,
 'vsize': 134,
 'weight': 536,
 'locktime': 0,
 'vin': [{'coinbase': '04ffff001d010b', 'sequence': 4294967295}],
 'vout': [{'value': Decimal('50.00000000'),
   'n': 0,
   'scriptPubKey': {'asm': '047211a824f55b505228e4c3d5194c1fcfaa15a456abdf37f9b9d97a4040afc073dee6c89064984f03385237d92167c13e236446b417ab79a0fcae412ae3316b77 OP_CHECKSIG',
    'desc': 'pk(047211a824f55b505228e4c3d5194c1fcfaa15a456abdf37f9b9d97a4040afc073dee6c89064984f03385237d92167c13e236446b417ab79a0fcae412ae3316b77)#rgrfa75n',
    'hex': '41047211a824f55b505228e4c3d5194c1fcfaa15a456abdf37f9b9d97a4040afc073dee6c89064984f03385237d92167c13e236446b417ab79a0fcae412ae3316b77ac',
    'type': 'pubkey'}}],
 'hex': '01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d010bffffffff0100f2052a010000004341047211a824f55b505228e4c3d5194c1fcfaa15a456abdf37f9b9d97a4040afc073dee6c89064984f03385237d92167c13e236446b417ab79a0fcae412ae3316b77ac00000000',
 'blockhash': '000000006a625f06636b8bb6ac7b960a8d03705d1ace08b1a19da3fdcc99ddbd',
 'confirmations': 792949,
 'time': 1231469744,
 'blocktime': 1231469744}


vout_hex = '41047211a824f55b505228e4c3d5194c1fcfaa15a456abdf37f9b9d97a4040afc073dee6c89064984f03385237d92167c13e236446b417ab79a0fcae412ae3316b77ac'

Ouput of decodescript("vout_hex"):


{'asm': '047211a824f55b505228e4c3d5194c1fcfaa15a456abdf37f9b9d97a4040afc073dee6c89064984f03385237d92167c13e236446b417ab79a0fcae412ae3316b77 OP_CHECKSIG',
 'desc': 'pk(047211a824f55b505228e4c3d5194c1fcfaa15a456abdf37f9b9d97a4040afc073dee6c89064984f03385237d92167c13e236446b417ab79a0fcae412ae3316b77)#rgrfa75n',
 'sort': 'pubkey',
 'p2sh': '3ARTFmbLhbpY4BAhV6Ukvb9ULa6eHawAWW'}

All in all, what ought to I do to get the proper output tackle: 1HLoD9E4SDFFPDiYfNYnkBLQ85Y51J3Zb1?

LEAVE A REPLY

Please enter your comment!
Please enter your name here