Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents an SPL token with a unique address and some metadata.

Hierarchy

Index

Constructors

  • new Token(mint: PublicKeyish, decimals: number, symbol?: string, name?: string): Token
  • Constructs an instance of the base class Currency. The only instance of the base class Currency is Currency.SOL.

    Parameters

    • mint: PublicKeyish
    • decimals: number
    • symbol: string = "UNKNOWN"
    • name: string = "UNKNOWN"

    Returns Token

Properties

decimals: number
mint: PublicKey
name?: string
symbol?: string
SOL: Currency = ...

The only instance of the base class Currency.

WSOL: Token = ...

The only instance of the base class Token.

Methods

  • equals(other: Token): boolean
  • Returns true if the two tokens are equivalent, i.e. have the same mint address.

    Parameters

    • other: Token

      other token to compare

    Returns boolean