utility-workspaces 0.12.4

Library for automating workflows and testing Utility smart contracts.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::convert::TryFrom;

use crate::error::{Error, ErrorKind};

use super::PublicKey;

impl TryFrom<unc_sdk::PublicKey> for PublicKey {
    type Error = Error;

    fn try_from(pk: unc_sdk::PublicKey) -> Result<Self, Self::Error> {
        Self::try_from_bytes(pk.as_bytes()).map_err(|e| {
            ErrorKind::DataConversion.full(
                "Could not convert sdk::PublicKey into workspaces::PublicKey",
                e,
            )
        })
    }
}