stellar-sdk
Advanced tools
Changelog
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;
}
memo_bytes: string
to TransactionResponse
(#532).authorize_to_maintain_liabilities: boolean
to AllowTrustOperation
(#532).is_authorized_to_maintain_liabilities: boolean
to BalanceLineNative
(#532).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",
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).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 stellar-base@3.0.0 release (#524).networkPassphrase
a required argument in Utils.buildChallengeTx
and Utils.readChallengeTx
(#524).Server.paths
(#525).Changelog
stellar-base
to v3.0.0-alpha-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 stellar-base@3.0.0-alpha.0 release (#524).networkPassphrase
a required argument in Utils.buildChallengeTx
and Utils.readChallengeTx
(#524).Server.paths
(#525).Changelog
Add SEP0029 (memo required) support. (#516)
Extends server.submitTransaction
to always run a memo required check before
sending the transaction. If any of the destinations require a memo and the
transaction doesn't include one, then an AccountRequiresMemoError
will be thrown.
You can skip this check by passing {skipMemoRequiredCheck: true}
to server.submitTransaction
:
server.submitTransaction(tx, {skipMemoRequiredCheck: true})
The check runs for each operation of type:
payment
pathPaymentStrictReceive
pathPaymentStrictSend
mergeAccount
If the transaction includes a memo, then memo required checking is skipped.
See SEP0029 for more information about memo required check.
Changelog
Add support for top-level offers endpoint with seller
, selling
, and buying
filter. (#485)
Horizon 1.0 includes a new /offers
end-point, which allows you to list all offers, supporting filtering by seller
, selling
, or buying
asset.
You can fetch data from this endpoint by doing server.offers()
and use any of the following filters:
seller
: server.offers().forAccount(accountId)
buying
: server.offers().buying(asset)
selling
: server.offers().selling(asset)
This introduced a breaking change since it modified the signature for the function server.offers()
.
Before, if you wanted to list all the offers for a given account, you'd do:
server.offers('accounts', accountID)
Starting on this version you'll need to do:
server.offers().forAccount(accountId)
You can do now things that were not possible before, like finding all offers for an account filtering by the selling or buying asset
server.offers().forAccount(accountId).selling(assetA).buying(assetB)
Add support for filtering accounts by signer
or asset
(#474)
Horizon 1.0 includes a new /accounts
end-point, which allows you to list all accounts who have another account as a signer or hold a given asset.
You can fetch data from this endpoint by doing server.accounts()
and use any of the following filters:
accountID
: server.accounts().accountId(accountId)
, returns a single account.forSigner
: server.accounts().forSigner(accountId)
, returns accounts where accountId
is a signer.forAsset
: server.accounts().forAsset(asset)
, returns accounts which hold the asset
.Add TypeScript typings for new fields in fee_stats
. (#462)
Remove fee_paid
field from transaction response. (#476)
Remove all *_accepted_fee
from FeeStatsResponse. (#463)
Change function signature for server.offers
. (#485)
The signature for the function server.offers()
was changed to bring suppport for other filters.
Before, if you wanted to list all the offers for a given account, you'd do:
server.offers('accounts', accountID)
Starting on this version you'll need to do:
server.offers().accountId(accountId)
Changelog
Horizon 0.25.0 will change the data type for multiple attributes from Int64
to
string
. When the JSON payload includes an Int64
, there are
scenarios where large number data can be incorrectly parsed, since JavaScript doesn't support
Int64
values. You can read more about it in #1363.
This release extends the data types for the following attributes to be of type string
or number
:
EffectRecord#offer_id
EffectRecord#new_seq
OfferRecord#id
TradeAggregationRecord#timestamp
TradeAggregationRecord#trade_count
ManageOfferOperationResponse#offer_id
PassiveOfferOperationResponse#offer_id
We recommend you update your code to handle both string
or number
in
the fields listed above, so that once Horizon 0.25.0 is released, your application
will be able to handle the new type without breaking.