@stellar/stellar-sdk 13.0.0-rc.1 → 13.0.0-rc.2

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 (82) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/dist/stellar-sdk-minimal.js +363 -93
  3. package/dist/stellar-sdk-minimal.min.js +1 -1
  4. package/dist/stellar-sdk-no-axios.js +380 -96
  5. package/dist/stellar-sdk-no-axios.min.js +1 -1
  6. package/dist/stellar-sdk-no-eventsource.js +363 -93
  7. package/dist/stellar-sdk-no-eventsource.min.js +1 -1
  8. package/dist/stellar-sdk.js +380 -96
  9. package/dist/stellar-sdk.min.js +1 -1
  10. package/lib/contract/assembled_transaction.d.ts +75 -3
  11. package/lib/contract/assembled_transaction.js +123 -34
  12. package/lib/contract/basic_node_signer.d.ts +3 -2
  13. package/lib/contract/basic_node_signer.js +16 -8
  14. package/lib/contract/client.d.ts +13 -1
  15. package/lib/contract/client.js +159 -48
  16. package/lib/contract/types.d.ts +72 -8
  17. package/lib/contract/types.js +1 -0
  18. package/lib/horizon/call_builder.d.ts +1 -1
  19. package/lib/horizon/horizon_axios_client.js +1 -1
  20. package/lib/horizon/server_api.d.ts +1 -0
  21. package/lib/horizon/server_api.js +5 -0
  22. package/lib/horizon/types/effects.d.ts +51 -51
  23. package/lib/horizon/types/trade.d.ts +3 -2
  24. package/lib/http-client/types.d.ts +1 -0
  25. package/lib/minimal/contract/assembled_transaction.d.ts +75 -3
  26. package/lib/minimal/contract/assembled_transaction.js +123 -34
  27. package/lib/minimal/contract/basic_node_signer.d.ts +3 -2
  28. package/lib/minimal/contract/basic_node_signer.js +16 -8
  29. package/lib/minimal/contract/client.d.ts +13 -1
  30. package/lib/minimal/contract/client.js +159 -48
  31. package/lib/minimal/contract/types.d.ts +72 -8
  32. package/lib/minimal/contract/types.js +1 -0
  33. package/lib/minimal/horizon/call_builder.d.ts +1 -1
  34. package/lib/minimal/horizon/horizon_axios_client.js +1 -1
  35. package/lib/minimal/horizon/server_api.d.ts +1 -0
  36. package/lib/minimal/horizon/server_api.js +5 -0
  37. package/lib/minimal/horizon/types/effects.d.ts +51 -51
  38. package/lib/minimal/horizon/types/trade.d.ts +3 -2
  39. package/lib/minimal/http-client/types.d.ts +1 -0
  40. package/lib/minimal/rpc/axios.js +1 -1
  41. package/lib/minimal/stellartoml/index.d.ts +1 -0
  42. package/lib/minimal/stellartoml/index.js +2 -0
  43. package/lib/no-axios/contract/assembled_transaction.d.ts +75 -3
  44. package/lib/no-axios/contract/assembled_transaction.js +123 -34
  45. package/lib/no-axios/contract/basic_node_signer.d.ts +3 -2
  46. package/lib/no-axios/contract/basic_node_signer.js +16 -8
  47. package/lib/no-axios/contract/client.d.ts +13 -1
  48. package/lib/no-axios/contract/client.js +159 -48
  49. package/lib/no-axios/contract/types.d.ts +72 -8
  50. package/lib/no-axios/contract/types.js +1 -0
  51. package/lib/no-axios/horizon/call_builder.d.ts +1 -1
  52. package/lib/no-axios/horizon/horizon_axios_client.js +1 -1
  53. package/lib/no-axios/horizon/server_api.d.ts +1 -0
  54. package/lib/no-axios/horizon/server_api.js +5 -0
  55. package/lib/no-axios/horizon/types/effects.d.ts +51 -51
  56. package/lib/no-axios/horizon/types/trade.d.ts +3 -2
  57. package/lib/no-axios/http-client/types.d.ts +1 -0
  58. package/lib/no-axios/rpc/axios.js +1 -1
  59. package/lib/no-axios/stellartoml/index.d.ts +1 -0
  60. package/lib/no-axios/stellartoml/index.js +2 -0
  61. package/lib/no-eventsource/contract/assembled_transaction.d.ts +75 -3
  62. package/lib/no-eventsource/contract/assembled_transaction.js +123 -34
  63. package/lib/no-eventsource/contract/basic_node_signer.d.ts +3 -2
  64. package/lib/no-eventsource/contract/basic_node_signer.js +16 -8
  65. package/lib/no-eventsource/contract/client.d.ts +13 -1
  66. package/lib/no-eventsource/contract/client.js +159 -48
  67. package/lib/no-eventsource/contract/types.d.ts +72 -8
  68. package/lib/no-eventsource/contract/types.js +1 -0
  69. package/lib/no-eventsource/horizon/call_builder.d.ts +1 -1
  70. package/lib/no-eventsource/horizon/horizon_axios_client.js +1 -1
  71. package/lib/no-eventsource/horizon/server_api.d.ts +1 -0
  72. package/lib/no-eventsource/horizon/server_api.js +5 -0
  73. package/lib/no-eventsource/horizon/types/effects.d.ts +51 -51
  74. package/lib/no-eventsource/horizon/types/trade.d.ts +3 -2
  75. package/lib/no-eventsource/http-client/types.d.ts +1 -0
  76. package/lib/no-eventsource/rpc/axios.js +1 -1
  77. package/lib/no-eventsource/stellartoml/index.d.ts +1 -0
  78. package/lib/no-eventsource/stellartoml/index.js +2 -0
  79. package/lib/rpc/axios.js +1 -1
  80. package/lib/stellartoml/index.d.ts +1 -0
  81. package/lib/stellartoml/index.js +2 -0
  82. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,37 @@ A breaking change will get clearly marked in this log.
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## [v13.0.0-rc.2](https://github.com/stellar/js-stellar-sdk/compare/v12.3.0...v13.0.0-rc.2)
10
+
11
+ ### Breaking Changes
12
+ - The `ClientOptions.signTransaction` type has been updated to reflect the latest [SEP-43](https://stellar.org/protocol/sep-43#wallet-interface-format) protocol, which matches the latest major version of Freighter and other wallets. It now accepts `address`, `submit`, and `submitUrl` options, and it returns a promise containing the `signedTxXdr` and the `signerAddress`. It now also returns an `Error` type if an error occurs during signing.
13
+ * `basicNodeSigner` has been updated to reflect the new type.
14
+ - `ClientOptions.signAuthEntry` type has also been updated to reflect the [SEP-43](https://stellar.org/protocol/sep-43#wallet-interface-format) protocol, which also returns a promise containing the `signerAddress` in addition to the `signAuthEntry` that was returned previously. It also can return an `Error` type.
15
+
16
+ ### Added
17
+ * `contract.Client` now has a static `deploy` method that can be used to deploy a contract instance from an existing uploaded/"installed" Wasm hash. The first arguments to this method are the arguments for the contract's `__constructor` method in accordance with CAP-42 ([#1086](https://github.com/stellar/js-stellar-sdk/pull/1086/)).
18
+
19
+ For example, using the `increment` test contract as modified in https://github.com/stellar/soroban-test-examples/pull/2/files#diff-8734809100be3803c3ce38064730b4578074d7c2dc5fb7c05ca802b2248b18afR10-R45:
20
+ ```typescript
21
+ const tx = await contract.Client.deploy(
22
+ { counter: 42 },
23
+ {
24
+ networkPassphrase,
25
+ rpcUrl,
26
+ wasmHash: uploadedWasmHash,
27
+ publicKey: someKeypair.publicKey(),
28
+ ...basicNodeSigner(someKeypair, networkPassphrase),
29
+ },
30
+ );
31
+ const { result: client } = await tx.signAndSend();
32
+ const t = await client.get();
33
+ expect(t.result, 42);
34
+ ```
35
+ * `Horizon.ServerApi` now has an `EffectType` exported so that you can compare and infer effect types directly ([#1099](https://github.com/stellar/js-stellar-sdk/pull/1099)).
36
+ * `Horizon.ServerApi.Trade` type now has a `type_i` field for type inference.
37
+ * All effects now expose their type as an exact string ([#947](https://github.com/stellar/js-stellar-sdk/pull/947)).
38
+ * `stellartoml-Resolver.resolve` now has a `allowedRedirects` option to configure the number of allowed redirects to follow when resolving a stellar toml file.
39
+
9
40
 
10
41
  ## [v13.0.0-rc.1](https://github.com/stellar/js-stellar-sdk/compare/v12.3.0...v13.0.0-rc.1)
11
42
 
@@ -43,7 +74,6 @@ A breaking change will get clearly marked in this log.
43
74
 
44
75
  ### Breaking Changes
45
76
  - `contract.AssembledTransaction#signAuthEntries` now takes an `address` instead of a `publicKey`. This brings the API more inline with its actual functionality: It can be used to sign all the auth entries for a particular _address_, whether that is the address of an account (public key) or a contract. ([#1044](https://github.com/stellar/js-stellar-sdk/pull/1044)).
46
-
47
77
  - The Node.js code will now Babelify to Node 18 instead of Node 16, but we stopped supporting Node 16 long ago so this shouldn't be a breaking change.
48
78
 
49
79
  ### Added