Skip to content

Commit

Permalink
feat: add sendfrom
Browse files Browse the repository at this point in the history
  • Loading branch information
gridcat committed Jun 27, 2021
1 parent ff4876a commit 151a2c3
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/RPC/Wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -641,4 +641,38 @@ export class Wallet extends RPCBase {
type,
);
}

/**
* Sends <amount> of Gridcoin from <account> to <gridcoinaddress>.
*
* @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<TX>}
* @memberof Wallet
*/
public async sendFrom(
account: string,
address: Address,
amount: number,
minConf?: number,
comment?: string,
commentTo?: string,
message?: string,
): Promise<TX> {
return this.call<TX>(
'sendfrom',
account,
address,
amount,
minConf,
comment,
commentTo,
message,
);
}
}

0 comments on commit 151a2c3

Please sign in to comment.