@stellar/stellar-base 14.0.1 → 14.0.3

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 CHANGED
@@ -2,78 +2,92 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## [`v14.0.3`](https://github.com/stellar/js-stellar-base/compare/v14.0.2...v14.0.3):
6
+
7
+ ### Fixed
8
+
9
+ - Add conversions for timepoint and duration scval types ([#819](https://github.com/stellar/js-stellar-base/pull/819))
10
+
11
+ ## [`v14.0.2`](https://github.com/stellar/js-stellar-base/compare/v14.0.1...v14.0.2):
12
+
13
+ ### Fixed
14
+
15
+ - Lowered the maximum bid for fee-bumped Soroban transactions by not doubling the resource fee ([#817](https://github.com/stellar/js-stellar-sdk/pull/817)).
5
16
 
6
17
  ## [`v14.0.1`](https://github.com/stellar/js-stellar-base/compare/v14.0.0...v14.0.1):
7
18
 
8
19
  ### Fixed
9
- * Added missing `Asset.toString()` TypeScript definition ([#1218](https://github.com/stellar/js-stellar-sdk/pull/1218)).
10
20
 
21
+ - Added missing `Asset.toString()` TypeScript definition ([#1218](https://github.com/stellar/js-stellar-sdk/pull/1218)).
11
22
 
12
23
  ## [`v14.0.0`](https://github.com/stellar/js-stellar-base/compare/v13.1.0...v14.0.0): Protocol 23
13
24
 
14
25
  ### Breaking Changes
15
- * This package now requires **>= Node 20**.
16
- * XDR definitions have been updated to align with Protocol 23 ([#800](https://github.com/stellar/js-stellar-base/pull/800)).
26
+
27
+ - This package now requires **>= Node 20**.
28
+ - XDR definitions have been updated to align with Protocol 23 ([#800](https://github.com/stellar/js-stellar-base/pull/800)).
17
29
 
18
30
  ### Added
19
- * The `sodium-native` and `tweetnacl` dependencies have been replaced with `@noble/curves` ([#802](https://github.com/stellar/js-stellar-base/pull/802)).
20
- * Support for claimable balances and liquidity pools in `StrKey` ([#799](https://github.com/stellar/js-stellar-base/pull/799)).
21
- * Support for claimable balances, liquidity pools, and muxed accounts in `Address` ([#801](https://github.com/stellar/js-stellar-base/pull/801)).
22
- * Added the ability for `nativeToScVal` to convert arrays with differing types to smart contract values, e.g., `nativeToScVal([1, "x", "y"], { type: [ "i128", "symbol" ]})` will give you a `Vec<i128, symbol, string>` ([#803](https://github.com/stellar/js-stellar-base/pull/803)).
31
+
32
+ - The `sodium-native` and `tweetnacl` dependencies have been replaced with `@noble/curves` ([#802](https://github.com/stellar/js-stellar-base/pull/802)).
33
+ - Support for claimable balances and liquidity pools in `StrKey` ([#799](https://github.com/stellar/js-stellar-base/pull/799)).
34
+ - Support for claimable balances, liquidity pools, and muxed accounts in `Address` ([#801](https://github.com/stellar/js-stellar-base/pull/801)).
35
+ - Added the ability for `nativeToScVal` to convert arrays with differing types to smart contract values, e.g., `nativeToScVal([1, "x", "y"], { type: [ "i128", "symbol" ]})` will give you a `Vec<i128, symbol, string>` ([#803](https://github.com/stellar/js-stellar-base/pull/803)).
23
36
 
24
37
  ### Fixed
25
- * Removed the custom `Buffer.subarray` polyfill introduced in [#733](https://github.com/stellar/js-stellar-base/pull/733) in [v11.0.1](https://github.com/stellar/js-stellar-sdk/releases/tag/v11.0.1) as a workaround for React Native's Hermes engine. Please use [`@exodus/patch-broken-hermes-typed-arrays`](https://github.com/ExodusMovement/patch-broken-hermes-typed-arrays) as an alternative, if needed ([#795](https://github.com/stellar/js-stellar-base/pull/795)).
26
- * Fix browser compatibility with proper module resolution and UMD configuration ([#798](https://github.com/stellar/js-stellar-base/pull/798)).
27
- * Remove `MuxedAccount.parseBaseAddress` from TypeScript definitions ([#797](https://github.com/stellar/js-stellar-base/pull/797)).
28
38
 
39
+ - Removed the custom `Buffer.subarray` polyfill introduced in [#733](https://github.com/stellar/js-stellar-base/pull/733) in [v11.0.1](https://github.com/stellar/js-stellar-sdk/releases/tag/v11.0.1) as a workaround for React Native's Hermes engine. Please use [`@exodus/patch-broken-hermes-typed-arrays`](https://github.com/ExodusMovement/patch-broken-hermes-typed-arrays) as an alternative, if needed ([#795](https://github.com/stellar/js-stellar-base/pull/795)).
40
+ - Fix browser compatibility with proper module resolution and UMD configuration ([#798](https://github.com/stellar/js-stellar-base/pull/798)).
41
+ - Remove `MuxedAccount.parseBaseAddress` from TypeScript definitions ([#797](https://github.com/stellar/js-stellar-base/pull/797)).
29
42
 
30
43
  ## [`v14.0.0-rc.2`](https://github.com/stellar/js-stellar-base/compare/v13.1.0...v14.0.0-rc.2)
31
44
 
32
45
  ### Fixed
33
- * Fixes a bug in `Address.toScAddress()` that would prevent claimable balances and muxed accounts from being encoded correctly.
34
46
 
47
+ - Fixes a bug in `Address.toScAddress()` that would prevent claimable balances and muxed accounts from being encoded correctly.
35
48
 
36
49
  ## [`v14.0.0-rc.1`](https://github.com/stellar/js-stellar-base/compare/v13.1.0...v14.0.0-rc.1): Protocol 23
37
50
 
38
51
  ### Breaking Changes
39
- * This package now requires **>= Node 20**.
40
- * XDR definitions have been updated to align with Protocol 23 ([#800](https://github.com/stellar/js-stellar-base/pull/800)).
52
+
53
+ - This package now requires **>= Node 20**.
54
+ - XDR definitions have been updated to align with Protocol 23 ([#800](https://github.com/stellar/js-stellar-base/pull/800)).
41
55
 
42
56
  ### Added
43
- * The `sodium-native` and `tweetnacl` dependencies have been replaced with `@noble/curves` ([#802](https://github.com/stellar/js-stellar-base/pull/802)).
44
- * Support for claimable balances and liquidity pools in `StrKey` ([#799](https://github.com/stellar/js-stellar-base/pull/799)).
45
- * Support for claimable balances, liquidity pools, and muxed accounts in `Address` ([#801](https://github.com/stellar/js-stellar-base/pull/801)).
46
- * Added the ability for `nativeToScVal` to convert arrays with differing types to smart contract values, e.g., `nativeToScVal([1, "x", "y"], { type: [ "i128", "symbol" ]})` will give you a `Vec<i128, symbol, string>` ([#803](https://github.com/stellar/js-stellar-base/pull/803)).
57
+
58
+ - The `sodium-native` and `tweetnacl` dependencies have been replaced with `@noble/curves` ([#802](https://github.com/stellar/js-stellar-base/pull/802)).
59
+ - Support for claimable balances and liquidity pools in `StrKey` ([#799](https://github.com/stellar/js-stellar-base/pull/799)).
60
+ - Support for claimable balances, liquidity pools, and muxed accounts in `Address` ([#801](https://github.com/stellar/js-stellar-base/pull/801)).
61
+ - Added the ability for `nativeToScVal` to convert arrays with differing types to smart contract values, e.g., `nativeToScVal([1, "x", "y"], { type: [ "i128", "symbol" ]})` will give you a `Vec<i128, symbol, string>` ([#803](https://github.com/stellar/js-stellar-base/pull/803)).
47
62
 
48
63
  ### Fixed
49
- * Removed the custom `Buffer.subarray` polyfill introduced in [#733](https://github.com/stellar/js-stellar-base/pull/733) in [v11.0.1](https://github.com/stellar/js-stellar-sdk/releases/tag/v11.0.1) as a workaround for React Native's Hermes engine. Please use [`@exodus/patch-broken-hermes-typed-arrays`](https://github.com/ExodusMovement/patch-broken-hermes-typed-arrays) as an alternative, if needed ([#795](https://github.com/stellar/js-stellar-base/pull/795)).
50
- * Fix browser compatibility with proper module resolution and UMD configuration ([#798](https://github.com/stellar/js-stellar-base/pull/798)).
51
- * Remove `MuxedAccount.parseBaseAddress` from TypeScript definitions ([#797](https://github.com/stellar/js-stellar-base/pull/797)).
52
64
 
65
+ - Removed the custom `Buffer.subarray` polyfill introduced in [#733](https://github.com/stellar/js-stellar-base/pull/733) in [v11.0.1](https://github.com/stellar/js-stellar-sdk/releases/tag/v11.0.1) as a workaround for React Native's Hermes engine. Please use [`@exodus/patch-broken-hermes-typed-arrays`](https://github.com/ExodusMovement/patch-broken-hermes-typed-arrays) as an alternative, if needed ([#795](https://github.com/stellar/js-stellar-base/pull/795)).
66
+ - Fix browser compatibility with proper module resolution and UMD configuration ([#798](https://github.com/stellar/js-stellar-base/pull/798)).
67
+ - Remove `MuxedAccount.parseBaseAddress` from TypeScript definitions ([#797](https://github.com/stellar/js-stellar-base/pull/797)).
53
68
 
54
69
  ## [`v13.1.0`](https://github.com/stellar/js-stellar-base/compare/v13.0.1...v13.1.0)
55
70
 
56
71
  ### Added
57
- * `nativeToScVal` now supports encoding `Keypair`s as addresses ([#794](https://github.com/stellar/js-stellar-base/pull/794)).
58
- * Within `authorizeEntry`, the `SigningCallback` callback function should now return an object containing both the signature and the identity of the signer. In multi-signature situations, it isn't necessarily the case that the address within the authorization entry is the one that actually signs that entry. Thus, the callback now takes the following form, where the original `Promise<BufferLike>` option is preserved for backwards compatibility and should be considered deprecated ([#783](https://github.com/stellar/js-stellar-base/pull/783)):
72
+
73
+ - `nativeToScVal` now supports encoding `Keypair`s as addresses ([#794](https://github.com/stellar/js-stellar-base/pull/794)).
74
+ - Within `authorizeEntry`, the `SigningCallback` callback function should now return an object containing both the signature and the identity of the signer. In multi-signature situations, it isn't necessarily the case that the address within the authorization entry is the one that actually signs that entry. Thus, the callback now takes the following form, where the original `Promise<BufferLike>` option is preserved for backwards compatibility and should be considered deprecated ([#783](https://github.com/stellar/js-stellar-base/pull/783)):
75
+
59
76
  ```typescript
60
77
  export type SigningCallback = (
61
78
  preimage: xdr.HashIdPreimage
62
- ) => Promise<
63
- BufferLike |
64
- { signature: BufferLike, publicKey: string }
65
- >;
79
+ ) => Promise<BufferLike | { signature: BufferLike; publicKey: string }>;
66
80
  ```
67
81
 
68
82
  ### Fixed
69
- * `scValToNative` will decode addresses more efficiently and reliably ([#794](https://github.com/stellar/js-stellar-base/pull/794)).
70
83
 
84
+ - `scValToNative` will decode addresses more efficiently and reliably ([#794](https://github.com/stellar/js-stellar-base/pull/794)).
71
85
 
72
86
  ## [`v13.0.1`](https://github.com/stellar/js-stellar-base/compare/v13.0.0...v13.0.1)
73
87
 
74
88
  ### Fixed
75
- * `buildInvocationTree` will now successfully walk creation invocations with constructor arguments ([#784](https://github.com/stellar/js-stellar-base/pull/784)).
76
89
 
90
+ - `buildInvocationTree` will now successfully walk creation invocations with constructor arguments ([#784](https://github.com/stellar/js-stellar-base/pull/784)).
77
91
 
78
92
  ## [`v13.0.0`](https://github.com/stellar/js-stellar-base/compare/v12.1.1...v13.0.0)
79
93
 
@@ -81,44 +95,46 @@ export type SigningCallback = (
81
95
 
82
96
  This version is unchanged from [`beta.1`](#v13.0.0-beta.1).
83
97
 
84
-
85
98
  ## [`v13.0.0-beta.1`](https://github.com/stellar/js-stellar-base/compare/v12.1.1...v13.0.0-beta.1)
86
99
 
87
100
  **This is the first release that supports Protocol 22.** While the network has not upgraded yet, you can start integrating the new features into your codebase if you want a head start. Keep in mind that while the binary XDR is backwards-compatible, the naming and layout of structures is not. In other words, this build will continue to work on Protocol 21, but you may have to update code that references XDR directly.
88
101
 
89
102
  ### Breaking Changes
90
- * XDR definitions have been upgraded to Protocol 22 ([#777](https://github.com/stellar/js-stellar-base/pull/777)).
103
+
104
+ - XDR definitions have been upgraded to Protocol 22 ([#777](https://github.com/stellar/js-stellar-base/pull/777)).
91
105
 
92
106
  ### Added
93
- * You can create contracts with constructors a new, optional parameter of `Operation.createCustomContract`, `constructorArgs: xdr.ScVal[]` ([#770](https://github.com/stellar/js-stellar-base/pull/770)).
94
107
 
108
+ - You can create contracts with constructors a new, optional parameter of `Operation.createCustomContract`, `constructorArgs: xdr.ScVal[]` ([#770](https://github.com/stellar/js-stellar-base/pull/770)).
95
109
 
96
110
  ## [`v12.1.1`](https://github.com/stellar/js-stellar-base/compare/v12.1.0...v12.1.1)
97
111
 
98
112
  ### Fixed
99
- * Add missing methods to TypeScript definitions ([#766](https://github.com/stellar/js-stellar-base/pull/766)).
100
- * Fix the TypeScript definition of `walkInvocationTree` to allow void returns on the callback function as intended rather than forcing a `return null` ([#765](https://github.com/stellar/js-stellar-base/pull/765)).
101
- * Fix `authorizeEntry` to use the correct public key when passing `Keypair`s ([#772](https://github.com/stellar/js-stellar-base/pull/772)).
102
- * Upgrade misc. dependencies ([#771](https://github.com/stellar/js-stellar-base/pull/771), [#773](https://github.com/stellar/js-stellar-base/pull/773)).
103
113
 
114
+ - Add missing methods to TypeScript definitions ([#766](https://github.com/stellar/js-stellar-base/pull/766)).
115
+ - Fix the TypeScript definition of `walkInvocationTree` to allow void returns on the callback function as intended rather than forcing a `return null` ([#765](https://github.com/stellar/js-stellar-base/pull/765)).
116
+ - Fix `authorizeEntry` to use the correct public key when passing `Keypair`s ([#772](https://github.com/stellar/js-stellar-base/pull/772)).
117
+ - Upgrade misc. dependencies ([#771](https://github.com/stellar/js-stellar-base/pull/771), [#773](https://github.com/stellar/js-stellar-base/pull/773)).
104
118
 
105
119
  ## [`v12.1.0`](https://github.com/stellar/js-stellar-base/compare/v12.0.1...v12.1.0)
106
120
 
107
121
  ### Added
108
- * `TransactionBuilder` now has `addOperationAt` and `clearOperationAt` methods to allow manipulation of individual operations ([#757](https://github.com/stellar/js-stellar-base/pull/757)).
122
+
123
+ - `TransactionBuilder` now has `addOperationAt` and `clearOperationAt` methods to allow manipulation of individual operations ([#757](https://github.com/stellar/js-stellar-base/pull/757)).
109
124
 
110
125
  ### Fixed
111
- * Improve the efficiency and portability of asset type retrieval ([#758](https://github.com/stellar/js-stellar-base/pull/758)).
112
- * `nativeToScVal` now correctly sorts maps lexicographically based on the keys to match what the Soroban environment expects ([#759](https://github.com/stellar/js-stellar-base/pull/759)).
113
- * `nativeToScVal` now allows all integer types to come from strings ([#763](https://github.com/stellar/js-stellar-base/pull/763)).
114
- * `humanizeEvents` now handles events without a `contractId` set more reliably ([#764](https://github.com/stellar/js-stellar-base/pull/764)).
115
126
 
127
+ - Improve the efficiency and portability of asset type retrieval ([#758](https://github.com/stellar/js-stellar-base/pull/758)).
128
+ - `nativeToScVal` now correctly sorts maps lexicographically based on the keys to match what the Soroban environment expects ([#759](https://github.com/stellar/js-stellar-base/pull/759)).
129
+ - `nativeToScVal` now allows all integer types to come from strings ([#763](https://github.com/stellar/js-stellar-base/pull/763)).
130
+ - `humanizeEvents` now handles events without a `contractId` set more reliably ([#764](https://github.com/stellar/js-stellar-base/pull/764)).
116
131
 
117
132
  ## [`v12.0.1`](https://github.com/stellar/js-stellar-base/compare/v12.0.0...v12.0.1)
118
133
 
119
134
  ### Fixed
120
- * Export TypeScript definition for `StrKey.isValidContract` ([#751](https://github.com/stellar/js-stellar-base/pull/751)).
121
- * `scValToNative` would fail when the values contained error codes because the parsing routine hadn't been updated to the new error schemas. Errors are now converted to the following format ([#753](https://github.com/stellar/js-stellar-base/pull/753)):
135
+
136
+ - Export TypeScript definition for `StrKey.isValidContract` ([#751](https://github.com/stellar/js-stellar-base/pull/751)).
137
+ - `scValToNative` would fail when the values contained error codes because the parsing routine hadn't been updated to the new error schemas. Errors are now converted to the following format ([#753](https://github.com/stellar/js-stellar-base/pull/753)):
122
138
 
123
139
  ```typescript
124
140
  interface Error {
@@ -130,137 +146,145 @@ interface Error {
130
146
 
131
147
  You can refer to the [XDR documentation](https://github.com/stellar/stellar-xdr/blob/70180d5e8d9caee9e8645ed8a38c36a8cf403cd9/Stellar-contract.x#L76-L115) for additional explanations for each error code.
132
148
 
133
-
134
149
  ## [`v12.0.0`](https://github.com/stellar/js-stellar-base/compare/v11.0.1...v12.0.0)
135
150
 
136
151
  This is a re-tag of v12.0.0-rc.1 with only developer dependency updates in-between.
137
152
 
138
-
139
153
  ## [`v12.0.0-rc.1`](https://github.com/stellar/js-stellar-base/compare/v11.0.1...v12.0.0-rc.1)
140
154
 
141
155
  ### Breaking Changes
142
- * The generated XDR has been upgraded to match the upcoming Protocol 21, namely [stellar/stellar-xdr@`1a04392`](https://github.com/stellar/stellar-xdr/commit/1a04392432dacc0092caaeae22a600ea1af3c6a5) ([#738](https://github.com/stellar/js-stellar-base/pull/738)).
156
+
157
+ - The generated XDR has been upgraded to match the upcoming Protocol 21, namely [stellar/stellar-xdr@`1a04392`](https://github.com/stellar/stellar-xdr/commit/1a04392432dacc0092caaeae22a600ea1af3c6a5) ([#738](https://github.com/stellar/js-stellar-base/pull/738)).
143
158
 
144
159
  ### Added
145
- * To facilitate serialization and deserialization for downstream systems, this package now exports `cereal.XdrWriter` and `cereal.XdrReader` which come directly from `@stellar/js-xdr` ([#744](https://github.com/stellar/js-stellar-base/pull/744)).
160
+
161
+ - To facilitate serialization and deserialization for downstream systems, this package now exports `cereal.XdrWriter` and `cereal.XdrReader` which come directly from `@stellar/js-xdr` ([#744](https://github.com/stellar/js-stellar-base/pull/744)).
146
162
 
147
163
  ### Fixed
148
- * Updated various dependencies ([#737](https://github.com/stellar/js-stellar-base/pull/737), [#739](https://github.com/stellar/js-stellar-base/pull/739)).
149
- * `Buffer` and `Uint8Array` compatibility has improved in `StrKey` ([#746](https://github.com/stellar/js-stellar-base/pull/746)).
150
164
 
165
+ - Updated various dependencies ([#737](https://github.com/stellar/js-stellar-base/pull/737), [#739](https://github.com/stellar/js-stellar-base/pull/739)).
166
+ - `Buffer` and `Uint8Array` compatibility has improved in `StrKey` ([#746](https://github.com/stellar/js-stellar-base/pull/746)).
151
167
 
152
168
  ## [`v11.0.1`](https://github.com/stellar/js-stellar-base/compare/v11.0.0...v11.0.1)
153
169
 
154
170
  ### Fixed
155
- * Add compatibility with pre-ES2016 environments (like some React Native JS compilers) by adding a custom `Buffer.subarray` polyfill ([#733](https://github.com/stellar/js-stellar-base/pull/733)).
156
- * Upgrade underlying dependencies, including `@stellar/js-xdr` which should broaden compatibility to pre-ES2016 environments ([#734](https://github.com/stellar/js-stellar-base/pull/734), [#735](https://github.com/stellar/js-stellar-base/pull/735)).
157
171
 
172
+ - Add compatibility with pre-ES2016 environments (like some React Native JS compilers) by adding a custom `Buffer.subarray` polyfill ([#733](https://github.com/stellar/js-stellar-base/pull/733)).
173
+ - Upgrade underlying dependencies, including `@stellar/js-xdr` which should broaden compatibility to pre-ES2016 environments ([#734](https://github.com/stellar/js-stellar-base/pull/734), [#735](https://github.com/stellar/js-stellar-base/pull/735)).
158
174
 
159
175
  ## [`v11.0.0`](https://github.com/stellar/js-stellar-base/compare/v10.0.2...v11.0.0)
160
176
 
161
177
  **Note:** This version is (still) compatible with Protocol 20. Most people should be unaffected by the technically-breaking changes below and can treat this more like a v10.0.3 patch release.
162
178
 
163
179
  ### Breaking Changes
164
- * Starting from **v10.0.0-beta.0**, we set [`BigNumber.DEBUG`](https://mikemcl.github.io/bignumber.js/#debug) in `bignumber.js` to `true` internally, which affects all code using `BigNumber`. This behavior has been fixed and only affects this library: globally, `BigNumber.DEBUG` now remains at its default setting (i.e. disabled). This is technically a breaking behavior change and is released as such ([#729](https://github.com/stellar/js-stellar-base/pull/729)).
180
+
181
+ - Starting from **v10.0.0-beta.0**, we set [`BigNumber.DEBUG`](https://mikemcl.github.io/bignumber.js/#debug) in `bignumber.js` to `true` internally, which affects all code using `BigNumber`. This behavior has been fixed and only affects this library: globally, `BigNumber.DEBUG` now remains at its default setting (i.e. disabled). This is technically a breaking behavior change and is released as such ([#729](https://github.com/stellar/js-stellar-base/pull/729)).
165
182
 
166
183
  ### Fixed
167
- * Dependencies have been updated to their latest compatible versions ([#726](https://github.com/stellar/js-stellar-base/pull/729), [#730](https://github.com/stellar/js-stellar-base/pull/730)).
168
184
 
185
+ - Dependencies have been updated to their latest compatible versions ([#726](https://github.com/stellar/js-stellar-base/pull/729), [#730](https://github.com/stellar/js-stellar-base/pull/730)).
169
186
 
170
187
  ## [`v10.0.2`](https://github.com/stellar/js-stellar-base/compare/v10.0.1...v10.0.2)
171
188
 
172
189
  ### Fixed
173
- * The `contractId` field is correctly omitted from humanized events when it wasn't present in the structure ([#721](https://github.com/stellar/js-stellar-base/pull/721)).
174
- * Misc. outdated or incorrect documentation has been updated ([#723](https://github.com/stellar/js-stellar-base/pull/723), [#720](https://github.com/stellar/js-stellar-base/pull/720)).
175
- * Dependencies have been updated ([#724](https://github.com/stellar/js-stellar-base/pull/724)).
176
190
 
191
+ - The `contractId` field is correctly omitted from humanized events when it wasn't present in the structure ([#721](https://github.com/stellar/js-stellar-base/pull/721)).
192
+ - Misc. outdated or incorrect documentation has been updated ([#723](https://github.com/stellar/js-stellar-base/pull/723), [#720](https://github.com/stellar/js-stellar-base/pull/720)).
193
+ - Dependencies have been updated ([#724](https://github.com/stellar/js-stellar-base/pull/724)).
177
194
 
178
195
  ## [`v10.0.1`](https://github.com/stellar/js-stellar-base/compare/v10.0.0...v10.0.1)
179
196
 
180
197
  ### Fixed
181
- * The TypeScript definition for `Asset.contractId()` now includes a missing parameter (the `networkPassphrase` changes the ID for a contract; [#718](https://github.com/stellar/js-stellar-base/pull/#718)).
182
198
 
199
+ - The TypeScript definition for `Asset.contractId()` now includes a missing parameter (the `networkPassphrase` changes the ID for a contract; [#718](https://github.com/stellar/js-stellar-base/pull/#718)).
183
200
 
184
201
  ## [`v10.0.0`](https://github.com/stellar/js-stellar-base/compare/v9.0.0...v10.0.0): Protocol 20 Stable Release
185
202
 
186
203
  ### Breaking Changes
187
- * The new minimum supported Node version is Node 18.
188
- * XDR has been upgraded to the latest stable version ([stellar-xdr@`6a620d1`](https://github.com/stellar/stellar-xdr/tree/6a620d160aab22609c982d54578ff6a63bfcdc01)). This is mostly renames, but it includes the following relevant breaking changes ([#704](https://github.com/stellar/js-stellar-base/pull/704)):
204
+
205
+ - The new minimum supported Node version is Node 18.
206
+ - XDR has been upgraded to the latest stable version ([stellar-xdr@`6a620d1`](https://github.com/stellar/stellar-xdr/tree/6a620d160aab22609c982d54578ff6a63bfcdc01)). This is mostly renames, but it includes the following relevant breaking changes ([#704](https://github.com/stellar/js-stellar-base/pull/704)):
189
207
  - `Operation.bumpFootprintExpiration` is now `extendFootprintTtl` and its `ledgersToExpire` field is now named `extendTo`, but it serves the same purpose.
190
208
  - In TypeScript, the `Operation.BumpFootprintExpiration` is now `Operation.ExtendFootprintTTL`
191
209
  - `xdr.ContractExecutable.contractExecutableToken` is now `contractExecutableStellarAsset`
192
210
  - `xdr.SorobanTransactionData.refundableFee` is now `resourceFee`
193
211
  - In turn, `SorobanDataBuilder.setRefundableFee` is now `setResourceFee`
194
212
  - This new fee encompasses the entirety of the Soroban-related resource fees. Note that this is distinct from the "network-inclusion" fee that you would set on your transaction (i.e. `TransactionBuilder(..., { fee: ... })`).
195
- - `Contract.getFootprint()` now only returns a single result: the ledger key of the deployed instance for the given ID, because the key for the code entry was incorrect (it should not be the ID but rather the WASM hash, which is not calculatable w/o network access) ([#709](https://github.com/stellar/js-stellar-base/pull/709)).
196
213
 
214
+ * `Contract.getFootprint()` now only returns a single result: the ledger key of the deployed instance for the given ID, because the key for the code entry was incorrect (it should not be the ID but rather the WASM hash, which is not calculatable w/o network access) ([#709](https://github.com/stellar/js-stellar-base/pull/709)).
197
215
 
198
216
  ## [`v10.0.0-beta.4`](https://github.com/stellar/js-stellar-base/compare/v10.0.0-beta.3...v10.0.0-beta.4)
199
217
 
200
218
  ### Fixed
201
- - You can now correctly clone transactions (`TransactionBuilder.cloneFrom`) with large sequence numbers ([#711](https://github.com/stellar/js-stellar-base/pull/711)).
202
219
 
220
+ - You can now correctly clone transactions (`TransactionBuilder.cloneFrom`) with large sequence numbers ([#711](https://github.com/stellar/js-stellar-base/pull/711)).
203
221
 
204
222
  ## [`v10.0.0-beta.3`](https://github.com/stellar/js-stellar-base/compare/v10.0.0-beta.2...v10.0.0-beta.3)
205
223
 
206
224
  ### Fixed
207
- * Fixes a bug where `authorizeEntry` might perform a no-op when it shouldn't ([#701](https://github.com/stellar/js-stellar-base/pull/701)).
208
- * Fixes a TypeScript bug where `Memo.hash` did not accept a `Buffer` ([#698](https://github.com/stellar/js-stellar-base/pull/698)).
209
- * Upgrades a transient dependency for security ([#296](https://github.com/stellar/js-stellar-base/pull/696)).
210
225
 
226
+ - Fixes a bug where `authorizeEntry` might perform a no-op when it shouldn't ([#701](https://github.com/stellar/js-stellar-base/pull/701)).
227
+ - Fixes a TypeScript bug where `Memo.hash` did not accept a `Buffer` ([#698](https://github.com/stellar/js-stellar-base/pull/698)).
228
+ - Upgrades a transient dependency for security ([#296](https://github.com/stellar/js-stellar-base/pull/696)).
211
229
 
212
230
  ## [`v10.0.0-beta.2`](https://github.com/stellar/js-stellar-base/compare/v10.0.0-beta.1...v10.0.0-beta.2)
213
231
 
214
232
  ### Breaking Changes
215
- * The wrappers around multi-party authorization have changed ([#678](https://github.com/stellar/js-stellar-base/pull/678)):
216
- - `authorizeEntry` has been added to help sign auth entries in-place
217
- - the signature for `authorizeInvocation` has changed: it now offers a callback approach by default and requires slightly different parameters
218
- - `buildAuthEntry`, `buildAuthEnvelope`, and `authorizeInvocationCallback` have been removed
233
+
234
+ - The wrappers around multi-party authorization have changed ([#678](https://github.com/stellar/js-stellar-base/pull/678)):
235
+
236
+ * `authorizeEntry` has been added to help sign auth entries in-place
237
+ * the signature for `authorizeInvocation` has changed: it now offers a callback approach by default and requires slightly different parameters
238
+ * `buildAuthEntry`, `buildAuthEnvelope`, and `authorizeInvocationCallback` have been removed
219
239
 
220
240
  ### Fixed
221
- * The TypeScript definitions for XDR schemas now point to the current protocol rather than vNext ([#694](https://github.com/stellar/js-stellar-base/pull/694)).
222
- * Misc. dependencies have been updated to their latest versions ([#694](https://github.com/stellar/js-stellar-base/pull/694)).
223
241
 
242
+ - The TypeScript definitions for XDR schemas now point to the current protocol rather than vNext ([#694](https://github.com/stellar/js-stellar-base/pull/694)).
243
+ - Misc. dependencies have been updated to their latest versions ([#694](https://github.com/stellar/js-stellar-base/pull/694)).
224
244
 
225
245
  ## [`v10.0.0-beta.1`](https://github.com/stellar/js-stellar-base/compare/v10.0.0-beta.0...v10.0.0-beta.1)
226
246
 
227
247
  ### Fixed
228
- * `nativeToScVal` now allows anything to be passed to the `opts.type` specifier. Previously, it was only integer types ([#691](https://github.com/stellar/js-stellar-base/pull/691)).
229
- * `Contract.call()` now produces valid `Operation` XDR ([#692](https://github.com/stellar/js-stellar-base/pull/692)).
230
248
 
249
+ - `nativeToScVal` now allows anything to be passed to the `opts.type` specifier. Previously, it was only integer types ([#691](https://github.com/stellar/js-stellar-base/pull/691)).
250
+ - `Contract.call()` now produces valid `Operation` XDR ([#692](https://github.com/stellar/js-stellar-base/pull/692)).
231
251
 
232
252
  ## [`v10.0.0-beta.0`](https://github.com/stellar/js-stellar-base/compare/v9.0.0...v10.0.0-beta.0): Protocol 20
233
253
 
234
254
  ### Breaking Changes
235
- * **Node 16 is the new minimum version** to use the SDKs.
236
- * The XDR has been massively overhauled to support [Soroban in Protocol 20](https://soroban.stellar.org/docs/category/fundamentals-and-concepts), which means new operations, data structures, and a transaction format as well as new overlay features ([#538](https://github.com/stellar/js-stellar-base/pull/538)).
255
+
256
+ - **Node 16 is the new minimum version** to use the SDKs.
257
+ - The XDR has been massively overhauled to support [Soroban in Protocol 20](https://soroban.stellar.org/docs/category/fundamentals-and-concepts), which means new operations, data structures, and a transaction format as well as new overlay features ([#538](https://github.com/stellar/js-stellar-base/pull/538)).
237
258
 
238
259
  The core data structure of Soroban is a generic type called an `ScVal` (**s**mart **c**ontract **val**ue, which is a union of types that can basically represent anything [numbers, strings, arrays, maps, contract bytecode, etc.]). You can refer to the XDR for details, and you can utilize new APIs to make dealing with these complex values easier:
239
- - `nativeToScVal` helps convert native types to their closest Soroban equivalent
240
- - `scValToNative` helps find the closest native JavaScript type(s) corresponding to a smart contract value
241
- - `scValToBigInt` helps convert numeric `ScVal`s into native `bigint`s
242
- - `ScInt` and `XdrLargeInt` help convert to and from `bigint`s to other types and form sized integer types for smart contract usage
260
+
261
+ - `nativeToScVal` helps convert native types to their closest Soroban equivalent
262
+ - `scValToNative` helps find the closest native JavaScript type(s) corresponding to a smart contract value
263
+ - `scValToBigInt` helps convert numeric `ScVal`s into native `bigint`s
264
+ - `ScInt` and `XdrLargeInt` help convert to and from `bigint`s to other types and form sized integer types for smart contract usage
243
265
 
244
266
  ### Added
267
+
245
268
  The following are new APIs to deal with new Soroban constructs:
246
- - **`Address`, which helps manage "smart" addresses in the Soroban context.** Addresses there (used for auth and identity purposes) can either be contracts (strkey `C...`) or accounts (strkey `G...`). This abstraction helps manage them and distinguish between them easily.
247
- - **`Contract`, which helps manage contract identifiers.** The primary purpose is to build invocations of its methods via the generic `call(...)`, but it also provides utilities for converting to an `Address` or calculating its minimum footprint for state expiration.
248
- - **Three new operations** have been added related to Soroban transactions:
249
- * `invokeHostFunction` for calling contract code
250
- * `bumpFootprintExpiration` for extending the state lifetime of Soroban data
251
- * `restoreFootprint` for restoring expired, off-chain state back onto the ledger
252
- - The `TransactionBuilder` now takes a `sorobanData` parameter (and has a corresponding `.setSorobanData()` builder method) which primarily describes the storage footprint of a Soroban (that is, which parts of the ledger state [in the form of `xdr.LedgerKey`s] it plans to read and write as part of the transaction).
253
- * To facilitate building this out, there's a new `SorobanDataBuilder` factory to set fields individually
254
- - The `TransactionBuilder` now has a `cloneFrom(tx, opts)` constructor method to create an instance from an existing transaction, also allowing parameter overrides via `opts`.
255
- - The following are convenience methods for building out certain types of smart contract-related structures:
256
- * `buildInvocationTree` and `walkInvocationTree` are both ways to visualize invocation calling trees better
257
- * `authorizeInvocation` helps multiple parties sign invocation calling trees
258
- * `humanizeEvents` helps make diagnostic events more readable
259
- - We've added a GHA to track bundle size changes as PRs are made. This protocol upgrade adds +18% to the final, minified bundle size which is significant but acceptable given the size of the upgrade.
269
+
270
+ - **`Address`, which helps manage "smart" addresses in the Soroban context.** Addresses there (used for auth and identity purposes) can either be contracts (strkey `C...`) or accounts (strkey `G...`). This abstraction helps manage them and distinguish between them easily.
271
+ - **`Contract`, which helps manage contract identifiers.** The primary purpose is to build invocations of its methods via the generic `call(...)`, but it also provides utilities for converting to an `Address` or calculating its minimum footprint for state expiration.
272
+ - **Three new operations** have been added related to Soroban transactions:
273
+ - `invokeHostFunction` for calling contract code
274
+ - `bumpFootprintExpiration` for extending the state lifetime of Soroban data
275
+ - `restoreFootprint` for restoring expired, off-chain state back onto the ledger
276
+ - The `TransactionBuilder` now takes a `sorobanData` parameter (and has a corresponding `.setSorobanData()` builder method) which primarily describes the storage footprint of a Soroban (that is, which parts of the ledger state [in the form of `xdr.LedgerKey`s] it plans to read and write as part of the transaction).
277
+ - To facilitate building this out, there's a new `SorobanDataBuilder` factory to set fields individually
278
+ - The `TransactionBuilder` now has a `cloneFrom(tx, opts)` constructor method to create an instance from an existing transaction, also allowing parameter overrides via `opts`.
279
+ - The following are convenience methods for building out certain types of smart contract-related structures:
280
+ - `buildInvocationTree` and `walkInvocationTree` are both ways to visualize invocation calling trees better
281
+ - `authorizeInvocation` helps multiple parties sign invocation calling trees
282
+ - `humanizeEvents` helps make diagnostic events more readable
283
+ - We've added a GHA to track bundle size changes as PRs are made. This protocol upgrade adds +18% to the final, minified bundle size which is significant but acceptable given the size of the upgrade.
260
284
 
261
285
  ### Fixes
262
- * Improves the error messages when passing invalid amounts to deposit and withdraw operations ([#679](https://github.com/stellar/js-stellar-base/pull/679)).
263
286
 
287
+ - Improves the error messages when passing invalid amounts to deposit and withdraw operations ([#679](https://github.com/stellar/js-stellar-base/pull/679)).
264
288
 
265
289
  ## [v9.0.0](https://github.com/stellar/js-stellar-base/compare/v8.2.2..v9.0.0)
266
290
 
@@ -270,8 +294,8 @@ This version is marked by a major version bump because of the significant upgrad
270
294
 
271
295
  The browser bundle size has decreased **significantly**:
272
296
 
273
- * `stellar-base.min.js` is **340 KiB**, down from **1.2 MiB** previously.
274
- * the new, unminified `stellar-base.js` is **895 KiB**.
297
+ - `stellar-base.min.js` is **340 KiB**, down from **1.2 MiB** previously.
298
+ - the new, unminified `stellar-base.js` is **895 KiB**.
275
299
 
276
300
  ### Breaking Changes
277
301
 
@@ -291,7 +315,6 @@ Though we have tried to maintain compatibility with older JavaScript implementat
291
315
  - Drop the `crc` dependency and inline it to lower bundle size ([#621](https://github.com/stellar/js-stellar-base/pull/621)).
292
316
  - Upgrade all dependencies to their latest versions ([#608](https://github.com/stellar/js-stellar-base/pull/608)).
293
317
 
294
-
295
318
  ## [v9.0.0-beta.3](https://github.com/stellar/js-stellar-base/compare/v9.0.0-beta.1..v9.0.0-beta.2)
296
319
 
297
320
  ### Fix
@@ -299,24 +322,22 @@ Though we have tried to maintain compatibility with older JavaScript implementat
299
322
  - Fixes a bug when sorting mixed-case assets for liquidity pools ([#606](https://github.com/stellar/js-stellar-base/pull/606)).
300
323
 
301
324
  ### Update
325
+
302
326
  - Upgrade all dependencies to their latest versions ([#608](https://github.com/stellar/js-stellar-base/pull/608)).
303
327
  - Drop the `crc` dependency and inline it to lower bundle size ([#621](https://github.com/stellar/js-stellar-base/pull/621)).
304
328
 
305
-
306
329
  ## [v9.0.0-beta.2](https://github.com/stellar/js-stellar-base/compare/v9.0.0-beta.1..v9.0.0-beta.2)
307
330
 
308
331
  ### Update
309
332
 
310
333
  - Upgrades the `js-xdr` dependency (major performance improvements, see [`js-xdr@v2.0.0`](https://github.com/stellar/js-xdr/releases/tag/v2.0.0)) and other dependencies to their latest versions ([#592](https://github.com/stellar/js-stellar-base/pull/592)).
311
334
 
312
-
313
335
  ## [v9.0.0-beta.1](https://github.com/stellar/js-stellar-base/compare/v9.0.0-beta.0..v9.0.0-beta.1)
314
336
 
315
337
  ### Fix
316
338
 
317
339
  - Correct XDR type definition for raw `xdr.Operation`s ([#591](https://github.com/stellar/js-stellar-base/pull/591)).
318
340
 
319
-
320
341
  ## [v9.0.0-beta.0](https://github.com/stellar/js-stellar-base/compare/v8.2.2..v9.0.0-beta.0)
321
342
 
322
343
  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.
@@ -327,7 +348,6 @@ This version is marked by a major version bump because of the significant upgrad
327
348
 
328
349
  - Current and vNext XDR updated to latest versions ([#587](https://github.com/stellar/js-stellar-base/pull/587)).
329
350
 
330
-
331
351
  ## [v8.2.2](https://github.com/stellar/js-stellar-base/compare/v8.2.1..v8.2.2)
332
352
 
333
353
  ### Fix
@@ -338,28 +358,25 @@ This version is marked by a major version bump because of the significant upgrad
338
358
 
339
359
  ### Fix
340
360
 
341
- * Turn all XLM-like (i.e. casing agnostic) asset codes into the native asset with code `XLM` ([#546](https://github.com/stellar/js-stellar-base/pull/546)).
342
-
361
+ - Turn all XLM-like (i.e. casing agnostic) asset codes into the native asset with code `XLM` ([#546](https://github.com/stellar/js-stellar-base/pull/546)).
343
362
 
344
363
  ## [v8.2.0](https://github.com/stellar/js-stellar-base/compare/v8.1.0..v8.2.0)
345
364
 
346
365
  ### Add
347
366
 
348
- * `Operation.setOptions` now supports the new [CAP-40](https://stellar.org/protocol/cap-40) signed payload signer (`ed25519SignedPayload`) thanks to @orbitlens ([#542](https://github.com/stellar/js-stellar-base/pull/542)).
349
-
367
+ - `Operation.setOptions` now supports the new [CAP-40](https://stellar.org/protocol/cap-40) signed payload signer (`ed25519SignedPayload`) thanks to @orbitlens ([#542](https://github.com/stellar/js-stellar-base/pull/542)).
350
368
 
351
369
  ## [v8.1.0](https://github.com/stellar/js-stellar-base/compare/v8.0.1..v8.1.0)
352
370
 
353
371
  ### Add
354
372
 
355
- * `TransactionBase.addDecoratedSignature` is a clearer way to add signatures directly to a built transaction without fiddling with the underlying `signatures` array ([#535](https://github.com/stellar/js-stellar-base/pull/535)).
373
+ - `TransactionBase.addDecoratedSignature` is a clearer way to add signatures directly to a built transaction without fiddling with the underlying `signatures` array ([#535](https://github.com/stellar/js-stellar-base/pull/535)).
356
374
 
357
- * Update the XDR definitions (and the way in which they're generated) to contain both the latest current XDR (which introduces [CAP-42](https://stellar.org/protocol/cap-42)) and the "v-next" XDR (which contains XDR related to Soroban and should be considered unstable) ([#537](https://github.com/stellar/js-stellar-base/pull/537)).
375
+ - Update the XDR definitions (and the way in which they're generated) to contain both the latest current XDR (which introduces [CAP-42](https://stellar.org/protocol/cap-42)) and the "v-next" XDR (which contains XDR related to Soroban and should be considered unstable) ([#537](https://github.com/stellar/js-stellar-base/pull/537)).
358
376
 
359
377
  ### Fix
360
378
 
361
- * Correctly set `minAccountSequence` in `TransactionBuilder` for large values ([#539](https://github.com/stellar/js-stellar-base/pull/539), thank you @overcat!).
362
-
379
+ - Correctly set `minAccountSequence` in `TransactionBuilder` for large values ([#539](https://github.com/stellar/js-stellar-base/pull/539), thank you @overcat!).
363
380
 
364
381
  ## [v8.0.1](https://github.com/stellar/js-stellar-base/compare/v8.0.0..v8.0.1)
365
382
 
@@ -367,12 +384,10 @@ This version is marked by a major version bump because of the significant upgrad
367
384
 
368
385
  - Correctly predict claimable balance IDs with large sequence numbers ([#530](https://github.com/stellar/js-stellar-base/pull/530), thank you @overcat!).
369
386
 
370
-
371
387
  ## [v8.0.0](https://github.com/stellar/js-stellar-base/compare/v7.0.0..v8.0.0)
372
388
 
373
389
  This is a promotion from the beta version without changes, now that the CAP-21 and CAP-40 implementations have made it into [stellar/stellar-core#master](https://github.com/stellar/stellar-core/tree/master/).
374
390
 
375
-
376
391
  ## [v8.0.0-beta.0](https://github.com/stellar/js-stellar-base/compare/v7.0.0..v8.0.0-beta.0)
377
392
 
378
393
  **This release adds support for Protocol 19**, which includes [CAP-21](https://stellar.org/protocol/cap-21) (new transaction preconditions) and [CAP-40](https://stellar.org/protocol/cap-40) (signed payload signers).
@@ -384,28 +399,28 @@ This is considered a beta release until the XDR for the Stellar protocol stabili
384
399
  As of this release, the minimum supported version of NodeJS is **14.x**.
385
400
 
386
401
  - Two XDR types have been renamed:
387
- * `xdr.OperationId` is now `xdr.HashIdPreimage`
388
- * `xdr.OperationIdId` is now `xdr.HashIdPreimageOperationId`
402
+ - `xdr.OperationId` is now `xdr.HashIdPreimage`
403
+ - `xdr.OperationIdId` is now `xdr.HashIdPreimageOperationId`
389
404
 
390
405
  ### Add
391
406
 
392
407
  - Support for converting signed payloads ([CAP-40](https://stellar.org/protocol/cap-40)) to and from their StrKey (`P...`) representation ([#511](https://github.com/stellar/js-stellar-base/pull/511)):
393
- * `Keypair.signPayloadDecorated(data)`
394
- * `StrKey.encodeSignedPayload(buf)`
395
- * `StrKey.decodeSignedPayload(str)`
396
- * `StrKey.isValidSignedPayload(str)`
408
+ - `Keypair.signPayloadDecorated(data)`
409
+ - `StrKey.encodeSignedPayload(buf)`
410
+ - `StrKey.decodeSignedPayload(str)`
411
+ - `StrKey.isValidSignedPayload(str)`
397
412
 
398
413
  - Support for creating transactions with the new preconditions ([CAP-21](https://stellar.org/protocol/cap-21)) via `TransactionBuilder` ([#513](https://github.com/stellar/js-stellar-base/pull/513)).
399
414
 
400
415
  - A way to convert between addresses (like `G...` and `P...`, i.e. the `StrKey` class) and their respective signer keys (i.e. `xdr.SignerKey`s), particularly for use in the new transaction preconditions ([#520](https://github.com/stellar/js-stellar-base/pull/520)):
401
- * `SignerKey.decodeAddress(address)`
402
- * `SignerKey.encodeSignerKey(address)`
403
- * `TransactionBuilder.setTimebounds(min, max)`
404
- * `TransactionBuilder.setLedgerbounds(min, max)`
405
- * `TransactionBuilder.setMinAccountSequence(seq)`
406
- * `TransactionBuilder.setMinAccountSequenceAge(age)`
407
- * `TransactionBuilder.setMinAccountSequenceLedgerGap(gap)`
408
- * `TransactionBuilder.setExtraSigners([signers])`
416
+ - `SignerKey.decodeAddress(address)`
417
+ - `SignerKey.encodeSignerKey(address)`
418
+ - `TransactionBuilder.setTimebounds(min, max)`
419
+ - `TransactionBuilder.setLedgerbounds(min, max)`
420
+ - `TransactionBuilder.setMinAccountSequence(seq)`
421
+ - `TransactionBuilder.setMinAccountSequenceAge(age)`
422
+ - `TransactionBuilder.setMinAccountSequenceLedgerGap(gap)`
423
+ - `TransactionBuilder.setExtraSigners([signers])`
409
424
 
410
425
  ### Fix
411
426
 
@@ -414,11 +429,10 @@ As of this release, the minimum supported version of NodeJS is **14.x**.
414
429
  - Resolves a bug that incorrectly sorted `Asset`s with mixed-case asset codes (it preferred lowercase codes incorrectly) ([#516](https://github.com/stellar/js-stellar-base/pull/516)).
415
430
 
416
431
  - Update developer dependencies:
417
- * `isparta`, `jsdoc`, and `underscore` ([#500](https://github.com/stellar/js-stellar-base/pull/500))
418
- * `ajv` ([#503](https://github.com/stellar/js-stellar-base/pull/503))
419
- * `karma` ([#505](https://github.com/stellar/js-stellar-base/pull/505))
420
- * `minimist` ([#514](https://github.com/stellar/js-stellar-base/pull/514))
421
-
432
+ - `isparta`, `jsdoc`, and `underscore` ([#500](https://github.com/stellar/js-stellar-base/pull/500))
433
+ - `ajv` ([#503](https://github.com/stellar/js-stellar-base/pull/503))
434
+ - `karma` ([#505](https://github.com/stellar/js-stellar-base/pull/505))
435
+ - `minimist` ([#514](https://github.com/stellar/js-stellar-base/pull/514))
422
436
 
423
437
  ## [v7.0.0](https://github.com/stellar/js-stellar-base/compare/v6.0.6..v7.0.0)
424
438
 
@@ -430,52 +444,51 @@ In [v5.2.0](https://github.com/stellar/js-stellar-base/releases/tag/v5.2.0), we
430
444
 
431
445
  The following fields will now always support muxed properties:
432
446
 
433
- * `FeeBumpTransaction.feeSource`
434
- * `Transaction.sourceAccount`
435
- * `Operation.sourceAccount`
436
- * `Payment.destination`
437
- * `PathPaymentStrictReceive.destination`
438
- * `PathPaymentStrictSend.destination`
439
- * `AccountMerge.destination`
440
- * `Clawback.from`
447
+ - `FeeBumpTransaction.feeSource`
448
+ - `Transaction.sourceAccount`
449
+ - `Operation.sourceAccount`
450
+ - `Payment.destination`
451
+ - `PathPaymentStrictReceive.destination`
452
+ - `PathPaymentStrictSend.destination`
453
+ - `AccountMerge.destination`
454
+ - `Clawback.from`
441
455
 
442
456
  The following functions had a `withMuxing` parameter removed:
443
457
 
444
- - `Operation.fromXDRObject`
445
- - `Transaction.constructor`
446
- - `FeeBumpTransaction.constructor`
447
- - `TransactionBuilder.fromXDR`
448
- - `TransactionBuilder.buildFeeBumpTransaction`
458
+ - `Operation.fromXDRObject`
459
+ - `Transaction.constructor`
460
+ - `FeeBumpTransaction.constructor`
461
+ - `TransactionBuilder.fromXDR`
462
+ - `TransactionBuilder.buildFeeBumpTransaction`
449
463
 
450
464
  The following functions will no longer check the `opts` object for a `withMuxing` field:
451
465
 
452
- - `TransactionBuilder.constructor`
453
- - `Operation.setSourceAccount`
466
+ - `TransactionBuilder.constructor`
467
+ - `Operation.setSourceAccount`
454
468
 
455
469
  There are several other breaking changes:
456
470
 
457
- - `TransactionBuilder.enableMuxedAccounts()` is removed
458
- - `decodeAddressToMuxedAccount()` and `encodeMuxedAccountToAddress()` no longer accept a second boolean parameter
459
- - `Account.createSubaccount()` and `MuxedAccount.createSubaccount()` are removed ([#487](https://github.com/stellar/js-stellar-base/pull/487)). You should prefer to create them manually:
471
+ - `TransactionBuilder.enableMuxedAccounts()` is removed
472
+ - `decodeAddressToMuxedAccount()` and `encodeMuxedAccountToAddress()` no longer accept a second boolean parameter
473
+ - `Account.createSubaccount()` and `MuxedAccount.createSubaccount()` are removed ([#487](https://github.com/stellar/js-stellar-base/pull/487)). You should prefer to create them manually:
460
474
 
461
475
  ```js
462
- let mux1 = new MuxedAccount(someAccount, '1');
476
+ let mux1 = new MuxedAccount(someAccount, "1");
463
477
 
464
- // before:
465
- let mux2 = mux1.createSubaccount('2');
478
+ // before:
479
+ let mux2 = mux1.createSubaccount("2");
466
480
 
467
- // now:
468
- let mux2 = new MuxedAccount(mux1.baseAccount(), '2');
481
+ // now:
482
+ let mux2 = new MuxedAccount(mux1.baseAccount(), "2");
469
483
  ```
470
484
 
471
-
472
- - Introduced a new helper method to help convert from muxed account addresses to their underlying Stellar addresses ([#485](https://github.com/stellar/js-stellar-base/pull/485)):
485
+ - Introduced a new helper method to help convert from muxed account addresses to their underlying Stellar addresses ([#485](https://github.com/stellar/js-stellar-base/pull/485)):
473
486
 
474
487
  ```ts
475
488
  function extractBaseAddess(address: string): string;
476
489
  ```
477
490
 
478
- - The following muxed account validation functions are now available from Typescript ([#483](https://github.com/stellar/js-stellar-base/pull/483/files)):
491
+ - The following muxed account validation functions are now available from Typescript ([#483](https://github.com/stellar/js-stellar-base/pull/483/files)):
479
492
 
480
493
  ```typescript
481
494
  namespace StrKey {
@@ -484,8 +497,14 @@ namespace StrKey {
484
497
  function isValidMed25519PublicKey(publicKey: string): boolean;
485
498
  }
486
499
 
487
- function decodeAddressToMuxedAccount(address: string, supportMuxing: boolean): xdr.MuxedAccount;
488
- function encodeMuxedAccountToAddress(account: xdr.MuxedAccount, supportMuxing: boolean): string;
500
+ function decodeAddressToMuxedAccount(
501
+ address: string,
502
+ supportMuxing: boolean
503
+ ): xdr.MuxedAccount;
504
+ function encodeMuxedAccountToAddress(
505
+ account: xdr.MuxedAccount,
506
+ supportMuxing: boolean
507
+ ): string;
489
508
  function encodeMuxedAccount(gAddress: string, id: string): xdr.MuxedAccount;
490
509
  ```
491
510
 
@@ -495,42 +514,39 @@ function encodeMuxedAccount(gAddress: string, id: string): xdr.MuxedAccount;
495
514
 
496
515
  - Add `Buffer` as a parameter type option for the `Keypair` constructor in Typescript ([#484](https://github.com/stellar/js-stellar-base/pull/484)).
497
516
 
498
-
499
517
  ## [v6.0.6](https://github.com/stellar/js-stellar-base/compare/v6.0.5..v6.0.6)
500
518
 
501
519
  ### Fix
502
520
 
503
521
  - Upgrades dependencies: `path-parse` (1.0.6 --> 1.0.7) and `jszip` (3.4.0 to 3.7.1) ([#450](https://github.com/stellar/js-stellar-base/pull/450), [#458](https://github.com/stellar/js-stellar-base/pull/458)).
504
522
 
505
-
506
523
  ## [v6.0.5](https://github.com/stellar/js-stellar-base/compare/v6.0.4..v6.0.5)
507
524
 
508
525
  This version bump fixes a security vulnerability in a _developer_ dependency; **please upgrade as soon as possible!** You may be affected if you are working on this package in a developer capacity (i.e. you've cloned this repository) and have run `yarn` or `yarn install` any time on Oct 22nd, 2021.
509
526
 
510
527
  Please refer to the [security advisory](https://github.com/advisories/GHSA-pjwm-rvh2-c87w) for details.
511
528
 
512
-
513
529
  ### Security Fix
514
- - Pin `ua-parser-js` to a known safe version ([#477](https://github.com/stellar/js-stellar-base/pull/477)).
515
530
 
531
+ - Pin `ua-parser-js` to a known safe version ([#477](https://github.com/stellar/js-stellar-base/pull/477)).
516
532
 
517
533
  ## [v6.0.4](https://github.com/stellar/js-stellar-base/compare/v6.0.3..v6.0.4)
518
534
 
519
535
  ### Fix
520
- - Allow muxed accounts when decoding transactions via `TransactionBuilder.fromXDR()` ([#470](https://github.com/stellar/js-stellar-base/pull/470)).
521
536
 
537
+ - Allow muxed accounts when decoding transactions via `TransactionBuilder.fromXDR()` ([#470](https://github.com/stellar/js-stellar-base/pull/470)).
522
538
 
523
539
  ## [v6.0.3](https://github.com/stellar/js-stellar-base/compare/v6.0.2..v6.0.3)
524
540
 
525
541
  ### Fix
526
- - When creating a `Transaction`, forward the optional `withMuxing` flag along to its operations so that their properties are also decoded with the appropriate muxing state ([#469](https://github.com/stellar/js-stellar-base/pull/469)).
527
542
 
543
+ - When creating a `Transaction`, forward the optional `withMuxing` flag along to its operations so that their properties are also decoded with the appropriate muxing state ([#469](https://github.com/stellar/js-stellar-base/pull/469)).
528
544
 
529
545
  ## [v6.0.2](https://github.com/stellar/js-stellar-base/compare/v6.0.1..v6.0.2)
530
546
 
531
547
  ### Fix
532
- - Fix Typescript signatures for operations to universally allow setting the `withMuxing` flag ([#466](https://github.com/stellar/js-stellar-base/pull/466)).
533
548
 
549
+ - Fix Typescript signatures for operations to universally allow setting the `withMuxing` flag ([#466](https://github.com/stellar/js-stellar-base/pull/466)).
534
550
 
535
551
  ## [v6.0.1](https://github.com/stellar/js-stellar-base/compare/v5.3.2..v6.0.1)
536
552
 
@@ -550,69 +566,75 @@ Please refer to the [security advisory](https://github.com/advisories/GHSA-pjwm-
550
566
  ## [v5.3.2](https://github.com/stellar/js-stellar-base/compare/v5.3.1..v5.3.2)
551
567
 
552
568
  ### Fix
553
- - Update various dependencies to secure versions. Most are developer dependencies which means no or minimal downstream effects ([#446](https://github.com/stellar/js-stellar-base/pull/446), [#447](https://github.com/stellar/js-stellar-base/pull/447), [#392](https://github.com/stellar/js-stellar-base/pull/392), [#428](https://github.com/stellar/js-stellar-base/pull/428)); the only non-developer dependency upgrade is a patch version bump to `lodash` ([#449](https://github.com/stellar/js-stellar-base/pull/449)).
554
569
 
570
+ - Update various dependencies to secure versions. Most are developer dependencies which means no or minimal downstream effects ([#446](https://github.com/stellar/js-stellar-base/pull/446), [#447](https://github.com/stellar/js-stellar-base/pull/447), [#392](https://github.com/stellar/js-stellar-base/pull/392), [#428](https://github.com/stellar/js-stellar-base/pull/428)); the only non-developer dependency upgrade is a patch version bump to `lodash` ([#449](https://github.com/stellar/js-stellar-base/pull/449)).
555
571
 
556
572
  ## [v5.3.1](https://github.com/stellar/js-stellar-base/compare/v5.3.0..v5.3.1)
557
573
 
558
574
  ### Fix
559
- - Creating operations with both muxed and unmuxed properties resulted in unintuitive XDR. Specifically, the unmuxed property would be transformed into the equivalent property with an ID of 0 ([#441](https://github.com/stellar/js-stellar-base/pull/441)).
560
575
 
576
+ - Creating operations with both muxed and unmuxed properties resulted in unintuitive XDR. Specifically, the unmuxed property would be transformed into the equivalent property with an ID of 0 ([#441](https://github.com/stellar/js-stellar-base/pull/441)).
561
577
 
562
578
  ## [v5.3.0](https://github.com/stellar/js-stellar-base/compare/v5.2.1..v5.3.0)
563
579
 
564
580
  ### Add
565
- - **Opt-in support for muxed accounts.** In addition to the support introduced in [v5.2.0](https://github.com/stellar/js-stellar-base/releases/v5.2.0), this completes support for muxed accounts by enabling them for fee-bump transactions. Pass a muxed account address (in the `M...` form) as the first parameter (and explicitly opt-in to muxing by passing `true` as the last parameter) to `TransactionBuilder.buildFeeBumpTransaction` to make the `feeSource` a fully-muxed account instance ([#434](https://github.com/stellar/js-stellar-base/pull/434)).
566
581
 
582
+ - **Opt-in support for muxed accounts.** In addition to the support introduced in [v5.2.0](https://github.com/stellar/js-stellar-base/releases/v5.2.0), this completes support for muxed accounts by enabling them for fee-bump transactions. Pass a muxed account address (in the `M...` form) as the first parameter (and explicitly opt-in to muxing by passing `true` as the last parameter) to `TransactionBuilder.buildFeeBumpTransaction` to make the `feeSource` a fully-muxed account instance ([#434](https://github.com/stellar/js-stellar-base/pull/434)).
567
583
 
568
584
  ## [v5.2.1](https://github.com/stellar/js-stellar-base/compare/v5.2.0..v5.2.1)
569
585
 
570
586
  ### Fix
571
- - Fix regression where raw public keys were [sometimes](https://github.com/stellar/js-stellar-sdk/issues/645) being parsed incorrectly ([#429](https://github.com/stellar/js-stellar-base/pull/429)).
572
587
 
588
+ - Fix regression where raw public keys were [sometimes](https://github.com/stellar/js-stellar-sdk/issues/645) being parsed incorrectly ([#429](https://github.com/stellar/js-stellar-base/pull/429)).
573
589
 
574
590
  ## [v5.2.0](https://github.com/stellar/js-stellar-base/compare/v5.1.0..v5.2.0)
575
591
 
576
592
  ### Add
593
+
577
594
  - **Opt-in support for muxed accounts.** This introduces `M...` addresses from [SEP-23](https://stellar.org/protocol/sep-23), which multiplex a Stellar `G...` address across IDs to eliminate the need for ad-hoc multiplexing via the Transaction.memo field (see the relevant [SEP-29](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0029.md) and [blog post](https://www.stellar.org/developers-blog/fixing-memo-less-payments) on the topic). The following operations now support muxed accounts ([#416](https://github.com/stellar/js-stellar-base/pull/416)):
578
- * `Payment.destination`
579
- * `PathPaymentStrictReceive.destination`
580
- * `PathPaymentStrictSend.destination`
581
- * `Operation.sourceAccount`
582
- * `AccountMerge.destination`
583
- * `Transaction.sourceAccount`
595
+ - `Payment.destination`
596
+ - `PathPaymentStrictReceive.destination`
597
+ - `PathPaymentStrictSend.destination`
598
+ - `Operation.sourceAccount`
599
+ - `AccountMerge.destination`
600
+ - `Transaction.sourceAccount`
584
601
 
585
602
  - The above changeset also introduces a new high-level object, `MuxedAccount` (not to be confused with `xdr.MuxedAccount`, which is the underlying raw representation) to make working with muxed accounts easier. You can use it to easily create and manage muxed accounts and their underlying shared `Account`, passing them along to the supported operations and `TransactionBuilder` ([#416](https://github.com/stellar/js-stellar-base/pull/416)):
586
603
 
587
604
  ```js
588
- const PUBKEY = 'GA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJVSGZ';
589
- const ACC = new StellarBase.Account(PUBKEY, '1');
590
-
591
- const mux1 = new StellarBase.MuxedAccount(ACC, '1000');
592
- console.log(mux1.accountId(), mux1.id());
593
- // MA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJUAAAAAAAAAAD5DTGC 1000
594
-
595
- const mux2 = ACC.createSubaccount('2000');
596
- console.log("Parent relationship preserved:",
597
- mux2.baseAccount().accountId() === mux1.baseAccount().accountId());
598
- console.log(mux2.accountId(), mux2.id());
599
- // MA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJUAAAAAAAAAAH2B4RU 2000
600
-
601
- mux1.setID('3000');
602
- console.log("Underlying account unchanged:",
603
- ACC.accountId() === mux1.baseAccount().accountId());
604
- console.log(mux1.accountId(), mux1.id());
605
- // MA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJUAAAAAAAAAALXC5LE 3000
605
+ const PUBKEY = "GA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJVSGZ";
606
+ const ACC = new StellarBase.Account(PUBKEY, "1");
607
+
608
+ const mux1 = new StellarBase.MuxedAccount(ACC, "1000");
609
+ console.log(mux1.accountId(), mux1.id());
610
+ // MA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJUAAAAAAAAAAD5DTGC 1000
611
+
612
+ const mux2 = ACC.createSubaccount("2000");
613
+ console.log(
614
+ "Parent relationship preserved:",
615
+ mux2.baseAccount().accountId() === mux1.baseAccount().accountId()
616
+ );
617
+ console.log(mux2.accountId(), mux2.id());
618
+ // MA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJUAAAAAAAAAAH2B4RU 2000
619
+
620
+ mux1.setID("3000");
621
+ console.log(
622
+ "Underlying account unchanged:",
623
+ ACC.accountId() === mux1.baseAccount().accountId()
624
+ );
625
+ console.log(mux1.accountId(), mux1.id());
626
+ // MA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJUAAAAAAAAAALXC5LE 3000
606
627
  ```
607
628
 
608
629
  - You can refer to the [documentation](https://stellar.github.io/js-stellar-sdk/MuxedAccount.html) or the [test suite](../test/unit/muxed_account_test.js) for more uses of the API.
609
630
 
610
631
  ### Update
632
+
611
633
  - Modernize the minimum-supported browser versions for the library ([#419](https://github.com/stellar/js-stellar-base/pull/419)).
612
634
 
613
635
  ### Fix
614
- - Update Typescript test for `SetOptions` to use authorization flags (e.g. `AuthRequiredFlag`) correctly ([#418](https://github.com/stellar/js-stellar-base/pull/418)).
615
636
 
637
+ - Update Typescript test for `SetOptions` to use authorization flags (e.g. `AuthRequiredFlag`) correctly ([#418](https://github.com/stellar/js-stellar-base/pull/418)).
616
638
 
617
639
  ## [v5.1.0](https://github.com/stellar/js-stellar-base/compare/v5.0.0..v5.1.0)
618
640
 
@@ -636,7 +658,6 @@ Please refer to the [security advisory](https://github.com/advisories/GHSA-pjwm-
636
658
 
637
659
  - `AllowTrustOpAsset` has been renamed to `AssetCode` ([#394](https://github.com/stellar/js-stellar-base/pull/394))
638
660
 
639
-
640
661
  ### Deprecated
641
662
 
642
663
  - `AllowTrustOp` is now a deprecated operation.
@@ -648,14 +669,12 @@ Please refer to the [security advisory](https://github.com/advisories/GHSA-pjwm-
648
669
  - Update TS definitions for XDRs ([#381](https://github.com/stellar/js-stellar-base/pull/381))
649
670
  - Fix typing for ManageData.value ([#379](https://github.com/stellar/js-stellar-base/pull/379))
650
671
 
651
-
652
672
  ## [v4.0.2](https://github.com/stellar/js-stellar-base/compare/v4.0.1..v4.0.2)
653
673
 
654
674
  ## Update
655
675
 
656
676
  - Fix deployment script.
657
677
 
658
-
659
678
  ## [v4.0.1](https://github.com/stellar/js-stellar-base/compare/v4.0.0..v4.0.1)
660
679
 
661
680
  ## Update
@@ -665,8 +684,9 @@ Please refer to the [security advisory](https://github.com/advisories/GHSA-pjwm-
665
684
  ## [v4.0.0](https://github.com/stellar/js-stellar-base/compare/v3.0.4..v4.0.0)
666
685
 
667
686
  ## Add
687
+
668
688
  - Add the `Claimant` class which helps the creation of claimable balances. ([#367](https://github.com/stellar/js-stellar-base/pull/367)).
669
- The default behavior of this class it to create claimants with an unconditional predicate if none is passed:
689
+ The default behavior of this class it to create claimants with an unconditional predicate if none is passed:
670
690
 
671
691
  ```
672
692
  const claimant = new StellarBase.Claimant(
@@ -700,41 +720,44 @@ const claimant = new StellarBase.Claimant(
700
720
  ```
701
721
 
702
722
  - Add `Operation.createClaimableBalance` ([#368](https://github.com/stellar/js-stellar-base/pull/368))
703
- Extend the operation class with a new helper to create claimable balance operations.
723
+ Extend the operation class with a new helper to create claimable balance operations.
704
724
 
705
725
  ```js
706
726
  const asset = new Asset(
707
- 'USD',
708
- 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7'
727
+ "USD",
728
+ "GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7"
709
729
  );
710
- const amount = '100.0000000';
730
+ const amount = "100.0000000";
711
731
  const claimants = [
712
732
  new Claimant(
713
- 'GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ',
714
- Claimant.predicateBeforeAbsoluteTime("4102444800000")
715
- )
733
+ "GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ",
734
+ Claimant.predicateBeforeAbsoluteTime("4102444800000")
735
+ ),
716
736
  ];
717
737
 
718
738
  const op = Operation.createClaimableBalance({
719
739
  asset,
720
740
  amount,
721
- claimants
741
+ claimants,
722
742
  });
723
743
  ```
724
744
 
725
745
  - Add `Operation.claimClaimableBalance` ([#368](https://github.com/stellar/js-stellar-base/pull/368))
726
- Extend the operation class with a new helper to create claim claimable balance operations. It receives the `balanceId` as exposed by Horizon in the `/claimable_balances` end-point.
746
+ Extend the operation class with a new helper to create claim claimable balance operations. It receives the `balanceId` as exposed by Horizon in the `/claimable_balances` end-point.
727
747
 
728
748
  ```js
729
749
  const op = Operation.createClaimableBalance({
730
- balanceId: '00000000da0d57da7d4850e7fc10d2a9d0ebc731f7afb40574c03395b17d49149b91f5be',
750
+ balanceId:
751
+ "00000000da0d57da7d4850e7fc10d2a9d0ebc731f7afb40574c03395b17d49149b91f5be",
731
752
  });
732
753
  ```
754
+
733
755
  - Add support for Sponsored Reserves (CAP33)([#369](https://github.com/stellar/js-stellar-base/pull/369/))
734
756
 
735
757
  Extend the operation class with helpers that allow sponsoring reserves and also revoke sponsorships.
736
758
 
737
759
  To start sponsoring reserves for an account use:
760
+
738
761
  - `Operation.beginSponsoringFutureReserves`
739
762
  - `Operation.endSponsoringFutureReserves`
740
763
 
@@ -855,11 +878,13 @@ The following enum values were rename in `OperationType`:
855
878
  ## [v3.0.2](https://github.com/stellar/js-stellar-base/compare/v3.0.1..v3.0.2)
856
879
 
857
880
  ### Fix
881
+
858
882
  - Extend `files` in npm package to include XDR type definitions ([#345](https://github.com/stellar/js-stellar-base/pull/345)).
859
883
 
860
884
  ## [v3.0.1](https://github.com/stellar/js-stellar-base/compare/v3.0.0..v3.0.1)
861
885
 
862
886
  ### Add
887
+
863
888
  - Add TypeScript definitions for auto-generated XDR code ([#342](https://github.com/stellar/js-stellar-base/pull/342)).
864
889
 
865
890
  ## [v3.0.0](https://github.com/stellar/js-stellar-base/compare/v2.1.9..v3.0.0)
@@ -867,6 +892,7 @@ The following enum values were rename in `OperationType`:
867
892
  This version brings protocol 13 support with backwards compatibility support for protocol 12.
868
893
 
869
894
  ### Add
895
+
870
896
  - Add `TransactionBuilder.buildFeeBumpTransaction` which makes it easy to create `FeeBumpTransaction` ([#321](https://github.com/stellar/js-stellar-base/pull/321)).
871
897
  - Adds a feature flag which allow consumers of this library to create V1 (protocol 13) transactions using the `TransactionBuilder` ([#321](https://github.com/stellar/js-stellar-base/pull/321)).
872
898
  - Add support for [CAP0027](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0027.md): First-class multiplexed accounts ([#325](https://github.com/stellar/js-stellar-base/pull/325)).
@@ -875,6 +901,7 @@ This version brings protocol 13 support with backwards compatibility support for
875
901
  - Add `TransactionBuilder.fromXDR` which receives an xdr envelope and return a `Transaction` or `FeeBumpTransaction` ([#328](https://github.com/stellar/js-stellar-base/pull/328)).
876
902
 
877
903
  ### Update
904
+
878
905
  - Update XDR definitions with protocol 13 ([#317](https://github.com/stellar/js-stellar-base/pull/317)).
879
906
  - Extend `Transaction` to work with `TransactionV1Envelope` and `TransactionV0Envelope` ([#317](https://github.com/stellar/js-stellar-base/pull/317)).
880
907
  - Add backward compatibility support for [CAP0018](https://github.com/stellar/stellar-protocol/blob/f01c9354aaab1e8ca97a25cf888829749cadf36a/core/cap-0018.md) ([#317](https://github.com/stellar/js-stellar-base/pull/317)).
@@ -884,15 +911,15 @@ This version brings protocol 13 support with backwards compatibility support for
884
911
 
885
912
  The syntax for authorizing a trustline is still the same, but the authorize parameter is now a `number`.
886
913
 
887
- ```js
888
- Operation.allowTrust({
889
- trustor: trustor.publicKey(),
890
- assetCode: "COP",
891
- authorize: 1
892
- });
893
- ```
914
+ ```js
915
+ Operation.allowTrust({
916
+ trustor: trustor.publicKey(),
917
+ assetCode: "COP",
918
+ authorize: 1,
919
+ });
920
+ ```
894
921
 
895
- You can use still use a `boolean`; however, we recommend you update your code to pass a `number` instead. Finally, using the value `2` for authorize to maintain liabilities will only be valid if Stellar Core is running on Protocol 13; otherwise, you'll get an error.
922
+ You can use still use a `boolean`; however, we recommend you update your code to pass a `number` instead. Finally, using the value `2` for authorize to maintain liabilities will only be valid if Stellar Core is running on Protocol 13; otherwise, you'll get an error.
896
923
 
897
924
  - ~Update operations builder to support multiplexed accounts ([#337](https://github.com/stellar/js-stellar-base/pull/337)).~
898
925
 
@@ -900,12 +927,12 @@ This version brings protocol 13 support with backwards compatibility support for
900
927
 
901
928
  - `Transaction.toEnvelope()` returns a protocol 13 `xdr.TransactionEnvelope` which is an `xdr.Union` ([#317](https://github.com/stellar/js-stellar-base/pull/317)).
902
929
  If you have code that looks like this - `transaction.toEnvelope().tx` - you have two options:
903
- - You can grab the value wrapped by the union, calling `value()` like `transaction.toEnvelope().value().tx`.
904
- - You can check which is the discriminant by using `switch()` and then call `v0()`, `v1()`, or `feeBump()`.
930
+ - You can grab the value wrapped by the union, calling `value()` like `transaction.toEnvelope().value().tx`.
931
+ - You can check which is the discriminant by using `switch()` and then call `v0()`, `v1()`, or `feeBump()`.
905
932
  - The return value from `Transaction.fee` changed from `number` to `string`. This brings support for `Int64` values ([#321](https://github.com/stellar/js-stellar-base/pull/321)).
906
933
  - The const `BASE_FEE` changed from `number` to `string` ([#321](https://github.com/stellar/js-stellar-base/pull/321)).
907
- - The option `fee` passed to `new TransactionBuilder({fee: ..})` changed from `number` to `string` ([#321](https://github.com/stellar/js-stellar-base/pull/321)).
908
- - The following fields, which were previously an `xdr.AccountID` are now a `xdr.MuxedAccount` ([#325](https://github.com/stellar/js-stellar-base/pull/325)):
934
+ - The option `fee` passed to `new TransactionBuilder({fee: ..})` changed from `number` to `string` ([#321](https://github.com/stellar/js-stellar-base/pull/321)).
935
+ - The following fields, which were previously an `xdr.AccountID` are now a `xdr.MuxedAccount` ([#325](https://github.com/stellar/js-stellar-base/pull/325)):
909
936
  - `PaymentOp.destination`
910
937
  - `PathPaymentStrictReceiveOp.destination`
911
938
  - `PathPaymentStrictSendOp.destination`
@@ -915,6 +942,7 @@ This version brings protocol 13 support with backwards compatibility support for
915
942
  - `FeeBumpTransaction.feeSource`
916
943
 
917
944
  You can get the string representation by calling `StrKey.encodeMuxedAccount` which will return a `G..` or `M..` account.
945
+
918
946
  - Remove the following deprecated functions ([#331](https://github.com/stellar/js-stellar-base/pull/331)):
919
947
  - `Operation.manageOffer`
920
948
  - `Operation.createPassiveOffer`
@@ -930,6 +958,7 @@ This version brings protocol 13 support with backwards compatibility support for
930
958
  - Update operations builder to support multiplexed accounts ([#337](https://github.com/stellar/js-stellar-base/pull/337)).
931
959
 
932
960
  This allows you to specify an `M` account as the destination or source:
961
+
933
962
  ```
934
963
  var destination = 'MAAAAAAAAAAAAAB7BQ2L7E5NBWMXDUCMZSIPOBKRDSBYVLMXGSSKF6YNPIB7Y77ITLVL6';
935
964
  var amount = '1000.0000000';
@@ -954,6 +983,7 @@ This version brings protocol 13 support with backwards compatibility support for
954
983
  This version brings protocol 13 support with backwards compatibility support for protocol 12.
955
984
 
956
985
  ### Add
986
+
957
987
  - Add `TransactionBuilder.buildFeeBumpTransaction` which makes it easy to create `FeeBumpTransaction` ([#321](https://github.com/stellar/js-stellar-base/pull/321)).
958
988
  - Adds a feature flag which allow consumers of this library to create V1 (protocol 13) transactions using the `TransactionBuilder` ([#321](https://github.com/stellar/js-stellar-base/pull/321)).
959
989
  - Add support for [CAP0027](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0027.md): First-class multiplexed accounts ([#325](https://github.com/stellar/js-stellar-base/pull/325)).
@@ -962,6 +992,7 @@ This version brings protocol 13 support with backwards compatibility support for
962
992
  - Add `TransactionBuilder.fromXDR` which receives an xdr envelope and return a `Transaction` or `FeeBumpTransaction` ([#328](https://github.com/stellar/js-stellar-base/pull/328)).
963
993
 
964
994
  ### Update
995
+
965
996
  - Update XDR definitions with protocol 13 ([#317](https://github.com/stellar/js-stellar-base/pull/317)).
966
997
  - Extend `Transaction` to work with `TransactionV1Envelope` and `TransactionV0Envelope` ([#317](https://github.com/stellar/js-stellar-base/pull/317)).
967
998
  - Add backward compatibility support for [CAP0018](https://github.com/stellar/stellar-protocol/blob/f01c9354aaab1e8ca97a25cf888829749cadf36a/core/cap-0018.md) ([#317](https://github.com/stellar/js-stellar-base/pull/317)).
@@ -970,12 +1001,12 @@ This version brings protocol 13 support with backwards compatibility support for
970
1001
 
971
1002
  - `Transaction.toEnvelope()` returns a protocol 13 `xdr.TransactionEnvelope` which is an `xdr.Union` ([#317](https://github.com/stellar/js-stellar-base/pull/317)).
972
1003
  If you have code that looks like this `transaction.toEnvelope().tx` you have two options:
973
- - You can grab the value wrapped by the union, calling `value()` like `transaction.toEnvelope().value().tx`.
974
- - You can check which is the discriminant by using `switch()` and then call `v0()`, `v1()`, or `feeBump()`.
1004
+ - You can grab the value wrapped by the union, calling `value()` like `transaction.toEnvelope().value().tx`.
1005
+ - You can check which is the discriminant by using `switch()` and then call `v0()`, `v1()`, or `feeBump()`.
975
1006
  - The return value from `Transaction.fee` changed from `number` to `string`. This brings support for `Int64` values ([#321](https://github.com/stellar/js-stellar-base/pull/321)).
976
1007
  - The const `BASE_FEE` changed from `number` to `string` ([#321](https://github.com/stellar/js-stellar-base/pull/321)).
977
- - The option `fee` passed to `new TransactionBuilder({fee: ..})` changed from `number` to `string` ([#321](https://github.com/stellar/js-stellar-base/pull/321)).
978
- - The following fields, which were previously an `xdr.AccountID` are now a `xdr.MuxedAccount` ([#325](https://github.com/stellar/js-stellar-base/pull/325)):
1008
+ - The option `fee` passed to `new TransactionBuilder({fee: ..})` changed from `number` to `string` ([#321](https://github.com/stellar/js-stellar-base/pull/321)).
1009
+ - The following fields, which were previously an `xdr.AccountID` are now a `xdr.MuxedAccount` ([#325](https://github.com/stellar/js-stellar-base/pull/325)):
979
1010
  - `PaymentOp.destination`
980
1011
  - `PathPaymentStrictReceiveOp.destination`
981
1012
  - `PathPaymentStrictSendOp.destination`
@@ -985,6 +1016,7 @@ This version brings protocol 13 support with backwards compatibility support for
985
1016
  - `FeeBumpTransaction.feeSource`
986
1017
 
987
1018
  You can get the string representation by calling `StrKey.encodeMuxedAccount` which will return a `G..` or `M..` account.
1019
+
988
1020
  - Remove the following deprecated functions ([#331](https://github.com/stellar/js-stellar-base/pull/331)):
989
1021
  - `Operation.manageOffer`
990
1022
  - `Operation.createPassiveOffer`
@@ -993,46 +1025,54 @@ This version brings protocol 13 support with backwards compatibility support for
993
1025
  - Remove the `Network` class ([#331](https://github.com/stellar/js-stellar-base/pull/331)).
994
1026
  - Remove `vendor/base58.js` ([#331](https://github.com/stellar/js-stellar-base/pull/331)).
995
1027
 
996
-
997
1028
  ## [v2.1.9](https://github.com/stellar/js-stellar-base/compare/v2.1.8..v2.1.9)
998
1029
 
999
1030
  ### Fix
1031
+
1000
1032
  - Update dependencies which depend on minimist. ([#332](https://github.com/stellar/js-stellar-base/pull/332))
1001
1033
 
1002
1034
  ## [v2.1.8](https://github.com/stellar/js-stellar-base/compare/v2.1.7..v2.1.8)
1003
1035
 
1004
1036
  ### Fix
1037
+
1005
1038
  - Fix `setTimeout(0)` and partially defined timebounds ([#315](https://github.com/stellar/js-stellar-base/pull/315)).
1006
1039
 
1007
1040
  ## [v2.1.7](https://github.com/stellar/js-stellar-base/compare/v2.1.6..v2.1.7)
1008
1041
 
1009
1042
  ### Fix
1043
+
1010
1044
  - Fix TypeScript options for `ManageData` operation to allow setting value to `null` ([#310](https://github.com/stellar/js-stellar-base/issues/310))
1011
1045
  - Fix crash on partially defined time bounds ([#303](https://github.com/stellar/js-stellar-base/issues/303))
1012
1046
 
1013
1047
  ## [v2.1.6](https://github.com/stellar/js-stellar-base/compare/v2.1.5..v2.1.6)
1014
1048
 
1015
1049
  ### Fix
1050
+
1016
1051
  - Fix npm deployment.
1017
1052
 
1018
1053
  ## [v2.1.5](https://github.com/stellar/js-stellar-base/compare/v2.1.4..v2.1.5)
1019
1054
 
1020
1055
  ### Add
1056
+
1021
1057
  - Add `toXDR` type to Transaction class ([#296](https://github.com/stellar/js-stellar-base/issues/296))
1022
1058
 
1023
1059
  ### Fix
1060
+
1024
1061
  - Fix doc link ([#298](https://github.com/stellar/js-stellar-base/issues/298))
1025
1062
 
1026
1063
  ### Remove
1064
+
1027
1065
  - Remove node engine restriction ([#294](https://github.com/stellar/js-stellar-base/issues/294))
1028
1066
 
1029
1067
  ### Update
1068
+
1030
1069
  - Update creating an account example ([#299](https://github.com/stellar/js-stellar-base/issues/299))
1031
1070
  - Use `console.trace` to get line num in `Networks.use` ([#300](https://github.com/stellar/js-stellar-base/issues/300))
1032
1071
 
1033
1072
  ## [v2.1.4](https://github.com/stellar/js-stellar-base/compare/v2.1.3..v2.1.4)
1034
1073
 
1035
1074
  ## Update
1075
+
1036
1076
  - Regenerate the XDR definitions to include MetaV2 ([#288](https://github.com/stellar/js-stellar-base/issues/288))
1037
1077
 
1038
1078
  ## [v2.1.3](https://github.com/stellar/js-stellar-base/compare/v2.1.2...v2.1.3)
@@ -1063,76 +1103,77 @@ This release adds support for [stellar-core protocol 12 release](https://github.
1063
1103
 
1064
1104
  ### Add ➕
1065
1105
 
1066
- - `Operation.pathPaymentStrictSend`: Sends a path payments, debiting from the source account exactly a specified amount of one asset, crediting at least a given amount of another asset. ([#274](https://github.com/stellar/js-stellar-base/pull/274)).
1067
-
1068
- The following operation will debit exactly 10 USD from the source account, crediting at least 9.2 EUR in the destination account 💸:
1069
- ```js
1070
- var sendAsset = new StellarBase.Asset(
1071
- 'USD',
1072
- 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7'
1073
- );
1074
- var sendAmount = '10';
1075
- var destination =
1076
- 'GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ';
1077
- var destAsset = new StellarBase.Asset(
1078
- 'USD',
1079
- 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7'
1080
- );
1081
- var destMin = '9.2';
1082
- var path = [
1083
- new StellarBase.Asset(
1084
- 'USD',
1085
- 'GBBM6BKZPEHWYO3E3YKREDPQXMS4VK35YLNU7NFBRI26RAN7GI5POFBB'
1086
- ),
1087
- new StellarBase.Asset(
1088
- 'EUR',
1089
- 'GDTNXRLOJD2YEBPKK7KCMR7J33AAG5VZXHAJTHIG736D6LVEFLLLKPDL'
1090
- )
1091
- ];
1092
- let op = StellarBase.Operation.pathPaymentStrictSend({
1093
- sendAsset,
1094
- sendAmount,
1095
- destination,
1096
- destAsset,
1097
- destMin,
1098
- path
1099
- });
1100
- ```
1101
- - `Operation.pathPaymentStrictReceive`: This behaves the same as the former `pathPayments` operation. ([#274](https://github.com/stellar/js-stellar-base/pull/274)).
1102
-
1103
- The following operation will debit maximum 10 USD from the source account, crediting exactly 9.2 EUR in the destination account 💸:
1104
- ```js
1105
- var sendAsset = new StellarBase.Asset(
1106
- 'USD',
1107
- 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7'
1108
- );
1109
- var sendMax = '10';
1110
- var destination =
1111
- 'GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ';
1112
- var destAsset = new StellarBase.Asset(
1113
- 'USD',
1114
- 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7'
1115
- );
1116
- var destAmount = '9.2';
1117
- var path = [
1118
- new StellarBase.Asset(
1119
- 'USD',
1120
- 'GBBM6BKZPEHWYO3E3YKREDPQXMS4VK35YLNU7NFBRI26RAN7GI5POFBB'
1121
- ),
1122
- new StellarBase.Asset(
1123
- 'EUR',
1124
- 'GDTNXRLOJD2YEBPKK7KCMR7J33AAG5VZXHAJTHIG736D6LVEFLLLKPDL'
1125
- )
1126
- ];
1127
- let op = StellarBase.Operation.pathPaymentStrictReceive({
1128
- sendAsset,
1129
- sendMax,
1130
- destination,
1131
- destAsset,
1132
- destAmount,
1133
- path
1134
- });
1135
- ```
1106
+ - `Operation.pathPaymentStrictSend`: Sends a path payments, debiting from the source account exactly a specified amount of one asset, crediting at least a given amount of another asset. ([#274](https://github.com/stellar/js-stellar-base/pull/274)).
1107
+
1108
+ The following operation will debit exactly 10 USD from the source account, crediting at least 9.2 EUR in the destination account 💸:
1109
+
1110
+ ```js
1111
+ var sendAsset = new StellarBase.Asset(
1112
+ "USD",
1113
+ "GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7"
1114
+ );
1115
+ var sendAmount = "10";
1116
+ var destination = "GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ";
1117
+ var destAsset = new StellarBase.Asset(
1118
+ "USD",
1119
+ "GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7"
1120
+ );
1121
+ var destMin = "9.2";
1122
+ var path = [
1123
+ new StellarBase.Asset(
1124
+ "USD",
1125
+ "GBBM6BKZPEHWYO3E3YKREDPQXMS4VK35YLNU7NFBRI26RAN7GI5POFBB"
1126
+ ),
1127
+ new StellarBase.Asset(
1128
+ "EUR",
1129
+ "GDTNXRLOJD2YEBPKK7KCMR7J33AAG5VZXHAJTHIG736D6LVEFLLLKPDL"
1130
+ ),
1131
+ ];
1132
+ let op = StellarBase.Operation.pathPaymentStrictSend({
1133
+ sendAsset,
1134
+ sendAmount,
1135
+ destination,
1136
+ destAsset,
1137
+ destMin,
1138
+ path,
1139
+ });
1140
+ ```
1141
+
1142
+ - `Operation.pathPaymentStrictReceive`: This behaves the same as the former `pathPayments` operation. ([#274](https://github.com/stellar/js-stellar-base/pull/274)).
1143
+
1144
+ The following operation will debit maximum 10 USD from the source account, crediting exactly 9.2 EUR in the destination account 💸:
1145
+
1146
+ ```js
1147
+ var sendAsset = new StellarBase.Asset(
1148
+ "USD",
1149
+ "GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7"
1150
+ );
1151
+ var sendMax = "10";
1152
+ var destination = "GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ";
1153
+ var destAsset = new StellarBase.Asset(
1154
+ "USD",
1155
+ "GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7"
1156
+ );
1157
+ var destAmount = "9.2";
1158
+ var path = [
1159
+ new StellarBase.Asset(
1160
+ "USD",
1161
+ "GBBM6BKZPEHWYO3E3YKREDPQXMS4VK35YLNU7NFBRI26RAN7GI5POFBB"
1162
+ ),
1163
+ new StellarBase.Asset(
1164
+ "EUR",
1165
+ "GDTNXRLOJD2YEBPKK7KCMR7J33AAG5VZXHAJTHIG736D6LVEFLLLKPDL"
1166
+ ),
1167
+ ];
1168
+ let op = StellarBase.Operation.pathPaymentStrictReceive({
1169
+ sendAsset,
1170
+ sendMax,
1171
+ destination,
1172
+ destAsset,
1173
+ destAmount,
1174
+ path,
1175
+ });
1176
+ ```
1136
1177
 
1137
1178
  ## Deprecated ❗️
1138
1179
 
@@ -1141,6 +1182,7 @@ This release adds support for [stellar-core protocol 12 release](https://github.
1141
1182
  ## [v2.0.2](https://github.com/stellar/js-stellar-base/compare/v2.0.1...v2.0.2)
1142
1183
 
1143
1184
  ### Fix
1185
+
1144
1186
  - Fix issue [#269](https://github.com/stellar/js-stellar-base/issues/269). ManageBuyOffer should extend BaseOptions and inherited property "source". ([#270](https://github.com/stellar/js-stellar-base/pull/270)).
1145
1187
 
1146
1188
  ## [v2.0.1](https://github.com/stellar/js-stellar-base/compare/v2.0.0...v2.0.1)
@@ -1156,11 +1198,13 @@ No changes. Fixes deploy script and includes changes from [v2.0.0](https://githu
1156
1198
  ## [v1.1.2](https://github.com/stellar/js-stellar-base/compare/v1.1.1...v1.1.2)
1157
1199
 
1158
1200
  ### Fix
1201
+
1159
1202
  - Fix no-network warnings ([#248](https://github.com/stellar/js-stellar-base/issues/248))
1160
1203
 
1161
1204
  ## [v1.1.1](https://github.com/stellar/js-stellar-base/compare/v1.1.0...v1.1.1)
1162
1205
 
1163
1206
  ### Fix
1207
+
1164
1208
  - Add types for new networkPassphrase argument. Fix [#237](https://github.com/stellar/js-stellar-base/issues/237). ([#238](https://github.com/stellar/js-stellar-base/issues/238))
1165
1209
 
1166
1210
  ## [v1.1.0](https://github.com/stellar/js-stellar-base/compare/v1.0.3...v1.1.0)
@@ -1174,7 +1218,7 @@ is not passed:
1174
1218
  #### `Keypair.master`
1175
1219
 
1176
1220
  ```js
1177
- Keypair.master(Networks.TESTNET)
1221
+ Keypair.master(Networks.TESTNET);
1178
1222
  ```
1179
1223
 
1180
1224
  #### constructor for `Transaction`
@@ -1184,13 +1228,13 @@ const xenv = new xdr.TransactionEnvelope({ tx: xtx });
1184
1228
  new Transaction(xenv, Networks.TESTNET);
1185
1229
  ```
1186
1230
 
1187
- #### constructor for `TransactionBuilder` and method `TransactionBuilder.setNetworkPassphrase`
1231
+ #### constructor for `TransactionBuilder` and method `TransactionBuilder.setNetworkPassphrase`
1188
1232
 
1189
1233
  ```js
1190
1234
  const transaction = new StellarSdk.TransactionBuilder(account, {
1191
1235
  fee: StellarSdk.BASE_FEE,
1192
- networkPassphrase: Networks.TESTNET
1193
- })
1236
+ networkPassphrase: Networks.TESTNET,
1237
+ });
1194
1238
  ```
1195
1239
 
1196
1240
  See [#207](https://github.com/stellar/js-stellar-base/issues/207) and [#112](https://github.com/stellar/js-stellar-base/issues/112) for more information.
@@ -1198,9 +1242,11 @@ See [#207](https://github.com/stellar/js-stellar-base/issues/207) and [#112](htt
1198
1242
  The `Network` class will be removed on the `2.0` release.
1199
1243
 
1200
1244
  ### Add
1245
+
1201
1246
  - Add docs for BASE_FEE const. ([#211](https://github.com/stellar/js-stellar-base/issues/211))
1202
1247
 
1203
1248
  ### Fix
1249
+
1204
1250
  - Fix typo. ([#213](https://github.com/stellar/js-stellar-base/issues/213))
1205
1251
 
1206
1252
  ## [v1.0.3](https://github.com/stellar/js-stellar-base/compare/v1.0.2...v1.0.3)
@@ -1212,6 +1258,7 @@ The `Network` class will be removed on the `2.0` release.
1212
1258
  - Add BASE_FEE to TS types ([#209](https://github.com/stellar/js-stellar-base/issues/209))
1213
1259
 
1214
1260
  ### Fix
1261
+
1215
1262
  - Fix typo in types ([#194](https://github.com/stellar/js-stellar-base/issues/194))
1216
1263
  - Fix types: Fee is no longer optional ([#195](https://github.com/stellar/js-stellar-base/issues/195))
1217
1264
  - Fix typings for Account Sequence Number ([#203](https://github.com/stellar/js-stellar-base/issues/203))