| Crates.io | near-seed-phrase |
| lib.rs | near-seed-phrase |
| version | 1.0.0 |
| created_at | 2023-08-13 05:01:24.559808+00 |
| updated_at | 2025-12-14 11:11:33.59535+00 |
| description | NEAR Seed Phrase |
| homepage | |
| repository | |
| max_upload_size | |
| id | 943140 |
| size | 25,019 |
Similar to near-seed-phrase but in Rust version
cargo add near-seed-phrase
use near_seed_phrase::{derive_key, NearMnemonic, NearDerivationPath};
fn example() {
let mnemonic: NearMnemonic =
"fortune conduct light unusual gloom process wrap spare season exact anchor devote"
.parse()
.unwrap();
let private_key = derive_key(&mnemonic, "", &NearDerivationPath::default()).unwrap();
assert_eq!(
private_key.to_string(),
"ed25519:G94YBVktAVUFZWvYBtYmfpvVMNCtSf2x73bMfTCM9CfzyrUyN5X6VpTqr8QTCHYBTdUfzufDsTy3cR9CfNf74Bv"
);
assert_eq!(
private_key.get_public_key().to_string(),
"ed25519:2PQENDq3KABdr7cw1TH5B4AdXLqcyNXTTpWbdZh7k828"
);
}
use near_seed_phrase::derive_key;
fn example() {
let mnemonic =
"fortune conduct light unusual gloom process wrap spare season exact anchor devote";
let private_key = derive_key!(mnemonic);
assert_eq!(
private_key.to_string(),
"ed25519:G94YBVktAVUFZWvYBtYmfpvVMNCtSf2x73bMfTCM9CfzyrUyN5X6VpTqr8QTCHYBTdUfzufDsTy3cR9CfNf74Bv"
);
assert_eq!(
private_key.get_public_key().to_string(),
"ed25519:2PQENDq3KABdr7cw1TH5B4AdXLqcyNXTTpWbdZh7k828"
);
}