c095145864a97b5efb4c90ef81989185b5a06998 refactor(chain): replace `ScriptBuf` with `AsRef<Script>` in SPK index methods (Yuki Kishimoto)
Pull request description:
### Description
Replace `ScriptBuf` with `&Script` in `SpkTxOutIndex::index_of_spk` and `KeychainTxOutIndex::index_of_spk` methods, to avoid the need of cloning the `ScriptBuf` for a SPK index lookup.
### Changelog notice
Breaking changes:
- Change `SpkTxOutIndex::index_of_spk` and `KeychainTxOutIndex::index_of_spk` args from `ScriptBuf` to `&Script`.
### Checklists
#### All Submissions:
* [X] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
#### New Features:
* [ ] I've added tests for the new feature
* [ ] I've added docs for the new feature
#### Bugfixes:
* [X] This pull request breaks the existing API
* [ ] I've added tests to reproduce the issue which are now passing
* [ ] I'm linking the issue being fixed by this PR
ACKs for top commit:
oleonardolima:
cACK
c095145864a97b5efb4c90ef81989185b5a06998
evanlinjin:
ACK
c095145864a97b5efb4c90ef81989185b5a06998
Tree-SHA512: f77bb4d9b58a682f7b0371ec1a76b2e6cca2bc0a76181d085bb7905d99a5eb4ca8907c6f2b229d38893673aa186eea0c79431b8736a67932c9956cd97f99f085