Options
All
  • Public
  • Public/Protected
  • All
Menu

Crypto utility class can be used once ZumoKit module is initialized. Access it as follows:

import { ZKUtility } from 'react-native-zumo-kit';

This class provides mnemonic phrase generation utility, Bitcoin & Ethereum address validation utilities and Ethereum unit conversion methods.

Hierarchy

  • ZKUtility

Index

Methods

ethToGwei

  • ethToGwei(eth: Decimal): Promise<Decimal>
  • Converts ETH value to gwei.

    Parameters

    • eth: Decimal

    Returns Promise<Decimal>

ethToWei

  • ethToWei(eth: Decimal): Promise<Decimal>
  • Converts ETH value to wei.

    Parameters

    • eth: Decimal

    Returns Promise<Decimal>

generateMnemonic

  • generateMnemonic(wordCount: number): Promise<string>
  • Generates mnemonic seed phrase used in wallet creation process.

    Parameters

    • wordCount: number

      12, 15, 18, 21 or 24

    Returns Promise<string>

gweiToEth

  • gweiToEth(gwei: Decimal): Promise<Decimal>
  • Converts gwei value to ETH.

    Parameters

    • gwei: Decimal

    Returns Promise<Decimal>

isValidBtcAddress

  • isValidBtcAddress(address: string, network: Network): Promise<boolean>
  • Validates Bitcoin address on a given network.

    Parameters

    • address: string

      Bitcoin address

    • network: Network

      network type, either 'MAINNET' or 'TESTNET'

    Returns Promise<boolean>

isValidEthAddress

  • isValidEthAddress(address: string): Promise<boolean>
  • Validates Ethereum address.

    Parameters

    • address: string

      Ethereum address

    Returns Promise<boolean>

weiToEth

  • weiToEth(wei: Decimal): Promise<Decimal>
  • Converts wei value to ETH.

    Parameters

    • wei: Decimal

    Returns Promise<Decimal>

Legend

  • Property
  • Method
  • Private property
  • Private method
  • Property
  • Inherited property
  • Static property

Generated using TypeDoc