diff --git a/README-npm.md b/README-npm.md index 94c7db7..53890e3 100644 --- a/README-npm.md +++ b/README-npm.md @@ -13,7 +13,7 @@ We recommend using the npmjs package in order to receive updates/fixes. # Available commands | Operation | Response | Command | -|----------------------|-----------------------------|-----------------------------| +| -------------------- | --------------------------- | --------------------------- | | getVersion | app version | --------------- | | publicKey | pubkey | path (legacy command) | | getAddressAndPubKey | pubkey + address | path + ( showInDevice ) | diff --git a/README.md b/README.md index f63995a..fad1830 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ We recommend using the npmjs package in order to receive updates/fixes. # Available commands | Operation | Response | Command | -|----------------------|-----------------------------|-----------------------------| +| -------------------- | --------------------------- | --------------------------- | | getVersion | app version | --------------- | | publicKey | pubkey | path (legacy command) | | getAddressAndPubKey | pubkey + address | path + ( showInDevice ) | diff --git a/package.json b/package.json index 5280fae..17fe2cf 100644 --- a/package.json +++ b/package.json @@ -37,10 +37,10 @@ }, "dependencies": { "@ledgerhq/hw-transport": "6.31.2", - "@zondax/ledger-js": "^1.0.1", + "@noble/hashes": "^1.4", "@scure/base": "^1.1.7", + "@zondax/ledger-js": "^1.0.1", "buffer": "^6.0.3", - "@noble/hashes": "^1.4", "ripemd160": "^2.0.2" }, "devDependencies": { diff --git a/src/index.ts b/src/index.ts index 1df2bff..fcefca8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -14,6 +14,9 @@ * limitations under the License. ******************************************************************************* */ import type Transport from '@ledgerhq/hw-transport' +import { ripemd160 } from '@noble/hashes/ripemd160' +import { sha256 } from '@noble/hashes/sha256' +import { bech32 } from '@scure/base' import BaseApp, { HARDENED, INSGeneric, @@ -29,10 +32,6 @@ import { ByteStream } from '@zondax/ledger-js/dist/byteStream' import { CLA, P1_VALUES, P2_VALUES, PKLEN } from './consts' import { type ResponseAddress, type ResponsePubkey, ResponseSign } from './types' -import { ripemd160 } from '@noble/hashes/ripemd160' -import { sha256 } from '@noble/hashes/sha256' -import { bech32 } from '@scure/base' - export default class CosmosApp extends BaseApp { static _INS = { GET_VERSION: 0x00,