bit icon indicating copy to clipboard operation
bit copied to clipboard

Get unexpected receiver address when creating transaction

Open ryanli1994 opened this issue 9 years ago • 1 comments

When calling k.create_transaction([('2N2ud4TqixtLTf4cpEsJTdUb1TZegQUkB2U', 2,'btc')]), the output result in generated decoded transaction is


    "inputs": [
        {
            "addresses": [
                "mwRCvxvDWoHfLoXbu4CRsSr8n9DJCVPboK"
            ], 
            "age": 1202275, 
            "output_index": 1, 
            "output_value": 456995984, 
            "prev_hash": "50dcac87356e68d6b43c0f24ca8dc98e3458c762077ae29a2d660f9aaa50ccb5", 
            "script": "47304402201314fa5216a64079c5196be75fa94280f2c4a91f4181d75a659877473b4c3bd102204fa04af563ab56af0b7e8aea5bf6b1e12f409daa3582f60c208cd856ffef76b6012102ecfde94a36fcf549283ae65c379feb7c63df59edd3a1a0f96816d1ddbc17f690", 
            "script_type": "pay-to-pubkey-hash", 
            "sequence": 4294967295
        }
    ], 
    "outputs": [
        {
            "addresses": [
                "mqBMNEWEcYwz9DmTACzNQpT8xgkVyoxXBK"
            ], 
            "script": "76a91469fc32bc91d99f6d5710838824eef70ed6fb207d88ac", 
            "script_type": "pay-to-pubkey-hash", 
            "value": 200000000
        }, 
        {
            "addresses": [
                "mwRCvxvDWoHfLoXbu4CRsSr8n9DJCVPboK"
            ], 
            "script": "76a914ae6bbc0fd6d934269238fc869cc04ac775fded9888ac", 
            "script_type": "pay-to-pubkey-hash", 
            "value": 256959824
        }
    ]

The address mwRCvxvDWoHfLoXbu4CRsSr8n9DJCVPboK is the sender, and the receiver becomes mqBMNEWEcYwz9DmTACzNQpT8xgkVyoxXBK instead of 2N2ud4TqixtLTf4cpEsJTdUb1TZegQUkB2U, why it happens?

ryanli1994 avatar Sep 26 '17 11:09 ryanli1994

Bit only supports P2PKH txns/addresses atm, not P2SH. Sorry!

ofek avatar Sep 26 '17 14:09 ofek