From 151a2c3c1bb4d9fc6d3a932d25f325e7374315c3 Mon Sep 17 00:00:00 2001 From: Grid Cat Date: Sun, 27 Jun 2021 21:16:38 +0200 Subject: [PATCH] feat: add sendfrom --- src/RPC/Wallet.ts | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/RPC/Wallet.ts b/src/RPC/Wallet.ts index 17c5f4d..43c0d5e 100644 --- a/src/RPC/Wallet.ts +++ b/src/RPC/Wallet.ts @@ -641,4 +641,38 @@ export class Wallet extends RPCBase { type, ); } + + /** + * Sends of Gridcoin from to . + * + * @param {string} account - Account FROM + * @param {Address} address - Address TO + * @param {number} amount - Amount to send + * @param {number} [minConf] - is the minimum number of confirmations for a UTXO to be used. + * @param {string} [comment] - is a personal comment about what the transaction is for (doesn’t go into the transaction, it is only stored locally). + * @param {string} [commentTo] - is also a personal comment about who you are sending to (also only local). + * @param {string} [message] - is a message/comment that is sent publicly on the transaction. + * @returns {Promise} + * @memberof Wallet + */ + public async sendFrom( + account: string, + address: Address, + amount: number, + minConf?: number, + comment?: string, + commentTo?: string, + message?: string, + ): Promise { + return this.call( + 'sendfrom', + account, + address, + amount, + minConf, + comment, + commentTo, + message, + ); + } }