-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: icp coin modularization (#8560)
* feat: icp coin modularization * feat: rename icp to files to intenet computer * fix conflicts * adress comments * adress comments * address comments * remove comment * remove package in desktop * lint stuff * update pnpm-lock file * fix stuffs
- Loading branch information
Showing
63 changed files
with
937 additions
and
511 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@ledgerhq/coin-internet_computer": minor | ||
"@ledgerhq/live-common": minor | ||
--- | ||
|
||
internet computer coin modularization |
38 changes: 38 additions & 0 deletions
38
libs/coin-modules/coin-internet_computer/.unimportedrc.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,38 @@ | ||
{ | ||
"entry": [ | ||
"src/api/api.ts", | ||
"src/api/index.ts", | ||
"src/bridge/bridgeHelpers/account.ts", | ||
"src/bridge/bridgeHelpers/addresses.ts", | ||
"src/bridge/bridgeHelpers/fee.ts", | ||
"src/bridge/bridgeHelpers/icpRosetta/index.ts", | ||
"src/bridge/bridgeHelpers/icpRosetta/types.ts", | ||
"src/bridge/bridgeHelpers/icpRosetta/utils.ts", | ||
"src/bridge/broadcast.ts", | ||
"src/bridge/buildOptimisticOperation.ts", | ||
"src/bridge/createTransaction.ts", | ||
"src/bridge/deviceTransactionConfig.ts", | ||
"src/bridge/estimateMaxSpendable.ts", | ||
"src/bridge/getTransactionStatus.ts", | ||
"src/bridge/index.ts", | ||
"src/bridge/prepareTransaction.ts", | ||
"src/bridge/signOperation.ts", | ||
"src/bridge/transaction.ts", | ||
"src/common-logic/index.ts", | ||
"src/common-logic/utils.ts", | ||
"src/consts.ts", | ||
"src/errors.ts", | ||
"src/hw-signMessage.ts", | ||
"src/signer/getAddress.ts", | ||
"src/signer/index.ts", | ||
"src/test/bot-specs.ts", | ||
"src/test/bridgeDatasetTest.ts", | ||
"src/test/cli.ts", | ||
"src/test/index.ts", | ||
"src/test/speculos-deviceActions.ts", | ||
"src/types/common.ts", | ||
"src/types/index.ts", | ||
"src/types/signer.ts" | ||
], | ||
"ignoreUnresolved": ["form-data", "proxy-from-env", "follow-redirects"] | ||
} |
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,9 @@ | ||
/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */ | ||
module.exports = { | ||
collectCoverageFrom: ["src/**/*.ts"], | ||
coverageDirectory: "coverage", | ||
preset: "ts-jest", | ||
testEnvironment: "node", | ||
testPathIgnorePatterns: ["lib/", "lib-es/"], | ||
passWithNoTests: true, | ||
}; |
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,128 @@ | ||
{ | ||
"name": "@ledgerhq/coin-internet_computer", | ||
"version": "1.3.2", | ||
"description": "Ledger Internet Computer integration", | ||
"keywords": [ | ||
"Ledger", | ||
"LedgerWallet", | ||
"ICP", | ||
"Internet Computer" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/LedgerHQ/ledger-live.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/LedgerHQ/ledger-live/issues" | ||
}, | ||
"homepage": "https://github.com/LedgerHQ/ledger-live/tree/develop/libs/coin-modules/coin-internet_computer", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
"lib/*": [ | ||
"lib/*" | ||
], | ||
"lib-es/*": [ | ||
"lib-es/*" | ||
], | ||
"specs": [ | ||
"lib/test/bot-specs" | ||
], | ||
"*": [ | ||
"lib/*", | ||
"lib/api/*", | ||
"lib/bridge/*", | ||
"lib/common-logic/*", | ||
"lib/signer/*", | ||
"lib/test/*", | ||
"lib/types/*" | ||
] | ||
} | ||
}, | ||
"exports": { | ||
"./lib/*": "./lib/*.js", | ||
"./lib-es/*": "./lib-es/*.js", | ||
"./api": { | ||
"require": "./lib/api/index.js", | ||
"default": "./lib-es/api/index.js" | ||
}, | ||
"./deviceTransactionConfig": { | ||
"require": "./lib/bridge/deviceTransactionConfig.js", | ||
"default": "./lib-es/bridge/deviceTransactionConfig.js" | ||
}, | ||
"./logic": { | ||
"require": "./lib/common-logic/index.js", | ||
"default": "./lib-es/common-logic/index.js" | ||
}, | ||
"./signer": { | ||
"require": "./lib/signer/index.js", | ||
"default": "./lib-es/signer/index.js" | ||
}, | ||
"./specs": { | ||
"require": "./lib/test/bot-specs.js", | ||
"default": "./lib-es/test/bot-specs.js" | ||
}, | ||
"./transaction": { | ||
"require": "./lib/bridge/transaction.js", | ||
"default": "./lib-es/bridge/transaction.js" | ||
}, | ||
"./types": { | ||
"require": "./lib/types/index.js", | ||
"default": "./lib-es/types/index.js" | ||
}, | ||
"./*": { | ||
"require": "./lib/*.js", | ||
"default": "./lib-es/*.js" | ||
}, | ||
".": { | ||
"require": "./lib/index.js", | ||
"default": "./lib-es/index.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
"@ledgerhq/coin-framework": "workspace:^", | ||
"@ledgerhq/cryptoassets": "workspace:^", | ||
"@ledgerhq/devices": "workspace:*", | ||
"@ledgerhq/errors": "workspace:^", | ||
"@ledgerhq/live-env": "workspace:^", | ||
"@ledgerhq/live-network": "workspace:^", | ||
"@ledgerhq/logs": "workspace:^", | ||
"@ledgerhq/types-live": "workspace:^", | ||
"@dfinity/agent": "^0.21.0", | ||
"@dfinity/candid": "^0.21.0", | ||
"@dfinity/principal": "^0.15.6", | ||
"bignumber.js": "^9.1.2", | ||
"invariant": "^2.2.2", | ||
"lodash": "^4.17.21", | ||
"simple-cbor": "^0.4.1", | ||
"big-integer": "^1.6.51", | ||
"rxjs": "^7.8.1", | ||
"expect": "^27.4.6" | ||
}, | ||
"devDependencies": { | ||
"@types/invariant": "^2.2.2", | ||
"@types/jest": "^29.5.10", | ||
"@types/lodash": "^4.14.191", | ||
"@types/semver": "^7.5.8", | ||
"jest": "^29.7.0", | ||
"ts-jest": "^29.1.1", | ||
"axios": "1.7.7" | ||
}, | ||
"scripts": { | ||
"clean": "rimraf lib lib-es", | ||
"build": "tsc && tsc -m ES6 --outDir lib-es", | ||
"coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-icp.json", | ||
"prewatch": "pnpm build", | ||
"watch": "tsc --watch", | ||
"watch:es": "tsc --watch -m ES6 --outDir lib-es", | ||
"doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", | ||
"lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", | ||
"lint:fix": "pnpm lint --fix", | ||
"test": "jest", | ||
"unimported": "unimported" | ||
} | ||
} |
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 @@ | ||
export * from "./api"; |
10 changes: 5 additions & 5 deletions
10
..._computer/bridge/bridgeHelpers/account.ts → ...puter/src/bridge/bridgeHelpers/account.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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...c/families/internet_computer/broadcast.ts → ...internet_computer/src/bridge/broadcast.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
14 changes: 7 additions & 7 deletions
14
...rnet_computer/buildOptimisticOperation.ts → ...er/src/bridge/buildOptimisticOperation.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
4 changes: 2 additions & 2 deletions
4
...es/internet_computer/createTransaction.ts → ..._computer/src/bridge/createTransaction.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
4 changes: 2 additions & 2 deletions
4
...internet_computer/estimateMaxSpendable.ts → ...mputer/src/bridge/estimateMaxSpendable.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
Oops, something went wrong.