stellar-sdk
Advanced tools
Changelog
This beta release adds support for Automated Market Makers. For details, you can refer to CAP-38 for XDR changes and this document for detailed changes to the Horizon API.
Introduced a LiquidityPoolCallBuilder
to make calls to a new endpoint:
Expanded the TransactionCallBuilder
, OperationCallBuilder
, and EffectsCallBuilder
s to apply to specific liquidity pools (#689). This corresponds to the following new endpoints:
/liquidity_pools/:id/transactions
/liquidity_pools/:id/operations
/liquidity_pools/:id/effects
Expanded the TradesCallBuilder
to support fetching liquidity pool trades and accepts a new trade_type
filter (#685):
/trades?trade_type={orderbook,liquidity_pools,all}
. By default, the filter is all
, including both liquidity pool and orderbook records.liquidity_pool_fee_bp
: LP fee expressed in basis points, and eitherbase_liquidity_pool_id
or counter_liquidity_pool_id
Added new effects related to liquidity pools (#690):
DepositLiquidityEffect
WithdrawLiquidityEffect
LiquidityPoolTradeEffect
LiquidityPoolCreatedEffect
LiquidityPoolRemovedEffect
LiquidityPoolRevokedEffect
Added new responses related to liquidity pool operations (#692):
DepositLiquidityOperationResponse
WithdrawLiquidityOperationResponse
Updated the underlying stellar-base
library to v6.0.1 to include CAP-38 changes (#681).
Updated various developer dependencies to secure versions (#671).
Updated AccountResponse
to include liquidity pool shares in its balances
field (#688).
Updated AccountCallBuilder
to allow filtering based on participation in a certain liquidity pool (#688), corresponding to the following new filter:
/accounts?reserves=[...list of assets...]
Updated RevokeSponsorshipOperationResponse
to contain an optional attribute trustline_liquidity_pool_id
, for when a liquidity pool trustline is revoked (#690).
A TradeRecord
can now correspond to two different types of trades and has changed (#685):
Orderbook
(the existing structure)
counter_offer_id
and base_offer_id
only show up in these recordsoffer_id
field was removed; it matches base_offer_id
LiquidityPool
(new)
base_account
xor counter_account
will appear in these recordsprice
fields changed from number
s to string
sbase
and counter
can now point to either an account or a liquidity poolAn account's balances
array can now include a new type (#688):
asset_type
can now be liquidity_pool_shares
buying_liabilities
selling_liabilities
asset_code
asset_issue
The ChangeTrustOperationResponse
has changed (#688, #692):
asset_type
can now be liquidity_pool_shares
asset_code
, asset_issuer
, and trustee
are now optionalliquidity_pool_id
is a new optional fieldThe trustline effects (TrustlineCreated
, TrustlineUpdated
, TrustlineRevoked
) have changed (#690):
liquidity_pool_shares
liquidity_pool_id
Trustline sponsorship effects (TrustlineSponsorshipCreated
, TrustlineSponsorshipUpdated
, TrustlineSponsorshipRemoved
) have been updated (#690):
asset
field is now optional, and is replaced byliquidity_pool_id
field for liquidity poolsChangelog
This stable release adds support for Protocol 18. For details, you can refer to CAP-38 for XDR changes and this document for changes to the Horizon API.
Refer to the release notes for the betas (e.g. v9.0.0-beta.0) for a comprehensive list of changes to this library.
Changelog
AccountResponse
no longer conformed to the StellarBase.Account
interface, which was updated in stellar-base@v5.2.0 (#655).Changelog
Added support for querying the relevant transactions and operations for a claimable balance (#628):
TransactionCallBuilder.forClaimableBalance()
: builds a query to /claimable_balances/:id/transactions/
OperationCallBuilder.forClaimableBalance()
: builds a query to /claimable_balances/:id/operations/
Added support for new stat fields on the /assets
endpoint (#628):
accounts
- a breakdown of accounts using this asset by authorization typebalances
- a breakdown of balances by account authorization typenum_claimable_balances
- the number of pending claimable balancesclaimable_balances_amount
- the total balance of pending claimable balancesAdded types for all Effects supported as an enum, and moved Trade
, Asset
, Offer
, and Account
types to separate files (#635).
Upgraded js-stellar-base
package to version ^5.2.1
from ^5.1.0
, refer to its release notes for more (#639):
AuthClawbackEnabled
flag to Typescript to complete Protocol 17 supportExposed more Protocol 17 (CAP-35) operations (#633):
/accounts
endpoint now resolves the flags.auth_clawback_enabled
field.clawback
, clawbackClaimableBalance
, and setTrustLineFlags
are now defined.setOptions
has been updated to show auth_clawback_enabled
.