Skip to content

Releases: stellar/js-stellar-sdk

v7.0.0

09 Nov 22:30
84d10c6
Compare
Choose a tag to compare

Breaking

  • Updates the SEP-10 utility function parameters and return values to support SEP-10 v3.0
    • The following functions replaced the homeDomain parameter with homeDomains (note: plural):
      • utils.readChallengeTx()
      • utils.verifyChallengeTxThreshold()
      • utils.verifyChallengeTxSigners()
    • utils.readChallengeTx() now returns an additional object attribute, matchedHomeDomain

v6.2.0

15 Oct 23:53
e7dc9b1
Compare
Choose a tag to compare

Update

  • Update challenge transaction helpers for SEP0010 v2.1.0. (#581)
    • Remove verification of home domain.
    • Allow additional manage data operations that have the source account set as the server key.

v6.1.0

05 Oct 17:35
357c3fd
Compare
Choose a tag to compare

Update

  • Update claim predicate fields to match Horizon 1.9.1 (#575).

v6.0.0

29 Sep 15:52
cbadf4a
Compare
Choose a tag to compare

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 to AccountSigner, BalanceLineAsset, ClaimableBalanceRecord, and OfferRecord (#572).

  • Add sponsor filtering support for offers and accounts (#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 to v4.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

28 Aug 17:25
91140df
Compare
Choose a tag to compare

Update

  • Replace anchorName parameter for Utils.buildChallengeTx() with homeDomain #568

Add

  • a homeDomain optional parameter was added to Utils.readChallengeTx() #568
  • FeeBumpTransaction objects can now be passed to Utils.verifyTxSignedBy() and Utils.gatherTxSigners() #562

v5.0.4

02 Jul 16:18
f02fd7a
Compare
Choose a tag to compare

Update

  • Add tx_set_operation_count to ledger resource (#559).

v5.0.3 (#554)

26 May 16:07
88615a2
Compare
Choose a tag to compare

Fix

  • Fix regression on server.offer().forAccount() which wasn't allowing streaming (#533).

v5.0.2

13 May 20:12
d92e0ad
Compare
Choose a tag to compare

Update

  • Allow submitTransaction to receive a FeeBumpTransaction (#548).

v5.0.1

06 May 17:19
8eafb9b
Compare
Choose a tag to compare

Update

  • Skip SEP0029 (memo required check) for multiplexed accounts (#538).

Fix

  • Fix missing documentation for stellar-base (#544).
  • Move dom-monkeypatch to root types and publish to npm (#543).

v5.0.0

27 Apr 22:52
b6ee517
Compare
Choose a tag to compare

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 to TransactionResponse (#532).
  • Add authorize_to_maintain_liabilities: boolean to AllowTrustOperation (#532).
  • Add is_authorized_to_maintain_liabilities: boolean to BalanceLineNative (#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 and fee_charged in TransactionResponse can be now a number or a string.
    Update your code to handle both types since Horizon will start sending string in version 1.3.0 (#528).
  • Bump stellar-base to v3.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 in Utils.buildChallengeTx and Utils.readChallengeTx (#524).
  • Remove Server.paths (#525).