New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stellar-sdk

Package Overview
Dependencies
Maintainers
9
Versions
166
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stellar-sdk - npm Package Versions

13
17

12.0.0-rc.2

Diff

Changelog

Source

v12.0.0-rc.2

This update supports Protocol 21. It is an additive change to the protocol so there are no true backwards incompatibilities, but your software may break if you encounter new unexpected fields from this Protocol (#949).

Breaking Changes

  • The default timeout for transaction calls is now set to 300 seconds (5 minutes) from the previous default of 10 seconds. 10 seconds is often not enough time to review transactions before signing, especially in Freighter or using a hardware wallet like a Ledger, which would cause a txTooLate error response from the server. Five minutes is also the value used by the CLI, so this brings the two into alignment (#956).

Fixed

  • Dependencies have been properly updated to pull in Protocol 21 XDR (#959).
stellar-npm-ci
published 12.0.0-rc.1 •

Changelog

Source

v12.0.0-rc.1

Breaking Changes

  • This update supports Protocol 21. It is an additive change to the protocol so there are no true backwards incompatibilities, but your software may break if you encounter new unexpected fields from this Protocol (#949).

Fixed

  • Each item in the GetEventsResponse.events list will now have a txHash item corresponding to the transaction hash that triggered a particular event (#939).
  • ContractClient now properly handles methods that take no arguments by making MethodOptions the only parameter, bringing it inline with the types generated by Soroban CLI's soroban contract bindings typescript (#940).
  • ContractClient now allows publicKey to be undefined (#941).
  • SentTransaction will only pass allowHttp if (and only if) its corresponding AssembledTransaction#options config allowed it (#952).
  • SentTransaction will now modify the time bounds of the transaction to be timeoutInSeconds seconds after the transaction has been simulated. Previously this was set when the transaction is built, before the simulation. This makes the time bounds line up with the timeout retry logic in SentTransaction.
stellar-npm-ci
published 12.0.0 •

Changelog

Source

v12.0.0-rc.3

Breaking Changes

  • ContractClient functionality previously added in v11.3.0 was exported in a non-standard way. You can now import it as any other stellar-sdk module (#962):
-import { ContractClient } from '@stellar/stellar-sdk/lib/contract_client'
+import { contract } from '@stellar/stellar-sdk'
+const { Client } = contract

Note that this top-level contract export is a container for ContractClient and related functionality. The ContractClient class is now available at contract.Client, as shown. Further note that there is a capitalized Contract export as well, which comes from stellar-base. You can remember which is which because capital-C Contract is a class, whereas lowercase-c contract is a container/module with a bunch of classes, functions, and types.

Additionally, this is available from the /contract entrypoint, if your version of Node and TypeScript support the exports declaration. Finally, some of its exports have been renamed:

import {
-  ContractClient,
+  Client,
   AssembledTransaction,
-  ContractClientOptions,
+  ClientOptions,
   SentTransaction,
-} from '@stellar/stellar-sdk/lib/contract_client'
+} from '@stellar/stellar-sdk/contract'
  • The ContractSpec class is now nested under the contract module, and has been renamed to Spec (#962). Alternatively, you can import this from the contract entrypoint, if your version of Node and TypeScript support the exports declaration:
-import { ContractSpec } from '@stellar/stellar-sdk'
+import { contract } from '@stellar/stellar-sdk'
+const { Spec } = contract
// OR
+import { Spec } from '@stellar/stellar-sdk/contract'
  • Previously, AssembledTransaction.signAndSend() would return a SentTransaction even if the transaction was never finalized. That is, if it successfully sent the transaction to the network, but the transaction was still status: 'PENDING', then it would console.error an error message, but return the indeterminate transaction anyhow. It now throws a SentTransaction.Errors.TransactionStillPending error with that error message instead (#962).

Deprecated

  • SorobanRpc module is now also exported as rpc (#962). You can import it with either name for now, but SorobanRpc will be removed in a future release:
-import { SorobanRpc } from '@stellar/stellar-sdk'
+import { rpc } from '@stellar/stellar-sdk'

You can also now import it at the /rpc entrypoint, if your version of Node and TypeScript support the exports declaration.

-import { SorobanRpc } from '@stellar/stellar-sdk'
-const { Api } = SorobanRpc
+import { Api } from '@stellar/stellar-sdk/rpc'

Added

  • New methods on contract.Client (#960):
    • from(opts: ContractClientOptions) instantiates contract.Client by fetching the contractId's WASM from the network to fill out the client's ContractSpec.
    • fromWasm and fromWasmHash methods to instantiate a contract.Client when you already have the WASM bytes or hash alongside the contract.ClientOptions.
  • New methods on rpc.Server (#960):
    • getContractWasmByContractId and getContractWasmByHash to retrieve a contract's WASM bytecode via its contractId or wasmHash, respectively.

Fixed

  • The breaking changes above (strictly speaking, they are not breaking changes because importing from the inner guts of the SDK is not supported) enable the contract module to be used in non-Node environments.
stellar-npm-ci
published 11.3.0 •

Changelog

Source

v11.3.0

Added

  • Introduces an entire suite of helpers to assist with interacting with smart contracts (#929):
    • ContractClient: generate a class from the contract specification where each Rust contract method gets a matching method in this class. Each method returns an AssembledTransaction that can be used to modify, simulate, decode results, and possibly sign, & submit the transaction.
    • AssembledTransaction: used to wrap a transaction-under-construction and provide high-level interfaces to the most common workflows, while still providing access to low-level transaction manipulation.
    • SentTransaction: transaction sent to the Soroban network, in two steps - initial submission and waiting for it to finalize to get the result (retried with exponential backoff)

Fixed

  • Upgrade underlying dependencies, including @stellar/js-xdr which should broaden compatibility to pre-ES2016 environments (#932, #930).

Fixed

  • SorobanRpc: remove all instances of array-based parsing to conform to future breaking changes in Soroban RPC (#924).
stellar-npm-ci
published 11.2.2 •

Changelog

Source

v11.2.2

Fixed

  • Event streaming tests now pass on Node 20, which seems to have tighter conformance to the spec (#917).
  • @stellar/stellar-base has been upgraded to its latest major version (#918, see v11.0.0 for release notes).
stellar-npm-ci
published 11.2.1 •

Changelog

Source

v11.2.1

Fixed

  • An unnecessary dependency has been removed which was causing a TypeScript error in certain environments (#912).
  • Dependencies have been upgraded (see stellar-base@v10.0.2 for release notes, #913).
stellar-npm-ci
published 11.2.0 •

Changelog

Source

v11.2.0

Added

  • Support for the new, optional diagnosticEventsXdr field on the SorobanRpc.Server.sendTransaction method. The raw field will be present when using the _sendTransaction method, while the normal method will have an already-parsed diagnosticEvents: xdr.DiagnosticEvent[] field, instead (#905).
  • A new exported interface SorobanRpc.Api.EventResponse so that developers can type-check individual events (#904).

Updated

  • Dependencies have been updated to their latest versions (#906, #908).
stellar-npm-ci
published 11.1.0 •

Changelog

Source

v11.1.0

Added

  • 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).
  • ContractSpec now has a jsonSchema() method to generate a JSON Schema for a particular contract specification (#889).

Fixed

  • All dependencies have been updated to their latest versions, including stellar-base to v10.0.1 which included a small patch (#897).
stellar-npm-ci
published 11.0.1 •

Changelog

Source

v11.0.1

Fixed

  • SorobanRpc.Server.getEvents uses the correct type for the start ledger.
stellar-npm-ci
published 11.0.0 •

Changelog

Source

v11.0.0

Breaking Changes

  • The package has been renamed to @stellar/stellar-sdk.
  • The new minimum supported version is Node 18.
  • The PaymentCallBuilder was incorrectly indicating that it would return a collection of Payment records, while in reality it can return a handful of "payment-like" records (#885).

Fixed

  • The SorobanRpc.Server.getEvents method now correctly parses responses without a contractId field set. The events[i].contractId field on an event is now optional, omitted if there was no ID for the event (e.g. system events; (#883)).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc