Signature – Raw transactions are marked as signed (in Electrum) even if they are not.
You want to create a raw, unsigned transaction to sign later. I use bitcore-lib JS. When you import the generated hex into Electrum, the transaction will be marked as signed. What marks this transaction as signed? Also, if you try to sign with a web wallet such as okxwallet, ‘”sign tx error” will occur.
Create it using bitcore-lib as follows:
const result = await tx.uncheckedSerialize();
console.log("tx", result);
return result;
witch:
0200000001946cc778034d9f4058186298312d0ca03fc98003c9602db200f41b0513e924920000000000ffffffff045802000000000000160014729a7abd2e3f2ca5a87d683144017c51d04a1f441c030000000000006951210224734b6d14fd03f56e1c1674313210dca6a3d12e8eb6d5531c3455f1df98b7262102dde6040bc349a13aea65d1201f649fd585abe2564ab7f6015341356b30edd5092102020202020202020202020202020202020202020202020202020202020202020253ae1c0300000000000069512102fbb1cca99d1508d313973514beb3bbf3ed26b20631dad7f68affb4fdb504733f21021667169e976e9b1b4550381b6c73c74ea732066a31e23a0ca0fdaa80893bfcd82102020202020202020202020202020202020202020202020202020202020202020253ae0832000000000000160014d5748af80435bff10368e7f5b64cec9e94a348b900000000
JSON:
"addresses": (
"bc1q646g47qyxkllzqmgul6mvn8vn622xj9e680kq6",
"bc1qw2d840fw8uk2t2radqc5gqtu28gy586ycwqd68",
"4ZKQevKq8w9wHc6t7DqUrNKm5kxXdcLhm4",
"4JPZCE5tffhieHLFndvoD6pkzgxQpJExAB"
),
"block_height": -1,
"block_index": -1,
"confirmations": 0,
"double_spend": false,
"fees": 2000,
"hash": "95e547ba7966f36c35a827bb56639c05e0f5dfbd7162123a349882b36aebd94f",
"inputs": (
"addresses": (
"bc1q646g47qyxkllzqmgul6mvn8vn622xj9e680kq6"
),
"age": 832998,
"output_index": 0,
"output_value": 17000,
"prev_hash": "9224e913051bf400b22d60c90380c93fa00c2d3198621858409f4d0378c76c94",
"script_type": "pay-to-witness-pubkey-hash",
"sequence": 4294967295
),
"outputs": (
"addresses": (
"bc1qw2d840fw8uk2t2radqc5gqtu28gy586ycwqd68"
),
"script": "0014729a7abd2e3f2ca5a87d683144017c51d04a1f44",
"script_type": "pay-to-witness-pubkey-hash",
"value": 600
,
"addresses": (
"4ZKQevKq8w9wHc6t7DqUrNKm5kxXdcLhm4"
),
"script": "51210224734b6d14fd03f56e1c1674313210dca6a3d12e8eb6d5531c3455f1df98b7262102dde6040bc349a13aea65d1201f649fd585abe2564ab7f6015341356b30edd5092102020202020202020202020202020202020202020202020202020202020202020253ae",
"script_type": "pay-to-multi-pubkey-hash",
"value": 796
,
"addresses": (
"4JPZCE5tffhieHLFndvoD6pkzgxQpJExAB"
),
"script": "512102fbb1cca99d1508d313973514beb3bbf3ed26b20631dad7f68affb4fdb504733f21021667169e976e9b1b4550381b6c73c74ea732066a31e23a0ca0fdaa80893bfcd82102020202020202020202020202020202020202020202020202020202020202020253ae",
"script_type": "pay-to-multi-pubkey-hash",
"value": 796
,
"addresses": (
"bc1q646g47qyxkllzqmgul6mvn8vn622xj9e680kq6"
),
"script": "0014d5748af80435bff10368e7f5b64cec9e94a348b9",
"script_type": "pay-to-witness-pubkey-hash",
"value": 12808
),
"preference": "low",
"received": "2024-03-28T22:01:15.903211558Z",
"relayed_by": "54.227.49.30",
"size": 341,
"total": 15000,
"ver": 2,
"vin_sz": 1,
"vout_sz": 4,
"vsize": 341
```