0

My target is to make transaction with unspent transaction outputs(UTXOS). The information of UTXOs is as follow.

[   
  {
    "pt_idx": 0,
    "subaccount": 37,
    "ga_asset_id": 1,
    "value": "92343",
    "block_height": 1288714,
    "txhash": "9e2d2d56632b609e9b5d0a1990cf0ffbd9865cec558b68ed106df352fd89cfb1",
    "pointer": 1083,
    "script_type": 14   
  },
  {
    "pt_idx": 1,
    "subaccount": 37,
    "ga_asset_id": 1,
    "value": "9961066",
    "block_height": 1288718,
    "txhash": "b0e37f463aba4e3abb078eb77c472b29621cfdd17ed83ae41122b0b95df5e518",
    "pointer": 1096,
    "script_type": 14   
  },
  {
    "pt_idx": 1,
    "subaccount": 37,
    "ga_asset_id": 1,
    "value": "315595",
    "block_height": 1288721,
    "txhash": "b062efcab010d436ca2f6bed0dc61b90d8cbced756e1ed7cc7593cac30d87326",
    "pointer": 1099,
    "script_type": 14   
  },
  {
    "pt_idx": 1,
    "subaccount": 37,
    "ga_asset_id": 1,
    "value": "1872759",
    "block_height": 1288716,
    "txhash": "f88cfdb328f9d298b0ff8a641198d3e63ea7efaf6f98f5692ba3f88a03a73c2b",
    "pointer": 1088,
    "script_type": 14   }
]

From these I made transaction using pycoin library. By the way, it is difficult to sign a SegWit transaction. If anyone knows about this, please tell me.

  • What the pycoin version ? – f4r4 Apr 16 '18 at 17:35
  • pycoin 0.80.If you have solution, Pls tell me. – Coder HHC Apr 17 '18 at 17:58
  • @Mickey102644 Can you paste the (unsigned) transaction you made with Pycoin? – Mike D Jun 1 '18 at 9:04
0

For compatible segwit transactions, it is basically using p2sh transactions.
For pycoin specifically, you need to provide p2sh_lookup dict when sign the p2sh transaction.
I have a sample for bitcoin offline/paper transaction if you would like to check, the method spend_sh_fund may suit your need.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.