Skip to content

Commit

Permalink
Merge branch 'enkryptcom:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
FuzzysTodd authored Nov 29, 2024
2 parents a32f6e2 + 0aa10c5 commit 662f234
Show file tree
Hide file tree
Showing 362 changed files with 29,258 additions and 4,805 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "20"
cache: "yarn"
- run: yarn install
- run: yarn build:all
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/lib/cjs/constants.js b/lib/cjs/constants.js
index 5772226ef895bff7a6f7fa291fc1138b10049dab..c65a57bf3535e6c6d4d894657da9b571d7f40d8a 100644
--- a/lib/cjs/constants.js
+++ b/lib/cjs/constants.js
@@ -29,7 +29,7 @@ exports.AMPLITUDE_ORIGINS_MAP = {
EU: exports.AMPLITUDE_ORIGIN_EU,
STAGING: exports.AMPLITUDE_ORIGIN_STAGING,
};
-exports.AMPLITUDE_VISUAL_TAGGING_SELECTOR_SCRIPT_URL = 'https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz';
+exports.AMPLITUDE_VISUAL_TAGGING_SELECTOR_SCRIPT_URL = '';
// This is the class name used by the visual tagging selector to highlight the selected element.
// Should not use this class in the selector.
exports.AMPLITUDE_VISUAL_TAGGING_HIGHLIGHT_CLASS = 'amp-visual-tagging-selector-highlight';
diff --git a/lib/esm/constants.js b/lib/esm/constants.js
index 17e665c05e62e488032673d312a69432297cb6fd..7d75951a29fad79ba49c83c076785294166dd0bf 100644
--- a/lib/esm/constants.js
+++ b/lib/esm/constants.js
@@ -27,7 +27,7 @@ export var AMPLITUDE_ORIGINS_MAP = {
EU: AMPLITUDE_ORIGIN_EU,
STAGING: AMPLITUDE_ORIGIN_STAGING,
};
-export var AMPLITUDE_VISUAL_TAGGING_SELECTOR_SCRIPT_URL = 'https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz';
+export var AMPLITUDE_VISUAL_TAGGING_SELECTOR_SCRIPT_URL = '';
// This is the class name used by the visual tagging selector to highlight the selected element.
// Should not use this class in the selector.
export var AMPLITUDE_VISUAL_TAGGING_HIGHLIGHT_CLASS = 'amp-visual-tagging-selector-highlight';
7 changes: 7 additions & 0 deletions .yarn/versions/81e941ed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
undecided:
- enkrypt
- "@enkryptcom/keyring"
- "@enkryptcom/name-resolution"
- "@enkryptcom/signer-ethereum"
- "@enkryptcom/signer-kadena"
- "@enkryptcom/storage"
98 changes: 81 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,80 @@ Enkrypt is a web3 wallet built from the ground up to support the multi-chain fut
## Currently Supported Chains

- Ethereum
- Polygon
- BNB Smart Chain
- Moonbeam
- Moonriver
- Karura EVM
- Ethereum Classic
- Polkadot
- Kusama
- Edgeware
- Bitcoin
- Solana
- Acala
- Karura
- TomoChain
- Amplitude
- Arbitrum
- Gnosis
- Arbitrum Nova
- Arthera
- Astar
- Astar EVM
- Aurora
- Avalanche
- Base
- Bifrost
- Bifrost (Kusama)
- Binance Smart Chain
- Bitcoin Testnet
- Blast
- Caga Ankara Testnet
- Canto
- Celo
- Degen
- Dogecoin
- Edgeware
- Edgeware EVM
- Ethereum Classic
- Fantom
- Forma
- Gnosis
- Godwoken
- Goerli
- Ham Chain
- Immutable zkEVM
- Kadena
- Karura
- Karura EVM
- Klaytn
- Aurora
- Ontology
- Kusama
- Linea
- Litecoin
- Manta Pacific
- Mode
- Moonbeam
- Moonriver
- OKX Chain
- Ontology EVM
- Opal
- opBNB
- Optimism
- Palm Network
- Pendulum
- Polkadot
- Polygon
- Polygon zkEVM
- Proof of Play Apex
- Puppy Net
- Arthera
- Quartz
- RARI Chain
- Rollux
- Rootstock
- Sanko Chain
- Scroll
- Shibarium
- Shiden
- Shiden EVM
- Sepolia
- Syscoin
- Telos EVM
- Unique
- Vara Network
- Viction
- Westend
- ZChains
- zkSync
- zkSync Goerli
- More coming soon!

Looking to add your project? [Contact us!](https://mewwallet.typeform.com/enkrypt-inquiry?typeform-source=www.enkrypt.com)
Expand Down Expand Up @@ -96,13 +149,24 @@ To get started make sure you have `nodejs` and `nvm` installed on your system
yarn watch-extension # chromium based browsers
yarn watch:firefox # firefox
```
4. Build the project for release
4. Build the project for release (if you are Firefox team dont follow this)
```sh
yarn build:all
yarn build:chrome # chromium based browsers
yarn build:firefox # firefox
```
5. Add to your browser
5. Build the project for release (For Firefox team)

Since Firefox verification team looking for identical builds, you have to build it using docker

```sh
docker build -t enkrypt-build-container .
docker run --rm -v `pwd`:/home:rw --user "$(id -u):$(id -g)" enkrypt-build-container /bin/bash -c "yarn install --silent"
docker run --rm --user "$(id -u):$(id -g)" -v `pwd`:/home:rw enkrypt-build-container /bin/bash -c "cd packages/extension && yarn build:all"
docker run --rm --user "$(id -u):$(id -g)" -v `pwd`:/home:rw enkrypt-build-container /bin/bash -c "cd packages/extension && yarn build:firefox && yarn zip"
```

6. Add to your browser
- [Chrome/Brave/Opera](https://developer.chrome.com/docs/extensions/mv2/getstarted/#manifest)
- [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension#installing)

Expand Down
19 changes: 11 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "enkrypt",
"packageManager": "[email protected]",
"version": "0.0.2",
"version": "0.0.3",
"private": true,
"workspaces": [
"packages/signers/*",
Expand All @@ -25,21 +25,24 @@
"watch-ts": "nodemon --exec 'yarn run build:all && node scripts/compile-done.js'",
"upgrade": "yarn upgrade-interactive",
"version:bump:patch": "yarn workspaces foreach -pv --exclude @enkryptcom/extension exec 'yarn version --immediate patch'",
"publish": "yarn workspaces foreach -pv --exclude @enkryptcom/extension exec 'yarn npm publish --access public --otp 474911'",
"publish": "yarn workspaces foreach -pv --exclude @enkryptcom/extension exec 'yarn npm publish --access public --otp 312003'",
"version:apply": "yarn version apply --all",
"prepare": "husky"
},
"devDependencies": {
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0",
"@swc/core": "^1.4.8",
"@commitlint/cli": "^19.4.1",
"@commitlint/config-conventional": "^19.4.1",
"@swc/core": "^1.7.28",
"concurrently": "^8.2.2",
"husky": "^9.0.11",
"husky": "^9.1.6",
"node-notifier": "^10.0.1",
"nodemon": "^3.1.0",
"nodemon": "^3.1.7",
"ultra-runner": "^3.10.5"
},
"resolutions": {
"@ledgerhq/compressjs": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.2.1.tgz"
"@ledgerhq/compressjs": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.2.1.tgz",
"@noble/hashes": "^1.4.0",
"fork-ts-checker-webpack-plugin": "^6.5.3",
"@amplitude/plugin-autocapture-browser@^1.0.2": "patch:@amplitude/plugin-autocapture-browser@npm%3A1.0.3#./.yarn/patches/@amplitude-plugin-autocapture-browser-npm-1.0.3-edb25bef55.patch"
}
}
18 changes: 9 additions & 9 deletions packages/extension-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,27 @@
"nanoevents": "^9.0.0",
"serialize-error": "11.0.3",
"tiny-uid": "^1.1.2",
"webextension-polyfill": "^0.10.0"
"webextension-polyfill": "^0.12.0"
},
"devDependencies": {
"@types/chai": "^4.3.14",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.30",
"@types/webextension-polyfill": "^0.10.7",
"@types/chai": "^4.3.20",
"@types/mocha": "^10.0.8",
"@types/node": "^20.16.10",
"@types/webextension-polyfill": "^0.12.1",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"bumpp": "^9.4.0",
"bumpp": "^9.6.1",
"eslint": "^8.57.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.10.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-module-resolver": "^1.5.0",
"prettier": "^2.8.8",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"tsup": "^8.0.2",
"type-fest": "^4.13.1",
"tsup": "^8.3.0",
"type-fest": "^4.26.1",
"typescript": "^4.9.5",
"typescript-eslint": "0.0.1-alpha.0"
}
Expand Down
5 changes: 4 additions & 1 deletion packages/extension-bridge/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ export const getBackgroundPageType = (): RuntimeContext => {
const url = new URL(browser.runtime.getURL(manifest.options_ui.page));
if (url.pathname === window.location.pathname) return "options";
}
if (window?.location?.pathname === "/index.html") {
if (
window?.location?.pathname === "/index.html" ||
window?.location?.pathname === "/onboard.html"
) {
return "new-window";
}
return "background";
Expand Down
4 changes: 4 additions & 0 deletions packages/extension/configs/base-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ const setConfig = (config) => {
net: false,
tls: false,
});
config.set("externals", {
"node:path": "commonjs2 node:path",
"node:fs/promises": {},
});
config
.plugin("buffer") // <-arbitrary name to give this plugin entry I guess?
.use(require.resolve("webpack/lib/ProvidePlugin"), [
Expand Down
5 changes: 4 additions & 1 deletion packages/extension/configs/browser-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ const setConfig = (config) => {
args[0]["process.env"] = {
..._base,
PACKAGE_VERSION: JSON.stringify(package.version),
BUILD_TIME: new Date().toLocaleString().replace(/\D/g, ""),
BUILD_TIME:
BROWSER === browserNames.firefox
? JSON.stringify("FF-build")
: new Date().toLocaleString().replace(/\D/g, ""),
IS_DEV: process.env.NODE_ENV === "development",
IS_FIREFOX: BROWSER === browserNames.firefox,
IS_OPERA_EDGE: BROWSER === browserNames.operaedge,
Expand Down
13 changes: 12 additions & 1 deletion packages/extension/configs/rollup.config.base.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@ import nodeResolve from "@rollup/plugin-node-resolve";
import { uglify } from "rollup-plugin-uglify";
import inject from "@rollup/plugin-inject";
import replace from "@rollup/plugin-replace";
import json from "@rollup/plugin-json";
import packageJson from "../package.json" assert { type: "json" };

/** @typedef {import('rollup').InputOptions} InputOptions */

const enableMinification = process.env.minify === "on";

/** @type {InputOptions} */
const base = {
input: [],
watch: {
exclude: /node_modules/,
},
output: {
dir: "dist/scripts",
format: "iife",
Expand All @@ -20,8 +28,11 @@ const base = {
__VERSION__: JSON.stringify(packageJson.version),
__IS_OPERA__: process.env.BROWSER === "opera-edge",
}),
typescript(),
typescript({
exclude: [/node_modules/],
}),
commonjs(),
json(),
inject({
Buffer: ["buffer", "Buffer"],
}),
Expand Down
Loading

0 comments on commit 662f234

Please sign in to comment.