Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Account

Index

Properties

addressType

addressType: AddressType = AddressType.Default

Address type The default address type, a chain can contain several address types, and the address type is contained in the address. View the NULS repo on addressType

chainId

chainId: ChainIdType = ChainIdType.Mainnet

ChainId The default chain id (NULS main chain), the chain id affects the generation of the address. View the NULS repo on chainId

Methods

create

  • Initiates creating a new account and returns the data

    Parameters

    • Optional password: undefined | string

      A plain text password for encrypting the private key

    • Default value addressType: AddressType = this.addressType

      The default address type, a chain can contain several address types, and the address type is contained in the address. View the NULS repo on addressType.

    • Default value chainId: ChainIdType = this.chainId

      The default chain id (NULS main chain), the chain id affects the generation of the address. View the NULS repo on chainId.

    Returns IGetAccount

createCustomAddress

  • This will loop around until it finds a matching address

    Parameters

    • str: string

      The string to look for in addresses created - The larger the string the harder it is to find

    • password: string

      A plain text password for encrypting the private key

    • Default value caseSensitive: boolean = false

      Mark this as true to make the address case sensitive to your input string

    • Default value position: CustomAddressPosition = CustomAddressPosition.end

      The position of where string should be inside the address - Be aware that start is very difficult to find

    • Default value addressType: AddressType = this.addressType

      The default address type, a chain can contain several address types, and the address type is contained in the address. View the NULS repo on addressType.

    • Default value chainId: ChainIdType = this.chainId

      The default chain id (NULS main chain), the chain id affects the generation of the address. View the NULS repo on chainId.

    Returns IGetAccount

getAccount

  • getAccount(): IGetAccount

import

  • import(privateKey: string, password?: undefined | string, addressType?: AddressType, chainId?: ChainIdType): IGetAccount
  • Imports an account and returns the full account data

    Parameters

    • privateKey: string

      A plain text or encrypted private key

    • Optional password: undefined | string

      A plain text password for encrypting the private key or decrypting the encrypted private key

    • Default value addressType: AddressType = this.addressType

      The default address type, a chain can contain several address types, and the address type is contained in the address. View the NULS repo on addressType.

    • Default value chainId: ChainIdType = this.chainId

      The default chain id (NULS main chain), the chain id affects the generation of the address. View the NULS repo on chainId.

    Returns IGetAccount

resetAccountDetails

  • resetAccountDetails(): void

switchChain