-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚀 (signer-utils): Create shared signer utils package
- Loading branch information
1 parent
766e20b
commit eae6b2e
Showing
23 changed files
with
155 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 0 additions & 55 deletions
55
packages/signer/keyring-btc/src/internal/shared/utils/DerivationPathUtils.test.ts
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
packages/signer/keyring-btc/src/internal/shared/utils/DerivationPathUtils.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
lib/* | ||
coverage/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
...require("@ledgerhq/prettier-config-dsdk"), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# @ledgerhq/signer-utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Ledger Signer Utils Package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import config from "@ledgerhq/eslint-config-dsdk"; | ||
|
||
export default [ | ||
...config, | ||
{ | ||
ignores: ["eslint.config.mjs"], | ||
languageOptions: { | ||
parserOptions: { | ||
project: "./tsconfig.json", | ||
}, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* eslint no-restricted-syntax: 0 */ | ||
import { JestConfigWithTsJest, pathsToModuleNameMapper } from "ts-jest"; | ||
|
||
import { compilerOptions } from "./tsconfig.json"; | ||
|
||
const paths = pathsToModuleNameMapper(compilerOptions.paths, { | ||
prefix: "<rootDir>/", | ||
}); | ||
|
||
const config: JestConfigWithTsJest = { | ||
preset: "@ledgerhq/jest-config-dsdk", | ||
setupFiles: ["<rootDir>/jest.setup.ts"], | ||
testPathIgnorePatterns: ["<rootDir>/lib/esm", "<rootDir>/lib/cjs"], | ||
collectCoverageFrom: [ | ||
"src/**/*.ts", | ||
"!src/**/*.stub.ts", | ||
"!src/index.ts", | ||
"!src/api/index.ts", | ||
"!src/**/__test-utils__/*", | ||
], | ||
moduleNameMapper: { | ||
...paths, | ||
}, | ||
}; | ||
|
||
export default config; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "@ledgerhq/signer-utils", | ||
"version": "1.0.0", | ||
"license": "Apache-2.0", | ||
"private": true, | ||
"exports": { | ||
".": { | ||
"types": "./lib/types/index.d.ts", | ||
"import": "./lib/esm/index.js", | ||
"require": "./lib/cjs/index.js" | ||
}, | ||
"./*": { | ||
"types": "./lib/types/*", | ||
"import": "./lib/esm/*", | ||
"require": "./lib/cjs/*" | ||
} | ||
}, | ||
"files": [ | ||
"./lib" | ||
], | ||
"scripts": { | ||
"prebuild": "rimraf lib", | ||
"build": "pnpm lmdk-build --entryPoints src/index.ts,src/**/*.ts --tsconfig tsconfig.prod.json", | ||
"dev": "concurrently \"pnpm watch:builds\" \"pnpm watch:types\"", | ||
"watch:builds": "pnpm lmdk-watch --entryPoints src/index.ts,src/**/*.ts --tsconfig tsconfig.prod.json", | ||
"watch:types": "concurrently \"tsc --watch -p tsconfig.prod.json\" \"tsc-alias --watch -p tsconfig.prod.json\"", | ||
"lint": "eslint", | ||
"lint:fix": "pnpm lint --fix", | ||
"postpack": "find . -name '*.tgz' -exec cp {} ../../../dist/ \\; ", | ||
"prettier": "prettier . --check", | ||
"prettier:fix": "prettier . --write", | ||
"typecheck": "tsc --noEmit", | ||
"test": "jest", | ||
"test:watch": "pnpm test -- --watch", | ||
"test:coverage": "pnpm test -- --coverage" | ||
}, | ||
"devDependencies": { | ||
"@ledgerhq/device-management-kit": "workspace:*", | ||
"@ledgerhq/esbuild-tools": "workspace:*", | ||
"@ledgerhq/eslint-config-dsdk": "workspace:*", | ||
"@ledgerhq/jest-config-dsdk": "workspace:*", | ||
"@ledgerhq/prettier-config-dsdk": "workspace:*", | ||
"@ledgerhq/tsconfig-dsdk": "workspace:*", | ||
"ts-node": "^10.9.2" | ||
}, | ||
"peerDependencies": { | ||
"@ledgerhq/device-management-kit": "workspace:*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./utils/DerivationPathUtils"; |
File renamed without changes.
2 changes: 0 additions & 2 deletions
2
...ernal/shared/utils/DerivationPathUtils.ts → ...er-utils/src/utils/DerivationPathUtils.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"extends": "@ledgerhq/tsconfig-dsdk/tsconfig.sdk", | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"outDir": "./lib/types", | ||
"module": "esnext", | ||
"target": "esnext", | ||
"moduleResolution": "bundler", | ||
"emitDeclarationOnly": true, | ||
"paths": { | ||
"@api/*": ["./src/api/*"], | ||
"@internal/*": ["./src/internal/*"], | ||
"@root/*": ["./*"] | ||
}, | ||
"resolveJsonModule": true | ||
}, | ||
"include": ["src", "jest.*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"include": ["src"] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.