Releases: stellar/js-stellar-sdk
Releases · stellar/js-stellar-sdk
v7.0.0
Breaking
- Updates the SEP-10 utility function parameters and return values to support SEP-10 v3.0
- The following functions replaced the
homeDomain
parameter withhomeDomains
(note: plural):utils.readChallengeTx()
utils.verifyChallengeTxThreshold()
utils.verifyChallengeTxSigners()
utils.readChallengeTx()
now returns an additional object attribute,matchedHomeDomain
- The following functions replaced the
v6.2.0
v6.1.0
v6.0.0
Add
- Add support for claimable balances (#572).
Extend server class to allow loading claimable balances from Horizon. The following functions are available:
server.claimableBalances();
server.claimableBalances().claimant(claimant);
server.claimableBalances().sponsor(sponsorID);
server.claimableBalances().asset(asset);
server.claimableBalances().claimableBalance(balanceID);
-
Add the following attributes to
AccountResponse
(#572):sponsor?: string
num_sponsoring: number
num_sponsored: number
-
Add the optional attribute
sponsor
toAccountSigner
,BalanceLineAsset
,ClaimableBalanceRecord
, andOfferRecord
(#572). -
Add
sponsor
filtering support foroffers
andaccounts
(#572).server.offers().sponsor(accountID)
server.accounts().sponsor(accountID)
-
Extend operation responses to support new operations (#572).
create_claimable_balance
with the following fields:asset
- asset available to be claimed (in canonical form),amount
- amount available to be claimed,claimants
- list of claimants with predicates (see below):destination
- destination account ID,predicate
- predicate required to claim a balance (see below).
claim_claimable_balance
with the following fields:balance_id
- unique ID of balance to be claimed,claimant
- account ID of a claimant.
begin_sponsoring_future_reserves
with the following fields:sponsored_id
- account ID for which future reserves will be sponsored.
end_sponsoring_future_reserves
with the following fields:begin_sponsor
- account sponsoring reserves.
revoke_sponsorship
with the following fields:account_id
- if account sponsorship was revoked,claimable_balance_id
- if claimable balance sponsorship was revoked,data_account_id
- if account data sponsorship was revoked,data_name
- if account data sponsorship was revoked,offer_id
- if offer sponsorship was revoked,trustline_account_id
- if trustline sponsorship was revoked,trustline_asset
- if trustline sponsorship was revoked,signer_account_id
- if signer sponsorship was revoked,signer_key
- if signer sponsorship was revoked.
-
Extend effect responses to support new effects (#572).
claimable_balance_created
with the following fields:balance_id
- unique ID of claimable balance,asset
- asset available to be claimed (in canonical form),amount
- amount available to be claimed.
claimable_balance_claimant_created
with the following fields:balance_id
- unique ID of a claimable balance,asset
- asset available to be claimed (in canonical form),amount
- amount available to be claimed,predicate
- predicate required to claim a balance (see below).
claimable_balance_claimed
with the following fields:balance_id
- unique ID of a claimable balance,asset
- asset available to be claimed (in canonical form),amount
- amount available to be claimed,
account_sponsorship_created
with the following fields:sponsor
- sponsor of an account.
account_sponsorship_updated
with the following fields:new_sponsor
- new sponsor of an account,former_sponsor
- former sponsor of an account.
account_sponsorship_removed
with the following fields:former_sponsor
- former sponsor of an account.
trustline_sponsorship_created
with the following fields:sponsor
- sponsor of a trustline.
trustline_sponsorship_updated
with the following fields:new_sponsor
- new sponsor of a trustline,former_sponsor
- former sponsor of a trustline.
trustline_sponsorship_removed
with the following fields:former_sponsor
- former sponsor of a trustline.
claimable_balance_sponsorship_created
with the following fields:sponsor
- sponsor of a claimable balance.
claimable_balance_sponsorship_updated
with the following fields:new_sponsor
- new sponsor of a claimable balance,former_sponsor
- former sponsor of a claimable balance.
claimable_balance_sponsorship_removed
with the following fields:former_sponsor
- former sponsor of a claimable balance.
signer_sponsorship_created
with the following fields:signer
- signer being sponsored.sponsor
- signer sponsor.
signer_sponsorship_updated
with the following fields:signer
- signer being sponsored.former_sponsor
- the former sponsor of the signer.new_sponsor
- the new sponsor of the signer.
signer_sponsorship_removed
with the following fields:former_sponsor
- former sponsor of a signer.
Breaking
- Update
stellar-base
tov4.0.0
which introduces a breaking change in the internal XDR library.
The following functions were renamed:
xdr.OperationBody.setOption()
->xdr.OperationBody.setOptions()
xdr.OperationBody.manageDatum()
->xdr.OperationBody.manageData()
xdr.OperationType.setOption()
->xdr.OperationType.setOptions()
xdr.OperationType.manageDatum()
->xdr.OperationType.manageData()
The following enum values were rename in OperationType
:
setOption
->setOptions
manageDatum
->manageData
v5.0.5
v5.0.4
v5.0.3 (#554)
Fix
- Fix regression on
server.offer().forAccount()
which wasn't allowing streaming (#533).
v5.0.2
v5.0.1
v5.0.0
Add
- Add fee bump related attributes to
TransactionResponse
(#532):fee_account: string
.fee_bump_transaction: FeeBumpTransactionResponse
:interface FeeBumpTransactionResponse { hash: string; signatures: string[]; }
inner_transaction: InnerTransactionResponse
:interface InnerTransactionResponse { hash: string; signatures: string[]; max_fee: string; }
- Add
memo_bytes: string
toTransactionResponse
(#532). - Add
authorize_to_maintain_liabilities: boolean
toAllowTrustOperation
(#532). - Add
is_authorized_to_maintain_liabilities: boolean
toBalanceLineNative
(#532). - Add new result codes to
TransactionFailedResultCodes
(#531).TX_FEE_BUMP_INNER_SUCCESS = "tx_fee_bump_inner_success", TX_FEE_BUMP_INNER_FAILED = "tx_fee_bump_inner_failed", TX_NOT_SUPPORTED = "tx_not_supported", TX_SUCCESS = "tx_success", TX_TOO_EARLY = "tx_too_early", TX_TOO_LATE = "tx_too_late", TX_MISSING_OPERATION = "tx_missing_operation", TX_INSUFFICIENT_BALANCE = "tx_insufficient_balance", TX_NO_SOURCE_ACCOUNT = "tx_no_source_account", TX_INSUFFICIENT_FEE = "tx_insufficient_fee", TX_INTERNAL_ERROR = "tx_internal_error",
Breaking changes
- The attributes
max_fee
andfee_charged
inTransactionResponse
can be now anumber
or astring
.
Update your code to handle both types since Horizon will start sendingstring
in version1.3.0
(#528). - Bump
stellar-base
tov3.0.0
: This new version of stellar-base brings support for protocol 13, including multiple breaking changes which might affect your code, please review the list of breaking changes in [email protected] release (#524). - Make
networkPassphrase
a required argument inUtils.buildChallengeTx
andUtils.readChallengeTx
(#524). - Remove
Server.paths
(#525).