UNPKG

@cobaltx/sdk-v2

Version:

An SDK for building applications on top of CobaltX.

35 lines (32 loc) 1.08 kB
import { NetworkName } from '../config.js'; interface CurrencyProps { decimals: number; symbol?: string; name?: string; } /** * A currency is any fungible financial instrument on Solana, including SOL and all SPL tokens. * The only instance of the base class `Currency` is SOL. */ declare class Currency { readonly symbol?: string; readonly name?: string; readonly decimals: number; /** * The only instance of the base class `Currency`. */ /** * Constructs an instance of the base class `Currency`. The only instance of the base class `Currency` is `Currency.SOL`. * @param decimals - decimals of the currency * @param symbol - symbol of the currency * @param name - name of the currency */ constructor({ decimals, symbol, name }: CurrencyProps); equals(other: Currency): boolean; static getSOL(network: NetworkName): Currency; } /** * Compares two currencies for equality */ declare function currencyEquals(currencyA: Currency, currencyB: Currency): boolean; export { Currency, currencyEquals };