get the ScriptInfo entry of a child key, without it necessarily having indexed history
(&self, checksum: &Checksum, index: u32)
| 490 | |
| 491 | // get the ScriptInfo entry of a child key, without it necessarily having indexed history |
| 492 | pub fn get_wallet_script_info(&self, checksum: &Checksum, index: u32) -> Option<ScriptInfo> { |
| 493 | let indexer = self.indexer.read().unwrap(); |
| 494 | let wallet = indexer.watcher().get(checksum)?; |
| 495 | |
| 496 | if wallet.is_valid_index(index) { |
| 497 | Some(ScriptInfo::from_desc( |
| 498 | KeyOrigin::Descriptor(checksum.clone(), index), |
| 499 | wallet.derive_address(index), |
| 500 | wallet.derive_desc(index), |
| 501 | wallet.bip32_origins(index), |
| 502 | )) |
| 503 | } else { |
| 504 | None |
| 505 | } |
| 506 | } |
| 507 | |
| 508 | pub fn find_wallet_gap(&self, checksum: &Checksum) -> Option<usize> { |
| 509 | let indexer = self.indexer.read().unwrap(); |
no test coverage detected