(
get_key_response: &GetKeyResponse,
)
| 7 | use dstack_sdk_types::dstack::GetKeyResponse; |
| 8 | |
| 9 | pub fn to_account( |
| 10 | get_key_response: &GetKeyResponse, |
| 11 | ) -> Result<PrivateKeySigner, Box<dyn std::error::Error>> { |
| 12 | let key_bytes = hex::decode(&get_key_response.key)?; |
| 13 | let wallet = PrivateKeySigner::from_slice(&key_bytes)?; |
| 14 | Ok(wallet) |
| 15 | } |