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