@stellar/stellar-sdk 11.2.2 → 12.0.0-rc.1

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 (81) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +1 -1
  3. package/dist/stellar-sdk.js +1566 -1253
  4. package/dist/stellar-sdk.min.js +1 -1
  5. package/lib/browser.js +1 -1
  6. package/lib/config.js +2 -3
  7. package/lib/contract_client/assembled_transaction.d.ts +456 -0
  8. package/lib/contract_client/assembled_transaction.js +513 -0
  9. package/lib/contract_client/basic_node_signer.d.ts +12 -0
  10. package/lib/contract_client/basic_node_signer.js +52 -0
  11. package/lib/contract_client/client.d.ts +17 -0
  12. package/lib/contract_client/client.js +57 -0
  13. package/lib/contract_client/index.d.ts +6 -0
  14. package/lib/contract_client/index.js +71 -0
  15. package/lib/contract_client/sent_transaction.d.ts +71 -0
  16. package/lib/contract_client/sent_transaction.js +148 -0
  17. package/lib/contract_client/types.d.ts +100 -0
  18. package/lib/contract_client/types.js +5 -0
  19. package/lib/contract_client/utils.d.ts +23 -0
  20. package/lib/contract_client/utils.js +95 -0
  21. package/lib/contract_spec.d.ts +7 -0
  22. package/lib/contract_spec.js +15 -6
  23. package/lib/errors.js +7 -8
  24. package/lib/federation/index.js +1 -1
  25. package/lib/federation/server.js +3 -4
  26. package/lib/horizon/account_call_builder.d.ts +0 -1
  27. package/lib/horizon/account_call_builder.js +3 -4
  28. package/lib/horizon/account_response.js +2 -3
  29. package/lib/horizon/assets_call_builder.d.ts +0 -1
  30. package/lib/horizon/assets_call_builder.js +3 -4
  31. package/lib/horizon/call_builder.js +3 -4
  32. package/lib/horizon/claimable_balances_call_builder.d.ts +0 -1
  33. package/lib/horizon/claimable_balances_call_builder.js +3 -4
  34. package/lib/horizon/effect_call_builder.d.ts +0 -1
  35. package/lib/horizon/effect_call_builder.js +3 -4
  36. package/lib/horizon/friendbot_builder.d.ts +0 -1
  37. package/lib/horizon/friendbot_builder.js +2 -2
  38. package/lib/horizon/horizon_api.d.ts +0 -1
  39. package/lib/horizon/index.js +1 -1
  40. package/lib/horizon/ledger_call_builder.d.ts +0 -1
  41. package/lib/horizon/ledger_call_builder.js +3 -4
  42. package/lib/horizon/liquidity_pool_call_builder.d.ts +0 -1
  43. package/lib/horizon/liquidity_pool_call_builder.js +3 -4
  44. package/lib/horizon/offer_call_builder.d.ts +0 -1
  45. package/lib/horizon/offer_call_builder.js +3 -4
  46. package/lib/horizon/operation_call_builder.d.ts +0 -1
  47. package/lib/horizon/operation_call_builder.js +3 -4
  48. package/lib/horizon/orderbook_call_builder.d.ts +0 -1
  49. package/lib/horizon/orderbook_call_builder.js +2 -2
  50. package/lib/horizon/path_call_builder.d.ts +0 -1
  51. package/lib/horizon/path_call_builder.js +2 -2
  52. package/lib/horizon/payment_call_builder.d.ts +0 -1
  53. package/lib/horizon/payment_call_builder.js +3 -4
  54. package/lib/horizon/server.js +4 -5
  55. package/lib/horizon/strict_receive_path_call_builder.d.ts +0 -1
  56. package/lib/horizon/strict_receive_path_call_builder.js +2 -2
  57. package/lib/horizon/strict_send_path_call_builder.d.ts +0 -1
  58. package/lib/horizon/strict_send_path_call_builder.js +2 -2
  59. package/lib/horizon/trade_aggregation_call_builder.d.ts +0 -1
  60. package/lib/horizon/trade_aggregation_call_builder.js +3 -4
  61. package/lib/horizon/trades_call_builder.d.ts +0 -1
  62. package/lib/horizon/trades_call_builder.js +3 -4
  63. package/lib/horizon/transaction_call_builder.d.ts +0 -1
  64. package/lib/horizon/transaction_call_builder.js +3 -4
  65. package/lib/index.d.ts +1 -2
  66. package/lib/index.js +13 -9
  67. package/lib/rust_types/index.d.ts +1 -0
  68. package/lib/rust_types/index.js +16 -0
  69. package/lib/rust_types/result.d.ts +71 -0
  70. package/lib/rust_types/result.js +66 -0
  71. package/lib/soroban/api.d.ts +1 -0
  72. package/lib/soroban/browser.js +1 -1
  73. package/lib/soroban/index.d.ts +0 -1
  74. package/lib/soroban/jsonrpc.d.ts +2 -8
  75. package/lib/soroban/jsonrpc.js +13 -54
  76. package/lib/soroban/parsers.js +1 -1
  77. package/lib/soroban/server.js +18 -13
  78. package/lib/stellartoml/index.js +3 -4
  79. package/lib/utils.js +2 -3
  80. package/lib/webauth/errors.js +2 -2
  81. package/package.json +34 -23
package/CHANGELOG.md CHANGED
@@ -7,6 +7,34 @@ A breaking change will get clearly marked in this log.
7
7
  ## Unreleased
8
8
 
9
9
 
10
+ ## [v12.0.0-rc.1](https://github.com/stellar/js-stellar-sdk/compare/v11.3.0...v12.0.0-rc.1)
11
+
12
+ ### Breaking Changes
13
+ * **This update supports Protocol 21**. It is an additive change to the protocol so there are no true backwards incompatibilities, but your software may break if you encounter new unexpected fields from this Protocol ([#949](https://github.com/stellar/js-stellar-sdk/pull/949)).
14
+
15
+ ### Fixed
16
+ * Each item in the `GetEventsResponse.events` list will now have a `txHash` item corresponding to the transaction hash that triggered a particular event ([#939](https://github.com/stellar/js-stellar-sdk/pull/939)).
17
+ * `ContractClient` now properly handles methods that take no arguments by making `MethodOptions` the only parameter, bringing it inline with the types generated by Soroban CLI's `soroban contract bindings typescript` ([#940](https://github.com/stellar/js-stellar-sdk/pull/940)).
18
+ * `ContractClient` now allows `publicKey` to be undefined ([#941](https://github.com/stellar/js-stellar-sdk/pull/941)).
19
+ * `SentTransaction` will only pass `allowHttp` if (and only if) its corresponding `AssembledTransaction#options` config allowed it ([#952](https://github.com/stellar/js-stellar-sdk/pull/952)).
20
+
21
+
22
+ ## [v11.3.0](https://github.com/stellar/js-stellar-sdk/compare/v11.2.2...v11.3.0)
23
+
24
+ ### Added
25
+ * Introduces an entire suite of helpers to assist with interacting with smart contracts ([#929](https://github.com/stellar/js-stellar-sdk/pull/929)):
26
+ - `ContractClient`: generate a class from the contract specification where each Rust contract method gets a matching method in this class. Each method returns an `AssembledTransaction` that can be used to modify, simulate, decode results, and possibly sign, & submit the transaction.
27
+ - `AssembledTransaction`: used to wrap a transaction-under-construction and provide high-level interfaces to the most common workflows, while still providing access to low-level transaction manipulation.
28
+ - `SentTransaction`: transaction sent to the Soroban network, in two steps - initial submission and waiting for it to finalize to get the result (retried with exponential backoff)
29
+
30
+ ### Fixed
31
+ * Upgrade underlying dependencies, including `@stellar/js-xdr` which should broaden compatibility to pre-ES2016 environments ([#932](https://github.com/stellar/js-stellar-sdk/pull/932), [#930](https://github.com/stellar/js-stellar-sdk/pull/930)).
32
+
33
+
34
+ ### Fixed
35
+ * `SorobanRpc`: remove all instances of array-based parsing to conform to future breaking changes in Soroban RPC ([#924](https://github.com/stellar/js-stellar-sdk/pull/924)).
36
+
37
+
10
38
  ## [v11.2.2](https://github.com/stellar/js-stellar-sdk/compare/v11.2.1...v11.2.2)
11
39
 
12
40
  ### Fixed
package/README.md CHANGED
@@ -95,7 +95,7 @@ The usage documentation for this library lives in a handful of places:
95
95
 
96
96
  You can also refer to:
97
97
 
98
- * the [documentation](https://developers.stellar.org/api/introduction/) for the Horizon REST API (if using the `Horizon` module) and
98
+ * the [documentation](https://developers.stellar.org/network/horizon) for the Horizon REST API (if using the `Horizon` module) and
99
99
  * the [documentation](https://soroban.stellar.org/docs/reference/rpc) for Soroban RPC's API (if using the `SorobanRpc` module)
100
100
 
101
101
  ### Usage with React-Native