Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Address

Represents a TurtleCoin address

Hierarchy

  • Address

Index

Accessors

address

  • get address(): string
  • The Base58 encoded address

    Returns string

mnemonic

  • get mnemonic(): string | undefined
  • The mnemonic phrase for the address if available

    Returns string | undefined

paymentId

  • get paymentId(): string
  • set paymentId(paymentId: string): void
  • The payment Id of the address if one exists

    Returns string

  • The payment Id of the address if one exists

    Parameters

    • paymentId: string

    Returns void

prefix

seed

  • get seed(): string | undefined
  • The seed phrase for the address if available

    Returns string | undefined

spend

subwalletIndex

  • get subwalletIndex(): number
  • The address index number [0=primary]

    Returns number

view

Methods

toString

  • toString(): string
  • Returns the Base58 encoded address

    Returns string

    Base58 encoded address

Static encodeRaw

  • encodeRaw(rawAddress: string): string
  • Encodes a raw address (hex) into Base58 notation

    retursn

    the Base58 representation of the address

    Parameters

    • rawAddress: string

      the raw address in hexadecimal form

    Returns string

Static fromAddress

  • Creates a new address object from a Base58 address

    Parameters

    • address: string

      the public address to decode

    • Optional prefix: AddressPrefix | number

    Returns Address

    a new address object

Static fromEntropy

  • fromEntropy(entropy?: undefined | string, language?: undefined | string, prefix?: AddressPrefix | number): Address
  • Creates a new address object from entropy (new address)

    Parameters

    • Optional entropy: undefined | string
    • Optional language: undefined | string
    • Optional prefix: AddressPrefix | number

    Returns Address

    a new address object

Static fromKeys

  • fromKeys(privateSpendKey: string, privateViewKey: string, prefix?: AddressPrefix | number): Address
  • Creates a new address object using the supplied private keys

    Parameters

    • privateSpendKey: string

      the private spend key

    • privateViewKey: string

      the private view key

    • Optional prefix: AddressPrefix | number

    Returns Address

    a new address object

Static fromMnemonic

  • fromMnemonic(mnemonic: string, language?: undefined | string, prefix?: AddressPrefix | number): Address
  • Creates a new address object from a mnemonic phrase

    Parameters

    • mnemonic: string

      the wallet mnemonic phrase

    • Optional language: undefined | string
    • Optional prefix: AddressPrefix | number

    Returns Address

    a new address object

Static fromPublicKeys

  • fromPublicKeys(publicSpendKey: string, publicViewKey: string, paymentId?: undefined | string, prefix?: AddressPrefix | number): Address
  • Creates a new address object using the supplied public keys

    Parameters

    • publicSpendKey: string

      the public spend key

    • publicViewKey: string

      the public view key

    • Optional paymentId: undefined | string
    • Optional prefix: AddressPrefix | number

    Returns Address

    a new address object

Static fromSeed

  • Creates a new address object from a seed

    Parameters

    • seed: string

      the wallet seed

    • Optional language: undefined | string
    • Optional prefix: AddressPrefix | number

    Returns Address

    a new address object

Static fromViewOnlyKeys

  • fromViewOnlyKeys(publicSpendKey: string, privateViewKey: string, paymentId?: undefined | string, prefix?: AddressPrefix | number): Address
  • Creates a new address object (view only) using the supplied keys

    Parameters

    • publicSpendKey: string

      the public spend key

    • privateViewKey: string

      the private view key

    • Optional paymentId: undefined | string
    • Optional prefix: AddressPrefix | number

    Returns Address

    a new address object

Static generateSeed

  • generateSeed(entropy?: undefined | string, iterations?: undefined | number): string
  • Generates a new seed from entropy

    Parameters

    • Optional entropy: undefined | string
    • Optional iterations: undefined | number

    Returns string

    a new randomly created seed

Static generateSubwallet

  • generateSubwallet(privateSpendKey: string, subwalletIndex: number, language?: undefined | string, prefix?: AddressPrefix | number): Address
  • Generates a new subwallet address object using the supplied parameters

    Parameters

    • privateSpendKey: string

      the private spend key

    • subwalletIndex: number

      the subwallet index number

    • Optional language: undefined | string
    • Optional prefix: AddressPrefix | number

    Returns Address

    a new address object

Generated using TypeDoc