Select the types of activity you want to include in your feed.
feat: tiles link: creating endpoints with Tiles keypair
- This makes sure the iroh endpointId can be decoded into the tiles account DID and vice-versa, fundamentally both are build from same tiles keypair underneath
···11-FROM mlx-community/Qwen3.5-4B-MLX-4bit
11+FROM mlx-community/Qwen3.5-0.8B-8bit
22+# FROM mlx-community/Qwen3.5-0.8B-MLX-8bit
33+# FROM mlx-community/Qwen3.5-4B-MLX-4bit
24# FROM mlx-community/Qwen3-0.6B-4bit
+24-1
tilekit/src/accounts.rs
···11//! Handles stuff related to accounts, identity etc..
2233+use std::str::FromStr;
44+35use anyhow::Result;
44-use ed25519_dalek::{SigningKey, ed25519::signature::rand_core::OsRng};
66+use ed25519_dalek::{SecretKey, SigningKey, VerifyingKey, ed25519::signature::rand_core::OsRng};
57use keyring::Entry;
68use ucan::did::Ed25519Did;
79···2426 Ok(did)
2527}
26282929+/// Returns the `SecretKey` (ed25519_dalek type, but Private Key)
3030+///
3131+/// # Arguments
3232+///
3333+/// - `app`- The service for which Identity is made (for ex: tiles)
3434+/// - `did` - The `Identity` of the service
3535+pub fn get_secret_key(app: &str, did: &Identity) -> Result<SecretKey> {
3636+ let entry = Entry::new(app, did)?;
3737+ let mut bytes: [u8; 64] = [0u8; 64];
3838+ let secret_pair = entry.get_secret()?;
3939+4040+ bytes[..64].copy_from_slice(secret_pair.as_slice());
4141+4242+ let signing_key = SigningKey::from_keypair_bytes(&bytes)?;
4343+ Ok(signing_key.to_bytes())
4444+}
4545+4646+pub fn get_public_key_from_did(did: &str) -> Result<[u8; 32]> {
4747+ let ed_did = Ed25519Did::from_str(did)?;
4848+ Ok(ed_did.0.to_bytes())
4949+}
2750#[cfg(test)]
2851mod tests {
2952 use keyring::{mock, set_default_credential_builder};