diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 133f98c9b0..385b8922df 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,29 +1,27 @@
# Define individuals that are responsible for code in this repository.
# More details are here: https://help.github.com/articles/about-codeowners/
-/.github/ @fuxingloh @monstrobishi
-/.husky/ @fuxingloh @monstrobishi
-
-/examples/ @fuxingloh
+/.github/ @fuxingloh
+/.husky/ @fuxingloh
/packages/jellyfish-address/ @fuxingloh @ivan-zynesis
-/packages/jellyfish-api-core/ @fuxingloh @canonbrother @jingyi2811 @ivan-zynesis @surangap @Jouzo
+/packages/jellyfish-api-core/ @fuxingloh @canonbrother @jingyi2811 @ivan-zynesis @surangap
/packages/jellyfish-api-jsonrpc/ @fuxingloh @thedoublejay
-/packages/jellyfish-block/ @fuxingloh @ivan-zynesis @canonbrother @monstrobishi @surangap @Jouzo @jingyi2811
+/packages/jellyfish-block/ @fuxingloh @ivan-zynesis @canonbrother @monstrobishi @surangap @jingyi2811
-/packages/jellyfish-buffer/ @fuxingloh @ivan-zynesis @canonbrother @monstrobishi @surangap @Jouzo @jingyi2811
+/packages/jellyfish-buffer/ @fuxingloh @ivan-zynesis @canonbrother @monstrobishi @surangap @jingyi2811
/packages/jellyfish-crypto/ @fuxingloh @ivan-zynesis @surangap
/packages/jellyfish-json/ @fuxingloh @canonbrother
/packages/jellyfish-network/ @fuxingloh @ivan-zynesis
-/packages/jellyfish-testing/ @fuxingloh @canonbrother @jingyi2811 @surangap @Jouzo
+/packages/jellyfish-testing/ @fuxingloh @canonbrother @jingyi2811 @surangap
-/packages/jellyfish-transaction/ @fuxingloh @ivan-zynesis @canonbrother @monstrobishi @surangap @Jouzo @jingyi2811
-/packages/jellyfish-transaction-builder/ @fuxingloh @ivan-zynesis @canonbrother @monstrobishi @surangap @Jouzo @jingyi2811
+/packages/jellyfish-transaction/ @fuxingloh @ivan-zynesis @canonbrother @monstrobishi @surangap @jingyi2811
+/packages/jellyfish-transaction-builder/ @fuxingloh @ivan-zynesis @canonbrother @monstrobishi @surangap @jingyi2811
/packages/jellyfish-transaction-signature/ @fuxingloh @ivan-zynesis @surangap
/packages/jellyfish-wallet/ @fuxingloh @ivan-zynesis @monstrobishi @surangap
diff --git a/.idea/dictionaries/fuxing.xml b/.idea/dictionaries/fuxing.xml
index a514d2e32a..efc7cf47b0 100644
--- a/.idea/dictionaries/fuxing.xml
+++ b/.idea/dictionaries/fuxing.xml
@@ -159,6 +159,7 @@
mintedblocks
minttokens
modifiedfee
+ monstrobishi
multisig
nblocks
networkhashps
diff --git a/.idea/jellyfish.iml b/.idea/jellyfish.iml
index 17f208a218..ddf4e57658 100644
--- a/.idea/jellyfish.iml
+++ b/.idea/jellyfish.iml
@@ -4,13 +4,13 @@
-
-
+
+
-
+
\ No newline at end of file
diff --git a/README.md b/README.md
index c1e6fba5df..cb790f7add 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ DeFiChain Jellyfish SDK. A collection of TypeScript + JavaScript tools and libra
Watch this space!
-We are consolidating all jellyfish ecosystem projects ocean, whale, playground, and salmon into this repository.
+We are consolidating all jellyfish ecosystem projects ocean, whale and playground into this repository.
- For better synergy of DeFiChain open source development across all concerns.
- Consistent versioning for all ecosystem releases with a single source of truth.
@@ -28,27 +28,6 @@ We are consolidating all jellyfish ecosystem projects ocean, whale, playground,
DeFi Jellyfish follows a monorepo methodology, all maintained packages are in the same repo and published with the same
version tag.
-| Package | Description |
-|----------------------------------------------|------------------------------------------------------------------------------------------------------------------------|
-| `@defichain/jellyfish-address` | Provide address builder, parser, validator utility library for DeFi Blockchain. |
-| `@defichain/jellyfish-api-core` | A protocol agnostic DeFi Blockchain client interfaces, with a "foreign function interface" design. |
-| `@defichain/jellyfish-api-jsonrpc` | Implements the [JSON-RPC 1.0](https://www.jsonrpc.org/specification_v1) specification for api-core. |
-| `@defichain/jellyfish-block` | Stateless raw block composer for the DeFi Blockchain. |
-| `@defichain/jellyfish-buffer` | Buffer composer for jellyfish. |
-| `@defichain/jellyfish-crypto` | Cryptography operations for jellyfish, includes a simple 'secp256k1' EllipticPair. |
-| `@defichain/jellyfish-json` | Allows parsing of JSON with 'lossless', 'bignumber' and 'number' numeric precision. |
-| `@defichain/jellyfish-network` | Contains DeFi Blockchain various network configuration for mainnet, testnet and regtest. |
-| `@defichain/jellyfish-testing` | Provides many abstractions for various commonly used setup pattern for DeFi Blockchain. |
-| `@defichain/jellyfish-transaction` | Dead simple modern stateless raw transaction composer for the DeFi Blockchain. |
-| `@defichain/jellyfish-transaction-builder` | Provides a high-high level abstraction for constructing transaction ready to be broadcast for DeFi Blockchain. |
-| `@defichain/jellyfish-transaction-signature` | Stateless utility library to perform transaction signing. |
-| `@defichain/jellyfish-wallet` | Jellyfish wallet is a managed wallet, where account can get discovered from an HD seed. |
-| `@defichain/jellyfish-wallet-classic` | WalletClassic implements a simple, single elliptic pair wallet. |
-| `@defichain/jellyfish-wallet-encrypted` | Library to encrypt MnemonicHdNode as EncryptedMnemonicHdNode. Able to perform as MnemonicHdNode with passphrase known. |
-| `@defichain/jellyfish-wallet-mnemonic` | MnemonicHdNode implements the WalletHdNode from jellyfish-wallet; a CoinType-agnostic HD Wallet for noncustodial DeFi. |
-| `@defichain/testcontainers` | Provides a lightweight, throw away instances for DeFiD node provisioned automatically in a Docker container. |
-| ~~@defichain/testing~~ | (deprecated) ~~Provides rich test fixture setup functions for effective and effortless testing.~~ |
-
## Developing & Contributing
Thanks for contributing, appreciate all the help we can get. Feel free to make a pull-request, we will guide you along
diff --git a/website/.gitignore b/apps/website/.gitignore
similarity index 100%
rename from website/.gitignore
rename to apps/website/.gitignore
diff --git a/website/README.md b/apps/website/README.md
similarity index 69%
rename from website/README.md
rename to apps/website/README.md
index 69a00a16c9..6edeacd472 100644
--- a/website/README.md
+++ b/apps/website/README.md
@@ -1,7 +1,5 @@
-# jellyfish/website
-
-`/website/*` contains the documentation for jellyfish; built using [Docusaurus 2](https://v2.docusaurus.io/), a modern
-static website generator.
+`/apps/website/*` contains the documentation for jellyfish; built using [Docusaurus 2](https://v2.docusaurus.io/), a
+modern static website generator.
## Writing documentations
@@ -15,5 +13,5 @@ having to restart the server.
```console
npm i
-npm run start
+npm run start --workspace=apps/website
```
diff --git a/website/babel.config.js b/apps/website/babel.config.js
similarity index 100%
rename from website/babel.config.js
rename to apps/website/babel.config.js
diff --git a/website/docusaurus.config.js b/apps/website/docusaurus.config.js
similarity index 96%
rename from website/docusaurus.config.js
rename to apps/website/docusaurus.config.js
index 0213f581a3..a1672ed30c 100644
--- a/website/docusaurus.config.js
+++ b/apps/website/docusaurus.config.js
@@ -128,7 +128,7 @@ module.exports = {
'@docusaurus/preset-classic',
{
docs: {
- path: '../docs/ecosystem',
+ path: '../../docs/ecosystem',
routeBasePath: 'ecosystem',
editUrl: 'https://github.com/DeFiCh/jellyfish/tree/main/website',
sidebarCollapsed: false,
@@ -144,7 +144,7 @@ module.exports = {
'@docusaurus/plugin-content-docs',
{
id: 'node',
- path: '../docs/node',
+ path: '../../docs/node',
routeBasePath: 'node',
editUrl: 'https://github.com/DeFiCh/jellyfish/tree/main/website',
sidebarCollapsed: false,
@@ -154,7 +154,7 @@ module.exports = {
'@docusaurus/plugin-content-docs',
{
id: 'ocean',
- path: '../docs/ocean',
+ path: '../../docs/ocean',
routeBasePath: 'ocean',
editUrl: 'https://github.com/DeFiCh/jellyfish/tree/main/website',
sidebarCollapsed: false,
@@ -164,7 +164,7 @@ module.exports = {
'@docusaurus/plugin-content-docs',
{
id: 'testing',
- path: '../docs/testing',
+ path: '../../docs/testing',
routeBasePath: 'testing',
editUrl: 'https://github.com/DeFiCh/jellyfish/tree/main/website',
sidebarCollapsed: false,
diff --git a/website/package.json b/apps/website/package.json
similarity index 92%
rename from website/package.json
rename to apps/website/package.json
index daf8086ef7..ef5c76d565 100644
--- a/website/package.json
+++ b/apps/website/package.json
@@ -22,11 +22,11 @@
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.0.0-beta.13",
- "@docusaurus/types": "^2.0.0-beta.9",
+ "@docusaurus/types": "^2.0.0-beta.13",
"@tsconfig/docusaurus": "^1.0.4",
"@types/react": "^17.0.37",
"@types/react-helmet": "^6.1.4",
- "@types/react-router-dom": "^5.3.1"
+ "@types/react-router-dom": "^5.3.2"
},
"browserslist": {
"production": [
diff --git a/website/src/css/theme.css b/apps/website/src/css/theme.css
similarity index 100%
rename from website/src/css/theme.css
rename to apps/website/src/css/theme.css
diff --git a/website/src/pages/index.tsx b/apps/website/src/pages/index.tsx
similarity index 100%
rename from website/src/pages/index.tsx
rename to apps/website/src/pages/index.tsx
diff --git a/website/src/pages/styles.module.css b/apps/website/src/pages/styles.module.css
similarity index 100%
rename from website/src/pages/styles.module.css
rename to apps/website/src/pages/styles.module.css
diff --git a/website/static/img/favicon.ico b/apps/website/static/img/favicon.ico
similarity index 100%
rename from website/static/img/favicon.ico
rename to apps/website/static/img/favicon.ico
diff --git a/website/static/img/logo.svg b/apps/website/static/img/logo.svg
similarity index 100%
rename from website/static/img/logo.svg
rename to apps/website/static/img/logo.svg
diff --git a/website/tsconfig.json b/apps/website/tsconfig.json
similarity index 100%
rename from website/tsconfig.json
rename to apps/website/tsconfig.json
diff --git a/jest.config.js b/jest.config.js
index 0b09ac3653..d7946eff32 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -3,17 +3,16 @@ module.exports = {
testRegex: '((\\.|/)(e2e|test|spec))\\.[jt]sx?$',
testSequencer: require.resolve('./jest.sequencer'),
moduleNameMapper: {
- '@defichain/jellyfish-(.*)': '/packages/jellyfish-$1/src',
- '@defichain/testcontainers': '/packages/testcontainers/src',
- '@defichain/testing': '/packages/testing/src'
+ '@defichain/(.*)': '/packages/$1/src'
},
verbose: true,
clearMocks: true,
testTimeout: 180000,
coveragePathIgnorePatterns: [
'/node_modules/',
- '.*/__tests__/.*',
'/examples/',
- '/website/'
+ '/apps/website/',
+ '.*/__tests__/.*',
+ '.*/testing/.*'
]
}
diff --git a/lerna.json b/lerna.json
index cd4706c6bd..1360902894 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,7 +1,8 @@
{
"version": "0.0.0",
"packages": [
- "packages/*",
- "./"
+ "./",
+ "apps/*",
+ "packages/*"
]
}
diff --git a/netlify.toml b/netlify.toml
index 90308e369d..f55daa28f5 100644
--- a/netlify.toml
+++ b/netlify.toml
@@ -1,5 +1,5 @@
[build]
-publish = "website/build/"
+publish = "apps/website/build/"
command = "npm run website:build"
[[headers]]
diff --git a/package-lock.json b/package-lock.json
index b08346169e..24db075a00 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,8 +10,8 @@
"license": "MIT",
"workspaces": [
"./",
- "./packages/*",
- "./website"
+ "./apps/*",
+ "./packages/*"
],
"devDependencies": {
"@types/jest": "^27.0.3",
@@ -22,6 +22,7 @@
"jest": "^27.4.5",
"lerna": "^4.0.0",
"lint-staged": "^12.1.2",
+ "nock": "^13.1.3",
"shuffle-seed": "^1.1.6",
"ts-jest": "^27.1.1",
"typescript": "4.2.4",
@@ -31,6 +32,25 @@
"node": ">=14.x"
}
},
+ "apps/website": {
+ "version": "0.0.0",
+ "dependencies": {
+ "@docusaurus/core": "2.0.0-beta.13",
+ "@docusaurus/preset-classic": "2.0.0-beta.13",
+ "@mdx-js/react": "^1.6.22",
+ "clsx": "^1.1.1",
+ "react": "^17.0.2",
+ "react-dom": "^17.0.2"
+ },
+ "devDependencies": {
+ "@docusaurus/module-type-aliases": "^2.0.0-beta.13",
+ "@docusaurus/types": "^2.0.0-beta.9",
+ "@tsconfig/docusaurus": "^1.0.4",
+ "@types/react": "^17.0.37",
+ "@types/react-helmet": "^6.1.4",
+ "@types/react-router-dom": "^5.3.1"
+ }
+ },
"node_modules/@algolia/autocomplete-core": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.5.0.tgz",
@@ -20500,7 +20520,7 @@
"license": "MIT"
},
"node_modules/website": {
- "resolved": "website",
+ "resolved": "apps/website",
"link": true
},
"node_modules/websocket-driver": {
@@ -20968,9 +20988,6 @@
"abort-controller": "^3.0.0",
"cross-fetch": "^3.1.4"
},
- "devDependencies": {
- "nock": "^13.2.1"
- },
"peerDependencies": {
"defichain": "^0.0.0"
}
@@ -21190,6 +21207,7 @@
},
"website": {
"version": "0.0.0",
+ "extraneous": true,
"dependencies": {
"@docusaurus/core": "2.0.0-beta.13",
"@docusaurus/preset-classic": "2.0.0-beta.13",
@@ -22347,8 +22365,7 @@
"requires": {
"@defichain/jellyfish-api-core": "^0.0.0",
"abort-controller": "^3.0.0",
- "cross-fetch": "^3.1.4",
- "nock": "^13.2.1"
+ "cross-fetch": "^3.1.4"
}
},
"@defichain/jellyfish-block": {
@@ -27012,11 +27029,12 @@
"jest": "27.4.5",
"lerna": "^4.0.0",
"lint-staged": "^12.1.2",
+ "nock": "^13.1.3",
"shuffle-seed": "^1.1.6",
"ts-jest": "^27.1.1",
"typescript": "4.2.4",
"wait-for-expect": "^3.0.2",
- "website": "file:website"
+ "website": "file:apps/website"
},
"dependencies": {
"@algolia/autocomplete-core": {
@@ -28157,8 +28175,7 @@
"requires": {
"@defichain/jellyfish-api-core": "^0.0.0",
"abort-controller": "^3.0.0",
- "cross-fetch": "^3.1.4",
- "nock": "^13.2.1"
+ "cross-fetch": "^3.1.4"
}
},
"@defichain/jellyfish-block": {
@@ -40788,7 +40805,7 @@
}
},
"website": {
- "version": "file:website",
+ "version": "file:apps/website",
"requires": {
"@docusaurus/core": "2.0.0-beta.13",
"@docusaurus/module-type-aliases": "^2.0.0-beta.13",
@@ -49077,7 +49094,7 @@
}
},
"website": {
- "version": "file:website",
+ "version": "file:apps/website",
"requires": {
"@docusaurus/core": "2.0.0-beta.13",
"@docusaurus/module-type-aliases": "^2.0.0-beta.13",
diff --git a/package.json b/package.json
index 6ceee2e85f..72d616754e 100644
--- a/package.json
+++ b/package.json
@@ -9,16 +9,16 @@
"files": [],
"workspaces": [
"./",
- "./packages/*",
- "./website"
+ "./apps/*",
+ "./packages/*"
],
"engines": {
"node": ">=14.x"
},
"scripts": {
- "clean": "rm -rf ./packages/**/dist && rm -rf ./packages/**/tsconfig.build.tsbuildinfo",
+ "clean": "rm -rf ./packages/**/dist && rm -rf ./apps/**/dist && rm -rf ./packages/**/tsconfig.build.tsbuildinfo",
"prepare": "husky install",
- "website:build": "npm run build --workspace=website",
+ "website:build": "npm run build --workspace=apps/website",
"build": "lerna run --scope '@defichain/*' build",
"version:set": "lerna version $1 --yes --no-push --no-git-tag-version --exact",
"publish:latest": "lerna exec -- npm publish --tag latest --access public",
@@ -37,6 +37,7 @@
"lerna": "^4.0.0",
"lint-staged": "^12.1.2",
"shuffle-seed": "^1.1.6",
+ "nock": "^13.1.3",
"ts-jest": "^27.1.1",
"typescript": "4.2.4",
"wait-for-expect": "^3.0.2"
diff --git a/packages/jellyfish-api-jsonrpc/package.json b/packages/jellyfish-api-jsonrpc/package.json
index 1975dc5012..b0bdf2683b 100644
--- a/packages/jellyfish-api-jsonrpc/package.json
+++ b/packages/jellyfish-api-jsonrpc/package.json
@@ -28,8 +28,5 @@
},
"peerDependencies": {
"defichain": "^0.0.0"
- },
- "devDependencies": {
- "nock": "^13.2.1"
}
}
diff --git a/tsconfig.base.json b/tsconfig.base.json
index d2b6fc407b..4c14cafd8a 100644
--- a/tsconfig.base.json
+++ b/tsconfig.base.json
@@ -1,10 +1,17 @@
{
"compilerOptions": {
- "lib": ["es2020"],
- "target": "es6",
+ "lib": [
+ "es2020"
+ ],
+ "target": "esnext",
"module": "commonjs",
"moduleResolution": "node",
"strict": true,
- "esModuleInterop": true
+ "esModuleInterop": true,
+ "experimentalDecorators": true,
+ "incremental": true,
+ "allowSyntheticDefaultImports": true,
+ "emitDecoratorMetadata": true,
+ "resolveJsonModule": true
}
}
diff --git a/tsconfig.build.json b/tsconfig.build.json
index 25acc89465..d4b74b2b88 100644
--- a/tsconfig.build.json
+++ b/tsconfig.build.json
@@ -4,6 +4,6 @@
"composite": true,
"declaration": true,
"declarationMap": true,
- "sourceMap": true,
+ "sourceMap": true
}
}
diff --git a/tsconfig.json b/tsconfig.json
index b783fa269d..e768dae559 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -3,9 +3,9 @@
"compilerOptions": {
"baseUrl": "./",
"paths": {
- "@defichain/jellyfish-*": ["packages/jellyfish-*/src"],
- "@defichain/testcontainers": ["packages/testcontainers/src"],
- "@defichain/testing": ["packages/testing/src"],
+ "@defichain/*": [
+ "packages/*/src"
+ ]
}
}
}