use std::convert::{From, TryInto}; use sled::{Batch, Tree}; use bitcoin::consensus::encode::{deserialize, serialize}; use bitcoin::hash_types::Txid; use bitcoin::util::bip32::{ChildNumber, DerivationPath}; use bitcoin::{OutPoint, Script, Transaction}; use crate::database::{BatchDatabase, BatchOperations, Database}; use crate::error::Error; use crate::types::*; // path -> script p{i,e} -> script // script -> path s