Skip to content

Commit f1358a5

Browse files
authored
Prepare v11.1.0 for release (#897)
* Update basic README documentation to latest changes * Add changelog entries (incl. ContractSpec work) * Upgrade all dependencies, incl. stellar-base * Run linter
1 parent 828e355 commit f1358a5

File tree

6 files changed

+1302
-1393
lines changed

6 files changed

+1302
-1393
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@ A breaking change will get clearly marked in this log.
55

66
## Unreleased
77

8+
9+
## [v11.1.0](https://github.com/stellar/js-stellar-sdk/compare/v11.0.1...v11.1.0)
10+
811
### Added
912
* `SorobanRpc.Server.simulateTransaction` now supports an optional `addlResources` parameter to allow users to specify additional resources that they want to include in a simulation ([#896](https://github.com/stellar/js-stellar-sdk/pull/896)).
13+
* `ContractSpec` now has a `jsonSchema()` method to generate a [JSON Schema](https://json-schema.org/) for a particular contract specification ([#889](https://github.com/stellar/js-stellar-sdk/pull/889)).
14+
15+
### Fixed
16+
* All dependencies have been updated to their latest versions, including `stellar-base` to [v10.0.1](https://github.com/stellar/js-stellar-base/releases/tag/v10.0.1) which included a small patch ([#897](https://github.com/stellar/js-stellar-sdk/pull/897)).
1017

1118

1219
## [v11.0.1](https://github.com/stellar/js-stellar-sdk/compare/v10.2.1...v11.0.0)

CONTRIBUTING.md

+2
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ In fact, you should follow [the steps there](https://github.com/stellar/js-stell
2121
```
2222

2323
- [ ] Finally, run `yarn` so that the dependency is pulled (ensuring its a valid version) and the lockfile is updated with the latest integrity details. You can now commit the change and PR accordingly.
24+
25+
Note that new versions will be published to npm **and** Bower by GitHub Actions.

README.md

+21-33
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,20 @@
1313
<a href="https://github.com/stellar/js-stellar-sdk/actions/workflows/tests.yml"><img alt="Test Status" src="https://github.com/stellar/js-stellar-sdk/actions/workflows/tests.yml/badge.svg" /></a>
1414
</p>
1515

16-
js-stellar-sdk is a Javascript library for communicating with a
17-
[Stellar Horizon server](https://github.com/stellar/go/tree/master/services/horizon).
16+
js-stellar-sdk is a JavaScript library for communicating with a
17+
[Stellar Horizon server](https://github.com/stellar/go/tree/master/services/horizon) and [Soroban RPC](https://soroban.stellar.org/docs/reference/rpc).
1818
It is used for building Stellar apps either on Node.js or in the browser.
1919

2020
It provides:
2121

22-
- a networking layer API for Horizon endpoints.
22+
- a networking layer API for Horizon endpoints (REST-based) and Soroban RPC (JSON-RPC-based).
2323
- facilities for building and signing transactions, for communicating with a
2424
Stellar Horizon instance, and for submitting transactions or querying network
2525
history.
2626

2727
### stellar-sdk vs stellar-base
2828

29-
stellar-sdk is a high-level library that serves as client-side API for Horizon.
30-
[stellar-base](https://github.com/stellar/js-stellar-base) is lower-level
31-
library for creating Stellar primitive constructs via XDR helpers and wrappers.
29+
`stellar-sdk` is a high-level library that serves as client-side API for Horizon and Soroban RPC, while [stellar-base](https://github.com/stellar/js-stellar-base) is lower-level library for creating Stellar primitive constructs via XDR helpers and wrappers.
3230

3331
**Most people will want stellar-sdk instead of stellar-base.** You should only
3432
use stellar-base if you know what you're doing!
@@ -55,7 +53,7 @@ installs `stellar-base` and exposes all of its exports in case you need them.
5553
Using npm to include js-stellar-sdk in your own project:
5654

5755
```shell
58-
npm install --save stellar-sdk
56+
npm install --save @stellar/stellar-sdk
5957
```
6058

6159
Alternatively, you can use cdnjs in a browser:
@@ -77,15 +75,17 @@ npm install --save stellar-sdk
7775
2. require/import it in your JavaScript:
7876

7977
```js
80-
var StellarSdk = require('stellar-sdk');
78+
var StellarSdk = require('@stellar/stellar-sdk');
79+
// or
80+
import * as StellarSdk from '@stellar/stellar-sdk';
8181
```
8282

8383
### To self host for use in the browser
8484

8585
1. Install it using [bower](http://bower.io):
8686

8787
```shell
88-
bower install stellar-sdk
88+
bower install @stellar/stellar-sdk
8989
```
9090

9191
2. Include it in the browser:
@@ -131,12 +131,12 @@ git clone https://github.com/stellar/js-stellar-sdk.git
131131

132132
```shell
133133
cd js-stellar-sdk
134-
npm install
134+
yarn
135135
```
136136

137-
3. Install Node 16
137+
3. Install Node 18
138138

139-
Because we support the oldest maintenance version of Node, please install and develop on Node 16 so you don't get surprised when your code works locally but breaks in CI.
139+
Because we support the oldest maintenance version of Node, please install and develop on Node 18 so you don't get surprised when your code works locally but breaks in CI.
140140

141141
Here's how to install `nvm` if you haven't: https://github.com/creationix/nvm
142142

@@ -153,11 +153,11 @@ https://github.com/wbyoung/avn
153153

154154
4. Observe the project's code style
155155

156-
While you're making changes, make sure to run the linter-watcher to catch any
157-
linting errors (in addition to making sure your text editor supports ESLint)
156+
While you're making changes, make sure to run the linter to catch any linting
157+
errors (in addition to making sure your text editor supports ESLint)
158158

159159
```shell
160-
node_modules/.bin/gulp watch
160+
yarn fmt
161161
```
162162

163163

@@ -168,7 +168,7 @@ documentation](https://stellar.github.io/js-stellar-sdk/), or [the
168168
examples](https://github.com/stellar/js-stellar-sdk/tree/master/docs/reference).
169169

170170
There is also Horizon REST API Documentation
171-
[here](https://developers.stellar.org/api/introduction/).
171+
[here](https://developers.stellar.org/api/introduction/) and Soroban JSON-RPC documentation [here](https://soroban.stellar.org/docs/reference/rpc).
172172

173173
### Usage with React-Native
174174

@@ -188,7 +188,7 @@ module.exports = {
188188
};
189189
```
190190
6. Add `import "./shim";` to the top of `index.js`
191-
7. `yarn add stellar-sdk`
191+
7. `yarn add @stellar/stellar-sdk`
192192

193193
There is also a [sample](https://github.com/fnando/rn-stellar-sdk-sample) that you can follow.
194194

@@ -200,14 +200,14 @@ There is also a [sample](https://github.com/fnando/rn-stellar-sdk-sample) that y
200200
yarn rn-nodeify --install process,url,events,https,http,util,stream,crypto,vm,buffer --hack --yarn
201201
```
202202
3. Add `import "./shim";` to the your app's entry point (by default `./App.js`)
203-
4. `yarn add stellar-sdk`
203+
4. `yarn add @stellar/stellar-sdk`
204204
5. `expo install expo-random`
205205

206206
At this point, the Stellar SDK will work, except that `StellarSdk.Keypair.random()` will throw an error. To work around this, you can create your own method to generate a random keypair like this:
207207

208208
```javascript
209209
import * as Random from 'expo-random';
210-
import StellarSdk from 'stellar-sdk';
210+
import StellarSdk from '@stellar/stellar-sdk';
211211

212212
const generateRandomKeypair = () => {
213213
const randomBytes = Random.getRandomBytes(32);
@@ -251,21 +251,9 @@ cd jsdoc && serve .
251251
Documentation for this repo lives in
252252
[Developers site](https://github.com/stellar/js-stellar-sdk/blob/master/docs/reference/readme.md).
253253

254-
## Contributing
255-
256-
For information on how to contribute, please refer to our
257-
[contribution guide](https://github.com/stellar/js-stellar-sdk/blob/master/CONTRIBUTING.md).
258-
259-
## Publishing to npm
260-
261-
```
262-
npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease]
263-
```
264-
265-
A new version will be published to npm **and** Bower by GitHub actions.
254+
## Contributing and Publishing
266255

267-
npm >= 2.13.0 required. Read more about
268-
[npm version](https://docs.npmjs.com/cli/version).
256+
For information on how to contribute or publish new versions of this software to `npm`, please refer to our [contribution guide](https://github.com/stellar/js-stellar-sdk/blob/master/CONTRIBUTING.md).
269257

270258
## License
271259

package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stellar/stellar-sdk",
3-
"version": "11.0.1",
3+
"version": "11.1.0",
44
"description": "A library for working with the Stellar network, including communication with the Horizon and Soroban RPC servers.",
55
"keywords": [
66
"stellar"
@@ -77,13 +77,13 @@
7777
},
7878
"devDependencies": {
7979
"@babel/cli": "^7.23.0",
80-
"@babel/core": "^7.23.0",
80+
"@babel/core": "^7.23.6",
8181
"@babel/eslint-parser": "^7.22.15",
8282
"@babel/eslint-plugin": "^7.22.10",
83-
"@babel/preset-env": "^7.22.20",
83+
"@babel/preset-env": "^7.23.6",
8484
"@babel/preset-typescript": "^7.23.0",
8585
"@babel/register": "^7.22.15",
86-
"@definitelytyped/dtslint": "^0.0.197",
86+
"@definitelytyped/dtslint": "^0.1.1",
8787
"@istanbuljs/nyc-config-babel": "3.0.0",
8888
"@stellar/tsconfig": "^1.0.2",
8989
"@types/chai": "^4.3.6",
@@ -96,7 +96,7 @@
9696
"@types/randombytes": "^2.0.1",
9797
"@types/sinon": "^17.0.2",
9898
"@types/urijs": "^1.19.20",
99-
"@typescript-eslint/parser": "^6.9.1",
99+
"@typescript-eslint/parser": "^6.14.0",
100100
"axios-mock-adapter": "^1.22.0",
101101
"babel-loader": "^9.1.3",
102102
"babel-plugin-istanbul": "^6.1.1",
@@ -108,14 +108,15 @@
108108
"eslint": "^8.50.0",
109109
"eslint-config-airbnb-base": "^15.0.0",
110110
"eslint-config-prettier": "^9.0.0",
111-
"eslint-plugin-import": "^2.28.1",
111+
"eslint-plugin-import": "^2.29.1",
112112
"eslint-plugin-node": "^11.1.0",
113113
"eslint-plugin-prefer-import": "^0.0.1",
114114
"eslint-plugin-prettier": "^5.0.0",
115115
"eslint-webpack-plugin": "^4.0.1",
116116
"ghooks": "^2.0.4",
117117
"husky": "^8.0.3",
118118
"jsdoc": "^4.0.2",
119+
"json-schema-faker": "^0.5.4",
119120
"karma": "^6.4.1",
120121
"karma-chai": "^0.1.0",
121122
"karma-chrome-launcher": "^3.1.0",
@@ -130,21 +131,20 @@
130131
"mocha": "^10.2.0",
131132
"node-polyfill-webpack-plugin": "^3.0.0",
132133
"nyc": "^15.1.0",
133-
"prettier": "^3.0.3",
134+
"prettier": "^3.1.1",
134135
"randombytes": "^2.1.0",
135136
"sinon": "^17.0.1",
136137
"sinon-chai": "^3.7.0",
137138
"taffydb": "^2.7.3",
138139
"terser-webpack-plugin": "^5.3.9",
139-
"ts-node": "^10.9.1",
140+
"ts-node": "^10.9.2",
140141
"typescript": "^5.3.3",
141142
"utility-types": "^3.7.0",
142143
"webpack": "^5.88.2",
143-
"json-schema-faker": "^0.5.4",
144144
"webpack-cli": "^5.0.1"
145145
},
146146
"dependencies": {
147-
"@stellar/stellar-base": "10.0.0",
147+
"@stellar/stellar-base": "10.0.1",
148148
"axios": "^1.6.0",
149149
"bignumber.js": "^9.1.2",
150150
"eventsource": "^2.0.2",

test/unit/server/soroban/simulate_transaction_test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ describe("Server#simulateTransaction", async function (done) {
8282
id: 1,
8383
method: "simulateTransaction",
8484
params: {
85-
transaction: this.blob
86-
}
85+
transaction: this.blob,
86+
},
8787
})
8888
.returns(
8989
Promise.resolve({ data: { id: 1, result: simulationResponse } }),
@@ -109,8 +109,8 @@ describe("Server#simulateTransaction", async function (done) {
109109
method: "simulateTransaction",
110110
params: {
111111
transaction: this.blob,
112-
resourceConfig: { instructionLeeway: 100 }
113-
}
112+
resourceConfig: { instructionLeeway: 100 },
113+
},
114114
})
115115
.returns(
116116
Promise.resolve({ data: { id: 1, result: simulationResponse } }),

0 commit comments

Comments
 (0)