Cardanoex.Wallet (cardanoex v0.2.0)

The wallet module lets you work with Cardano wallets.

Wallets are identified by unique ID which is deterministically derived from the seed (mnemonic phrase), so each time you delete and create a wallet again, it receives the same ID.

Link to this section Summary

Functions

Create and restore a wallet from a mnemonic sentence.

Delete wallet by wallet id

Fetch a wallet by wallet id

Return the UTxOs distribution across the whole wallet, in the form of a histogram.

Return a list of known wallets, ordered from oldest to newest.

Update the name of a wallet

Link to this section Functions

Link to this function

create_wallet(options \\ [])

Create and restore a wallet from a mnemonic sentence.

Options

  • name - A human readable name for the wallet

  • mnemonic_sentence - A list of bip-0039 mnemonic words. 15-24 words.

  • passphrase - A master passphrase to lock and protect the wallet for sensitive operation (e.g. sending funds)

  • mnemonic_second_factor - An optional passphrase used to encrypt the mnemonic sentence. A list of bip-0039 mnemonic words. 9-12 words.

  • address_pool_gap - Number of consecutive unused addresses allowed. Default is 20.

    IMPORTANT DISCLAIMER: Using values other than 20 automatically makes your wallet invalid with regards to BIP-44 address discovery. It means that you will not be able to fully restore your wallet in a different software which is strictly following BIP-44. Beside, using large gaps is not recommended as it may induce important performance degradations. Use at your own risks.

Link to this function

delete(wallet_id)

Delete wallet by wallet id

Options

  • wallet_id - hex based string. 40 characters
Link to this function

fetch(wallet_id)

Fetch a wallet by wallet id

Options

  • wallet_id - hex based string. 40 characters
Link to this function

fetch_utxo_stats(wallet_id)

Return the UTxOs distribution across the whole wallet, in the form of a histogram.

Options

  • wallet_id - hex based string. 40 characters

Return a list of known wallets, ordered from oldest to newest.

Link to this function

update(wallet_id, new_name)

Update the name of a wallet

Options

  • wallet_id - hex based string. 40 characters
  • new_name - the new name for the wallet
Link to this function

update_passphrase(wallet_id, old_passphrase, new_passphrase)

Update passphrase for a wallet

Options

  • wallet_id - hex based string. 40 characters
  • old_passphrase - the old passphrase
  • new_passphrase - the new passphrase