GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||
GeezerVison is showing docs.rs — feeless - Rust Crate feeless[−][src]A set of tools to handle many aspects of the Nano cryptocurrency. See the feeless.dev website for more details about this project. Keys and signing exampleuse feeless::Phrase; use feeless::phrase::Language; // Example phrase from https://docs.nano.org/integration-guides/key-management/#test-vectors let words = "edge defense waste choose enrich upon flee junk siren film clown finish luggage leader kid quick brick print evidence swap drill paddle truly occur"; // Generate the private key from the seed phrase. let phrase = Phrase::from_words(Language::English, words)?; // First account with the password `some password`. let private_key = phrase.to_private(0, "some password")?; let public_key = private_key.to_public()?; let address = public_key.to_address(); // The above three lines can be chained like this: let address = phrase.to_private(0, "some password")?.to_public()?.to_address(); assert_eq!(address.to_string(), "nano_1pu7p5n3ghq1i1p4rhmek41f5add1uh34xpb94nkbxe8g4a6x1p69emk8y1d"); // Sign a message. let message = "secret message!".as_bytes(); let signature = private_key.sign(message)?; // Someone else can verify the message based on your address or public key. address.to_public().verify(message, &signature)?; public_key.verify(message, &signature)?; Modules
Structs
Enums
Constants
| ||||||||||||||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |