the only existing tool that I know of and OP was talking about is coinb.in and that only uses P2SH
You can always use Bitcoin Core, run it even offline if you don't want to download the chain, and then it can generate any type of address.
dumpprivkey bcrt1qy6jt5w2pv6ydqryts9vn7ut3g8cf3ygaxp4xae
cUhWuApMfhVaGdweY1W2kEuwnjTyoJ9jxQ6vFwCuP3TuZngZXKQP
getaddressinfo bcrt1qy6jt5w2pv6ydqryts9vn7ut3g8cf3ygaxp4xae
{
...
"pubkey": "032d02e0fe6b071d74fefa64235ee6a3db46fc489443d00291538c0b6d2ec6d1b0",
...
}
Let's make it 2023-02-11 at 00:00, just to make sure it is now valid:
https://duckduckgo.com/?q=unixtime+1676073600&ia=answerTime (1676073600) to hex in little-endian: 0x80dae663
Push to stack with its size: 0x0480dae663
Add OP_CHECKLOCKTIMEVERIFY: 0xb1
Add OP_DROP: 0x75
Push public key to the stack with its size: 0x21032d02e0fe6b071d74fefa64235ee6a3db46fc489443d00291538c0b6d2ec6d1b0
Add OP_CHECKSIG: 0xac
Result:
decodescript 0480dae663b17521032d02e0fe6b071d74fefa64235ee6a3db46fc489443d00291538c0b6d2ec6d1b0ac
{
"asm": "1676073600 OP_CHECKLOCKTIMEVERIFY OP_DROP 032d02e0fe6b071d74fefa64235ee6a3db46fc489443d00291538c0b6d2ec6d1b0 OP_CHECKSIG",
"desc": "raw(0480dae663b17521032d02e0fe6b071d74fefa64235ee6a3db46fc489443d00291538c0b6d2ec6d1b0ac)#t4yrcshe",
"type": "nonstandard",
"p2sh": "2MuZX3TRME2pre1xu54X2iZ8a4gyMYErt8u",
"segwit": {
"asm": "0 2896005bb01874a711cb9779dc0e244e5fb19d03cb9da4837a6949599e8f55b3",
"desc": "addr(bcrt1q9ztqqkasrp62wywtjauacr3yfe0mr8greww6fqm6d9y4n8502kesv2pg4y)#u33kx8h4",
"hex": "00202896005bb01874a711cb9779dc0e244e5fb19d03cb9da4837a6949599e8f55b3",
"address": "bcrt1q9ztqqkasrp62wywtjauacr3yfe0mr8greww6fqm6d9y4n8502kesv2pg4y",
"type": "witness_v0_scripthash",
"p2sh-segwit": "2NEusWubTsTxwziFY16xejNbTSktU1skFwX"
}
}
The first warning is that our script type is marked as "nonstandard". But let's see if we can generate some regtest coins, send them to our address, and then get them with standardness rules enabled. First, generate some regtest coins:
generatetoaddress 101 bcrt1qy6jt5w2pv6ydqryts9vn7ut3g8cf3ygaxp4xae
And then, let's send them to all address types we reached from decodescript:
decoderawtransaction 0200000000010127b52425f2d9f5f33896a22c80d850334228cfd18923d76af7cf77bcb7d5372f0000000000fdffffff0400e1f5050000000017a9141965f9b5556eae3bad2644044075541f13809dec8700e1f505000000002200202896005bb01874a711cb9779dc0e244e5fb19d03cb9da4837a6949599e8f55b300e1f5050000000017a914eda9c6593e1b7fa5524f561198b4a7468d29dad187274e24180100000016001426a4ba39416688d00c8b81593f717141f098911d024730440220734377f733719a71177b1db84230ad7e69464240ce9a22abf461cc1f0bbaa62e0220679c67c5444919f207a59c9ae21ad010e0f37bbaa68eb8fdf01a7c705b395f340121032d02e0fe6b071d74fefa64235ee6a3db46fc489443d00291538c0b6d2ec6d1b065000000
{
"txid": "f2ac7f0d8dedaa7062dc8f957ffc21684a42d85f4bfc0bdf06bbfd1efd82cb14",
"hash": "3ce035f4649f379e96fb51d66afa6f286e12d75d0fe661531385c9b302a2e206",
"version": 2,
"size": 298,
"vsize": 217,
"weight": 865,
"locktime": 101,
"vin": [
{
"txid": "2f37d5b7bc77cff76ad72389d1cf28423350d8802ca29638f3f5d9f22524b527",
"vout": 0,
"scriptSig": {
"asm": "",
"hex": ""
},
"txinwitness": [
"30440220734377f733719a71177b1db84230ad7e69464240ce9a22abf461cc1f0bbaa62e0220679c67c5444919f207a59c9ae21ad010e0f37bbaa68eb8fdf01a7c705b395f3401",
"032d02e0fe6b071d74fefa64235ee6a3db46fc489443d00291538c0b6d2ec6d1b0"
],
"sequence": 4294967293
}
],
"vout": [
{
"value": 1.00000000,
"n": 0,
"scriptPubKey": {
"asm": "OP_HASH160 1965f9b5556eae3bad2644044075541f13809dec OP_EQUAL",
"desc": "addr(2MuZX3TRME2pre1xu54X2iZ8a4gyMYErt8u)#xv98pchz",
"hex": "a9141965f9b5556eae3bad2644044075541f13809dec87",
"address": "2MuZX3TRME2pre1xu54X2iZ8a4gyMYErt8u",
"type": "scripthash"
}
},
{
"value": 1.00000000,
"n": 1,
"scriptPubKey": {
"asm": "0 2896005bb01874a711cb9779dc0e244e5fb19d03cb9da4837a6949599e8f55b3",
"desc": "addr(bcrt1q9ztqqkasrp62wywtjauacr3yfe0mr8greww6fqm6d9y4n8502kesv2pg4y)#u33kx8h4",
"hex": "00202896005bb01874a711cb9779dc0e244e5fb19d03cb9da4837a6949599e8f55b3",
"address": "bcrt1q9ztqqkasrp62wywtjauacr3yfe0mr8greww6fqm6d9y4n8502kesv2pg4y",
"type": "witness_v0_scripthash"
}
},
{
"value": 1.00000000,
"n": 2,
"scriptPubKey": {
"asm": "OP_HASH160 eda9c6593e1b7fa5524f561198b4a7468d29dad1 OP_EQUAL",
"desc": "addr(2NEusWubTsTxwziFY16xejNbTSktU1skFwX)#vw0e5eea",
"hex": "a914eda9c6593e1b7fa5524f561198b4a7468d29dad187",
"address": "2NEusWubTsTxwziFY16xejNbTSktU1skFwX",
"type": "scripthash"
}
},
{
"value": 46.99999783,
"n": 3,
"scriptPubKey": {
"asm": "0 26a4ba39416688d00c8b81593f717141f098911d",
"desc": "addr(bcrt1qy6jt5w2pv6ydqryts9vn7ut3g8cf3ygaxp4xae)#q5erljel",
"hex": "001426a4ba39416688d00c8b81593f717141f098911d",
"address": "bcrt1qy6jt5w2pv6ydqryts9vn7ut3g8cf3ygaxp4xae",
"type": "witness_v0_keyhash"
}
}
]
}
Now, let's try to get our coins.
importaddress "2MuZX3TRME2pre1xu54X2iZ8a4gyMYErt8u"
importaddress "bcrt1q9ztqqkasrp62wywtjauacr3yfe0mr8greww6fqm6d9y4n8502kesv2pg4y"
importaddress "2NEusWubTsTxwziFY16xejNbTSktU1skFwX"
Generate some blocks, to make our transaction confirmed:
generatetoaddress 6 bcrt1qy6jt5w2pv6ydqryts9vn7ut3g8cf3ygaxp4xae
We can see our coins as watch-only, but we need some way to move them. So, we have to create a transaction for each address:
createrawtransaction "[{\"txid\":\"f2ac7f0d8dedaa7062dc8f957ffc21684a42d85f4bfc0bdf06bbfd1efd82cb14\",\"vout\":0}]" "[{\"bcrt1qy6jt5w2pv6ydqryts9vn7ut3g8cf3ygaxp4xae\":0.99999000}]" 0 true
020000000114cb82fd1efdbb06df0bfc4b5fd8424a6821fc7f958fdc6270aaed8d0d7facf20000000000fdffffff0118ddf5050000000016001426a4ba39416688d00c8b81593f717141f098911d00000000
createrawtransaction "[{\"txid\":\"f2ac7f0d8dedaa7062dc8f957ffc21684a42d85f4bfc0bdf06bbfd1efd82cb14\",\"vout\":1}]" "[{\"bcrt1qy6jt5w2pv6ydqryts9vn7ut3g8cf3ygaxp4xae\":0.99999000}]" 0 true
020000000114cb82fd1efdbb06df0bfc4b5fd8424a6821fc7f958fdc6270aaed8d0d7facf20100000000fdffffff0118ddf5050000000016001426a4ba39416688d00c8b81593f717141f098911d00000000
createrawtransaction "[{\"txid\":\"f2ac7f0d8dedaa7062dc8f957ffc21684a42d85f4bfc0bdf06bbfd1efd82cb14\",\"vout\":2}]" "[{\"bcrt1qy6jt5w2pv6ydqryts9vn7ut3g8cf3ygaxp4xae\":0.99999000}]" 0 true
020000000114cb82fd1efdbb06df0bfc4b5fd8424a6821fc7f958fdc6270aaed8d0d7facf20200000000fdffffff0118ddf5050000000016001426a4ba39416688d00c8b81593f717141f098911d00000000
Then, the hardest part is to sign those transactions.
signrawtransactionwithwallet "020000000114cb82fd1efdbb06df0bfc4b5fd8424a6821fc7f958fdc6270aaed8d0d7facf20000000000fdffffff0118ddf5050000000016001426a4ba39416688d00c8b81593f717141f098911d00000000" "[{\"txid\":\"f2ac7f0d8dedaa7062dc8f957ffc21684a42d85f4bfc0bdf06bbfd1efd82cb14\",\"vout\":0,\"scriptPubKey\":\"a9141965f9b5556eae3bad2644044075541f13809dec87\",\"redeemScript\":\"0480dae663b17521032d02e0fe6b071d74fefa64235ee6a3db46fc489443d00291538c0b6d2ec6d1b0ac\",\"amount\":1.00000000}]"
{
"hex": "020000000114cb82fd1efdbb06df0bfc4b5fd8424a6821fc7f958fdc6270aaed8d0d7facf20000000000fdffffff0118ddf5050000000016001426a4ba39416688d00c8b81593f717141f098911d00000000",
"complete": false,
"errors": [
{
"txid": "f2ac7f0d8dedaa7062dc8f957ffc21684a42d85f4bfc0bdf06bbfd1efd82cb14",
"vout": 0,
"witness": [
],
"scriptSig": "",
"sequence": 4294967293,
"error": "Unable to sign input, invalid stack size (possibly missing key)"
}
]
}
signrawtransactionwithwallet "020000000114cb82fd1efdbb06df0bfc4b5fd8424a6821fc7f958fdc6270aaed8d0d7facf20100000000fdffffff0118ddf5050000000016001426a4ba39416688d00c8b81593f717141f098911d00000000" "[{\"txid\":\"f2ac7f0d8dedaa7062dc8f957ffc21684a42d85f4bfc0bdf06bbfd1efd82cb14\",\"vout\":1,\"scriptPubKey\":\"00202896005bb01874a711cb9779dc0e244e5fb19d03cb9da4837a6949599e8f55b3\",\"witnessScript\":\"0480dae663b17521032d02e0fe6b071d74fefa64235ee6a3db46fc489443d00291538c0b6d2ec6d1b0ac\",\"amount\":1.00000000}]"
{
"hex": "020000000114cb82fd1efdbb06df0bfc4b5fd8424a6821fc7f958fdc6270aaed8d0d7facf20100000000fdffffff0118ddf5050000000016001426a4ba39416688d00c8b81593f717141f098911d00000000",
"complete": false,
"errors": [
{
"txid": "f2ac7f0d8dedaa7062dc8f957ffc21684a42d85f4bfc0bdf06bbfd1efd82cb14",
"vout": 1,
"witness": [
],
"scriptSig": "",
"sequence": 4294967293,
"error": "Witness program was passed an empty witness"
}
]
}
signrawtransactionwithwallet "020000000114cb82fd1efdbb06df0bfc4b5fd8424a6821fc7f958fdc6270aaed8d0d7facf20200000000fdffffff0118ddf5050000000016001426a4ba39416688d00c8b81593f717141f098911d00000000" "[{\"txid\":\"f2ac7f0d8dedaa7062dc8f957ffc21684a42d85f4bfc0bdf06bbfd1efd82cb14\",\"vout\":2,\"scriptPubKey\":\"a914eda9c6593e1b7fa5524f561198b4a7468d29dad187\",\"redeemScript\":\"0480dae663b17521032d02e0fe6b071d74fefa64235ee6a3db46fc489443d00291538c0b6d2ec6d1b0ac\",\"witnessScript\":\"00202896005bb01874a711cb9779dc0e244e5fb19d03cb9da4837a6949599e8f55b3\",\"amount\":1.00000000}]"
{
"hex": "020000000114cb82fd1efdbb06df0bfc4b5fd8424a6821fc7f958fdc6270aaed8d0d7facf20200000000fdffffff0118ddf5050000000016001426a4ba39416688d00c8b81593f717141f098911d00000000",
"complete": false,
"errors": [
{
"txid": "f2ac7f0d8dedaa7062dc8f957ffc21684a42d85f4bfc0bdf06bbfd1efd82cb14",
"vout": 2,
"witness": [
],
"scriptSig": "",
"sequence": 4294967293,
"error": "Unable to sign input, invalid stack size (possibly missing key)"
}
]
}
As we can see, signing it directly won't work. We have watch-only addresses, so even if we have our private key, then still we need to pass the script that is behind each of those addresses, because it is not stored anywhere in the wallet.
However, we can try any other tool outside of Bitcoin Core, sign those transactions, and then check if they will be broadcasted successfully by sendrawtransaction. Let's see how it works without signatures:
sendrawtransaction "020000000114cb82fd1efdbb06df0bfc4b5fd8424a6821fc7f958fdc6270aaed8d0d7facf20000000000fdffffff0118ddf5050000000016001426a4ba39416688d00c8b81593f717141f098911d00000000"
bad-txns-nonstandard-inputs (code -26)
sendrawtransaction "020000000114cb82fd1efdbb06df0bfc4b5fd8424a6821fc7f958fdc6270aaed8d0d7facf20100000000fdffffff0118ddf5050000000016001426a4ba39416688d00c8b81593f717141f098911d00000000"
non-mandatory-script-verify-flag (Witness program was passed an empty witness) (code -26)
sendrawtransaction "020000000114cb82fd1efdbb06df0bfc4b5fd8424a6821fc7f958fdc6270aaed8d0d7facf20200000000fdffffff0118ddf5050000000016001426a4ba39416688d00c8b81593f717141f098911d00000000"
bad-txns-nonstandard-inputs (code -26)
Then, by adding signatures and trying again, we should reach them in our regtest mempool. If not, then that means they are non-standard, and we cannot use them without contacting miners directly.