Package tbdex.sdk.httpclient
Object TbdexHttpClient
-
- All Implemented Interfaces:
public class TbdexHttpClientA client of the tbDEX HTTP interface for communicating with a PFI.
-
-
Field Summary
Fields Modifier and Type Field Description public final static TbdexHttpClientINSTANCE
-
Method Summary
Modifier and Type Method Description final List<Offering>getOfferings(String pfiDid, GetOfferingsFilter filter)Fetches offerings from a PFI. final List<Balance>getBalances(String pfiDid, BearerDid requesterDid)Fetches balances from a PFI. final UnitcreateExchange(Rfq rfq)Send RFQ message to the PFI. final UnitcreateExchange(Rfq rfq, String replyTo)Send RFQ message and include a replyTo URL for the PFI to send a callback to. final UnitsubmitOrder(Order order)Send Order message to the PFI. final UnitsubmitClose(Close close)Send Close message to the PFI. final List<Message>getExchange(String pfiDid, BearerDid requesterDid, String exchangeId)Fetches a specific exchange identified by its ID from the PFI. final List<List<Message>>getExchanges(String pfiDid, BearerDid requesterDid, GetExchangesFilter filter)Fetches exchanges from the PFI based on the provided filters. -
-
Method Detail
-
getOfferings
final List<Offering> getOfferings(String pfiDid, GetOfferingsFilter filter)
Fetches offerings from a PFI.
- Parameters:
pfiDid- The decentralized identifier of the PFI.filter- An optional filter to apply for fetching offerings.- Returns:
A list of Offering matching the request.
-
getBalances
final List<Balance> getBalances(String pfiDid, BearerDid requesterDid)
Fetches balances from a PFI.
- Parameters:
pfiDid- The decentralized identifier of the PFI.requesterDid- The decentralized identifier of the entity requesting the balances.- Returns:
A list of Balance matching the request.
-
createExchange
final Unit createExchange(Rfq rfq)
Send RFQ message to the PFI.
- Parameters:
rfq- The RFQ to send
-
createExchange
final Unit createExchange(Rfq rfq, String replyTo)
Send RFQ message and include a replyTo URL for the PFI to send a callback to.
- Parameters:
rfq- The RFQ to sendreplyTo- The callback URL for PFI to send messages to.
-
submitOrder
final Unit submitOrder(Order order)
Send Order message to the PFI.
- Parameters:
order- The Order to send
-
submitClose
final Unit submitClose(Close close)
Send Close message to the PFI.
- Parameters:
close- The Close to send
-
getExchange
final List<Message> getExchange(String pfiDid, BearerDid requesterDid, String exchangeId)
Fetches a specific exchange identified by its ID from the PFI.
- Parameters:
pfiDid- The decentralized identifier of the PFI.requesterDid- The decentralized identifier of the entity requesting the exchange.exchangeId- The unique identifier of the exchange to be fetched.- Returns:
An Exchange containing the requested exchange.
-
getExchanges
final List<List<Message>> getExchanges(String pfiDid, BearerDid requesterDid, GetExchangesFilter filter)
Fetches exchanges from the PFI based on the provided filters.
- Parameters:
pfiDid- The decentralized identifier of the PFI.requesterDid- The decentralized identifier of the entity requesting the exchange.filter- An optional filter to apply for fetching exchanges.- Returns:
A list of matching Exchange.
-
-
-
-