├── .github ├── pull_request_template.md └── workflows │ └── release.yml ├── .gitignore ├── .nvmrc ├── .vscode └── settings.json ├── README.md ├── auto-imports.d.ts ├── doc ├── architecture.jpg └── intro.png ├── docs ├── faqs.md ├── guide-bot.md ├── guide │ ├── index.yml │ ├── optimizePortfolio.md │ ├── trackNFT.md │ ├── trackPNL.md │ ├── trackToken.md │ └── whaletracking.md ├── img │ ├── chains │ │ ├── arbitrum.png │ │ ├── avax.png │ │ ├── bitcoin.png │ │ ├── bnb.png │ │ ├── ethereum.png │ │ ├── matic.png │ │ ├── optimism.png │ │ └── solana.png │ ├── guideBot │ │ ├── access_bot.png │ │ ├── alert_setting.png │ │ ├── bot_show_portfolio_to_choose.png │ │ ├── choose_alert.png │ │ ├── choose_portfolio.png │ │ ├── click_on_summary.png │ │ ├── clickon_portfolio_btn.png │ │ ├── get_data_summary.png │ │ ├── get_sync_code.png │ │ ├── get_sync_code_1.png │ │ ├── start_bot.png │ │ └── sync_code_to_login.png │ ├── guidePost │ │ ├── optimizePortfolio │ │ │ ├── step1D.png │ │ │ ├── step1M.jpeg │ │ │ ├── step2D.png │ │ │ ├── step2M.jpeg │ │ │ ├── step3D.png │ │ │ ├── step3M.jpeg │ │ │ ├── step4D.png │ │ │ ├── step4M.jpeg │ │ │ ├── step5D.png │ │ │ ├── step5M.jpeg │ │ │ ├── step6D.png │ │ │ ├── step7D.png │ │ │ └── step8D.png │ │ ├── tracknft │ │ │ └── trackNFT.png │ │ ├── trackpnl │ │ │ └── trackpnl.png │ │ ├── tracktoken │ │ │ ├── step1D.png │ │ │ ├── step1M.jpeg │ │ │ ├── step2D.png │ │ │ ├── step2M.jpeg │ │ │ ├── step3D.png │ │ │ └── step3M.jpg │ │ └── whaletracking │ │ │ ├── step1D.png │ │ │ ├── step1M.jpeg │ │ │ ├── step2D.png │ │ │ ├── step2M.jpeg │ │ │ ├── step3D.png │ │ │ ├── step3M.jpeg │ │ │ ├── step4D.png │ │ │ ├── step4M.jpeg │ │ │ ├── step5D.png │ │ │ └── step6D.png │ └── overview.png ├── index.md ├── logo-2.png ├── logo-icon-1.svg ├── logo.png ├── metrics │ ├── correlation-matrix.md │ ├── index.yml │ ├── risk-return.md │ └── risk.md └── supported_chain_protocol.md ├── package-lock.json ├── package.json ├── public ├── data.json ├── demodata.html ├── icons │ ├── 128.png │ ├── 96.png │ └── logo-icon.png ├── logo.zip └── robots.txt ├── retype.manifest ├── retype.yml ├── src ├── UI │ ├── Onboard │ │ ├── SlideFive.svelte │ │ ├── SlideFour.svelte │ │ ├── SlideOne.svelte │ │ ├── SlideThree.svelte │ │ └── SlideTwo.svelte │ └── Option │ │ ├── Icon.svelte │ │ ├── TabHighlight.svelte │ │ └── TabSettings.svelte ├── _locales │ ├── en │ │ └── messages.json │ └── vi │ │ └── messages.json ├── assets │ ├── CoinMarketCap_logo.png │ ├── GIFDetect.gif │ ├── GIFPin.gif │ ├── GIFSidebar.gif │ ├── all.svg │ ├── analytic.svg │ ├── arrow-right.svg │ ├── bell.svg │ ├── bundles.png │ ├── capa.svg │ ├── chains │ │ ├── algorand.png │ │ ├── arbitrum.png │ │ ├── aura.png │ │ ├── aurora.png │ │ ├── avax.png │ │ ├── base.svg │ │ ├── bitcoin.png │ │ ├── blast.png │ │ ├── bnb.png │ │ ├── canto.png │ │ ├── cronos.png │ │ ├── ethereum.png │ │ ├── evm.png │ │ ├── evmos.png │ │ ├── exzo.png │ │ ├── fantom.png │ │ ├── gnosis.png │ │ ├── harmony.png │ │ ├── injective.png │ │ ├── klaytn.png │ │ ├── linea.png │ │ ├── manta.png │ │ ├── mantle.png │ │ ├── matic.png │ │ ├── metis.png │ │ ├── moonbeam.png │ │ ├── moonriver.png │ │ ├── move.png │ │ ├── near.png │ │ ├── oasis.png │ │ ├── opbnb.png │ │ ├── optimism.png │ │ ├── ronin.png │ │ ├── scroll.png │ │ ├── shimmer.png │ │ ├── solana.png │ │ ├── sui.png │ │ ├── ton.png │ │ ├── viction.png │ │ ├── zeta.png │ │ ├── zkEVM.png │ │ └── zksync.png │ ├── close.svg │ ├── coin-default.svg │ ├── coin.svg │ ├── coingecko-logo.png │ ├── comment-bubble-icon.svg │ ├── copy.svg │ ├── defaultToken.png │ ├── double-tick-icon.svg │ ├── edit.svg │ ├── english.svg │ ├── etherscan.jpg │ ├── explain.png │ ├── full-logo.svg │ ├── line.svg │ ├── logo-1.svg │ ├── logo-2.png │ ├── logo-icon-1.svg │ ├── logo-icon-2.svg │ ├── logo-white.svg │ ├── logo.svg │ ├── market.svg │ ├── metamask-icon.png │ ├── more.svg │ ├── move-up.svg │ ├── no-results.png │ ├── performance_one_feat.svg │ ├── performance_two_feat.svg │ ├── pin_ex.svg │ ├── plus.svg │ ├── portfolio.svg │ ├── reload.svg │ ├── search.svg │ ├── search_feat.svg │ ├── settings.svg │ ├── shield-done.svg │ ├── shield-fail-address.svg │ ├── shield-fail.svg │ ├── smart-contract.png │ ├── solana.png │ ├── transactions.svg │ ├── trend-down.svg │ ├── trend-up.svg │ ├── trx_address_detail_feat.svg │ ├── twitter.svg │ ├── up-arrow.svg │ ├── user.png │ ├── user.svg │ ├── vietnam.svg │ ├── wallet.svg │ └── wheel-icon.svg ├── components │ ├── Button.svelte │ ├── Copy.svelte │ ├── EChart.svelte │ ├── Error.svelte │ ├── ErrorBoundary.svelte │ ├── Image.svelte │ ├── Loading.svelte │ ├── Mixpanel.svelte │ ├── Overlay.svelte │ ├── Select.svelte │ ├── Toast.svelte │ ├── ToastWrapped.svelte │ ├── Tooltip.svelte │ └── TooltipNumber.svelte ├── entries │ ├── background │ │ ├── extension-config.ts │ │ ├── main.ts │ │ ├── script.ts │ │ ├── serviceWorker.ts │ │ └── utils.ts │ ├── contentScript │ │ ├── main.ts │ │ └── views │ │ │ ├── AddressHighlight.custom.svelte │ │ │ ├── AddressInfo.custom.svelte │ │ │ ├── AddressSpreadText.custom.svelte │ │ │ ├── AptosTrxHighlight.custom.svelte │ │ │ ├── AptosTrxInfo.custom.svelte │ │ │ ├── Arrow.custom.svelte │ │ │ ├── Changes.custom.svelte │ │ │ ├── CheckSafetyAddress.custom.svelte │ │ │ ├── CheckSafetyDApp.custom.svelte │ │ │ ├── CheckSafetyToken.custom.svelte │ │ │ ├── CoinChart.custom.svelte │ │ │ ├── Collapsible.custom.svelte │ │ │ ├── Entity.custom.svelte │ │ │ ├── Loading.custom.svelte │ │ │ ├── MoneyMove.custom.svelte │ │ │ ├── NativeTokenHighlight.custom.svelte │ │ │ ├── NativeTokenInfo.custom.svelte │ │ │ ├── PriceConvert.custom.svelte │ │ │ ├── QuickSearch.custom.svelte │ │ │ ├── ResetStyle.custom.svelte │ │ │ ├── TermInfo.custom.svelte │ │ │ ├── Tooltip.custom.svelte │ │ │ ├── TrxHighlight.custom.svelte │ │ │ ├── TrxInfo.custom.svelte │ │ │ └── User.custom.svelte │ ├── onboard │ │ ├── App.svelte │ │ ├── index.html │ │ └── main.ts │ ├── options │ │ ├── App.svelte │ │ ├── index.html │ │ └── main.ts │ └── popup │ │ ├── App.normal.svelte │ │ ├── index.html │ │ └── main.ts ├── lib │ ├── chains.ts │ ├── data-tracking.ts │ ├── debug.ts │ ├── i18n.ts │ ├── index.js │ ├── network.ts │ ├── price-mobulaWs.ts │ ├── price-ws.ts │ ├── queryAPI.ts │ ├── tooltip.ts │ ├── web-bridge.ts │ └── web-chrome.ts ├── manifest.ts ├── store.ts ├── utils │ ├── constants.ts │ ├── functions.ts │ └── index.ts └── vite-env.d.ts ├── target └── npmlist.json ├── tsconfig.json ├── vite.config.components.ts ├── vite.config.ts ├── windi.config.ts ├── yarn-error.log └── yarn.lock /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Pull request checklist 2 | 3 | ### Testing 4 | 5 | - [ ] Build success, the Beta (https://beta.getnimbus.io) work well 6 | - [ ] Conflict is resolved 7 | - [ ] Tested on Desktop/Mobile 8 | - [ ] Tested on logged in/non-logged in users 9 | - [ ] Remove unused state, props, logic, UI code 10 | - [ ] Name of function, component, state, props are checked 11 | - [ ] Comment example address/url for other to testing 12 | - [ ] Update TWA/Telegram Bot feature if the same feature 13 | 14 | ### After deploy to prod 15 | 16 | - [ ] Test again on Production 17 | - [ ] Notify to group #operation on discord, which feature is deployed 18 | 19 | ## Changelog 20 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | on: 3 | push: 4 | branches: 5 | - main 6 | pull_request: 7 | branches: 8 | - main 9 | jobs: 10 | release: 11 | name: Release 12 | runs-on: ubuntu-latest 13 | permissions: 14 | contents: write 15 | issues: write 16 | pull-requests: write 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v3 20 | with: 21 | fetch-depth: 0 22 | - name: Setup Node.js 23 | uses: actions/setup-node@v3 24 | with: 25 | node-version: lts/* 26 | cache: "yarn" 27 | - name: Install dependencies 28 | run: yarn 29 | # - name: Test 30 | # run: npm test 31 | - name: Build 32 | run: npm run build 33 | - name: Build component 34 | run: npm run build:components 35 | - name: Upload built file 36 | uses: actions/upload-artifact@v3 37 | with: 38 | name: ext 39 | path: dist 40 | - name: Upload custom component 41 | uses: actions/upload-artifact@v3 42 | with: 43 | name: components 44 | path: built-component 45 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/dist 2 | **/node_modules 3 | .DS_Store 4 | **/built-component 5 | **/.idea 6 | 7 | web-build 8 | 9 | .retype 10 | # Sentry Auth Token 11 | .env.sentry-build-plugin 12 | 13 | dev-dist 14 | .env 15 | 16 | src/dev-dist -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v18.18 -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "vue.features.codeActions.enable": false, 3 | "editor.inlineSuggest.showToolbar": "always" 4 | } 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nimbus - A personalized portfolio tool for Web3 investors 2 | 3 | ![Nimubs architecture](./doc/intro.png) 4 | 5 | Website: https://getnimbus.io 6 | 7 | ## ✨ USP 8 | 9 | - 👀 **On-chain & CEX tracking**: We help you track your investment on Binance, CoinBase, Bybit,… and the biggest chains like Ethereal, Solana, Polygon, BNB, Base,... 10 | - 📊 **Investment metrics** (PnL, Volatility, Returns, Sharpe ratio,…): Most other tools only show what you have right now, but with Nimbus, we give you advantage analysis so you can get your PnL, portfolio volatility, Sharpe ratio, money flow,… You can understand what is going on with your investment, and what the next step to do. 11 | - 👩‍🌾 **Yield farming suggestion**: Don’t just let your token stay the same, we turn your holding into passive income by suggesting yield farming opportunities 12 | - 🐳 **Whale analysis**: The easiest way to gain in this market is to follow the whale, with our hand-pick whale list, you can get their insight, and then make a huge profit like them 13 | 14 | ## Project Setup 15 | 16 | ```sh 17 | yarn install 18 | ``` 19 | 20 | ## Commands 21 | 22 | ### Build 23 | 24 | #### Development, HMR 25 | 26 | ```sh 27 | yarn run dev 28 | ``` 29 | 30 | Then after that, load the unpacked extension to the browser under `dist` folder 31 | 32 | #### Production 33 | 34 | Minifies and optimizes extension build 35 | 36 | ```sh 37 | yarn run build 38 | ``` 39 | 40 | ### Load extension in browser 41 | 42 | Loads the contents of the dist directory into the specified browser 43 | 44 | ```sh 45 | yarn run serve:chrome 46 | ``` 47 | 48 | ```sh 49 | yarn run serve:firefox 50 | ``` 51 | -------------------------------------------------------------------------------- /auto-imports.d.ts: -------------------------------------------------------------------------------- 1 | // Generated by 'unplugin-auto-import' 2 | export {} 3 | declare global { 4 | const browser: typeof import('webextension-polyfill')['default'] 5 | } 6 | -------------------------------------------------------------------------------- /doc/architecture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/doc/architecture.jpg -------------------------------------------------------------------------------- /doc/intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/doc/intro.png -------------------------------------------------------------------------------- /docs/faqs.md: -------------------------------------------------------------------------------- 1 | --- 2 | label: FAQs 3 | layout: default 4 | icon: question 5 | order: 20 6 | --- 7 | 8 | # FAQs 9 | 10 | ==- What is Nimbus? 11 | Nimbus is a personalized portfolio tool that can help 12 | 13 | - Understand your current investment 14 | - And then reduce the risk and maximize the return. 15 | ==- What makes Nimbus different from others? 16 | 17 | - On Nansen, Debank, it shows how much you have and what's going on in the market 18 | - On Nimbus, we show how much you have and what's going on with your CURRENT INVESTMENT and then suggest you adjust it to reduce risk and maximize the return 19 | 20 | In Addition, we're not just limited to on-chain data, we support CEX as well so you can track your investment on every platform. 21 | 22 | - Understand your current investment 23 | - And then reduce the risk and maximize the return. 24 | 25 | ==- What is benefit of using Nimbus? 26 | We do not guarantee that Nimbus can make you win the market but if you lose, we help you lose less, if you win, we help you win more 27 | ==- What makes Nimbus different from others? 28 | 29 | - On Nansen, Debank, it shows how much you have and what's going on in the market 30 | - On Nimbus, we show how much you have and what's going on with your CURRENT INVESTMENT and then suggest you adjust it to reduce risk and maximize the return 31 | 32 | In Addition, we're not just limited to on-chain data, we support CEX as well so you can track your investment on every platform. 33 | 34 | [See full supported list](/supported_chain_protocol) 35 | ==- Is my crypto safe? 36 | We only get your wallet address and DO NOT ask you to make any transactions so basically you're safe. We also use Vezgo to integrate CEX, which has a certificate for banking security. 37 | ==- How you can calculate the risk and return? 38 | We use lots of concepts from `Modern Portfolio Theory` which was awarded Nobel Memorial Prize in Economic Sciences 39 | 40 | Risk is present as the Volatility of your overall token net worth and calculated using the standard deviation 41 | 42 | [Learn more]() 43 | 44 | ==- How can one get discounts on the required plans to experience all the benefits Nimbus offers? 45 | Users can share referral links with other new Web3 investors, enabling them to optimize risk and returns when investing with Nimbus. 46 | 47 | WAGMI 🙌 48 | 49 | ==- Are the analytics figures accurate? 50 | The analytics figures in Nimbus are calculated based on reliable data sources such as CoinMarketCap, Mobula, Messari, and Covalent to ensure minimal discrepancies for users. 51 | 52 | - For on-chain data, there are 5 minutes delay 53 | - For the price, we get it in real-time 54 | 55 | ==- How can one invest more effectively with Nimbus? 56 | Nimbus offers an Analytics feature that allows users to access risk and return analyses and compare them with the market. 57 | 58 | Furthermore, users can optimize profits by copying from Whale portfolios to make more suitable buying and selling decisions. 59 | 60 | ==- How can users request new features for Nimbus? 61 | Users can request new features for Nimbus through live chat support and the Feedback section within the app. They can also contact us via email at **thanhle@getnimbus.io**. 62 | 63 | === 64 | -------------------------------------------------------------------------------- /docs/guide-bot.md: -------------------------------------------------------------------------------- 1 | --- 2 | label: Nimbus guide bot 3 | layout: default 4 | icon: dependabot 5 | order: 12 6 | --- 7 | 8 | 26 | 27 | # Welcome to Nimbus Guide Post 28 | 29 | Welcome to the world of Nimbus, your friendly chat bot designed to make your digital interactions smoother and more efficient. Whether you're a tech pro or just getting started, this guide is here to help you unlock the full potential of Nimbus 30 | 31 | --- 32 | 33 | ## Access Nimbus bot 34 | 35 |
36 | 37 | 38 |
39 | 40 | --- 41 | 42 | ## Login to Nimbus bot 43 | 44 |
45 | 46 | 47 |
48 | 49 | 50 | --- 51 | 52 | ## Setting alert 53 | 54 |
55 | 56 | 57 |
58 | 59 | --- 60 | 61 | ## The bot can also show the summary data and the portfolio info 62 | 63 |
64 | 65 | 66 |
67 | 68 | --- 69 | 70 | ## Tracking your portfolio value with Nimbus bot 71 | 72 |
73 | 74 | 75 | 76 |
77 | -------------------------------------------------------------------------------- /docs/guide/index.yml: -------------------------------------------------------------------------------- 1 | expanded: true 2 | icon: book 3 | order: 0 4 | -------------------------------------------------------------------------------- /docs/guide/optimizePortfolio.md: -------------------------------------------------------------------------------- 1 | --- 2 | label: How to optimize your portfolio? 3 | layout: default 4 | icon: organization 5 | --- 6 | 7 | # How to optimize your portfolio? 8 | 9 | Discover strategic tips and insights to maximize returns, minimize risks, and achieve peak performance in your investment journey. Take control and elevate your portfolio to new heights! 10 | 11 | --- 12 | 13 | ## Desktop 14 | 15 | - Click on Optimize return button 16 | 17 | ![ ](/img/guidePost/optimizePortfolio/step1D.png) 18 | 19 | - In this page you can see our best feature 20 | 21 | ![ ](/img/guidePost/optimizePortfolio/step2D.png) 22 | 23 | - Choose the whale that you want 24 | - You can choose on the board or go to whale page to search more 25 | 26 | ![ ](/img/guidePost/optimizePortfolio/step3D.png) 27 | 28 | ![ ](/img/guidePost/optimizePortfolio/step4D.png) 29 | 30 | ![ ](/img/guidePost/optimizePortfolio/step5D.png) 31 | 32 | - Once you've chosen your whale address, simply paste it into the input field to initiate the comparison. 33 | 34 | ![ ](/img/guidePost/optimizePortfolio/step6D.png) 35 | 36 | ![ ](/img/guidePost/optimizePortfolio/step7D.png) 37 | 38 | ![ ](/img/guidePost/optimizePortfolio/step8D.png) 39 | 40 | ## Mobile 41 | 42 | Experience the flow on your mobile device. 43 | 44 | - Click on the yellow button “Optimize return” 45 | - Choose the get inspired from the whale list or copy a whale address to compare and optimize your portfolio 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 |
56 | 61 | 66 | 71 |
72 |
75 | 80 | 85 |
86 | -------------------------------------------------------------------------------- /docs/guide/trackNFT.md: -------------------------------------------------------------------------------- 1 | --- 2 | label: How to track NFT Matlab? 3 | layout: default 4 | icon: image 5 | order: 98 6 | --- 7 | 8 | # How to track NFT Matlab? 9 | 10 | - If you have NFT from Matlab Collection 11 | - Nimbus supports tracking various NFTs, one of which is the Matlab Collection 12 | - Scroll to the NFT field and view the NFTs you own 13 | 14 | ![ ](/img/guidePost/tracknft/trackNFT.png) 15 | -------------------------------------------------------------------------------- /docs/guide/trackPNL.md: -------------------------------------------------------------------------------- 1 | --- 2 | label: How to track PNL? 3 | layout: default 4 | icon: graph 5 | order: 99 6 | --- 7 | 8 | # How to track PNL? 9 | 10 | Gain insights into your financial journey with the ability to track both profit and loss in this domain. Stay informed and make informed decisions for a smarter financial future! 11 | 12 | --- 13 | 14 | ![ ](/img/guidePost/trackpnl/trackpnl.png) 15 | -------------------------------------------------------------------------------- /docs/guide/trackToken.md: -------------------------------------------------------------------------------- 1 | --- 2 | label: How to track token? 3 | layout: default 4 | icon: codescan-checkmark 5 | order: 100 6 | --- 7 | 8 | # How to track token? 9 | 10 | In this article, you'll find detailed steps on how to add and track your token on your Nimbus account. 11 | 12 | --- 13 | 14 | To know how to track your token you like, follow these step 👇 15 | 16 | ## Desktop 17 | 18 | - Choose a Token👇 19 | 20 | ![ ](/img/guidePost/tracktoken/step1D.png) 21 | 22 | - Select this icon👇 23 | 24 | ![ ](/img/guidePost/tracktoken/step2D.png) 25 | 26 | - It will show a sheet with many info👇 27 | 28 | ![ ](/img/guidePost/tracktoken/step3D.png) 29 | 30 | ## You can do the same flow as mobile version 31 | 32 |
35 | 40 | 45 | 50 |
51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /docs/guide/whaletracking.md: -------------------------------------------------------------------------------- 1 | --- 2 | label: How to tracking whales portfolio? 3 | layout: default 4 | icon: people 5 | --- 6 | 7 | # How to tracking whales portfolio? 8 | 9 | In this article, you'll find detailed steps on how to tracking a whale that you like with Nimbus account. 10 | 11 | --- 12 | 13 | ## Desktop 14 | 15 | - Click on the whales page in the header bar: 16 | 17 | ![ ](/img/guidePost/whaletracking/step1D.png) 18 | 19 | - It will show a whale list for you to tracking: 20 | 21 | ![ ](/img/guidePost/whaletracking/step2D.png) 22 | 23 | - You can click on the filter button to reduce search time: 24 | 25 | 26 | 27 |
28 | 29 |
30 | 31 | - Choose a whale and copy it address 32 | 33 | ![ ](/img/guidePost/whaletracking/step4D.png) 34 | 35 | - Go back to the Portfolio and choose Add Address 36 | 37 | ![ ](/img/guidePost/whaletracking/step5D.png) 38 | 39 | - Paste the address that you copy and click Add 40 | 41 | ![ ](/img/guidePost/whaletracking/step6D.png) 42 | 43 | ## Mobile 44 | 45 | - Click on whale button 46 | - Choose the whale to copy 47 | - Go back to portfolio and add address 48 | 49 |
52 | 57 | 62 |
63 | 64 |
67 | 72 | 77 |
78 | -------------------------------------------------------------------------------- /docs/img/chains/arbitrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/chains/arbitrum.png -------------------------------------------------------------------------------- /docs/img/chains/avax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/chains/avax.png -------------------------------------------------------------------------------- /docs/img/chains/bitcoin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/chains/bitcoin.png -------------------------------------------------------------------------------- /docs/img/chains/bnb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/chains/bnb.png -------------------------------------------------------------------------------- /docs/img/chains/ethereum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/chains/ethereum.png -------------------------------------------------------------------------------- /docs/img/chains/matic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/chains/matic.png -------------------------------------------------------------------------------- /docs/img/chains/optimism.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/chains/optimism.png -------------------------------------------------------------------------------- /docs/img/chains/solana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/chains/solana.png -------------------------------------------------------------------------------- /docs/img/guideBot/access_bot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guideBot/access_bot.png -------------------------------------------------------------------------------- /docs/img/guideBot/alert_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guideBot/alert_setting.png -------------------------------------------------------------------------------- /docs/img/guideBot/bot_show_portfolio_to_choose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guideBot/bot_show_portfolio_to_choose.png -------------------------------------------------------------------------------- /docs/img/guideBot/choose_alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guideBot/choose_alert.png -------------------------------------------------------------------------------- /docs/img/guideBot/choose_portfolio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guideBot/choose_portfolio.png -------------------------------------------------------------------------------- /docs/img/guideBot/click_on_summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guideBot/click_on_summary.png -------------------------------------------------------------------------------- /docs/img/guideBot/clickon_portfolio_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guideBot/clickon_portfolio_btn.png -------------------------------------------------------------------------------- /docs/img/guideBot/get_data_summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guideBot/get_data_summary.png -------------------------------------------------------------------------------- /docs/img/guideBot/get_sync_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guideBot/get_sync_code.png -------------------------------------------------------------------------------- /docs/img/guideBot/get_sync_code_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guideBot/get_sync_code_1.png -------------------------------------------------------------------------------- /docs/img/guideBot/start_bot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guideBot/start_bot.png -------------------------------------------------------------------------------- /docs/img/guideBot/sync_code_to_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guideBot/sync_code_to_login.png -------------------------------------------------------------------------------- /docs/img/guidePost/optimizePortfolio/step1D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/optimizePortfolio/step1D.png -------------------------------------------------------------------------------- /docs/img/guidePost/optimizePortfolio/step1M.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/optimizePortfolio/step1M.jpeg -------------------------------------------------------------------------------- /docs/img/guidePost/optimizePortfolio/step2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/optimizePortfolio/step2D.png -------------------------------------------------------------------------------- /docs/img/guidePost/optimizePortfolio/step2M.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/optimizePortfolio/step2M.jpeg -------------------------------------------------------------------------------- /docs/img/guidePost/optimizePortfolio/step3D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/optimizePortfolio/step3D.png -------------------------------------------------------------------------------- /docs/img/guidePost/optimizePortfolio/step3M.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/optimizePortfolio/step3M.jpeg -------------------------------------------------------------------------------- /docs/img/guidePost/optimizePortfolio/step4D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/optimizePortfolio/step4D.png -------------------------------------------------------------------------------- /docs/img/guidePost/optimizePortfolio/step4M.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/optimizePortfolio/step4M.jpeg -------------------------------------------------------------------------------- /docs/img/guidePost/optimizePortfolio/step5D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/optimizePortfolio/step5D.png -------------------------------------------------------------------------------- /docs/img/guidePost/optimizePortfolio/step5M.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/optimizePortfolio/step5M.jpeg -------------------------------------------------------------------------------- /docs/img/guidePost/optimizePortfolio/step6D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/optimizePortfolio/step6D.png -------------------------------------------------------------------------------- /docs/img/guidePost/optimizePortfolio/step7D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/optimizePortfolio/step7D.png -------------------------------------------------------------------------------- /docs/img/guidePost/optimizePortfolio/step8D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/optimizePortfolio/step8D.png -------------------------------------------------------------------------------- /docs/img/guidePost/tracknft/trackNFT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/tracknft/trackNFT.png -------------------------------------------------------------------------------- /docs/img/guidePost/trackpnl/trackpnl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/trackpnl/trackpnl.png -------------------------------------------------------------------------------- /docs/img/guidePost/tracktoken/step1D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/tracktoken/step1D.png -------------------------------------------------------------------------------- /docs/img/guidePost/tracktoken/step1M.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/tracktoken/step1M.jpeg -------------------------------------------------------------------------------- /docs/img/guidePost/tracktoken/step2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/tracktoken/step2D.png -------------------------------------------------------------------------------- /docs/img/guidePost/tracktoken/step2M.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/tracktoken/step2M.jpeg -------------------------------------------------------------------------------- /docs/img/guidePost/tracktoken/step3D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/tracktoken/step3D.png -------------------------------------------------------------------------------- /docs/img/guidePost/tracktoken/step3M.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/tracktoken/step3M.jpg -------------------------------------------------------------------------------- /docs/img/guidePost/whaletracking/step1D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/whaletracking/step1D.png -------------------------------------------------------------------------------- /docs/img/guidePost/whaletracking/step1M.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/whaletracking/step1M.jpeg -------------------------------------------------------------------------------- /docs/img/guidePost/whaletracking/step2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/whaletracking/step2D.png -------------------------------------------------------------------------------- /docs/img/guidePost/whaletracking/step2M.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/whaletracking/step2M.jpeg -------------------------------------------------------------------------------- /docs/img/guidePost/whaletracking/step3D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/whaletracking/step3D.png -------------------------------------------------------------------------------- /docs/img/guidePost/whaletracking/step3M.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/whaletracking/step3M.jpeg -------------------------------------------------------------------------------- /docs/img/guidePost/whaletracking/step4D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/whaletracking/step4D.png -------------------------------------------------------------------------------- /docs/img/guidePost/whaletracking/step4M.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/whaletracking/step4M.jpeg -------------------------------------------------------------------------------- /docs/img/guidePost/whaletracking/step5D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/whaletracking/step5D.png -------------------------------------------------------------------------------- /docs/img/guidePost/whaletracking/step6D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/guidePost/whaletracking/step6D.png -------------------------------------------------------------------------------- /docs/img/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/img/overview.png -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | label: Getting started 3 | layout: default 4 | icon: home 5 | order: 100 6 | --- 7 | 8 | # Welcome to Nimbus 9 | 10 | Nimbus is a personalized portfolio tool that can help 11 | 12 | - Understand your current investment 13 | - And then reduce the risk and maximize the return. 14 | 15 | ## Overview 16 | 17 | 20 | -------------------------------------------------------------------------------- /docs/logo-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/logo-2.png -------------------------------------------------------------------------------- /docs/logo-icon-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/docs/logo.png -------------------------------------------------------------------------------- /docs/metrics/correlation-matrix.md: -------------------------------------------------------------------------------- 1 | --- 2 | label: Correlation Matrix 3 | layout: default 4 | icon: table 5 | order: 100 6 | --- 7 | 8 | # Correlation measures how closely two assets move together over time. 9 | 10 | A correlation of 🟩 1 means that two assets move perfectly in sync, while a correlation of 🟥 -1 means that they move in opposite directions. A correlation of 0 means that there is no relationship between the movements of the two assets. 11 | 12 | 15 | 16 | The goal of correlation diversification is to select assets that have low or negative correlations with each other, so that they can offset each other's losses and smooth out the portfolio's returns. For example, if you have a portfolio of stocks and bonds, you may want to add some commodities or alternative investments that tend to perform well when stocks and bonds are struggling. 17 | 18 | There are several benefits of correlation diversification: 19 | 20 | - It can reduce the volatility and drawdowns of your portfolio, which can improve your risk-adjusted returns and help you preserve your capital. 21 | - It can enhance your portfolio's performance by capturing the upside potential of different asset classes and strategies. 22 | - It can increase your portfolio's resilience and adaptability to changing market conditions and scenarios. 23 | 24 | Correlation diversification is not a silver bullet, but it can be a powerful tool to protect your portfolio from market shocks and enhance your long-term returns. By combining assets that have different risk-return profiles and behaviors, you can create a more balanced and robust portfolio that can withstand various market environments. 25 | 26 | Learn more: [https://www.investopedia.com/terms/n/negative-correlation.asp](https://www.investopedia.com/terms/n/negative-correlation.asp) 27 | -------------------------------------------------------------------------------- /docs/metrics/index.yml: -------------------------------------------------------------------------------- 1 | expanded: true 2 | icon: goal 3 | order: 10 4 | -------------------------------------------------------------------------------- /docs/metrics/risk-return.md: -------------------------------------------------------------------------------- 1 | --- 2 | label: Risk and Return 3 | layout: default 4 | icon: graph 5 | order: 100 6 | --- 7 | 8 | # Risk and Return chart 9 | 10 | On each token you are holding, we show the risk and return for that token so you know what's going on in every single token 11 | 12 | 15 | -------------------------------------------------------------------------------- /docs/metrics/risk.md: -------------------------------------------------------------------------------- 1 | --- 2 | label: Risk 3 | layout: default 4 | icon: alert 5 | order: 100 6 | --- 7 | 8 | # Risk 9 | 10 | ## Sharpe ratio 11 | 12 | The Sharpe ratio measures how well an investment performs relative to its risk. 13 | 14 | 17 | 18 | ## Volatility 19 | 20 | Volatility measures the extent of price fluctuations for an asset over time. 21 | 22 | 25 | 26 | ## Max Drawdown 27 | 28 | Max drawdown is the biggest loss experienced by an investment or portfolio. 29 | 30 | 33 | 34 | ## Risk chart 35 | 36 | With Nimbus, you can compare those 3 metrics 37 | 38 | - Sharpe Ratio 39 | - Volatility 40 | - Max Drawdown 41 | 42 | with Bitcoin, Ethereum 43 | 44 | 47 | -------------------------------------------------------------------------------- /docs/supported_chain_protocol.md: -------------------------------------------------------------------------------- 1 | --- 2 | label: Supported account 3 | layout: default 4 | order: 90 5 | icon: goal 6 | --- 7 | 8 | # Supported account 9 | 10 | ## Networks 11 | 12 | | Name | Holding | Risk & return analysis | PnL | 13 | | --------- | ------- | ---------------------- | -------------- | 14 | | Ethereum | ✅ | ✅ | ✅ | 15 | | Bitcoin | ✅ | ✅ | ✅ | 16 | | BNB chain | ✅ | ✅ | ✅ | 17 | | Polygon | ✅ | ✅ | ✅ | 18 | | Optimism | ✅ | ✅ | ✅ | 19 | | Avalanche | ✅ | ✅ | ✅ | 20 | | Arbitrum | ✅ | ✅ | ✅ | 21 | | Solana | ✅ | ✅ | ✅ | 22 | | Base | ✅ | ✅ | ✅ | 23 | | Linea | ✅ | ✅ | 🚧 Coming soon | 24 | | zkSync | ✅ | ✅ | 🚧 Coming soon | 25 | | Scroll | ✅ | ✅ | 🚧 Coming soon | 26 | | Cronos | ✅ | ✅ | 🚧 Coming soon | 27 | | Mantle | ✅ | ✅ | 🚧 Coming soon | 28 | 29 | ## Exchanges 30 | 31 | | Name | Holding | Risk & return analysis | Performance history | 32 | | -------------- | ------- | ---------------------- | ------------------------------------------- | 33 | | Binance | ✅ | ✅ | 🚧 Only available from the time you connect | 34 | | Bitfinex | ✅ | ✅ | 🚧 Only available from the time you connect | 35 | | Bittrex | ✅ | ✅ | 🚧 Only available from the time you connect | 36 | | Bitvavo | ✅ | ✅ | 🚧 Only available from the time you connect | 37 | | Blockchain.com | ✅ | ✅ | 🚧 Only available from the time you connect | 38 | | Coinbase Pro | ✅ | ✅ | 🚧 Only available from the time you connect | 39 | | CoinDCX | ✅ | ✅ | 🚧 Only available from the time you connect | 40 | | CoinSpot | ✅ | ✅ | 🚧 Only available from the time you connect | 41 | | CoinTracking | ✅ | ✅ | 🚧 Only available from the time you connect | 42 | | Crypto.com | ✅ | ✅ | 🚧 Only available from the time you connect | 43 | | Gate.io | ✅ | ✅ | 🚧 Only available from the time you connect | 44 | | Gemini | ✅ | ✅ | 🚧 Only available from the time you connect | 45 | | Kraken | ✅ | ✅ | 🚧 Only available from the time you connect | 46 | | KuCoin | ✅ | ✅ | 🚧 Only available from the time you connect | 47 | | NDAX | ✅ | ✅ | 🚧 Only available from the time you connect | 48 | | Newton | ✅ | ✅ | 🚧 Only available from the time you connect | 49 | | Poloniex | ✅ | ✅ | 🚧 Only available from the time you connect | 50 | | Wazirx | ✅ | ✅ | 🚧 Only available from the time you connect | 51 | | Bitmart | ✅ | ✅ | 🚧 Only available from the time you connect | 52 | | ByBit | ✅ | ✅ | 🚧 Only available from the time you connect | 53 | | Huobi | ✅ | ✅ | 🚧 Only available from the time you connect | 54 | | MEXC | ✅ | ✅ | 🚧 Only available from the time you connect | 55 | | OKX | ✅ | ✅ | 🚧 Only available from the time you connect | 56 | | Bitrue | ✅ | ✅ | 🚧 Only available from the time you connect | 57 | | Ascendex | ✅ | ✅ | 🚧 Only available from the time you connect | 58 | | Bitso | ✅ | ✅ | 🚧 Only available from the time you connect | 59 | | Upbit | ✅ | ✅ | 🚧 Only available from the time you connect | 60 | | Bitstamp | ✅ | ✅ | 🚧 Only available from the time you connect | 61 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nimbus-ext", 3 | "displayName": "Nimbus", 4 | "version": "1.0.0", 5 | "author": "Thanh Le - thanhle@getnimbus.io", 6 | "description": "A personalized Web3 portfolio tool for DEFI users", 7 | "scripts": { 8 | "build": "vite build", 9 | "build:components": "vite build -c vite.config.components.ts", 10 | "watch": "WATCH=true vite build --watch", 11 | "dev": "WATCH=true vite build --watch", 12 | "serve:firefox": "web-ext run --start-url \"about:debugging#/runtime/this-firefox\" --source-dir ./dist/", 13 | "serve:chrome": "web-ext run -t chromium --start-url \"https://google.com\" --source-dir ./dist/", 14 | "check": "svelte-check --tsconfig ./tsconfig.json" 15 | }, 16 | "license": "MIT", 17 | "devDependencies": { 18 | "@samrum/vite-plugin-web-extension": "^2.0.0", 19 | "@sveltejs/vite-plugin-svelte": "^1.0.0-next.41", 20 | "@tsconfig/svelte": "^2.0.1", 21 | "@types/webextension-polyfill": "^0.8.3", 22 | "svelte": "^3.44.0", 23 | "svelte-check": "^2.2.7", 24 | "svelte-preprocess": "^4.9.8", 25 | "tslib": "^2.3.1", 26 | "typescript": "^4.4.4", 27 | "unplugin-auto-import": "^0.11.1", 28 | "vite": "^3.1.3", 29 | "vite-plugin-static-copy": "^0.11.1", 30 | "web-ext": "^6.6.0" 31 | }, 32 | "dependencies": { 33 | "@crownframework/svelte-error-boundary": "^1.0.3", 34 | "@metamask/detect-provider": "^1.2.0", 35 | "@popperjs/core": "^2.11.6", 36 | "@tanstack/svelte-query": "^5.40.0", 37 | "@webcomponents/webcomponentsjs": "^2.6.0", 38 | "axios": "^0.27.2", 39 | "bind-mousetrap-global": "^1.0.1", 40 | "classnames": "^2.3.2", 41 | "countup.js": "^2.5.0", 42 | "dayjs": "^1.11.4", 43 | "echarts": "^5.4.1", 44 | "flowbite": "^1.5.3", 45 | "flowbite-svelte": "^0.27.1", 46 | "flowbite-windicss-plugin": "^0.1.2", 47 | "jwt-decode": "^3.1.2", 48 | "lightweight-charts": "^3.8.0", 49 | "lodash": "^4.17.21", 50 | "mark.js": "^8.11.1", 51 | "mixpanel-browser": "^2.51.0", 52 | "mousetrap": "^1.6.5", 53 | "nanoid": "^4.0.2", 54 | "numeral": "^2.0.6", 55 | "sass": "^1.59.2", 56 | "socket.io-client": "^4.6.1", 57 | "svelte-copy-to-clipboard": "^0.2.5", 58 | "svelte-dnd-action": "^0.9.22", 59 | "svelte-loading-spinners": "^0.3.6", 60 | "svelte-motion": "^0.11.5", 61 | "svelte-navigator": "^3.2.2", 62 | "svelte-system-info": "^1.0.0", 63 | "svelte-typewriter": "^3.2.3", 64 | "svelte-windicss-preprocess": "^4.2.8", 65 | "swiper": "6", 66 | "tailwindcss": "^3.1.8", 67 | "tippy.js": "^6.3.7", 68 | "url-pattern": "^1.0.3", 69 | "vite-imagetools": "^4.0.4", 70 | "webext-bridge": "https://github.com/getnimbus/webext-bridge.git", 71 | "webextension-polyfill": "^0.9.0", 72 | "windicss": "^3.5.6" 73 | }, 74 | "type": "module" 75 | } 76 | -------------------------------------------------------------------------------- /public/icons/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/public/icons/128.png -------------------------------------------------------------------------------- /public/icons/96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/public/icons/96.png -------------------------------------------------------------------------------- /public/icons/logo-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/public/icons/logo-icon.png -------------------------------------------------------------------------------- /public/logo.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/public/logo.zip -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / -------------------------------------------------------------------------------- /retype.yml: -------------------------------------------------------------------------------- 1 | input: docs 2 | output: .retype 3 | url: https://getnimbus.io 4 | branding: 5 | title: Nimbus 6 | label: Docs 7 | logo: ./logo.png 8 | favicon: ./logo-icon-1.svg 9 | links: 10 | - text: Homepage 11 | link: https://getnimbus.io 12 | - text: Getting Started 13 | link: / 14 | - text: App 15 | link: https://app.getnimbus.io 16 | footer: 17 | links: 18 | - text: Homepage 19 | link: https://getnimbus.io 20 | - text: Twitter 21 | link: https://twitter.com/get_nimbus 22 | - text: Links 23 | link: https://bento.me/getnimbus 24 | copyright: "© Copyright {{ year }}. All rights reserved." 25 | integrations: 26 | googleAnalytics: 27 | id: G-5XFSSTHG49 28 | -------------------------------------------------------------------------------- /src/UI/Onboard/SlideFive.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |
7 |
8 |
9 |
You are ready to enjoy
10 |
11 | Join us on Discord and build Nimbus together. WAGMI 🙌 12 |
13 |
14 |
15 |
16 | 24 |
25 |
26 |
27 | 28 | 30 | -------------------------------------------------------------------------------- /src/UI/Onboard/SlideFour.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 |
10 |
11 |
12 |
13 | Know what inside an address or a transaction 14 |
15 |
16 | Just click on that popup, we deliver understandable info right away 17 |
18 |
19 |
20 | 26 | 51 |
52 |
53 |
54 |
55 | 56 |
57 |
58 | 59 |
60 |
61 |
62 |
63 | 64 | 66 | -------------------------------------------------------------------------------- /src/UI/Onboard/SlideOne.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 |
9 |
10 | logo 19 |
20 |
Welcome
21 |
22 | Nimbus is a personalized portfolio that makes you investment more 23 | efficiency 24 |
25 |
26 |
27 |
28 | 29 |
30 |
31 |
32 | 33 | 35 | -------------------------------------------------------------------------------- /src/UI/Onboard/SlideThree.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 |
11 |
12 |
13 |
Search from any where
14 |
15 | Click the arrow on left right edge or use shortcut 16 | 19 | {System.OSName === "macOS" ? "⌘" : "Ctrl"} 20 | 21 | + 22 | 25 | Shift 26 | 27 | + 28 | 31 | K 32 | 33 | to open the sidebar 34 |
35 |
36 | 37 |
38 |
39 |
40 | 41 |
42 |
43 | 44 |
45 |
46 |
47 |
48 | 49 | 51 | -------------------------------------------------------------------------------- /src/UI/Onboard/SlideTwo.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 |
10 |
11 |
12 |
Pin the extension
13 |
14 | Manage your portfolio with Nimbus app when you click on the extension 15 | icon 16 |
17 |
18 | 19 |
20 |
21 |
22 | 23 |
24 |
25 | 26 |
27 |
28 |
29 |
30 | 31 | 33 | -------------------------------------------------------------------------------- /src/UI/Option/TabSettings.svelte: -------------------------------------------------------------------------------- 1 | 58 | -------------------------------------------------------------------------------- /src/_locales/en/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "quickSearchLang": { 3 | "message": "Quick search languages", 4 | "title": "Search for cryptocurrency or token you want to know", 5 | "recent-search": "Recent search:", 6 | "suggest-keyword": "Suggest keyword:", 7 | "not-audited": "This page is not support.", 8 | "audited": "The page has been audited.", 9 | "not-audited-address": "This address is unsafe.", 10 | "warning-audited-address": "This address is warning.", 11 | "audited-address": "This address is safe.", 12 | "scan-with-go-plus": "Scan by Go+", 13 | "second-title": "On this page", 14 | "input-placeholder": "Search...", 15 | "status": "Searching...", 16 | "results": "Results", 17 | "no-results": "No results", 18 | "source-data-charts": "*Chart data by CoinGecko", 19 | "read-more": "Read more", 20 | "learn-more": "Learn more", 21 | "audit-report": "Audit report" 22 | }, 23 | "optionsPage": { 24 | "message": "Options page languages", 25 | "tab-title-accounts": "Accounts", 26 | "tab-title-links": "Links", 27 | "tab-title-report": "Reports", 28 | "tab-title-alerts": "Alerts", 29 | "tab-title-dashboard": "Dashboard", 30 | "tab-title-highlight": "Highlight", 31 | "tab-title-notification": "Notification", 32 | "tab-title-settings": "Settings", 33 | "tab-title-nft": "NFT", 34 | "nft-page-title": "My NFT", 35 | "accounts-page-title": "Account Settings", 36 | "report-page-title": "Report Settings", 37 | "links-page-title": "Link Settings", 38 | "dashboard-page-title": "Dashboard", 39 | "highlight-page-title": "Highlight", 40 | "notification-page-title": "Notification", 41 | "settings-page-title": "Settings", 42 | "accounts-page-content": { 43 | "address-btn-text": "Add Account", 44 | "address-header-table": "Account", 45 | "label-header-table": "Label", 46 | "action-header-table": "Action", 47 | "modal-cancel": "Cancel", 48 | "modal-add-wallet": "Add", 49 | "modal-edit": "Edit", 50 | "modal-delete": "Delete", 51 | "modal-address-label": "Account", 52 | "modal-label-label": "Label", 53 | "modal-label-highlight": "Highlight", 54 | "modal-add-title": "Add your account", 55 | "modal-add-sub-title": "Add your account will give you more option to see the information at page new tab", 56 | "modal-delete-title": "Are you sure?", 57 | "modal-delete-sub-title": "Do you really want to delete this account? This process cannot revert", 58 | "modal-delete-highlight-sub-title": "Do you really want to delete this account highlight? This process cannot revert", 59 | "modal-edit-title": "Edit your account", 60 | "modal-edit-highlight-title": "Edit your highlight account", 61 | "modal-edit-sub-title": "Edit your account will make change the information at page new tab", 62 | "modal-edit-highlight-sub-title": "Edit your highlight account will make change the highlight", 63 | "address-required": "Account is required!", 64 | "label-required": "Label is required!", 65 | "re-input-address": "Invalid address!", 66 | "duplicate-address": "This account is duplicated!" 67 | }, 68 | "settings-page-content": { 69 | "change-lang-label": "Select languages" 70 | }, 71 | "dashboard-page-content": { 72 | "show-portfolio-label": "Show your Portfolio on new tab" 73 | } 74 | }, 75 | "newtabPage": { 76 | "message": "Newtab page languages", 77 | "portfolio": "Portfolio", 78 | "analytics": "Analytics", 79 | "transactions": "Transactions", 80 | "market": "Whales", 81 | "whale": "Whales", 82 | "token": "Tokens", 83 | "nft": "NFTs", 84 | "holding": "Holding", 85 | "view-more": "View more", 86 | "opportunities": "Opportunities", 87 | "positions": "Positions", 88 | "assets": "Assets", 89 | "price": "Price", 90 | "amount": "Amount", 91 | "value": "Value", 92 | "profit": "Profit & Loss", 93 | "floor_price": "Floor Price", 94 | "total_spent": "Total Spent", 95 | "current_value": "Current Value", 96 | "collection": "Collection", 97 | "empty": "Empty", 98 | "overview": "Overview", 99 | "token-allocation": "Token Allocation", 100 | "nft-allocation": "NFT Allocation", 101 | "performance": "Performance", 102 | "networth": "Net Worth", 103 | "claimable": "Claimable", 104 | "total-assets": "Total Assets", 105 | "empty-wallet": "No account added yet.", 106 | "Balance": "Balance", 107 | "Ratio": "Ratio", 108 | "Value": "Value", 109 | "data-updated": "Data updated", 110 | "updating-data": "Updating data", 111 | "hide-less-than-1": "Hide tokens less than $1", 112 | "market-page-title": "Latest big swaps with useful information we've put together", 113 | "missed-protocol": "Missed your protocol?", 114 | "search-placeholder": "Search address", 115 | "modal-login-title": "Login to enjoy more features", 116 | "addwallet": "Add your account to keep track of your investments.", 117 | "market-search-symbol": "Find by symbol, name or token contract", 118 | "market-search-amount": "Enter a USD amount higher than 10000" 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /src/assets/CoinMarketCap_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/CoinMarketCap_logo.png -------------------------------------------------------------------------------- /src/assets/GIFDetect.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/GIFDetect.gif -------------------------------------------------------------------------------- /src/assets/GIFPin.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/GIFPin.gif -------------------------------------------------------------------------------- /src/assets/GIFSidebar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/GIFSidebar.gif -------------------------------------------------------------------------------- /src/assets/all.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/assets/analytic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/assets/arrow-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/assets/bell.svg: -------------------------------------------------------------------------------- 1 | 9 | 16 | 23 | 24 | -------------------------------------------------------------------------------- /src/assets/bundles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/bundles.png -------------------------------------------------------------------------------- /src/assets/chains/algorand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/algorand.png -------------------------------------------------------------------------------- /src/assets/chains/arbitrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/arbitrum.png -------------------------------------------------------------------------------- /src/assets/chains/aura.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/aura.png -------------------------------------------------------------------------------- /src/assets/chains/aurora.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/aurora.png -------------------------------------------------------------------------------- /src/assets/chains/avax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/avax.png -------------------------------------------------------------------------------- /src/assets/chains/bitcoin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/bitcoin.png -------------------------------------------------------------------------------- /src/assets/chains/blast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/blast.png -------------------------------------------------------------------------------- /src/assets/chains/bnb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/bnb.png -------------------------------------------------------------------------------- /src/assets/chains/canto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/canto.png -------------------------------------------------------------------------------- /src/assets/chains/cronos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/cronos.png -------------------------------------------------------------------------------- /src/assets/chains/ethereum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/ethereum.png -------------------------------------------------------------------------------- /src/assets/chains/evm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/evm.png -------------------------------------------------------------------------------- /src/assets/chains/evmos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/evmos.png -------------------------------------------------------------------------------- /src/assets/chains/exzo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/exzo.png -------------------------------------------------------------------------------- /src/assets/chains/fantom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/fantom.png -------------------------------------------------------------------------------- /src/assets/chains/gnosis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/gnosis.png -------------------------------------------------------------------------------- /src/assets/chains/harmony.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/harmony.png -------------------------------------------------------------------------------- /src/assets/chains/injective.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/injective.png -------------------------------------------------------------------------------- /src/assets/chains/klaytn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/klaytn.png -------------------------------------------------------------------------------- /src/assets/chains/linea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/linea.png -------------------------------------------------------------------------------- /src/assets/chains/manta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/manta.png -------------------------------------------------------------------------------- /src/assets/chains/mantle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/mantle.png -------------------------------------------------------------------------------- /src/assets/chains/matic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/matic.png -------------------------------------------------------------------------------- /src/assets/chains/metis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/metis.png -------------------------------------------------------------------------------- /src/assets/chains/moonbeam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/moonbeam.png -------------------------------------------------------------------------------- /src/assets/chains/moonriver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/moonriver.png -------------------------------------------------------------------------------- /src/assets/chains/move.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/move.png -------------------------------------------------------------------------------- /src/assets/chains/near.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/near.png -------------------------------------------------------------------------------- /src/assets/chains/oasis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/oasis.png -------------------------------------------------------------------------------- /src/assets/chains/opbnb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/opbnb.png -------------------------------------------------------------------------------- /src/assets/chains/optimism.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/optimism.png -------------------------------------------------------------------------------- /src/assets/chains/ronin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/ronin.png -------------------------------------------------------------------------------- /src/assets/chains/scroll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/scroll.png -------------------------------------------------------------------------------- /src/assets/chains/shimmer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/shimmer.png -------------------------------------------------------------------------------- /src/assets/chains/solana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/solana.png -------------------------------------------------------------------------------- /src/assets/chains/sui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/sui.png -------------------------------------------------------------------------------- /src/assets/chains/ton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/ton.png -------------------------------------------------------------------------------- /src/assets/chains/viction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/viction.png -------------------------------------------------------------------------------- /src/assets/chains/zeta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/zeta.png -------------------------------------------------------------------------------- /src/assets/chains/zkEVM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/zkEVM.png -------------------------------------------------------------------------------- /src/assets/chains/zksync.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/chains/zksync.png -------------------------------------------------------------------------------- /src/assets/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/coin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/assets/coingecko-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/coingecko-logo.png -------------------------------------------------------------------------------- /src/assets/comment-bubble-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | comment-bubble 3 | 4 | -------------------------------------------------------------------------------- /src/assets/copy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/assets/defaultToken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/defaultToken.png -------------------------------------------------------------------------------- /src/assets/double-tick-icon.svg: -------------------------------------------------------------------------------- 1 | double-tick -------------------------------------------------------------------------------- /src/assets/edit.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/assets/english.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/assets/etherscan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/etherscan.jpg -------------------------------------------------------------------------------- /src/assets/explain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/explain.png -------------------------------------------------------------------------------- /src/assets/full-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/assets/logo-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/assets/logo-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/logo-2.png -------------------------------------------------------------------------------- /src/assets/logo-icon-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/assets/logo-icon-2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/assets/logo-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Layer 1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/assets/market.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/assets/metamask-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/metamask-icon.png -------------------------------------------------------------------------------- /src/assets/more.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/move-up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/assets/no-results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/no-results.png -------------------------------------------------------------------------------- /src/assets/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/assets/portfolio.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/reload.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/assets/search.svg: -------------------------------------------------------------------------------- 1 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /src/assets/settings.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/assets/shield-done.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/shield-fail-address.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/shield-fail.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/smart-contract.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/smart-contract.png -------------------------------------------------------------------------------- /src/assets/solana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/solana.png -------------------------------------------------------------------------------- /src/assets/transactions.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 9 | 11 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/assets/trend-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/assets/trend-up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/assets/twitter.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/up-arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/assets/user.png -------------------------------------------------------------------------------- /src/assets/vietnam.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/wallet.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 10 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/assets/wheel-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /src/components/Copy.svelte: -------------------------------------------------------------------------------- 1 | 18 | 19 | { 23 | isCopied = true; 24 | await wait(1000); 25 | isCopied = false; 26 | }} 27 | > 28 |
29 |
30 | {#if isShorten} 31 | `, 34 | allowHTML: true, 35 | placement: "top", 36 | }} 37 | > 38 | {#if isLink} 39 | 44 | {shorterAddress(address)} 45 | 46 | {:else} 47 | {shorterAddress(address)} 48 | {/if} 49 | 50 | {:else} 51 | 52 | {#if isLink} 53 | 58 | {address} 59 | 60 | {:else} 61 | {address} 62 | {/if} 63 | 64 | {/if} 65 |
66 |
67 | {#if isCopied} 68 | 81 | {:else} 82 |
`, 85 | allowHTML: true, 86 | placement: "top", 87 | }} 88 | > 89 | 96 | 102 | 108 | 109 |
110 | {/if} 111 |
112 |
113 |
114 | 115 | 117 | -------------------------------------------------------------------------------- /src/components/EChart.svelte: -------------------------------------------------------------------------------- 1 | 111 | 112 |
113 |
114 |
115 | -------------------------------------------------------------------------------- /src/components/Error.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | {#if $error} 13 |
14 | Something when wrong! Please reload your browser to try again 15 |
16 | {:else} 17 | 18 | {/if} 19 | 20 | 22 | -------------------------------------------------------------------------------- /src/components/ErrorBoundary.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/components/Image.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | handleImgError(e, defaultLogo)} 15 | /> 16 | -------------------------------------------------------------------------------- /src/components/Loading.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 11 | -------------------------------------------------------------------------------- /src/components/Mixpanel.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/components/Overlay.svelte: -------------------------------------------------------------------------------- 1 | 36 | 37 | {#if isOpen} 38 |
43 | 49 |
59 |
60 |
64 | × 65 |
66 |
67 | 68 |
69 |
70 |
71 |
72 |
73 | {/if} 74 | 75 | 77 | -------------------------------------------------------------------------------- /src/components/Select.svelte: -------------------------------------------------------------------------------- 1 | 23 | 24 |
(open = false)} 28 | > 29 |
{ 33 | if (!disabled) { 34 | open = !open; 35 | } 36 | }} 37 | > 38 |
39 | {#if type === "lang"} 40 | {#if selected?.logo || selectedChain[0]?.logo} 41 | 48 | {/if} 49 |
50 | {selected?.label || selectedChain[0]?.label} 51 |
52 | {:else} 53 |
54 | Other ({listSelect.length}) 55 |
56 | {/if} 57 |
58 | 64 |
65 | 66 | {#if open} 67 |
70 | {#each listSelect as item} 71 |
{ 76 | if (type === "lang") { 77 | selected = item; 78 | open = false; 79 | } 80 | }} 81 | > 82 | {#if item.logo} 83 | 88 | {/if} 89 |
90 | {item.label} 91 |
92 |
93 | {/each} 94 |
95 | {/if} 96 |
97 | 98 | 188 | -------------------------------------------------------------------------------- /src/components/Toast.svelte: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getnimbus/nimbus-ext/ba2c7a8b916284475572cfccd9b981fea5b52e43/src/components/Toast.svelte -------------------------------------------------------------------------------- /src/components/ToastWrapped.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | {#if $showToast} 10 |
11 | 18 | 19 | {#if $isSuccessToast} 20 | 32 | Check icon 33 | {:else} 34 | 46 | Error icon 47 | {/if} 48 | 49 | {$toastMsg} 50 | 51 |
52 | {/if} 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/components/Tooltip.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 |
14 | {#if link.length !== 0} 15 | {text} 16 | 21 | Learn more 22 | 23 | {:else} 24 | {text} 25 | {/if} 26 |
27 | 28 | 30 | -------------------------------------------------------------------------------- /src/components/TooltipNumber.svelte: -------------------------------------------------------------------------------- 1 | 47 | 48 | {#if personalValue && $isHidePortfolio} 49 | ******* 50 | {:else if type === "percent"} 51 | 52 | {formatPercent(number) === "NaN" ? 0 : formatPercent(number)} 53 | 54 | {:else} 55 | 56 | {#if (numberSize && numberSize !== "K") || formatPercent(number) === "NaN"} 57 | {#if isTooltip} 58 | `, 61 | allowHTML: true, 62 | placement: "top", 63 | }} 64 | class="flex items-center" 65 | > 66 | 67 | {#if type === "value"}${/if}{#if numeral(numberFormat).format("0,0.00") === "NaN"} 68 | {@html convertMiniumNumber(numberFormat)} 69 | {:else} 70 | {numeral(numberFormat).format("0,0.00")} 71 | {/if} 72 | 73 | 74 | {numberSize} 75 | 76 | 77 | {:else} 78 | 79 | 80 | {#if type === "value"}${/if}{#if numeral(numberFormat).format("0,0.00") === "NaN"} 81 | {@html convertMiniumNumber(numberFormat)} 82 | {:else} 83 | {numeral(numberFormat).format("0,0.00")} 84 | {/if} 85 | 86 | 87 | {numberSize} 88 | 89 | 90 | {/if} 91 | {:else} 92 | 93 | {#if type === "value"} 94 | 95 | {#if number !== 0 && number > 0 && number < 0.01} 96 | {#if isTooltip} 97 | `, 102 | allowHTML: true, 103 | placement: "top", 104 | }} 105 | > 106 | {formatValue(number)} 107 | 108 | {:else} 109 | 110 | {formatValue(number)} 111 | 112 | {/if} 113 | {:else} 114 | {formatValue(number)} 115 | {/if} 116 | 117 | {:else} 118 | {formatCurrency(number)} 119 | {/if} 120 | 121 | {/if} 122 | 123 | {/if} 124 | 125 | 127 | -------------------------------------------------------------------------------- /src/entries/background/extension-config.ts: -------------------------------------------------------------------------------- 1 | import * as browser from "webextension-polyfill"; 2 | 3 | import { coinGeko, mixpanel, nimbus, goplus, nimbusApi } from "../../lib/network"; 4 | 5 | const fetchBasicData = async () => { 6 | const list = await coinGeko.get("/search"); 7 | browser.storage.local 8 | .set({ coinList: JSON.stringify(list.coins) }) 9 | .then(() => { 10 | console.log("Loaded crypto list"); 11 | }); 12 | }; 13 | 14 | const fetchConfigPages = async () => { 15 | const listConfigPages = await nimbus.get("/config/pages"); 16 | browser.storage.local 17 | .set({ configPageList: JSON.stringify(listConfigPages.data) }) 18 | .then(() => { 19 | console.log("Loaded config page list"); 20 | }); 21 | }; 22 | 23 | const fetchListTerm = async () => { 24 | const listTerm = await nimbus.get("/terms").then((response) => response.data); 25 | browser.storage.local.set({ termList: JSON.stringify(listTerm) }).then(() => { 26 | console.log("Loaded list term"); 27 | }); 28 | }; 29 | 30 | browser.runtime.onStartup.addListener(async () => { 31 | console.log("onStartup...."); 32 | await fetchBasicData(); 33 | await fetchConfigPages(); 34 | await fetchListTerm(); 35 | }); 36 | 37 | browser.commands.onCommand.addListener((command) => { 38 | if (command === "open-quick-search") { 39 | browser.tabs.query({ active: true, currentWindow: true }).then((tab) => { 40 | browser.tabs.sendMessage(tab[0].id, { action: "toggleSidebar" }); 41 | }); 42 | } 43 | }); 44 | 45 | browser.action.onClicked.addListener(() => { 46 | browser.tabs.create({ url: "https://app.getnimbus.io/" }); 47 | }); 48 | 49 | browser.runtime.onInstalled.addListener((details) => { 50 | console.log("Extension installed"); 51 | const reason = details.reason 52 | if (reason === 'install') { 53 | browser.tabs.create({ url: 'src/entries/onboard/index.html' }); 54 | } 55 | }) 56 | 57 | browser.runtime.setUninstallURL('https://getnimbus.io/uninstall'); 58 | 59 | // Run on init 60 | fetchBasicData(); 61 | fetchConfigPages(); 62 | fetchListTerm(); -------------------------------------------------------------------------------- /src/entries/background/script.ts: -------------------------------------------------------------------------------- 1 | import "./main"; 2 | -------------------------------------------------------------------------------- /src/entries/background/serviceWorker.ts: -------------------------------------------------------------------------------- 1 | import './extension-config'; 2 | import "./main"; 3 | -------------------------------------------------------------------------------- /src/entries/background/utils.ts: -------------------------------------------------------------------------------- 1 | import * as browser from "webextension-polyfill"; 2 | import { isEmpty } from "lodash"; 3 | import dayjs from "dayjs"; 4 | 5 | export const cacheOrAPI = async ( 6 | key: string, 7 | apiCall: Function, 8 | { ttl = 5 * 60, defaultValue = null, disabled = false }: { ttl?: number; defaultValue?: any, disabled?: boolean } 9 | ) => { 10 | try { 11 | const dataLocal = await browser.storage.local.get(key); 12 | if (disabled) { 13 | console.log(`${key} DISABLED`); 14 | } 15 | if (!disabled && !isEmpty(dataLocal[key]) && dataLocal.hasOwnProperty(key)) { 16 | const parsedData = JSON.parse(dataLocal[key]); 17 | if ( 18 | dayjs().subtract(ttl, "second").toDate() < 19 | new Date(parsedData?.createdAt) 20 | ) { 21 | console.log(`${key} HIT`); 22 | return JSON.parse(dataLocal[key])?.result || defaultValue; 23 | } 24 | await browser.storage.local.remove(key); 25 | console.log(`${key} EXPIRED`); 26 | } 27 | const result = await apiCall(); 28 | browser.storage.local 29 | .set({ 30 | [key]: JSON.stringify({ 31 | result, 32 | createdAt: new Date(), 33 | }), 34 | }) 35 | .then(() => { 36 | console.log(`Saved ${key} to cache`); 37 | }); 38 | return result; 39 | } catch (e) { 40 | return typeof defaultValue !== "undefined" ? defaultValue : e; 41 | } 42 | }; 43 | 44 | export const wait = (time: number) => { 45 | return new Promise((resolve) => { 46 | setTimeout(() => { 47 | resolve(true); 48 | }, time); 49 | }); 50 | }; 51 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/AddressHighlight.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 43 | 44 | 45 | 46 | {#if name !== "NEAR1"} 47 | document.body, 52 | onTrigger: () => { 53 | // hide default tooltip for etherscan page 54 | const selectedTooltip = document.getElementsByClassName( 55 | "tooltip fade bs-tooltip-top show" 56 | ); 57 | if (selectedTooltip.length > 0) { 58 | selectedTooltip[0].parentNode.removeChild(selectedTooltip[0]); 59 | } 60 | }, 61 | // content: popperElement, 62 | content: ``, 63 | allowHTML: true, 64 | offset: [0, 5], 65 | placement: "top", 66 | animation: "shift-away", 67 | }} 68 | > 69 | {#if addressLabel} 70 | {addressLabel} 71 | {:else} 72 | 73 | {/if} 74 | 75 | {:else} 76 | 77 | {/if} 78 | document.body, 84 | onTrigger: (_, e) => { 85 | e.preventDefault(); 86 | e.stopPropagation(); 87 | isShow = true; 88 | mixpanel.track("user_interactive_address_info"); 89 | }, 90 | onUntrigger: (_, e) => { 91 | e.preventDefault(); 92 | e.stopPropagation(); 93 | isShow = false; 94 | }, 95 | // content: popperElement, 96 | content: ``, 97 | allowHTML: true, 98 | placement: "bottom-start", 99 | arrow: false, 100 | animation: "shift-away", 101 | maxWidth: "none", 102 | }} 103 | class="rounded-[1000px] py-1 px-2 bg-[#A5D5FE] select-none cursor-pointer whitespace-nowrap" 104 | > 105 | More info 106 | {#if isShow} 107 | 115 | 122 | 123 | {:else} 124 | 132 | 139 | 140 | {/if} 141 | 142 | 143 | 144 | 145 | 147 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/AddressSpreadText.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 |
25 |
26 | {#each addressSpreadWordArr as word} 27 | {word} 30 | {/each} 31 |
32 |
33 |
34 | 35 | 55 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/AptosTrxHighlight.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | document.body, 24 | onTrigger: () => { 25 | isShow = true; 26 | mixpanel.track("user_interactive_version_info"); 27 | }, 28 | onUntrigger: () => { 29 | isShow = false; 30 | }, 31 | // content: popperElement, 32 | content: ``, 33 | allowHTML: true, 34 | placement: "bottom-start", 35 | arrow: false, 36 | animation: "shift-away", 37 | maxWidth: "none", 38 | }} 39 | class="rounded-[1000px] py-1 px-2 bg-[#A5D5FE] select-none cursor-pointer whitespace-nowrap" 40 | > 41 | More info 42 | {#if isShow} 43 | 51 | 58 | 59 | {:else} 60 | 68 | 75 | 76 | {/if} 77 | 78 | 79 | 80 | 81 | 83 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/AptosTrxInfo.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 36 | 37 | 38 |
44 |
45 | 46 | {#if explain} 47 |
51 | {explain} 52 |
53 | {:else} 54 |
Loading...
55 | {/if} 56 |
57 |
58 |
59 | 60 | 76 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/Arrow.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 11 | 12 | 24 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/Changes.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 28 | 29 | {#if changeList && changeList.length} 30 |
31 | {#each changeList as change} 32 | 33 | {/each} 34 |
35 | {:else} 36 |
37 | no-results 42 |
43 | {/if} 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/CheckSafetyDApp.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 42 | 43 | 44 |
51 |
52 |
53 | {#if !isEmpty(data) && data.is_audit === 1} 54 | success-icon 60 |
61 |
{MultipleLang.audited}
62 | 67 | {MultipleLang.audit_report} 68 | 69 |
70 | {:else if data.is_audit !== 1} 71 | fail-icon 72 |
{MultipleLang.not_audited}
73 | {/if} 74 |
75 |
76 | {MultipleLang.scan_by_go_plus} 77 |
78 |
79 |
80 |
81 | 82 | 84 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/Collapsible.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 |
9 |
10 |
11 | 12 |
13 | {#if content} 14 |
(expanded = !expanded)}> 15 | {#if expanded} 16 | 24 | 31 | 32 | {:else} 33 | 41 | 48 | 49 | {/if} 50 |
51 | {/if} 52 |
53 | {#if content} 54 | 59 | {/if} 60 |
61 | 62 | 64 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/Entity.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/Loading.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 43 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/MoneyMove.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | {#if data} 22 |
23 |
24 | 38 |
39 |
40 | 41 |
42 |
43 | {#if data?.tokenLogo} 44 | 49 | {/if} 50 |
51 |
`, 57 | allowHTML: true, 58 | placement: "top", 59 | }} 60 | > 61 | {formatBalance(data?.value) === "NaN" 62 | ? formatSmallBalance(data?.value) 63 | : formatBalance(data?.value)} 64 | {data?.symbol ? data?.symbol : "N/A"} 65 |
66 |
67 |
68 |
71 | {data?.type} 72 |
73 |
74 |
75 |
76 |
77 | 91 |
92 |
93 | {/if} 94 | 95 | 97 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/NativeTokenHighlight.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 12 | 13 | 14 | document.body, 20 | // content: popperElement, 21 | content: ``, 22 | allowHTML: true, 23 | placement: "bottom-start", 24 | arrow: false, 25 | animation: "shift-away", 26 | maxWidth: "none", 27 | }} 28 | class="ml-[0.5em] inline-block whitespace-nowrap transition-all text-sky-400 rounded-[3px] py-[2px] px-1 max-w-[1.2em] cursor-pointer overflow-hidden bg-sky-100 hover:max-w-[10rem]" 29 | > 30 | 37 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 51 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/PriceConvert.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 44 | 45 | 46 |
47 |
50 |
{symbol}
51 | 61 |
62 |
63 | 70 | 76 | 77 |
78 |
81 |
USD
82 | 92 |
93 |
94 | {#if amount2.toString() === "NaN" || amount1.toString() === "NaN"} 95 |
Invalid number
96 | {:else} 97 |
98 | {formatCurrency(amount1)} 99 | {symbol} equals ${formatCurrency(amount2)} USD 100 |
101 | {/if} 102 |
103 | 104 | 119 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/ResetStyle.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 |
7 | 8 |
9 | 10 | 29 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/TermInfo.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/Tooltip.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 |
16 | {#if link.length !== 0} 17 | {text} 18 | 23 | Learn more 24 | 25 | {:else} 26 | {text} 27 | {/if} 28 |
29 | 30 | 32 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/TrxHighlight.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 | 17 | 18 | 19 | document.body, 25 | onTrigger: () => { 26 | isShow = true; 27 | mixpanel.track("user_interactive_trx_info"); 28 | }, 29 | onUntrigger: () => { 30 | isShow = false; 31 | }, 32 | // content: popperElement, 33 | content: ``, 34 | allowHTML: true, 35 | placement: "bottom-start", 36 | arrow: false, 37 | animation: "shift-away", 38 | maxWidth: "none", 39 | }} 40 | class="rounded-[1000px] py-1 px-2 bg-[#A5D5FE] select-none cursor-pointer whitespace-nowrap" 41 | > 42 | More info 43 | {#if isShow} 44 | 52 | 59 | 60 | {:else} 61 | 69 | 76 | 77 | {/if} 78 | 79 | 80 | 81 | 82 | 84 | -------------------------------------------------------------------------------- /src/entries/contentScript/views/User.custom.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 |
18 |
21 | 26 | {#if name === "Sender" || name === "Receiver"} 27 |
32 | 37 |
38 | {/if} 39 |
40 |
41 | `, 47 | allowHTML: true, 48 | placement: "top", 49 | }} 50 | > 51 | {label ? add3Dots(label, 12) : shorterAddress(address)} 52 | 53 |
54 | {#if name === "Sender" || name === "Receiver"} 55 | {name} 56 | {/if} 57 |
58 |
59 |
60 | 61 | 66 | -------------------------------------------------------------------------------- /src/entries/onboard/App.svelte: -------------------------------------------------------------------------------- 1 | 25 | 26 |
27 |
28 | (mySwiper = e.detail[0])} 33 | navigation={{ 34 | nextEl: ".next", 35 | }} 36 | pagination={{ clickable: false, dynamicBullets: true }} 37 | on:activeIndexChange={(e) => (activeSlide = e.detail[0][0].activeIndex)} 38 | > 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
60 | 61 |
64 | 65 |
66 |
67 | 68 | 144 | -------------------------------------------------------------------------------- /src/entries/onboard/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Nimbus Onboard 7 | 8 | 9 | 10 | 14 | 32 | 33 | 34 | 35 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /src/entries/onboard/main.ts: -------------------------------------------------------------------------------- 1 | import "@webcomponents/webcomponentsjs/webcomponents-bundle.js"; 2 | import App from "./App.svelte"; 3 | import * as browser from "webextension-polyfill"; 4 | 5 | const moduleLoader = Promise.resolve(true); 6 | 7 | moduleLoader.then((res) => { 8 | browser.storage.sync.get("options").then((res) => { 9 | new App({ 10 | target: document.getElementById("app"), 11 | }); 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /src/entries/options/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Nimbus Options 7 | 8 | 9 | 10 | 14 | 19 | 37 | 38 | 39 | 40 |
41 | 42 | 43 | -------------------------------------------------------------------------------- /src/entries/options/main.ts: -------------------------------------------------------------------------------- 1 | import "@webcomponents/webcomponentsjs/webcomponents-bundle.js"; 2 | import App from "./App.svelte"; 3 | import * as browser from "webextension-polyfill"; 4 | 5 | const moduleLoader = Promise.resolve(true); 6 | 7 | moduleLoader.then((res) => { 8 | browser.storage.sync.get("options").then((res) => { 9 | new App({ 10 | target: document.getElementById("app"), 11 | }); 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /src/entries/popup/App.normal.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 |
Hello world
7 | 8 | 9 | -------------------------------------------------------------------------------- /src/entries/popup/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Popup 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /src/entries/popup/main.ts: -------------------------------------------------------------------------------- 1 | // import "@webcomponents/webcomponentsjs/webcomponents-bundle.js"; 2 | // import "./App.normal.svelte"; 3 | 4 | // new App({ 5 | // target: document.getElementById("app"), 6 | // }); 7 | -------------------------------------------------------------------------------- /src/lib/data-tracking.ts: -------------------------------------------------------------------------------- 1 | import { sendMessage } from "webext-bridge"; 2 | 3 | export const track = (type: string, payload?: Record) => { 4 | try { 5 | sendMessage("trackEvent", { type, payload }); 6 | } catch (error) { 7 | console.error(error); 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /src/lib/debug.ts: -------------------------------------------------------------------------------- 1 | import * as browser from "webextension-polyfill"; 2 | 3 | if (import.meta.env.DEV) { 4 | browser.storage.onChanged.addListener((changes) => { 5 | console.log("-----------------"); 6 | console.log(Object.keys(changes)); 7 | try { 8 | console.log(JSON.parse(changes?.options?.newValue)); 9 | } catch (error) { 10 | console.log(changes?.options?.newValue); 11 | } 12 | console.log("-----------------"); 13 | }); 14 | } 15 | 16 | export default {}; 17 | -------------------------------------------------------------------------------- /src/lib/i18n.ts: -------------------------------------------------------------------------------- 1 | import _ from "lodash"; 2 | import * as browser from "webextension-polyfill"; 3 | import langEN from "../_locales/en/messages.json"; 4 | import langVI from "../_locales/vi/messages.json"; 5 | 6 | type LANG = "vi" | "en"; 7 | export let currentLang: LANG = "en"; 8 | 9 | browser.storage.onChanged.addListener((changes) => { 10 | if (changes?.options?.newValue?.lang) { 11 | currentLang = changes?.options?.newValue?.lang || currentLang; 12 | } 13 | }); 14 | 15 | browser.storage.sync.get("options").then((res) => { 16 | currentLang = res?.options?.lang || "en"; 17 | }); 18 | 19 | export const setLang = async (lang: LANG) => { 20 | currentLang = lang; 21 | await browser.storage.sync.set({ 22 | options: { 23 | lang, 24 | }, 25 | }); 26 | }; 27 | 28 | export const i18n = ( 29 | key: string, 30 | defaultText?: string, 31 | value?: Record 32 | ) => { 33 | const lang = currentLang; 34 | let langText: string = 35 | lang === "vi" 36 | ? _.get(langVI, key, defaultText) 37 | : _.get(langEN, key, defaultText); 38 | 39 | if (value) { 40 | Object.keys(value).forEach((key) => { 41 | langText = langText.replace(`{${key}}`, value[key]); 42 | }); 43 | } 44 | 45 | return langText; 46 | }; 47 | -------------------------------------------------------------------------------- /src/lib/index.js: -------------------------------------------------------------------------------- 1 | export { default as TrxInfo } from "../entries/contentScript/views/TrxInfo.custom.svelte"; 2 | export { default as TrxHighlight } from "../entries/contentScript/views/TrxHighlight.custom.svelte"; 3 | 4 | export { default as AptosTrxInfo } from "../entries/contentScript/views/AptosTrxInfo.custom.svelte"; 5 | export { default as AptosTrxHighlight } from "../entries/contentScript/views/AptosTrxHighlight.custom.svelte"; 6 | 7 | export { default as AddressInfo } from "../entries/contentScript/views/AddressInfo.custom.svelte"; 8 | export { default as AddressHighlight } from "../entries/contentScript/views/AddressHighlight.custom.svelte"; 9 | 10 | export { default as NativeTokenInfo } from "../entries/contentScript/views/NativeTokenInfo.custom.svelte"; 11 | export { default as NativeTokenHighlight } from "../entries/contentScript/views/NativeTokenHighlight.custom.svelte"; 12 | 13 | export { default as QuickSearch } from "../entries/contentScript/views/QuickSearch.custom.svelte"; 14 | 15 | export { default as TermInfo } from "../entries/contentScript/views/TermInfo.custom.svelte"; 16 | 17 | export { default as AddressSpreadText } from "../entries/contentScript/views/AddressSpreadText.custom.svelte"; 18 | export { default as Arrow } from "../entries/contentScript/views/Arrow.custom.svelte"; 19 | export { default as CheckSafetyAddress } from "../entries/contentScript/views/CheckSafetyAddress.custom.svelte"; 20 | export { default as CheckSafetyDApp } from "../entries/contentScript/views/CheckSafetyDApp.custom.svelte"; 21 | export { default as CheckSafetyToken } from "../entries/contentScript/views/CheckSafetyToken.custom.svelte"; 22 | export { default as CoinChart } from "../entries/contentScript/views/CoinChart.custom.svelte"; 23 | export { default as Collapsible } from "../entries/contentScript/views/Collapsible.custom.svelte"; 24 | export { default as PriceConvert } from "../entries/contentScript/views/PriceConvert.custom.svelte"; 25 | export { default as Loading } from "../entries/contentScript/views/Loading.custom.svelte"; 26 | export { default as ResetStyle } from "../entries/contentScript/views/ResetStyle.custom.svelte"; 27 | export { default as Tooltip } from "../entries/contentScript/views/Tooltip.custom.svelte"; 28 | export { default as User } from "../entries/contentScript/views/User.custom.svelte"; 29 | export { default as MoneyMove } from "../entries/contentScript/views/MoneyMove.custom.svelte"; 30 | export { default as Changes } from "../entries/contentScript/views/Changes.custom.svelte"; 31 | -------------------------------------------------------------------------------- /src/lib/price-ws.ts: -------------------------------------------------------------------------------- 1 | import { realtimePrice } from "~/store"; 2 | 3 | export let socket: null | WebSocket; 4 | let isReady = false; 5 | type iFN = () => void; 6 | let cbList: iFN[] = []; 7 | 8 | export const initWS = (cb?: () => void) => { 9 | socket = new WebSocket("wss://ws.getnimbus.io/ws"); 10 | 11 | socket.onopen = () => { 12 | console.log("WS connection established"); 13 | cb && cb(); 14 | isReady = true; 15 | cbList.forEach((cbItem) => { 16 | cbItem(); 17 | }); 18 | cbList = []; 19 | }; 20 | }; 21 | 22 | export const disconnectWs = () => { 23 | if (socket) { 24 | socket.close(); 25 | } 26 | }; 27 | 28 | export const decodeEvent = (ev: MessageEvent) => { 29 | try { 30 | const data = JSON.parse(ev.data); 31 | 32 | return data; 33 | } catch (error) { 34 | console.log(ev.data); 35 | console.log(error); 36 | return null; 37 | } 38 | }; 39 | 40 | const cached = {}; 41 | 42 | export const priceSubscribe = ( 43 | cmc_id: number[] | string[], 44 | chain: string, 45 | ) => { 46 | try { 47 | if (!socket) { 48 | console.log("WS is not initiated"); 49 | initWS(() => priceSubscribe(cmc_id, chain)); 50 | } else { 51 | if (!isReady) { 52 | console.log("Delay Subscribe"); 53 | cbList.push(() => priceSubscribe(cmc_id, chain)); 54 | return; 55 | } 56 | 57 | const key = `${cmc_id}-${chain}`; 58 | 59 | if (cached[key]) { 60 | realtimePrice.update((n) => n = cached[key]) 61 | } else { 62 | socket.send(JSON.stringify({ ids: cmc_id.join(",") })); 63 | } 64 | 65 | socket.addEventListener("message", (ev) => { 66 | const data = decodeEvent(ev); 67 | if ( 68 | data?.id && 69 | cmc_id[0].toString().toLowerCase() === data?.id.toLowerCase() 70 | ) { 71 | 72 | if (!cached[key]) { 73 | cached[key] = { 74 | [data.id]: data 75 | }; 76 | } 77 | 78 | realtimePrice.update((n) => n = { 79 | [data.id]: data 80 | }) 81 | } 82 | }); 83 | } 84 | } catch (error) { 85 | console.error("Socket error", error); 86 | } 87 | }; 88 | -------------------------------------------------------------------------------- /src/lib/tooltip.ts: -------------------------------------------------------------------------------- 1 | // @ts-nocheck 2 | import tippy, { Props } from "tippy.js/headless"; 3 | // TODO: Use tippy headless to eliminate css override 4 | 5 | tippy.setDefaultProps({ animation: false }); 6 | 7 | export default function tooltip(node: any, params: Partial) { 8 | const custom = params.content; 9 | const title = node.title; 10 | const label = node.getAttribute("aria-label"); 11 | const defaultContent = custom || title || label; 12 | let content = defaultContent; 13 | 14 | // is set so our element is accessible: 15 | // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute 16 | // if (!label) node.setAttribute("aria-label", defaultContent); 17 | node.title = ""; 18 | 19 | // Support any of the Tippy props by forwarding all "params": 20 | // https://atomiks.github.io/tippyjs/v6/all-props/ 21 | const tip = tippy(node, { 22 | showOnCreate: false, 23 | content: defaultContent, 24 | onTrigger: (_, e) => { 25 | e.preventDefault(); 26 | e.stopPropagation(); 27 | setTimeout(() => { 28 | _?.popper?.querySelector('video')?.play(); 29 | }, 100) 30 | }, 31 | // onHidden: (e) => { 32 | // e.setProps({ content: "" }); 33 | // e.setProps({ content }); // Trick to make childrent re-render 34 | // }, 35 | ...params, 36 | animation: false, 37 | onHide(instance) { 38 | requestAnimationFrame(instance.unmount); 39 | }, 40 | render(instance) { 41 | // The recommended structure is to use the popper as an outer wrapper 42 | // element, with an inner `box` element 43 | const popper = document.createElement("div"); 44 | const box = document.createElement("div"); 45 | 46 | popper.appendChild(box); 47 | 48 | box.className = "nimbus-popup"; 49 | box.innerHTML = instance.props.content; 50 | 51 | function onUpdate(prevProps, nextProps) { 52 | // DOM diffing 53 | if (prevProps.content !== nextProps.content) { 54 | box.innerHTML = nextProps.content; 55 | } 56 | } 57 | 58 | // Return an object with two properties: 59 | // - `popper` (the root popper element) 60 | // - `onUpdate` callback whenever .setProps() or .setContent() is called 61 | return { 62 | popper, 63 | onUpdate, // optional 64 | }; 65 | }, 66 | }); 67 | 68 | // node.addEventListener("click", (e) => { 69 | // e.stopPropagation(); 70 | // }); 71 | 72 | return { 73 | // If the props change, let's update the Tippy instance: 74 | update: (newParams: Props) => { 75 | content = newParams.content; 76 | tip.setProps({ content, ...newParams }); 77 | }, 78 | 79 | // Clean up the Tippy instance on unmount: 80 | destroy: () => tip.destroy(), 81 | }; 82 | } 83 | -------------------------------------------------------------------------------- /src/lib/web-bridge.ts: -------------------------------------------------------------------------------- 1 | type Callback = (...data: any[]) => any; 2 | let events: Record = {} 3 | 4 | export const sendMessage = (name: string, data: any) => { 5 | // console.log("Going to send msg", name, { data }); 6 | return events[name]?.({ data }); 7 | } 8 | 9 | export const onMessage = (name, handler) => { 10 | // console.log('Event register', name); 11 | events[name] = handler 12 | } -------------------------------------------------------------------------------- /src/lib/web-chrome.ts: -------------------------------------------------------------------------------- 1 | import { tryCatch } from "~/utils/index"; 2 | 3 | const storageChangeListener = []; 4 | 5 | export const storage = { 6 | onChanged: { 7 | addListener(fn) { 8 | storageChangeListener.push(fn); 9 | // TODO: Notify when storage change 10 | } 11 | }, 12 | sync: { 13 | async get(name: string) { 14 | const value = localStorage.getItem(`sync_${name}`); 15 | return { 16 | [name]: tryCatch(() => JSON.parse(value), value) 17 | } 18 | }, 19 | async set(input: Record) { 20 | Object.keys(input).forEach(key => { 21 | localStorage.setItem(`sync_${key}`, JSON.stringify(input[key])); 22 | }) 23 | 24 | return true 25 | }, 26 | async remove(name: string) { 27 | return localStorage.removeItem(name); 28 | } 29 | }, 30 | local: { 31 | async get(name: string) { 32 | const value = localStorage.getItem(`local_${name}`); 33 | return { 34 | [name]: tryCatch(() => JSON.parse(value), value) 35 | } 36 | }, 37 | async set(input: Record) { 38 | Object.keys(input).forEach(key => { 39 | try { 40 | localStorage.setItem(`local_${key}`, JSON.stringify(input[key])); 41 | } catch (error) { 42 | 43 | } 44 | }) 45 | 46 | return true 47 | }, 48 | async remove(name: string) { 49 | return localStorage.removeItem(name); 50 | } 51 | }, 52 | } 53 | 54 | export const tabs = { 55 | create(url) { 56 | console.log("Going to open new tab ", url); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/manifest.ts: -------------------------------------------------------------------------------- 1 | import pkg from "../package.json"; 2 | 3 | const ManifestV3: Partial = { 4 | content_scripts: [ 5 | { 6 | js: ["src/entries/contentScript/main.ts"], 7 | matches: ["*://*/*"], 8 | }, 9 | ], 10 | icons: { 11 | 96: "icons/96.png", 12 | 128: "icons/128.png", 13 | 512: "icons/logo-icon.png", 14 | }, 15 | options_ui: { 16 | page: "src/entries/options/index.html", 17 | open_in_tab: true, 18 | }, 19 | // chrome_url_overrides: { 20 | // newtab: "src/entries/newTab/index.html", 21 | // }, 22 | web_accessible_resources: [ 23 | { 24 | resources: ["src/assets/full-logo.svg", "src/entries/onboard/index.html"], 25 | matches: ["*://*/*"], 26 | }, 27 | ], 28 | permissions: ["identity", "storage", "unlimitedStorage", "activeTab"], 29 | commands: { 30 | "open-quick-search": { 31 | suggested_key: { 32 | default: "Ctrl+Shift+K", 33 | mac: "Command+Shift+K", 34 | }, 35 | description: "Open Quick Search", 36 | }, 37 | }, 38 | action: { 39 | default_icon: { 40 | // 16: "icons/16.png", 41 | // 19: "icons/19.png", 42 | // 32: "icons/32.png", 43 | 38: "icons/96.png", 44 | }, 45 | default_title: "Nimbus", 46 | }, 47 | background: { 48 | service_worker: "src/entries/background/serviceWorker.ts", 49 | // type: "module", 50 | }, 51 | host_permissions: ["*://*/*"], 52 | default_locale: "en", 53 | }; 54 | 55 | export function getManifest(): chrome.runtime.ManifestV3 { 56 | const manifest = { 57 | author: pkg.author, 58 | description: pkg.description, 59 | name: pkg.displayName ?? pkg.name, 60 | version: pkg.version, 61 | }; 62 | 63 | return { 64 | ...manifest, 65 | ...ManifestV3, 66 | manifest_version: 3, 67 | }; 68 | } 69 | -------------------------------------------------------------------------------- /src/store.ts: -------------------------------------------------------------------------------- 1 | import { writable } from "svelte/store"; 2 | 3 | export const isSaveAddressLabel = writable(false); 4 | export const isDarkMode = writable(false); 5 | export const isHidePortfolio = writable(false); 6 | export const realtimePrice = writable({}); 7 | export let showToast = writable(false); 8 | export let isSuccessToast = writable(false); 9 | export let toastMsg = writable(""); 10 | -------------------------------------------------------------------------------- /src/utils/functions.ts: -------------------------------------------------------------------------------- 1 | import { toastMsg, isSuccessToast, showToast } from "~/store"; 2 | 3 | let counterToast = 5; 4 | 5 | const trigger = () => { 6 | showToast.update((n) => n = true) 7 | counterToast = 5; 8 | timeout(); 9 | }; 10 | 11 | const timeout = () => { 12 | if (--counterToast > 0) return setTimeout(timeout, 1000); 13 | showToast.update((n) => n = false) 14 | toastMsg.update((n) => n = "") 15 | isSuccessToast.update((n) => n = false) 16 | }; 17 | 18 | export const triggerToast = (msg: string, status: "success" | "fail") => { 19 | toastMsg.update((n) => n = msg) 20 | isSuccessToast.update((n) => n = (status === "success" ? true : false)) 21 | trigger(); 22 | }; 23 | 24 | export const triggerClickOutside = (node) => { 25 | const handleClick = (event) => { 26 | if (node && !node.contains(event.target) && !event.defaultPrevented) { 27 | node.dispatchEvent(new CustomEvent("click_outside", node)); 28 | } 29 | }; 30 | 31 | document.addEventListener("click", handleClick, true); 32 | 33 | return { 34 | destroy() { 35 | document.removeEventListener("click", handleClick, true); 36 | }, 37 | }; 38 | }; 39 | -------------------------------------------------------------------------------- /src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// -------------------------------------------------------------------------------- /target/npmlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.1", 3 | "name": "nimbus-ext", 4 | "dependencies": { 5 | "@metamask/detect-provider": { "version": "1.2.0" }, 6 | "@popperjs/core": { "version": "2.11.6" }, 7 | "@webcomponents/webcomponentsjs": { "version": "2.6.0" }, 8 | "axios": { "version": "0.27.2" }, 9 | "bind-mousetrap-global": { "version": "1.0.1" }, 10 | "classnames": { "version": "2.3.2" }, 11 | "countup.js": { "version": "2.5.0" }, 12 | "dayjs": { "version": "1.11.4" }, 13 | "echarts": { "version": "5.4.1" }, 14 | "flowbite-svelte": { "version": "0.27.1" }, 15 | "flowbite-windicss-plugin": { "version": "0.1.2" }, 16 | "flowbite": { "version": "1.5.3" }, 17 | "lightweight-charts": { "version": "3.8.0" }, 18 | "lodash": { "version": "4.17.21" }, 19 | "mark.js": { "version": "8.11.1" }, 20 | "mousetrap": { "version": "1.6.5" }, 21 | "numeral": { "version": "2.0.6" }, 22 | "svelte-system-info": { "version": "1.0.0" }, 23 | "svelte-windicss-preprocess": { "version": "4.2.8" }, 24 | "tailwindcss": { "version": "3.1.8" }, 25 | "tippy.js": { "version": "6.3.7" }, 26 | "url-pattern": { "version": "1.0.3" }, 27 | "uuid": { "version": "9.0.0" }, 28 | "vite-imagetools": { "version": "4.0.4" }, 29 | "webext-bridge": { "version": "5.0.5" }, 30 | "webextension-polyfill": { "version": "0.9.0" }, 31 | "windicss": { "version": "3.5.6" } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/svelte/tsconfig.json", 3 | "compilerOptions": { 4 | "allowSyntheticDefaultImports": true, 5 | "target": "esnext", 6 | "useDefineForClassFields": true, 7 | "module": "esnext", 8 | "resolveJsonModule": true, 9 | "baseUrl": ".", 10 | "paths": { 11 | "~/*": ["src/*"] 12 | }, 13 | "types": [ 14 | "vite-plugin-pwa/svelte" 15 | ], 16 | /** 17 | * Typecheck JS in `.svelte` and `.js` files by default. 18 | * Disable checkJs if you'd like to use dynamic types in JS. 19 | * Note that setting allowJs false does not prevent the use 20 | * of JS in `.svelte` files. 21 | */ 22 | "allowJs": true, 23 | "checkJs": true 24 | }, 25 | "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"] 26 | } 27 | -------------------------------------------------------------------------------- /vite.config.components.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import { svelte } from "@sveltejs/vite-plugin-svelte"; 3 | import { windi } from "svelte-windicss-preprocess"; 4 | import sveltePreprocess from "svelte-preprocess"; 5 | import path from "path"; 6 | 7 | // https://vitejs.dev/config/ 8 | export default defineConfig({ 9 | resolve: { 10 | alias: { 11 | "~": path.resolve(__dirname, "./src"), 12 | }, 13 | }, 14 | build: { 15 | outDir: path.resolve(__dirname, "./built-component"), 16 | lib: { 17 | entry: "src/lib/index.js", 18 | name: "NimbusComponent", 19 | }, 20 | rollupOptions: { 21 | // output: { 22 | // format: "esm", 23 | // }, 24 | // input: [ 25 | // "./src/entries/contentScript/views/TrxHighlight.svelte", 26 | // "./src/entries/contentScript/views/AddressHighlight.svelte", 27 | // ], 28 | }, 29 | }, 30 | plugins: [ 31 | svelte({ 32 | compilerOptions: { 33 | customElement: true, 34 | }, 35 | preprocess: [sveltePreprocess(), windi({})], 36 | }), 37 | ], 38 | }); 39 | -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig, loadEnv } from "vite"; 2 | import { svelte } from "@sveltejs/vite-plugin-svelte"; 3 | import webExtension from "@samrum/vite-plugin-web-extension"; 4 | import path from "path"; 5 | import { getManifest } from "./src/manifest"; 6 | import { windi } from "svelte-windicss-preprocess"; 7 | import sveltePreprocess from "svelte-preprocess"; 8 | import AutoImport from "unplugin-auto-import/vite"; 9 | import { viteStaticCopy } from "vite-plugin-static-copy"; 10 | 11 | // https://vitejs.dev/config/ 12 | export default defineConfig(({ mode }) => { 13 | const env = loadEnv(mode, process.cwd(), ""); 14 | return { 15 | plugins: [ 16 | svelte({ 17 | preprocess: [sveltePreprocess(), windi({})], 18 | experimental: { 19 | dynamicCompileOptions({ filename, compileOptions }) { 20 | return { 21 | ...compileOptions, 22 | customElement: filename.endsWith(".custom.svelte"), 23 | }; 24 | }, 25 | }, 26 | }), 27 | webExtension({ 28 | manifest: getManifest(), 29 | }), 30 | AutoImport({ 31 | imports: [ 32 | { 33 | "webextension-polyfill": [["default", "browser"]], 34 | }, 35 | ], 36 | }), 37 | viteStaticCopy({ 38 | targets: [ 39 | { 40 | src: "src/_locales", 41 | dest: "", 42 | }, 43 | ], 44 | }), 45 | ], 46 | resolve: { 47 | alias: { 48 | "~": path.resolve(__dirname, "./src"), 49 | }, 50 | }, 51 | build: { 52 | rollupOptions: { 53 | output: { 54 | entryFileNames: `assets/[name].js`, 55 | chunkFileNames: `assets/[name].js`, 56 | assetFileNames: `assets/[name].[hash].[ext]`, 57 | }, 58 | }, 59 | sourcemap: env.WATCH === "true" ? "inline" : false, 60 | }, 61 | optimizeDeps: { 62 | include: ["webextension-polyfill"], 63 | }, 64 | }; 65 | }); 66 | -------------------------------------------------------------------------------- /windi.config.ts: -------------------------------------------------------------------------------- 1 | import defaultTheme from "windicss/defaultTheme"; 2 | import { defineConfig } from "windicss/helpers"; 3 | 4 | function rem2px(input, fontSize = 16) { 5 | if (input == null) { 6 | return input; 7 | } 8 | switch (typeof input) { 9 | case "object": 10 | if (Array.isArray(input)) { 11 | return input.map((val) => rem2px(val, fontSize)); 12 | } else { 13 | const ret = {}; 14 | for (const key in input) { 15 | ret[key] = rem2px(input[key]); 16 | } 17 | return ret; 18 | } 19 | case "string": 20 | return input.replace( 21 | /(\d*\.?\d+)rem$/, 22 | (_, val) => parseFloat(val) * fontSize + "px" 23 | ); 24 | default: 25 | return input; 26 | } 27 | } 28 | 29 | export default defineConfig({ 30 | extract: { 31 | include: [ 32 | "./src/**/*.{html,js,svelte}", 33 | "./node_modules/flowbite-svelte/**/*.{html,js,svelte,ts}", 34 | ], 35 | }, 36 | // include: ["./node_modules/flowbite-svelte/**/*.{html,js,svelte,ts}"], 37 | darkMode: "class", 38 | theme: { 39 | borderRadius: rem2px(defaultTheme.borderRadius), 40 | columns: rem2px(defaultTheme.columns), 41 | fontSize: rem2px(defaultTheme.fontSize), 42 | lineHeight: rem2px(defaultTheme.lineHeight), 43 | maxWidth: rem2px(defaultTheme.maxWidth), 44 | spacing: rem2px(defaultTheme.spacing), 45 | minHeight: rem2px(defaultTheme.minHeight), 46 | width: rem2px(defaultTheme.width), 47 | height: rem2px(defaultTheme.height), 48 | }, 49 | shortcuts: { 50 | "btn-primary": "flex items-center justify-center h-[34px] w-max text-white font-medium text-base rounded-xl py-[10px] px-4 gap-[6px] bg-[#27326f] border-none cursor-pointer", 51 | "btn-secondary": "flex items-center justify-center h-[34px] w-max text-[#27326f] font-medium text-base rounded-xl py-[10px] px-4 gap-[6px] bg-white border border-[#27326f] cursor-pointer", 52 | "title-1": "text-3xl font-extrabold", 53 | "title-2": "text-2xl font-bold", 54 | "title-3": "text-xl font-semibold", 55 | "title-4": "text-lg font-semibold", 56 | "title-5": "text-base font-medium", 57 | "input-1": "w-full py-2 border-none bg-white focus:outline-none", 58 | "input-2": "w-30 py-2 px-1 flex-1 rounded-lg border bg-white focus:outline-none", 59 | }, 60 | plugins: [ 61 | require("flowbite/plugin"), 62 | // require("flowbite-windicss-plugin"), 63 | ], 64 | }); 65 | --------------------------------------------------------------------------------