Combine multi address's UTXO into a transaction input?
See original GitHub issueI want to Combine multi address’s UTXO into a transaction input. It is used in case I want to centralize all of my assets into one address in one transaction.
I saw a transaction with multi addresses as UTXO but no docs explain about that. Is there anyone know how can it possible with NEO?
Please help me. Thanks.
Transaction details:
{
"vouts": [
{
"value": 199,
"txid": "cfc0b14ace3996517ecdba22efc7ae1f065689bfe87285ecb08a763ddc84c082",
"n": 0,
"asset": "NEO",
"address_hash": "AJzoeKrj7RHMwSrPQDPdv61ciVEYpmhkjk"
}
],
"vin": [
{
"value": 116,
"txid": "c5ef92e5a774e992bb49cd3e14c1541597815f2a2a729c3e51b31ee97e88a7d0",
"n": 1,
"asset": "NEO",
"address_hash": "AQ8P9QaDxS8qppK1yDjnuxnMrLRP9K9Pse"
},
{
"value": 1,
"txid": "4b55517dad91f16df6a4e9ed97d042283d84381217ed41a14a838b52ac1d5d8a",
"n": 0,
"asset": "NEO",
"address_hash": "AXKGxoLyeUGqxMZJa5kpfd7tAzL1fH3EqZ"
},
{
"value": 29,
"txid": "53413ef6d4aa01c052a6a0a78b146a96b4f79de32096fbb3b25145d0ffa4caec",
"n": 0,
"asset": "NEO",
"address_hash": "AeQfJLBxsCbvonbu24s51bgwKqhaoiG6UF"
},
{
"value": 36,
"txid": "9d96c56e9d6cf3572879d357f7e18012225aa0b7d423e3d01e2a6761f990e482",
"n": 0,
"asset": "NEO",
"address_hash": "AVKnaBxss6WozRgqVL2oqyynh8VvQPutow"
},
{
"value": 17,
"txid": "a28a022fa24c412216735632027db321a63382f91fe47afb24565309913abf70",
"n": 0,
"asset": "NEO",
"address_hash": "AQ2yh94yp3pMp71L2tPw1rhZVu4nLAGouh"
}
],
"version": 0,
"type": "ContractTransaction",
"txid": "cfc0b14ace3996517ecdba22efc7ae1f065689bfe87285ecb08a763ddc84c082",
"time": 1554373181,
"sys_fee": 0,
"size": 746,
"scripts": [
{
"verification": "2102c01ba008cd450a535cb36f06c60193e409d8028873e8311ea460d43c258b89a8ac",
"invocation": "4081884755676e0fdb32d1453be6e3e9b89521ab1ef2e1ce132c20de4dd3a859faa889291a9682e2ecdc415a95137a99f89d96e1c3b7e5c792200c73dd5f2d2015"
},
{
"verification": "210377cb6e2b556ce161e7a37810f2a183308ec90a668f9be066dc4ac9d1eb0848b8ac",
"invocation": "40eb0292dd2b1a35fd936a26a43f3caf1d93d677fdbac6394a18f3bd5b410f32d9286b555fb6a27f755417c6c72d507348f0342e19818fafdf4a8472bcf7602dcd"
},
{
"verification": "2103d9e16cbf136cf3bf2135e17bbea88f37a039e58412eac66603303668be4a66b9ac",
"invocation": "40788d76466bf810a0780de0b038face90d78ed1767d93973f1d7131f9348b11a14cf9b4402238cd054167af5c9c16d7e689b5e5249b8aa07f79fdd86386440b5f"
},
{
"verification": "2102c539d4a8694f99034d26b6b3a6138f2583a7459897f9a88a94c023a9f257c749ac",
"invocation": "406f3bec18226d576dd4e713b6bb0aa3ef806c0186ad4013e60dfe7ac4437c556234db67f39e19926cbfd3a49f49fc481243101997082e9b6b1403bb324bade469"
},
{
"verification": "2102b722512aad7aac19c0e4b149f6dd966f5276c4a74f7d199e9dc4768f9a037bd2ac",
"invocation": "401e63201fb83bab1b42be77d8129ff568823aaf20693cc527d2f8b484225d891b3506b59ec2739cbbb4b2f1e637dbc78935ba63dad1d2ec76ce1085f38156fdc7"
}
],
"pubkey": null,
"nonce": null,
"net_fee": 0,
"description": null,
"contract": null,
"claims": [],
"block_height": 3576442,
"block_hash": "3d382d4efd20fa58646b9ffb407d4ff9339a240e8ffc41d892222c01cc41f0ea",
"attributes": [],
"asset": null
}```
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Transactions with multiple input UTXOs and multiple output ...
The outputs of that transaction are 10 UTXOs of 0.5BTC each, each locked by a different receiving address A o.
Read more >Consolidating UTXOs - Keys.Casa
Casa App allows you to consolidate your UTXOs easily, right within the app. A UTXO refers to an "unspent transaction output.
Read more >how to create TX using multiple UTXO from different addresses?
Whether they're from multiple addresses or the same shouldn't matter. If you're using the transaction builder use its add_input() (or its ...
Read more >What Is Unspent Transaction Output (UTXO)? - BeInCrypto
Unspent transaction output consolidation combines multiple UTXOs into a single output: to reduce fees or increase privacy. As illustrated above, ...
Read more >UTXOs, addresses, and CoinJoins: Preserving privacy in a ...
Suppose you grab multiple UTXOs from your wallet that are sitting in different addresses, and combine them as the inputs to a single...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
AFAIK you can’t do this with neon-js in a single transaction, because the
sendAsset
api only allows for one account to be specified in theconfig
object. You would have to loop through all the accounts you want to consolidate and issue a separate transaction for each to a single destination address.The transaction above probably came from a full-node wallet like neo-gui or neo-cli. Those wallets will combine all available inputs needed to construct the UTXO when the output amount exceeds the balance of a single address.
Thank you @hal0x2328. So read the neo code and figure out that they try to sign a transaction multi-time and add all of the witnesses into transaction witnesses. I’m trying to implement it in an offline machine.