Skip to content

Commit

Permalink
rename ocean to whale as they are 2 separate and different project (#151
Browse files Browse the repository at this point in the history
)

* rename ocean project to whale as they are 2 separate and different project

* added 1 second delay after bash script to reduce test flakiness

* renamed ci.yml to ci-size.yml

* separated standard in CI to another job

* updated coverage option

* "jest" coverage should be in jest.config.js

* refactor testcontainers to separate masternode
  • Loading branch information
fuxingloh authored Apr 22, 2021
1 parent f04eb19 commit 6856375
Show file tree
Hide file tree
Showing 27 changed files with 198 additions and 190 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
/packages/jellyfish/ @fuxingloh
/packages/jellyfish-api-core/ @fuxingloh @canonbrother
/packages/jellyfish-api-jsonrpc/ @fuxingloh
/packages/jellyfish-api-ocean/ @fuxingloh @canonbrother
/packages/jellyfish-api-whale/ @fuxingloh @canonbrother
/packages/jellyfish-crypto/ @fuxingloh
/packages/jellyfish-json/ @fuxingloh @canonbrother
/packages/jellyfish-network/ @fuxingloh
/packages/jellyfish-transaction/ @fuxingloh
/packages/jellyfish-wallet/ @fuxingloh
/packages/jellyfish-wallet-mnemonic/ @fuxingloh
/packages/jellyfish-wallet-ocean/ @fuxingloh
/packages/jellyfish-wallet-whale/ @fuxingloh
/packages/testcontainers/ @fuxingloh

lerna.json @fuxingloh
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1-bug-report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug report
about: Report a bug encountered with using jellyfish
about: Report a bug encountered with using DeFi Jellyfish
labels: kind/bug
---

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/2-enhancement.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Enhancement request
about: Suggest an enhancement for jellyfish
about: Suggest an enhancement for DeFi Jellyfish
labels: kind/feature
---

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/3-general.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: General question
about: General question about using jellyfish
about: General question about using DeFi Jellyfish
labels: kind/question
---

Expand Down
4 changes: 2 additions & 2 deletions .github/governance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ issue:
- jellyfish
- jellyfish-api-core
- jellyfish-api-jsonrpc
- jellyfish-api-ocean
- jellyfish-api-whale
- jellyfish-crypto
- jellyfish-json
- jellyfish-network
- jellyfish-transaction
- jellyfish-wallet
- jellyfish-wallet-mnemonic
- jellyfish-wallet-ocean
- jellyfish-wallet-whale
- testcontainers
multiple: true
needs:
Expand Down
8 changes: 4 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ labels:
matcher:
files: "packages/jellyfish-api-jsonrpc/**"

- label: area/jellyfish-api-ocean
- label: area/jellyfish-api-whale
sync: true
matcher:
files: "packages/jellyfish-api-ocean/**"
files: "packages/jellyfish-api-whale/**"

- label: area/jellyfish-crypto
sync: true
Expand Down Expand Up @@ -61,10 +61,10 @@ labels:
matcher:
files: "packages/jellyfish-wallet-mnemonic/**"

- label: area/jellyfish-wallet-ocean
- label: area/jellyfish-wallet-whale
sync: true
matcher:
files: "packages/jellyfish-wallet-ocean/**"
files: "packages/jellyfish-wallet-whale/**"

- label: area/testcontainers
sync: true
Expand Down
4 changes: 2 additions & 2 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
- color: fbca04
name: area/jellyfish-api-jsonrpc
- color: fbca04
name: area/jellyfish-api-ocean
name: area/jellyfish-api-whale
- color: fbca04
name: area/jellyfish-crypto
- color: fbca04
Expand All @@ -75,7 +75,7 @@
- color: fbca04
name: area/jellyfish-wallet
- color: fbca04
name: area/jellyfish-wallet-ocean
name: area/jellyfish-wallet-whale
- color: fbca04
name: area/jellyfish-wallet-mnemonic
- color: fbca04
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: CI Size

on:
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
- run: npm run build
- run: npm run standard

- run: npx --no-install jest --ci --coverage --forceExit
- run: npm run test:ci
- run: npx codecov
3 changes: 2 additions & 1 deletion .idea/jellyfish.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
A collection of TypeScript + JavaScript tools and libraries for DeFi Blockchain developers to build decentralized
finance on Bitcoin.

> 🚧 Work in progress, `10/193` rpc completed.
> 🚧 Work in progress.
## Installation

Expand Down Expand Up @@ -77,7 +77,8 @@ Documentation can be found at `https://jellyfish.defichain.com`?
### Packages
Jellyfish follows a monorepo methodology, all maintained packages are in the same repo and published with the same version tag.
DeFi Jellyfish follows a monorepo methodology, all maintained packages are in the same repo and published with the same
version tag.
[![npm](https://img.shields.io/npm/v/@defichain/jellyfish)](https://www.npmjs.com/package/@defichain/jellyfish/v/latest)
[![npm@next](https://img.shields.io/npm/v/@defichain/jellyfish/next)](https://www.npmjs.com/package/@defichain/jellyfish/v/next)
Expand All @@ -87,9 +88,14 @@ Package | Description
`@defichain/jellyfish` | Library bundled usage entrypoint with conventional defaults for 4 bundles: umd, esm, cjs and d.ts
`@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-api-whale` | Implements the DeFi Whale service communication specification for api-core.
`@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-transaction` | Dead simple modern stateless raw transaction builder for DeFi.
`@defichain/jellyfish-wallet` | Jellyfish wallet is a managed wallet, where account can get discovered from an HD seed.
`@defichain/jellyfish-wallet-mnemonic` | MnemonicHdNode implements the WalletHdNode from jellyfish-wallet; a CoinType-agnostic HD Wallet for noncustodial DeFi.
`@defichain/jellyfish-wallet-whale` | WhaleWalletAccount implements the WalletAccount from jellyfish-wallet; a stateless account service for DeFi.
`@defichain/testcontainers` | Provides a lightweight, throw away instances for DeFiD node provisioned automatically in a Docker container.
## Developing & Contributing
Expand Down
27 changes: 9 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 1 addition & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,9 @@
"publish:latest": "lerna run publish:latest",
"standard": "ts-standard --fix",
"test": "jest",
"test:ci": "jest --ci --coverage --forceExit",
"all": "npm run build && npm run standard && npm run test"
},
"jest": {
"collectCoverageFrom": [
"**/*.{ts,js}",
"!**/__tests__/**",
"!**/coverage/**",
"!**/node_modules/**",
"!**/babel.config.js",
"!**/jest.setup.js"
]
},
"devDependencies": {
"@size-limit/preset-app": "^4.10.1",
"@types/jest": "^26.0.22",
Expand Down
4 changes: 2 additions & 2 deletions packages/jellyfish-crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"name": "DeFi Jellyfish Contributors"
}
],
"main": "dist",
"types": "dist",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
Expand Down
7 changes: 0 additions & 7 deletions packages/jellyfish-wallet-ocean/README.md

This file was deleted.

7 changes: 7 additions & 0 deletions packages/jellyfish-wallet-whale/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[![npm](https://img.shields.io/npm/v/@defichain/jellyfish-wallet-whale)](https://www.npmjs.com/package/@defichain/jellyfish-wallet-whale/v/latest)
[![npm@next](https://img.shields.io/npm/v/@defichain/jellyfish-wallet-whale/next)](https://www.npmjs.com/package/@defichain/jellyfish-wallet-whale/v/next)

# @defichain/jellyfish-wallet-whale

WhaleWalletAccount implements the WalletAccount from jellyfish-wallet; a stateless account service for DeFi.
All stateless and stateful node service is provided by DeFi whale server.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": false,
"name": "@defichain/jellyfish-wallet-ocean",
"name": "@defichain/jellyfish-wallet-whale",
"version": "0.0.0",
"description": "A collection of TypeScript + JavaScript tools and libraries for DeFi Blockchain developers to build decentralized finance on Bitcoin",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { Network } from '@defichain/jellyfish-network'
import { HRP, toBech32 } from '@defichain/jellyfish-crypto'

/**
* jellyfish-api-ocean implementation of WalletAccount.
* jellyfish-api-whale implementation of WalletAccount.
* All stateless and stateful node service is provided by an ocean instance.
*/
export class OceanWalletAccount implements WalletAccount {
export class WhaleWalletAccount implements WalletAccount {
private readonly hdNode: WalletHdNode
private readonly network: Network

Expand All @@ -29,18 +29,18 @@ export class OceanWalletAccount implements WalletAccount {
}

/**
* Provide OceanWalletAccount with upstream to DeFi ocean services.
* Provide WhaleWalletAccount with upstream to DeFi whale services.
*/
export class OceanWalletAccountProvider implements WalletAccountProvider<OceanWalletAccount> {
export class WhaleWalletAccountProvider implements WalletAccountProvider<WhaleWalletAccount> {
private readonly network: Network

// TODO(fuxingloh): to implement after 'jellyfish-api-ocean'
// TODO(fuxingloh): to implement after 'jellyfish-api-whale'

constructor (network: Network) {
this.network = network
}

provide (hdNode: WalletHdNode): OceanWalletAccount {
return new OceanWalletAccount(hdNode, this.network)
provide (hdNode: WalletHdNode): WhaleWalletAccount {
return new WhaleWalletAccount(hdNode, this.network)
}
}
6 changes: 5 additions & 1 deletion packages/jellyfish-wallet/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ module.exports = {
},
verbose: true,
clearMocks: true,
testTimeout: 120000
testTimeout: 120000,
coveragePathIgnorePatterns: [
'/node_modules/',
'.*/__tests__/.*'
]
}
Loading

0 comments on commit 6856375

Please sign in to comment.