From 6b40e4fe9da0a70a9c6c470e18e69200a1f52713 Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Sun, 2 Feb 2020 15:14:44 -0800 Subject: [PATCH] Release 1.6.3-beta.1 (#1195) * Update ripple-keypairs and fix types --- HISTORY.md | 13 +++++ package.json | 4 +- src/offline/generate-address.ts | 5 +- src/offline/verify-payment-channel-claim.ts | 2 +- yarn.lock | 53 ++++----------------- 5 files changed, 28 insertions(+), 49 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index fe3dadd4..50737734 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,18 @@ # ripple-lib Release History +## 1.6.3-beta.1 (2020-01-29) + +* 1.6.3-beta.1 + * Update ripple-keypairs to 1.0.0-beta.6 +* 1.6.3-beta.0 + * Bug fix: Assign event listener to socket close event on open before attempting post-open logic (#1186) + * Protects against possible unhandled rejection in disconnect + * Adds the Connection `_ws.close` event listener post `_ws.open` before executing any post `_ws.open` logic, i.e. `Connection._subscribeToLedger` + * This prevents a reconnection error loop that occurs if `Connection._ws` is never cleaned up by the unreachable `_ws.close` event listener + * Also ensures that a possible disconnect() promise rejection is not unhandled if any `_ws.open` logic in `Connection.connect()` throws + * Dependencies + * Update mocha-junit-reporter, @types/node, mocha, @typescript-eslint/eslint-plugin, ripple-address-codec + ## 1.6.2 (2020-01-17) * Bug fix: Catch possible error in reconnect() on _heartbeat(), emit reconnect error (#1179) diff --git a/package.json b/package.json index 5b355e81..890c6d07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ripple-lib", - "version": "1.6.2", + "version": "1.6.3-beta.1", "license": "ISC", "description": "A TypeScript/JavaScript API for interacting with the XRP Ledger in Node.js and the browser", "files": [ @@ -29,7 +29,7 @@ "lodash.isequal": "^4.5.0", "ripple-address-codec": "^4.0.0", "ripple-binary-codec": "^0.2.5", - "ripple-keypairs": "^0.11.0", + "ripple-keypairs": "^1.0.0-beta.6", "ripple-lib-transactionparser": "0.8.2", "ws": "^7.2.0" }, diff --git a/src/offline/generate-address.ts b/src/offline/generate-address.ts index 7aef1684..44672c94 100644 --- a/src/offline/generate-address.ts +++ b/src/offline/generate-address.ts @@ -28,7 +28,10 @@ export interface GenerateAddressOptions { function generateAddressAPI(options: GenerateAddressOptions): GeneratedAddress { validate.generateAddress({options}) try { - const secret = keypairs.generateSeed(options) + const secret = keypairs.generateSeed({ + entropy: Uint8Array.from(options.entropy), + algorithm: options.algorithm + }) const keypair = keypairs.deriveKeypair(secret) const classicAddress = keypairs.deriveAddress(keypair.publicKey) const returnValue: any = { diff --git a/src/offline/verify-payment-channel-claim.ts b/src/offline/verify-payment-channel-claim.ts index aeba50de..e4eb76b7 100644 --- a/src/offline/verify-payment-channel-claim.ts +++ b/src/offline/verify-payment-channel-claim.ts @@ -7,7 +7,7 @@ function verifyPaymentChannelClaim( amount: string, signature: string, publicKey: string -): string { +): boolean { validate.verifyPaymentChannelClaim({channel, amount, signature, publicKey}) const signingData = binary.encodeForSigningClaim({ diff --git a/yarn.lock b/yarn.lock index a9ea902d..1b9105f9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -644,13 +644,6 @@ atob@^2.1.1: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -babel-runtime@^5.8.20: - version "5.8.38" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-5.8.38.tgz#1c0b02eb63312f5f087ff20450827b425c9d4c19" - integrity sha1-HAsC62MxL18If/IEUIJ7QlydTBk= - dependencies: - core-js "^1.0.0" - babel-runtime@^6.6.1: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" @@ -676,11 +669,6 @@ base-x@3.0.7: dependencies: safe-buffer "^5.0.1" -base-x@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-1.1.0.tgz#42d3d717474f9ea02207f6d1aa1f426913eeb7ac" - integrity sha1-QtPXF0dPnqAiB/bRqh9CaRPut6w= - base64-js@^1.0.2: version "1.3.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" @@ -741,11 +729,6 @@ bluebird@^3.5.5: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^3.1.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-3.3.0.tgz#1138e577889fdc97bbdab51844f2190dfc0ae3d7" - integrity sha1-ETjld4if3Je72rUYRPIZDfwK49c= - bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" @@ -1230,11 +1213,6 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= -core-js@^1.0.0: - version "1.2.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" - integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY= - core-js@^2.4.0: version "2.6.11" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" @@ -4122,14 +4100,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -ripple-address-codec@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ripple-address-codec/-/ripple-address-codec-2.0.1.tgz#eddbe3a7960d2e02c5c1c74fb9a9fa0d2dfb6571" - integrity sha1-7dvjp5YNLgLFwcdPuan6DS37ZXE= - dependencies: - hash.js "^1.0.3" - x-address-codec "^0.7.0" - ripple-address-codec@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/ripple-address-codec/-/ripple-address-codec-4.1.0.tgz#7a119638527f1ccf1eb4aea3d4a8886bc9ccd5c5" @@ -4151,17 +4121,17 @@ ripple-binary-codec@^0.2.5: lodash "^4.17.15" ripple-address-codec "^4.0.0" -ripple-keypairs@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/ripple-keypairs/-/ripple-keypairs-0.11.1.tgz#e8637c9d577a579c311138c7848cdc5928908979" - integrity sha512-xdakxb+/4yo3TWA2ZImEma3g9OZrvoVRMDC9A2dfk6V+tBsDWug1p53bfmSnfTaue7kf2O5ejq2bfmYG8W08FA== +ripple-keypairs@^1.0.0-beta.6: + version "1.0.0-beta.6" + resolved "https://registry.yarnpkg.com/ripple-keypairs/-/ripple-keypairs-1.0.0-beta.6.tgz#e13e6e1995ab3cc872990b3443da94d3578515a9" + integrity sha512-DKBakV9K/ucTuJYrLhtiaYuYz9sHL7M9LYHgSgsfvdJ347I56dTq6FvyvPDIx6TG3FgwLwvpNQwNvGYlMCMRZA== dependencies: - babel-runtime "^5.8.20" - bn.js "^3.1.1" + bn.js "^5.1.1" brorand "^1.0.5" elliptic "^6.5.2" hash.js "^1.0.3" - ripple-address-codec "^2.0.1" + ripple-address-codec "^4.0.0" + source-map-support "^0.5.13" ripple-lib-transactionparser@0.8.2: version "0.8.2" @@ -4384,7 +4354,7 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.6, source-map-support@~0.5.12: +source-map-support@^0.5.13, source-map-support@^0.5.6, source-map-support@~0.5.12: version "0.5.16" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== @@ -5213,13 +5183,6 @@ ws@^7.2.0: resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.1.tgz#03ed52423cd744084b2cf42ed197c8b65a936b8e" integrity sha512-sucePNSafamSKoOqoNfBd8V0StlkzJKL2ZAhGQinCfNQ+oacw+Pk7lcdAElecBF2VkLNZRiIb5Oi1Q5lVUVt2A== -x-address-codec@^0.7.0: - version "0.7.2" - resolved "https://registry.yarnpkg.com/x-address-codec/-/x-address-codec-0.7.2.tgz#2a2f7bb00278520bd13733a7959a05443d6802e0" - integrity sha1-Ki97sAJ4UgvRNzOnlZoFRD1oAuA= - dependencies: - base-x "^1.0.1" - x-is-string@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/x-is-string/-/x-is-string-0.1.0.tgz#474b50865af3a49a9c4657f05acd145458f77d82"