xyzpub

Crates.ioxyzpub
lib.rsxyzpub
version0.3.0
sourcesrc
created_at2021-08-28 09:30:08.953233
updated_at2022-10-11 16:10:25.353779
descriptionConvert xpubs and xprvs to different versions.
homepage
repositoryhttps://github.com/KaiWitt/xyzpub
max_upload_size
id443389
size15,467
Kai Wolfram (KaiWitt)

documentation

README

xyzpub

Convert xpubs and xprvs to different versions.

Example

use xyzpub::{convert_version, Version};

let xpub = "xpub6BosfCnifzxcFwrSzQiqu2DBVTshkCXacvNsWGYJVVhhawA7d4R5WSWGFNbi8Aw6ZRc1brxMyWMzG3DSSSSoekkudhUd9yLb6qx39T9nMdj";
let expected_zpub = "zpub6qUQGY8YyN3ZxYEgf8J6KCQBqQAbdSWaT9RK54L5FWTTh8na8NkCkZpYHnWt7zEwNhqd6p9Utq562cSZsqGqFE87NNsUKnyZeJ5KvbhfC8E";

let result = convert_version(xpub, &Version::Zpub).unwrap();

assert_eq!(result, expected_zpub);

Useful resources

Commit count: 13

cargo fmt