@stellar/stellar-sdk 12.1.0 → 12.2.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/CHANGELOG.md +52 -0
- package/dist/stellar-sdk.js +848 -815
- package/dist/stellar-sdk.min.js +1 -1
- package/lib/browser.d.ts +1 -1
- package/lib/browser.js +4 -4
- package/lib/config.js +5 -2
- package/lib/contract/assembled_transaction.d.ts +25 -27
- package/lib/contract/assembled_transaction.js +6 -6
- package/lib/contract/client.d.ts +0 -1
- package/lib/contract/client.js +2 -2
- package/lib/contract/index.d.ts +0 -1
- package/lib/contract/index.js +1 -18
- package/lib/contract/sent_transaction.d.ts +9 -10
- package/lib/contract/sent_transaction.js +2 -1
- package/lib/contract/spec.d.ts +1 -1
- package/lib/contract/spec.js +921 -956
- package/lib/contract/types.d.ts +5 -0
- package/lib/contract/types.js +4 -1
- package/lib/contract/utils.d.ts +0 -5
- package/lib/contract/utils.js +4 -18
- package/lib/errors.d.ts +4 -4
- package/lib/federation/server.d.ts +1 -1
- package/lib/horizon/account_call_builder.d.ts +2 -3
- package/lib/horizon/account_response.d.ts +1 -1
- package/lib/horizon/assets_call_builder.d.ts +2 -3
- package/lib/horizon/call_builder.d.ts +8 -8
- package/lib/horizon/call_builder.js +2 -6
- package/lib/horizon/claimable_balances_call_builder.d.ts +3 -4
- package/lib/horizon/effect_call_builder.d.ts +2 -3
- package/lib/horizon/friendbot_builder.d.ts +0 -1
- package/lib/horizon/horizon_api.d.ts +5 -1
- package/lib/horizon/horizon_axios_client.js +6 -6
- package/lib/horizon/ledger_call_builder.d.ts +2 -3
- package/lib/horizon/liquidity_pool_call_builder.d.ts +2 -4
- package/lib/horizon/offer_call_builder.d.ts +2 -3
- package/lib/horizon/operation_call_builder.d.ts +3 -4
- package/lib/horizon/orderbook_call_builder.d.ts +0 -1
- package/lib/horizon/path_call_builder.d.ts +1 -2
- package/lib/horizon/payment_call_builder.d.ts +2 -3
- package/lib/horizon/server.d.ts +29 -10
- package/lib/horizon/server.js +98 -55
- package/lib/horizon/strict_receive_path_call_builder.d.ts +1 -2
- package/lib/horizon/strict_send_path_call_builder.d.ts +1 -2
- package/lib/horizon/trade_aggregation_call_builder.d.ts +9 -10
- package/lib/horizon/trade_aggregation_call_builder.js +3 -7
- package/lib/horizon/trades_call_builder.d.ts +2 -3
- package/lib/horizon/transaction_call_builder.d.ts +3 -4
- package/lib/horizon/types/assets.d.ts +1 -1
- package/lib/horizon/types/effects.d.ts +1 -1
- package/lib/horizon/types/offer.d.ts +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/rpc/api.d.ts +29 -5
- package/lib/rpc/browser.d.ts +1 -1
- package/lib/rpc/browser.js +4 -4
- package/lib/rpc/index.d.ts +0 -1
- package/lib/rpc/jsonrpc.js +3 -3
- package/lib/rpc/parsers.d.ts +3 -3
- package/lib/rpc/parsers.js +23 -23
- package/lib/rpc/server.d.ts +13 -7
- package/lib/rpc/server.js +48 -56
- package/lib/rpc/transaction.d.ts +3 -4
- package/lib/rpc/transaction.js +23 -25
- package/lib/webauth/utils.js +3 -3
- package/package.json +17 -17
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,58 @@ A breaking change will get clearly marked in this log.
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
## [v12.2.0](https://github.com/stellar/js-stellar-sdk/compare/v12.1.0...v12.2.0)
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- `@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)).
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- You can now pass custom headers to both `rpc.Server` and `Horizon.Server` ([#1013](https://github.com/stellar/js-stellar-sdk/pull/1013)):
|
|
17
|
+
```typescript
|
|
18
|
+
import { Server } from "@stellar/stellar-sdk/rpc";
|
|
19
|
+
|
|
20
|
+
const s = new Server("<some URL>", { headers: { "X-Custom-Header": "hello" }})
|
|
21
|
+
```
|
|
22
|
+
- `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:
|
|
23
|
+
```typescript
|
|
24
|
+
interface SubmitAsyncTransactionResponse {
|
|
25
|
+
// the submitted transaction hash
|
|
26
|
+
hash: string;
|
|
27
|
+
// one of "PENDING", "DUPLICATE", "TRY_AGAIN_LATER", or "ERROR"
|
|
28
|
+
tx_status: string;
|
|
29
|
+
// a base64-encoded xdr.TransactionResult iff `tx_status` is "ERROR"
|
|
30
|
+
error_result_xdr: string;
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
- `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)):
|
|
34
|
+
```typescript
|
|
35
|
+
export interface GetFeeStatsResponse {
|
|
36
|
+
sorobanInclusionFee: FeeDistribution;
|
|
37
|
+
inclusionFee: FeeDistribution;
|
|
38
|
+
latestLedger: number; // uint32
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface FeeDistribution {
|
|
42
|
+
max: string; // uint64
|
|
43
|
+
min: string; // uint64
|
|
44
|
+
mode: string; // uint64
|
|
45
|
+
p10: string; // uint64
|
|
46
|
+
p20: string; // uint64
|
|
47
|
+
p30: string; // uint64
|
|
48
|
+
p40: string; // uint64
|
|
49
|
+
p50: string; // uint64
|
|
50
|
+
p60: string; // uint64
|
|
51
|
+
p70: string; // uint64
|
|
52
|
+
p80: string; // uint64
|
|
53
|
+
p90: string; // uint64
|
|
54
|
+
p95: string; // uint64
|
|
55
|
+
p99: string; // uint64
|
|
56
|
+
transactionCount: string; // uint32
|
|
57
|
+
ledgerCount: number; // uint32
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
|
|
10
62
|
## [v12.1.0](https://github.com/stellar/js-stellar-sdk/compare/v12.0.1...v12.1.0)
|
|
11
63
|
|
|
12
64
|
### Added
|