Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/connect-examples/electron-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "hardware-example",
"productName": "HardwareExample",
"executableName": "onekey-hardware-example",
"version": "1.1.5",
"version": "1.1.6",
"author": "OneKey",
"description": "End-to-end encrypted workspaces for teams",
"main": "dist/index.js",
Expand Down
10 changes: 5 additions & 5 deletions packages/connect-examples/expo-example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expo-example",
"version": "1.1.5",
"version": "1.1.6-patch.4",
"scripts": {
"start": "cross-env CONNECT_SRC=https://localhost:8087/ yarn expo start --dev-client",
"android": "yarn expo run:android",
Expand All @@ -19,10 +19,10 @@
"@noble/ed25519": "^2.1.0",
"@noble/hashes": "^1.3.3",
"@noble/secp256k1": "^1.7.1",
"@onekeyfe/hd-ble-sdk": "1.1.5",
"@onekeyfe/hd-common-connect-sdk": "1.1.5",
"@onekeyfe/hd-core": "1.1.5",
"@onekeyfe/hd-web-sdk": "1.1.5",
"@onekeyfe/hd-ble-sdk": "1.1.6-patch.4",
"@onekeyfe/hd-common-connect-sdk": "1.1.6-patch.4",
"@onekeyfe/hd-core": "1.1.6-patch.4",
"@onekeyfe/hd-web-sdk": "1.1.6-patch.4",
"@onekeyfe/react-native-ble-utils": "^0.1.3",
"@polkadot/util-crypto": "13.1.1",
"@react-native-async-storage/async-storage": "1.21.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/connect-examples/expo-playground/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/onekey-hardware-playground",
"version": "1.1.5",
"version": "1.1.6-patch.4",
"private": true,
"sideEffects": [
"app/utils/shim.js",
Expand All @@ -17,9 +17,9 @@
},
"dependencies": {
"@noble/hashes": "^1.8.0",
"@onekeyfe/hd-core": "1.1.5",
"@onekeyfe/hd-shared": "1.1.5",
"@onekeyfe/hd-web-sdk": "1.1.5",
"@onekeyfe/hd-core": "1.1.6-patch.4",
"@onekeyfe/hd-shared": "1.1.6-patch.4",
"@onekeyfe/hd-web-sdk": "1.1.6-patch.4",
"@radix-ui/react-checkbox": "^1.3.2",
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-dropdown-menu": "^2.1.15",
Expand Down
14 changes: 6 additions & 8 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-core",
"version": "1.1.5",
"version": "1.1.6-patch.4",
"description": "> TODO: description",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
Expand All @@ -25,25 +25,23 @@
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.5",
"@onekeyfe/hd-transport": "1.1.5",
"axios": "^0.27.2",
"@onekeyfe/hd-shared": "1.1.6-patch.4",
"@onekeyfe/hd-transport": "1.1.6-patch.4",
"axios": "^0.30.1",
"bignumber.js": "^9.0.2",
"bytebuffer": "^5.0.1",
"jszip": "^3.10.1",
"parse-uri": "^1.0.7",
"semver": "^7.3.7"
},
"peerDependencies": {
"@noble/hashes": "^1.1.3",
"ripple-keypairs": "^1.3.1"
"@noble/hashes": "^1.1.3"
},
"devDependencies": {
"@noble/hashes": "^1.1.3",
"@types/parse-uri": "^1.0.0",
"@types/semver": "^7.3.9",
"@types/w3c-web-usb": "^1.0.10",
"@types/web-bluetooth": "^0.0.21",
"ripple-keypairs": "^1.3.1"
"@types/web-bluetooth": "^0.0.21"
}
}
19 changes: 0 additions & 19 deletions packages/core/src/api/xrp/XrpGetAddress.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { deriveAddress } from 'ripple-keypairs';
import { UI_REQUEST } from '../../constants/ui-request';
import { XrpAddress, XrpGetAddressParams } from '../../types/api/xrpGetAddress';
import { supportBatchPublicKey } from '../../utils/deviceFeaturesUtils';
import { BaseMethod } from '../BaseMethod';
import { validateParams, validateResult } from '../helpers/paramsValidator';
import { serializedPath, validatePath } from '../helpers/pathUtils';
import { batchGetPublickeys } from '../helpers/batchGetPublickeys';

export default class XrpGetAddress extends BaseMethod<
{
Expand Down Expand Up @@ -57,22 +54,6 @@ export default class XrpGetAddress extends BaseMethod<
}

async run() {
if (this.hasBundle && supportBatchPublicKey(this.device?.features) && !this.shouldConfirm) {
const res = await batchGetPublickeys(this.device, this.params, 'secp256k1', 144);
const result = res.public_keys.map((publicKey: string, index: number) => ({
path: serializedPath((this.params as unknown as any[])[index].address_n),
address: deriveAddress(publicKey),
publicKey,
pub: publicKey,
}));

validateResult(result, ['address', 'publicKey'], {
expectedLength: this.params.length,
});

return Promise.resolve(result);
}

const responses: XrpAddress[] = [];
for (let i = 0; i < this.params.length; i++) {
const param = this.params[i];
Expand Down
8 changes: 4 additions & 4 deletions packages/hd-ble-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-ble-sdk",
"version": "1.1.5",
"version": "1.1.6-patch.4",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "ISC",
Expand All @@ -20,8 +20,8 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@onekeyfe/hd-core": "1.1.5",
"@onekeyfe/hd-shared": "1.1.5",
"@onekeyfe/hd-transport-react-native": "1.1.5"
"@onekeyfe/hd-core": "1.1.6-patch.4",
"@onekeyfe/hd-shared": "1.1.6-patch.4",
"@onekeyfe/hd-transport-react-native": "1.1.6-patch.4"
}
}
14 changes: 7 additions & 7 deletions packages/hd-common-connect-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-common-connect-sdk",
"version": "1.1.5",
"version": "1.1.6-patch.4",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "ISC",
Expand All @@ -20,11 +20,11 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@onekeyfe/hd-core": "1.1.5",
"@onekeyfe/hd-shared": "1.1.5",
"@onekeyfe/hd-transport-emulator": "1.1.5",
"@onekeyfe/hd-transport-http": "1.1.5",
"@onekeyfe/hd-transport-lowlevel": "1.1.5",
"@onekeyfe/hd-transport-web-device": "1.1.5"
"@onekeyfe/hd-core": "1.1.6-patch.4",
"@onekeyfe/hd-shared": "1.1.6-patch.4",
"@onekeyfe/hd-transport-emulator": "1.1.6-patch.4",
"@onekeyfe/hd-transport-http": "1.1.6-patch.4",
"@onekeyfe/hd-transport-lowlevel": "1.1.6-patch.4",
"@onekeyfe/hd-transport-web-device": "1.1.6-patch.4"
}
}
4 changes: 2 additions & 2 deletions packages/hd-transport-electron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-electron",
"version": "1.1.5",
"version": "1.1.6-patch.4",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "MIT",
Expand All @@ -25,7 +25,7 @@
"electron-log": ">=4.0.0"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.5"
"@onekeyfe/hd-shared": "1.1.6-patch.4"
},
"devDependencies": {
"@types/web-bluetooth": "^0.0.17",
Expand Down
8 changes: 4 additions & 4 deletions packages/hd-transport-emulator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-emulator",
"version": "1.1.5",
"version": "1.1.6-patch.4",
"description": "hardware emulator transport",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
Expand All @@ -24,9 +24,9 @@
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.5",
"@onekeyfe/hd-transport": "1.1.5",
"axios": "^0.27.2",
"@onekeyfe/hd-shared": "1.1.6-patch.4",
"@onekeyfe/hd-transport": "1.1.6-patch.4",
"axios": "^0.30.1",
"secure-json-parse": "^4.0.0"
}
}
8 changes: 4 additions & 4 deletions packages/hd-transport-http/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-http",
"version": "1.1.5",
"version": "1.1.6-patch.4",
"description": "hardware http transport",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
Expand All @@ -24,9 +24,9 @@
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.5",
"@onekeyfe/hd-transport": "1.1.5",
"axios": "^0.27.2",
"@onekeyfe/hd-shared": "1.1.6-patch.4",
"@onekeyfe/hd-transport": "1.1.6-patch.4",
"axios": "^0.30.1",
"secure-json-parse": "^4.0.0"
}
}
6 changes: 3 additions & 3 deletions packages/hd-transport-lowlevel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-lowlevel",
"version": "1.1.5",
"version": "1.1.6-patch.4",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -19,7 +19,7 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.5",
"@onekeyfe/hd-transport": "1.1.5"
"@onekeyfe/hd-shared": "1.1.6-patch.4",
"@onekeyfe/hd-transport": "1.1.6-patch.4"
}
}
6 changes: 3 additions & 3 deletions packages/hd-transport-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-react-native",
"version": "1.1.5",
"version": "1.1.6-patch.4",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -19,8 +19,8 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.5",
"@onekeyfe/hd-transport": "1.1.5",
"@onekeyfe/hd-shared": "1.1.6-patch.4",
"@onekeyfe/hd-transport": "1.1.6-patch.4",
"@onekeyfe/react-native-ble-utils": "^0.1.4",
"react-native-ble-plx": "3.5.0"
}
Expand Down
8 changes: 4 additions & 4 deletions packages/hd-transport-web-device/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-web-device",
"version": "1.1.5",
"version": "1.1.6-patch.4",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "MIT",
Expand All @@ -20,11 +20,11 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.5",
"@onekeyfe/hd-transport": "1.1.5"
"@onekeyfe/hd-shared": "1.1.6-patch.4",
"@onekeyfe/hd-transport": "1.1.6-patch.4"
},
"devDependencies": {
"@onekeyfe/hd-transport-electron": "1.1.5",
"@onekeyfe/hd-transport-electron": "1.1.6-patch.4",
"@types/w3c-web-usb": "^1.0.6",
"@types/web-bluetooth": "^0.0.17"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/hd-transport/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport",
"version": "1.1.5",
"version": "1.1.6-patch.4",
"description": "> TODO: description",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
Expand Down
12 changes: 6 additions & 6 deletions packages/hd-web-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@onekeyfe/hd-web-sdk",
"version": "1.1.5",
"version": "1.1.6-patch.4",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "ISC",
"type": "commonjs",
"main": "build/onekey-js-sdk.js",
"main": "build/onekey-js-sdk.min.js",
"types": "dist/index.d.ts",
"publishConfig": {
"access": "public"
Expand All @@ -21,10 +21,10 @@
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "^0.0.17",
"@onekeyfe/hd-core": "1.1.5",
"@onekeyfe/hd-shared": "1.1.5",
"@onekeyfe/hd-transport-http": "1.1.5",
"@onekeyfe/hd-transport-web-device": "1.1.5"
"@onekeyfe/hd-core": "1.1.6-patch.4",
"@onekeyfe/hd-shared": "1.1.6-patch.4",
"@onekeyfe/hd-transport-http": "1.1.6-patch.4",
"@onekeyfe/hd-transport-web-device": "1.1.6-patch.4"
},
"devDependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.17.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-shared",
"version": "1.1.5",
"version": "1.1.6-patch.4",
"description": "Hardware SDK's shared tool library",
"keywords": [
"Hardware-SDK",
Expand Down
Loading