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 Compare versions

Comparing version 10.0.1 to 10.1.0-beta.0

23

CHANGELOG.md

@@ -9,2 +9,25 @@ # Changelog

## [v10.1.0-beta.0](https://github.com/stellar/js-stellar-sdk/compare/v10.0.1...v10.1.0-beta.0)
### Add
- Add a way to filter offers by seller: `OfferCallBuilder.seller(string)`, corresponding to `GET /offers?seller=<string>` ([#773](https://github.com/stellar/js-stellar-sdk/pull/773)).
### Add
- Support for Protocol 19 ([#775](https://github.com/stellar/js-stellar-sdk/pull/775)):
* new precondition fields on a `TransactionResponse`
* new account fields on `AccountResponse` and `AccountRecord`
* bumping `stellar-base` to the latest beta version
### Fix
- Add missing field to account responses: `last_modified_time` which is the time equivalent of the existing `last_modified_ledger` ([#770](https://github.com/stellar/js-stellar-sdk/pull/770)).
- Stop opening extra connections when SSE streams receive `event: close` events ([#772](https://github.com/stellar/js-stellar-sdk/pull/772)).
- Fix SSE streams not loading under React Native (thank you, @hunterpetersen!) ([#761](https://github.com/stellar/js-stellar-sdk/pull/761)).
## [v10.0.1](https://github.com/stellar/js-stellar-sdk/compare/v10.0.0...v10.0.1)

@@ -11,0 +34,0 @@

3

lib/account_response.d.ts

@@ -8,2 +8,4 @@ import { Horizon } from "./horizon_api";

sequence: string;
readonly sequence_ledger?: number;
readonly sequence_time?: string;
readonly subentry_count: number;

@@ -13,2 +15,3 @@ readonly home_domain?: string;

readonly last_modified_ledger: number;
readonly last_modified_time: string;
readonly thresholds: Horizon.AccountThresholds;

@@ -15,0 +18,0 @@ readonly flags: Horizon.Flags;

11

lib/call_builder.js

@@ -20,5 +20,8 @@ "use strict";

}
else {
else if (anyGlobal.window.EventSource) {
EventSource = anyGlobal.window.EventSource;
}
else {
EventSource = require("eventsource");
}
var CallBuilder = (function () {

@@ -66,11 +69,5 @@ function CallBuilder(serverUrl, neighborRoot) {

if (es) {
var closed_1 = false;
var onClose_1 = function () {
if (closed_1) {
return;
}
clearTimeout(timeout);
es.close();
createEventSource();
closed_1 = true;
};

@@ -77,0 +74,0 @@ var onMessage = function (message) {

@@ -29,2 +29,16 @@ /// <reference types="node" />

}
interface TransactionPreconditions {
timebounds?: {
min_time: string;
max_time: string;
};
ledgerbounds?: {
min_ledger: number;
max_ledger: number;
};
min_account_sequence?: string;
min_account_sequence_age?: string;
min_account_sequence_ledger_gap?: number;
extra_signers?: string[];
}
interface TransactionResponse extends SubmitTransactionResponse, BaseResponse<"account" | "ledger" | "operations" | "effects" | "succeeds" | "precedes"> {

@@ -47,2 +61,3 @@ created_at: string;

fee_bump_transaction?: FeeBumpTransactionResponse;
preconditions?: TransactionPreconditions;
}

@@ -121,4 +136,8 @@ interface BalanceLineNative {

sequence: string;
sequence_ledger?: number;
sequence_time?: string;
subentry_count: number;
thresholds: AccountThresholds;
last_modified_ledger: number;
last_modified_time: string;
flags: Flags;

@@ -125,0 +144,0 @@ balances: BalanceLine[];

@@ -12,2 +12,3 @@ /// <reference types="urijs" />

sponsor(id: string): this;
seller(seller: string): this;
}

@@ -47,2 +47,6 @@ "use strict";

};
OfferCallBuilder.prototype.seller = function (seller) {
this.url.setQuery("seller", seller);
return this;
};
return OfferCallBuilder;

@@ -49,0 +53,0 @@ }(call_builder_1.CallBuilder));

@@ -41,2 +41,4 @@ import { Asset } from "stellar-base";

sequence: string;
sequence_ledger?: number;
sequence_time?: string;
subentry_count: number;

@@ -46,2 +48,3 @@ home_domain?: string;

last_modified_ledger: number;
last_modified_time: string;
thresholds: Horizon.AccountThresholds;

@@ -48,0 +51,0 @@ flags: Horizon.Flags;

@@ -10,2 +10,3 @@ import { AssetType } from "stellar-base";

num_claimable_balances: number;
num_liquidity_pools: number;
balances: Horizon.AssetBalances;

@@ -15,3 +16,4 @@ claimable_balances_amount: string;

num_accounts: number;
liquidity_pools_amount: string;
flags: Horizon.Flags;
}
{
"name": "stellar-sdk",
"version": "10.0.1",
"version": "10.1.0-beta.0",
"description": "stellar-sdk is a library for working with the Stellar Horizon server.",

@@ -141,3 +141,3 @@ "main": "./lib/index.js",

"randombytes": "^2.1.0",
"stellar-base": "^7.0.0",
"stellar-base": "^8.0.0-beta.0",
"toml": "^2.3.0",

@@ -144,0 +144,0 @@ "tslib": "^1.10.0",

@@ -135,5 +135,5 @@ <div align="center">

3. Install Node 12
3. Install Node 14
Because we support the latest maintenance version of Node, please install and develop on Node 12 so you don't get surprised when your code works locally but breaks in CI.
Because we support the latest maintenance version of Node, please install and develop on Node 14 so you don't get surprised when your code works locally but breaks in CI.

@@ -145,3 +145,3 @@ Here's how to install `nvm` if you haven't: https://github.com/creationix/nvm

# if you've never installed 12 before you'll want to re-install yarn
# if you've never installed 14 before you'll want to re-install yarn
npm install -g yarn

@@ -185,3 +185,26 @@ ```

#### Using in an Expo managed workflow
1. Add the following postinstall script:
```
yarn rn-nodeify --install process,url,events,https,http,util,stream,crypto,vm,buffer --hack --yarn
```
2. `yarn add -D rn-nodeify`
3. Add `import "./shim";` to the your app's entry point (by default `./App.js`)
4. `yarn add stellar-sdk`
5. `expo install expo-random`
At this point, the stellar SDK will work, except that `StellarSdk.Keypair.random()` will throw an error. So to work around this you can create your own method to generate a random keypair like this:
```javascript
import * as Random from 'expo-random';
import StellarSdk from 'stellar-sdk';
const generateRandomKeypair = () => {
const randomBytes = Random.getRandomBytes(32);
return StellarSdk.Keypair.fromRawEd25519Seed(Buffer.from(randomBytes));
};
```
## Usage

@@ -188,0 +211,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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