@stellar/stellar-sdk 13.0.0-beta.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.
- package/CHANGELOG.md +63 -0
- package/dist/stellar-sdk-minimal.js +585 -253
- package/dist/stellar-sdk-minimal.min.js +1 -1
- package/dist/stellar-sdk-no-axios.js +602 -256
- package/dist/stellar-sdk-no-axios.min.js +1 -1
- package/dist/stellar-sdk-no-eventsource.js +585 -253
- package/dist/stellar-sdk-no-eventsource.min.js +1 -1
- package/dist/stellar-sdk.js +602 -256
- package/dist/stellar-sdk.min.js +1 -1
- package/lib/contract/assembled_transaction.d.ts +75 -3
- package/lib/contract/assembled_transaction.js +124 -35
- package/lib/contract/basic_node_signer.d.ts +3 -2
- package/lib/contract/basic_node_signer.js +16 -8
- package/lib/contract/client.d.ts +13 -1
- package/lib/contract/client.js +159 -48
- package/lib/contract/sent_transaction.d.ts +2 -3
- package/lib/contract/sent_transaction.js +4 -4
- package/lib/contract/types.d.ts +72 -8
- package/lib/contract/types.js +1 -0
- package/lib/horizon/call_builder.d.ts +1 -1
- package/lib/horizon/horizon_axios_client.js +1 -1
- package/lib/horizon/server_api.d.ts +1 -15
- package/lib/horizon/server_api.js +5 -0
- package/lib/horizon/types/assets.d.ts +0 -2
- package/lib/horizon/types/effects.d.ts +51 -51
- package/lib/horizon/types/trade.d.ts +3 -2
- package/lib/http-client/types.d.ts +1 -0
- package/lib/index.d.ts +0 -4
- package/lib/index.js +1 -4
- package/lib/minimal/contract/assembled_transaction.d.ts +75 -3
- package/lib/minimal/contract/assembled_transaction.js +124 -35
- package/lib/minimal/contract/basic_node_signer.d.ts +3 -2
- package/lib/minimal/contract/basic_node_signer.js +16 -8
- package/lib/minimal/contract/client.d.ts +13 -1
- package/lib/minimal/contract/client.js +159 -48
- package/lib/minimal/contract/sent_transaction.d.ts +2 -3
- package/lib/minimal/contract/sent_transaction.js +4 -4
- package/lib/minimal/contract/types.d.ts +72 -8
- package/lib/minimal/contract/types.js +1 -0
- package/lib/minimal/horizon/call_builder.d.ts +1 -1
- package/lib/minimal/horizon/horizon_axios_client.js +1 -1
- package/lib/minimal/horizon/server_api.d.ts +1 -15
- package/lib/minimal/horizon/server_api.js +5 -0
- package/lib/minimal/horizon/types/assets.d.ts +0 -2
- package/lib/minimal/horizon/types/effects.d.ts +51 -51
- package/lib/minimal/horizon/types/trade.d.ts +3 -2
- package/lib/minimal/http-client/types.d.ts +1 -0
- package/lib/minimal/index.d.ts +0 -4
- package/lib/minimal/index.js +1 -4
- package/lib/minimal/rpc/api.d.ts +12 -9
- package/lib/minimal/rpc/axios.js +1 -1
- package/lib/minimal/rpc/index.d.ts +1 -1
- package/lib/minimal/rpc/index.js +14 -0
- package/lib/minimal/rpc/parsers.d.ts +1 -1
- package/lib/minimal/rpc/parsers.js +3 -3
- package/lib/minimal/rpc/server.d.ts +41 -3
- package/lib/minimal/rpc/server.js +203 -149
- package/lib/minimal/stellartoml/index.d.ts +1 -0
- package/lib/minimal/stellartoml/index.js +2 -0
- package/lib/minimal/utils.d.ts +1 -0
- package/lib/minimal/utils.js +7 -0
- package/lib/no-axios/contract/assembled_transaction.d.ts +75 -3
- package/lib/no-axios/contract/assembled_transaction.js +124 -35
- package/lib/no-axios/contract/basic_node_signer.d.ts +3 -2
- package/lib/no-axios/contract/basic_node_signer.js +16 -8
- package/lib/no-axios/contract/client.d.ts +13 -1
- package/lib/no-axios/contract/client.js +159 -48
- package/lib/no-axios/contract/sent_transaction.d.ts +2 -3
- package/lib/no-axios/contract/sent_transaction.js +4 -4
- package/lib/no-axios/contract/types.d.ts +72 -8
- package/lib/no-axios/contract/types.js +1 -0
- package/lib/no-axios/horizon/call_builder.d.ts +1 -1
- package/lib/no-axios/horizon/horizon_axios_client.js +1 -1
- package/lib/no-axios/horizon/server_api.d.ts +1 -15
- package/lib/no-axios/horizon/server_api.js +5 -0
- package/lib/no-axios/horizon/types/assets.d.ts +0 -2
- package/lib/no-axios/horizon/types/effects.d.ts +51 -51
- package/lib/no-axios/horizon/types/trade.d.ts +3 -2
- package/lib/no-axios/http-client/types.d.ts +1 -0
- package/lib/no-axios/index.d.ts +0 -4
- package/lib/no-axios/index.js +1 -4
- package/lib/no-axios/rpc/api.d.ts +12 -9
- package/lib/no-axios/rpc/axios.js +1 -1
- package/lib/no-axios/rpc/index.d.ts +1 -1
- package/lib/no-axios/rpc/index.js +14 -0
- package/lib/no-axios/rpc/parsers.d.ts +1 -1
- package/lib/no-axios/rpc/parsers.js +3 -3
- package/lib/no-axios/rpc/server.d.ts +41 -3
- package/lib/no-axios/rpc/server.js +203 -149
- package/lib/no-axios/stellartoml/index.d.ts +1 -0
- package/lib/no-axios/stellartoml/index.js +2 -0
- package/lib/no-axios/utils.d.ts +1 -0
- package/lib/no-axios/utils.js +7 -0
- package/lib/no-eventsource/contract/assembled_transaction.d.ts +75 -3
- package/lib/no-eventsource/contract/assembled_transaction.js +124 -35
- package/lib/no-eventsource/contract/basic_node_signer.d.ts +3 -2
- package/lib/no-eventsource/contract/basic_node_signer.js +16 -8
- package/lib/no-eventsource/contract/client.d.ts +13 -1
- package/lib/no-eventsource/contract/client.js +159 -48
- package/lib/no-eventsource/contract/sent_transaction.d.ts +2 -3
- package/lib/no-eventsource/contract/sent_transaction.js +4 -4
- package/lib/no-eventsource/contract/types.d.ts +72 -8
- package/lib/no-eventsource/contract/types.js +1 -0
- package/lib/no-eventsource/horizon/call_builder.d.ts +1 -1
- package/lib/no-eventsource/horizon/horizon_axios_client.js +1 -1
- package/lib/no-eventsource/horizon/server_api.d.ts +1 -15
- package/lib/no-eventsource/horizon/server_api.js +5 -0
- package/lib/no-eventsource/horizon/types/assets.d.ts +0 -2
- package/lib/no-eventsource/horizon/types/effects.d.ts +51 -51
- package/lib/no-eventsource/horizon/types/trade.d.ts +3 -2
- package/lib/no-eventsource/http-client/types.d.ts +1 -0
- package/lib/no-eventsource/index.d.ts +0 -4
- package/lib/no-eventsource/index.js +1 -4
- package/lib/no-eventsource/rpc/api.d.ts +12 -9
- package/lib/no-eventsource/rpc/axios.js +1 -1
- package/lib/no-eventsource/rpc/index.d.ts +1 -1
- package/lib/no-eventsource/rpc/index.js +14 -0
- package/lib/no-eventsource/rpc/parsers.d.ts +1 -1
- package/lib/no-eventsource/rpc/parsers.js +3 -3
- package/lib/no-eventsource/rpc/server.d.ts +41 -3
- package/lib/no-eventsource/rpc/server.js +203 -149
- package/lib/no-eventsource/stellartoml/index.d.ts +1 -0
- package/lib/no-eventsource/stellartoml/index.js +2 -0
- package/lib/no-eventsource/utils.d.ts +1 -0
- package/lib/no-eventsource/utils.js +7 -0
- package/lib/rpc/api.d.ts +12 -9
- package/lib/rpc/axios.js +1 -1
- package/lib/rpc/index.d.ts +1 -1
- package/lib/rpc/index.js +14 -0
- package/lib/rpc/parsers.d.ts +1 -1
- package/lib/rpc/parsers.js +3 -3
- package/lib/rpc/server.d.ts +41 -3
- package/lib/rpc/server.js +203 -149
- package/lib/stellartoml/index.d.ts +1 -0
- package/lib/stellartoml/index.js +2 -0
- package/lib/utils.d.ts +1 -0
- package/lib/utils.js +7 -0
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,69 @@ 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
|
+
|
|
40
|
+
|
|
41
|
+
## [v13.0.0-rc.1](https://github.com/stellar/js-stellar-sdk/compare/v12.3.0...v13.0.0-rc.1)
|
|
42
|
+
|
|
43
|
+
### Breaking Changes
|
|
44
|
+
- Deprecated RPC APIs have been removed ([#1084](https://github.com/stellar/js-stellar-sdk/pull/1084)):
|
|
45
|
+
* `simulateTransaction`'s `cost` field is removed
|
|
46
|
+
* `getEvents` returns a `cursor` field that matches `pagingToken` and `id`
|
|
47
|
+
* `getTransactions` returns a `txHash` field
|
|
48
|
+
- Horizon Server API types: removed fields `transaction_count`, `base_fee`, and `base_reserve` (deprecated since [v10.0.1](https://github.com/stellar/js-stellar-sdk/releases/tag/v10.0.1))
|
|
49
|
+
- `SentTransaction.init` and `new SentTransaction` now take _one_ (1) argument instead of _two_ (2). The first argument had previously been deprecated and ignored. To update:
|
|
50
|
+
```diff
|
|
51
|
+
-SentTransaction(nonsense, realStuff)
|
|
52
|
+
+SentTransaction(realStuff)
|
|
53
|
+
-new SentTransaction(nonsense, realStuff)
|
|
54
|
+
+new SentTransaction(realStuff)
|
|
55
|
+
```
|
|
56
|
+
- `SorobanRpc` import, previously deprecated, has been removed. You can import `rpc` instead:
|
|
57
|
+
```diff
|
|
58
|
+
-import { SorobanRpc } from '@stellar/stellar-sdk'
|
|
59
|
+
+import { rpc } from '@stellar/stellar-sdk'
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
As an alternative, you can also import from the `rpc` entrypoint:
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
import { Server } from '@stellar/stellar-sdk/rpc'
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Added
|
|
70
|
+
- `rpc.Server` now has a `pollTransaction` method to retry transaction retrieval ([#1092]https://github.com/stellar/js-stellar-sdk/pull/1092).
|
|
71
|
+
|
|
9
72
|
|
|
10
73
|
## [v13.0.0-beta.1](https://github.com/stellar/js-stellar-sdk/compare/v12.3.0...v13.0.0-beta.1)
|
|
11
74
|
|