@stellar/stellar-sdk 14.4.3 → 14.6.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.
- package/README.md +150 -0
- package/bin/stellar-js +4 -0
- package/dist/stellar-sdk-minimal.js +11450 -10315
- package/dist/stellar-sdk-minimal.min.js +1 -1
- package/dist/stellar-sdk-no-axios.js +7459 -6324
- package/dist/stellar-sdk-no-axios.min.js +1 -1
- package/dist/stellar-sdk-no-eventsource.js +11597 -10483
- package/dist/stellar-sdk-no-eventsource.min.js +1 -1
- package/dist/stellar-sdk.js +10647 -9533
- package/dist/stellar-sdk.min.js +1 -1
- package/lib/bindings/client.d.ts +30 -0
- package/lib/bindings/client.js +134 -0
- package/lib/bindings/config.d.ts +34 -0
- package/lib/bindings/config.js +83 -0
- package/lib/bindings/generator.d.ts +176 -0
- package/lib/bindings/generator.js +131 -0
- package/lib/bindings/index.d.ts +6 -0
- package/lib/bindings/index.js +75 -0
- package/lib/bindings/sac-spec.d.ts +1 -0
- package/lib/bindings/sac-spec.js +7 -0
- package/lib/bindings/types.d.ts +66 -0
- package/lib/bindings/types.js +184 -0
- package/lib/bindings/utils.d.ts +49 -0
- package/lib/bindings/utils.js +223 -0
- package/lib/bindings/wasm_fetcher.d.ts +25 -0
- package/lib/bindings/wasm_fetcher.js +225 -0
- package/lib/cli/index.d.ts +2 -0
- package/lib/cli/index.js +171 -0
- package/lib/cli/util.d.ts +55 -0
- package/lib/cli/util.js +254 -0
- package/lib/contract/client.js +2 -1
- package/lib/horizon/call_builder.js +30 -6
- package/lib/horizon/horizon_axios_client.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +9 -1
- package/lib/minimal/bindings/client.d.ts +30 -0
- package/lib/minimal/bindings/client.js +134 -0
- package/lib/minimal/bindings/config.d.ts +34 -0
- package/lib/minimal/bindings/config.js +83 -0
- package/lib/minimal/bindings/generator.d.ts +176 -0
- package/lib/minimal/bindings/generator.js +131 -0
- package/lib/minimal/bindings/index.d.ts +6 -0
- package/lib/minimal/bindings/index.js +75 -0
- package/lib/minimal/bindings/sac-spec.d.ts +1 -0
- package/lib/minimal/bindings/sac-spec.js +7 -0
- package/lib/minimal/bindings/types.d.ts +66 -0
- package/lib/minimal/bindings/types.js +184 -0
- package/lib/minimal/bindings/utils.d.ts +49 -0
- package/lib/minimal/bindings/utils.js +223 -0
- package/lib/minimal/bindings/wasm_fetcher.d.ts +25 -0
- package/lib/minimal/bindings/wasm_fetcher.js +225 -0
- package/lib/minimal/cli/index.d.ts +2 -0
- package/lib/minimal/cli/index.js +171 -0
- package/lib/minimal/cli/util.d.ts +55 -0
- package/lib/minimal/cli/util.js +254 -0
- package/lib/minimal/contract/client.js +2 -1
- package/lib/minimal/horizon/call_builder.js +30 -6
- package/lib/minimal/horizon/horizon_axios_client.js +1 -1
- package/lib/minimal/index.d.ts +1 -0
- package/lib/minimal/index.js +9 -1
- package/lib/minimal/rpc/axios.js +1 -1
- package/lib/minimal/rpc/server.d.ts +35 -1
- package/lib/minimal/rpc/server.js +110 -43
- package/lib/minimal/stellartoml/index.d.ts +3 -0
- package/lib/no-axios/bindings/client.d.ts +30 -0
- package/lib/no-axios/bindings/client.js +134 -0
- package/lib/no-axios/bindings/config.d.ts +34 -0
- package/lib/no-axios/bindings/config.js +83 -0
- package/lib/no-axios/bindings/generator.d.ts +176 -0
- package/lib/no-axios/bindings/generator.js +131 -0
- package/lib/no-axios/bindings/index.d.ts +6 -0
- package/lib/no-axios/bindings/index.js +75 -0
- package/lib/no-axios/bindings/sac-spec.d.ts +1 -0
- package/lib/no-axios/bindings/sac-spec.js +7 -0
- package/lib/no-axios/bindings/types.d.ts +66 -0
- package/lib/no-axios/bindings/types.js +184 -0
- package/lib/no-axios/bindings/utils.d.ts +49 -0
- package/lib/no-axios/bindings/utils.js +223 -0
- package/lib/no-axios/bindings/wasm_fetcher.d.ts +25 -0
- package/lib/no-axios/bindings/wasm_fetcher.js +225 -0
- package/lib/no-axios/cli/index.d.ts +2 -0
- package/lib/no-axios/cli/index.js +171 -0
- package/lib/no-axios/cli/util.d.ts +55 -0
- package/lib/no-axios/cli/util.js +254 -0
- package/lib/no-axios/contract/client.js +2 -1
- package/lib/no-axios/horizon/call_builder.js +30 -6
- package/lib/no-axios/horizon/horizon_axios_client.js +1 -1
- package/lib/no-axios/index.d.ts +1 -0
- package/lib/no-axios/index.js +9 -1
- package/lib/no-axios/rpc/axios.js +1 -1
- package/lib/no-axios/rpc/server.d.ts +35 -1
- package/lib/no-axios/rpc/server.js +110 -43
- package/lib/no-axios/stellartoml/index.d.ts +3 -0
- package/lib/no-eventsource/bindings/client.d.ts +30 -0
- package/lib/no-eventsource/bindings/client.js +134 -0
- package/lib/no-eventsource/bindings/config.d.ts +34 -0
- package/lib/no-eventsource/bindings/config.js +83 -0
- package/lib/no-eventsource/bindings/generator.d.ts +176 -0
- package/lib/no-eventsource/bindings/generator.js +131 -0
- package/lib/no-eventsource/bindings/index.d.ts +6 -0
- package/lib/no-eventsource/bindings/index.js +75 -0
- package/lib/no-eventsource/bindings/sac-spec.d.ts +1 -0
- package/lib/no-eventsource/bindings/sac-spec.js +7 -0
- package/lib/no-eventsource/bindings/types.d.ts +66 -0
- package/lib/no-eventsource/bindings/types.js +184 -0
- package/lib/no-eventsource/bindings/utils.d.ts +49 -0
- package/lib/no-eventsource/bindings/utils.js +223 -0
- package/lib/no-eventsource/bindings/wasm_fetcher.d.ts +25 -0
- package/lib/no-eventsource/bindings/wasm_fetcher.js +225 -0
- package/lib/no-eventsource/cli/index.d.ts +2 -0
- package/lib/no-eventsource/cli/index.js +171 -0
- package/lib/no-eventsource/cli/util.d.ts +55 -0
- package/lib/no-eventsource/cli/util.js +254 -0
- package/lib/no-eventsource/contract/client.js +2 -1
- package/lib/no-eventsource/horizon/call_builder.js +30 -6
- package/lib/no-eventsource/horizon/horizon_axios_client.js +1 -1
- package/lib/no-eventsource/index.d.ts +1 -0
- package/lib/no-eventsource/index.js +9 -1
- package/lib/no-eventsource/rpc/axios.js +1 -1
- package/lib/no-eventsource/rpc/server.d.ts +35 -1
- package/lib/no-eventsource/rpc/server.js +110 -43
- package/lib/no-eventsource/stellartoml/index.d.ts +3 -0
- package/lib/rpc/axios.js +1 -1
- package/lib/rpc/server.d.ts +35 -1
- package/lib/rpc/server.js +110 -43
- package/lib/stellartoml/index.d.ts +3 -0
- package/package.json +10 -4
- package/CHANGELOG.md +0 -2023
package/CHANGELOG.md
DELETED
|
@@ -1,2023 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# Changelog
|
|
3
|
-
|
|
4
|
-
A breaking change will get clearly marked in this log.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Unreleased
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## [v14.4.3](https://github.com/stellar/js-stellar-sdk/compare/v14.4.2...v14.4.3)
|
|
11
|
-
|
|
12
|
-
### Fixed
|
|
13
|
-
* Upgraded underlying `@stellar/stellar-base` library to include its fixes ([release notes](https://github.com/stellar/js-stellar-base/releases/tag/v14.0.4)).
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
## [v14.4.2](https://github.com/stellar/js-stellar-sdk/compare/v14.4.1...v14.4.2)
|
|
17
|
-
|
|
18
|
-
### Fixed
|
|
19
|
-
* Fixed package installation for Windows environments ([#1306](https://github.com/stellar/js-stellar-sdk/pull/1306))
|
|
20
|
-
|
|
21
|
-
## [v14.4.1](https://github.com/stellar/js-stellar-sdk/compare/v14.4.0...v14.4.1)
|
|
22
|
-
|
|
23
|
-
### Fixed
|
|
24
|
-
* Set `Api.GetEventsRequest.endLedger` to be optional to align with RPC behavior ([#1304](https://github.com/stellar/js-stellar-sdk/pull/1304/))
|
|
25
|
-
* Added back `Typepoint` and marked it _deprecated_ in favor of `Timepoint` ([#1303](https://github.com/stellar/js-stellar-sdk/pull/1303))
|
|
26
|
-
|
|
27
|
-
## [v14.4.0](https://github.com/stellar/js-stellar-sdk/compare/v14.3.3...v14.4.0)
|
|
28
|
-
|
|
29
|
-
### Added
|
|
30
|
-
* Introduced an `rpc.Server.getAssetBalance()` helper to fetch asset balances both for contracts and accounts ([#1286](https://github.com/stellar/js-stellar-sdk/pull/1286/)).
|
|
31
|
-
* `rpc.Api.BalanceResponse` now can include a `revocable` field in its `balanceEntry` for when trustlines are fetched ([#1286](https://github.com/stellar/js-stellar-sdk/pull/1286/)).
|
|
32
|
-
* Added Timepoint and Duration support to `Spec` ([#1288](https://github.com/stellar/js-stellar-sdk/pull/1288))
|
|
33
|
-
* `Api.GetHealthResponse` interface now includes `latestLedger`, `ledgerRetentionWindow`, and `oldestLedger` fields ([#1297](https://github.com/stellar/js-stellar-sdk/pull/1297)).
|
|
34
|
-
* Added `publicKey`, `signTransaction`, and `signAuthEntry` as optional fields to `contract.MethodOptions` ([#1293](https://github.com/stellar/js-stellar-sdk/pull/1293)).
|
|
35
|
-
|
|
36
|
-
### Fixed
|
|
37
|
-
* `Api.RawEventResponse.topics` is now optional to reflect topicless events ([#1292](https://github.com/stellar/js-stellar-sdk/pull/1292)).
|
|
38
|
-
* `parseRawEvents` correctly checks if `Api.RawEventResponse.topics` is undefined ([#1292](https://github.com/stellar/js-stellar-sdk/pull/1292)).
|
|
39
|
-
* Remove `WebAssembly` usage in favor of manual wasm parsing ([#1300](https://github.com/stellar/js-stellar-sdk/pull/1300)).
|
|
40
|
-
* Fixed URL contamination in `Horizon.Server` methods ([#1296](https://github.com/stellar/js-stellar-sdk/pull/1296)).
|
|
41
|
-
|
|
42
|
-
## [v14.3.3](https://github.com/stellar/js-stellar-sdk/compare/v14.3.2...v14.3.3)
|
|
43
|
-
|
|
44
|
-
### Added
|
|
45
|
-
* `Spec.nativeToScVal` supports parsing Muxed Address([#1274](https://github.com/stellar/js-stellar-sdk/pull/1274)),
|
|
46
|
-
|
|
47
|
-
## [v14.3.2](https://github.com/stellar/js-stellar-sdk/compare/v14.3.1...v14.3.2)
|
|
48
|
-
|
|
49
|
-
### Added
|
|
50
|
-
* `AssembledTransaction.sign()` throws an error if `publicKey` was not provided when instantiated ([#1269](https://github.com/stellar/js-stellar-sdk/pull/1269)).
|
|
51
|
-
|
|
52
|
-
## [v14.3.1](https://github.com/stellar/js-stellar-sdk/compare/v14.3.0...v14.3.1)
|
|
53
|
-
|
|
54
|
-
### Added
|
|
55
|
-
* Added optional `server: rpc.Server` field to `ClientOption` for HttpClient reuse. ([#1234](https://github.com/stellar/js-stellar-sdk/pull/1234)).
|
|
56
|
-
|
|
57
|
-
### Fixed
|
|
58
|
-
* Replaced global `HttpClient` with per-instance clients in `horizon.Server` and `rpc.Server` to prevent cross-instance header contamination ([#1234](https://github.com/stellar/js-stellar-sdk/pull/1234)).
|
|
59
|
-
|
|
60
|
-
## [v14.3.0](https://github.com/stellar/js-stellar-sdk/compare/v14.2.0...v14.3.0)
|
|
61
|
-
|
|
62
|
-
### Added
|
|
63
|
-
* `Spec.scValToNative` now supports parsing `Option`s ([#1228](https://github.com/stellar/js-stellar-sdk/pull/1228)).
|
|
64
|
-
* Added `getLedgers` method to `rpc.Server` for retreiving ledger data. ([#1231](https://github.com/stellar/js-stellar-sdk/pull/1231)).
|
|
65
|
-
|
|
66
|
-
### Fixed
|
|
67
|
-
* `Spec.scValToNative` returns `null` for `void`s or `Option`als instead of the ambiguous `undefined` ([#1228](https://github.com/stellar/js-stellar-sdk/pull/1228)).
|
|
68
|
-
* The `getEvents` API now requires either a start and end ledger or a cursor to be provided ([#1231](https://github.com/stellar/js-stellar-sdk/pull/1231)).
|
|
69
|
-
|
|
70
|
-
### Deprecated
|
|
71
|
-
* `GetEventsRequest` interface moved from `server.ts` to `api.ts` ([#1231](https://github.com/stellar/js-stellar-sdk/pull/1231)).
|
|
72
|
-
|
|
73
|
-
## [v14.2.0](https://github.com/stellar/js-stellar-sdk/compare/v14.1.1...v14.2.0)
|
|
74
|
-
|
|
75
|
-
### Added
|
|
76
|
-
* `rpc.Server` now includes `getAccountEntry`, `getTrustlineEntry`, and `getClaimableBalance` methods to facilitate retrieving those entries without manually constructing the ledger keys ([#1218](https://github.com/stellar/js-stellar-sdk/pull/1218), [#1221](https://github.com/stellar/js-stellar-sdk/pull/1221)).
|
|
77
|
-
|
|
78
|
-
### Fixed
|
|
79
|
-
* The `getTransactions` API no longer requires `startLedger` when providing `cursor` because they are mutually exclusive ([#1192](https://github.com/stellar/js-stellar-sdk/pull/1192)).
|
|
80
|
-
* Updated `@stellar/stellar-base` to latest patch (see its [release notes](https://github.com/stellar/js-stellar-base/releases/tag/v14.0.1), [#1221](https://github.com/stellar/js-stellar-sdk/pull/1221)).
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
## [v14.1.1](https://github.com/stellar/js-stellar-sdk/compare/v14.1.0...v14.1.1)
|
|
84
|
-
|
|
85
|
-
### Fixed
|
|
86
|
-
* Added missing `transactionIndex` and `operationIndex` to `getEvents` return schema ([#1206](https://github.com/stellar/js-stellar-sdk/pull/1206)).
|
|
87
|
-
* Remove previously-deprecated and now-removed `pagingToken` from `getEvents` (use `id` instead or the top-level `cursor`, depending on pagination needs) ([#1207](https://github.com/stellar/js-stellar-sdk/pull/1207)).
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
## [v14.1.0](https://github.com/stellar/js-stellar-sdk/compare/v14.0.0...v14.1.0)
|
|
91
|
-
|
|
92
|
-
### Added
|
|
93
|
-
* Add support to `new contract.Spec(...)` for constructing from a stream of `ScSpecEntry` XDR entries (base64, or binary) ([#1198](https://github.com/stellar/js-stellar-sdk/pull/1198)).
|
|
94
|
-
* Add `contract.Spec.fromWasm(wasmFile)` for extracting contract spec from contract Wasm files. ([#1198](https://github.com/stellar/js-stellar-sdk/pull/1198)).
|
|
95
|
-
|
|
96
|
-
## [v14.0.0](https://github.com/stellar/js-stellar-sdk/compare/v13.1.0...v14.0.0)
|
|
97
|
-
|
|
98
|
-
### Breaking Changes
|
|
99
|
-
* **This package requires Node 20.**
|
|
100
|
-
* XDR has been upgraded to support **Protocol 23**, please refer to the [`@stellar/stellar-base`](https://github.com/stellar/js-stellar-base/releases/tag/v14.0.0-rc.1) release notes for details and other breaking changes.
|
|
101
|
-
* Removes the defunct `destination_muxed_id_type` field for Horizon balance changes ([#1187](https://github.com/stellar/js-stellar-sdk/pull/1187)).
|
|
102
|
-
|
|
103
|
-
### Added
|
|
104
|
-
* The Horizon API's `BalanceChange` object for operations now optionally has details about muxed information if the invocation involved a muxed destination address:
|
|
105
|
-
```typescript
|
|
106
|
-
export type MuxedIdType = "uint64" | "string" | "bytes";
|
|
107
|
-
export interface BalanceChange {
|
|
108
|
-
// ...
|
|
109
|
-
destination_muxed_id_type?: MuxedIdType;
|
|
110
|
-
destination_muxed_id?: string;
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
* The RPC server's `getTransaction` and `getTransactions` responses now include a top-level `events` object containing a disjoint breakdown of the events:
|
|
114
|
-
```typescript
|
|
115
|
-
export interface TransactionEvents {
|
|
116
|
-
transactionEventsXdr: xdr.TransactionEvent[];
|
|
117
|
-
contractEventsXdr: xdr.ContractEvent[][];
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
* The RPC server's `getEvents` now includes retention state information:
|
|
121
|
-
```typescript
|
|
122
|
-
export interface GetEventsResponse {
|
|
123
|
-
// ...
|
|
124
|
-
oldestLedger: number;
|
|
125
|
-
latestLedgerCloseTime: string;
|
|
126
|
-
oldestLedgerCloseTime: string;
|
|
127
|
-
}
|
|
128
|
-
```
|
|
129
|
-
* The RPC server's `simulateTransaction` method now includes an optional `authMode` parameter to specify the type of authorization to simulate:
|
|
130
|
-
```typescript
|
|
131
|
-
export type SimulationAuthMode = "enforce" | "record" | "record_allow_nonroot";
|
|
132
|
-
```
|
|
133
|
-
* `AssembledTransaction#signAndSend` now takes a `watcher` argument ([#1174](https://github.com/stellar/js-stellar-sdk/pull/1174)). This `watcher` is an abstract class with two optional methods:
|
|
134
|
-
- `onSubmitted`: called with the return value from the `sendTransaction` call that submits the transaction to the network for processing
|
|
135
|
-
- `onProgress`: called with each return value of `getTransaction` that checks on the ongoing status of the transaction
|
|
136
|
-
|
|
137
|
-
For example, a `watcher` like this:
|
|
138
|
-
```typescript
|
|
139
|
-
await tx.signAndSend({ watcher: {
|
|
140
|
-
onSubmitted: ({ status, hash, latestLedger }) => {
|
|
141
|
-
console.log({ status, hash, latestLedger });
|
|
142
|
-
},
|
|
143
|
-
onProgress: ({ status, txHash, latestLedger }) => {
|
|
144
|
-
console.log({ status, txHash, latestLedger });
|
|
145
|
-
}
|
|
146
|
-
}});
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
...will result in output like:
|
|
150
|
-
|
|
151
|
-
```
|
|
152
|
-
{
|
|
153
|
-
status: 'PENDING',
|
|
154
|
-
hash: '8239a5c6a3248966291a202bab2ba393dabc872947b5ee4224921b071850b021',
|
|
155
|
-
latestLedger: 25076
|
|
156
|
-
}
|
|
157
|
-
{
|
|
158
|
-
status: 'NOT_FOUND',
|
|
159
|
-
txHash: '8239a5c6a3248966291a202bab2ba393dabc872947b5ee4224921b071850b021',
|
|
160
|
-
latestLedger: 25076
|
|
161
|
-
}
|
|
162
|
-
{
|
|
163
|
-
status: 'SUCCESS',
|
|
164
|
-
txHash: '8239a5c6a3248966291a202bab2ba393dabc872947b5ee4224921b071850b021',
|
|
165
|
-
latestLedger: 25077
|
|
166
|
-
}
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### Fixed
|
|
170
|
-
* Fixed type for Horizon streaming endpoints, namely `EventSourceOptions.onmessage` now extends `CollectionPage` ([#1100](https://github.com/stellar/js-stellar-sdk/pull/1100)).
|
|
171
|
-
* Fix the issue of transaction submission failure in a no axios environment ([#1176](https://github.com/stellar/js-stellar-sdk/pull/1176)).
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
## [v14.0.0-rc.3](https://github.com/stellar/js-stellar-sdk/compare/v13.1.0...v14.0.0-rc.3)
|
|
175
|
-
|
|
176
|
-
### Fixed
|
|
177
|
-
* Fixes a bug in `Rpc.Server.getTransaction` where either `transactionEventsXdr` and/or `contractEventsXdr` may not be present in the new `events` field.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
## [v14.0.0-rc.2](https://github.com/stellar/js-stellar-sdk/compare/v13.1.0...v14.0.0-rc.2)
|
|
181
|
-
|
|
182
|
-
### Breaking Changes
|
|
183
|
-
* The RPC server's `getTransaction` and `getTransactions` responses have dropped the `events.diagnosticEventsXdr` field ([#1183](https://github.com/stellar/js-stellar-sdk/pull/1183)):
|
|
184
|
-
```diff
|
|
185
|
-
export interface TransactionEvents {
|
|
186
|
-
- diagnosticEventsXdr: xdr.DiagnosticEvent[];
|
|
187
|
-
transactionEventsXdr: xdr.TransactionEvent[];
|
|
188
|
-
}
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### Fixed
|
|
192
|
-
* Fixed type for Horizon streaming endpoints, namely `EventSourceOptions.onmessage` now extends `CollectionPage` ([#1100](https://github.com/stellar/js-stellar-sdk/pull/1100)).
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
## [v14.0.0-rc.1](https://github.com/stellar/js-stellar-sdk/compare/v13.1.0...v14.0.0-rc.1)
|
|
196
|
-
|
|
197
|
-
### Breaking Changes
|
|
198
|
-
* **This package requires Node 20.**
|
|
199
|
-
* XDR has been upgraded to support **Protocol 23**, please refer to the [`@stellar/stellar-base`](https://github.com/stellar/js-stellar-base/releases/tag/v14.0.0-rc.1) release notes for details and other breaking changes.
|
|
200
|
-
* **Deprecated**: `getTransaction` and `getTransactions` top-level `diagnosticEventsXdr` field.
|
|
201
|
-
|
|
202
|
-
### Added
|
|
203
|
-
* The Horizon API's `BalanceChange` object for operations now optionally has details about muxed information if the invocation involved a muxed destination address:
|
|
204
|
-
```typescript
|
|
205
|
-
export type MuxedIdType = "uint64" | "string" | "bytes";
|
|
206
|
-
export interface BalanceChange {
|
|
207
|
-
// ...
|
|
208
|
-
destination_muxed_id_type?: MuxedIdType;
|
|
209
|
-
destination_muxed_id?: string;
|
|
210
|
-
}
|
|
211
|
-
```
|
|
212
|
-
* The RPC server's `getTransaction` and `getTransactions` responses now include a top-level `events` object containing a disjoint breakdown of the events:
|
|
213
|
-
```typescript
|
|
214
|
-
export interface TransactionEvents {
|
|
215
|
-
diagnosticEventsXdr: xdr.DiagnosticEvent[];
|
|
216
|
-
transactionEventsXdr: xdr.TransactionEvent[];
|
|
217
|
-
contractEventsXdr: xdr.ContractEvent[][];
|
|
218
|
-
}
|
|
219
|
-
```
|
|
220
|
-
* The RPC server's `getEvents` now includes retention state information:
|
|
221
|
-
```typescript
|
|
222
|
-
export interface GetEventsResponse {
|
|
223
|
-
// ...
|
|
224
|
-
oldestLedger: number;
|
|
225
|
-
latestLedgerCloseTime: string;
|
|
226
|
-
oldestLedgerCloseTime: string;
|
|
227
|
-
}
|
|
228
|
-
```
|
|
229
|
-
* The RPC server's `simulateTransaction` method now includes an optional `authMode` parameter to specify the type of authorization to simulate:
|
|
230
|
-
```typescript
|
|
231
|
-
export type SimulationAuthMode = "enforce" | "record" | "record_allow_nonroot";
|
|
232
|
-
```
|
|
233
|
-
* `AssembledTransaction#signAndSend` now takes a `watcher` argument ([#1174](https://github.com/stellar/js-stellar-sdk/pull/1174)). This `watcher` is an abstract class with two optional methods:
|
|
234
|
-
|
|
235
|
-
- `onSubmitted`: called with the return value from the `sendTransaction` call that submits the transaction to the network for processing
|
|
236
|
-
- `onProgress`: called with each return value of `getTransaction` that checks on the ongoing status of the transaction
|
|
237
|
-
|
|
238
|
-
For example, a `watcher` like this:
|
|
239
|
-
|
|
240
|
-
```ts
|
|
241
|
-
await tx.signAndSend({ watcher: {
|
|
242
|
-
onSubmitted: ({ status, hash, latestLedger }) => {
|
|
243
|
-
console.log({ status, hash, latestLedger });
|
|
244
|
-
},
|
|
245
|
-
onProgress: ({ status, txHash, latestLedger }) => {
|
|
246
|
-
console.log({ status, txHash, latestLedger });
|
|
247
|
-
}
|
|
248
|
-
}});
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
...will result in output like:
|
|
252
|
-
|
|
253
|
-
```
|
|
254
|
-
{
|
|
255
|
-
status: 'PENDING',
|
|
256
|
-
hash: '8239a5c6a3248966291a202bab2ba393dabc872947b5ee4224921b071850b021',
|
|
257
|
-
latestLedger: 25076
|
|
258
|
-
}
|
|
259
|
-
{
|
|
260
|
-
status: 'NOT_FOUND',
|
|
261
|
-
txHash: '8239a5c6a3248966291a202bab2ba393dabc872947b5ee4224921b071850b021',
|
|
262
|
-
latestLedger: 25076
|
|
263
|
-
}
|
|
264
|
-
{
|
|
265
|
-
status: 'SUCCESS',
|
|
266
|
-
txHash: '8239a5c6a3248966291a202bab2ba393dabc872947b5ee4224921b071850b021',
|
|
267
|
-
latestLedger: 25077
|
|
268
|
-
}
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
### Fixed
|
|
272
|
-
* Fix the issue of transaction submission failure in a no axios environment ([#1176](https://github.com/stellar/js-stellar-sdk/pull/1176)).
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
## [v13.3.0](https://github.com/stellar/js-stellar-sdk/compare/v13.2.0...v13.3.0)
|
|
276
|
-
|
|
277
|
-
### Added
|
|
278
|
-
* Add `includeFailed` to `PaymentCallBuilder` for including failed transactions in calls ([#1168](https://github.com/stellar/js-stellar-sdk/pull/1168)).
|
|
279
|
-
|
|
280
|
-
### Fixed
|
|
281
|
-
* Ensure that `rpc.Api.GetTransactionsResponse.transactions` is always a valid array ([#1162](https://github.com/stellar/js-stellar-sdk/pull/1162)).
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
## [v13.2.0](https://github.com/stellar/js-stellar-sdk/compare/v13.1.0...v13.2.0)
|
|
285
|
-
|
|
286
|
-
### Added
|
|
287
|
-
* Support passing in an optional `options.address` to the `contract.Client.deploy` method ([#1158](https://github.com/stellar/js-stellar-sdk/pull/1158)).
|
|
288
|
-
|
|
289
|
-
### Fixed
|
|
290
|
-
* Extend support for parsing contract specifications in environments that don't have WebAssembly compilers ([#1157](https://github.com/stellar/js-stellar-sdk/pull/1157)).
|
|
291
|
-
* Upgraded `@stellar/stellar-base` dependency to latest version ([#1159](https://github.com/stellar/js-stellar-sdk/pull/1159)).
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
## [v13.1.0](https://github.com/stellar/js-stellar-sdk/compare/v13.0.0...v13.1.0)
|
|
295
|
-
|
|
296
|
-
### Added
|
|
297
|
-
* Added `Horizon.Server.root` to obtain information from the Horizon root endpoint ([#1122](https://github.com/stellar/js-stellar-sdk/pull/1122/)).
|
|
298
|
-
|
|
299
|
-
### Fixed
|
|
300
|
-
* 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/)).
|
|
301
|
-
* `rpc.Server.getEvents()` now correctly returns the `cursor` field at the top-level response ([#1124](https://github.com/stellar/js-stellar-sdk/pull/1124)).
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
## [v13.0.0](https://github.com/stellar/js-stellar-sdk/compare/v12.3.0...v13.0.0)
|
|
305
|
-
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.
|
|
306
|
-
|
|
307
|
-
### Breaking Changes
|
|
308
|
-
- We stopped supporting Node 18 explicitly a while ago, but now the Babelification of the codebase will transform to Node 18 instead of 16.
|
|
309
|
-
|
|
310
|
-
#### TypeScript Bindings: the `contract` module.
|
|
311
|
-
- `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)).
|
|
312
|
-
- 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.
|
|
313
|
-
* `basicNodeSigner` has been updated to reflect this new type.
|
|
314
|
-
- `ClientOptions.signAuthEntry` type has been updated to reflect the [SEP-43](https://stellar.org/protocol/sep-43#wallet-interface-format) protocol, which returns a promise containing the `signerAddress` in addition to the `signAuthEntry` that was returned previously. It also can return an `Error` type.
|
|
315
|
-
- `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:
|
|
316
|
-
```diff
|
|
317
|
-
-SentTransaction(nonsense, realStuff)
|
|
318
|
-
+SentTransaction(realStuff)
|
|
319
|
-
-new SentTransaction(nonsense, realStuff)
|
|
320
|
-
+new SentTransaction(realStuff)
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
#### Server APIs: the `rpc` and `Horizon` modules.
|
|
324
|
-
- Deprecated RPC APIs have been removed ([#1084](https://github.com/stellar/js-stellar-sdk/pull/1084)):
|
|
325
|
-
* `simulateTransaction`'s `cost` field is removed
|
|
326
|
-
* `rpc.Server.getEvents`'s `pagingToken` field is deprecated, use `cursor` instead
|
|
327
|
-
- Deprecated Horizon APIs have been removed (deprecated since [v10.0.1](https://github.com/stellar/js-stellar-sdk/releases/tag/v10.0.1), []()):
|
|
328
|
-
* removed fields `transaction_count`, `base_fee`, and `base_reserve`
|
|
329
|
-
* removed fields `num_accounts` and `amount` from assets
|
|
330
|
-
- The `SorobanRpc` import, previously deprecated, has been removed. You can import `rpc` instead:
|
|
331
|
-
```diff
|
|
332
|
-
-import { SorobanRpc } from '@stellar/stellar-sdk'
|
|
333
|
-
+import { rpc } from '@stellar/stellar-sdk'
|
|
334
|
-
// alternatively, you can also import from the `rpc` entrypoint:
|
|
335
|
-
import { Server } from '@stellar/stellar-sdk/rpc'
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
### Added
|
|
339
|
-
|
|
340
|
-
#### TypeScript Bindings: the `contract` module.
|
|
341
|
-
* `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](https://stellar.org/protocol/cap-42) ([#1086](https://github.com/stellar/js-stellar-sdk/pull/1086/)). For example, using the `increment` test contract as modified in https://github.com/stellar/soroban-test-examples/pull/2/files#diff-8734809100be3803c3ce38064730b4578074d7c2dc5fb7c05ca802b2248b18afR10-R45:
|
|
342
|
-
```typescript
|
|
343
|
-
const tx = await contract.Client.deploy(
|
|
344
|
-
{ counter: 42 },
|
|
345
|
-
{
|
|
346
|
-
networkPassphrase,
|
|
347
|
-
rpcUrl,
|
|
348
|
-
wasmHash: uploadedWasmHash,
|
|
349
|
-
publicKey: someKeypair.publicKey(),
|
|
350
|
-
...basicNodeSigner(someKeypair, networkPassphrase),
|
|
351
|
-
},
|
|
352
|
-
);
|
|
353
|
-
const { result: client } = await tx.signAndSend();
|
|
354
|
-
const t = await client.get();
|
|
355
|
-
expect(t.result, 42);
|
|
356
|
-
```
|
|
357
|
-
* `contract.AssembledTransaction#signAuthEntries` now allows you to override `authorizeEntry`. This can be used to streamline novel workflows using cross-contract auth. ([#1044](https://github.com/stellar/js-stellar-sdk/pull/1044)).
|
|
358
|
-
|
|
359
|
-
#### Server modules: the `rpc`, `Horizon`, and `stellartoml` modules.
|
|
360
|
-
* `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)).
|
|
361
|
-
* `Horizon.ServerApi.Trade` type now has a `type_i` field for type inference ([#1099](https://github.com/stellar/js-stellar-sdk/pull/1099)).
|
|
362
|
-
* All effects now expose their type as an exact string ([#947](https://github.com/stellar/js-stellar-sdk/pull/947)).
|
|
363
|
-
* `stellartoml.Resolver.resolve` now has a `allowedRedirects` option to configure the number of allowed redirects to follow when resolving a stellar toml file.
|
|
364
|
-
* `rpc.Server.getEvents` now returns a `cursor` field that matches `pagingToken` and `id`
|
|
365
|
-
* `rpc.Server.getTransactions` now returns a `txHash` field
|
|
366
|
-
* `rpc.Server` has two new methods:
|
|
367
|
-
- `pollTransaction` to retry transaction retrieval ([#1092]https://github.com/stellar/js-stellar-sdk/pull/1092), and
|
|
368
|
-
- `getSACBalance` to fetch the balance of a built-in Stellar Asset Contract token held by a contract ([#1046](https://github.com/stellar/js-stellar-sdk/pull/1046)), returning this schema:
|
|
369
|
-
```typescript
|
|
370
|
-
export interface BalanceResponse {
|
|
371
|
-
latestLedger: number;
|
|
372
|
-
/** present only on success, otherwise request malformed or no balance */
|
|
373
|
-
balanceEntry?: {
|
|
374
|
-
/** a 64-bit integer */
|
|
375
|
-
amount: string;
|
|
376
|
-
authorized: boolean;
|
|
377
|
-
clawback: boolean;
|
|
378
|
-
|
|
379
|
-
lastModifiedLedgerSeq?: number;
|
|
380
|
-
liveUntilLedgerSeq?: number;
|
|
381
|
-
};
|
|
382
|
-
}
|
|
383
|
-
```
|
|
384
|
-
|
|
385
|
-
#### New bundles without dependencies
|
|
386
|
-
- You can now build the browser bundle without various dependencies:
|
|
387
|
-
* Set `USE_AXIOS=false` to build without the `axios` dependency: this will build `stellar-sdk-no-axios.js` and `stellar-sdk-no-axios.min.js` in the `dist/` directory, or just run `yarn build:browser:no-axios` to generate these files.
|
|
388
|
-
* You can import Node packages without the `axios` dependency via `@stellar/stellar-sdk/no-axios`. For Node environments that don't support modern imports, use `@stellar/stellar-sdk/lib/no-axios/index`.
|
|
389
|
-
* Set `USE_EVENTSOURCE=false` to build without the `eventsource` dependency: this will build `stellar-sdk-no-eventsource.js` and `stellar-sdk-no-eventsource.min.js` in the `dist/` directory, or just run `yarn build:browser:no-eventsource` to generate these files.
|
|
390
|
-
* You can import Node packages without the `eventsource` dependency via `@stellar/stellar-sdk/no-eventsource`. For Node.js environments that don't support modern imports, use `@stellar/stellar-sdk/lib/no-eventsource/index`.
|
|
391
|
-
* To use a minimal build without both Axios and EventSource, use `stellar-sdk-minimal.js` for the browser build and import from `@stellar/stellar-sdk/minimal` for the Node package.
|
|
392
|
-
|
|
393
|
-
### Fixed
|
|
394
|
-
- `contract.AssembledTransaction#nonInvokerSigningBy` now correctly returns contract addresses, in instances of cross-contract auth, rather than throwing an error. `sign` will ignore these contract addresses, since auth happens via cross-contract call ([#1044](https://github.com/stellar/js-stellar-sdk/pull/1044)).
|
|
395
|
-
- `buildInvocationTree` now correctly handles V2 contract creation and displays constructor args ([js-stellar-base#785](https://github.com/stellar/js-stellar-base/pull/785)).
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
## [v13.0.0-rc.2](https://github.com/stellar/js-stellar-sdk/compare/v13.0.0-rc.1...v13.0.0-rc.2)
|
|
399
|
-
|
|
400
|
-
### Breaking Changes
|
|
401
|
-
- 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.
|
|
402
|
-
* `basicNodeSigner` has been updated to reflect the new type.
|
|
403
|
-
- `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.
|
|
404
|
-
|
|
405
|
-
### Added
|
|
406
|
-
* `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/)).
|
|
407
|
-
|
|
408
|
-
For example, using the `increment` test contract as modified in https://github.com/stellar/soroban-test-examples/pull/2/files#diff-8734809100be3803c3ce38064730b4578074d7c2dc5fb7c05ca802b2248b18afR10-R45:
|
|
409
|
-
```typescript
|
|
410
|
-
const tx = await contract.Client.deploy(
|
|
411
|
-
{ counter: 42 },
|
|
412
|
-
{
|
|
413
|
-
networkPassphrase,
|
|
414
|
-
rpcUrl,
|
|
415
|
-
wasmHash: uploadedWasmHash,
|
|
416
|
-
publicKey: someKeypair.publicKey(),
|
|
417
|
-
...basicNodeSigner(someKeypair, networkPassphrase),
|
|
418
|
-
},
|
|
419
|
-
);
|
|
420
|
-
const { result: client } = await tx.signAndSend();
|
|
421
|
-
const t = await client.get();
|
|
422
|
-
expect(t.result, 42);
|
|
423
|
-
```
|
|
424
|
-
* `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)).
|
|
425
|
-
* `Horizon.ServerApi.Trade` type now has a `type_i` field for type inference.
|
|
426
|
-
* All effects now expose their type as an exact string ([#947](https://github.com/stellar/js-stellar-sdk/pull/947)).
|
|
427
|
-
* `stellartoml-Resolver.resolve` now has a `allowedRedirects` option to configure the number of allowed redirects to follow when resolving a stellar toml file.
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
## [v13.0.0-rc.1](https://github.com/stellar/js-stellar-sdk/compare/v13.0.0-beta.1...v13.0.0-rc.1)
|
|
431
|
-
|
|
432
|
-
### Breaking Changes
|
|
433
|
-
- Deprecated RPC APIs have been removed ([#1084](https://github.com/stellar/js-stellar-sdk/pull/1084)):
|
|
434
|
-
* `simulateTransaction`'s `cost` field is removed
|
|
435
|
-
* `getEvents` returns a `cursor` field that matches `pagingToken` and `id`
|
|
436
|
-
* `getTransactions` returns a `txHash` field
|
|
437
|
-
- 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))
|
|
438
|
-
- `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:
|
|
439
|
-
```diff
|
|
440
|
-
-SentTransaction(nonsense, realStuff)
|
|
441
|
-
+SentTransaction(realStuff)
|
|
442
|
-
-new SentTransaction(nonsense, realStuff)
|
|
443
|
-
+new SentTransaction(realStuff)
|
|
444
|
-
```
|
|
445
|
-
- `SorobanRpc` import, previously deprecated, has been removed. You can import `rpc` instead:
|
|
446
|
-
```diff
|
|
447
|
-
-import { SorobanRpc } from '@stellar/stellar-sdk'
|
|
448
|
-
+import { rpc } from '@stellar/stellar-sdk'
|
|
449
|
-
```
|
|
450
|
-
|
|
451
|
-
As an alternative, you can also import from the `rpc` entrypoint:
|
|
452
|
-
|
|
453
|
-
```ts
|
|
454
|
-
import { Server } from '@stellar/stellar-sdk/rpc'
|
|
455
|
-
```
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
### Added
|
|
459
|
-
- `rpc.Server` now has a `pollTransaction` method to retry transaction retrieval ([#1092]https://github.com/stellar/js-stellar-sdk/pull/1092).
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
## [v13.0.0-beta.1](https://github.com/stellar/js-stellar-sdk/compare/v12.3.0...v13.0.0-beta.1)
|
|
463
|
-
|
|
464
|
-
### Breaking Changes
|
|
465
|
-
- `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)).
|
|
466
|
-
- 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.
|
|
467
|
-
|
|
468
|
-
### Added
|
|
469
|
-
- You can now build the browser bundle without various dependencies:
|
|
470
|
-
* Set `USE_AXIOS=false` to build without the `axios` dependency: this will build `stellar-sdk-no-axios.js` and `stellar-sdk-no-axios.min.js` in the `dist/` directory, or just run `yarn build:browser:no-axios` to generate these files.
|
|
471
|
-
* You can import Node packages without the `axios` dependency via `@stellar/stellar-sdk/no-axios`. For Node environments that don't support modern imports, use `@stellar/stellar-sdk/lib/no-axios/index`.
|
|
472
|
-
* Set `USE_EVENTSOURCE=false` to build without the `eventsource` dependency: this will build `stellar-sdk-no-eventsource.js` and `stellar-sdk-no-eventsource.min.js` in the `dist/` directory, or just run `yarn build:browser:no-eventsource` to generate these files.
|
|
473
|
-
* You can import Node packages without the `eventsource` dependency via `@stellar/stellar-sdk/no-eventsource`. For Node.js environments that don't support modern imports, use `@stellar/stellar-sdk/lib/no-eventsource/index`.
|
|
474
|
-
* To use a minimal build without both Axios and EventSource, use `stellar-sdk-minimal.js` for the browser build and import from `@stellar/stellar-sdk/minimal` for the Node package.
|
|
475
|
-
- `contract.AssembledTransaction#signAuthEntries` now allows you to override `authorizeEntry`. This can be used to streamline novel workflows using cross-contract auth. (#1044)
|
|
476
|
-
- `rpc.Server` now has a `getSACBalance` helper which lets you fetch the balance of a built-in Stellar Asset Contract token held by a contract ([#1046](https://github.com/stellar/js-stellar-sdk/pull/1046)):
|
|
477
|
-
```typescript
|
|
478
|
-
export interface BalanceResponse {
|
|
479
|
-
latestLedger: number;
|
|
480
|
-
/** present only on success, otherwise request malformed or no balance */
|
|
481
|
-
balanceEntry?: {
|
|
482
|
-
/** a 64-bit integer */
|
|
483
|
-
amount: string;
|
|
484
|
-
authorized: boolean;
|
|
485
|
-
clawback: boolean;
|
|
486
|
-
|
|
487
|
-
lastModifiedLedgerSeq?: number;
|
|
488
|
-
liveUntilLedgerSeq?: number;
|
|
489
|
-
};
|
|
490
|
-
}
|
|
491
|
-
```
|
|
492
|
-
|
|
493
|
-
### Fixed
|
|
494
|
-
- `contract.AssembledTransaction#nonInvokerSigningBy` now correctly returns contract addresses, in instances of cross-contract auth, rather than throwing an error. `sign` will ignore these contract addresses, since auth happens via cross-contract call ([#1044](https://github.com/stellar/js-stellar-sdk/pull/1044)).
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
## [v12.3.0](https://github.com/stellar/js-stellar-sdk/compare/v12.2.0...v12.3.0)
|
|
498
|
-
|
|
499
|
-
### Added
|
|
500
|
-
- `rpc.Server` now has a `getTransactions`, which has the same response schema as `getTransactions` except with bundles of transactions ([#1037](https://github.com/stellar/js-stellar-sdk/pull/1037)).
|
|
501
|
-
- `rpc.Server` now has a `getVersionInfo` method which reports version information of the RPC instance it is connected to ([#1028](https://github.com/stellar/js-stellar-sdk/issues/1028)):
|
|
502
|
-
|
|
503
|
-
```typescript
|
|
504
|
-
export interface GetVersionInfoResponse {
|
|
505
|
-
version: string;
|
|
506
|
-
commit_hash: string;
|
|
507
|
-
build_time_stamp: string;
|
|
508
|
-
captive_core_version: string;
|
|
509
|
-
protocol_version: number;
|
|
510
|
-
}
|
|
511
|
-
```
|
|
512
|
-
|
|
513
|
-
### Fixed
|
|
514
|
-
- Lower authorization entry's default signature expiration to ~8min for security reasons ([#1023](https://github.com/stellar/js-stellar-sdk/pull/1023)).
|
|
515
|
-
- Remove `statusText` error check to broaden compatibility ([#1001](https://github.com/stellar/js-stellar-sdk/pull/1001)).
|
|
516
|
-
- Upgraded `stellar-base` which includes various fixes ([release notes](https://github.com/stellar/js-stellar-base/releases/tag/v12.1.1), [#1045](https://github.com/stellar/js-stellar-sdk/pull/1045)).
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
## [v12.2.0](https://github.com/stellar/js-stellar-sdk/compare/v12.1.0...v12.2.0)
|
|
520
|
-
|
|
521
|
-
### Fixed
|
|
522
|
-
- `@stellar/stellar-base` and its underlying dependency `@stellar/js-xdr` have been upgraded to their latest versions; reference their release notes ([v12.1.0](https://github.com/stellar/js-stellar-base/releases/tag/v12.1.0) and [v3.1.2](https://github.com/stellar/js-xdr/releases/tag/v3.1.2), respectively) for details ([#1013](https://github.com/stellar/js-stellar-sdk/pull/1013)).
|
|
523
|
-
|
|
524
|
-
### Added
|
|
525
|
-
- You can now pass custom headers to both `rpc.Server` and `Horizon.Server` ([#1013](https://github.com/stellar/js-stellar-sdk/pull/1013)):
|
|
526
|
-
```typescript
|
|
527
|
-
import { Server } from "@stellar/stellar-sdk/rpc";
|
|
528
|
-
|
|
529
|
-
const s = new Server("<some URL>", { headers: { "X-Custom-Header": "hello" }})
|
|
530
|
-
```
|
|
531
|
-
- `Horizon.Server` now supports the new `POST /transactions_async` endpoint via the `submitAsyncTransaction` method ([#989](https://github.com/stellar/js-stellar-sdk/pull/989)). Its purpose is to provide an immediate response to the submission rather than waiting for Horizon to determine its status. The response schema is as follows:
|
|
532
|
-
```typescript
|
|
533
|
-
interface SubmitAsyncTransactionResponse {
|
|
534
|
-
// the submitted transaction hash
|
|
535
|
-
hash: string;
|
|
536
|
-
// one of "PENDING", "DUPLICATE", "TRY_AGAIN_LATER", or "ERROR"
|
|
537
|
-
tx_status: string;
|
|
538
|
-
// a base64-encoded xdr.TransactionResult iff `tx_status` is "ERROR"
|
|
539
|
-
error_result_xdr: string;
|
|
540
|
-
}
|
|
541
|
-
```
|
|
542
|
-
- `rpc.Server` now has a `getFeeStats` method which retrieves fee statistics for a previous chunk of ledgers to provide users with a way to provide informed decisions about getting their transactions included in the following ledgers ([#998](https://github.com/stellar/js-stellar-sdk/issues/998)):
|
|
543
|
-
```typescript
|
|
544
|
-
export interface GetFeeStatsResponse {
|
|
545
|
-
sorobanInclusionFee: FeeDistribution;
|
|
546
|
-
inclusionFee: FeeDistribution;
|
|
547
|
-
latestLedger: number; // uint32
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
interface FeeDistribution {
|
|
551
|
-
max: string; // uint64
|
|
552
|
-
min: string; // uint64
|
|
553
|
-
mode: string; // uint64
|
|
554
|
-
p10: string; // uint64
|
|
555
|
-
p20: string; // uint64
|
|
556
|
-
p30: string; // uint64
|
|
557
|
-
p40: string; // uint64
|
|
558
|
-
p50: string; // uint64
|
|
559
|
-
p60: string; // uint64
|
|
560
|
-
p70: string; // uint64
|
|
561
|
-
p80: string; // uint64
|
|
562
|
-
p90: string; // uint64
|
|
563
|
-
p95: string; // uint64
|
|
564
|
-
p99: string; // uint64
|
|
565
|
-
transactionCount: string; // uint32
|
|
566
|
-
ledgerCount: number; // uint32
|
|
567
|
-
}
|
|
568
|
-
```
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
## [v12.1.0](https://github.com/stellar/js-stellar-sdk/compare/v12.0.1...v12.1.0)
|
|
572
|
-
|
|
573
|
-
### Added
|
|
574
|
-
- `contract` now exports the `DEFAULT_TIMEOUT` ([#984](https://github.com/stellar/js-stellar-sdk/pull/984)).
|
|
575
|
-
- `contract.AssembledTransaction` now has:
|
|
576
|
-
- `toXDR` and `fromXDR` methods for serializing the transaction to and from XDR. These methods should be used in place of `AssembledTransaction.toJSON` and `AssembledTransaction.fromJSON`for multi-auth signing. The JSON methods are now deprecated. **Note:** you must now call `simulate` on the transaction before the final `signAndSend` call after all required signatures are gathered when using the XDR methods ([#977](https://github.com/stellar/js-stellar-sdk/pull/977)).
|
|
577
|
-
- a `restoreFootprint` method which accepts the `restorePreamble` returned when a simulation call fails due to some contract state that has expired. When invoking a contract function, one can now set `restore` to `true` in the `MethodOptions`. When enabled, a `restoreFootprint` transaction will be created and await signing when required ([#991](https://github.com/stellar/js-stellar-sdk/pull/991)).
|
|
578
|
-
- separate `sign` and `send` methods so that you can sign a transaction without sending it (`signAndSend` still works as before; [#922](https://github.com/stellar/js-stellar-sdk/pull/992)).
|
|
579
|
-
- `contract.Client` now has a `txFromXDR` method which should be used in place of `txFromJSON` for multi-auth signing ([#977](https://github.com/stellar/js-stellar-sdk/pull/977)).
|
|
580
|
-
|
|
581
|
-
### Deprecated
|
|
582
|
-
- In `contract.AssembledTransaction`, `toJSON` and `fromJSON` should be replaced with `toXDR` and `fromXDR`.
|
|
583
|
-
- In `contract.Client`, `txFromJSON` should be replaced with `txFromXDR`.
|
|
584
|
-
|
|
585
|
-
### Fixed
|
|
586
|
-
- If you edit an `AssembledTransaction` with `tx.raw = cloneFrom(tx.build)`, the `tx.simulationData` will now be updated correctly ([#985](https://github.com/stellar/js-stellar-sdk/pull/985)).
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
## [v12.0.1](https://github.com/stellar/js-stellar-sdk/compare/v11.3.0...v12.0.1)
|
|
590
|
-
|
|
591
|
-
- This is a re-tag of `v12.0.0-rc.3` with dependency updates and a single new feature.
|
|
592
|
-
|
|
593
|
-
### Added
|
|
594
|
-
- `rpc.server.simulateTransaction` now supports an optional `stateChanges?: LedgerEntryChange[]` field ([#963](https://github.com/stellar/js-stellar-sdk/pull/963)):
|
|
595
|
-
* 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:
|
|
596
|
-
|
|
597
|
-
```typescript
|
|
598
|
-
interface LedgerEntryChange {
|
|
599
|
-
type: number;
|
|
600
|
-
key: xdr.LedgerKey;
|
|
601
|
-
before: xdr.LedgerEntry | null;
|
|
602
|
-
after: xdr.LedgerEntry | null;
|
|
603
|
-
}
|
|
604
|
-
```
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
## [v12.0.0-rc.3](https://github.com/stellar/js-stellar-sdk/compare/v11.3.0...v12.0.0-rc.3)
|
|
608
|
-
|
|
609
|
-
### Breaking Changes
|
|
610
|
-
|
|
611
|
-
- `ContractClient` functionality previously added in [v11.3.0](https://github.com/stellar/js-stellar-sdk/releases/tag/v11.3.0) was exported in a non-standard way. You can now import it as any other `stellar-sdk` module ([#962](https://github.com/stellar/js-stellar-sdk/pull/962)):
|
|
612
|
-
|
|
613
|
-
```diff
|
|
614
|
-
-import { ContractClient } from '@stellar/stellar-sdk/lib/contract_client'
|
|
615
|
-
+import { contract } from '@stellar/stellar-sdk'
|
|
616
|
-
+const { Client } = contract
|
|
617
|
-
```
|
|
618
|
-
|
|
619
|
-
Note that this top-level `contract` export is a container for ContractClient and related functionality. The `ContractClient` class is now available at `contract.Client`, as shown. Further note that there is a capitalized `Contract` export as well, which comes [from stellar-base](https://github.com/stellar/js-stellar-base/blob/b96281b9b3f94af23a913f93bdb62477f5434ccc/src/contract.js#L6-L19). You can remember which is which because capital-C `Contract` is a class, whereas lowercase-c `contract` is a container/module with a bunch of classes, functions, and types.
|
|
620
|
-
|
|
621
|
-
Additionally, this is available from the `/contract` entrypoint, if your version of Node [and TypeScript](https://stackoverflow.com/a/70020984/249801) support [the `exports` declaration](https://nodejs.org/api/packages.html#exports). Finally, some of its exports have been renamed:
|
|
622
|
-
|
|
623
|
-
```diff
|
|
624
|
-
import {
|
|
625
|
-
- ContractClient,
|
|
626
|
-
+ Client,
|
|
627
|
-
AssembledTransaction,
|
|
628
|
-
- ContractClientOptions,
|
|
629
|
-
+ ClientOptions,
|
|
630
|
-
SentTransaction,
|
|
631
|
-
-} from '@stellar/stellar-sdk/lib/contract_client'
|
|
632
|
-
+} from '@stellar/stellar-sdk/contract'
|
|
633
|
-
```
|
|
634
|
-
|
|
635
|
-
- The `ContractSpec` class is now nested under the `contract` module, and has been **renamed** to `Spec` ([#962](https://github.com/stellar/js-stellar-sdk/pull/962)). Alternatively, you can import this from the `contract` entrypoint, if your version of Node [and TypeScript](https://stackoverflow.com/a/70020984/249801) support [the `exports` declaration](https://nodejs.org/api/packages.html#exports):
|
|
636
|
-
|
|
637
|
-
```diff
|
|
638
|
-
-import { ContractSpec } from '@stellar/stellar-sdk'
|
|
639
|
-
+import { contract } from '@stellar/stellar-sdk'
|
|
640
|
-
+const { Spec } = contract
|
|
641
|
-
// OR
|
|
642
|
-
+import { Spec } from '@stellar/stellar-sdk/contract'
|
|
643
|
-
```
|
|
644
|
-
|
|
645
|
-
- 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)).
|
|
646
|
-
|
|
647
|
-
### Deprecated
|
|
648
|
-
|
|
649
|
-
- `SorobanRpc` module is now also exported as `rpc` ([#962](https://github.com/stellar/js-stellar-sdk/pull/962)). You can import it with either name for now, but `SorobanRpc` will be removed in a future release:
|
|
650
|
-
|
|
651
|
-
```diff
|
|
652
|
-
-import { SorobanRpc } from '@stellar/stellar-sdk'
|
|
653
|
-
+import { rpc } from '@stellar/stellar-sdk'
|
|
654
|
-
```
|
|
655
|
-
|
|
656
|
-
You can also now import it at the `/rpc` entrypoint, if your version of Node [and TypeScript](https://stackoverflow.com/a/70020984/249801) support [the `exports` declaration](https://nodejs.org/api/packages.html#exports).
|
|
657
|
-
|
|
658
|
-
```diff
|
|
659
|
-
-import { SorobanRpc } from '@stellar/stellar-sdk'
|
|
660
|
-
-const { Api } = SorobanRpc
|
|
661
|
-
+import { Api } from '@stellar/stellar-sdk/rpc'
|
|
662
|
-
```
|
|
663
|
-
|
|
664
|
-
### Added
|
|
665
|
-
* New methods on `contract.Client` ([#960](https://github.com/stellar/js-stellar-sdk/pull/960)):
|
|
666
|
-
- `from(opts: ContractClientOptions)` instantiates `contract.Client` by fetching the `contractId`'s WASM from the network to fill out the client's `ContractSpec`.
|
|
667
|
-
- `fromWasm` and `fromWasmHash` methods to instantiate a `contract.Client` when you already have the WASM bytes or hash alongside the `contract.ClientOptions`.
|
|
668
|
-
* New methods on `rpc.Server` ([#960](https://github.com/stellar/js-stellar-sdk/pull/960)):
|
|
669
|
-
- `getContractWasmByContractId` and `getContractWasmByHash` to retrieve a contract's WASM bytecode via its `contractId` or `wasmHash`, respectively.
|
|
670
|
-
|
|
671
|
-
### Fixed
|
|
672
|
-
* The breaking changes above (strictly speaking, they are not breaking changes because importing from the inner guts of the SDK is not supported) enable the `contract` module to be used in non-Node environments.
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
## [v12.0.0-rc.2](https://github.com/stellar/js-stellar-sdk/compare/v11.3.0...v12.0.0-rc.2)
|
|
676
|
-
|
|
677
|
-
**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)).
|
|
678
|
-
|
|
679
|
-
### Breaking Changes
|
|
680
|
-
* The **default timeout for transaction calls is now set to 300 seconds (5 minutes)** from the previous default of 10 seconds. 10 seconds is often not enough time to review transactions before signing, especially in Freighter or using a hardware wallet like a Ledger, which would cause a `txTooLate` error response from the server. Five minutes is also the value used by the CLI, so this brings the two into alignment ([#956](https://github.com/stellar/js-stellar-sdk/pull/956)).
|
|
681
|
-
|
|
682
|
-
### Fixed
|
|
683
|
-
* Dependencies have been properly updated to pull in Protocol 21 XDR ([#959](https://github.com/stellar/js-stellar-sdk/pull/959)).
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
## [v12.0.0-rc.1](https://github.com/stellar/js-stellar-sdk/compare/v11.3.0...v12.0.0-rc.1)
|
|
687
|
-
|
|
688
|
-
### Breaking Changes
|
|
689
|
-
* **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)).
|
|
690
|
-
|
|
691
|
-
### Fixed
|
|
692
|
-
* 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)).
|
|
693
|
-
* `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)).
|
|
694
|
-
* `ContractClient` now allows `publicKey` to be undefined ([#941](https://github.com/stellar/js-stellar-sdk/pull/941)).
|
|
695
|
-
* `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)).
|
|
696
|
-
* `SentTransaction` will now modify the time bounds of the transaction to be `timeoutInSeconds` seconds after the transaction has been simulated. Previously this was set when the transaction is built, before the simulation. This makes the time bounds line up with the timeout retry logic in `SentTransaction`.
|
|
697
|
-
|
|
698
|
-
## [v11.3.0](https://github.com/stellar/js-stellar-sdk/compare/v11.2.2...v11.3.0)
|
|
699
|
-
|
|
700
|
-
### Added
|
|
701
|
-
* Introduces an entire suite of helpers to assist with interacting with smart contracts ([#929](https://github.com/stellar/js-stellar-sdk/pull/929)):
|
|
702
|
-
- `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.
|
|
703
|
-
- `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.
|
|
704
|
-
- `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)
|
|
705
|
-
|
|
706
|
-
### Fixed
|
|
707
|
-
* 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)).
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
### Fixed
|
|
711
|
-
* `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)).
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
## [v11.2.2](https://github.com/stellar/js-stellar-sdk/compare/v11.2.1...v11.2.2)
|
|
715
|
-
|
|
716
|
-
### Fixed
|
|
717
|
-
* Event streaming tests now pass on Node 20, which seems to have tighter conformance to the spec ([#917](https://github.com/stellar/js-stellar-sdk/pull/917)).
|
|
718
|
-
* `@stellar/stellar-base` has been upgraded to its latest major version ([#918](https://github.com/stellar/js-stellar-sdk/pull/918), see [v11.0.0](https://github.com/stellar/js-stellar-base/releases/tag/v11.0.0) for release notes).
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
## [v11.2.1](https://github.com/stellar/js-stellar-sdk/compare/v11.2.0...v11.2.1)
|
|
722
|
-
|
|
723
|
-
### Fixed
|
|
724
|
-
* An unnecessary dependency has been removed which was causing a TypeScript error in certain environments ([#912](https://github.com/stellar/js-stellar-sdk/pull/912)).
|
|
725
|
-
* Dependencies have been upgraded (see [`stellar-base@v10.0.2`](https://github.com/stellar/js-stellar-base/releases/tag/v10.0.2) for release notes, [#913](https://github.com/stellar/js-stellar-sdk/pull/913)).
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
## [v11.2.0](https://github.com/stellar/js-stellar-sdk/compare/v11.1.0...v11.2.0)
|
|
729
|
-
|
|
730
|
-
### Added
|
|
731
|
-
* Support for the new, optional `diagnosticEventsXdr` field on the `SorobanRpc.Server.sendTransaction` method. The raw field will be present when using the `_sendTransaction` method, while the normal method will have an already-parsed `diagnosticEvents: xdr.DiagnosticEvent[]` field, instead ([#905](https://github.com/stellar/js-stellar-sdk/pull/905)).
|
|
732
|
-
* A new exported interface `SorobanRpc.Api.EventResponse` so that developers can type-check individual events ([#904](https://github.com/stellar/js-stellar-sdk/pull/904)).
|
|
733
|
-
|
|
734
|
-
### Updated
|
|
735
|
-
* Dependencies have been updated to their latest versions ([#906](https://github.com/stellar/js-stellar-sdk/pull/906), [#908](https://github.com/stellar/js-stellar-sdk/pull/908)).
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
## [v11.1.0](https://github.com/stellar/js-stellar-sdk/compare/v11.0.1...v11.1.0)
|
|
739
|
-
|
|
740
|
-
### Added
|
|
741
|
-
* `SorobanRpc.Server.simulateTransaction` now supports an optional `addlResources` parameter to allow users to specify additional resources that they want to include in a simulation ([#896](https://github.com/stellar/js-stellar-sdk/pull/896)).
|
|
742
|
-
* `ContractSpec` now has a `jsonSchema()` method to generate a [JSON Schema](https://json-schema.org/) for a particular contract specification ([#889](https://github.com/stellar/js-stellar-sdk/pull/889)).
|
|
743
|
-
|
|
744
|
-
### Fixed
|
|
745
|
-
* All dependencies have been updated to their latest versions, including `stellar-base` to [v10.0.1](https://github.com/stellar/js-stellar-base/releases/tag/v10.0.1) which included a small patch ([#897](https://github.com/stellar/js-stellar-sdk/pull/897)).
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
## [v11.0.1](https://github.com/stellar/js-stellar-sdk/compare/v10.2.1...v11.0.0)
|
|
749
|
-
|
|
750
|
-
### Fixed
|
|
751
|
-
* `SorobanRpc.Server.getEvents` uses the correct type for the start ledger.
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
## [v11.0.0](https://github.com/stellar/js-stellar-sdk/compare/v10.2.1...v11.0.0)
|
|
755
|
-
|
|
756
|
-
### Breaking Changes
|
|
757
|
-
|
|
758
|
-
* The package has been renamed to `@stellar/stellar-sdk`.
|
|
759
|
-
* The new minimum supported version is Node 18.
|
|
760
|
-
* The `PaymentCallBuilder` was incorrectly indicating that it would return a collection of `Payment` records, while [in reality](https://developers.stellar.org/api/horizon/resources/list-all-payments) it can return a handful of "payment-like" records ([#885](https://github.com/stellar/js-stellar-sdk/pull/885)).
|
|
761
|
-
|
|
762
|
-
### Fixed
|
|
763
|
-
* The `SorobanRpc.Server.getEvents` method now correctly parses responses without a `contractId` field set. The `events[i].contractId` field on an event is now optional, omitted if there was no ID for the event (e.g. system events; ([#883](https://github.com/stellar/js-stellar-sdk/pull/883))).
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
## [v11.0.0-beta.6](https://github.com/stellar/js-stellar-sdk/compare/v11.0.0-beta.5...v11.0.0-beta.6)
|
|
767
|
-
|
|
768
|
-
### Fixed
|
|
769
|
-
* The `stellar-base` library has been upgraded to `beta.4` which contains a bugfix for large sequence numbers ([#877](https://github.com/stellar/js-stellar-sdk/pull/877)).
|
|
770
|
-
* The `SorobanRpc.Server.getTransaction()` method will now return the full response when encountering a `FAILED` transaction result ([#872](https://github.com/stellar/js-stellar-sdk/pull/872)).
|
|
771
|
-
* The `SorobanRpc.Server.getEvents()` method will correctly parse the event value (which is an `xdr.ScVal` rather than an `xdr.DiagnosticEvent`, see the modified `SorobanRpc.Api.EventResponse.value`; [#876](https://github.com/stellar/js-stellar-sdk/pull/876)).
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
## [v11.0.0-beta.5](https://github.com/stellar/js-stellar-sdk/compare/v11.0.0-beta.4...v11.0.0-beta.5)
|
|
775
|
-
|
|
776
|
-
### Breaking Changes
|
|
777
|
-
* The `soroban-client` library ([stellar/js-soroban-client](https://github.com/stellar/js-soroban-client)) has been merged into this package, causing significant breaking changes in the module structure ([#860](https://github.com/stellar/js-stellar-sdk/pull/860)):
|
|
778
|
-
- The namespaces have changed to move each server-dependent component into its own module. Shared components (e.g. `TransactionBuilder`) are still in the top level, Horizon-specific interactions are in the `Horizon` namespace (i.e. `Server` is now `Horizon.Server`), and new Soroban RPC interactions are in the `SorobanRpc` namespace.
|
|
779
|
-
- There is a [detailed migration guide](https://gist.github.com/Shaptic/5ce4f16d9cce7118f391fbde398c2f30) available to outline both the literal (i.e. necessary code changes) and philosophical (i.e. how to find certain functionality) changes needed to adapt to this merge.
|
|
780
|
-
* The `SorobanRpc.Server.prepareTransaction` and `SorobanRpc.assembleTransaction` methods no longer need an optional `networkPassphrase` parameter, because it is implicitly part of the transaction already ([#870](https://github.com/stellar/js-stellar-sdk/pull/870)).
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
## [v11.0.0-beta.4](https://github.com/stellar/js-stellar-sdk/compare/v11.0.0-beta.3...v11.0.0-beta.4)
|
|
784
|
-
|
|
785
|
-
### Fixed
|
|
786
|
-
- The `stellar-base` dependency has been pinned to a specific version to avoid incorrect semver resolution ([#867](https://github.com/stellar/js-stellar-sdk/pull/867)).
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
## [v11.0.0-beta.3](https://github.com/stellar/js-stellar-sdk/compare/v11.0.0-beta.2...v11.0.0-beta.3)
|
|
790
|
-
|
|
791
|
-
### Fixed
|
|
792
|
-
- Fix a webpack error preventing correct exports of the SDK for browsers ([#862](https://github.com/stellar/js-stellar-sdk/pull/862)).
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
## [v11.0.0-beta.2](https://github.com/stellar/js-stellar-sdk/compare/v11.0.0-beta.1...v11.0.0-beta.2)
|
|
796
|
-
|
|
797
|
-
### Breaking Changes
|
|
798
|
-
- Certain effects have been renamed to align better with the "tense" that other structures have ([#844](https://github.com/stellar/js-stellar-sdk/pull/844)):
|
|
799
|
-
* `DepositLiquidityEffect` -> `LiquidityPoolDeposited`
|
|
800
|
-
* `WithdrawLiquidityEffect` -> `LiquidityPoolWithdrew`
|
|
801
|
-
* `LiquidityPoolTradeEffect` -> `LiquidityPoolTrade`
|
|
802
|
-
* `LiquidityPoolCreatedEffect` -> `LiquidityPoolCreated`
|
|
803
|
-
* `LiquidityPoolRevokedEffect` -> `LiquidityPoolRevoked`
|
|
804
|
-
* `LiquidityPoolRemovedEffect` -> `LiquidityPoolRemoved`
|
|
805
|
-
|
|
806
|
-
### Add
|
|
807
|
-
- New effects have been added to support Protocol 20 (Soroban) ([#842](https://github.com/stellar/js-stellar-sdk/pull/842)):
|
|
808
|
-
* `ContractCredited` occurs when a Stellar asset moves **into** its corresponding Stellar Asset Contract instance
|
|
809
|
-
* `ContractDebited` occurs when a Stellar asset moves **out of** its corresponding Stellar Asset Contract instance
|
|
810
|
-
- Asset stat records (`ServerApi.AssetRecord`) contain two new fields to support the Protocol 20 (Soroban) release ([#841](https://github.com/stellar/js-stellar-sdk/pull/841)):
|
|
811
|
-
* `num_contracts` - the integer quantity of contracts that hold this asset
|
|
812
|
-
* `contracts_amount` - the total units of that asset held by contracts
|
|
813
|
-
- New operation responses ([#845](https://github.com/stellar/js-stellar-sdk/pull/845)):
|
|
814
|
-
* `invokeHostFunction`: see `Horizon.InvokeHostFunctionOperationResponse`
|
|
815
|
-
* `bumpFootprintExpiration`: see `Horizon.BumpFootprintExpirationOperationResponse`
|
|
816
|
-
* `restoreFootprint`: see `Horizon.RestoreFootprintOperationResponse`
|
|
817
|
-
* You can refer to the actual definitions for details, but the gist of the schemas is below:
|
|
818
|
-
```ts
|
|
819
|
-
interface InvokeHostFunctionOperationResponse {
|
|
820
|
-
function: string;
|
|
821
|
-
parameters: {
|
|
822
|
-
value: string;
|
|
823
|
-
type: string;
|
|
824
|
-
}[];
|
|
825
|
-
address: string;
|
|
826
|
-
salt: string;
|
|
827
|
-
asset_balance_changes: {
|
|
828
|
-
type: string;
|
|
829
|
-
from: string;
|
|
830
|
-
to: string;
|
|
831
|
-
amount: string;
|
|
832
|
-
}[];
|
|
833
|
-
}
|
|
834
|
-
interface BumpFootprintExpirationOperationResponse {
|
|
835
|
-
ledgersToExpire: string;
|
|
836
|
-
}
|
|
837
|
-
interface RestoreFootprintOperationResponse {};
|
|
838
|
-
```
|
|
839
|
-
|
|
840
|
-
### Fixed
|
|
841
|
-
- Some effect definitions that were missing have been added ([#842](https://github.com/stellar/js-stellar-sdk/pull/842)):
|
|
842
|
-
* `ClaimableBalanceClawedBack` is now defined
|
|
843
|
-
* `type EffectRecord` now has all of the effect types
|
|
844
|
-
- The `stellar-base` library has been upgraded to support the latest Protocol 20 XDR schema and all Soroban functionality ([]()).
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
## [v11.0.0-beta.1](https://github.com/stellar/js-stellar-sdk/compare/v11.0.0-beta.0...v11.0.0-beta.1)
|
|
848
|
-
|
|
849
|
-
### Update
|
|
850
|
-
|
|
851
|
-
- Bundle size has decreased by dropping unnecessary dependencies (`lodash`: [#822](https://github.com/stellar/js-stellar-sdk/pull/822), `es6-promise`: [#823](https://github.com/stellar/js-stellar-sdk/pull/823), polyfills: [#825](https://github.com/stellar/js-stellar-sdk/pull/825), `detect-node`: [#831](https://github.com/stellar/js-stellar-sdk/issues/831)).
|
|
852
|
-
- Dependencies (including `stellar-base`) have been updated to their latest versions ([#825](https://github.com/stellar/js-stellar-sdk/pull/825), [#827](https://github.com/stellar/js-stellar-sdk/pull/827)).
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
## [v11.0.0-beta.0](https://github.com/stellar/js-stellar-sdk/compare/v10.4.1...v11.0.0-beta.0)
|
|
856
|
-
|
|
857
|
-
This version is marked by a major version bump because of the significant upgrades to underlying dependencies. While there should be no noticeable API changes from a downstream perspective, there may be breaking changes in the way that this library is bundled.
|
|
858
|
-
|
|
859
|
-
### Update
|
|
860
|
-
|
|
861
|
-
- Build system has been overhauled to support Webpack 5 ([#814](https://github.com/stellar/js-stellar-sdk/pull/814)).
|
|
862
|
-
- `stellar-base` has been updated to its corresponding overhaul ([#818](https://github.com/stellar/js-stellar-sdk/pull/818)).
|
|
863
|
-
|
|
864
|
-
### Fix
|
|
865
|
-
|
|
866
|
-
- Missing fields have been added to certain API responses ([#801](https://github.com/stellar/js-stellar-sdk/pull/801) and [#797](https://github.com/stellar/js-stellar-sdk/pull/797)).
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
## [v10.4.1](https://github.com/stellar/js-stellar-sdk/compare/v10.4.0...v10.4.1)
|
|
870
|
-
|
|
871
|
-
### Update
|
|
872
|
-
|
|
873
|
-
- Bumps `stellar-base` version to [v8.2.2](https://github.com/stellar/js-stellar-base/releases/tag/v8.2.2) to include latest fix: enabling fast signing in service workers ([#806](https://github.com/stellar/js-stellar-sdk/pull/806)).
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
## [v10.4.0](https://github.com/stellar/js-stellar-sdk/compare/v10.3.0...v10.4.0)
|
|
877
|
-
|
|
878
|
-
### Add
|
|
879
|
-
|
|
880
|
-
- Add [SEP-1](https://stellar.org/protocol/sep-1) fields to `StellarTomlResolver` for type checks ([#794](https://github.com/stellar/js-stellar-sdk/pull/794)).
|
|
881
|
-
- Add support for passing `X-Auth-Token` as a custom header ([#795](https://github.com/stellar/js-stellar-sdk/pull/795)).
|
|
882
|
-
|
|
883
|
-
### Update
|
|
884
|
-
|
|
885
|
-
- Bumps `stellar-base` version to [v8.2.1](https://github.com/stellar/js-stellar-base/releases/tag/v8.2.1) to include latest fixes.
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
## [v10.3.0](https://github.com/stellar/js-stellar-sdk/compare/v10.2.0...v10.3.0)
|
|
889
|
-
|
|
890
|
-
### Fix
|
|
891
|
-
|
|
892
|
-
- Adds `successful` field to transaction submission response ([#790](https://github.com/stellar/js-stellar-sdk/pull/790)).
|
|
893
|
-
|
|
894
|
-
### Update
|
|
895
|
-
|
|
896
|
-
- Bumps `stellar-base` version to [v8.2.0](https://github.com/stellar/js-stellar-base/releases/tag/v8.2.0) to include CAP-40 support in `Operation.setOptions`.
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
## [v10.2.0](https://github.com/stellar/js-stellar-sdk/compare/v10.1.2...v10.2.0)
|
|
900
|
-
|
|
901
|
-
### Fix
|
|
902
|
-
|
|
903
|
-
- Adds the missing `successful` field to transaction responses ([#790](https://github.com/stellar/js-stellar-sdk/pull/790)).
|
|
904
|
-
|
|
905
|
-
### Update
|
|
906
|
-
|
|
907
|
-
- Bumps `stellar-base` version to [v8.1.0](https://github.com/stellar/js-stellar-base/releases/tag/v8.1.0) to include bug fixes and latest XDR changes.
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
## [v10.1.2](https://github.com/stellar/js-stellar-sdk/compare/v10.1.1...v10.1.2)
|
|
911
|
-
|
|
912
|
-
### Fix
|
|
913
|
-
|
|
914
|
-
- Upgrades the `eventsource` dependency to fix a critical security vulnerability ([#783](https://github.com/stellar/js-stellar-sdk/pull/783)).
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
## [v10.1.1](https://github.com/stellar/js-stellar-sdk/compare/v10.1.0...v10.1.1)
|
|
918
|
-
|
|
919
|
-
### Fix
|
|
920
|
-
|
|
921
|
-
- Reverts a change from [v10.1.0](#v10.1.0) which caused streams to die prematurely ([#780](https://github.com/stellar/js-stellar-sdk/pull/780)).
|
|
922
|
-
- Bumps `stellar-base` version to [v8.0.1](https://github.com/stellar/js-stellar-base/releases/tag/v8.0.1) to include latest bugfixes.
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
## [v10.1.0](https://github.com/stellar/js-stellar-sdk/compare/v10.0.1...v10.1.0-beta.0)
|
|
926
|
-
|
|
927
|
-
This is a promotion from the beta version without changes, besides upgrading the underlying [stellar-base@v8.0.0](https://github.com/stellar/js-stellar-base/releases/tag/v8.0.0) to its stable release.
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
## [v10.1.0-beta.0](https://github.com/stellar/js-stellar-sdk/compare/v10.0.1...v10.1.0-beta.0)
|
|
931
|
-
|
|
932
|
-
### Add
|
|
933
|
-
|
|
934
|
-
- Add a way to filter offers by seller: `OfferCallBuilder.seller(string)`, corresponding to `GET /offers?seller=<string>` ([#773](https://github.com/stellar/js-stellar-sdk/pull/773)).
|
|
935
|
-
|
|
936
|
-
### Add
|
|
937
|
-
|
|
938
|
-
- Support for Protocol 19 ([#775](https://github.com/stellar/js-stellar-sdk/pull/775)):
|
|
939
|
-
* new precondition fields on a `TransactionResponse`
|
|
940
|
-
* new account fields on `AccountResponse` and `AccountRecord`
|
|
941
|
-
* bumping `stellar-base` to the latest beta version
|
|
942
|
-
|
|
943
|
-
### Fix
|
|
944
|
-
|
|
945
|
-
- Add missing field to account responses: `last_modified_time` which is the time equivalent of the existing `last_modified_ledger` ([#770](https://github.com/stellar/js-stellar-sdk/pull/770)).
|
|
946
|
-
- Stop opening extra connections when SSE streams receive `event: close` events ([#772](https://github.com/stellar/js-stellar-sdk/pull/772)).
|
|
947
|
-
- Fix SSE streams not loading under React Native (thank you, @hunterpetersen!) ([#761](https://github.com/stellar/js-stellar-sdk/pull/761)).
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
## [v10.0.1](https://github.com/stellar/js-stellar-sdk/compare/v10.0.0...v10.0.1)
|
|
951
|
-
|
|
952
|
-
### Fix
|
|
953
|
-
|
|
954
|
-
- Add missing fields to the `LedgerRecord`: `successful_transaction_count` and `failed_transaction_count` ([#740](https://github.com/stellar/js-stellar-sdk/pull/740)). Note that this also marks several fields as _deprecated_ because they don't actually exist in the Horizon API response:
|
|
955
|
-
* `transaction_count`: superceded by the sum of the aforementioned fields
|
|
956
|
-
* `base_fee`: superceded by the `base_fee_in_stroops` field
|
|
957
|
-
* `base_reserve`: superceded by the `base_reserve_in_stroops` field
|
|
958
|
-
|
|
959
|
-
These deprecated fields will be removed in the next major version. It's unlikely that this breaking change should affect anyone, as these fields have likely been missing/invalid for some time.
|
|
960
|
-
|
|
961
|
-
### Update
|
|
962
|
-
- Update a number of dependencies that needed various security updates:
|
|
963
|
-
* several dependencies bumped their patch version ([#736](https://github.com/stellar/js-stellar-sdk/pull/736), [#684](https://github.com/stellar/js-stellar-sdk/pull/684), [#672](https://github.com/stellar/js-stellar-sdk/pull/672), [#666](https://github.com/stellar/js-stellar-sdk/pull/666), [#644](https://github.com/stellar/js-stellar-sdk/pull/644), [#622](https://github.com/stellar/js-stellar-sdk/pull/622))
|
|
964
|
-
* axios has been bumped to 0.25.0 without causing breaking changes ([#742](https://github.com/stellar/js-stellar-sdk/pull/742))
|
|
965
|
-
* the `karma` suite of packages has been updated to the latest major version ([#743](https://github.com/stellar/js-stellar-sdk/pull/743))
|
|
966
|
-
|
|
967
|
-
All of the dependencies in question besides `axios` were _developer_ dependencies, so there never was downstream security impact nor will there be downstream upgrade impact.
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
## [v10.0.0](https://github.com/stellar/js-stellar-sdk/compare/v9.1.0...v10.0.0)
|
|
971
|
-
|
|
972
|
-
This release introduces breaking changes from `stellar-base`. It adds **unconditional support for muxed accounts**. Please refer to the corresponding [release notes](https://github.com/stellar/js-stellar-base/releases/tag/v7.0.0) for details on the breaking changes there.
|
|
973
|
-
|
|
974
|
-
### Breaking Updates
|
|
975
|
-
|
|
976
|
-
- Upgrades the stellar-base library to v7.0.0 ([#735](https://github.com/stellar/js-stellar-sdk/pull/735)).
|
|
977
|
-
|
|
978
|
-
- Removes the `AccountResponse.createSubaccount` method since this is also gone from the underlying `Account` interface. The `stellar-base` release notes describe alternative construction methods ([#735](https://github.com/stellar/js-stellar-sdk/pull/735)).
|
|
979
|
-
|
|
980
|
-
### Fix
|
|
981
|
-
|
|
982
|
-
- Use the right string for liquidity pool trades ([#734](https://github.com/stellar/js-stellar-sdk/pull/734)).
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
## [v9.1.0](https://github.com/stellar/js-stellar-sdk/compare/v9.0.1...v9.1.0)
|
|
986
|
-
|
|
987
|
-
### Add
|
|
988
|
-
|
|
989
|
-
- Adds a way to filter liquidity pools by participating account: `server.liquidityPools.forAccount(id)` ([#727](https://github.com/stellar/js-stellar-sdk/pull/727)).
|
|
990
|
-
|
|
991
|
-
### Updates
|
|
992
|
-
|
|
993
|
-
- Updates the following SEP-10 utility functions to include [client domain verification](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md#verifying-the-client-domain) functionality ([#720](https://github.com/stellar/js-stellar-sdk/pull/720)):
|
|
994
|
-
- `Utils.buildChallengeTx()` accepts the `clientDomain` and `clientSigningKey` optional parameters
|
|
995
|
-
- `Utils.readChallengeTx()` parses challenge transactions containing a `client_domain` ManageData operation
|
|
996
|
-
- `Utils.verifyChallengeTxSigners()` verifies an additional signature from the `clientSigningKey` keypair if a `client_domain` Manage Data operation is included in the challenge
|
|
997
|
-
|
|
998
|
-
- Bumps `stellar-base` version to [v6.0.6](https://github.com/stellar/js-stellar-base/releases/tag/v6.0.6).
|
|
999
|
-
|
|
1000
|
-
### Fix
|
|
1001
|
-
|
|
1002
|
-
- Fixes the `type_i` enumeration field to accurately reflect liquidity pool effects ([#723](https://github.com/stellar/js-stellar-sdk/pull/723)).
|
|
1003
|
-
|
|
1004
|
-
- Upgrades axios dependency to v0.21.4 to alleviate security concern ([GHSA-cph5-m8f7-6c5x](https://github.com/advisories/GHSA-cph5-m8f7-6c5x), [#724](https://github.com/stellar/js-stellar-sdk/pull/724)).
|
|
1005
|
-
|
|
1006
|
-
- Publish Bower package to [stellar/bower-js-stellar-sdk](https://github.com/stellar/bower-js-stellar-sdk) ([#725](https://github.com/stellar/js-stellar-sdk/pull/725)).
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
## [v9.0.1](https://github.com/stellar/js-stellar-sdk/compare/v9.0.0-beta.1...v9.0.1)
|
|
1010
|
-
|
|
1011
|
-
This stable release adds **support for Protocol 18**. For details, you can refer to [CAP-38](https://stellar.org/protocol/cap-38) for XDR changes and [this document](https://docs.google.com/document/d/1pXL8kr1a2vfYSap9T67R-g72B_WWbaE1YsLMa04OgoU/view) for changes to the Horizon API.
|
|
1012
|
-
|
|
1013
|
-
Refer to the release notes for the betas (e.g. [v9.0.0-beta.0](https://github.com/stellar/js-stellar-sdk/releases/v9.0.0-beta.0)) for a comprehensive list of changes to this library.
|
|
1014
|
-
|
|
1015
|
-
### Fix
|
|
1016
|
-
|
|
1017
|
-
- Corrects the `reserves` field on `LiquidityPoolRecord`s to be an array ([#715](https://github.com/stellar/js-stellar-sdk/pull/715)).
|
|
1018
|
-
- Bumps the `stellar-base` dependency to [v6.0.4](https://github.com/stellar/js-stellar-base/releases/tag/v6.0.4) ([#715](https://github.com/stellar/js-stellar-sdk/pull/715)).
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
## [v9.0.0-beta.1](https://github.com/stellar/js-stellar-sdk/compare/v9.0.0-beta.0...v9.0.0-beta.1)
|
|
1022
|
-
|
|
1023
|
-
### Add
|
|
1024
|
-
|
|
1025
|
-
- Add `/liquidity_pools/:id/trades` endpoint ([#710](https://github.com/stellar/js-stellar-sdk/pull/710))
|
|
1026
|
-
|
|
1027
|
-
### Updates
|
|
1028
|
-
|
|
1029
|
-
- 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))
|
|
1030
|
-
- Updated `utils.buildChallengeTx()` to accept muxed accounts (`M...`) for client account IDs
|
|
1031
|
-
- Updated `utils.buildChallengeTx()` to accept a `memo` parameter to attach to the challenge transaction
|
|
1032
|
-
- Updated `utils.readChallengeTx()` to provide a `memo` property in the returned object
|
|
1033
|
-
- Updated `utils.readChallengeTx()` to validate challenge transactions with muxed accounts (`M...`) as the client account ID
|
|
1034
|
-
|
|
1035
|
-
### Fix
|
|
1036
|
-
|
|
1037
|
-
- Drops the `chai-http` dependency to be only for developers ([#707](https://github.com/stellar/js-stellar-sdk/pull/707)).
|
|
1038
|
-
|
|
1039
|
-
## [v9.0.0-beta.0](https://github.com/stellar/js-stellar-sdk/compare/v8.2.5...v9.0.0-beta.0)
|
|
1040
|
-
|
|
1041
|
-
This beta release adds **support for Automated Market Makers**. For details, you can refer to [CAP-38](https://stellar.org/protocol/cap-38) for XDR changes and [this document](https://docs.google.com/document/d/1pXL8kr1a2vfYSap9T67R-g72B_WWbaE1YsLMa04OgoU/view) for detailed changes to the Horizon API.
|
|
1042
|
-
|
|
1043
|
-
### Add
|
|
1044
|
-
|
|
1045
|
-
- Introduced a `LiquidityPoolCallBuilder` to make calls to a new endpoint:
|
|
1046
|
-
* `/liquidity_pools[?reserves=...]` - a collection of liquidity pools, optionally filtered by one or more assets ([#682](https://github.com/stellar/js-stellar-sdk/pull/682))
|
|
1047
|
-
* `/liquidity_pools/:id` - a specific liquidity pool ([#687](https://github.com/stellar/js-stellar-sdk/pull/687))
|
|
1048
|
-
|
|
1049
|
-
- Expanded the `TransactionCallBuilder`, `OperationCallBuilder`, and `EffectsCallBuilder`s to apply to specific liquidity pools ([#689](https://github.com/stellar/js-stellar-sdk/pull/689)). This corresponds to the following new endpoints:
|
|
1050
|
-
* `/liquidity_pools/:id/transactions`
|
|
1051
|
-
* `/liquidity_pools/:id/operations`
|
|
1052
|
-
* `/liquidity_pools/:id/effects`
|
|
1053
|
-
|
|
1054
|
-
- Expanded the `TradesCallBuilder` to support fetching liquidity pool trades and accepts a new `trade_type` filter ([#685](https://github.com/stellar/js-stellar-sdk/pull/685)):
|
|
1055
|
-
* `/trades?trade_type={orderbook,liquidity_pools,all}`. By default, the filter is `all`, including both liquidity pool and orderbook records.
|
|
1056
|
-
* A liquidity pool trade contains the following fields:
|
|
1057
|
-
- `liquidity_pool_fee_bp`: LP fee expressed in basis points, and *either*
|
|
1058
|
-
- `base_liquidity_pool_id` or `counter_liquidity_pool_id`
|
|
1059
|
-
|
|
1060
|
-
- Added new effects related to liquidity pools ([#690](https://github.com/stellar/js-stellar-sdk/pull/690)):
|
|
1061
|
-
* `DepositLiquidityEffect`
|
|
1062
|
-
* `WithdrawLiquidityEffect`
|
|
1063
|
-
* `LiquidityPoolTradeEffect`
|
|
1064
|
-
* `LiquidityPoolCreatedEffect`
|
|
1065
|
-
* `LiquidityPoolRemovedEffect`
|
|
1066
|
-
* `LiquidityPoolRevokedEffect`
|
|
1067
|
-
|
|
1068
|
-
- Added new responses related to liquidity pool operations ([#692](https://github.com/stellar/js-stellar-sdk/pull/692)):
|
|
1069
|
-
* `DepositLiquidityOperationResponse`
|
|
1070
|
-
* `WithdrawLiquidityOperationResponse`
|
|
1071
|
-
|
|
1072
|
-
### Updates
|
|
1073
|
-
|
|
1074
|
-
- Updated the underlying `stellar-base` library to [v6.0.1](https://github.com/stellar/js-stellar-base/releases/tag/v6.0.1) to include CAP-38 changes ([#681](https://github.com/stellar/js-stellar-sdk/pull/681)).
|
|
1075
|
-
|
|
1076
|
-
- Updated various developer dependencies to secure versions ([#671](https://github.com/stellar/js-stellar-sdk/pull/671)).
|
|
1077
|
-
|
|
1078
|
-
- Updated `AccountResponse` to include liquidity pool shares in its `balances` field ([#688](https://github.com/stellar/js-stellar-sdk/pull/688)).
|
|
1079
|
-
|
|
1080
|
-
- Updated `AccountCallBuilder` to allow filtering based on participation in a certain liquidity pool ([#688](https://github.com/stellar/js-stellar-sdk/pull/688)), corresponding to the following new filter:
|
|
1081
|
-
* `/accounts?reserves=[...list of assets...]`
|
|
1082
|
-
|
|
1083
|
-
- Updated `RevokeSponsorshipOperationResponse` to contain an optional attribute `trustline_liquidity_pool_id`, for when a liquidity pool trustline is revoked ([#690](https://github.com/stellar/js-stellar-sdk/pull/690)).
|
|
1084
|
-
|
|
1085
|
-
### Breaking changes
|
|
1086
|
-
|
|
1087
|
-
- A `TradeRecord` can now correspond to two different types of trades and has changed ([#685](https://github.com/stellar/js-stellar-sdk/pull/685)):
|
|
1088
|
-
* `Orderbook` (the existing structure)
|
|
1089
|
-
- `counter_offer_id` and `base_offer_id` only show up in these records
|
|
1090
|
-
- the redundant `offer_id` field was removed; it matches `base_offer_id`
|
|
1091
|
-
* `LiquidityPool` (new)
|
|
1092
|
-
- `base_account` xor `counter_account` will appear in these records
|
|
1093
|
-
* `price` fields changed from `number`s to `string`s
|
|
1094
|
-
* The links to `base` and `counter` can now point to *either* an account or a liquidity pool
|
|
1095
|
-
|
|
1096
|
-
- An account's `balances` array can now include a new type ([#688](https://github.com/stellar/js-stellar-sdk/pull/688)):
|
|
1097
|
-
* `asset_type` can now be `liquidity_pool_shares`
|
|
1098
|
-
* The following fields are *not* included in pool share balances:
|
|
1099
|
-
- `buying_liabilities`
|
|
1100
|
-
- `selling_liabilities`
|
|
1101
|
-
- `asset_code`
|
|
1102
|
-
- `asset_issue`
|
|
1103
|
-
|
|
1104
|
-
- The `ChangeTrustOperationResponse` has changed ([#688](https://github.com/stellar/js-stellar-sdk/pull/688), [#692](https://github.com/stellar/js-stellar-sdk/pull/692)):
|
|
1105
|
-
* `asset_type` can now be `liquidity_pool_shares`
|
|
1106
|
-
* `asset_code`, `asset_issuer`, and `trustee` are now optional
|
|
1107
|
-
* `liquidity_pool_id` is a new optional field
|
|
1108
|
-
|
|
1109
|
-
- The trustline effects (`TrustlineCreated`, `TrustlineUpdated`, `TrustlineRevoked`) have changed ([#690](https://github.com/stellar/js-stellar-sdk/pull/690)):
|
|
1110
|
-
* the asset type can now be `liquidity_pool_shares`
|
|
1111
|
-
* they can optionally include a `liquidity_pool_id`
|
|
1112
|
-
|
|
1113
|
-
- Trustline sponsorship effects (`TrustlineSponsorshipCreated`, `TrustlineSponsorshipUpdated`, `TrustlineSponsorshipRemoved`) have been updated ([#690](https://github.com/stellar/js-stellar-sdk/pull/690)):
|
|
1114
|
-
* the `asset` field is now optional, and is replaced by
|
|
1115
|
-
* the `liquidity_pool_id` field for liquidity pools
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
## [v8.2.5](https://github.com/stellar/js-stellar-sdk/compare/v8.2.4...v8.2.5)
|
|
1119
|
-
|
|
1120
|
-
### Update
|
|
1121
|
-
- The `js-stellar-base` library has been updated to [v5.3.2](https://github.com/stellar/js-stellar-base/releases/tag/v5.3.2), which fixes a muxed account bug and updates vulnerable dependencies ([#670](https://github.com/stellar/js-stellar-sdk/pull/670)).
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
## [v8.2.4](https://github.com/stellar/js-stellar-sdk/compare/v8.2.3...v8.2.4)
|
|
1125
|
-
|
|
1126
|
-
### Fix
|
|
1127
|
-
- Utils.readTransactionTx now checks timebounds with a 5-minute grace period to account for clock drift.
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
## [v8.2.3](https://github.com/stellar/js-stellar-sdk/compare/v8.2.2...v8.2.3)
|
|
1131
|
-
|
|
1132
|
-
### Fix
|
|
1133
|
-
- Fix server signature verification in `Utils.readChallengeTx`. The function was
|
|
1134
|
-
not verifying the server account had signed the challenge transaction.
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
## [v8.2.2](https://github.com/stellar/js-stellar-sdk/compare/v8.2.1...v8.2.2)
|
|
1138
|
-
|
|
1139
|
-
### Fix
|
|
1140
|
-
- Fixes a breaking bug introduced in v8.2.0 in which `AccountResponse` no longer conformed to the `StellarBase.Account` interface, which was updated in [stellar-base@v5.2.0](https://github.com/stellar/js-stellar-base/releases/tag/v5.2.0) [(#655)](https://github.com/stellar/js-stellar-sdk/pull/655).
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
## [v8.2.1](https://github.com/stellar/js-stellar-sdk/compare/v8.2.0...v8.2.1)
|
|
1144
|
-
|
|
1145
|
-
### Fix
|
|
1146
|
-
- A defunct query paramater (`?c=[...]`) has been removed now that Horizon properly sends Cache-Control headers [(#652)](https://github.com/stellar/js-stellar-sdk/pull/652).
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
## [v8.2.0](https://github.com/stellar/js-stellar-sdk/compare/v8.1.1...v8.2.0)
|
|
1150
|
-
|
|
1151
|
-
### Add
|
|
1152
|
-
- Added support for querying the relevant transactions and operations for a claimable balance [(#628)](https://github.com/stellar/js-stellar-sdk/pull/628):
|
|
1153
|
-
* `TransactionCallBuilder.forClaimableBalance()`: builds a query to `/claimable_balances/:id/transactions/`
|
|
1154
|
-
* `OperationCallBuilder.forClaimableBalance()`: builds a query to `/claimable_balances/:id/operations/`
|
|
1155
|
-
|
|
1156
|
-
- Added support for new stat fields on the `/assets` endpoint [(#628)](https://github.com/stellar/js-stellar-sdk/pull/628):
|
|
1157
|
-
* `accounts` - a breakdown of accounts using this asset by authorization type
|
|
1158
|
-
* `balances` - a breakdown of balances by account authorization type
|
|
1159
|
-
* `num_claimable_balances` - the number of pending claimable balances
|
|
1160
|
-
* `claimable_balances_amount` - the total balance of pending claimable balances
|
|
1161
|
-
|
|
1162
|
-
- Added types for all Effects supported as an enum, and moved `Trade`, `Asset`, `Offer`, and `Account` types to separate files [(#635)](https://github.com/stellar/js-stellar-sdk/pull/635).
|
|
1163
|
-
|
|
1164
|
-
### Update
|
|
1165
|
-
- Upgraded `js-stellar-base` package to version `^5.2.1` from `^5.1.0`, refer to its [release notes](https://github.com/stellar/js-stellar-base/releases/tag/v5.2.0) for more [(#639)](https://github.com/stellar/js-stellar-sdk/pull/639):
|
|
1166
|
-
* opt-in **support for muxed accounts** ([SEP-23](https://stellar.org/protocol/sep-23))
|
|
1167
|
-
* exposing the `AuthClawbackEnabled` flag to Typescript to **complete Protocol 17 support**
|
|
1168
|
-
* fixing a public key parsing regression
|
|
1169
|
-
|
|
1170
|
-
- Exposed more Protocol 17 (CAP-35) operations [(#633)](https://github.com/stellar/js-stellar-sdk/pull/633):
|
|
1171
|
-
* The `/accounts` endpoint now resolves the `flags.auth_clawback_enabled` field.
|
|
1172
|
-
* The operation responses for `clawback`, `clawbackClaimableBalance`, and `setTrustLineFlags` are now defined.
|
|
1173
|
-
* The operation response for `setOptions` has been updated to show `auth_clawback_enabled`.
|
|
1174
|
-
|
|
1175
|
-
## [v8.1.1](https://github.com/stellar/js-stellar-sdk/compare/v8.1.0...v8.1.1)
|
|
1176
|
-
|
|
1177
|
-
### Fix
|
|
1178
|
-
|
|
1179
|
-
- Upgraded `js-stellar-base` package to version `^5.1.0` from `^5.0.0` to expose the Typescript hints for CAP-35 operations [(#629)](https://github.com/stellar/js-stellar-sdk/pull/629).
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
## [v8.1.0](https://github.com/stellar/js-stellar-sdk/compare/v8.0.0...v8.1.0)
|
|
1183
|
-
|
|
1184
|
-
### Update
|
|
1185
|
-
|
|
1186
|
-
- Upgraded `js-stellar-base` package to version `^5.0.0` from `^4.0.3` to support new CAP-35 operations [(#624)](https://github.com/stellar/js-stellar-sdk/pull/624)
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
## [v8.0.0](https://github.com/stellar/js-stellar-sdk/compare/v7.0.0...v8.0.0)
|
|
1190
|
-
|
|
1191
|
-
### Breaking
|
|
1192
|
-
|
|
1193
|
-
- Updates the SEP-10 utility function parameters to support [SEP-10 v3.1](https://github.com/stellar/stellar-protocol/commit/6c8c9cf6685c85509835188a136ffb8cd6b9c11c) [(#607)](https://github.com/stellar/js-stellar-sdk/pull/607)
|
|
1194
|
-
- A new required `webAuthDomain` parameter was added to the following functions
|
|
1195
|
-
- `utils.buildChallengeTx()`
|
|
1196
|
-
- `utils.readChallengeTx()`
|
|
1197
|
-
- `utils.verifyChallengeTxThreshold()`
|
|
1198
|
-
- `utils.verifyChallengeTxSigners()`
|
|
1199
|
-
- The `webAuthDomain` parameter is expected to match the value of the Manage Data operation with the 'web_auth_domain' key, if present
|
|
1200
|
-
|
|
1201
|
-
### Fix
|
|
1202
|
-
|
|
1203
|
-
- Fixes bug where the first Manage Data operation in a challenge transaction could have a null value [(#591)](https://github.com/stellar/js-stellar-sdk/pull/591)
|
|
1204
|
-
|
|
1205
|
-
### Update
|
|
1206
|
-
|
|
1207
|
-
- Upgraded `axios` package to version `^0.21.1` from `^0.19.0` to fix security vulnerabilities [(#608)](https://github.com/stellar/js-stellar-sdk/pull/608)
|
|
1208
|
-
|
|
1209
|
-
- Upgraded `js-stellar-base` package to version `^4.0.3` from `^4.0.0` to allow accounts with a balance of zero [(#616)](https://github.com/stellar/js-stellar-sdk/pull/616)
|
|
1210
|
-
|
|
1211
|
-
## [v7.0.0](https://github.com/stellar/js-stellar-sdk/compare/v6.2.0...v7.0.0)
|
|
1212
|
-
|
|
1213
|
-
This release includes a major-version increase due to breaking changes included.
|
|
1214
|
-
|
|
1215
|
-
### Breaking
|
|
1216
|
-
|
|
1217
|
-
- Updates the SEP-10 utility function parameters and return values to support [SEP-10 v3.0](https://github.com/stellar/stellar-protocol/commit/9d121f98fd2201a5edfe0ed2befe92f4bf88bfe4)
|
|
1218
|
-
- The following functions replaced the `homeDomain` parameter with `homeDomains` (note: plural):
|
|
1219
|
-
- `utils.readChallengeTx()`
|
|
1220
|
-
- `utils.verifyChallengeTxThreshold()`
|
|
1221
|
-
- `utils.verifyChallengeTxSigners()`
|
|
1222
|
-
- `utils.readChallengeTx()` now returns an additional object attribute, `matchedHomeDomain`
|
|
1223
|
-
|
|
1224
|
-
### Update
|
|
1225
|
-
|
|
1226
|
-
- Update challenge transaction helpers for SEP0010 v3.0.0. ([#596](https://github.com/stellar/js-stellar-sdk/pull/596))
|
|
1227
|
-
* Restore `homeDomain` validation in `readChallengeTx()`.
|
|
1228
|
-
|
|
1229
|
-
## [v6.2.0](https://github.com/stellar/js-stellar-sdk/compare/v6.1.0...v6.2.0)
|
|
1230
|
-
|
|
1231
|
-
### Update
|
|
1232
|
-
|
|
1233
|
-
- Update challenge transaction helpers for SEP0010 v2.1.0. ([#581](https://github.com/stellar/js-stellar-sdk/issues/581))
|
|
1234
|
-
* Remove verification of home domain.
|
|
1235
|
-
* Allow additional manage data operations that have the source account set as the server key.
|
|
1236
|
-
|
|
1237
|
-
## [v6.1.0](https://github.com/stellar/js-stellar-sdk/compare/v6.0.0...v6.1.0)
|
|
1238
|
-
|
|
1239
|
-
### Update
|
|
1240
|
-
|
|
1241
|
-
- Update claim predicate fields to match Horizon 1.9.1 ([#575](https://github.com/stellar/js-stellar-sdk/pull/575)).
|
|
1242
|
-
|
|
1243
|
-
## [v6.0.0](https://github.com/stellar/js-stellar-sdk/compare/v5.0.4...v6.0.0)
|
|
1244
|
-
|
|
1245
|
-
### Add
|
|
1246
|
-
|
|
1247
|
-
- Add support for claimable balances ([#572](https://github.com/stellar/js-stellar-sdk/pull/572)).
|
|
1248
|
-
Extend server class to allow loading claimable balances from Horizon. The following functions are available:
|
|
1249
|
-
|
|
1250
|
-
```
|
|
1251
|
-
server.claimableBalances();
|
|
1252
|
-
server.claimableBalances().claimant(claimant);
|
|
1253
|
-
server.claimableBalances().sponsor(sponsorID);
|
|
1254
|
-
server.claimableBalances().asset(asset);
|
|
1255
|
-
server.claimableBalances().claimableBalance(balanceID);
|
|
1256
|
-
```
|
|
1257
|
-
- Add the following attributes to `AccountResponse` ([#572](https://github.com/stellar/js-stellar-sdk/pull/572)):
|
|
1258
|
-
* `sponsor?: string`
|
|
1259
|
-
* `num_sponsoring: number`
|
|
1260
|
-
* `num_sponsored: number`
|
|
1261
|
-
|
|
1262
|
-
- Add the optional attribute `sponsor` to `AccountSigner`, `BalanceLineAsset`, `ClaimableBalanceRecord`, and `OfferRecord` ([#572](https://github.com/stellar/js-stellar-sdk/pull/572)).
|
|
1263
|
-
|
|
1264
|
-
- Add `sponsor` filtering support for `offers` and `accounts` ([#572](https://github.com/stellar/js-stellar-sdk/pull/572)).
|
|
1265
|
-
* `server.offers().sponsor(accountID)`
|
|
1266
|
-
* `server.accounts().sponsor(accountID)`
|
|
1267
|
-
|
|
1268
|
-
- Extend operation responses to support new operations ([#572](https://github.com/stellar/js-stellar-sdk/pull/572)).
|
|
1269
|
-
* `create_claimable_balance` with the following fields:
|
|
1270
|
-
* `asset` - asset available to be claimed (in canonical form),
|
|
1271
|
-
* `amount` - amount available to be claimed,
|
|
1272
|
-
* `claimants` - list of claimants with predicates (see below):
|
|
1273
|
-
* `destination` - destination account ID,
|
|
1274
|
-
* `predicate` - predicate required to claim a balance (see below).
|
|
1275
|
-
* `claim_claimable_balance` with the following fields:
|
|
1276
|
-
* `balance_id` - unique ID of balance to be claimed,
|
|
1277
|
-
* `claimant` - account ID of a claimant.
|
|
1278
|
-
* `begin_sponsoring_future_reserves` with the following fields:
|
|
1279
|
-
* `sponsored_id` - account ID for which future reserves will be sponsored.
|
|
1280
|
-
* `end_sponsoring_future_reserves` with the following fields:
|
|
1281
|
-
* `begin_sponsor` - account sponsoring reserves.
|
|
1282
|
-
* `revoke_sponsorship` with the following fields:
|
|
1283
|
-
* `account_id` - if account sponsorship was revoked,
|
|
1284
|
-
* `claimable_balance_id` - if claimable balance sponsorship was revoked,
|
|
1285
|
-
* `data_account_id` - if account data sponsorship was revoked,
|
|
1286
|
-
* `data_name` - if account data sponsorship was revoked,
|
|
1287
|
-
* `offer_id` - if offer sponsorship was revoked,
|
|
1288
|
-
* `trustline_account_id` - if trustline sponsorship was revoked,
|
|
1289
|
-
* `trustline_asset` - if trustline sponsorship was revoked,
|
|
1290
|
-
* `signer_account_id` - if signer sponsorship was revoked,
|
|
1291
|
-
* `signer_key` - if signer sponsorship was revoked.
|
|
1292
|
-
|
|
1293
|
-
- Extend effect responses to support new effects ([#572](https://github.com/stellar/js-stellar-sdk/pull/572)).
|
|
1294
|
-
* `claimable_balance_created` with the following fields:
|
|
1295
|
-
* `balance_id` - unique ID of claimable balance,
|
|
1296
|
-
* `asset` - asset available to be claimed (in canonical form),
|
|
1297
|
-
* `amount` - amount available to be claimed.
|
|
1298
|
-
* `claimable_balance_claimant_created` with the following fields:
|
|
1299
|
-
* `balance_id` - unique ID of a claimable balance,
|
|
1300
|
-
* `asset` - asset available to be claimed (in canonical form),
|
|
1301
|
-
* `amount` - amount available to be claimed,
|
|
1302
|
-
* `predicate` - predicate required to claim a balance (see below).
|
|
1303
|
-
* `claimable_balance_claimed` with the following fields:
|
|
1304
|
-
* `balance_id` - unique ID of a claimable balance,
|
|
1305
|
-
* `asset` - asset available to be claimed (in canonical form),
|
|
1306
|
-
* `amount` - amount available to be claimed,
|
|
1307
|
-
* `account_sponsorship_created` with the following fields:
|
|
1308
|
-
* `sponsor` - sponsor of an account.
|
|
1309
|
-
* `account_sponsorship_updated` with the following fields:
|
|
1310
|
-
* `new_sponsor` - new sponsor of an account,
|
|
1311
|
-
* `former_sponsor` - former sponsor of an account.
|
|
1312
|
-
* `account_sponsorship_removed` with the following fields:
|
|
1313
|
-
* `former_sponsor` - former sponsor of an account.
|
|
1314
|
-
* `trustline_sponsorship_created` with the following fields:
|
|
1315
|
-
* `sponsor` - sponsor of a trustline.
|
|
1316
|
-
* `trustline_sponsorship_updated` with the following fields:
|
|
1317
|
-
* `new_sponsor` - new sponsor of a trustline,
|
|
1318
|
-
* `former_sponsor` - former sponsor of a trustline.
|
|
1319
|
-
* `trustline_sponsorship_removed` with the following fields:
|
|
1320
|
-
* `former_sponsor` - former sponsor of a trustline.
|
|
1321
|
-
* `claimable_balance_sponsorship_created` with the following fields:
|
|
1322
|
-
* `sponsor` - sponsor of a claimable balance.
|
|
1323
|
-
* `claimable_balance_sponsorship_updated` with the following fields:
|
|
1324
|
-
* `new_sponsor` - new sponsor of a claimable balance,
|
|
1325
|
-
* `former_sponsor` - former sponsor of a claimable balance.
|
|
1326
|
-
* `claimable_balance_sponsorship_removed` with the following fields:
|
|
1327
|
-
* `former_sponsor` - former sponsor of a claimable balance.
|
|
1328
|
-
* `signer_sponsorship_created` with the following fields:
|
|
1329
|
-
* `signer` - signer being sponsored.
|
|
1330
|
-
* `sponsor` - signer sponsor.
|
|
1331
|
-
* `signer_sponsorship_updated` with the following fields:
|
|
1332
|
-
* `signer` - signer being sponsored.
|
|
1333
|
-
* `former_sponsor` - the former sponsor of the signer.
|
|
1334
|
-
* `new_sponsor` - the new sponsor of the signer.
|
|
1335
|
-
* `signer_sponsorship_removed` with the following fields:
|
|
1336
|
-
* `former_sponsor` - former sponsor of a signer.
|
|
1337
|
-
|
|
1338
|
-
### Breaking
|
|
1339
|
-
|
|
1340
|
-
- Update `stellar-base` to `v4.0.0` which introduces a breaking change in the internal XDR library.
|
|
1341
|
-
|
|
1342
|
-
The following functions were renamed:
|
|
1343
|
-
|
|
1344
|
-
- `xdr.OperationBody.setOption()` -> `xdr.OperationBody.setOptions()`
|
|
1345
|
-
- `xdr.OperationBody.manageDatum()` -> `xdr.OperationBody.manageData()`
|
|
1346
|
-
- `xdr.OperationType.setOption()` -> `xdr.OperationType.setOptions()`
|
|
1347
|
-
- `xdr.OperationType.manageDatum()` -> `xdr.OperationType.manageData()`
|
|
1348
|
-
|
|
1349
|
-
The following enum values were renamed in `OperationType`:
|
|
1350
|
-
|
|
1351
|
-
- `setOption` -> `setOptions`
|
|
1352
|
-
- `manageDatum` -> `manageData`
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
## [v5.0.4](https://github.com/stellar/js-stellar-sdk/compare/v5.0.3...v5.0.4)
|
|
1356
|
-
|
|
1357
|
-
### Update
|
|
1358
|
-
- Add `tx_set_operation_count` to `ledger` resource ([#559](https://github.com/stellar/js-stellar-sdk/pull/559)).
|
|
1359
|
-
|
|
1360
|
-
## [v5.0.3](https://github.com/stellar/js-stellar-sdk/compare/v5.0.2...v5.0.3)
|
|
1361
|
-
|
|
1362
|
-
### Fix
|
|
1363
|
-
- Fix regression on `server.offer().forAccount()` which wasn't allowing streaming ([#533](https://github.com/stellar/js-stellar-sdk/pull/553)).
|
|
1364
|
-
|
|
1365
|
-
## [v5.0.2](https://github.com/stellar/js-stellar-sdk/compare/v5.0.1...v5.0.2)
|
|
1366
|
-
|
|
1367
|
-
### Update
|
|
1368
|
-
|
|
1369
|
-
- Allow submitTransaction to receive a FeeBumpTransaction ([#548](https://github.com/stellar/js-stellar-sdk/pull/548)).
|
|
1370
|
-
|
|
1371
|
-
## [v5.0.1](https://github.com/stellar/js-stellar-sdk/compare/v5.0.0...v5.0.1)
|
|
1372
|
-
|
|
1373
|
-
### Update
|
|
1374
|
-
|
|
1375
|
-
- Skip SEP0029 (memo required check) for multiplexed accounts ([#538](https://github.com/stellar/js-stellar-sdk/pull/538)).
|
|
1376
|
-
|
|
1377
|
-
### Fix
|
|
1378
|
-
- Fix missing documentation for `stellar-base` ([#544](https://github.com/stellar/js-stellar-sdk/pull/544)).
|
|
1379
|
-
- Move dom-monkeypatch to root types and publish to npm ([#543](https://github.com/stellar/js-stellar-sdk/pull/543)).
|
|
1380
|
-
|
|
1381
|
-
## [v5.0.0](https://github.com/stellar/js-stellar-sdk/compare/v4.1.0...v5.0.0)
|
|
1382
|
-
|
|
1383
|
-
### Add
|
|
1384
|
-
- Add fee bump related attributes to `TransactionResponse` ([#532](https://github.com/stellar/js-stellar-sdk/pull/532)):
|
|
1385
|
-
- `fee_account: string`.
|
|
1386
|
-
- `fee_bump_transaction: FeeBumpTransactionResponse`:
|
|
1387
|
-
```js
|
|
1388
|
-
interface FeeBumpTransactionResponse {
|
|
1389
|
-
hash: string;
|
|
1390
|
-
signatures: string[];
|
|
1391
|
-
}
|
|
1392
|
-
```
|
|
1393
|
-
- `inner_transaction: InnerTransactionResponse`:
|
|
1394
|
-
```js
|
|
1395
|
-
interface InnerTransactionResponse {
|
|
1396
|
-
hash: string;
|
|
1397
|
-
signatures: string[];
|
|
1398
|
-
max_fee: string;
|
|
1399
|
-
}
|
|
1400
|
-
```
|
|
1401
|
-
- Add `memo_bytes: string` to `TransactionResponse` ([#532](https://github.com/stellar/js-stellar-sdk/pull/532)).
|
|
1402
|
-
- Add `authorize_to_maintain_liabilities: boolean` to `AllowTrustOperation` ([#532](https://github.com/stellar/js-stellar-sdk/pull/532)).
|
|
1403
|
-
- Add `is_authorized_to_maintain_liabilities: boolean` to `BalanceLineNative` ([#532](https://github.com/stellar/js-stellar-sdk/pull/532)).
|
|
1404
|
-
- Add new result codes to `TransactionFailedResultCodes` ([#531](https://github.com/stellar/js-stellar-sdk/pull/531)).
|
|
1405
|
-
```js
|
|
1406
|
-
TX_FEE_BUMP_INNER_SUCCESS = "tx_fee_bump_inner_success",
|
|
1407
|
-
TX_FEE_BUMP_INNER_FAILED = "tx_fee_bump_inner_failed",
|
|
1408
|
-
TX_NOT_SUPPORTED = "tx_not_supported",
|
|
1409
|
-
TX_SUCCESS = "tx_success",
|
|
1410
|
-
TX_TOO_EARLY = "tx_too_early",
|
|
1411
|
-
TX_TOO_LATE = "tx_too_late",
|
|
1412
|
-
TX_MISSING_OPERATION = "tx_missing_operation",
|
|
1413
|
-
TX_INSUFFICIENT_BALANCE = "tx_insufficient_balance",
|
|
1414
|
-
TX_NO_SOURCE_ACCOUNT = "tx_no_source_account",
|
|
1415
|
-
TX_INSUFFICIENT_FEE = "tx_insufficient_fee",
|
|
1416
|
-
TX_INTERNAL_ERROR = "tx_internal_error",
|
|
1417
|
-
```
|
|
1418
|
-
|
|
1419
|
-
### Breaking changes
|
|
1420
|
-
- The attributes `max_fee` and `fee_charged` in `TransactionResponse` can be now a `number` or a `string`.
|
|
1421
|
-
Update your code to handle both types since Horizon will start sending `string` in version `1.3.0` ([#528](https://github.com/stellar/js-stellar-sdk/pull/528)).
|
|
1422
|
-
- Bump `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](https://github.com/stellar/js-stellar-base/releases/tag/v3.0.0) release ([#524](https://github.com/stellar/js-stellar-sdk/pull/524)).
|
|
1423
|
-
- Make `networkPassphrase` a required argument in `Utils.buildChallengeTx` and `Utils.readChallengeTx` ([#524](https://github.com/stellar/js-stellar-sdk/pull/524)).
|
|
1424
|
-
- Remove `Server.paths` ([#525](https://github.com/stellar/js-stellar-sdk/pull/525)).
|
|
1425
|
-
|
|
1426
|
-
## [v5.0.0-alpha.2](https://github.com/stellar/js-stellar-sdk/compare/v5.0.0-alpha.1..v5.0.0-alpha.2)
|
|
1427
|
-
|
|
1428
|
-
### Update
|
|
1429
|
-
- Update `stellar-base` to `v3.0.0-alpha-1`.
|
|
1430
|
-
|
|
1431
|
-
## [v5.0.0-alpha.1](https://github.com/stellar/js-stellar-sdk/compare/v4.1.0...v5.0.0-alpha.1)
|
|
1432
|
-
|
|
1433
|
-
### Breaking changes
|
|
1434
|
-
- Bump `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](https://github.com/stellar/js-stellar-base/releases/tag/v3.0.0-alpha.0) release ([#524](https://github.com/stellar/js-stellar-sdk/pull/524)).
|
|
1435
|
-
- Make `networkPassphrase` a required argument in `Utils.buildChallengeTx` and `Utils.readChallengeTx` ([#524](https://github.com/stellar/js-stellar-sdk/pull/524)).
|
|
1436
|
-
- Remove `Server.paths` ([#525](https://github.com/stellar/js-stellar-sdk/pull/525)).
|
|
1437
|
-
|
|
1438
|
-
## [v4.1.0](https://github.com/stellar/js-stellar-sdk/compare/v4.0.2...v4.1.0)
|
|
1439
|
-
|
|
1440
|
-
### Add
|
|
1441
|
-
- Add SEP0029 (memo required) support. ([#516](https://github.com/stellar/js-stellar-sdk/issues/516))
|
|
1442
|
-
|
|
1443
|
-
Extends `server.submitTransaction` to always run a memo required check before
|
|
1444
|
-
sending the transaction. If any of the destinations require a memo and the
|
|
1445
|
-
transaction doesn't include one, then an `AccountRequiresMemoError` will be thrown.
|
|
1446
|
-
|
|
1447
|
-
You can skip this check by passing `{skipMemoRequiredCheck: true}` to `server.submitTransaction`:
|
|
1448
|
-
|
|
1449
|
-
```
|
|
1450
|
-
server.submitTransaction(tx, {skipMemoRequiredCheck: true})
|
|
1451
|
-
```
|
|
1452
|
-
|
|
1453
|
-
The check runs for each operation of type:
|
|
1454
|
-
- `payment`
|
|
1455
|
-
- `pathPaymentStrictReceive`
|
|
1456
|
-
- `pathPaymentStrictSend`
|
|
1457
|
-
- `mergeAccount`
|
|
1458
|
-
|
|
1459
|
-
If the transaction includes a memo, then memo required checking is skipped.
|
|
1460
|
-
|
|
1461
|
-
See [SEP0029](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0029.md) for more information about memo required check.
|
|
1462
|
-
|
|
1463
|
-
## [v4.0.2](https://github.com/stellar/js-stellar-sdk/compare/v4.0.1...v4.0.2)
|
|
1464
|
-
|
|
1465
|
-
### Fix
|
|
1466
|
-
- Fix URI TypeScript reference. ([#509](https://github.com/stellar/js-stellar-sdk/issues/509))
|
|
1467
|
-
- Fix docs build. ([#503](https://github.com/stellar/js-stellar-sdk/issues/503))
|
|
1468
|
-
- Fix documentation for method to filter offers by account. ([#507](https://github.com/stellar/js-stellar-sdk/issues/507))
|
|
1469
|
-
- Fix types and add missing attribute to `account_response`. ([#504](https://github.com/stellar/js-stellar-sdk/issues/504))
|
|
1470
|
-
|
|
1471
|
-
## [v4.0.1](https://github.com/stellar/js-stellar-sdk/compare/v4.0.0...v4.0.1)
|
|
1472
|
-
|
|
1473
|
-
### Add
|
|
1474
|
-
- Add `.offer` method to `OfferCallBuilder` which allows fetching a single offer by ID. ([#499](https://github.com/stellar/js-stellar-sdk/issues/499))
|
|
1475
|
-
|
|
1476
|
-
### Fix
|
|
1477
|
-
- Fix broken link to Stellar logo+wordmark. ([#496](https://github.com/stellar/js-stellar-sdk/issues/496))
|
|
1478
|
-
- Fix `_link` omition for AccountResponse class. ([#495](https://github.com/stellar/js-stellar-sdk/issues/495))
|
|
1479
|
-
|
|
1480
|
-
### Update
|
|
1481
|
-
- Update challenge transaction helpers for SEP0010. ([#497](https://github.com/stellar/js-stellar-sdk/issues/497))
|
|
1482
|
-
|
|
1483
|
-
## [v4.0.0](https://github.com/stellar/js-stellar-sdk/compare/v3.3.0...v4.0.0)
|
|
1484
|
-
|
|
1485
|
-
### Added
|
|
1486
|
-
- Add support for top-level offers endpoint with `seller`, `selling`, and `buying` filter. ([#485](https://github.com/stellar/js-stellar-sdk/issues/485))
|
|
1487
|
-
Horizon 1.0 includes a new `/offers` end-point, which allows you to list all offers, supporting filtering by `seller`, `selling`, or `buying` asset.
|
|
1488
|
-
|
|
1489
|
-
You can fetch data from this endpoint by doing `server.offers()` and use any of the following filters:
|
|
1490
|
-
|
|
1491
|
-
- `seller`: `server.offers().forAccount(accountId)`
|
|
1492
|
-
- `buying`: `server.offers().buying(asset)`
|
|
1493
|
-
- `selling`: `server.offers().selling(asset)`
|
|
1494
|
-
|
|
1495
|
-
This introduced a breaking change since it modified the signature for the function `server.offers()`.
|
|
1496
|
-
|
|
1497
|
-
Before, if you wanted to list all the offers for a given account, you'd do:
|
|
1498
|
-
|
|
1499
|
-
```
|
|
1500
|
-
server.offers('accounts', accountID)
|
|
1501
|
-
```
|
|
1502
|
-
|
|
1503
|
-
Starting on this version you'll need to do:
|
|
1504
|
-
|
|
1505
|
-
```
|
|
1506
|
-
server.offers().forAccount(accountId)
|
|
1507
|
-
```
|
|
1508
|
-
|
|
1509
|
-
You can do now things that were not possible before, like finding
|
|
1510
|
-
all offers for an account filtering by the selling or buying asset
|
|
1511
|
-
|
|
1512
|
-
```
|
|
1513
|
-
server.offers().forAccount(accountId).selling(assetA).buying(assetB)
|
|
1514
|
-
```
|
|
1515
|
-
|
|
1516
|
-
- Add support for filtering accounts by `signer` or `asset` ([#474](https://github.com/stellar/js-stellar-sdk/issues/474))
|
|
1517
|
-
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.
|
|
1518
|
-
|
|
1519
|
-
You can fetch data from this endpoint by doing `server.accounts()` and use any of the following filters:
|
|
1520
|
-
|
|
1521
|
-
- `accountID`: `server.accounts().accountId(accountId)`, returns a single account.
|
|
1522
|
-
- `forSigner`: `server.accounts().forSigner(accountId)`, returns accounts where `accountId` is a signer.
|
|
1523
|
-
- `forAsset`: `server.accounts().forAsset(asset)`, returns accounts which hold the `asset`.
|
|
1524
|
-
|
|
1525
|
-
- Add TypeScript typings for new fields in `fee_stats`. ([#462](https://github.com/stellar/js-stellar-sdk/issues/462))
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
### Changed
|
|
1529
|
-
- Changed TypeScript typing for multiple operations "type", it will match the new value on Horizon. ([#477](https://github.com/stellar/js-stellar-sdk/issues/477))
|
|
1530
|
-
|
|
1531
|
-
### Fixed
|
|
1532
|
-
- Fix fetchTimebounds() ([#487](https://github.com/stellar/js-stellar-sdk/issues/487))
|
|
1533
|
-
- Clone the passed URI in CallBuilder constructor, to not mutate the outside ref ([#473](https://github.com/stellar/js-stellar-sdk/issues/473))
|
|
1534
|
-
- Use axios CancelToken to ensure timeout ([#482](https://github.com/stellar/js-stellar-sdk/issues/482))
|
|
1535
|
-
|
|
1536
|
-
### Breaking
|
|
1537
|
-
- Remove `fee_paid` field from transaction response. ([#476](https://github.com/stellar/js-stellar-sdk/issues/476))
|
|
1538
|
-
- Remove all `*_accepted_fee` from FeeStatsResponse. ([#463](https://github.com/stellar/js-stellar-sdk/issues/463))
|
|
1539
|
-
- Change function signature for `server.offers`. ([#485](https://github.com/stellar/js-stellar-sdk/issues/485))
|
|
1540
|
-
The signature for the function `server.offers()` was changed to bring suppport for other filters.
|
|
1541
|
-
|
|
1542
|
-
Before, if you wanted to list all the offers for a given account, you'd do:
|
|
1543
|
-
|
|
1544
|
-
```
|
|
1545
|
-
server.offers('accounts', accountID)
|
|
1546
|
-
```
|
|
1547
|
-
|
|
1548
|
-
Starting on this version you'll need to do:
|
|
1549
|
-
|
|
1550
|
-
```
|
|
1551
|
-
server.offers().accountId(accountId)
|
|
1552
|
-
```
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
## [v3.3.0](https://github.com/stellar/js-stellar-sdk/compare/v3.2.0...v3.3.0)
|
|
1556
|
-
|
|
1557
|
-
### Deprecated ⚠️
|
|
1558
|
-
|
|
1559
|
-
- Horizon 0.25.0 will change the data type for multiple attributes from `Int64` to
|
|
1560
|
-
`string`. When the JSON payload includes an `Int64`, there are
|
|
1561
|
-
scenarios where large number data can be incorrectly parsed, since JavaScript doesn't support
|
|
1562
|
-
`Int64` values. You can read more about it in [#1363](https://github.com/stellar/go/issues/1363).
|
|
1563
|
-
|
|
1564
|
-
This release extends the data types for the following attributes to be of type `string` or `number`:
|
|
1565
|
-
|
|
1566
|
-
- `EffectRecord#offer_id`
|
|
1567
|
-
- `EffectRecord#new_seq`
|
|
1568
|
-
- `OfferRecord#id`
|
|
1569
|
-
- `TradeAggregationRecord#timestamp`
|
|
1570
|
-
- `TradeAggregationRecord#trade_count`
|
|
1571
|
-
- `ManageOfferOperationResponse#offer_id`
|
|
1572
|
-
- `PassiveOfferOperationResponse#offer_id`
|
|
1573
|
-
|
|
1574
|
-
We recommend you update your code to handle both `string` or `number` in
|
|
1575
|
-
the fields listed above, so that once Horizon 0.25.0 is released, your application
|
|
1576
|
-
will be able to handle the new type without breaking.
|
|
1577
|
-
|
|
1578
|
-
## [v3.2.0](https://github.com/stellar/js-stellar-sdk/compare/v3.1.2...v3.2.0)
|
|
1579
|
-
|
|
1580
|
-
### Add ➕
|
|
1581
|
-
|
|
1582
|
-
- Add `fee_charged` an `max_fee` to `TransactionResponse` interface. ([455](https://github.com/stellar/js-stellar-sdk/pull/455))
|
|
1583
|
-
|
|
1584
|
-
### Deprecated ⚠️
|
|
1585
|
-
|
|
1586
|
-
- Horizon 0.25 will stop sending the property `fee_paid` in the transaction response. Use `fee_charged` and `max_fee`, read more about it in [450](https://github.com/stellar/js-stellar-sdk/issues/450).
|
|
1587
|
-
|
|
1588
|
-
## [v3.1.2](https://github.com/stellar/js-stellar-sdk/compare/v3.1.1...v3.1.2)
|
|
1589
|
-
|
|
1590
|
-
### Change
|
|
1591
|
-
|
|
1592
|
-
- Upgrade `stellar-base` to `v2.1.2`. ([452](https://github.com/stellar/js-stellar-sdk/pull/452))
|
|
1593
|
-
|
|
1594
|
-
## [v3.1.1](https://github.com/stellar/js-stellar-sdk/compare/v3.1.0...v3.1.1)
|
|
1595
|
-
|
|
1596
|
-
### Change ⚠️
|
|
1597
|
-
|
|
1598
|
-
- Change arguments on [server.strictReceivePaths](https://stellar.github.io/js-stellar-sdk/Server.html#strictReceivePaths) since we included `destinationAccount` as an argument, but it is not longer required by Horizon. ([477](https://github.com/stellar/js-stellar-sdk/pull/447))
|
|
1599
|
-
|
|
1600
|
-
## [v3.1.0](https://github.com/stellar/js-stellar-sdk/compare/v3.0.0...v3.1.0)
|
|
1601
|
-
|
|
1602
|
-
### Add ➕
|
|
1603
|
-
|
|
1604
|
-
- Add `server.strictReceivePaths` which adds support for `/paths/strict-receive`. ([444](https://github.com/stellar/js-stellar-sdk/pull/444))
|
|
1605
|
-
This function takes a list of source assets or a source address, a destination
|
|
1606
|
-
address, a destination asset and a destination amount.
|
|
1607
|
-
|
|
1608
|
-
You can call it passing a list of source assets:
|
|
1609
|
-
|
|
1610
|
-
```
|
|
1611
|
-
server.strictReceivePaths(sourceAssets,destinationAsset, destinationAmount)
|
|
1612
|
-
```
|
|
1613
|
-
|
|
1614
|
-
Or a by passing a Stellar source account address:
|
|
1615
|
-
|
|
1616
|
-
```
|
|
1617
|
-
server.strictReceivePaths(sourceAccount,destinationAsset, destinationAmount)
|
|
1618
|
-
```
|
|
1619
|
-
|
|
1620
|
-
When you call this function with a Stellar account address, it will look at the account’s trustlines and use them to determine all payment paths that can satisfy the desired amount.
|
|
1621
|
-
|
|
1622
|
-
- Add `server.strictSendPaths` which adds support for `/paths/strict-send`. ([444](https://github.com/stellar/js-stellar-sdk/pull/444))
|
|
1623
|
-
This function takes the asset you want to send, and the amount of that asset,
|
|
1624
|
-
along with either a list of destination assets or a destination address.
|
|
1625
|
-
|
|
1626
|
-
You can call it passing a list of destination assets:
|
|
1627
|
-
|
|
1628
|
-
```
|
|
1629
|
-
server.strictSendPaths(sourceAsset, sourceAmount, [destinationAsset]).call()
|
|
1630
|
-
```
|
|
1631
|
-
|
|
1632
|
-
Or a by passing a Stellar account address:
|
|
1633
|
-
|
|
1634
|
-
```
|
|
1635
|
-
server.strictSendPaths(sourceAsset, sourceAmount, "GDRREYWHQWJDICNH4SAH4TT2JRBYRPTDYIMLK4UWBDT3X3ZVVYT6I4UQ").call()
|
|
1636
|
-
```
|
|
1637
|
-
|
|
1638
|
-
When you call this function with a Stellar account address, it will look at the account’s trustlines and use them to determine all payment paths that can satisfy the desired amount.
|
|
1639
|
-
|
|
1640
|
-
### Deprecated ⚠️
|
|
1641
|
-
|
|
1642
|
-
- [Server#paths](https://stellar.github.io/js-stellar-sdk/Server.html#paths) is deprecated in favor of [Server#strictReceivePaths](https://stellar.github.io/js-stellar-sdk/Server.html#strictReceivePaths). ([444](https://github.com/stellar/js-stellar-sdk/pull/444))
|
|
1643
|
-
|
|
1644
|
-
## [v3.0.1](https://github.com/stellar/js-stellar-sdk/compare/v3.0.0...v3.0.1)
|
|
1645
|
-
|
|
1646
|
-
### Add
|
|
1647
|
-
- Add join method to call builder. ([#436](https://github.com/stellar/js-stellar-sdk/issues/436))
|
|
1648
|
-
|
|
1649
|
-
## [v3.0.0](https://github.com/stellar/js-stellar-sdk/compare/v2.3.0...v3.0.0)
|
|
1650
|
-
|
|
1651
|
-
### BREAKING CHANGES ⚠
|
|
1652
|
-
|
|
1653
|
-
- Drop Support for Node 6 since it has been end-of-lifed and no longer in LTS. We now require Node 10 which is the current LTS until April 1st, 2021. ([#424](https://github.com/stellar/js-stellar-sdk/pull/424)
|
|
1654
|
-
|
|
1655
|
-
## [v2.3.0](https://github.com/stellar/js-stellar-sdk/compare/v2.2.3...v2.3.0)
|
|
1656
|
-
|
|
1657
|
-
### Add
|
|
1658
|
-
- Add feeStats support. ([#409](https://github.com/stellar/js-stellar-sdk/issues/409))
|
|
1659
|
-
|
|
1660
|
-
### Fix
|
|
1661
|
-
- Fix Util.verifyChallengeTx documentation ([#405](https://github.com/stellar/js-stellar-sdk/issues/405))
|
|
1662
|
-
- Fix: listen to stream events with addEventListener ([#408](https://github.com/stellar/js-stellar-sdk/issues/408))
|
|
1663
|
-
|
|
1664
|
-
## [v2.2.3](https://github.com/stellar/js-stellar-sdk/compare/v2.2.2...v2.2.3)
|
|
1665
|
-
|
|
1666
|
-
### Fix
|
|
1667
|
-
- Fix ServerApi's OrderbookRecord type ([#401](https://github.com/stellar/js-stellar-sdk/issues/401))
|
|
1668
|
-
|
|
1669
|
-
### Set
|
|
1670
|
-
- Set `name` in custom errors ([#403](https://github.com/stellar/js-stellar-sdk/issues/403))
|
|
1671
|
-
|
|
1672
|
-
## [v2.2.2](https://github.com/stellar/js-stellar-sdk/compare/v2.2.1...v2.2.2)
|
|
1673
|
-
|
|
1674
|
-
### Fix
|
|
1675
|
-
|
|
1676
|
-
- Fix manage data value in SEP0010 challenge builder. ([#396](https://github.com/stellar/js-stellar-sdk/issues/396))
|
|
1677
|
-
|
|
1678
|
-
### Add
|
|
1679
|
-
|
|
1680
|
-
- Add support for networkPassphrase in SEP0010 challenge builder. ([#397](https://github.com/stellar/js-stellar-sdk/issues/397))
|
|
1681
|
-
|
|
1682
|
-
## [v2.2.1](https://github.com/stellar/js-stellar-sdk/compare/v2.2.0...v2.2.1)
|
|
1683
|
-
|
|
1684
|
-
### Fix
|
|
1685
|
-
|
|
1686
|
-
- Fix [#391](https://github.com/stellar/js-stellar-sdk/issues/391): Remove instance check for MessageEvent on stream error. ([#392](https://github.com/stellar/js-stellar-sdk/issues/392))
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
## [v2.2.0](https://github.com/stellar/js-stellar-sdk/compare/v2.1.1...v2.2.0)
|
|
1690
|
-
|
|
1691
|
-
### Add
|
|
1692
|
-
- Add helper `Utils.verifyChallengeTx` to verify SEP0010 "Challenge" Transaction. ([#388](https://github.com/stellar/js-stellar-sdk/issues/388))
|
|
1693
|
-
- Add helper `Utils.verifyTxSignedBy` to verify that a transaction has been signed by a given account. ([#388](https://github.com/stellar/js-stellar-sdk/pull/388/commits/2cbf36891e529f63867d46bcf321b5bb76acef50))
|
|
1694
|
-
|
|
1695
|
-
### Fix
|
|
1696
|
-
- Check for a global EventSource before deciding what to use. This allows you to inject polyfills in other environments like react-native. ([#389](https://github.com/stellar/js-stellar-sdk/issues/389))
|
|
1697
|
-
|
|
1698
|
-
## [v2.1.1](https://github.com/stellar/js-stellar-sdk/compare/v2.1.0...v2.1.1)
|
|
1699
|
-
|
|
1700
|
-
### Fix
|
|
1701
|
-
- Fix CallBuilder onmessage type ([#385](https://github.com/stellar/js-stellar-sdk/issues/385))
|
|
1702
|
-
|
|
1703
|
-
## [v2.1.0](https://github.com/stellar/js-stellar-sdk/compare/v2.0.1...v2.1.0)
|
|
1704
|
-
|
|
1705
|
-
### Add
|
|
1706
|
-
- Add single script to build docs and call it when combined with jsdoc. ([#380](https://github.com/stellar/js-stellar-sdk/issues/380))
|
|
1707
|
-
- Add SEP0010 transaction challenge builder. ([#375](https://github.com/stellar/js-stellar-sdk/issues/375))
|
|
1708
|
-
- Add `home_domain` to ServerApi.AccountRecord ([#376](https://github.com/stellar/js-stellar-sdk/issues/376))
|
|
1709
|
-
|
|
1710
|
-
### Bump
|
|
1711
|
-
- Bump stellar-base to 1.0.3. ([#378](https://github.com/stellar/js-stellar-sdk/issues/378))
|
|
1712
|
-
- Bump @stellar/tslint-config ([#377](https://github.com/stellar/js-stellar-sdk/issues/377))
|
|
1713
|
-
|
|
1714
|
-
### Fix
|
|
1715
|
-
- Fix jsdoc's build in after_deploy ([#373](https://github.com/stellar/js-stellar-sdk/issues/373))
|
|
1716
|
-
- Create new URI instead of passing serverUrl (Fix [#379](https://github.com/stellar/js-stellar-sdk/issues/379)). ([#382](https://github.com/stellar/js-stellar-sdk/issues/382))
|
|
1717
|
-
|
|
1718
|
-
## [v2.0.1](https://github.com/stellar/js-stellar-sdk/compare/v1.0.2...v2.0.1)
|
|
1719
|
-
|
|
1720
|
-
- **Breaking change** Port stellar-sdk to Typescript. Because we use a slightly
|
|
1721
|
-
different build process, there could be some unanticipated bugs. Additionally,
|
|
1722
|
-
some type definitions have changed:
|
|
1723
|
-
- Types that were once in the `Server` namespace but didn't actually deal with
|
|
1724
|
-
the `Server` class have been broken out into a new namespace, `ServerApi`.
|
|
1725
|
-
So, for example, `Server.AccountRecord` -> `ServerApi.AccountRecord`.
|
|
1726
|
-
- `Server.AccountResponse` is out of the `Server` namespace ->
|
|
1727
|
-
`AccountResponse`
|
|
1728
|
-
- `Server.*CallBuilder` is out of the `Server` namespace -> `*CallBuilder`
|
|
1729
|
-
- `HorizonResponseAccount` is now `Horizon.AccountResponse`
|
|
1730
|
-
- Upgrade Webpack to v4.
|
|
1731
|
-
- Add support for providing app name and version to request headers.
|
|
1732
|
-
- (NPM wouldn't accept the 2.0.0 version, so we're publishing to 2.0.1.)
|
|
1733
|
-
|
|
1734
|
-
Many thanks to @Ffloriel and @Akuukis for their help with this release!
|
|
1735
|
-
|
|
1736
|
-
## [v1.0.5](https://github.com/stellar/js-stellar-sdk/compare/v1.0.4...v1.0.5)
|
|
1737
|
-
|
|
1738
|
-
- Make CallCollectionFunction return a CollectionPage.
|
|
1739
|
-
- Update Horizon.AccountSigner[] types.
|
|
1740
|
-
|
|
1741
|
-
## [v1.0.4](https://github.com/stellar/js-stellar-sdk/compare/v1.0.3...v1.0.4)
|
|
1742
|
-
|
|
1743
|
-
- Automatically tag alpha / beta releases as "next" in NPM.
|
|
1744
|
-
|
|
1745
|
-
## [v1.0.3](https://github.com/stellar/js-stellar-sdk/compare/v1.0.2...v1.0.3)
|
|
1746
|
-
|
|
1747
|
-
- Upgrade axios to 0.19.0 to close a security vulnerability.
|
|
1748
|
-
- Some type fixes.
|
|
1749
|
-
|
|
1750
|
-
## [v1.0.2](https://github.com/stellar/js-stellar-sdk/compare/v1.0.1...v1.0.2)
|
|
1751
|
-
|
|
1752
|
-
- Upgrade stellar-base to v1.0.2 to fix a bug with the browser bundle.
|
|
1753
|
-
|
|
1754
|
-
## [v1.0.1](https://github.com/stellar/js-stellar-sdk/compare/v1.0.0...v1.0.1)
|
|
1755
|
-
|
|
1756
|
-
- Upgrade stellar-base to v1.0.1, which makes available again the deprecated
|
|
1757
|
-
operation functions `Operation.manageOffer` and `Operation.createPassiveOffer`
|
|
1758
|
-
(with a warning).
|
|
1759
|
-
- Fix the documentation around timebounds.
|
|
1760
|
-
|
|
1761
|
-
## [v1.0.0](https://github.com/stellar/js-stellar-sdk/compare/v0.15.4...v1.0.0)
|
|
1762
|
-
|
|
1763
|
-
- Upgrade stellar-base to
|
|
1764
|
-
[v1.0.0](https://github.com/stellar/js-stellar-base/releases/tag/v1.0.0),
|
|
1765
|
-
which introduces two breaking changes.
|
|
1766
|
-
- Switch stellar-sdk's versioning to true semver! 🎉
|
|
1767
|
-
|
|
1768
|
-
## [v0.15.4](https://github.com/stellar/js-stellar-sdk/compare/v0.15.3...v0.15.4)
|
|
1769
|
-
|
|
1770
|
-
- Add types for LedgerCallBuilder.ledger.
|
|
1771
|
-
- Add types for Server.operationFeeStats.
|
|
1772
|
-
- Add types for the HorizonAxiosClient export.
|
|
1773
|
-
- Move @types/\* from devDependencies to dependencies.
|
|
1774
|
-
- Pass and use a stream response type to CallBuilders if it's different from the
|
|
1775
|
-
normal call response.
|
|
1776
|
-
- Upgrade stellar-base to a version that includes types, and remove
|
|
1777
|
-
@types/stellar-base as a result.
|
|
1778
|
-
|
|
1779
|
-
## [v0.15.3](https://github.com/stellar/js-stellar-sdk/compare/v0.15.2...v0.15.3)
|
|
1780
|
-
|
|
1781
|
-
- In .travis.yml, try to switch from the encrypted API key to an environment
|
|
1782
|
-
var.
|
|
1783
|
-
|
|
1784
|
-
## [v0.15.2](https://github.com/stellar/js-stellar-sdk/compare/v0.15.1...v0.15.2)
|
|
1785
|
-
|
|
1786
|
-
- Fix Server.transactions and Server.payments definitions to properly return
|
|
1787
|
-
collections
|
|
1788
|
-
- Renew the npm publish key
|
|
1789
|
-
|
|
1790
|
-
## [v0.15.1](https://github.com/stellar/js-stellar-sdk/compare/v0.15.0...v0.15.1)
|
|
1791
|
-
|
|
1792
|
-
- Add Typescript type definitions (imported from DefinitelyTyped).
|
|
1793
|
-
- Make these changes to those definitions:
|
|
1794
|
-
- Add definitions for Server.fetchBaseFee and Server.fetchTimebounds
|
|
1795
|
-
- CallBuilder: No long always returns CollectionPaged results. Interfaces that
|
|
1796
|
-
extend CallBuilder should specify whether their response is a collection or
|
|
1797
|
-
not
|
|
1798
|
-
- CallBuilder: Add inflation_destination and last_modified_ledger property
|
|
1799
|
-
- OfferRecord: Fix the returned properties
|
|
1800
|
-
- TradeRecord: Fix the returned properties
|
|
1801
|
-
- TradesCallBuilder: Add forAccount method
|
|
1802
|
-
- TransactionCallBuilder: Add includeFailed method
|
|
1803
|
-
- Horizon.BalanceLineNative/Asset: Add buying_liabilities /
|
|
1804
|
-
selling_liabilities properties
|
|
1805
|
-
- Fix documentation links.
|
|
1806
|
-
|
|
1807
|
-
## [v0.15.0](https://github.com/stellar/js-stellar-sdk/compare/v0.14.0...v0.15.0)
|
|
1808
|
-
|
|
1809
|
-
- **Breaking change**: `stellar-sdk` no longer ships with an `EventSource`
|
|
1810
|
-
polyfill. If you plan to support IE11 / Edge, please use
|
|
1811
|
-
[`event-source-polyfill`](https://www.npmjs.com/package/event-source-polyfill)
|
|
1812
|
-
to set `window.EventSource`.
|
|
1813
|
-
- Upgrade `stellar-base` to a version that doesn't use the `crypto` library,
|
|
1814
|
-
fixing a bug with Angular 6
|
|
1815
|
-
- Add `Server.prototype.fetchTimebounds`, a helper function that helps you set
|
|
1816
|
-
the `timebounds` property when initting `TransactionBuilder`. It bases the
|
|
1817
|
-
timebounds on server time rather than local time.
|
|
1818
|
-
|
|
1819
|
-
## [v0.14.0](https://github.com/stellar/js-stellar-sdk/compare/v0.13.0...v0.14.0)
|
|
1820
|
-
|
|
1821
|
-
- Updated some out-of-date dependencies
|
|
1822
|
-
- Update documentation to explicitly set fees
|
|
1823
|
-
- Add `Server.prototype.fetchBaseFee`, which devs can use to fetch the current
|
|
1824
|
-
base fee; we plan to add more functions to help suggest fees in future
|
|
1825
|
-
releases
|
|
1826
|
-
- Add `includeFailed` to `OperationCallBuilder` for including failed
|
|
1827
|
-
transactions in calls
|
|
1828
|
-
- Add `operationFeeStats` to `Server` for the new fee stats endpoint
|
|
1829
|
-
- After submitting a transaction with a `manageOffer` operation, return a new
|
|
1830
|
-
property `offerResults`, which explains what happened to the offer. See
|
|
1831
|
-
[`Server.prototype.submitTransaction`](https://stellar.github.io/js-stellar-sdk/Server.html#submitTransaction)
|
|
1832
|
-
for documentation.
|
|
1833
|
-
|
|
1834
|
-
## 0.13.0
|
|
1835
|
-
|
|
1836
|
-
- Update `stellar-base` to `0.11.0`
|
|
1837
|
-
- Added ESLint and Prettier to enforce code style
|
|
1838
|
-
- Upgraded dependencies, including Babel to 6
|
|
1839
|
-
- Bump local node version to 6.14.0
|
|
1840
|
-
|
|
1841
|
-
## 0.12.0
|
|
1842
|
-
|
|
1843
|
-
- Update `stellar-base` to `0.10.0`:
|
|
1844
|
-
- **Breaking change** Added
|
|
1845
|
-
[`TransactionBuilder.setTimeout`](https://stellar.github.io/js-stellar-base/TransactionBuilder.html#setTimeout)
|
|
1846
|
-
method that sets `timebounds.max_time` on a transaction. Because of the
|
|
1847
|
-
distributed nature of the Stellar network it is possible that the status of
|
|
1848
|
-
your transaction will be determined after a long time if the network is
|
|
1849
|
-
highly congested. If you want to be sure to receive the status of the
|
|
1850
|
-
transaction within a given period you should set the TimeBounds with
|
|
1851
|
-
`maxTime` on the transaction (this is what `setTimeout` does internally; if
|
|
1852
|
-
there's `minTime` set but no `maxTime` it will be added). Call to
|
|
1853
|
-
`TransactionBuilder.setTimeout` is required if Transaction does not have
|
|
1854
|
-
`max_time` set. If you don't want to set timeout, use `TimeoutInfinite`. In
|
|
1855
|
-
general you should set `TimeoutInfinite` only in smart contracts. Please
|
|
1856
|
-
check
|
|
1857
|
-
[`TransactionBuilder.setTimeout`](https://stellar.github.io/js-stellar-base/TransactionBuilder.html#setTimeout)
|
|
1858
|
-
docs for more information.
|
|
1859
|
-
- Fixed decoding empty `homeDomain`.
|
|
1860
|
-
- Add `offset` parameter to TradeAggregationCallBuilder to reflect new changes
|
|
1861
|
-
to the endpoint in horizon-0.15.0
|
|
1862
|
-
|
|
1863
|
-
## 0.11.0
|
|
1864
|
-
|
|
1865
|
-
- Update `js-xdr` (by updating `stellar-base`) to support unmarshaling non-utf8
|
|
1866
|
-
strings.
|
|
1867
|
-
- String fields returned by `Operation.fromXDRObject()` are of type `Buffer` now
|
|
1868
|
-
(except `SetOptions.home_domain` and `ManageData.name` - both required to be
|
|
1869
|
-
ASCII by stellar-core).
|
|
1870
|
-
|
|
1871
|
-
## 0.10.3
|
|
1872
|
-
|
|
1873
|
-
- Update `stellar-base` and xdr files.
|
|
1874
|
-
|
|
1875
|
-
## 0.10.2
|
|
1876
|
-
|
|
1877
|
-
- Update `stellar-base` (and `js-xdr`).
|
|
1878
|
-
|
|
1879
|
-
## 0.10.1
|
|
1880
|
-
|
|
1881
|
-
- Update `stellar-base` to `0.8.1`.
|
|
1882
|
-
|
|
1883
|
-
## 0.10.0
|
|
1884
|
-
|
|
1885
|
-
- Update `stellar-base` to `0.8.0` with `bump_sequence` support.
|
|
1886
|
-
|
|
1887
|
-
## 0.9.2
|
|
1888
|
-
|
|
1889
|
-
- Removed `.babelrc` file from the NPM package.
|
|
1890
|
-
|
|
1891
|
-
## 0.9.1
|
|
1892
|
-
|
|
1893
|
-
### Breaking changes
|
|
1894
|
-
|
|
1895
|
-
- `stellar-sdk` is now using native `Promise` instead of `bluebird`. The `catch`
|
|
1896
|
-
function is different. Instead of:
|
|
1897
|
-
|
|
1898
|
-
```js
|
|
1899
|
-
.catch(StellarSdk.NotFoundError, function (err) { /* ... */ })
|
|
1900
|
-
```
|
|
1901
|
-
|
|
1902
|
-
please use the following snippet:
|
|
1903
|
-
|
|
1904
|
-
```js
|
|
1905
|
-
.catch(function (err) {
|
|
1906
|
-
if (err instanceof StellarSdk.NotFoundError) { /* ... */ }
|
|
1907
|
-
})
|
|
1908
|
-
```
|
|
1909
|
-
|
|
1910
|
-
- We no longer support IE 11, Firefox < 42, Chrome < 49.
|
|
1911
|
-
|
|
1912
|
-
### Changes
|
|
1913
|
-
|
|
1914
|
-
- Fixed `_ is undefined` bug.
|
|
1915
|
-
- Browser build is around 130 KB smaller!
|
|
1916
|
-
|
|
1917
|
-
## 0.8.2
|
|
1918
|
-
|
|
1919
|
-
- Added `timeout` option to `StellarTomlResolver` and `FederationServer` calls
|
|
1920
|
-
(https://github.com/stellar/js-stellar-sdk/issues/158).
|
|
1921
|
-
- Fixed adding random value to URLs multiple times
|
|
1922
|
-
(https://github.com/stellar/js-stellar-sdk/issues/169).
|
|
1923
|
-
- Fixed jsdoc for classes that extend `CallBuilder`.
|
|
1924
|
-
- Updated dependencies.
|
|
1925
|
-
- Added `yarn.lock` file to repository.
|
|
1926
|
-
|
|
1927
|
-
## 0.8.1
|
|
1928
|
-
|
|
1929
|
-
- Add an allowed trade aggregation resolution of one minute
|
|
1930
|
-
- Various bug fixes
|
|
1931
|
-
- Improved documentation
|
|
1932
|
-
|
|
1933
|
-
## 0.8.0
|
|
1934
|
-
|
|
1935
|
-
- Modify `/trades` endpoint to reflect changes in horizon.
|
|
1936
|
-
- Add `/trade_aggregations` support.
|
|
1937
|
-
- Add `/assets` support.
|
|
1938
|
-
|
|
1939
|
-
## 0.7.3
|
|
1940
|
-
|
|
1941
|
-
- Upgrade `stellar-base`.
|
|
1942
|
-
|
|
1943
|
-
## 0.7.2
|
|
1944
|
-
|
|
1945
|
-
- Allow hex string in setOptions signers.
|
|
1946
|
-
|
|
1947
|
-
## 0.7.1
|
|
1948
|
-
|
|
1949
|
-
- Upgrade `stellar-base`.
|
|
1950
|
-
|
|
1951
|
-
## 0.7.0
|
|
1952
|
-
|
|
1953
|
-
- Support for new signer types: `sha256Hash`, `preAuthTx`.
|
|
1954
|
-
- `StrKey` helper class with `strkey` encoding related methods.
|
|
1955
|
-
- Removed deprecated methods: `Keypair.isValidPublicKey` (use `StrKey`),
|
|
1956
|
-
`Keypair.isValidSecretKey` (use `StrKey`), `Keypair.fromSeed`, `Keypair.seed`,
|
|
1957
|
-
`Keypair.rawSeed`.
|
|
1958
|
-
- **Breaking changes**:
|
|
1959
|
-
- `Network` must be explicitly selected. Previously testnet was a default
|
|
1960
|
-
network.
|
|
1961
|
-
- `Operation.setOptions()` method `signer` param changed.
|
|
1962
|
-
- `Keypair.fromAccountId()` renamed to `Keypair.fromPublicKey()`.
|
|
1963
|
-
- `Keypair.accountId()` renamed to `Keypair.publicKey()`.
|
|
1964
|
-
- Dropping support for `End-of-Life` node versions.
|
|
1965
|
-
|
|
1966
|
-
## 0.6.2
|
|
1967
|
-
|
|
1968
|
-
- Updated `stellar.toml` location
|
|
1969
|
-
|
|
1970
|
-
## 0.6.1
|
|
1971
|
-
|
|
1972
|
-
- `forUpdate` methods of call builders now accept strings and numbers.
|
|
1973
|
-
- Create a copy of attribute in a response if there is a link with the same name
|
|
1974
|
-
(ex. `transaction.ledger`, `transaction._links.ledger`).
|
|
1975
|
-
|
|
1976
|
-
## 0.6.0
|
|
1977
|
-
|
|
1978
|
-
- **Breaking change** `CallBuilder.stream` now reconnects when no data was
|
|
1979
|
-
received for a long time. This is to prevent permanent disconnects (more in:
|
|
1980
|
-
[#76](https://github.com/stellar/js-stellar-sdk/pull/76)). Also, this method
|
|
1981
|
-
now returns `close` callback instead of `EventSource` object.
|
|
1982
|
-
- **Breaking change** `Server.loadAccount` now returns the `AccountResponse`
|
|
1983
|
-
object.
|
|
1984
|
-
- **Breaking change** Upgraded `stellar-base` to `0.6.0`. `ed25519` package is
|
|
1985
|
-
now an optional dependency. Check `StellarSdk.FastSigning` variable to check
|
|
1986
|
-
if `ed25519` package is available. More in README file.
|
|
1987
|
-
- New `StellarTomlResolver` class that allows getting `stellar.toml` file for a
|
|
1988
|
-
domain.
|
|
1989
|
-
- New `Config` class to set global config values.
|
|
1990
|
-
|
|
1991
|
-
## 0.5.1
|
|
1992
|
-
|
|
1993
|
-
- Fixed XDR decoding issue when using firefox
|
|
1994
|
-
|
|
1995
|
-
## 0.5.0
|
|
1996
|
-
|
|
1997
|
-
- **Breaking change** `Server` and `FederationServer` constructors no longer
|
|
1998
|
-
accept object in `serverUrl` parameter.
|
|
1999
|
-
- **Breaking change** Removed `AccountCallBuilder.address` method. Use
|
|
2000
|
-
`AccountCallBuilder.accountId` instead.
|
|
2001
|
-
- **Breaking change** It's no longer possible to connect to insecure server in
|
|
2002
|
-
`Server` or `FederationServer` unless `allowHttp` flag in `opts` is set.
|
|
2003
|
-
- Updated dependencies.
|
|
2004
|
-
|
|
2005
|
-
## 0.4.3
|
|
2006
|
-
|
|
2007
|
-
- Updated dependency (`stellar-base`).
|
|
2008
|
-
|
|
2009
|
-
## 0.4.2
|
|
2010
|
-
|
|
2011
|
-
- Updated dependencies.
|
|
2012
|
-
- Added tests.
|
|
2013
|
-
- Added `CHANGELOG.md` file.
|
|
2014
|
-
|
|
2015
|
-
## 0.4.1
|
|
2016
|
-
|
|
2017
|
-
- `stellar-base` bump. (c90c68f)
|
|
2018
|
-
|
|
2019
|
-
## 0.4.0
|
|
2020
|
-
|
|
2021
|
-
- **Breaking change** Bumped `stellar-base` to
|
|
2022
|
-
[0.5.0](https://github.com/stellar/js-stellar-base/blob/master/CHANGELOG.md#050).
|
|
2023
|
-
(b810aef)
|