@stellar/stellar-sdk 13.0.0 → 13.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +14 -4
  2. package/README.md +1 -1
  3. package/dist/stellar-sdk-minimal.js +426 -71
  4. package/dist/stellar-sdk-minimal.min.js +1 -1
  5. package/dist/stellar-sdk-no-axios.js +1022 -228
  6. package/dist/stellar-sdk-no-axios.min.js +1 -1
  7. package/dist/stellar-sdk-no-eventsource.js +149 -142
  8. package/dist/stellar-sdk-no-eventsource.min.js +1 -1
  9. package/dist/stellar-sdk.js +745 -299
  10. package/dist/stellar-sdk.min.js +1 -1
  11. package/lib/friendbot/index.d.ts +1 -0
  12. package/lib/horizon/call_builder.d.ts +1 -1
  13. package/lib/horizon/horizon_api.d.ts +13 -0
  14. package/lib/horizon/horizon_axios_client.js +1 -1
  15. package/lib/horizon/server.d.ts +5 -0
  16. package/lib/horizon/server.js +80 -59
  17. package/lib/minimal/friendbot/index.d.ts +1 -0
  18. package/lib/minimal/horizon/call_builder.d.ts +1 -1
  19. package/lib/minimal/horizon/horizon_api.d.ts +13 -0
  20. package/lib/minimal/horizon/horizon_axios_client.js +1 -1
  21. package/lib/minimal/horizon/server.d.ts +5 -0
  22. package/lib/minimal/horizon/server.js +80 -59
  23. package/lib/minimal/rpc/api.d.ts +2 -1
  24. package/lib/minimal/rpc/axios.js +1 -1
  25. package/lib/minimal/rpc/parsers.js +1 -0
  26. package/lib/minimal/rpc/server.js +27 -8
  27. package/lib/no-axios/friendbot/index.d.ts +1 -0
  28. package/lib/no-axios/horizon/call_builder.d.ts +1 -1
  29. package/lib/no-axios/horizon/horizon_api.d.ts +13 -0
  30. package/lib/no-axios/horizon/horizon_axios_client.js +1 -1
  31. package/lib/no-axios/horizon/server.d.ts +5 -0
  32. package/lib/no-axios/horizon/server.js +80 -59
  33. package/lib/no-axios/rpc/api.d.ts +2 -1
  34. package/lib/no-axios/rpc/axios.js +1 -1
  35. package/lib/no-axios/rpc/parsers.js +1 -0
  36. package/lib/no-axios/rpc/server.js +27 -8
  37. package/lib/no-eventsource/friendbot/index.d.ts +1 -0
  38. package/lib/no-eventsource/horizon/call_builder.d.ts +1 -1
  39. package/lib/no-eventsource/horizon/horizon_api.d.ts +13 -0
  40. package/lib/no-eventsource/horizon/horizon_axios_client.js +1 -1
  41. package/lib/no-eventsource/horizon/server.d.ts +5 -0
  42. package/lib/no-eventsource/horizon/server.js +80 -59
  43. package/lib/no-eventsource/rpc/api.d.ts +2 -1
  44. package/lib/no-eventsource/rpc/axios.js +1 -1
  45. package/lib/no-eventsource/rpc/parsers.js +1 -0
  46. package/lib/no-eventsource/rpc/server.js +27 -8
  47. package/lib/rpc/api.d.ts +2 -1
  48. package/lib/rpc/axios.js +1 -1
  49. package/lib/rpc/parsers.js +1 -0
  50. package/lib/rpc/server.js +27 -8
  51. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -7,6 +7,16 @@ A breaking change will get clearly marked in this log.
7
7
  ## Unreleased
8
8
 
9
9
 
10
+ ## [v13.1.0](https://github.com/stellar/js-stellar-sdk/compare/v13.0.0...v13.1.0)
11
+
12
+ ### Added
13
+ * Added `Horizon.Server.root` to obtain information from the Horizon root endpoint ([#1122](https://github.com/stellar/js-stellar-sdk/pull/1122/)).
14
+
15
+ ### Fixed
16
+ * When using a friendbot that points to a Horizon instance that has ledger metadata disabled, you can no longer extract the account sequence from the response. Instead, we hit RPC directly ([#1107](https://github.com/stellar/js-stellar-sdk/pull/1107/)).
17
+ * `rpc.Server.getEvents()` now correctly returns the `cursor` field at the top-level response ([#1124](https://github.com/stellar/js-stellar-sdk/pull/1124)).
18
+
19
+
10
20
  ## [v13.0.0](https://github.com/stellar/js-stellar-sdk/compare/v12.3.0...v13.0.0)
11
21
  This is a direct re-tag of rc.2 with the only change being an upgrade to the `stellar-base` library to incorporate a patch release. Nonetheless, the entire changelog from the prior major version here is replicated for a comprehensive view on what's broken, added, and fixed.
12
22
 
@@ -298,7 +308,7 @@ interface FeeDistribution {
298
308
 
299
309
  ### Added
300
310
  - `rpc.server.simulateTransaction` now supports an optional `stateChanges?: LedgerEntryChange[]` field ([#963](https://github.com/stellar/js-stellar-sdk/pull/963)):
301
- * If `Before` is omitted, it constitutes a creation, if `After` is omitted, it constitutes a deletions, note that `Before` and `After` cannot be be omitted at the same time. Each item follows this schema:
311
+ * If `Before` is omitted, it constitutes a creation, if `After` is omitted, it constitutes a deletions, note that `Before` and `After` cannot be omitted at the same time. Each item follows this schema:
302
312
 
303
313
  ```typescript
304
314
  interface LedgerEntryChange {
@@ -348,7 +358,7 @@ import {
348
358
  +import { Spec } from '@stellar/stellar-sdk/contract'
349
359
  ```
350
360
 
351
- - Previously, `AssembledTransaction.signAndSend()` would return a `SentTransaction` even if the transaction never finalized. That is, if it successfully sent the transaction to the network, but the transaction was still `status: 'PENDING'`, then it would `console.error` an error message, but return the indeterminate transaction anyhow. **It now throws** a `SentTransaction.Errors.TransactionStillPending` error with that error message instead ([#962](https://github.com/stellar/js-stellar-sdk/pull/962)).
361
+ - Previously, `AssembledTransaction.signAndSend()` would return a `SentTransaction` even if the transaction was never finalized. That is, if it successfully sent the transaction to the network, but the transaction was still `status: 'PENDING'`, then it would `console.error` an error message, but return the indeterminate transaction anyhow. **It now throws** a `SentTransaction.Errors.TransactionStillPending` error with that error message instead ([#962](https://github.com/stellar/js-stellar-sdk/pull/962)).
352
362
 
353
363
  ### Deprecated
354
364
 
@@ -732,7 +742,7 @@ Refer to the release notes for the betas (e.g. [v9.0.0-beta.0](https://github.co
732
742
 
733
743
  ### Updates
734
744
 
735
- - Updates the following SEP-10 utility functions to be compilant with the protocols ([#709](https://github.com/stellar/js-stellar-sdk/pull/709/), [stellar-protocol/#1036](https://github.com/stellar/stellar-protocol/pull/1036))
745
+ - Updates the following SEP-10 utility functions to be compliant with the protocols ([#709](https://github.com/stellar/js-stellar-sdk/pull/709/), [stellar-protocol/#1036](https://github.com/stellar/stellar-protocol/pull/1036))
736
746
  - Updated `utils.buildChallengeTx()` to accept muxed accounts (`M...`) for client account IDs
737
747
  - Updated `utils.buildChallengeTx()` to accept a `memo` parameter to attach to the challenge transaction
738
748
  - Updated `utils.readChallengeTx()` to provide a `memo` property in the returned object
@@ -1052,7 +1062,7 @@ The following functions were renamed:
1052
1062
  - `xdr.OperationType.setOption()` -> `xdr.OperationType.setOptions()`
1053
1063
  - `xdr.OperationType.manageDatum()` -> `xdr.OperationType.manageData()`
1054
1064
 
1055
- The following enum values were rename in `OperationType`:
1065
+ The following enum values were renamed in `OperationType`:
1056
1066
 
1057
1067
  - `setOption` -> `setOptions`
1058
1068
  - `manageDatum` -> `manageData`
package/README.md CHANGED
@@ -65,7 +65,7 @@ You can use a CDN:
65
65
  <script src="https://cdnjs.cloudflare.com/ajax/libs/stellar-sdk/{version}/stellar-sdk.js"></script>
66
66
  ```
67
67
 
68
- Note that this method relies using a third party to host the JS library. This may not be entirely secure. You can self-host it via [Bower](http://bower.io):
68
+ Note that this method relies on using a third party to host the JS library. This may not be entirely secure. You can self-host it via [Bower](http://bower.io):
69
69
 
70
70
  ```shell
71
71
  bower install @stellar/stellar-sdk