@stellar/stellar-base 14.0.3 → 14.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -15
- package/dist/stellar-base.js +2348 -2186
- package/dist/stellar-base.min.js +1 -1
- package/lib/address.js +4 -1
- package/lib/auth.js +2 -4
- package/lib/soroban.js +6 -4
- package/lib/transaction_builder.js +161 -3
- package/package.json +8 -8
- package/types/curr.d.ts +121 -146
- package/types/index.d.ts +24 -0
- package/types/next.d.ts +121 -145
- package/CHANGELOG.md +0 -1489
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://github.com/stellar/js-stellar-base/actions/workflows/tests.yml)
|
|
4
4
|
[](https://codeclimate.com/github/stellar/js-stellar-base)
|
|
5
5
|
[](https://coveralls.io/github/stellar/js-stellar-base?branch=master)
|
|
6
|
-
[](https://deepwiki.com/stellar/js-stellar-base)
|
|
7
7
|
|
|
8
8
|
The stellar-base library is the lowest-level stellar helper library. It consists
|
|
9
9
|
of classes to read, write, hash, and sign the xdr structures that are used in
|
|
@@ -54,7 +54,7 @@ yarn add @stellar/stellar-base
|
|
|
54
54
|
2. require/import it in your JavaScript:
|
|
55
55
|
|
|
56
56
|
```js
|
|
57
|
-
var StellarBase = require(
|
|
57
|
+
var StellarBase = require("@stellar/stellar-base");
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
### To self host for use in the browser
|
|
@@ -98,15 +98,15 @@ Make sure that you are using the latest version number. They can be found on the
|
|
|
98
98
|
|
|
99
99
|
### To develop and test js-stellar-base itself
|
|
100
100
|
|
|
101
|
-
1. Install Node
|
|
101
|
+
1. Install Node 20.x
|
|
102
102
|
|
|
103
|
-
We support the oldest LTS release of Node, which is [currently
|
|
103
|
+
We support the oldest LTS release of Node, which is [currently 20.x](https://nodejs.org/en/about/releases/).
|
|
104
104
|
|
|
105
105
|
If you work on several projects that use different Node versions, you might find helpful to install a NodeJS version manager:
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
- https://github.com/creationix/nvm
|
|
108
|
+
- https://github.com/wbyoung/avn
|
|
109
|
+
- https://github.com/asdf-vm/asdf
|
|
110
110
|
|
|
111
111
|
2. Install Yarn
|
|
112
112
|
|
|
@@ -140,10 +140,6 @@ as well as fixing any formatting errors with
|
|
|
140
140
|
yarn fmt
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
If you're working on a file not in `src`, limit your code to Node 6.16 ES! See
|
|
144
|
-
what's supported here: https://node.green/. (Our npm library must support
|
|
145
|
-
earlier versions of Node, so the tests need to run on those versions.)
|
|
146
|
-
|
|
147
143
|
#### Updating XDR definitions
|
|
148
144
|
|
|
149
145
|
XDR updates are complicated due to the fact that you need workarounds for bugs
|
|
@@ -155,10 +151,12 @@ in the generator, formatter, or a namespace adjustment.
|
|
|
155
151
|
4. Run `sed -ie s/\"/\'/g types/{curr,next}.d.ts` to minimize the diff (the generator's formatter uses `"` but the repo uses `'`).
|
|
156
152
|
5. Move `xdr.Operation` into a hidden namespace to avoid conflicts with the SDK's `Operation`.
|
|
157
153
|
6. Add generator workarounds:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
154
|
+
|
|
155
|
+
- `type Hash = Opaque[]` is a necessary alias that doesn't get generated
|
|
156
|
+
- `Hyper`, `UnsignedHyper`, and `ScSpecEventV0` need their signatures
|
|
157
|
+
fixed because linting wants an `Array` instead of a naked `[]`.
|
|
158
|
+
- Some constants aren't generated correctly (e.g, Ctrl+F `SCSYMBOL_LIMIT` in `src/curr_generated.js`)
|
|
159
|
+
|
|
162
160
|
7. Finally, make code adjustments related to the XDR (these are usually revealed by running the tests).
|
|
163
161
|
|
|
164
162
|
As an example PR to follow, [stellar-base#800](https://github.com/stellar/js-stellar-base/pull/800) has detailed steps for each part of the process.
|