From fd6a76a583ea3baa2df0e556b4960af0b41b496e Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Mon, 22 Apr 2024 17:14:30 -0600 Subject: [PATCH] feat: :sparkles: added createAccount() --- main.js | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 625fc9d..50d1aa3 100644 --- a/main.js +++ b/main.js @@ -73,6 +73,13 @@ module.exports = class Wallet { async close() { return await this.rpc('close_wallet') } + // Create account + async createAccount(label) { + if (!label) return await this.rpc('create_account') + else return await this.rpc('create_account', { + label: label, + }) + } // Create address async createAddress(params) { return await this.rpc('create_address', params) diff --git a/package.json b/package.json index 44b2169..a477474 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "monero-wallet-rpc-js", "type": "commonjs", - "version": "1.2.18", + "version": "1.2.19", "description": "Javascript wrapper for monero-wallet-rpc calls", "main": "main.js", "scripts": {