Wallet-level support for non-standard scripts
https://github.com/elvisjedusor/bitok/commit/20ff42a62b5b8969f32ec924ab59932fbce0bc3aThe wallet now recognizes and handles additional script templates enabled by the restored opcodes (from 18000 block).
ClassifyScript()
Nine new template types are defined. These include hashlocks (HASH160 and SHA256), arithmetic gates, bitwise constructions (with and without signatures), CAT-based covenants (hash-bound, signature-bound, or standalone), and splice scripts.
Scripts using these opcodes are identified explicitly instead of being labeled “nonstandard.”
Solver()
Hashlock templates are integrated into the signing path.
When the wallet has both the private key and the required preimage, it can construct:
<sig> <pubkey> <preimage>
for the corresponding output.
mapHashPreimages
Preimage-to-hash mappings are stored by the wallet and protected under the existing key lock.
New RPCs:
addpreimage - register raw hex data; computes and stores HASH160 and SHA256 mappings.
listpreimages - display registered entries.
analyzescript enhancement
When a recognized template is detected, the RPC reports the template name, expected scriptSig structure, and spending requirements.
Documentation updated:
SCRIPT_TEMPLATES.mdThese changes extend wallet functionality to match the available Script capabilities.