View Source Walle (Walle v0.5.0)

Walle

NIF for working with Ethereum wallets

Installation

def deps do
  [
    {:walle, "~> 0.5.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/walle.

Summary

Functions

Decrypts an encrypted JSON keystore from JSON string.

Creates a new random encrypted JSON with the provided password.

Returns the public address from the given private key.

Recovers the Ethereum address which was used to sign the given message.

Recovers the address which signed the typed data (EIP-712).

Signs the given message with the provided private key.

Signs typed data (EIP-712) with the provided private key.

Verifies that signature on message was produced by address

Functions

Link to this function

decrypt_keystore(json_string, password)

View Source
This function is deprecated. Use Walle.Wallet.export_private_key/1 instead.

Decrypts an encrypted JSON keystore from JSON string.

Decryption supports the Scrypt and PBKDF2 key derivation functions.

This function is deprecated. Use Walle.Wallet.to_keystore/2 instead.

Creates a new random encrypted JSON with the provided password.

Link to this function

public_address(private_key)

View Source
This function is deprecated. Use Walle.Wallet.address/1 instead.

Returns the public address from the given private key.

Link to this function

recover(message, signature)

View Source

Recovers the Ethereum address which was used to sign the given message.

Recovery signature data uses ‘Electrum’ notation, this means the v value is expected to be either 27 or 28.

Link to this function

recover_typed_data(typed_data, signature)

View Source

Recovers the address which signed the typed data (EIP-712).

Link to this function

sign_message(message, private_key)

View Source
This function is deprecated. Use Walle.Wallet.sign_message/2 instead.

Signs the given message with the provided private key.

Link to this function

sign_typed_data(typed_data, private_key)

View Source
This function is deprecated. Use Walle.Wallet.sign_typed_data/2 instead.

Signs typed data (EIP-712) with the provided private key.

Link to this function

verify(message, signature, address)

View Source

Verifies that signature on message was produced by address