}\r
set weight (v) { this.#weight = v ? BigInt(v) : undefined }\r
\r
- constructor (address: string, publicKey: Uint8Array<ArrayBuffer>) {\r
+ private constructor (address: string, publicKey: Uint8Array<ArrayBuffer>) {\r
if (!Account.#isInternal) {\r
throw new Error(`Account cannot be instantiated directly. Use factory methods instead.`)\r
}\r
#phrase: string = ''\r
get phrase (): string { return this.#phrase.normalize('NFKD') }\r
\r
- constructor () {\r
+ private constructor () {\r
if (!Bip39Mnemonic.#isInternal) {\r
throw new Error(`Bip39Mnemonic must be created with async methods 'fromPhrase()' or 'fromEntropy().`)\r
}\r
get bytes (): Uint8Array { return this.#bytes }
get hex (): string { return bytes.toHex(this.#bytes) }
- constructor (bytes: Uint8Array<ArrayBuffer>) {
+ private constructor (bytes: Uint8Array<ArrayBuffer>) {
if (!Entropy.#isInternal) {
throw new Error(`Entropy cannot be instantiated directly. Use 'await Entropy.create()' instead.`)
}
export class Bip44Wallet extends Wallet {\r
static #isInternal: boolean = false\r
\r
- constructor (id: Entropy, seed?: Uint8Array<ArrayBuffer>, mnemonic?: Bip39Mnemonic) {\r
+ private constructor (id: Entropy, seed?: Uint8Array<ArrayBuffer>, mnemonic?: Bip39Mnemonic) {\r
if (!Bip44Wallet.#isInternal) {\r
throw new Error(`Bip44Wallet cannot be instantiated directly. Use 'await Bip44Wallet.create()' instead.`)\r
}\r
export class Blake2bWallet extends Wallet {\r
static #isInternal: boolean = false\r
\r
- constructor (id: Entropy, seed?: Uint8Array<ArrayBuffer>, mnemonic?: Bip39Mnemonic) {\r
+ private constructor (id: Entropy, seed?: Uint8Array<ArrayBuffer>, mnemonic?: Bip39Mnemonic) {\r
if (!Blake2bWallet.#isInternal) {\r
throw new Error(`Blake2bWallet cannot be instantiated directly. Use 'await Blake2bWallet.create()' instead.`)\r
}\r
\r
DynamicTransport: typeof TransportBLE | typeof TransportUSB | typeof TransportHID = TransportHID\r
\r
- constructor (id: Entropy) {\r
+ private constructor (id: Entropy) {\r
if (!LedgerWallet.#isInternal) {\r
throw new Error(`LedgerWallet cannot be instantiated directly. Use 'await LedgerWallet.create()' instead.`)\r
}\r