update dist

This commit is contained in:
woodser 2024-08-07 07:00:58 -04:00
parent 5173381e4e
commit 2fc2807ee0
3 changed files with 43 additions and 3 deletions

27
dist/HavenoClient.js vendored
View file

@ -58,6 +58,7 @@ class HavenoClient {
HavenoUtils_1.default.log(2, "Creating Haveno client connected to " + url);
this._url = url;
this._password = password;
this._getTradeStatisticsClient = new GrpcServiceClientPb_1.GetTradeStatisticsClient(this._url);
this._getVersionClient = new GrpcServiceClientPb_1.GetVersionClient(this._url);
this._accountClient = new GrpcServiceClientPb_1.AccountClient(this._url);
this._xmrConnectionsClient = new GrpcServiceClientPb_1.XmrConnectionsClient(this._url);
@ -933,6 +934,19 @@ class HavenoClient {
throw new HavenoError_1.default(e.message, e.code);
}
}
/**
* Delete a payment account.
*
* @param paymentAccountId {string} the id of the payment account to delete
*/
async deletePaymentAccount(paymentAccountId) {
try {
await this._paymentAccountsClient.deletePaymentAccount(new grpc_pb_1.DeletePaymentAccountRequest().setPaymentAccountId(paymentAccountId), { password: this._password });
}
catch (e) {
throw new HavenoError_1.default(e.message, e.code);
}
}
/**
* Get available offers to buy or sell XMR.
*
@ -1075,6 +1089,19 @@ class HavenoClient {
throw new HavenoError_1.default(e.message, e.code);
}
}
/**
* Get all trade statistics.
*
* @return {TradeStatistics3[]} all user trades
*/
async getTradeStatistics() {
try {
return (await this._getTradeStatisticsClient.getTradeStatistics(new grpc_pb_1.GetTradeStatisticsRequest(), { password: this._password })).getTradeStatisticsList();
}
catch (e) {
throw new HavenoError_1.default(e.message, e.code);
}
}
/**
* Get all trades.
*