I can see in the GUI that with a testnet segwit multisig (2 of 3) wallet if I send coins Electrum fills in the txid (6affef0a464ab6f9ca0db27216e5b85f4d26a907f2fe9e209cd565584f5cc30b).
If I export the hex
01000000000101900eadf495c92f148e74fbdb8651c2f6aae903ca98eea005dd176a7b6154d9bb0000000000fdffffff02e8030000000000001976a91453c1d05822e2658fd2e1ce0c88184fd3234b081688ac784d080000000000220020fe3771f4cba56661930763348e73c85b9fe07111a0fef1a4b907ef92453df4c5feffffffff7078080000000000050001ff01ff01fffd0201524c53ff0257548301d9a24f3c8000000128d96fca507ee0abdd7dbb89588f91587199c4b314f7e7c5926c96f55f77715402cf0805a347294c76541850c0bcb5a2b5f8e1c5399344ec6526e4d274f2d224ec000000004c53ff0257548301361ca322800000011e406db645e1e3d11ada4129af80acbca3054b444759ad6d05263eafc7f3a641020110e41e681dc08a02d34f2797eb1d60a7dcffdca6196946eb0594cfc98b7c1e000000004c53ff0257548301c3e4a36e80000001ed6125c56dcb8b8d549da5fdd76392b43eb9c62d705627d24fc3ac4c4c811036035e17384ec7f8247c838ace4c06b23e2094920c469937a568b97020e2f05ec2b00000000053ae0d201400
and deserialize it I get something like
{
"inputs": [
{
"address": "bc1qctnmckkujaztrwdw7n46j9y0rnrqg4mnt68c7tfgf74ja650wytqnam9tg",
"num_sig": 2,
"prevout_hash": "bbd954617b6a17dd05a0ee98ca03e9aaf6c25186dbfb748e142fc995f4ad0e90",
"prevout_n": 0,
"pubkeys": [
"ff0257548301d9a24f3c8000000128d96fca507ee0abdd7dbb89588f91587199c4b314f7e7c5926c96f55f77715402cf0805a347294c76541850c0bcb5a2b5f8e1c5399344ec6526e4d274f2d224ec00000000",
"ff0257548301361ca322800000011e406db645e1e3d11ada4129af80acbca3054b444759ad6d05263eafc7f3a641020110e41e681dc08a02d34f2797eb1d60a7dcffdca6196946eb0594cfc98b7c1e00000000",
"ff0257548301c3e4a36e80000001ed6125c56dcb8b8d549da5fdd76392b43eb9c62d705627d24fc3ac4c4c811036035e17384ec7f8247c838ace4c06b23e2094920c469937a568b97020e2f05ec2b000000000"
],
"scriptSig": "",
"sequence": 4294967293,
"signatures": [
null,
null,
null
],
"type": "p2wsh",
"value": 555120,
"witness": "050001ff01ff01fffd0201524c53ff0257548301d9a24f3c8000000128d96fca507ee0abdd7dbb89588f91587199c4b314f7e7c5926c96f55f77715402cf0805a347294c76541850c0bcb5a2b5f8e1c5399344ec6526e4d274f2d224ec000000004c53ff0257548301361ca322800000011e406db645e1e3d11ada4129af80acbca3054b444759ad6d05263eafc7f3a641020110e41e681dc08a02d34f2797eb1d60a7dcffdca6196946eb0594cfc98b7c1e000000004c53ff0257548301c3e4a36e80000001ed6125c56dcb8b8d549da5fdd76392b43eb9c62d705627d24fc3ac4c4c811036035e17384ec7f8247c838ace4c06b23e2094920c469937a568b97020e2f05ec2b00000000053ae",
"witnessScript": "524c53ff0257548301d9a24f3c8000000128d96fca507ee0abdd7dbb89588f91587199c4b314f7e7c5926c96f55f77715402cf0805a347294c76541850c0bcb5a2b5f8e1c5399344ec6526e4d274f2d224ec000000004c53ff0257548301361ca322800000011e406db645e1e3d11ada4129af80acbca3054b444759ad6d05263eafc7f3a641020110e41e681dc08a02d34f2797eb1d60a7dcffdca6196946eb0594cfc98b7c1e000000004c53ff0257548301c3e4a36e80000001ed6125c56dcb8b8d549da5fdd76392b43eb9c62d705627d24fc3ac4c4c811036035e17384ec7f8247c838ace4c06b23e2094920c469937a568b97020e2f05ec2b00000000053ae",
"x_pubkeys": [
"ff0257548301d9a24f3c8000000128d96fca507ee0abdd7dbb89588f91587199c4b314f7e7c5926c96f55f77715402cf0805a347294c76541850c0bcb5a2b5f8e1c5399344ec6526e4d274f2d224ec00000000",
"ff0257548301361ca322800000011e406db645e1e3d11ada4129af80acbca3054b444759ad6d05263eafc7f3a641020110e41e681dc08a02d34f2797eb1d60a7dcffdca6196946eb0594cfc98b7c1e00000000",
"ff0257548301c3e4a36e80000001ed6125c56dcb8b8d549da5fdd76392b43eb9c62d705627d24fc3ac4c4c811036035e17384ec7f8247c838ace4c06b23e2094920c469937a568b97020e2f05ec2b000000000"
]
}
],
"lockTime": 1318925,
"outputs": [
{
"address": "18dsGLx3Gk9oQakYkDUALkS5bEYjHjQz12",
"prevout_n": 0,
"scriptPubKey": "76a91453c1d05822e2658fd2e1ce0c88184fd3234b081688ac",
"type": 0,
"value": 1000
},
{
"address": "bc1qlcmhraxt54nxryc8vv6guu7gtw07qug35rl0rf9eqlhey3fa7nzswr9v9p",
"prevout_n": 1,
"scriptPubKey": "0020fe3771f4cba56661930763348e73c85b9fe07111a0fef1a4b907ef92453df4c5",
"type": 0,
"value": 544120
}
],
"version": 1
}
But I can't work out how to get the txid from either the hex (which isn't valid a transaction hex) or from the deserialized transaction.
I've tried using
https://github.com/chainside/btcnodejs but surely there is an easier way.