diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d1a8e17..f764d4ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,22 +5,36 @@ A breaking change should be clearly marked in this log. -## Unreleased +## v1.0.0-beta.3 -## Added -* Include `expirationLedgerSeq` attribute on ledger data entries in `getContractData` and `getLedgerEntries` responses ([#153](https://github.com/stellar/js-soroban-client/pull/153)). +### Added +* Responses for `Server.getContractData` and `Server.getLedgerEntries` now include an `expirationLedgerSeq` attribute on ledger data entries that have expiry information ([#153](https://github.com/stellar/js-soroban-client/pull/153)). +* The new `Server._simulateTransaction` method will return the raw response directly from the RPC server rather than parsing XDR fields ([#160](https://github.com/stellar/js-soroban-client/pull/160)). ### Breaking Changes +* The `stellar-base` dependency has been upgraded to [v10.0.0-beta.3](https://github.com/stellar/js-stellar-base/releases/tag/v10.0.0-beta.3) which contains breaking changes related to auth helpers and some bugfixes ([#158](https://github.com/stellar/js-soroban-client/pull/158)). * All endpoints will now automatically decode XDR structures whenever possible. In particular, - For the `Server.getLedgerEntries` response ([#154](https://github.com/stellar/js-soroban-client/pull/154)), we parse: * `entries` is now guaranteed to exist, but it may be empty * `entries[i].key` is an instance of `xdr.LedgerKey` * the `entries[i].xdr` field is now `val`, instead * `entries[i].val` is an instance of `xdr.LedgerEntryData` - - For the `Server.sendTransaction` response ([#TODO]()), we parse: + - For the `Server.sendTransaction` response ([#157](https://github.com/stellar/js-soroban-client/pull/157)), we parse: * `errorResultXdr` is renamed to `errorResult` * If it's present, it's an instance of `xdr.TransactionResult` -* If you want to continue to use the raw RPC responses, you can use `Server._getLedgerEntries` and `Server._sendTransaction` methods, instead. + - For the `Server.getEvents` response ([#156](https://github.com/stellar/js-soroban-client/pull/156)), we parse: + * `events[i].contractId` is now an instance of [`Contract`](https://stellar.github.io/js-soroban-client/Contract.html) + * `events[i].topic` is now a list of decoded `xdr.ScVal` instances + * `events[i].value.xdr` is now remapped directly to `events.value` + * `events[i].value` is a decoded `xdr.ScVal` instance + - For the `Server.sendTransaction` response ([#157](https://github.com/stellar/js-soroban-client/pull/157)), we parse: + * `errorResultXdr` is now `errorResult`, a parsed instance of `xdr.TransactionResult` +* If you want to continue to use the raw RPC responses, you can use the `_`-prefixed methods which will return the response directly: + - `Server._getLedgerEntries` + - `Server._sendTransaction` + - `Server._getEvents` + - `Server._simulateTransaction` + - `Server._getTransaction` ## v1.0.0-beta.2 diff --git a/package.json b/package.json index e272435a..a7245844 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "soroban-client", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "description": "A library for working with Stellar's Soroban RPC servers.", "author": "Stellar Development Foundation ", "homepage": "https://github.com/stellar/js-soroban-client", @@ -84,15 +84,15 @@ "@babel/preset-env": "^7.22.15", "@babel/preset-typescript": "^7.22.15", "@babel/register": "^7.22.15", - "@definitelytyped/dtslint": "^0.0.178", + "@definitelytyped/dtslint": "^0.0.182", "@istanbuljs/nyc-config-babel": "3.0.0", "@stellar/tsconfig": "^1.0.2", "@types/chai": "^4.3.6", "@types/mocha": "^10.0.1", - "@types/node": "^20.6.0", - "@types/sinon": "^10.0.16", + "@types/node": "^20.8.4", + "@types/sinon": "^10.0.19", "@types/urijs": "^1.19.6", - "@typescript-eslint/parser": "^6.7.0", + "@typescript-eslint/parser": "^6.7.5", "axios-mock-adapter": "^1.22.0", "babel-loader": "^9.1.2", "babel-plugin-istanbul": "^6.1.1", diff --git a/yarn.lock b/yarn.lock index 641eb625..0eacb663 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1029,7 +1029,7 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@definitelytyped/dts-critic@^0.0.178": +"@definitelytyped/dts-critic@0.0.178": version "0.0.178" resolved "https://registry.yarnpkg.com/@definitelytyped/dts-critic/-/dts-critic-0.0.178.tgz#79e82ef35615b1534da979eb925a6130e1977d94" integrity sha512-1JiY6giD2qLYxDPSWPbZiICzmTX+cHBNMXf09SeY6CJX0kZPcAkX+Uhc64HSqlhutECRWy7SdQCp/NP3xVOt4Q== @@ -1041,15 +1041,15 @@ tmp "^0.2.1" yargs "^15.3.1" -"@definitelytyped/dtslint@^0.0.178": - version "0.0.178" - resolved "https://registry.yarnpkg.com/@definitelytyped/dtslint/-/dtslint-0.0.178.tgz#9e76093ed0913d3b0e78fefb834d2e3d86bb6246" - integrity sha512-IK4IqJSIY6wS+8Tg0hIuwAltPs0ZIWibMd3CSurQ8E1gNvuXaR48xjsjFVh2R8pxGrIR75mJ5o6H1GjxFZwK1A== +"@definitelytyped/dtslint@^0.0.182": + version "0.0.182" + resolved "https://registry.yarnpkg.com/@definitelytyped/dtslint/-/dtslint-0.0.182.tgz#7b8cffcccbcd8725cdfeac916f757e3cbfd305d2" + integrity sha512-88t3yXrqXQbw+KmAY7D+PHJnC2BTzEZPxy7UvtksqrDL1RWLUxXKuG33/+0w36T3qDsdQTiqNBdLbAI+uzxsEA== dependencies: - "@definitelytyped/dts-critic" "^0.0.178" - "@definitelytyped/header-parser" "^0.0.178" - "@definitelytyped/typescript-versions" "^0.0.178" - "@definitelytyped/utils" "^0.0.178" + "@definitelytyped/dts-critic" "0.0.178" + "@definitelytyped/header-parser" "0.0.178" + "@definitelytyped/typescript-versions" "0.0.178" + "@definitelytyped/utils" "0.0.178" "@typescript-eslint/eslint-plugin" "^5.55.0" "@typescript-eslint/parser" "^5.55.0" "@typescript-eslint/types" "^5.56.0" @@ -1062,7 +1062,7 @@ tslint "5.14.0" yargs "^15.1.0" -"@definitelytyped/header-parser@^0.0.178": +"@definitelytyped/header-parser@0.0.178", "@definitelytyped/header-parser@^0.0.178": version "0.0.178" resolved "https://registry.yarnpkg.com/@definitelytyped/header-parser/-/header-parser-0.0.178.tgz#2cfd170a33b014d686135673fa7fac837cfe5556" integrity sha512-16FFuaWW2Hq+a0Abyt+9gvPAT0w/ezy4eph3RbtLSqxH3T/UHDla1jgnp1DMvfNeBWaIqHxcr+Vrr7BPquw7mw== @@ -1071,12 +1071,12 @@ "@types/parsimmon" "^1.10.1" parsimmon "^1.13.0" -"@definitelytyped/typescript-versions@^0.0.178": +"@definitelytyped/typescript-versions@0.0.178", "@definitelytyped/typescript-versions@^0.0.178": version "0.0.178" resolved "https://registry.yarnpkg.com/@definitelytyped/typescript-versions/-/typescript-versions-0.0.178.tgz#98a92f2251f18b32122e808b968ca8e009d3b123" integrity sha512-pPXy3z5gE4xnVgqIRApFcQ6M6kqtRK1gnqyGx/I0Yo1CH8RAsRvumCDB/KiZmQDpCHiy//E9dOIUFdquvC5t7g== -"@definitelytyped/utils@^0.0.178": +"@definitelytyped/utils@0.0.178": version "0.0.178" resolved "https://registry.yarnpkg.com/@definitelytyped/utils/-/utils-0.0.178.tgz#f403be41816690246a4e0244d125a0084b16462a" integrity sha512-nYg3E51XpTodS0/5w5r1wM/DhPYhyqa9BP8ili4XgB5s9j4v4mDPX9Jwjns2q24derBvyhdUpzshKDh43aqwZw== @@ -1470,7 +1470,7 @@ resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.2.tgz#96d63314255540a36bf24da094cce7a13668d73b" integrity sha512-NaHL0+0lLNhX6d9rs+NSt97WH/gIlRHmszXbQ/8/MV/eVcFNdeJ/GYhrFuUc8K7WuPhRhTSdMkCp8VMzhUq85w== -"@types/node@*", "@types/node@>=10.0.0", "@types/node@^20.6.0": +"@types/node@*", "@types/node@>=10.0.0", "@types/node@^20.8.4": version "20.8.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.4.tgz#0e9ebb2ff29d5c3302fc84477d066fa7c6b441aa" integrity sha512-ZVPnqU58giiCjSxjVUESDtdPk4QR5WQhhINbc9UBrKLU68MX5BF6kbQzTrkwbolyr0X8ChBpXfavr5mZFKZQ5A== @@ -1492,7 +1492,7 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.3.tgz#9a726e116beb26c24f1ccd6850201e1246122e04" integrity sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw== -"@types/sinon@^10.0.16": +"@types/sinon@^10.0.19": version "10.0.19" resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-10.0.19.tgz#752b752bc40bb5af0bb1aec29bde49b139b91d35" integrity sha512-MWZNGPSchIdDfb5FL+VFi4zHsHbNOTQEgjqFQk7HazXSXwUU9PAX3z9XBqb3AJGYr9YwrtCtaSMsT3brYsN/jQ== @@ -1555,7 +1555,7 @@ "@typescript-eslint/typescript-estree" "5.62.0" debug "^4.3.4" -"@typescript-eslint/parser@^6.7.0": +"@typescript-eslint/parser@^6.7.5": version "6.7.5" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.7.5.tgz#8d7ca3d1fbd9d5a58cc4d30b2aa797a760137886" integrity sha512-bIZVSGx2UME/lmhLcjdVc7ePBwn7CLqKarUBL4me1C5feOd663liTGjMBGVcGr+BhnSLeP4SgwdvNnnkbIdkCw==