feat: added createAccount()

main
Keith Irwin 2024-04-22 17:14:30 -06:00
parent fec2f24dcf
commit fd6a76a583
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
2 changed files with 8 additions and 1 deletions

View File

@ -73,6 +73,13 @@ module.exports = class Wallet {
async close() { async close() {
return await this.rpc('close_wallet') 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 // Create address
async createAddress(params) { async createAddress(params) {
return await this.rpc('create_address', params) return await this.rpc('create_address', params)

View File

@ -1,7 +1,7 @@
{ {
"name": "monero-wallet-rpc-js", "name": "monero-wallet-rpc-js",
"type": "commonjs", "type": "commonjs",
"version": "1.2.18", "version": "1.2.19",
"description": "Javascript wrapper for monero-wallet-rpc calls", "description": "Javascript wrapper for monero-wallet-rpc calls",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {