signature?: string
work?: string
- constructor (account: string | Account, balance?: bigint | string, previous?: string, representative?: string | Account, signature?: string)
+ constructor (account: string | Account, balance?: bigint | number | string, previous?: string, representative?: string | Account, signature?: string)
constructor (account: unknown, balance: unknown, previous: unknown, representative: unknown, signature: unknown) {
try {
if (typeof account === 'string') {
balance ??= account.balance
previous ??= account.frontier
representative ??= account.representative
- if (typeof balance !== 'bigint' && typeof balance !== 'string') {
+ if (typeof balance !== 'bigint' && typeof balance !== 'number' && typeof balance !== 'string') {
throw new TypeError('Account balance is unknown')
}
if (typeof previous !== 'string') {