pub fn new(mnemonic: impl AsRef<str>) -> StacksResult<Self> {
		let mnemonic = Mnemonic::from_str(mnemonic.as_ref())?;

		// Bitcoin network is irrelevant for extended private keys
		let master_key = ExtendedPrivKey::new_master(
			BitcoinNetwork::Bitcoin,
			&mnemonic.to_seed(""),
		)?;

		Ok(Self {
			master_key,
			mnemonic,
		})
	}
Creates a wallet from the network, mnemonic, and optional passphrase
stacks-core/src/wallet.rs