Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a TurtleCoin address

Hierarchy

  • Address

Index

Constructors

Properties

m_cached: Cache = ...
m_keys: Keys = ...
m_language: string = 'english'
m_paymentId?: string
m_prefix: AddressPrefix = ...
m_seed?: string
m_subwalletIndex: number = 0

Accessors

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

    Returns undefined | string

  • 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

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

    Returns undefined | string

  • get spend(): KeyPair
  • set spend(keys: KeyPair): void
  • The address spend keys

    Returns KeyPair

  • The address spend keys

    Parameters

    • keys: KeyPair

    Returns void

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

    Returns number

  • get view(): KeyPair
  • set view(keys: KeyPair): void
  • The address view keys

    Returns KeyPair

  • The address view keys

    Parameters

    • keys: KeyPair

    Returns void

Methods

  • address(): Promise<string>
  • The Base58 encoded address

    Returns Promise<string>

  • toString(): Promise<string>
  • Returns the Base58 encoded address

    Returns Promise<string>

    Base58 encoded address

  • 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

  • Creates a new address object from a Base58 address

    Parameters

    • address: string

      the public address to decode

    • Optional prefix: number | AddressPrefix

    Returns Promise<Address>

    a new address object

  • Creates a new address object from entropy (new address)

    Parameters

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

    Returns Promise<Address>

    a new address object

  • fromKeys(privateSpendKey: string, privateViewKey: string, prefix?: number | AddressPrefix): Promise<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: number | AddressPrefix

    Returns Promise<Address>

    a new address object

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

    Parameters

    • mnemonic: string

      the wallet mnemonic phrase

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

    Returns Promise<Address>

    a new address object

  • fromPublicKeys(publicSpendKey: string, publicViewKey: string, paymentId?: string, prefix?: number | AddressPrefix): Promise<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: string
    • Optional prefix: number | AddressPrefix

    Returns Promise<Address>

    a new address object

  • Creates a new address object from a seed

    Parameters

    • seed: string

      the wallet seed

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

    Returns Promise<Address>

    a new address object

  • fromViewOnlyKeys(publicSpendKey: string, privateViewKey: string, paymentId?: string, prefix?: number | AddressPrefix): Promise<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: string
    • Optional prefix: number | AddressPrefix

    Returns Promise<Address>

    a new address object

  • generateSeed(entropy?: string, iterations?: number): Promise<string>
  • Generates a new seed from entropy

    Parameters

    • Optional entropy: string
    • Optional iterations: number

    Returns Promise<string>

    a new randomly created seed

  • generateSubwallet(privateSpendKey: string, subwalletIndex: number, language?: string, prefix?: number | AddressPrefix): Promise<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: string
    • Optional prefix: number | AddressPrefix

    Returns Promise<Address>

    a new address object

Generated using TypeDoc