Create a Seed Mnemonic
The IOTA SDK is currently in alpha. APIs, interfaces, and behavior may change without notice between releases. It is not yet recommended for production use.
About Mnemonics
Mnemonics are a popular method for generating cryptographic seeds in a more user-friendly way. A mnemonic phrase, seed phrase, or recovery phrase is a sequence of words that users can easily write down and verify. These words are carefully selected from a predefined wordlist to ensure compatibility across different wallets and systems.
The IOTA SDK uses the BIP39, BIP44 and SLIP10 standards to generate addresses and sign transactions. This means that the SDK can deterministically derive the seed from a mnemonic or seed phrase, making it easier for your users to write down or remember.
Example Code
- Rust
- Go
- Kotlin
- Python
You can use the the [generate_mnemonic()] function to generate a random mnemonic.
by default, the generated mnemonic will consist of 24 words, but you can pass a [MnemonicLength] to generate a mnemonic with a different number of words.
You can use the [iota_sdk.GenerateMnemonic()] function to generate a random mnemonic.
by default, the generated mnemonic will consist of 24 words, but you can pass for example [iota_sdk.MnemonicLengthWords12] to generate a mnemonic with 12 words.
You can use the [generateMnemonic()] function to generate a random mnemonic.
by default, the generated mnemonic will consist of 24 words, but you can pass a [MnemonicLength] to generate a mnemonic with a different number of words.
You can use the [generate_mnemonic()] function to generate a random mnemonic.
by default, the generated mnemonic will consist of 24 words, but you can pass a [MnemonicLength] to generate a mnemonic with a different number of words.
Full Example Code
- Rust
- Go
- Kotlin
- Python
loading...
loading...
loading...
loading...
Expected Output
24 word mnemonic: defy forest author famous found replace salad apple trial alien agent crush little east slim seminar icon wall tumble online knee test beyond gloom
12 word mnemonic: charge cheese abandon build zebra small hope anxiety curtain regret noise culture