this.#weight = undefined\r
}\r
\r
+ /**\r
+ * Stringifies public properties into a JSON object so it can be further\r
+ * stringified by JSON.stringify()\r
+ */\r
+ toJSON () {\r
+ return {\r
+ address: this.address,\r
+ index: this.index,\r
+ publicKey: this.publicKey,\r
+ confirmed_balance: this.confirmed_balance?.toString(),\r
+ confirmed_height: this.confirmed_height?.toString(),\r
+ confirmed_frontier: this.confirmed_frontier,\r
+ confirmed_receivable: this.confirmed_receivable?.toString(),\r
+ confirmed_representative: this.confirmed_representative?.address,\r
+ balance: this.balance?.toString(),\r
+ block_count: this.block_count,\r
+ frontier: this.frontier,\r
+ open_block: this.open_block,\r
+ receivable: this.receivable?.toString(),\r
+ representative: this.representative?.address,\r
+ representative_block: this.representative_block,\r
+ weight: this.weight?.toString(),\r
+ }\r
+ }\r
+\r
/**\r
* Instantiates an Account object from its Nano address.\r
*\r