Claimable Balances Request Builder
Builds requests connected to claimable balances.
Claimable balances are used for trustless, non-interactive asset transfers. They can be claimed by the intended destination account(s) when certain conditions are met.
Example usage:
val server = HorizonServer("https://horizon.stellar.org")
// Get a specific claimable balance by ID
val balance = server.claimableBalances()
.claimableBalance("00000000da0d57da7d4850e7fc10d2a9d0ebc731f7afb40574c03395b17d49149b91f5be")
// Get claimable balances for a specific sponsor
val sponsoredBalances = server.claimableBalances()
.forSponsor("GCDNJUBQSX7AJWLJACMJ7I4BC3Z47BQUTMHEICZLE6MU4KQBRYG5JY6B")
.limit(20)
.execute()
// Get claimable balances for a specific asset
val assetBalances = server.claimableBalances()
.forAsset("credit_alphanum4", "USD", "GCDNJUBQSX7AJWLJACMJ7I4BC3Z47BQUTMHEICZLE6MU4KQBRYG5JY6B")
.execute()
// Get claimable balances claimable by a specific account
val claimantBalances = server.claimableBalances()
.forClaimant("GBVFTZL5HIPT4PFQVTZVIWR77V7LWYCXU4CLYWWHHOEXB64XPG5LDMTU")
.execute()See also
Functions
Requests a specific claimable balance by ID.
Sets the cursor parameter for pagination.
Build and execute request to get a page of claimable balances.
Returns all claimable balances which can be claimed by a given account ID.
Returns all claimable balances sponsored by a given account.
Sets the limit parameter defining maximum number of claimable balances to return.
Sets the order parameter defining the order in which to return claimable balances.
Creates a Server-Sent Events (SSE) stream for this request. The stream will automatically reconnect on connection loss and resume from the last received event.