@hdwallet/core
Version:
A complete Hierarchical Deterministic (HD) Wallet generator for 200+ cryptocurrencies, built with TypeScript.
90 lines • 4.25 kB
JavaScript
// SPDX-License-Identifier: MIT
import { Address } from './address';
import { P2PKHAddress } from './p2pkh';
import { P2SHAddress } from './p2sh';
import { P2TRAddress } from './p2tr';
import { P2WPKHAddress } from './p2wpkh';
import { P2WPKHInP2SHAddress } from './p2wpkh-in-p2sh';
import { P2WSHAddress } from './p2wsh';
import { P2WSHInP2SHAddress } from './p2wsh-in-p2sh';
import { EthereumAddress } from './ethereum';
import { CosmosAddress } from './cosmos';
import { XinFinAddress } from './xinfin';
import { TronAddress } from './tron';
import { AddressError } from '../exceptions';
import { RippleAddress } from './ripple';
import { FilecoinAddress } from './filecoin';
import { AvalancheAddress } from './avalanche';
import { EOSAddress } from './eos';
import { ErgoAddress } from './ergo';
import { IconAddress } from './icon';
import { OKTChainAddress } from './okt-chain';
import { HarmonyAddress } from './harmony';
import { ZilliqaAddress } from './zilliqa';
import { InjectiveAddress } from './injective';
import { CardanoAddress } from './cardano';
import { MoneroAddress } from './monero';
import { NanoAddress } from './nano';
import { NeoAddress } from './neo';
import { AlgorandAddress } from './algorand';
import { MultiversXAddress } from './multiversx';
import { SolanaAddress } from './solana';
import { StellarAddress } from './stellar';
import { TezosAddress } from './tezos';
import { SuiAddress } from './sui';
import { AptosAddress } from './aptos';
import { NearAddress } from './near';
export class ADDRESSES {
static dictionary = {
[ ]: P2PKHAddress,
[ ]: P2SHAddress,
[ ]: P2TRAddress,
[ ]: P2WPKHAddress,
[ ]: P2WPKHInP2SHAddress,
[ ]: P2WSHAddress,
[ ]: P2WSHInP2SHAddress,
[ ]: EthereumAddress,
[ ]: CosmosAddress,
[ ]: XinFinAddress,
[ ]: TronAddress,
[ ]: RippleAddress,
[ ]: FilecoinAddress,
[ ]: AvalancheAddress,
[ ]: EOSAddress,
[ ]: ErgoAddress,
[ ]: IconAddress,
[ ]: OKTChainAddress,
[ ]: HarmonyAddress,
[ ]: ZilliqaAddress,
[ ]: InjectiveAddress,
[ ]: CardanoAddress,
[ ]: MoneroAddress,
[ ]: NanoAddress,
[ ]: NeoAddress,
[ ]: AlgorandAddress,
[ ]: MultiversXAddress,
[ ]: SolanaAddress,
[ ]: StellarAddress,
[ ]: TezosAddress,
[ ]: SuiAddress,
[ ]: AptosAddress,
[ ]: NearAddress
};
static getNames() {
return Object.keys(this.dictionary);
}
static getClasses() {
return Object.values(this.dictionary);
}
static getAddressClass(name) {
if (!this.isAddress(name)) {
throw new AddressError('Invalid address name', { expected: this.getNames(), got: name });
}
return this.dictionary[name];
}
static isAddress(name) {
return name in this.dictionary;
}
}
export { Address, P2PKHAddress, P2SHAddress, P2TRAddress, P2WPKHAddress, P2WPKHInP2SHAddress, P2WSHAddress, P2WSHInP2SHAddress, EthereumAddress, CosmosAddress, XinFinAddress, TronAddress, RippleAddress, FilecoinAddress, AvalancheAddress, EOSAddress, ErgoAddress, IconAddress, OKTChainAddress, HarmonyAddress, ZilliqaAddress, InjectiveAddress, CardanoAddress, MoneroAddress, NanoAddress, NeoAddress, AlgorandAddress, MultiversXAddress, SolanaAddress, StellarAddress, TezosAddress, SuiAddress, AptosAddress, NearAddress };
//# sourceMappingURL=index.js.map