TradesService class
A service that handles trade-related operations via the Haveno gRPC API.
This service allows you to perform various trade-related actions, such as
fetching trade data, sending chat messages, confirming payments, and more.
It uses the HavenoChannel for gRPC communication and provides error handling
via the GrpcErrorHandler
mixin.
Constructors
- TradesService()
- Constructs a TradesService instance.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- havenoChannel → HavenoChannel
-
The Haveno client used to communicate with the Haveno gRPC server.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
completeTrade(
String? tradeId) → Future< void> - Completes a trade by marking it as finished.
-
confirmPaymentReceived(
String tradeId) → Future< TradeInfo?> - Confirms that the payment has been received for a specific trade.
-
confirmPaymentSent(
String tradeId) → Future< TradeInfo?> - Confirms that the payment has been sent for a specific trade.
-
getChatMessages(
String tradeId) → Future< List< ChatMessage> > - Retrieves chat messages for a specific trade by its trade ID.
-
getTrade(
String tradeId) → Future< TradeInfo?> - Retrieves a specific trade by its trade ID.
-
getTrades(
) → Future< List< TradeInfo> ?> - Retrieves all trades from the Haveno gRPC server.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendChatMessage(
String? tradeId, String? message) → Future< void> - Sends a chat message for a specific trade.
-
takeOffer(
String? offerId, String? paymentAccountId, Int64 amount) → Future< TradeInfo?> - Takes an offer by providing the offer ID, payment account ID, and amount.
-
toString(
) → String -
A string representation of this object.
inherited
-
withdrawFunds(
String? tradeId, String? address, String? memo) → Future< void> - Withdraws funds for a specific trade to the specified address.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited