stellar-sdk
Advanced tools
Comparing version 11.0.0-beta.5 to 11.0.0-beta.6
@@ -9,2 +9,10 @@ # Changelog | ||
## [v11.0.0-beta.6](https://github.com/stellar/js-stellar-sdk/compare/v11.0.0-beta.5...v11.0.0-beta.6) | ||
### Fixed | ||
* The `stellar-base` library has been upgraded to `beta.4` which contains a bugfix for large sequence numbers ([#877](https://github.com/stellar/js-stellar-sdk/pull/877)). | ||
* The `SorobanRpc.Server.getTransaction()` method will now return the full response when encountering a `FAILED` transaction result ([#872](https://github.com/stellar/js-stellar-sdk/pull/872)). | ||
* The `SorobanRpc.Server.getEvents()` method will correctly parse the event value (which is an `xdr.ScVal` rather than an `xdr.DiagnosticEvent`, see the modified `SorobanRpc.Api.EventResponse.value`; [#876](https://github.com/stellar/js-stellar-sdk/pull/876)). | ||
## [v11.0.0-beta.5](https://github.com/stellar/js-stellar-sdk/compare/v11.0.0-beta.4...v11.0.0-beta.5) | ||
@@ -11,0 +19,0 @@ |
/// <reference path="../../types/dom-monkeypatch.d.ts" /> | ||
export * from './soroban_rpc'; | ||
export * from './api'; | ||
export { Server, Durability } from './server'; | ||
@@ -4,0 +4,0 @@ export { default as AxiosClient } from './axios'; |
@@ -44,11 +44,11 @@ "use strict"; | ||
}); | ||
var _soroban_rpc = require("./soroban_rpc"); | ||
Object.keys(_soroban_rpc).forEach(function (key) { | ||
var _api = require("./api"); | ||
Object.keys(_api).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; | ||
if (key in exports && exports[key] === _soroban_rpc[key]) return; | ||
if (key in exports && exports[key] === _api[key]) return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function get() { | ||
return _soroban_rpc[key]; | ||
return _api[key]; | ||
} | ||
@@ -55,0 +55,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
import { Api } from './soroban_rpc'; | ||
import { Api } from './api'; | ||
export declare function parseRawSendTransaction(r: Api.RawSendTransactionResponse): Api.SendTransactionResponse; | ||
@@ -3,0 +3,0 @@ export declare function parseRawEvents(r: Api.RawGetEventsResponse): Api.GetEventsResponse; |
@@ -11,3 +11,3 @@ "use strict"; | ||
var _stellarBase = require("stellar-base"); | ||
var _soroban_rpc = require("./soroban_rpc"); | ||
var _api = require("./api"); | ||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } | ||
@@ -39,3 +39,3 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | ||
}), | ||
value: _stellarBase.xdr.DiagnosticEvent.fromXDR(evt.value.xdr, 'base64') | ||
value: _stellarBase.xdr.ScVal.fromXDR(evt.value.xdr, 'base64') | ||
}); | ||
@@ -64,3 +64,3 @@ }) | ||
var _sim$events$map, _sim$events; | ||
var looksRaw = _soroban_rpc.Api.isSimulationRaw(sim); | ||
var looksRaw = _api.Api.isSimulationRaw(sim); | ||
if (!looksRaw) { | ||
@@ -67,0 +67,0 @@ return sim; |
import URI from 'urijs'; | ||
import { Account, Address, Contract, FeeBumpTransaction, Transaction, xdr } from 'stellar-base'; | ||
import { Api } from './soroban_rpc'; | ||
import { Api } from './api'; | ||
export declare const SUBMIT_TRANSACTION_TIMEOUT: number; | ||
@@ -5,0 +5,0 @@ /** Specifies the durability namespace of contract-related ledger entries. */ |
@@ -11,3 +11,3 @@ "use strict"; | ||
var jsonrpc = _interopRequireWildcard(require("./jsonrpc")); | ||
var _soroban_rpc = require("./soroban_rpc"); | ||
var _api = require("./api"); | ||
var _transaction = require("./transaction"); | ||
@@ -248,7 +248,7 @@ var _parsers = require("./parsers"); | ||
return _context6.abrupt("return", this._getTransaction(hash).then(function (raw) { | ||
var successInfo = {}; | ||
if (raw.status === _soroban_rpc.Api.GetTransactionStatus.SUCCESS) { | ||
var foundInfo = {}; | ||
if (raw.status !== _api.Api.GetTransactionStatus.NOT_FOUND) { | ||
var _meta$v3$sorobanMeta; | ||
var meta = _stellarBase.xdr.TransactionMeta.fromXDR(raw.resultMetaXdr, 'base64'); | ||
successInfo = _objectSpread({ | ||
foundInfo = _objectSpread({ | ||
ledger: raw.ledger, | ||
@@ -261,3 +261,3 @@ createdAt: raw.createdAt, | ||
resultMetaXdr: meta | ||
}, meta.switch() === 3 && meta.v3().sorobanMeta() !== null && { | ||
}, meta.switch() === 3 && meta.v3().sorobanMeta() !== null && raw.status === _api.Api.GetTransactionStatus.SUCCESS && { | ||
returnValue: (_meta$v3$sorobanMeta = meta.v3().sorobanMeta()) === null || _meta$v3$sorobanMeta === void 0 ? void 0 : _meta$v3$sorobanMeta.returnValue() | ||
@@ -272,3 +272,3 @@ }); | ||
oldestLedgerCloseTime: raw.oldestLedgerCloseTime | ||
}, successInfo); | ||
}, foundInfo); | ||
return result; | ||
@@ -445,3 +445,3 @@ })); | ||
simResponse = _context14.sent; | ||
if (!_soroban_rpc.Api.isSimulationError(simResponse)) { | ||
if (!_api.Api.isSimulationError(simResponse)) { | ||
_context14.next = 5; | ||
@@ -448,0 +448,0 @@ break; |
import { FeeBumpTransaction, Transaction, TransactionBuilder } from 'stellar-base'; | ||
import { Api } from './soroban_rpc'; | ||
import { Api } from './api'; | ||
/** | ||
@@ -4,0 +4,0 @@ * Combines the given raw transaction alongside the simulation results. |
@@ -8,3 +8,3 @@ "use strict"; | ||
var _stellarBase = require("stellar-base"); | ||
var _soroban_rpc = require("./soroban_rpc"); | ||
var _api = require("./api"); | ||
var _parsers = require("./parsers"); | ||
@@ -20,3 +20,3 @@ function assembleTransaction(raw, simulation) { | ||
var success = (0, _parsers.parseRawSimulation)(simulation); | ||
if (!_soroban_rpc.Api.isSimulationSuccess(success)) { | ||
if (!_api.Api.isSimulationSuccess(success)) { | ||
throw new Error("simulation incorrect: ".concat(JSON.stringify(success))); | ||
@@ -23,0 +23,0 @@ } |
{ | ||
"name": "stellar-sdk", | ||
"version": "11.0.0-beta.5", | ||
"version": "11.0.0-beta.6", | ||
"description": "A library for working with the Stellar network, including communication with the Horizon and Soroban RPC servers.", | ||
@@ -86,3 +86,3 @@ "keywords": [ | ||
"@babel/register": "^7.22.15", | ||
"@definitelytyped/dtslint": "^0.0.184", | ||
"@definitelytyped/dtslint": "^0.0.189", | ||
"@istanbuljs/nyc-config-babel": "3.0.0", | ||
@@ -95,7 +95,7 @@ "@stellar/tsconfig": "^1.0.2", | ||
"@types/mocha": "^10.0.2", | ||
"@types/node": "^20.8.8", | ||
"@types/node": "^20.8.10", | ||
"@types/randombytes": "^2.0.1", | ||
"@types/sinon": "^10.0.19", | ||
"@types/urijs": "^1.19.20", | ||
"@typescript-eslint/parser": "^6.7.4", | ||
"@typescript-eslint/parser": "^6.9.1", | ||
"axios-mock-adapter": "^1.22.0", | ||
@@ -147,7 +147,7 @@ "babel-loader": "^9.1.3", | ||
"dependencies": { | ||
"axios": "^1.5.1", | ||
"axios": "^1.6.0", | ||
"bignumber.js": "^9.1.2", | ||
"eventsource": "^2.0.2", | ||
"randombytes": "^2.1.0", | ||
"stellar-base": "10.0.0-beta.3", | ||
"stellar-base": "10.0.0-beta.4", | ||
"toml": "^3.0.0", | ||
@@ -154,0 +154,0 @@ "urijs": "^1.19.1" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
3231906
55697
+ Addedstellar-base@10.0.0-beta.4(transitive)
- Removedstellar-base@10.0.0-beta.3(transitive)
Updatedaxios@^1.6.0
Updatedstellar-base@10.0.0-beta.4