feat(miniprotocols): Implement tx submission client (#220)

* feat(miniprotocols): Implement tx submission client

* Match CDDL specs

* Fix build errors

* Add server implementation for txsubmission

Also includes some documentation for how to use both the client and the server

* cargo fmt

* clippy suggestions

clippy pls

* Fail explicitly on missing n2c unix socket

---------

Co-authored-by: Pi Lanningham <pi@sundaeswap.finance>
This commit is contained in:
Santiago Carmuega 2023-02-04 02:38:12 +01:00 committed by GitHub
parent e5d8950e9f
commit 6a3679dcda
19 changed files with 785 additions and 355 deletions

View file

@ -14,7 +14,7 @@ impl AssetFingerprint {
pub fn from_parts(policy_id: &str, asset_name: &str) -> Result<AssetFingerprint, Box<dyn Err>> {
let mut hasher = Blake2bVar::new(20).unwrap();
let c = format!("{}{}",policy_id,asset_name);
let c = format!("{policy_id}{asset_name}");
let raw = hex::decode(c)?;
hasher.update(raw.as_slice());
let mut buf = [0u8; 20];