From 58ae561e72617018234fa12066292215230acbdd Mon Sep 17 00:00:00 2001 From: Raja Babu Date: Tue, 28 Jan 2020 21:01:31 +0530 Subject: [PATCH 1/6] Remove node engline restriction (#294) This is working with each node engine so remove the restriction. --- package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/package.json b/package.json index 4fb5773ae..fd698043e 100644 --- a/package.json +++ b/package.json @@ -35,9 +35,6 @@ "keywords": [ "stellar" ], - "engines": { - "node": ">=10.16.3" - }, "author": "Scott Fleckenstein ", "license": "Apache-2.0", "bugs": { From 606f4e8f2a94cced2f1d41419a91e82af428a12d Mon Sep 17 00:00:00 2001 From: Tyler van der Hoeven Date: Fri, 31 Jan 2020 15:44:08 -0500 Subject: [PATCH 2/6] Added `toXDR` type to Transaction class (#296) --- types/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/index.d.ts b/types/index.d.ts index 3bbc4f0df..2fa8d66ea 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -514,6 +514,7 @@ export class Transaction< signatureBase(): Buffer; signHashX(preimage: Buffer | string): void; toEnvelope(): xdr.TransactionEnvelope; + toXDR(): string; operations: TOps; sequence: string; From 84b3c16d76cd2787409e45c20dc04ca0e10915a5 Mon Sep 17 00:00:00 2001 From: Carl Vitullo Date: Fri, 7 Feb 2020 14:26:09 -0500 Subject: [PATCH 3/6] Fix doc link (#298) * Fix doc link * Fix more doc links --- docs/reference/base-examples.md | 4 ++-- src/asset.js | 2 +- src/memo.js | 2 +- src/operation.js | 2 +- src/operations/create_account.js | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/reference/base-examples.md b/docs/reference/base-examples.md index 3e49556f7..74bdfc0d4 100644 --- a/docs/reference/base-examples.md +++ b/docs/reference/base-examples.md @@ -75,7 +75,7 @@ In the example below we're sending 1000 XLM (at max) from `GABJLI6IVBKJ7HIC5NN7H * `USD` issued by `GBBM6BKZPEHWYO3E3YKREDPQXMS4VK35YLNU7NFBRI26RAN7GI5POFBB`, * `EUR` issued by `GDTNXRLOJD2YEBPKK7KCMR7J33AAG5VZXHAJTHIG736D6LVEFLLLKPDL`. -The [path payment](https://www.stellar.org/developers/learn/concepts/list-of-operations.html#path-payment) will cause the destination address to get 5.5 GBP. It will cost the sender no more than 1000 XLM. In this example there will be 3 exchanges, XLM -> USD, USD-> EUR, EUR->GBP. +The [path payment](https://www.stellar.org/developers/guides/concepts/list-of-operations.html#path-payment) will cause the destination address to get 5.5 GBP. It will cost the sender no more than 1000 XLM. In this example there will be 3 exchanges, XLM -> USD, USD-> EUR, EUR->GBP. ```js var keypair = StellarSdk.Keypair.fromSecret(secretString); @@ -104,7 +104,7 @@ transaction.sign(keypair); ## Multi-signature account -[Multi-signature accounts](https://www.stellar.org/developers/learn/concepts/multi-sig.html) can be used to require that transactions require multiple public keys to sign before they are considered valid. +[Multi-signature accounts](https://www.stellar.org/developers/guides/concepts/multi-sig.html) can be used to require that transactions require multiple public keys to sign before they are considered valid. This is done by first configuring your account's "threshold" levels. Each operation has a threshold level of either low, medium, or high. You give each threshold level a number between 1-255 in your account. Then, for each key in your account, you assign it a weight (1-255, setting a 0 weight deletes the key). Any transaction must be signed with enough keys to meet the threshold. diff --git a/src/asset.js b/src/asset.js index ea45be48c..d412699ab 100644 --- a/src/asset.js +++ b/src/asset.js @@ -114,7 +114,7 @@ export class Asset { } /** - * @see [Assets concept](https://www.stellar.org/developers/learn/concepts/assets.html) + * @see [Assets concept](https://www.stellar.org/developers/guides/concepts/assets.html) * @returns {string} Asset type. Can be one of following types: * * * `native` diff --git a/src/memo.js b/src/memo.js index 988822b35..51819486d 100644 --- a/src/memo.js +++ b/src/memo.js @@ -31,7 +31,7 @@ export const MemoReturn = 'return'; * * @param {string} type - `MemoNone`, `MemoID`, `MemoText`, `MemoHash` or `MemoReturn` * @param {*} value - `string` for `MemoID`, `MemoText`, buffer of hex string for `MemoHash` or `MemoReturn` - * @see [Transactions concept](https://www.stellar.org/developers/learn/concepts/transactions.html) + * @see [Transactions concept](https://www.stellar.org/developers/guides/concepts/transactions.html) * @class Memo */ export class Memo { diff --git a/src/operation.js b/src/operation.js index 799280a4c..2bc7ac28d 100644 --- a/src/operation.js +++ b/src/operation.js @@ -40,7 +40,7 @@ export const AuthRevocableFlag = 1 << 1; export const AuthImmutableFlag = 1 << 2; /** - * `Operation` class represents [operations](https://www.stellar.org/developers/learn/concepts/operations.html) in Stellar network. + * `Operation` class represents [operations](https://www.stellar.org/developers/guides/concepts/operations.html) in Stellar network. * Use one of static methods to create operations: * * `{@link Operation.createAccount}` * * `{@link Operation.payment}` diff --git a/src/operations/create_account.js b/src/operations/create_account.js index d5b425d66..b2662643e 100644 --- a/src/operations/create_account.js +++ b/src/operations/create_account.js @@ -9,7 +9,7 @@ import { StrKey } from '../strkey'; * @param {object} opts Options object * @param {string} opts.destination - Destination account ID to create an account for. * @param {string} opts.startingBalance - Amount in XLM the account should be funded for. Must be greater - * than the [reserve balance amount](https://www.stellar.org/developers/learn/concepts/fees.html). + * than the [reserve balance amount](https://www.stellar.org/developers/guides/concepts/fees.html). * @param {string} [opts.source] - The source account for the payment. Defaults to the transaction's source account. * @returns {xdr.CreateAccountOp} Create account operation */ From 7ea6cac92f393083e5ccf301eb447e0fc839b1bb Mon Sep 17 00:00:00 2001 From: Chase Oliphant Date: Mon, 10 Feb 2020 07:55:27 -0800 Subject: [PATCH 4/6] Update creating an account example (#299) Related to https://github.com/stellar/docs/issues/431 I think the `.setTimeout()` was missed in this example. --- docs/reference/base-examples.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/reference/base-examples.md b/docs/reference/base-examples.md index 74bdfc0d4..5214ea651 100644 --- a/docs/reference/base-examples.md +++ b/docs/reference/base-examples.md @@ -33,6 +33,7 @@ server.accounts() destination: destination.publicKey(), startingBalance: '25' })) + .setTimeout(30) .build() transaction.sign(StellarSdk.Keypair.fromSecret(source.secret())) return server.submitTransaction(transaction) From cf0b5249510cb9de4429f9d24682001d71d48884 Mon Sep 17 00:00:00 2001 From: Paul Selden Date: Tue, 18 Feb 2020 11:23:46 -0500 Subject: [PATCH 5/6] Use console.trace to get line num in Networks.use (#300) Fixes https://github.com/stellar/js-stellar-sdk/issues/415 --- src/network.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network.js b/src/network.js index 305fb1474..275527414 100644 --- a/src/network.js +++ b/src/network.js @@ -53,7 +53,7 @@ export class Network { * @returns {void} */ static use(network) { - console.warn( + console.trace( 'Global class `Network` is deprecated. Please pass explicit argument instead, e.g. `new Transaction(envelope, Networks.PUBLIC)` (see https://git.io/fj9fG for more info).' ); From 6bb4a4d3ab63cf56718be5c7d3212804a2216348 Mon Sep 17 00:00:00 2001 From: Adolfo Builes Date: Tue, 18 Feb 2020 15:02:31 -0500 Subject: [PATCH 6/6] v2.1.5. (#301) --- CHANGELOG.md | 15 +++++++++++++++ package.json | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 526ce91ab..3ab8cddfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,21 @@ A breaking change will get clearly notified in this log. ## Unreleased +## [v2.1.5](https://github.com/stellar/js-stellar-base/compare/v2.1.4..v2.1.5) + +### Add +- Add `toXDR` type to Transaction class ([#296](https://github.com/stellar/js-stellar-base/issues/296)) + +### Fix +- Fix doc link ([#298](https://github.com/stellar/js-stellar-base/issues/298)) + +### Remove +- Remove node engine restriction ([#294](https://github.com/stellar/js-stellar-base/issues/294)) + +### Update +- Update creating an account example ([#299](https://github.com/stellar/js-stellar-base/issues/299)) +- Use `console.trace` to get line num in `Networks.use` ([#300](https://github.com/stellar/js-stellar-base/issues/300)) + ## [v2.1.4](https://github.com/stellar/js-stellar-base/compare/v2.1.3..v2.1.4) ## Update diff --git a/package.json b/package.json index fd698043e..f39283735 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stellar-base", - "version": "2.1.4", + "version": "2.1.5", "description": "Low level stellar support library", "main": "./lib/index.js", "types": "./types/index.d.ts",