From: Chris Duncan Date: Sat, 8 Aug 2026 18:05:21 +0000 (-0700) Subject: Add account version to account class. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=63be07db792ad6b800b30f7429fc5b2dd1c2dca2;p=libnemo.git Add account version to account class. --- diff --git a/src/lib/account/index.ts b/src/lib/account/index.ts index 72c90ea..b72e0a9 100644 --- a/src/lib/account/index.ts +++ b/src/lib/account/index.ts @@ -40,6 +40,7 @@ export class Account { #receivable?: bigint #representative?: Account #representative_block?: string + #version?: number #weight?: bigint get publicKey (): string { return bytes.toHex(this.#publicKey) } @@ -65,6 +66,7 @@ export class Account { get receivable (): bigint | undefined { return this.#receivable } get representative (): Account | undefined { return this.#representative } get representative_block (): string | undefined { return this.#representative_block } + get version (): number | undefined { return this.#version } get weight (): bigint | undefined { return this.#weight } set confirmed_balance (v: bigint | number | string) { this.#confirmed_balance = BigInt(v) } @@ -98,6 +100,7 @@ export class Account { } } set representative_block (v: string | undefined) { this.#representative_block = v } + set version (v: bigint | number | string) { this.#version = Number(v) } set weight (v: bigint | number | string) { this.#weight = BigInt(v) } /**