From 46515627ab84fadcb9db4d5b177df0a04c78369e Mon Sep 17 00:00:00 2001
From: jonathanlei
// Derive a wallet from a bip39 Mnemonic
const wallet = Wallet.fromMnemonic(
'jewel insect retreat jump claim horse second chef west gossip bone frown exotic embark laundry'
)
console.log(wallet)
// Wallet {
// publicKey: '02348F89E9A6A3615BA317F8474A3F51D66221562D3CA32BFA8D21348FF67012B2',
// privateKey: '00A8F2E77FC0E05890C1B5088AFE0ECF9D96466A4419B897B1AB383E336E1735A2',
// classicAddress: 'rwZiksrExmVkR64pf87Jor4cYbmff47SUm',
// seed: undefined
// }.
// Derive a wallet from a base58 encoded seed.
const seedWallet = Wallet.fromSeed('ssZkdwURFMBXenJPbrpE14b6noJSu')
console.log(seedWallet)
// Wallet {
// publicKey: '02FE9932A9C4AA2AC9F0ED0F2B89302DE7C2C95F91D782DA3CF06E64E1C1216449',
// privateKey: '00445D0A16DD05EFAF6D5AF45E6B8A6DE4170D93C0627021A0B8E705786CBCCFF7',
// classicAddress: 'rG88FVLjvYiQaGftSa1cKuE2qNx7aK5ivo',
// seed: 'ssZkdwURFMBXenJPbrpE14b6noJSu'
// }.
// Sign a JSON Transaction
const signed = seedWallet.signTransaction({
TransactionType: 'Payment',
Account: 'rG88FVLjvYiQaGftSa1cKuE2qNx7aK5ivo'
...........
}).
console.log(signed)
// '1200007321......B01BE1DFF3'.
console.log(decode(signed))
// {
// TransactionType: 'Payment',
// SigningPubKey: '02FE9932A9C4AA2AC9F0ED0F2B89302DE7C2C95F91D782DA3CF06E64E1C1216449',
// TxnSignature: '3045022100AAD......5B631ABD21171B61B07D304',
// Account: 'rG88FVLjvYiQaGftSa1cKuE2qNx7aK5ivo'
// ...........
// }
+Example
// Derive a wallet from a base58 encoded seed.
const seedWallet = Wallet.fromSeed('ssZkdwURFMBXenJPbrpE14b6noJSu')
console.log(seedWallet)
// Wallet {
// publicKey: '02FE9932A9C4AA2AC9F0ED0F2B89302DE7C2C95F91D782DA3CF06E64E1C1216449',
// privateKey: '00445D0A16DD05EFAF6D5AF45E6B8A6DE4170D93C0627021A0B8E705786CBCCFF7',
// classicAddress: 'rG88FVLjvYiQaGftSa1cKuE2qNx7aK5ivo',
// seed: 'ssZkdwURFMBXenJPbrpE14b6noJSu'
// }.
// Sign a JSON Transaction
const signed = seedWallet.signTransaction({
TransactionType: 'Payment',
Account: 'rG88FVLjvYiQaGftSa1cKuE2qNx7aK5ivo'
...........
}).
console.log(signed)
// '1200007321......B01BE1DFF3'.
console.log(decode(signed))
// {
// TransactionType: 'Payment',
// SigningPubKey: '02FE9932A9C4AA2AC9F0ED0F2B89302DE7C2C95F91D782DA3CF06E64E1C1216449',
// TxnSignature: '3045022100AAD......5B631ABD21171B61B07D304',
// Account: 'rG88FVLjvYiQaGftSa1cKuE2qNx7aK5ivo'
// ...........
// }
@@ -26,7 +26,7 @@ It provides functionality to sign/verify transactions offline.
- Wallet
+Defined in packages/xrpl/src/Wallet/index.ts:83
@@ -96,29 +96,29 @@ It provides functionality to sign/verify transactions offline.
Returns Wallet
+Defined in packages/xrpl/src/Wallet/index.ts:107
Properties
Readonly classic Address
classic Address: string
+Defined in packages/xrpl/src/Wallet/index.ts:86
Readonly private Key
private Key: string
+Defined in packages/xrpl/src/Wallet/index.ts:85
Readonly public Key
public Key: string
+Defined in packages/xrpl/src/Wallet/index.ts:84
Optional Readonly seed
seed?: string
+Defined in packages/xrpl/src/Wallet/index.ts:87
Static from Secret
from Secret: ((seed: string, opts?: { algorithm?: ECDSA; masterAddress?: string }) => Wallet) = Wallet.fromSeed
@@ -155,7 +155,7 @@ It provides functionality to sign/verify transactions offline.
Returns Wallet
+Defined in packages/xrpl/src/Wallet/index.ts:163
Accessors
@@ -169,7 +169,7 @@ It provides functionality to sign/verify transactions offline.
Returns string
+Defined in packages/xrpl/src/Wallet/index.ts:94
Methods
@@ -199,7 +199,7 @@ the serialized Transaction desn't match the original transaction.
Returns void
+Defined in packages/xrpl/src/Wallet/index.ts:405
getXAddress
@@ -222,7 +222,7 @@ the serialized Transaction desn't match the original transaction.
Returns string
+Defined in packages/xrpl/src/Wallet/index.ts:389
sign
@@ -258,7 +258,7 @@ the serialized Transaction desn't match the original transaction.
-
tx_ blob: string
+Defined in packages/xrpl/src/Wallet/index.ts:311
verify Transaction
@@ -277,7 +277,7 @@ the serialized Transaction desn't match the original transaction.
Returns boolean
+Defined in packages/xrpl/src/Wallet/index.ts:372
Static Private derive Wallet
@@ -309,7 +309,7 @@ the serialized Transaction desn't match the original transaction.
Returns Wallet
+Defined in packages/xrpl/src/Wallet/index.ts:287
Static from Entropy
@@ -341,7 +341,7 @@ the serialized Transaction desn't match the original transaction.
Returns Wallet
+Defined in packages/xrpl/src/Wallet/index.ts:174
Static from Mnemonic
@@ -349,6 +349,11 @@ the serialized Transaction desn't match the original transaction.
-
Returns Wallet
+Defined in packages/xrpl/src/Wallet/index.ts:210
Static Private fromRFC1751 Mnemonic
@@ -418,7 +423,7 @@ the serialized Transaction desn't match the original transaction.
Returns Wallet
+Defined in packages/xrpl/src/Wallet/index.ts:259
Static from Seed
@@ -450,7 +455,7 @@ the serialized Transaction desn't match the original transaction.
Returns Wallet
+Defined in packages/xrpl/src/Wallet/index.ts:143
Static generate
@@ -469,7 +474,7 @@ the serialized Transaction desn't match the original transaction.
Returns Wallet
+Defined in packages/xrpl/src/Wallet/index.ts:129
diff --git a/packages/xrpl/HISTORY.md b/packages/xrpl/HISTORY.md
index 1bf160a6..87903cb1 100644
--- a/packages/xrpl/HISTORY.md
+++ b/packages/xrpl/HISTORY.md
@@ -10,6 +10,10 @@ Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xr
### Changed
+### Deprecated
+Wallet.fromMmnemonic()
+
+
## 2.6.0 (2022-11-21)
### Fixed
diff --git a/packages/xrpl/src/Wallet/index.ts b/packages/xrpl/src/Wallet/index.ts
index 48a66469..3ec76ece 100644
--- a/packages/xrpl/src/Wallet/index.ts
+++ b/packages/xrpl/src/Wallet/index.ts
@@ -48,17 +48,6 @@ function hexFromBuffer(buffer: Buffer): string {
*
* @example
* ```typescript
- * // Derive a wallet from a bip39 Mnemonic
- * const wallet = Wallet.fromMnemonic(
- * 'jewel insect retreat jump claim horse second chef west gossip bone frown exotic embark laundry'
- * )
- * console.log(wallet)
- * // Wallet {
- * // publicKey: '02348F89E9A6A3615BA317F8474A3F51D66221562D3CA32BFA8D21348FF67012B2',
- * // privateKey: '00A8F2E77FC0E05890C1B5088AFE0ECF9D96466A4419B897B1AB383E336E1735A2',
- * // classicAddress: 'rwZiksrExmVkR64pf87Jor4cYbmff47SUm',
- * // seed: undefined
- * // }.
*
* // Derive a wallet from a base58 encoded seed.
* const seedWallet = Wallet.fromSeed('ssZkdwURFMBXenJPbrpE14b6noJSu')
@@ -201,6 +190,11 @@ class Wallet {
/**
* Derives a wallet from a bip39 or RFC1751 mnemonic (Defaults to bip39).
*
+ * @deprecated since version 2.6.1.
+ * Will be deleted in version 3.0.0.
+ * This representation is currently deprecated in rippled.
+ * You should use another method to represent your keys such as a seed or public/private keypair.
+ *
* @param mnemonic - A string consisting of words (whitespace delimited) used to derive a wallet.
* @param opts - (Optional) Options to derive a Wallet.
* @param opts.masterAddress - Include if a Wallet uses a Regular Key Pair. It must be the master address of the account.
From f6b810e7bafd898cc13a64a32df6ea73aff604b3 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 15 Dec 2022 16:32:53 -0700
Subject: [PATCH 02/10] build(deps-dev): bump
eslint-plugin-consistent-default-export-name from 0.0.14 to 0.0.15 (#2063)
build(deps-dev): bump eslint-plugin-consistent-default-export-name
Bumps [eslint-plugin-consistent-default-export-name](https://github.com/minseoksuh/eslint-plugin-consistent-default-export-name) from 0.0.14 to 0.0.15.
- [Release notes](https://github.com/minseoksuh/eslint-plugin-consistent-default-export-name/releases)
- [Commits](https://github.com/minseoksuh/eslint-plugin-consistent-default-export-name/commits)
---
updated-dependencies:
- dependency-name: eslint-plugin-consistent-default-export-name
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
package-lock.json | 202 +++++++++++++++++++++++++++++++++-------------
package.json | 2 +-
2 files changed, 148 insertions(+), 56 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index f691361e..64dae834 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -34,7 +34,7 @@
"ejs": "^3.0.1",
"eslint": "^7.5.0",
"eslint-plugin-array-func": "^3.1.7",
- "eslint-plugin-consistent-default-export-name": "^0.0.14",
+ "eslint-plugin-consistent-default-export-name": "^0.0.15",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.24.1",
"eslint-plugin-jsdoc": "^37.1.0",
@@ -6218,20 +6218,100 @@
}
},
"node_modules/eslint-plugin-consistent-default-export-name": {
- "version": "0.0.14",
- "resolved": "https://registry.npmjs.org/eslint-plugin-consistent-default-export-name/-/eslint-plugin-consistent-default-export-name-0.0.14.tgz",
- "integrity": "sha512-9+YfYLQchFArcFvg7vHPjJZi3sUUIA5D2DWLmZzFbnmRf+wdX/9lgbKEaiJKfr+3/sYIvP71EdFlpjzOlSbm2Q==",
+ "version": "0.0.15",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-consistent-default-export-name/-/eslint-plugin-consistent-default-export-name-0.0.15.tgz",
+ "integrity": "sha512-gqW7dnJbWMxI5H6/Pyz6Sl/vBMwOktePMI2iuuKPb4N82uvemUkfaWhsRZCKndSzpIVaCZ9wdspCVO1tm0wXJQ==",
"dev": true,
"dependencies": {
- "lodash.camelcase": "^4.3.0",
- "lodash.kebabcase": "^4.1.1",
- "lodash.snakecase": "^4.1.1",
- "lodash.upperfirst": "^4.3.1"
+ "lodash": "^4.17.21",
+ "pkg-dir": "^5.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
+ "node_modules/eslint-plugin-consistent-default-export-name/node_modules/find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "dev": true,
+ "dependencies": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/eslint-plugin-consistent-default-export-name/node_modules/locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "dev": true,
+ "dependencies": {
+ "p-locate": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/eslint-plugin-consistent-default-export-name/node_modules/p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "dev": true,
+ "dependencies": {
+ "yocto-queue": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/eslint-plugin-consistent-default-export-name/node_modules/p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "dev": true,
+ "dependencies": {
+ "p-limit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/eslint-plugin-consistent-default-export-name/node_modules/path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/eslint-plugin-consistent-default-export-name/node_modules/pkg-dir": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz",
+ "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==",
+ "dev": true,
+ "dependencies": {
+ "find-up": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
"node_modules/eslint-plugin-eslint-comments": {
"version": "3.2.0",
"integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==",
@@ -10457,11 +10537,6 @@
"integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=",
"dev": true
},
- "node_modules/lodash.camelcase": {
- "version": "4.3.0",
- "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=",
- "dev": true
- },
"node_modules/lodash.flattendeep": {
"version": "4.4.0",
"integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=",
@@ -10472,21 +10547,11 @@
"integrity": "sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=",
"dev": true
},
- "node_modules/lodash.kebabcase": {
- "version": "4.1.1",
- "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=",
- "dev": true
- },
"node_modules/lodash.merge": {
"version": "4.6.2",
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
"dev": true
},
- "node_modules/lodash.snakecase": {
- "version": "4.1.1",
- "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=",
- "dev": true
- },
"node_modules/lodash.template": {
"version": "4.5.0",
"integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==",
@@ -10509,11 +10574,6 @@
"integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=",
"dev": true
},
- "node_modules/lodash.upperfirst": {
- "version": "4.3.1",
- "integrity": "sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984=",
- "dev": true
- },
"node_modules/log-symbols": {
"version": "4.1.0",
"integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
@@ -21820,15 +21880,67 @@
"requires": {}
},
"eslint-plugin-consistent-default-export-name": {
- "version": "0.0.14",
- "resolved": "https://registry.npmjs.org/eslint-plugin-consistent-default-export-name/-/eslint-plugin-consistent-default-export-name-0.0.14.tgz",
- "integrity": "sha512-9+YfYLQchFArcFvg7vHPjJZi3sUUIA5D2DWLmZzFbnmRf+wdX/9lgbKEaiJKfr+3/sYIvP71EdFlpjzOlSbm2Q==",
+ "version": "0.0.15",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-consistent-default-export-name/-/eslint-plugin-consistent-default-export-name-0.0.15.tgz",
+ "integrity": "sha512-gqW7dnJbWMxI5H6/Pyz6Sl/vBMwOktePMI2iuuKPb4N82uvemUkfaWhsRZCKndSzpIVaCZ9wdspCVO1tm0wXJQ==",
"dev": true,
"requires": {
- "lodash.camelcase": "^4.3.0",
- "lodash.kebabcase": "^4.1.1",
- "lodash.snakecase": "^4.1.1",
- "lodash.upperfirst": "^4.3.1"
+ "lodash": "^4.17.21",
+ "pkg-dir": "^5.0.0"
+ },
+ "dependencies": {
+ "find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^5.0.0"
+ }
+ },
+ "p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "dev": true,
+ "requires": {
+ "yocto-queue": "^0.1.0"
+ }
+ },
+ "p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^3.0.2"
+ }
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true
+ },
+ "pkg-dir": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz",
+ "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==",
+ "dev": true,
+ "requires": {
+ "find-up": "^5.0.0"
+ }
+ }
}
},
"eslint-plugin-eslint-comments": {
@@ -24984,11 +25096,6 @@
"integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=",
"dev": true
},
- "lodash.camelcase": {
- "version": "4.3.0",
- "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=",
- "dev": true
- },
"lodash.flattendeep": {
"version": "4.4.0",
"integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=",
@@ -24999,21 +25106,11 @@
"integrity": "sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=",
"dev": true
},
- "lodash.kebabcase": {
- "version": "4.1.1",
- "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=",
- "dev": true
- },
"lodash.merge": {
"version": "4.6.2",
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
"dev": true
},
- "lodash.snakecase": {
- "version": "4.1.1",
- "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=",
- "dev": true
- },
"lodash.template": {
"version": "4.5.0",
"integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==",
@@ -25036,11 +25133,6 @@
"integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=",
"dev": true
},
- "lodash.upperfirst": {
- "version": "4.3.1",
- "integrity": "sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984=",
- "dev": true
- },
"log-symbols": {
"version": "4.1.0",
"integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
diff --git a/package.json b/package.json
index b44fc1e8..301b18cd 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,7 @@
"ejs": "^3.0.1",
"eslint": "^7.5.0",
"eslint-plugin-array-func": "^3.1.7",
- "eslint-plugin-consistent-default-export-name": "^0.0.14",
+ "eslint-plugin-consistent-default-export-name": "^0.0.15",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.24.1",
"eslint-plugin-jsdoc": "^37.1.0",
From 2f150b6219a3e28f7529dca8a9cf0de488bc132f Mon Sep 17 00:00:00 2001
From: Jackson Mills
Date: Mon, 19 Dec 2022 12:48:33 -0800
Subject: [PATCH 03/10] Update CONTRIBUTING.md (#2163)
* Update CONTRIBUTING with architecture
---
CONTRIBUTING.md | 71 ++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 58 insertions(+), 13 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 0bd6b4c1..c7e3f2f8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,5 +1,13 @@
# Contributing
+### High Level Process to Contribute Code
+
+- You should open a PR against `main` and ensure that all CI passes.
+- Your changes should have [unit](#unit-tests) and/or [integration tests](#integration-tests).
+- Your changes should [pass the linter](#run-the-linter).
+- You should get a full code review from two of the maintainers.
+- Then you can merge your changes. (Which will then be included in the next release)
+
## Set up your dev environment
### Requirements
@@ -38,6 +46,7 @@ npm run lint
```
## Running Tests
+
For integration and browser tests, we use a `rippled` node in standalone mode to test xrpl.js code against. To set this up, you can either run `rippled` locally, or set up the Docker container `natenichols/rippled-standalone:latest` for this purpose. The latter will require you to [install Docker](https://docs.docker.com/get-docker/).
### Unit Tests
@@ -73,6 +82,50 @@ docker run -p 6006:6006 -it natenichols/rippled-standalone:latest
npm run test:browser
```
+## High Level Architecture
+
+This is a monorepo, which means that there are multiple packages in a single GitHub repository using [Lerna](https://lerna.js.org/).
+
+The 4 packages currently here are:
+
+1. xrpl.js - The client library for interacting with the ledger.
+2. ripple-binary-codec - A library for serializing and deserializing transactions for the ledger.
+3. ripple-keypairs - A library for generating and using cryptographic keypairs.
+4. ripple-address-codec - A library for encoding and decoding XRP Ledger addresses and seeds.
+
+Each package has it's own README which dives deeper into what it's main purpose is, and the core functionality it offers.
+They also run tests independently as they were originally in separate repositories.
+
+These are managed in a monorepo because often a change in a lower-level library will also require a change in xrpl.js, and so it makes sense to be able to allow for modifications of all packages at once without coordinating versions across multiple repositories.
+
+Let's dive a bit into how xrpl.js is structured!
+
+### The File Structure
+
+Within the xrpl package, each folder has a specific purpose:
+
+**Client** - This contains logic for handling the websocket connection to rippled servers.
+**Models** - These types model LedgerObjects, Requests/Methods, and Transactions in order to give type hints and nice errors for users.
+**Sugar** - This is where handy helper functions end up, like `submit`, `autofill`, and `getXRPBalance` amongst others.
+**Utils** - These are shared functions which are useful for conversions, or internal implementation details within the library.
+**Wallet** - This logic handles managing keys, addresses, and signing within xrpl.js
+
+### Writing Tests for xrpl.js
+
+For every file in `src`, we try to have a corresponding file in `test` with unit tests.
+
+The goal is to maintain above 80% code coverage, and generally any new feature or bug fix should be accompanied by unit tests, and integration tests if applicable.
+
+For an example of a unit test, check out the [autofill tests here](./packages/xrpl/test/client/autofill.ts).
+
+If your code connects to the ledger (ex. Adding a new transaction type) it's handy to write integration tests to ensure that you can successfully interact with the ledger. Integration tests are generally run against a docker instance of rippled which contains the latest updates. Since standalone mode allows us to manually close ledgers, this allows us to run integration tests at a much faster rate than if we had to wait 4-5 seconds per transaction for the ledger to validate the transaction. [See above](#running-tests) for how to start up the docker container to run integration tests.
+
+All integration tests should be written in the `test/integration` folder, with new `Requests` and `Transactions` tests being in their respective folders.
+
+One last note for integration tests is that all imports from `xrpl.js` should be from `xrpl-local` instead of `../../src`. This is required for the integraiton tests to run in the browser.
+
+For an example of how to write an integration test for `xrpl.js`, you can look at the [Payment integration test](./packages/xrpl/test/integration/transactions/payment.ts).
+
## Generate reference docs
You can see the complete reference documentation at [`xrpl.js` docs](https://js.xrpl.org). You can also generate them locally using `typedoc`:
@@ -84,6 +137,7 @@ npm run docgen
This updates `docs/` at the top level, where GitHub Pages looks for the docs.
## Update `definitions.json`
+
Use [this repo](https://github.com/RichardAH/xrpl-codec-gen) to generate a new `definitions.json` file from the rippled source code. Instructions are available in that README.
## Adding and removing packages
@@ -119,21 +173,12 @@ npm uninstall abbrev -w xrpl
## Release process
-### Editing the Code
-
-* Your changes should have unit and/or integration tests.
-* Your changes should pass the linter.
-* Your code should pass all the tests on Github (which check the linter, unit and integration tests on Node 12/14/16, and browser tests).
-* Open a PR against `main` and ensure that all CI passes.
-* Get a full code review from one of the maintainers.
-* Merge your changes.
-
### Release
1. Ensure that all tests passed on the last CI that ran on `main`.
-___
+
NOW WE ARE READY TO PUBLISH! No new code changes happen manually now.
-___
+
2. Checkout `main` and `git pull`.
3. Create a new branch to capture updates that take place during this process. `git checkout -b `
4. Update `HISTORY.md` to reflect release changes.
@@ -149,9 +194,8 @@ ___
14. Create a new branch to capture the updated packages from the release (`git checkout -b `)
15. Make a PR to merge those changes into `main`
-___
NOW YOU HAVE PUBLISHED! But you're not done; we have to notify people!
-___
+
16. Pull the most recent changes to main locally.
17. Run `git tag -m `, where `` is the new package and version (e.g. `xrpl@2.1.1`), for each version released.
18. Run `git push --follow-tags`, to push the tags to Github.
@@ -163,6 +207,7 @@ ___
24. Send an email to [xrpl-announce](https://groups.google.com/g/xrpl-announce).
## Mailing Lists
+
We have a low-traffic mailing list for announcements of new `xrpl.js` releases. (About 1 email every couple of weeks)
+ [Subscribe to xrpl-announce](https://groups.google.com/g/xrpl-announce)
From 0ff51fe34c4454d061575ecfcd24f0f488609632 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 19 Dec 2022 15:17:56 -0700
Subject: [PATCH 04/10] build(deps): bump minimatch from 3.0.4 to 3.1.2 (#2134)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)
---
updated-dependencies:
- dependency-name: minimatch
dependency-type: indirect
...
Signed-off-by: dependabot[bot]
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jackson Mills
---
package-lock.json | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 64dae834..73adabe3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -7187,9 +7187,9 @@
}
},
"node_modules/filelist/node_modules/minimatch": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz",
- "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==",
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz",
+ "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
"dev": true,
"dependencies": {
"brace-expansion": "^2.0.1"
@@ -11053,8 +11053,9 @@
"integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
},
"node_modules/minimatch": {
- "version": "3.0.4",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"dependencies": {
"brace-expansion": "^1.1.7"
@@ -15899,9 +15900,9 @@
}
},
"node_modules/typedoc/node_modules/minimatch": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz",
- "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==",
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz",
+ "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
"dev": true,
"dependencies": {
"brace-expansion": "^2.0.1"
@@ -22602,9 +22603,9 @@
}
},
"minimatch": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz",
- "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==",
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz",
+ "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
"dev": true,
"requires": {
"brace-expansion": "^2.0.1"
@@ -25487,8 +25488,9 @@
"integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
},
"minimatch": {
- "version": "3.0.4",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
@@ -29166,9 +29168,9 @@
}
},
"minimatch": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz",
- "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==",
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz",
+ "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==",
"dev": true,
"requires": {
"brace-expansion": "^2.0.1"
From c4af8116294bd4edf6cd8399f352a37a994e28cb Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 3 Jan 2023 15:48:53 +0000
Subject: [PATCH 05/10] build(deps): bump qs from 6.5.2 to 6.5.3 (#2161)
---
package-lock.json | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 73adabe3..68362b7d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13730,8 +13730,9 @@
}
},
"node_modules/request/node_modules/qs": {
- "version": "6.5.2",
- "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
+ "version": "6.5.3",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz",
+ "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==",
"dev": true,
"engines": {
"node": ">=0.6"
@@ -27528,8 +27529,9 @@
},
"dependencies": {
"qs": {
- "version": "6.5.2",
- "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
+ "version": "6.5.3",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz",
+ "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==",
"dev": true
}
}
From 2944a0f76821a1d25c391202a736d7b65dc6b2e8 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 3 Jan 2023 16:43:32 +0000
Subject: [PATCH 06/10] build(deps): bump decode-uri-component from 0.2.0 to
0.2.2 (#2157)
---
package-lock.json | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 68362b7d..f6d700aa 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5545,8 +5545,9 @@
"integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ=="
},
"node_modules/decode-uri-component": {
- "version": "0.2.0",
- "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
+ "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
"dev": true,
"engines": {
"node": ">=0.10"
@@ -21348,8 +21349,9 @@
"integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ=="
},
"decode-uri-component": {
- "version": "0.2.0",
- "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
+ "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
"dev": true
},
"dedent": {
From b2c2b59a320b74cb950a2b04153615449e2382e3 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 3 Jan 2023 18:18:08 +0000
Subject: [PATCH 07/10] build(deps-dev): bump webpack from 5.72.0 to 5.75.0
(#2139)
---
package-lock.json | 62 ++++++++++++++++++++++++-----------------------
1 file changed, 32 insertions(+), 30 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index f6d700aa..bc752f0e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5873,9 +5873,9 @@
}
},
"node_modules/enhanced-resolve": {
- "version": "5.9.3",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz",
- "integrity": "sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==",
+ "version": "5.12.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
+ "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==",
"dev": true,
"dependencies": {
"graceful-fs": "^4.2.4",
@@ -16286,9 +16286,9 @@
}
},
"node_modules/watchpack": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz",
- "integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==",
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
+ "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
"dev": true,
"dependencies": {
"glob-to-regexp": "^0.4.1",
@@ -16315,9 +16315,9 @@
}
},
"node_modules/webpack": {
- "version": "5.72.0",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.72.0.tgz",
- "integrity": "sha512-qmSmbspI0Qo5ld49htys8GY9XhS9CGqFoHTsOVAnjBdg0Zn79y135R+k4IR4rKK6+eKaabMhJwiVB7xw0SJu5w==",
+ "version": "5.75.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz",
+ "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==",
"dev": true,
"dependencies": {
"@types/eslint-scope": "^3.7.3",
@@ -16325,24 +16325,24 @@
"@webassemblyjs/ast": "1.11.1",
"@webassemblyjs/wasm-edit": "1.11.1",
"@webassemblyjs/wasm-parser": "1.11.1",
- "acorn": "^8.4.1",
+ "acorn": "^8.7.1",
"acorn-import-assertions": "^1.7.6",
"browserslist": "^4.14.5",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.9.2",
+ "enhanced-resolve": "^5.10.0",
"es-module-lexer": "^0.9.0",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
"glob-to-regexp": "^0.4.1",
"graceful-fs": "^4.2.9",
- "json-parse-better-errors": "^1.0.2",
+ "json-parse-even-better-errors": "^2.3.1",
"loader-runner": "^4.2.0",
"mime-types": "^2.1.27",
"neo-async": "^2.6.2",
"schema-utils": "^3.1.0",
"tapable": "^2.1.1",
"terser-webpack-plugin": "^5.1.3",
- "watchpack": "^2.3.1",
+ "watchpack": "^2.4.0",
"webpack-sources": "^3.2.3"
},
"bin": {
@@ -16483,8 +16483,9 @@
}
},
"node_modules/webpack/node_modules/acorn": {
- "version": "8.5.0",
- "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==",
+ "version": "8.8.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz",
+ "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==",
"dev": true,
"bin": {
"acorn": "bin/acorn"
@@ -21616,9 +21617,9 @@
}
},
"enhanced-resolve": {
- "version": "5.9.3",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz",
- "integrity": "sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==",
+ "version": "5.12.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
+ "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.4",
@@ -29486,9 +29487,9 @@
}
},
"watchpack": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz",
- "integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==",
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
+ "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
"dev": true,
"requires": {
"glob-to-regexp": "^0.4.1",
@@ -29509,9 +29510,9 @@
"dev": true
},
"webpack": {
- "version": "5.72.0",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.72.0.tgz",
- "integrity": "sha512-qmSmbspI0Qo5ld49htys8GY9XhS9CGqFoHTsOVAnjBdg0Zn79y135R+k4IR4rKK6+eKaabMhJwiVB7xw0SJu5w==",
+ "version": "5.75.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz",
+ "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==",
"dev": true,
"requires": {
"@types/eslint-scope": "^3.7.3",
@@ -29519,30 +29520,31 @@
"@webassemblyjs/ast": "1.11.1",
"@webassemblyjs/wasm-edit": "1.11.1",
"@webassemblyjs/wasm-parser": "1.11.1",
- "acorn": "^8.4.1",
+ "acorn": "^8.7.1",
"acorn-import-assertions": "^1.7.6",
"browserslist": "^4.14.5",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.9.2",
+ "enhanced-resolve": "^5.10.0",
"es-module-lexer": "^0.9.0",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
"glob-to-regexp": "^0.4.1",
"graceful-fs": "^4.2.9",
- "json-parse-better-errors": "^1.0.2",
+ "json-parse-even-better-errors": "^2.3.1",
"loader-runner": "^4.2.0",
"mime-types": "^2.1.27",
"neo-async": "^2.6.2",
"schema-utils": "^3.1.0",
"tapable": "^2.1.1",
"terser-webpack-plugin": "^5.1.3",
- "watchpack": "^2.3.1",
+ "watchpack": "^2.4.0",
"webpack-sources": "^3.2.3"
},
"dependencies": {
"acorn": {
- "version": "8.5.0",
- "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==",
+ "version": "8.8.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz",
+ "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==",
"dev": true
},
"acorn-import-assertions": {
From 9e74f94c44f4ee920c7e5a435b8be45291dbb25f Mon Sep 17 00:00:00 2001
From: Jackson Mills
Date: Wed, 4 Jan 2023 09:28:03 -0800
Subject: [PATCH 08/10] Add Code Sandbox template to README (#2177)
* Add sandbox to README
* Add it to the specific usage section
---
README.md | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/README.md b/README.md
index 5e49434e..09e537b0 100644
--- a/README.md
+++ b/README.md
@@ -63,6 +63,16 @@ main()
For more examples, see the [documentation](#documentation).
+## Try it out now!
+
+If you just want to try xrpl.js, you can fork this Code Sandbox template:
+https://codesandbox.io/s/xrpl-intro-pxgdjr?file=/src/App.js
+
+It goes through:
+1. Creating a new test account
+2. Sending a payment transaction
+3. And sending requests to see your account balance
+
### Using xrpl.js with `create-react-app`
To use `xrpl.js` with React, you need to install shims for core NodeJS modules. Starting with version 5, Webpack stopped including shims by default, so you must modify your Webpack configuration to add the shims you need. Either you can eject your config and modify it, or you can use a library such as `react-app-rewired`. The example below uses `react-app-rewired`.
@@ -129,6 +139,9 @@ To use `xrpl.js` with React, you need to install shims for core NodeJS modules.
"test": "react-app-rewired test",
```
+This online template uses these steps to run xrpl.js with React in the browser:
+https://codesandbox.io/s/xrpl-intro-pxgdjr?file=/src/App.js
+
### Using xrpl.js with React Native
If you want to use `xrpl.js` with React Native you will need to install shims for core NodeJS modules. To help with this you can use a module like [rn-nodeify](https://github.com/tradle/rn-nodeify).
From 8abcfe4640000da86261dd9792f841c124c55392 Mon Sep 17 00:00:00 2001
From: justinr1234
Date: Fri, 6 Jan 2023 14:04:36 -0600
Subject: [PATCH 09/10] chore: rename test files (#2181)
---
packages/xrpl/package.json | 2 +-
packages/xrpl/test/.mocharc.json | 4 +-
...lBackoff.ts => ExponentialBackoff.test.ts} | 3 +-
...dcastClient.ts => broadcastClient.test.ts} | 3 +-
...egration.ts => browserIntegration.test.ts} | 0
.../xrpl/test/{client.ts => client.test.ts} | 0
.../client/{autofill.ts => autofill.test.ts} | 0
.../{constructor.ts => constructor.test.ts} | 0
.../test/client/{errors.ts => errors.test.ts} | 0
.../{getBalances.ts => getBalances.test.ts} | 0
.../{getFeeXrp.ts => getFeeXrp.test.ts} | 0
...tLedgerIndex.ts => getLedgerIndex.test.ts} | 0
.../{getOrderbook.ts => getOrderbook.test.ts} | 0
...getXrpBalance.ts => getXrpBalance.test.ts} | 0
.../{isConnected.ts => isConnected.test.ts} | 0
...ialPayments.ts => partialPayments.test.ts} | 0
.../client/{request.ts => request.test.ts} | 0
.../{requestAll.ts => requestAll.test.ts} | 0
...estNextPage.ts => requestNextPage.test.ts} | 0
.../test/client/{submit.ts => submit.test.ts} | 0
.../{subscribe.ts => subscribe.test.ts} | 0
.../{connection.ts => connection.test.ts} | 0
.../{finalTest.ts => finalTest.test.ts} | 0
.../{fundWallet.ts => fundWallet.test.ts} | 0
packages/xrpl/test/integration/index.ts | 82 +++++++++----------
.../{integration.ts => integration.test.ts} | 0
.../{onConnect.ts => onConnect.test.ts} | 0
.../{regularKey.ts => regularKey.test.ts} | 0
...untChannels.ts => accountChannels.test.ts} | 0
...urrencies.ts => accountCurrencies.test.ts} | 0
.../{accountInfo.ts => accountInfo.test.ts} | 0
.../{accountLines.ts => accountLines.test.ts} | 0
...countObjects.ts => accountObjects.test.ts} | 0
...accountOffers.ts => accountOffers.test.ts} | 0
.../{accountTx.ts => accountTx.test.ts} | 0
.../{bookOffers.ts => bookOffers.test.ts} | 0
...channelVerify.ts => channelVerify.test.ts} | 0
...uthorized.ts => depositAuthorized.test.ts} | 0
.../requests/{fee.ts => fee.test.ts} | 0
...wayBalances.ts => gatewayBalances.test.ts} | 0
.../requests/{ledger.ts => ledger.test.ts} | 0
.../{ledgerClosed.ts => ledgerClosed.test.ts} | 0
...ledgerCurrent.ts => ledgerCurrent.test.ts} | 0
.../{ledgerData.ts => ledgerData.test.ts} | 0
.../{ledgerEntry.ts => ledgerEntry.test.ts} | 0
...noRippleCheck.ts => noRippleCheck.test.ts} | 0
.../{pathFind.ts => pathFind.test.ts} | 0
...pplePathFind.ts => ripplePathFind.test.ts} | 0
.../{serverInfo.ts => serverInfo.test.ts} | 0
.../{serverState.ts => serverState.test.ts} | 0
.../requests/{submit.ts => submit.test.ts} | 0
...ltisigned.ts => submitMultisigned.test.ts} | 0
.../{subscribe.ts => subscribe.test.ts} | 0
.../requests/{tx.ts => tx.test.ts} | 0
.../requests/{utility.ts => utility.test.ts} | 0
...submitAndWait.ts => submitAndWait.test.ts} | 0
...accountDelete.ts => accountDelete.test.ts} | 0
.../{accountSet.ts => accountSet.test.ts} | 0
.../{checkCancel.ts => checkCancel.test.ts} | 0
.../{checkCash.ts => checkCash.test.ts} | 0
.../{checkCreate.ts => checkCreate.test.ts} | 0
...positPreauth.ts => depositPreauth.test.ts} | 0
.../{escrowCancel.ts => escrowCancel.test.ts} | 0
.../{escrowCreate.ts => escrowCreate.test.ts} | 0
.../{escrowFinish.ts => escrowFinish.test.ts} | 0
.../{offerCancel.ts => offerCancel.test.ts} | 0
.../{offerCreate.ts => offerCreate.test.ts} | 0
.../{payment.ts => payment.test.ts} | 0
...elClaim.ts => paymentChannelClaim.test.ts} | 0
...Create.ts => paymentChannelCreate.test.ts} | 0
...nnelFund.ts => paymentChannelFund.test.ts} | 0
...signerListSet.ts => signerListSet.test.ts} | 0
.../{trustSet.ts => trustSet.test.ts} | 0
.../integration/{wallet.ts => wallet.test.ts} | 1 +
...RippledTest.ts => mockRippledTest.test.ts} | 0
...eptOffer.ts => NFTokenAcceptOffer.test.ts} | 0
.../{NFTokenBurn.ts => NFTokenBurn.test.ts} | 0
...celOffer.ts => NFTokenCancelOffer.test.ts} | 0
...ateOffer.ts => NFTokenCreateOffer.test.ts} | 0
.../{NFTokenMint.ts => NFTokenMint.test.ts} | 0
...accountDelete.ts => accountDelete.test.ts} | 0
.../{accountSet.ts => accountSet.test.ts} | 0
...Transaction.ts => baseTransaction.test.ts} | 0
.../{checkCancel.ts => checkCancel.test.ts} | 0
.../{checkCash.ts => checkCash.test.ts} | 0
.../{checkCreate.ts => checkCreate.test.ts} | 0
...positPreauth.ts => depositPreauth.test.ts} | 0
.../{escrowCancel.ts => escrowCancel.test.ts} | 0
.../{escrowCreate.ts => escrowCreate.test.ts} | 0
.../{escrowFinish.ts => escrowFinish.test.ts} | 0
.../{offerCancel.ts => offerCancel.test.ts} | 0
.../{offerCreate.ts => offerCreate.test.ts} | 0
.../models/{payment.ts => payment.test.ts} | 0
...elClaim.ts => paymentChannelClaim.test.ts} | 0
...Create.ts => paymentChannelCreate.test.ts} | 0
...nnelFund.ts => paymentChannelFund.test.ts} | 0
...setRegularKey.ts => setRegularKey.test.ts} | 0
...signerListSet.ts => signerListSet.test.ts} | 0
.../{ticketCreate.ts => ticketCreate.test.ts} | 0
.../models/{trustSet.ts => trustSet.test.ts} | 0
.../test/models/{utils.ts => utils.test.ts} | 0
...nClientTests.ts => runClientTests.test.ts} | 4 +-
.../xrpl/test/{shamap.ts => shamap.test.ts} | 0
...ent.ts => createCrossChainPayment.test.ts} | 0
...riveXAddress.ts => deriveXAddress.test.ts} | 0
.../{dropsToXrp.ts => dropsToXrp.test.ts} | 0
...ceChanges.ts => getBalanceChanges.test.ts} | 0
.../{hasNextPage.ts => hasNextPage.test.ts} | 0
.../{hashLedger.ts => hashLedger.test.ts} | 0
.../test/utils/{hashes.ts => hashes.test.ts} | 0
...hexConversion.ts => hexConversion.test.ts} | 0
...ValidAddress.ts => isValidAddress.test.ts} | 0
...rseNFTokenID.ts => parseNFTokenID.test.ts} | 0
.../utils/{quality.ts => quality.test.ts} | 0
...aim.ts => signPaymentChannelClaim.test.ts} | 0
...meConversion.ts => timeConversion.test.ts} | 0
.../{transferRate.ts => transferRate.test.ts} | 0
...m.ts => verifyPaymentChannelClaim.test.ts} | 0
.../{xrpToDrops.ts => xrpToDrops.test.ts} | 0
.../{fundWallet.ts => fundWallet.test.ts} | 0
.../test/wallet/{index.ts => index.test.ts} | 0
.../test/wallet/{signer.ts => signer.test.ts} | 0
122 files changed, 49 insertions(+), 50 deletions(-)
rename packages/xrpl/test/{ExponentialBackoff.ts => ExponentialBackoff.test.ts} (95%)
rename packages/xrpl/test/{broadcastClient.ts => broadcastClient.test.ts} (96%)
rename packages/xrpl/test/browser/{browserIntegration.ts => browserIntegration.test.ts} (100%)
rename packages/xrpl/test/{client.ts => client.test.ts} (100%)
rename packages/xrpl/test/client/{autofill.ts => autofill.test.ts} (100%)
rename packages/xrpl/test/client/{constructor.ts => constructor.test.ts} (100%)
rename packages/xrpl/test/client/{errors.ts => errors.test.ts} (100%)
rename packages/xrpl/test/client/{getBalances.ts => getBalances.test.ts} (100%)
rename packages/xrpl/test/client/{getFeeXrp.ts => getFeeXrp.test.ts} (100%)
rename packages/xrpl/test/client/{getLedgerIndex.ts => getLedgerIndex.test.ts} (100%)
rename packages/xrpl/test/client/{getOrderbook.ts => getOrderbook.test.ts} (100%)
rename packages/xrpl/test/client/{getXrpBalance.ts => getXrpBalance.test.ts} (100%)
rename packages/xrpl/test/client/{isConnected.ts => isConnected.test.ts} (100%)
rename packages/xrpl/test/client/{partialPayments.ts => partialPayments.test.ts} (100%)
rename packages/xrpl/test/client/{request.ts => request.test.ts} (100%)
rename packages/xrpl/test/client/{requestAll.ts => requestAll.test.ts} (100%)
rename packages/xrpl/test/client/{requestNextPage.ts => requestNextPage.test.ts} (100%)
rename packages/xrpl/test/client/{submit.ts => submit.test.ts} (100%)
rename packages/xrpl/test/client/{subscribe.ts => subscribe.test.ts} (100%)
rename packages/xrpl/test/{connection.ts => connection.test.ts} (100%)
rename packages/xrpl/test/integration/{finalTest.ts => finalTest.test.ts} (100%)
rename packages/xrpl/test/integration/{fundWallet.ts => fundWallet.test.ts} (100%)
rename packages/xrpl/test/integration/{integration.ts => integration.test.ts} (100%)
rename packages/xrpl/test/integration/{onConnect.ts => onConnect.test.ts} (100%)
rename packages/xrpl/test/integration/{regularKey.ts => regularKey.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{accountChannels.ts => accountChannels.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{accountCurrencies.ts => accountCurrencies.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{accountInfo.ts => accountInfo.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{accountLines.ts => accountLines.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{accountObjects.ts => accountObjects.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{accountOffers.ts => accountOffers.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{accountTx.ts => accountTx.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{bookOffers.ts => bookOffers.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{channelVerify.ts => channelVerify.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{depositAuthorized.ts => depositAuthorized.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{fee.ts => fee.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{gatewayBalances.ts => gatewayBalances.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{ledger.ts => ledger.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{ledgerClosed.ts => ledgerClosed.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{ledgerCurrent.ts => ledgerCurrent.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{ledgerData.ts => ledgerData.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{ledgerEntry.ts => ledgerEntry.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{noRippleCheck.ts => noRippleCheck.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{pathFind.ts => pathFind.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{ripplePathFind.ts => ripplePathFind.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{serverInfo.ts => serverInfo.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{serverState.ts => serverState.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{submit.ts => submit.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{submitMultisigned.ts => submitMultisigned.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{subscribe.ts => subscribe.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{tx.ts => tx.test.ts} (100%)
rename packages/xrpl/test/integration/requests/{utility.ts => utility.test.ts} (100%)
rename packages/xrpl/test/integration/{submitAndWait.ts => submitAndWait.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{accountDelete.ts => accountDelete.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{accountSet.ts => accountSet.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{checkCancel.ts => checkCancel.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{checkCash.ts => checkCash.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{checkCreate.ts => checkCreate.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{depositPreauth.ts => depositPreauth.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{escrowCancel.ts => escrowCancel.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{escrowCreate.ts => escrowCreate.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{escrowFinish.ts => escrowFinish.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{offerCancel.ts => offerCancel.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{offerCreate.ts => offerCreate.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{payment.ts => payment.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{paymentChannelClaim.ts => paymentChannelClaim.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{paymentChannelCreate.ts => paymentChannelCreate.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{paymentChannelFund.ts => paymentChannelFund.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{signerListSet.ts => signerListSet.test.ts} (100%)
rename packages/xrpl/test/integration/transactions/{trustSet.ts => trustSet.test.ts} (100%)
rename packages/xrpl/test/integration/{wallet.ts => wallet.test.ts} (60%)
rename packages/xrpl/test/{mockRippledTest.ts => mockRippledTest.test.ts} (100%)
rename packages/xrpl/test/models/{NFTokenAcceptOffer.ts => NFTokenAcceptOffer.test.ts} (100%)
rename packages/xrpl/test/models/{NFTokenBurn.ts => NFTokenBurn.test.ts} (100%)
rename packages/xrpl/test/models/{NFTokenCancelOffer.ts => NFTokenCancelOffer.test.ts} (100%)
rename packages/xrpl/test/models/{NFTokenCreateOffer.ts => NFTokenCreateOffer.test.ts} (100%)
rename packages/xrpl/test/models/{NFTokenMint.ts => NFTokenMint.test.ts} (100%)
rename packages/xrpl/test/models/{accountDelete.ts => accountDelete.test.ts} (100%)
rename packages/xrpl/test/models/{accountSet.ts => accountSet.test.ts} (100%)
rename packages/xrpl/test/models/{baseTransaction.ts => baseTransaction.test.ts} (100%)
rename packages/xrpl/test/models/{checkCancel.ts => checkCancel.test.ts} (100%)
rename packages/xrpl/test/models/{checkCash.ts => checkCash.test.ts} (100%)
rename packages/xrpl/test/models/{checkCreate.ts => checkCreate.test.ts} (100%)
rename packages/xrpl/test/models/{depositPreauth.ts => depositPreauth.test.ts} (100%)
rename packages/xrpl/test/models/{escrowCancel.ts => escrowCancel.test.ts} (100%)
rename packages/xrpl/test/models/{escrowCreate.ts => escrowCreate.test.ts} (100%)
rename packages/xrpl/test/models/{escrowFinish.ts => escrowFinish.test.ts} (100%)
rename packages/xrpl/test/models/{offerCancel.ts => offerCancel.test.ts} (100%)
rename packages/xrpl/test/models/{offerCreate.ts => offerCreate.test.ts} (100%)
rename packages/xrpl/test/models/{payment.ts => payment.test.ts} (100%)
rename packages/xrpl/test/models/{paymentChannelClaim.ts => paymentChannelClaim.test.ts} (100%)
rename packages/xrpl/test/models/{paymentChannelCreate.ts => paymentChannelCreate.test.ts} (100%)
rename packages/xrpl/test/models/{paymentChannelFund.ts => paymentChannelFund.test.ts} (100%)
rename packages/xrpl/test/models/{setRegularKey.ts => setRegularKey.test.ts} (100%)
rename packages/xrpl/test/models/{signerListSet.ts => signerListSet.test.ts} (100%)
rename packages/xrpl/test/models/{ticketCreate.ts => ticketCreate.test.ts} (100%)
rename packages/xrpl/test/models/{trustSet.ts => trustSet.test.ts} (100%)
rename packages/xrpl/test/models/{utils.ts => utils.test.ts} (100%)
rename packages/xrpl/test/{runClientTests.ts => runClientTests.test.ts} (97%)
rename packages/xrpl/test/{shamap.ts => shamap.test.ts} (100%)
rename packages/xrpl/test/utils/{createCrossChainPayment.ts => createCrossChainPayment.test.ts} (100%)
rename packages/xrpl/test/utils/{deriveXAddress.ts => deriveXAddress.test.ts} (100%)
rename packages/xrpl/test/utils/{dropsToXrp.ts => dropsToXrp.test.ts} (100%)
rename packages/xrpl/test/utils/{getBalanceChanges.ts => getBalanceChanges.test.ts} (100%)
rename packages/xrpl/test/utils/{hasNextPage.ts => hasNextPage.test.ts} (100%)
rename packages/xrpl/test/utils/{hashLedger.ts => hashLedger.test.ts} (100%)
rename packages/xrpl/test/utils/{hashes.ts => hashes.test.ts} (100%)
rename packages/xrpl/test/utils/{hexConversion.ts => hexConversion.test.ts} (100%)
rename packages/xrpl/test/utils/{isValidAddress.ts => isValidAddress.test.ts} (100%)
rename packages/xrpl/test/utils/{parseNFTokenID.ts => parseNFTokenID.test.ts} (100%)
rename packages/xrpl/test/utils/{quality.ts => quality.test.ts} (100%)
rename packages/xrpl/test/utils/{signPaymentChannelClaim.ts => signPaymentChannelClaim.test.ts} (100%)
rename packages/xrpl/test/utils/{timeConversion.ts => timeConversion.test.ts} (100%)
rename packages/xrpl/test/utils/{transferRate.ts => transferRate.test.ts} (100%)
rename packages/xrpl/test/utils/{verifyPaymentChannelClaim.ts => verifyPaymentChannelClaim.test.ts} (100%)
rename packages/xrpl/test/utils/{xrpToDrops.ts => xrpToDrops.test.ts} (100%)
rename packages/xrpl/test/wallet/{fundWallet.ts => fundWallet.test.ts} (100%)
rename packages/xrpl/test/wallet/{index.ts => index.test.ts} (100%)
rename packages/xrpl/test/wallet/{signer.ts => signer.test.ts} (100%)
diff --git a/packages/xrpl/package.json b/packages/xrpl/package.json
index bc7afc6b..e3bbdc81 100644
--- a/packages/xrpl/package.json
+++ b/packages/xrpl/package.json
@@ -50,7 +50,7 @@
"docgen": "typedoc && echo js.xrpl.org >> ../../docs/CNAME",
"prepublish": "run-s clean build",
"test": "nyc mocha --config=test/.mocharc.json --exit",
- "test:integration": "TS_NODE_PROJECT=tsconfig.build.json nyc mocha ./test/integration/**/*.ts ./test/integration/*.ts",
+ "test:integration": "TS_NODE_PROJECT=tsconfig.build.json nyc mocha ./test/integration/**/*.test.ts ./test/integration/*.test.ts",
"test:browser": "npm run build:browserTests && TS_NODE_PROJECT=tsconfig.build.json nyc mocha ./test/browser/*.ts",
"test:watch": "TS_NODE_PROJECT=src/tsconfig.json mocha --config=test/.mocharc.json --watch --reporter dot",
"format": "prettier --write '{src,test}/**/*.ts'",
diff --git a/packages/xrpl/test/.mocharc.json b/packages/xrpl/test/.mocharc.json
index 03deee56..0f040419 100644
--- a/packages/xrpl/test/.mocharc.json
+++ b/packages/xrpl/test/.mocharc.json
@@ -1,6 +1,6 @@
{
"diff": true,
- "spec": ["./test/*.ts", "./test/models/**/*.ts", "./test/utils/**/*.ts", "./test/wallet/**/*.ts"],
+ "spec": ["./test/*.test.ts", "./test/models/**/*.test.ts", "./test/utils/**/*.test.ts", "./test/wallet/**/*.test.ts"],
"extension": ["ts"],
"package": "../package.json",
"require": "ts-node/register",
@@ -12,7 +12,7 @@
"ui": "bdd",
"watch-files": [
"src/**/*.ts",
- "test/**/*.ts"
+ "test/**/*.test.ts"
],
"watch-ignore": [
"test/node_modules/**/*",
diff --git a/packages/xrpl/test/ExponentialBackoff.ts b/packages/xrpl/test/ExponentialBackoff.test.ts
similarity index 95%
rename from packages/xrpl/test/ExponentialBackoff.ts
rename to packages/xrpl/test/ExponentialBackoff.test.ts
index 8ca87f84..fc18fa85 100644
--- a/packages/xrpl/test/ExponentialBackoff.ts
+++ b/packages/xrpl/test/ExponentialBackoff.test.ts
@@ -1,6 +1,5 @@
import { assert } from 'chai'
-
-import ExponentialBackoff from '../src/client/ExponentialBackoff'
+import ExponentialBackoff from 'xrpl-local/client/ExponentialBackoff'
describe('ExponentialBackoff', function () {
it('duration() return value starts with the min value', function () {
diff --git a/packages/xrpl/test/broadcastClient.ts b/packages/xrpl/test/broadcastClient.test.ts
similarity index 96%
rename from packages/xrpl/test/broadcastClient.ts
rename to packages/xrpl/test/broadcastClient.test.ts
index 8b79f2ee..3d46e67e 100644
--- a/packages/xrpl/test/broadcastClient.ts
+++ b/packages/xrpl/test/broadcastClient.test.ts
@@ -1,7 +1,6 @@
import { assert } from 'chai'
import _ from 'lodash'
-
-import { ServerInfoResponse } from '../src'
+import { ServerInfoResponse } from 'xrpl-local'
import responses from './fixtures/responses'
import rippled from './fixtures/rippled'
diff --git a/packages/xrpl/test/browser/browserIntegration.ts b/packages/xrpl/test/browser/browserIntegration.test.ts
similarity index 100%
rename from packages/xrpl/test/browser/browserIntegration.ts
rename to packages/xrpl/test/browser/browserIntegration.test.ts
diff --git a/packages/xrpl/test/client.ts b/packages/xrpl/test/client.test.ts
similarity index 100%
rename from packages/xrpl/test/client.ts
rename to packages/xrpl/test/client.test.ts
diff --git a/packages/xrpl/test/client/autofill.ts b/packages/xrpl/test/client/autofill.test.ts
similarity index 100%
rename from packages/xrpl/test/client/autofill.ts
rename to packages/xrpl/test/client/autofill.test.ts
diff --git a/packages/xrpl/test/client/constructor.ts b/packages/xrpl/test/client/constructor.test.ts
similarity index 100%
rename from packages/xrpl/test/client/constructor.ts
rename to packages/xrpl/test/client/constructor.test.ts
diff --git a/packages/xrpl/test/client/errors.ts b/packages/xrpl/test/client/errors.test.ts
similarity index 100%
rename from packages/xrpl/test/client/errors.ts
rename to packages/xrpl/test/client/errors.test.ts
diff --git a/packages/xrpl/test/client/getBalances.ts b/packages/xrpl/test/client/getBalances.test.ts
similarity index 100%
rename from packages/xrpl/test/client/getBalances.ts
rename to packages/xrpl/test/client/getBalances.test.ts
diff --git a/packages/xrpl/test/client/getFeeXrp.ts b/packages/xrpl/test/client/getFeeXrp.test.ts
similarity index 100%
rename from packages/xrpl/test/client/getFeeXrp.ts
rename to packages/xrpl/test/client/getFeeXrp.test.ts
diff --git a/packages/xrpl/test/client/getLedgerIndex.ts b/packages/xrpl/test/client/getLedgerIndex.test.ts
similarity index 100%
rename from packages/xrpl/test/client/getLedgerIndex.ts
rename to packages/xrpl/test/client/getLedgerIndex.test.ts
diff --git a/packages/xrpl/test/client/getOrderbook.ts b/packages/xrpl/test/client/getOrderbook.test.ts
similarity index 100%
rename from packages/xrpl/test/client/getOrderbook.ts
rename to packages/xrpl/test/client/getOrderbook.test.ts
diff --git a/packages/xrpl/test/client/getXrpBalance.ts b/packages/xrpl/test/client/getXrpBalance.test.ts
similarity index 100%
rename from packages/xrpl/test/client/getXrpBalance.ts
rename to packages/xrpl/test/client/getXrpBalance.test.ts
diff --git a/packages/xrpl/test/client/isConnected.ts b/packages/xrpl/test/client/isConnected.test.ts
similarity index 100%
rename from packages/xrpl/test/client/isConnected.ts
rename to packages/xrpl/test/client/isConnected.test.ts
diff --git a/packages/xrpl/test/client/partialPayments.ts b/packages/xrpl/test/client/partialPayments.test.ts
similarity index 100%
rename from packages/xrpl/test/client/partialPayments.ts
rename to packages/xrpl/test/client/partialPayments.test.ts
diff --git a/packages/xrpl/test/client/request.ts b/packages/xrpl/test/client/request.test.ts
similarity index 100%
rename from packages/xrpl/test/client/request.ts
rename to packages/xrpl/test/client/request.test.ts
diff --git a/packages/xrpl/test/client/requestAll.ts b/packages/xrpl/test/client/requestAll.test.ts
similarity index 100%
rename from packages/xrpl/test/client/requestAll.ts
rename to packages/xrpl/test/client/requestAll.test.ts
diff --git a/packages/xrpl/test/client/requestNextPage.ts b/packages/xrpl/test/client/requestNextPage.test.ts
similarity index 100%
rename from packages/xrpl/test/client/requestNextPage.ts
rename to packages/xrpl/test/client/requestNextPage.test.ts
diff --git a/packages/xrpl/test/client/submit.ts b/packages/xrpl/test/client/submit.test.ts
similarity index 100%
rename from packages/xrpl/test/client/submit.ts
rename to packages/xrpl/test/client/submit.test.ts
diff --git a/packages/xrpl/test/client/subscribe.ts b/packages/xrpl/test/client/subscribe.test.ts
similarity index 100%
rename from packages/xrpl/test/client/subscribe.ts
rename to packages/xrpl/test/client/subscribe.test.ts
diff --git a/packages/xrpl/test/connection.ts b/packages/xrpl/test/connection.test.ts
similarity index 100%
rename from packages/xrpl/test/connection.ts
rename to packages/xrpl/test/connection.test.ts
diff --git a/packages/xrpl/test/integration/finalTest.ts b/packages/xrpl/test/integration/finalTest.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/finalTest.ts
rename to packages/xrpl/test/integration/finalTest.test.ts
diff --git a/packages/xrpl/test/integration/fundWallet.ts b/packages/xrpl/test/integration/fundWallet.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/fundWallet.ts
rename to packages/xrpl/test/integration/fundWallet.test.ts
diff --git a/packages/xrpl/test/integration/index.ts b/packages/xrpl/test/integration/index.ts
index 6442fd6c..c55edc9a 100644
--- a/packages/xrpl/test/integration/index.ts
+++ b/packages/xrpl/test/integration/index.ts
@@ -1,46 +1,46 @@
/* eslint-disable import/export -- Tells webpack which files exist. */
-export * from './transactions/signerListSet'
-export * from './transactions/payment'
-export * from './transactions/offerCreate'
-export * from './transactions/offerCancel'
-export * from './transactions/signerListSet'
-export * from './transactions/checkCancel'
-export * from './transactions/checkCash'
-export * from './transactions/checkCreate'
-export * from './transactions/depositPreauth'
-export * from './transactions/paymentChannelCreate'
-export * from './transactions/paymentChannelClaim'
-export * from './transactions/paymentChannelFund'
-export * from './transactions/trustSet'
+export * from './transactions/signerListSet.test'
+export * from './transactions/payment.test'
+export * from './transactions/offerCreate.test'
+export * from './transactions/offerCancel.test'
+export * from './transactions/signerListSet.test'
+export * from './transactions/checkCancel.test'
+export * from './transactions/checkCash.test'
+export * from './transactions/checkCreate.test'
+export * from './transactions/depositPreauth.test'
+export * from './transactions/paymentChannelCreate.test'
+export * from './transactions/paymentChannelClaim.test'
+export * from './transactions/paymentChannelFund.test'
+export * from './transactions/trustSet.test'
-export * from './requests/accountChannels'
-export * from './requests/accountCurrencies'
-export * from './requests/accountInfo'
-export * from './requests/accountLines'
-export * from './requests/accountObjects'
-export * from './requests/accountOffers'
-export * from './requests/accountTx'
-export * from './requests/bookOffers'
-export * from './requests/channelVerify'
-export * from './requests/depositAuthorized'
-export * from './requests/gatewayBalances'
-export * from './requests/ledger'
-export * from './requests/ledgerClosed'
-export * from './requests/ledgerCurrent'
-export * from './requests/ledgerData'
-export * from './requests/ledgerEntry'
-export * from './requests/submitMultisigned'
-export * from './requests/noRippleCheck'
-export * from './requests/pathFind'
-export * from './requests/ripplePathFind'
-export * from './requests/submit'
-export * from './requests/subscribe'
-export * from './requests/tx'
-export * from './requests/utility'
+export * from './requests/accountChannels.test'
+export * from './requests/accountCurrencies.test'
+export * from './requests/accountInfo.test'
+export * from './requests/accountLines.test'
+export * from './requests/accountObjects.test'
+export * from './requests/accountOffers.test'
+export * from './requests/accountTx.test'
+export * from './requests/bookOffers.test'
+export * from './requests/channelVerify.test'
+export * from './requests/depositAuthorized.test'
+export * from './requests/gatewayBalances.test'
+export * from './requests/ledger.test'
+export * from './requests/ledgerClosed.test'
+export * from './requests/ledgerCurrent.test'
+export * from './requests/ledgerData.test'
+export * from './requests/ledgerEntry.test'
+export * from './requests/submitMultisigned.test'
+export * from './requests/noRippleCheck.test'
+export * from './requests/pathFind.test'
+export * from './requests/ripplePathFind.test'
+export * from './requests/submit.test'
+export * from './requests/subscribe.test'
+export * from './requests/tx.test'
+export * from './requests/utility.test'
-export * from './fundWallet'
-export * from './integration'
-export * from './regularKey'
+export * from './fundWallet.test'
+export * from './integration.test'
+export * from './regularKey.test'
// Ensure you export all added tests above "export * from './finalTest'", otherwise they will not be run.
-export * from './finalTest'
+export * from './finalTest.test'
diff --git a/packages/xrpl/test/integration/integration.ts b/packages/xrpl/test/integration/integration.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/integration.ts
rename to packages/xrpl/test/integration/integration.test.ts
diff --git a/packages/xrpl/test/integration/onConnect.ts b/packages/xrpl/test/integration/onConnect.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/onConnect.ts
rename to packages/xrpl/test/integration/onConnect.test.ts
diff --git a/packages/xrpl/test/integration/regularKey.ts b/packages/xrpl/test/integration/regularKey.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/regularKey.ts
rename to packages/xrpl/test/integration/regularKey.test.ts
diff --git a/packages/xrpl/test/integration/requests/accountChannels.ts b/packages/xrpl/test/integration/requests/accountChannels.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/accountChannels.ts
rename to packages/xrpl/test/integration/requests/accountChannels.test.ts
diff --git a/packages/xrpl/test/integration/requests/accountCurrencies.ts b/packages/xrpl/test/integration/requests/accountCurrencies.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/accountCurrencies.ts
rename to packages/xrpl/test/integration/requests/accountCurrencies.test.ts
diff --git a/packages/xrpl/test/integration/requests/accountInfo.ts b/packages/xrpl/test/integration/requests/accountInfo.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/accountInfo.ts
rename to packages/xrpl/test/integration/requests/accountInfo.test.ts
diff --git a/packages/xrpl/test/integration/requests/accountLines.ts b/packages/xrpl/test/integration/requests/accountLines.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/accountLines.ts
rename to packages/xrpl/test/integration/requests/accountLines.test.ts
diff --git a/packages/xrpl/test/integration/requests/accountObjects.ts b/packages/xrpl/test/integration/requests/accountObjects.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/accountObjects.ts
rename to packages/xrpl/test/integration/requests/accountObjects.test.ts
diff --git a/packages/xrpl/test/integration/requests/accountOffers.ts b/packages/xrpl/test/integration/requests/accountOffers.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/accountOffers.ts
rename to packages/xrpl/test/integration/requests/accountOffers.test.ts
diff --git a/packages/xrpl/test/integration/requests/accountTx.ts b/packages/xrpl/test/integration/requests/accountTx.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/accountTx.ts
rename to packages/xrpl/test/integration/requests/accountTx.test.ts
diff --git a/packages/xrpl/test/integration/requests/bookOffers.ts b/packages/xrpl/test/integration/requests/bookOffers.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/bookOffers.ts
rename to packages/xrpl/test/integration/requests/bookOffers.test.ts
diff --git a/packages/xrpl/test/integration/requests/channelVerify.ts b/packages/xrpl/test/integration/requests/channelVerify.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/channelVerify.ts
rename to packages/xrpl/test/integration/requests/channelVerify.test.ts
diff --git a/packages/xrpl/test/integration/requests/depositAuthorized.ts b/packages/xrpl/test/integration/requests/depositAuthorized.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/depositAuthorized.ts
rename to packages/xrpl/test/integration/requests/depositAuthorized.test.ts
diff --git a/packages/xrpl/test/integration/requests/fee.ts b/packages/xrpl/test/integration/requests/fee.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/fee.ts
rename to packages/xrpl/test/integration/requests/fee.test.ts
diff --git a/packages/xrpl/test/integration/requests/gatewayBalances.ts b/packages/xrpl/test/integration/requests/gatewayBalances.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/gatewayBalances.ts
rename to packages/xrpl/test/integration/requests/gatewayBalances.test.ts
diff --git a/packages/xrpl/test/integration/requests/ledger.ts b/packages/xrpl/test/integration/requests/ledger.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/ledger.ts
rename to packages/xrpl/test/integration/requests/ledger.test.ts
diff --git a/packages/xrpl/test/integration/requests/ledgerClosed.ts b/packages/xrpl/test/integration/requests/ledgerClosed.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/ledgerClosed.ts
rename to packages/xrpl/test/integration/requests/ledgerClosed.test.ts
diff --git a/packages/xrpl/test/integration/requests/ledgerCurrent.ts b/packages/xrpl/test/integration/requests/ledgerCurrent.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/ledgerCurrent.ts
rename to packages/xrpl/test/integration/requests/ledgerCurrent.test.ts
diff --git a/packages/xrpl/test/integration/requests/ledgerData.ts b/packages/xrpl/test/integration/requests/ledgerData.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/ledgerData.ts
rename to packages/xrpl/test/integration/requests/ledgerData.test.ts
diff --git a/packages/xrpl/test/integration/requests/ledgerEntry.ts b/packages/xrpl/test/integration/requests/ledgerEntry.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/ledgerEntry.ts
rename to packages/xrpl/test/integration/requests/ledgerEntry.test.ts
diff --git a/packages/xrpl/test/integration/requests/noRippleCheck.ts b/packages/xrpl/test/integration/requests/noRippleCheck.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/noRippleCheck.ts
rename to packages/xrpl/test/integration/requests/noRippleCheck.test.ts
diff --git a/packages/xrpl/test/integration/requests/pathFind.ts b/packages/xrpl/test/integration/requests/pathFind.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/pathFind.ts
rename to packages/xrpl/test/integration/requests/pathFind.test.ts
diff --git a/packages/xrpl/test/integration/requests/ripplePathFind.ts b/packages/xrpl/test/integration/requests/ripplePathFind.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/ripplePathFind.ts
rename to packages/xrpl/test/integration/requests/ripplePathFind.test.ts
diff --git a/packages/xrpl/test/integration/requests/serverInfo.ts b/packages/xrpl/test/integration/requests/serverInfo.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/serverInfo.ts
rename to packages/xrpl/test/integration/requests/serverInfo.test.ts
diff --git a/packages/xrpl/test/integration/requests/serverState.ts b/packages/xrpl/test/integration/requests/serverState.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/serverState.ts
rename to packages/xrpl/test/integration/requests/serverState.test.ts
diff --git a/packages/xrpl/test/integration/requests/submit.ts b/packages/xrpl/test/integration/requests/submit.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/submit.ts
rename to packages/xrpl/test/integration/requests/submit.test.ts
diff --git a/packages/xrpl/test/integration/requests/submitMultisigned.ts b/packages/xrpl/test/integration/requests/submitMultisigned.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/submitMultisigned.ts
rename to packages/xrpl/test/integration/requests/submitMultisigned.test.ts
diff --git a/packages/xrpl/test/integration/requests/subscribe.ts b/packages/xrpl/test/integration/requests/subscribe.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/subscribe.ts
rename to packages/xrpl/test/integration/requests/subscribe.test.ts
diff --git a/packages/xrpl/test/integration/requests/tx.ts b/packages/xrpl/test/integration/requests/tx.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/tx.ts
rename to packages/xrpl/test/integration/requests/tx.test.ts
diff --git a/packages/xrpl/test/integration/requests/utility.ts b/packages/xrpl/test/integration/requests/utility.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/requests/utility.ts
rename to packages/xrpl/test/integration/requests/utility.test.ts
diff --git a/packages/xrpl/test/integration/submitAndWait.ts b/packages/xrpl/test/integration/submitAndWait.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/submitAndWait.ts
rename to packages/xrpl/test/integration/submitAndWait.test.ts
diff --git a/packages/xrpl/test/integration/transactions/accountDelete.ts b/packages/xrpl/test/integration/transactions/accountDelete.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/accountDelete.ts
rename to packages/xrpl/test/integration/transactions/accountDelete.test.ts
diff --git a/packages/xrpl/test/integration/transactions/accountSet.ts b/packages/xrpl/test/integration/transactions/accountSet.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/accountSet.ts
rename to packages/xrpl/test/integration/transactions/accountSet.test.ts
diff --git a/packages/xrpl/test/integration/transactions/checkCancel.ts b/packages/xrpl/test/integration/transactions/checkCancel.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/checkCancel.ts
rename to packages/xrpl/test/integration/transactions/checkCancel.test.ts
diff --git a/packages/xrpl/test/integration/transactions/checkCash.ts b/packages/xrpl/test/integration/transactions/checkCash.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/checkCash.ts
rename to packages/xrpl/test/integration/transactions/checkCash.test.ts
diff --git a/packages/xrpl/test/integration/transactions/checkCreate.ts b/packages/xrpl/test/integration/transactions/checkCreate.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/checkCreate.ts
rename to packages/xrpl/test/integration/transactions/checkCreate.test.ts
diff --git a/packages/xrpl/test/integration/transactions/depositPreauth.ts b/packages/xrpl/test/integration/transactions/depositPreauth.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/depositPreauth.ts
rename to packages/xrpl/test/integration/transactions/depositPreauth.test.ts
diff --git a/packages/xrpl/test/integration/transactions/escrowCancel.ts b/packages/xrpl/test/integration/transactions/escrowCancel.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/escrowCancel.ts
rename to packages/xrpl/test/integration/transactions/escrowCancel.test.ts
diff --git a/packages/xrpl/test/integration/transactions/escrowCreate.ts b/packages/xrpl/test/integration/transactions/escrowCreate.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/escrowCreate.ts
rename to packages/xrpl/test/integration/transactions/escrowCreate.test.ts
diff --git a/packages/xrpl/test/integration/transactions/escrowFinish.ts b/packages/xrpl/test/integration/transactions/escrowFinish.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/escrowFinish.ts
rename to packages/xrpl/test/integration/transactions/escrowFinish.test.ts
diff --git a/packages/xrpl/test/integration/transactions/offerCancel.ts b/packages/xrpl/test/integration/transactions/offerCancel.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/offerCancel.ts
rename to packages/xrpl/test/integration/transactions/offerCancel.test.ts
diff --git a/packages/xrpl/test/integration/transactions/offerCreate.ts b/packages/xrpl/test/integration/transactions/offerCreate.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/offerCreate.ts
rename to packages/xrpl/test/integration/transactions/offerCreate.test.ts
diff --git a/packages/xrpl/test/integration/transactions/payment.ts b/packages/xrpl/test/integration/transactions/payment.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/payment.ts
rename to packages/xrpl/test/integration/transactions/payment.test.ts
diff --git a/packages/xrpl/test/integration/transactions/paymentChannelClaim.ts b/packages/xrpl/test/integration/transactions/paymentChannelClaim.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/paymentChannelClaim.ts
rename to packages/xrpl/test/integration/transactions/paymentChannelClaim.test.ts
diff --git a/packages/xrpl/test/integration/transactions/paymentChannelCreate.ts b/packages/xrpl/test/integration/transactions/paymentChannelCreate.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/paymentChannelCreate.ts
rename to packages/xrpl/test/integration/transactions/paymentChannelCreate.test.ts
diff --git a/packages/xrpl/test/integration/transactions/paymentChannelFund.ts b/packages/xrpl/test/integration/transactions/paymentChannelFund.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/paymentChannelFund.ts
rename to packages/xrpl/test/integration/transactions/paymentChannelFund.test.ts
diff --git a/packages/xrpl/test/integration/transactions/signerListSet.ts b/packages/xrpl/test/integration/transactions/signerListSet.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/signerListSet.ts
rename to packages/xrpl/test/integration/transactions/signerListSet.test.ts
diff --git a/packages/xrpl/test/integration/transactions/trustSet.ts b/packages/xrpl/test/integration/transactions/trustSet.test.ts
similarity index 100%
rename from packages/xrpl/test/integration/transactions/trustSet.ts
rename to packages/xrpl/test/integration/transactions/trustSet.test.ts
diff --git a/packages/xrpl/test/integration/wallet.ts b/packages/xrpl/test/integration/wallet.test.ts
similarity index 60%
rename from packages/xrpl/test/integration/wallet.ts
rename to packages/xrpl/test/integration/wallet.test.ts
index 03623740..fa54b248 100644
--- a/packages/xrpl/test/integration/wallet.ts
+++ b/packages/xrpl/test/integration/wallet.test.ts
@@ -1,3 +1,4 @@
+/* eslint-disable consistent-default-export-name/default-export-match-filename -- This is a test file. */
import { Wallet } from 'xrpl-local'
const walletSecret = 'shK6YXzwYfnFVn3YZSaMh5zuAddKx'
diff --git a/packages/xrpl/test/mockRippledTest.ts b/packages/xrpl/test/mockRippledTest.test.ts
similarity index 100%
rename from packages/xrpl/test/mockRippledTest.ts
rename to packages/xrpl/test/mockRippledTest.test.ts
diff --git a/packages/xrpl/test/models/NFTokenAcceptOffer.ts b/packages/xrpl/test/models/NFTokenAcceptOffer.test.ts
similarity index 100%
rename from packages/xrpl/test/models/NFTokenAcceptOffer.ts
rename to packages/xrpl/test/models/NFTokenAcceptOffer.test.ts
diff --git a/packages/xrpl/test/models/NFTokenBurn.ts b/packages/xrpl/test/models/NFTokenBurn.test.ts
similarity index 100%
rename from packages/xrpl/test/models/NFTokenBurn.ts
rename to packages/xrpl/test/models/NFTokenBurn.test.ts
diff --git a/packages/xrpl/test/models/NFTokenCancelOffer.ts b/packages/xrpl/test/models/NFTokenCancelOffer.test.ts
similarity index 100%
rename from packages/xrpl/test/models/NFTokenCancelOffer.ts
rename to packages/xrpl/test/models/NFTokenCancelOffer.test.ts
diff --git a/packages/xrpl/test/models/NFTokenCreateOffer.ts b/packages/xrpl/test/models/NFTokenCreateOffer.test.ts
similarity index 100%
rename from packages/xrpl/test/models/NFTokenCreateOffer.ts
rename to packages/xrpl/test/models/NFTokenCreateOffer.test.ts
diff --git a/packages/xrpl/test/models/NFTokenMint.ts b/packages/xrpl/test/models/NFTokenMint.test.ts
similarity index 100%
rename from packages/xrpl/test/models/NFTokenMint.ts
rename to packages/xrpl/test/models/NFTokenMint.test.ts
diff --git a/packages/xrpl/test/models/accountDelete.ts b/packages/xrpl/test/models/accountDelete.test.ts
similarity index 100%
rename from packages/xrpl/test/models/accountDelete.ts
rename to packages/xrpl/test/models/accountDelete.test.ts
diff --git a/packages/xrpl/test/models/accountSet.ts b/packages/xrpl/test/models/accountSet.test.ts
similarity index 100%
rename from packages/xrpl/test/models/accountSet.ts
rename to packages/xrpl/test/models/accountSet.test.ts
diff --git a/packages/xrpl/test/models/baseTransaction.ts b/packages/xrpl/test/models/baseTransaction.test.ts
similarity index 100%
rename from packages/xrpl/test/models/baseTransaction.ts
rename to packages/xrpl/test/models/baseTransaction.test.ts
diff --git a/packages/xrpl/test/models/checkCancel.ts b/packages/xrpl/test/models/checkCancel.test.ts
similarity index 100%
rename from packages/xrpl/test/models/checkCancel.ts
rename to packages/xrpl/test/models/checkCancel.test.ts
diff --git a/packages/xrpl/test/models/checkCash.ts b/packages/xrpl/test/models/checkCash.test.ts
similarity index 100%
rename from packages/xrpl/test/models/checkCash.ts
rename to packages/xrpl/test/models/checkCash.test.ts
diff --git a/packages/xrpl/test/models/checkCreate.ts b/packages/xrpl/test/models/checkCreate.test.ts
similarity index 100%
rename from packages/xrpl/test/models/checkCreate.ts
rename to packages/xrpl/test/models/checkCreate.test.ts
diff --git a/packages/xrpl/test/models/depositPreauth.ts b/packages/xrpl/test/models/depositPreauth.test.ts
similarity index 100%
rename from packages/xrpl/test/models/depositPreauth.ts
rename to packages/xrpl/test/models/depositPreauth.test.ts
diff --git a/packages/xrpl/test/models/escrowCancel.ts b/packages/xrpl/test/models/escrowCancel.test.ts
similarity index 100%
rename from packages/xrpl/test/models/escrowCancel.ts
rename to packages/xrpl/test/models/escrowCancel.test.ts
diff --git a/packages/xrpl/test/models/escrowCreate.ts b/packages/xrpl/test/models/escrowCreate.test.ts
similarity index 100%
rename from packages/xrpl/test/models/escrowCreate.ts
rename to packages/xrpl/test/models/escrowCreate.test.ts
diff --git a/packages/xrpl/test/models/escrowFinish.ts b/packages/xrpl/test/models/escrowFinish.test.ts
similarity index 100%
rename from packages/xrpl/test/models/escrowFinish.ts
rename to packages/xrpl/test/models/escrowFinish.test.ts
diff --git a/packages/xrpl/test/models/offerCancel.ts b/packages/xrpl/test/models/offerCancel.test.ts
similarity index 100%
rename from packages/xrpl/test/models/offerCancel.ts
rename to packages/xrpl/test/models/offerCancel.test.ts
diff --git a/packages/xrpl/test/models/offerCreate.ts b/packages/xrpl/test/models/offerCreate.test.ts
similarity index 100%
rename from packages/xrpl/test/models/offerCreate.ts
rename to packages/xrpl/test/models/offerCreate.test.ts
diff --git a/packages/xrpl/test/models/payment.ts b/packages/xrpl/test/models/payment.test.ts
similarity index 100%
rename from packages/xrpl/test/models/payment.ts
rename to packages/xrpl/test/models/payment.test.ts
diff --git a/packages/xrpl/test/models/paymentChannelClaim.ts b/packages/xrpl/test/models/paymentChannelClaim.test.ts
similarity index 100%
rename from packages/xrpl/test/models/paymentChannelClaim.ts
rename to packages/xrpl/test/models/paymentChannelClaim.test.ts
diff --git a/packages/xrpl/test/models/paymentChannelCreate.ts b/packages/xrpl/test/models/paymentChannelCreate.test.ts
similarity index 100%
rename from packages/xrpl/test/models/paymentChannelCreate.ts
rename to packages/xrpl/test/models/paymentChannelCreate.test.ts
diff --git a/packages/xrpl/test/models/paymentChannelFund.ts b/packages/xrpl/test/models/paymentChannelFund.test.ts
similarity index 100%
rename from packages/xrpl/test/models/paymentChannelFund.ts
rename to packages/xrpl/test/models/paymentChannelFund.test.ts
diff --git a/packages/xrpl/test/models/setRegularKey.ts b/packages/xrpl/test/models/setRegularKey.test.ts
similarity index 100%
rename from packages/xrpl/test/models/setRegularKey.ts
rename to packages/xrpl/test/models/setRegularKey.test.ts
diff --git a/packages/xrpl/test/models/signerListSet.ts b/packages/xrpl/test/models/signerListSet.test.ts
similarity index 100%
rename from packages/xrpl/test/models/signerListSet.ts
rename to packages/xrpl/test/models/signerListSet.test.ts
diff --git a/packages/xrpl/test/models/ticketCreate.ts b/packages/xrpl/test/models/ticketCreate.test.ts
similarity index 100%
rename from packages/xrpl/test/models/ticketCreate.ts
rename to packages/xrpl/test/models/ticketCreate.test.ts
diff --git a/packages/xrpl/test/models/trustSet.ts b/packages/xrpl/test/models/trustSet.test.ts
similarity index 100%
rename from packages/xrpl/test/models/trustSet.ts
rename to packages/xrpl/test/models/trustSet.test.ts
diff --git a/packages/xrpl/test/models/utils.ts b/packages/xrpl/test/models/utils.test.ts
similarity index 100%
rename from packages/xrpl/test/models/utils.ts
rename to packages/xrpl/test/models/utils.test.ts
diff --git a/packages/xrpl/test/runClientTests.ts b/packages/xrpl/test/runClientTests.test.ts
similarity index 97%
rename from packages/xrpl/test/runClientTests.ts
rename to packages/xrpl/test/runClientTests.test.ts
index 0629b550..a5ac1305 100644
--- a/packages/xrpl/test/runClientTests.ts
+++ b/packages/xrpl/test/runClientTests.test.ts
@@ -92,8 +92,8 @@ function loadTestSuites(): LoadedTestSuite[] {
return null
}
let methodName: string
- if (filename.endsWith('.ts')) {
- methodName = filename.slice(0, -3)
+ if (filename.endsWith('.test.ts')) {
+ methodName = filename.slice(0, -8)
} else {
methodName = filename
}
diff --git a/packages/xrpl/test/shamap.ts b/packages/xrpl/test/shamap.test.ts
similarity index 100%
rename from packages/xrpl/test/shamap.ts
rename to packages/xrpl/test/shamap.test.ts
diff --git a/packages/xrpl/test/utils/createCrossChainPayment.ts b/packages/xrpl/test/utils/createCrossChainPayment.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/createCrossChainPayment.ts
rename to packages/xrpl/test/utils/createCrossChainPayment.test.ts
diff --git a/packages/xrpl/test/utils/deriveXAddress.ts b/packages/xrpl/test/utils/deriveXAddress.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/deriveXAddress.ts
rename to packages/xrpl/test/utils/deriveXAddress.test.ts
diff --git a/packages/xrpl/test/utils/dropsToXrp.ts b/packages/xrpl/test/utils/dropsToXrp.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/dropsToXrp.ts
rename to packages/xrpl/test/utils/dropsToXrp.test.ts
diff --git a/packages/xrpl/test/utils/getBalanceChanges.ts b/packages/xrpl/test/utils/getBalanceChanges.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/getBalanceChanges.ts
rename to packages/xrpl/test/utils/getBalanceChanges.test.ts
diff --git a/packages/xrpl/test/utils/hasNextPage.ts b/packages/xrpl/test/utils/hasNextPage.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/hasNextPage.ts
rename to packages/xrpl/test/utils/hasNextPage.test.ts
diff --git a/packages/xrpl/test/utils/hashLedger.ts b/packages/xrpl/test/utils/hashLedger.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/hashLedger.ts
rename to packages/xrpl/test/utils/hashLedger.test.ts
diff --git a/packages/xrpl/test/utils/hashes.ts b/packages/xrpl/test/utils/hashes.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/hashes.ts
rename to packages/xrpl/test/utils/hashes.test.ts
diff --git a/packages/xrpl/test/utils/hexConversion.ts b/packages/xrpl/test/utils/hexConversion.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/hexConversion.ts
rename to packages/xrpl/test/utils/hexConversion.test.ts
diff --git a/packages/xrpl/test/utils/isValidAddress.ts b/packages/xrpl/test/utils/isValidAddress.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/isValidAddress.ts
rename to packages/xrpl/test/utils/isValidAddress.test.ts
diff --git a/packages/xrpl/test/utils/parseNFTokenID.ts b/packages/xrpl/test/utils/parseNFTokenID.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/parseNFTokenID.ts
rename to packages/xrpl/test/utils/parseNFTokenID.test.ts
diff --git a/packages/xrpl/test/utils/quality.ts b/packages/xrpl/test/utils/quality.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/quality.ts
rename to packages/xrpl/test/utils/quality.test.ts
diff --git a/packages/xrpl/test/utils/signPaymentChannelClaim.ts b/packages/xrpl/test/utils/signPaymentChannelClaim.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/signPaymentChannelClaim.ts
rename to packages/xrpl/test/utils/signPaymentChannelClaim.test.ts
diff --git a/packages/xrpl/test/utils/timeConversion.ts b/packages/xrpl/test/utils/timeConversion.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/timeConversion.ts
rename to packages/xrpl/test/utils/timeConversion.test.ts
diff --git a/packages/xrpl/test/utils/transferRate.ts b/packages/xrpl/test/utils/transferRate.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/transferRate.ts
rename to packages/xrpl/test/utils/transferRate.test.ts
diff --git a/packages/xrpl/test/utils/verifyPaymentChannelClaim.ts b/packages/xrpl/test/utils/verifyPaymentChannelClaim.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/verifyPaymentChannelClaim.ts
rename to packages/xrpl/test/utils/verifyPaymentChannelClaim.test.ts
diff --git a/packages/xrpl/test/utils/xrpToDrops.ts b/packages/xrpl/test/utils/xrpToDrops.test.ts
similarity index 100%
rename from packages/xrpl/test/utils/xrpToDrops.ts
rename to packages/xrpl/test/utils/xrpToDrops.test.ts
diff --git a/packages/xrpl/test/wallet/fundWallet.ts b/packages/xrpl/test/wallet/fundWallet.test.ts
similarity index 100%
rename from packages/xrpl/test/wallet/fundWallet.ts
rename to packages/xrpl/test/wallet/fundWallet.test.ts
diff --git a/packages/xrpl/test/wallet/index.ts b/packages/xrpl/test/wallet/index.test.ts
similarity index 100%
rename from packages/xrpl/test/wallet/index.ts
rename to packages/xrpl/test/wallet/index.test.ts
diff --git a/packages/xrpl/test/wallet/signer.ts b/packages/xrpl/test/wallet/signer.test.ts
similarity index 100%
rename from packages/xrpl/test/wallet/signer.ts
rename to packages/xrpl/test/wallet/signer.test.ts
From 17f04b3083ecf1c1f12269c4257182b812f1579b Mon Sep 17 00:00:00 2001
From: Jackson Mills
Date: Mon, 9 Jan 2023 09:26:14 -0800
Subject: [PATCH 10/10] Fix broken test in connection.ts for node 18 and add
node 18 testing (#2183)
* Change localhost to 127.0.0.1
* Add Node 18 testing
---
.github/workflows/nodejs.yml | 16 +++++++---------
packages/xrpl/test/connection.test.ts | 2 +-
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml
index bfa1c067..cbb45007 100644
--- a/.github/workflows/nodejs.yml
+++ b/.github/workflows/nodejs.yml
@@ -5,7 +5,7 @@ name: Node.js CI
on:
push:
- branches: [ main, 1.x ]
+ branches: [main, 1.x]
pull_request:
workflow_dispatch:
@@ -57,7 +57,7 @@ jobs:
strategy:
matrix:
- node-version: [12.x, 14.x, 16.x]
+ node-version: [12.x, 14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v3
@@ -98,15 +98,14 @@ jobs:
strategy:
matrix:
- node-version: [12.x, 14.x, 16.x]
+ node-version: [12.x, 14.x, 16.x, 18.x]
services:
rippled:
image: natenichols/rippled-standalone:latest
ports:
- - 6006:6006
- options:
- --health-cmd="wget localhost:6006 || exit 1" --health-interval=5s --health-retries=10 --health-timeout=2s
+ - 6006:6006
+ options: --health-cmd="wget localhost:6006 || exit 1" --health-interval=5s --health-retries=10 --health-timeout=2s
steps:
- uses: actions/checkout@v3
@@ -156,9 +155,8 @@ jobs:
rippled:
image: natenichols/rippled-standalone:latest
ports:
- - 6006:6006
- options:
- --health-cmd="wget localhost:6006 || exit 1" --health-interval=5s --health-retries=10 --health-timeout=2s
+ - 6006:6006
+ options: --health-cmd="wget localhost:6006 || exit 1" --health-interval=5s --health-retries=10 --health-timeout=2s
steps:
- uses: actions/checkout@v3
diff --git a/packages/xrpl/test/connection.test.ts b/packages/xrpl/test/connection.test.ts
index 1b3a3046..1917fc27 100644
--- a/packages/xrpl/test/connection.test.ts
+++ b/packages/xrpl/test/connection.test.ts
@@ -136,7 +136,7 @@ describe('Connection', function () {
createServer().then((server: net.Server) => {
const port = (server.address() as net.AddressInfo).port
const options = {
- proxy: `ws://localhost:${port}`,
+ proxy: `ws://127.0.0.1:${port}`,
authorization: 'authorization',
trustedCertificates: ['path/to/pem'],
}
Derives a wallet from a bip39 or RFC1751 mnemonic (Defaults to bip39).
+Deprecated
since version 2.6.1. +Will be deleted in version 3.0.0. +This representation is currently deprecated in rippled. +You should use another method to represent your keys such as a seed or public/private keypair.
+Returns
A Wallet derived from a mnemonic.
Throws
ValidationError if unable to derive private key from mnemonic input.
@@ -386,7 +391,7 @@ the serialized Transaction desn't match the original transaction.