blocknative / web3-onboard

Client library to onboard users to web3 apps
https://onboard.blocknative.com/
MIT License
817 stars 479 forks source link

Integration of FinoaConnect wallet connector service into Web3Onboard #2188

Open finoaamukherjee opened 2 months ago

finoaamukherjee commented 2 months ago

Description

Integration of FinoaConnect (Finoa's Wallet Connector Service) into Web3Onboard for distribution through BlockNative. For any questions or queries, please reach out to:

PLEASE NOTE- Checklist must be complete prior to review.

Checklist

Docs Checklist

If this PR includes changes to add an injected wallet or SDK wallet module:

Please complete the following using the internal demo package. To run this demo use the command yarn && yarn dev to get the project running at http://localhost:8080/ [Finoa] It was verified that Finoa's documentation appears under docs. The FinoaConnect option does show up on the list of injected wallets, and we have verified that connecting and disconnecting the wallet to the dApp works fine.

Tests with demo app (injected)

Tests with demo app (SDK)

Screenshots

Screenshot of FinoaConnect under docs

Screenshot 2024-05-06 at 14 48 06
finoaamukherjee commented 2 months ago

There are 2 topics pending on this PR on which we would appreciate some guidance:

Adamj1232 commented 2 months ago

There are 2 topics pending on this PR on which we would appreciate some guidance:

  • (Circle) CI pipeline is breaking in a job to compile core package, but the changes we have made in this PR does not include any changes to this package.
    • Could you provide some guidance on why this might be happening ?
  • We have tried to include "@web3-onboard/finoaconnect:1.0.0-alpha.1" as a package in the docs but that fails in yarn checks. We are not sure why this might be happening.
    • Could you provide some guidance on how to fix this?

Thanks for the PR - I have added a few comments and questions.

Ill checkout the CI pipeline issue. As for testing the implementation you will use packages/demo, which will need the new module added to the package.json, initialized and added to the demo code. Then you can run yarn && yarn dev to get the demo started and complete the PR checklist.

Thanks again!

socket-security[bot] commented 2 months ago

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
Install scripts npm/protobufjs@6.11.4
  • Install script: postinstall
  • Source: node scripts/postinstall
🚫
Install scripts npm/secp256k1@3.8.0
  • Install script: install
  • Source: npm run rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."
🚫
Install scripts npm/tiny-secp256k1@1.1.6
  • Install script: install
  • Source: npm run build || echo "secp256k1 bindings compilation fail. Pure JS implementation will be used."
🚫
Install scripts npm/bigint-buffer@1.1.5
  • Install script: install
  • Source: npm run rebuild || echo "Couldn't build bindings. Non-native version used."
🚫
Install scripts npm/@sveltejs/kit@1.30.4
  • Install script: postinstall
  • Source: node postinstall.js
🚫
Install scripts npm/svelte-preprocess@5.1.4
  • Install script: postinstall
  • Source: echo "[svelte-preprocess] Don't forget to install the preprocessors packages that will be used: sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc..."
🚫

View full report↗︎

Next steps

What is an install script?

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/protobufjs@6.11.4
  • @SocketSecurity ignore npm/secp256k1@3.8.0
  • @SocketSecurity ignore npm/tiny-secp256k1@1.1.6
  • @SocketSecurity ignore npm/bigint-buffer@1.1.5
  • @SocketSecurity ignore npm/@sveltejs/kit@1.30.4
  • @SocketSecurity ignore npm/svelte-preprocess@5.1.4
finoaamukherjee commented 2 months ago

There are 2 topics pending on this PR on which we would appreciate some guidance:

  • (Circle) CI pipeline is breaking in a job to compile core package, but the changes we have made in this PR does not include any changes to this package.
    • Could you provide some guidance on why this might be happening ?
  • We have tried to include "@web3-onboard/finoaconnect:1.0.0-alpha.1" as a package in the docs but that fails in yarn checks. We are not sure why this might be happening.
    • Could you provide some guidance on how to fix this?

Thanks for the PR - I have added a few comments and questions.

Ill checkout the CI pipeline issue. As for testing the implementation you will use packages/demo, which will need the new module added to the package.json, initialized and added to the demo code. Then you can run yarn && yarn dev to get the demo started and complete the PR checklist.

Thanks again!

The checks for sanity are now completed in the PR, except the one for CI pipelines. The dApp on localhost boots up fine, but does not enlist the FinoaConnect option yet. I will work to checkout why this is happening.

finoaamukherjee commented 2 months ago

Screenshot 2024-05-15 at 10 51 42 Screenshot 2024-05-15 at 11 44 28 Screenshot 2024-05-15 at 11 55 47 Screenshot 2024-05-15 at 11 56 33

finoaamukherjee commented 1 month ago

The PR has now been updated to return error code 4200 (UNSUPPORTED_METHOD) for all method calls that are not supported by FinoaConnect provider.

Adamj1232 commented 1 month ago

@finoaamukherjee Im still seeing build errors - https://github.com/blocknative/web3-onboard/actions/runs/9503906496/job/26195385651?pr=2188

socket-security[bot] commented 2 weeks ago

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@solana/web3.js@1.91.8 network +11 18.7 MB lorisleiva
npm/@stablelib/random@1.0.2 None +3 157 kB dchest
npm/@stablelib/x25519@1.0.3 None +3 118 kB dchest
npm/@sveltejs/adapter-static@2.0.3 environment 0 8.32 kB svelte-admin
npm/@sveltejs/kit@1.30.4 environment, eval Transitive: filesystem, network, unsafe +14 2.26 MB svelte-admin
npm/@svelteness/kit-docs@1.1.5 Transitive: filesystem, network +11 18.3 MB mihar-22
npm/@tailwindcss/typography@0.5.13 None +4 359 kB adamwathan
npm/@toruslabs/openlogin-jrpc@4.7.2 Transitive: environment, filesystem +10 1.97 MB chaitanyapotti
npm/@types/animejs@3.1.12 None 0 8.55 kB types
npm/@types/react@18.3.2 None +2 1.69 MB types
npm/@vitejs/plugin-react@4.2.1 Transitive: environment, filesystem, unsafe +26 3.68 MB vitebot
npm/@walletconnect/encoding@1.0.2 None 0 294 kB bkrem
npm/@walletconnect/events@1.0.1 None +1 334 kB bkrem
npm/@walletconnect/jsonrpc-http-connection@1.0.8 Transitive: network +1 244 kB gancho_walletconnect
npm/@walletconnect/jsonrpc-provider@1.0.14 None 0 113 kB gancho_walletconnect
npm/@walletconnect/jsonrpc-types@1.0.4 None +1 164 kB gancho_walletconnect
npm/@walletconnect/jsonrpc-utils@1.0.8 None +1 345 kB gancho_walletconnect
npm/@walletconnect/keyvaluestorage@1.1.1 filesystem +3 1.08 MB gancho_walletconnect
npm/@walletconnect/logger@2.1.2 Transitive: unsafe +1 617 kB devceline
npm/@walletconnect/relay-api@1.0.10 None 0 89.2 kB gancho_walletconnect
npm/@walletconnect/relay-auth@1.0.4 None +6 2.59 MB bkrem
npm/@walletconnect/safe-json@1.0.2 None 0 215 kB gancho_walletconnect
npm/@walletconnect/time@1.0.2 None 0 253 kB bkrem
npm/@walletconnect/window-getters@1.0.1 None 0 218 kB bkrem
npm/@walletconnect/window-metadata@1.0.1 None 0 225 kB bkrem
npm/@web3-onboard/bitget@2.1.1 None +3 601 kB cmeisl
npm/@web3-onboard/blocto@2.1.1 Transitive: network +2 611 kB cmeisl
npm/@web3-onboard/cede-store@2.3.1 Transitive: filesystem +14 1.67 MB cmeisl
npm/@web3-onboard/coinbase@2.4.1 Transitive: network +2 337 kB cmeisl
npm/@web3-onboard/common@2.4.2 Transitive: network +10 18 MB cmeisl
npm/@web3-onboard/core@2.22.1 network Transitive: filesystem +13 7.17 MB cmeisl
npm/@web3-onboard/dcent@2.2.9 network Transitive: environment +33 16.6 MB cmeisl
npm/@web3-onboard/enkrypt@2.1.1 None 0 6.64 kB cmeisl
npm/@web3-onboard/fortmatic@2.1.1 None +1 105 kB cmeisl
npm/@web3-onboard/frame@2.1.1 Transitive: environment, network +1 569 kB cmeisl
npm/@web3-onboard/frontier@2.1.1 None 0 6.26 kB cmeisl
npm/@web3-onboard/gas@2.2.1 None +1 540 kB cmeisl
npm/@web3-onboard/gnosis@2.3.1 None 0 8 kB cmeisl
npm/@web3-onboard/infinity-wallet@2.1.1 Transitive: environment +4 144 kB cmeisl
npm/@web3-onboard/injected-wallets@2.11.1 None +2 1.17 MB cmeisl
npm/@web3-onboard/keepkey@2.3.9 Transitive: eval, network +52 42.8 MB cmeisl
npm/@web3-onboard/keystone@2.3.9 Transitive: environment, network +52 89.6 MB cmeisl
npm/@web3-onboard/ledger@2.7.1 Transitive: environment, eval, filesystem, network +55 22.2 MB cmeisl
npm/@web3-onboard/magic@2.2.1 Transitive: network +2 1.3 MB cmeisl
npm/@web3-onboard/metamask@2.1.1 Transitive: environment, filesystem +20 36.4 MB cmeisl
npm/@web3-onboard/mew-wallet@2.1.1 None +1 85.9 kB cmeisl
npm/@web3-onboard/okx@2.0.0-alpha.1 None 0 7.19 kB cmeisl
npm/@web3-onboard/particle-network@2.1.1 Transitive: environment, filesystem, network +10 3.79 MB cmeisl
npm/@web3-onboard/phantom@2.1.1 None 0 6.22 kB cmeisl
npm/@web3-onboard/portis@2.2.1 Transitive: environment, network +9 4.14 MB cmeisl
npm/@web3-onboard/sequence@2.1.1 Transitive: environment +1 1.1 MB cmeisl
npm/@web3-onboard/taho@2.1.1 None +2 151 kB cmeisl
npm/@web3-onboard/torus@2.3.1 Transitive: filesystem, network +15 3.8 MB cmeisl
npm/@web3-onboard/transaction-preview@2.1.1 Transitive: filesystem +3 697 kB cmeisl
npm/@web3-onboard/trezor@2.4.5 Transitive: environment, filesystem, network, unsafe +68 24.9 MB cmeisl
npm/@web3-onboard/trust@2.1.1 None 0 9.46 kB cmeisl
npm/@web3-onboard/uauth@2.2.1 Transitive: environment, eval, filesystem, network +54 19.5 MB cmeisl
npm/@web3-onboard/venly@2.1.1 None 0 7.23 kB cmeisl
npm/@web3-onboard/walletconnect@2.6.1 Transitive: environment, eval, filesystem, network +36 16.6 MB cmeisl
npm/@web3-onboard/web3auth@2.3.1 None 0 16.2 kB cmeisl
npm/@web3-onboard/xdefi@2.1.1 None 0 9.98 kB cmeisl
npm/@web3-onboard/zeal@2.1.1 None 0 4.05 kB cmeisl
npm/animejs@3.2.2 None 0 109 kB juliangarnier
npm/assert@2.1.0 None 0 82.1 kB ljharb
npm/autoprefixer@10.4.19 environment 0 199 kB ai
npm/axios@0.21.4 environment, network 0 375 kB jasonsaayman
npm/base64-js@1.5.1 None 0 9.62 kB feross
npm/bech32@1.1.4 None 0 9.98 kB junderw
npm/big-integer@1.6.52 None 0 175 kB peterolson
npm/bignumber.js@9.1.2 None 0 351 kB mikemcl
npm/bindings@1.5.0 environment, filesystem 0 11.2 kB tootallnate
npm/bip32@2.0.6 None 0 17.7 kB junderw
npm/bip66@1.1.5 None 0 7.79 kB dcousens
npm/bitcoin-ops@1.4.1 None 0 4.38 kB dcousens
npm/bn.js@5.2.1 None 0 99 kB fanatid
npm/bnc-sdk@4.6.9 None +1 675 kB cmeisl
npm/bowser@2.11.0 None 0 217 kB lancedikson
npm/browserify-zlib@0.2.0 None 0 192 kB dignifiedquire
npm/browserslist@4.23.0 environment, filesystem 0 62.8 kB ai
npm/bs58@4.0.1 None 0 4.57 kB dcousens
npm/bs58check@2.1.2 None 0 4.79 kB dcousens
npm/buffer@6.0.3 None 0 91.3 kB feross
npm/bufferutil@4.0.8 None 0 414 kB lpinca
npm/clsx@1.2.1 None 0 5.67 kB lukeed
npm/cosmjs-types@0.5.2 None 0 16.4 MB webmaster128
npm/create-hash@1.2.0 None 0 5.21 kB cwmma
npm/create-hmac@1.1.7 None 0 5.81 kB cwmma
npm/crypto-browserify@3.12.0 None 0 53.5 kB cwmma
npm/crypto-js@4.2.0 None 0 487 kB evanvosberg
npm/debug@4.3.4 environment 0 42.4 kB qix
npm/decode-uri-component@0.2.2 None 0 6.09 kB samverschueren
npm/deepmerge@4.3.1 None 0 31.2 kB tehshrike
npm/detect-browser@5.3.0 None 0 27 kB damonoehlman
npm/elliptic@6.5.4 None 0 118 kB indutny
npm/end-of-stream@1.4.4 None 0 6.23 kB mafintosh
npm/eth-rpc-errors@4.0.3 None 0 52.2 kB rekmarks
npm/ethereum-cryptography@2.1.3 None +4 2.01 MB paulmillr
npm/ethereumjs-util@7.1.5 None 0 310 kB holgerd77
npm/ethers@5.7.2 None +4 11 MB ricmoo
npm/ethjs-util@0.1.6 None 0 225 kB silentcicero
npm/events@3.3.0 None 0 82.8 kB goto-bus-stop
npm/fast-safe-stringify@2.1.1 None 0 39.7 kB matteo.collina
npm/follow-redirects@1.15.6 network 0 29.4 kB rubenverborgh
npm/google-protobuf@3.21.2 None 0 820 kB dibenede
npm/hash.js@1.1.7 None 0 41.7 kB indutny
npm/i18next@22.5.1 None 0 715 kB adrai
npm/inherits@2.0.4 None 0 3.96 kB isaacs
npm/is-stream@2.0.1 None 0 5.93 kB sindresorhus
npm/is-typedarray@1.0.0 None 0 4.41 kB hughsk
npm/js-sha3@0.8.0 None 0 52.9 kB emn178
npm/js-tokens@4.0.0 None 0 15.1 kB lydell
npm/keccak@3.0.4 None 0 779 kB fanatid
npm/lodash.isequal@4.5.0 None 0 52.7 kB jdalton
npm/lodash@4.17.21 None 0 1.41 MB bnjmnt4n
npm/loose-envify@1.4.0 environment 0 5.81 kB zertosh
npm/magic-string@0.30.10 None 0 452 kB antfu
npm/nan@2.19.0 None 0 429 kB kkoopa
npm/node-fetch@2.7.0 network 0 162 kB node-fetch-bot
npm/object-assign@4.1.1 None 0 5.49 kB sindresorhus
npm/once@1.4.0 None 0 4.05 kB isaacs
npm/picocolors@1.0.1 environment 0 5.15 kB alexeyraspopov
npm/preact@10.22.0 None 0 1.39 MB jdecroock
npm/prettier-plugin-svelte@2.10.1 environment 0 268 kB dummdidumm
npm/prettier@2.8.8 environment, filesystem, unsafe 0 11.2 MB prettier-bot
npm/prop-types@15.8.1 environment 0 94.5 kB ljharb
npm/protobufjs@6.11.4 filesystem, network 0 14.7 MB google-wombot
npm/randombytes@2.1.0 None 0 6.36 kB cwmma
npm/react-dom@18.3.1 environment +1 4.64 MB react-bot
npm/react@18.3.1 environment 0 318 kB react-bot
npm/readable-stream@2.3.8 environment +1 120 kB matteo.collina
npm/rlp@2.2.7 None 0 62.9 kB ralxz
npm/rollup-plugin-polyfill-node@0.13.0 None 0 1.06 MB fredkschott
npm/rxjs@7.8.1 None 0 4.5 MB blesh
npm/sade@1.8.1 None 0 31.5 kB lukeed
npm/safe-buffer@5.2.1 None 0 32.1 kB feross
npm/scrypt-js@3.0.1 None 0 226 kB ricmoo
npm/sha.js@2.4.11 None 0 31.1 kB dcousens
npm/shiki@0.12.1 filesystem, network +3 9.66 MB orta
npm/socket.io-client@4.7.5 None 0 1.33 MB darrachequesne
npm/stream-browserify@3.0.0 None 0 11.6 kB goto-bus-stop
npm/stream-http@3.2.0 None 0 26.8 kB jhiesey
npm/string_decoder@1.3.0 None 0 14.4 kB matteo.collina
npm/svelte-check@3.7.1 None 0 8.94 MB svelte-language-tools-deploy
npm/svelte-preprocess@5.1.4 environment, filesystem Transitive: unsafe +19 3.54 MB dummdidumm
npm/svelte@3.59.2 None 0 10.6 MB conduitry
npm/tailwindcss@3.4.3 environment, filesystem +1 5.69 MB adamwathan
npm/through2@2.0.5 None 0 9.65 kB rvagg
npm/tiny-secp256k1@1.1.6 None 0 1.1 MB junderw
npm/tslib@2.6.2 None 0 84 kB typescript-bot
npm/typedarray-to-buffer@3.1.5 None 0 8.84 kB feross
npm/typeforce@1.18.0 None 0 19.1 kB dcousens
npm/typescript@5.4.5 None 0 32.4 MB typescript-bot
npm/uint8arrays@3.1.1 None 0 95.3 kB achingbrain
npm/unplugin-icons@0.14.15 None 0 67.8 kB antfu
npm/util-deprecate@1.0.2 None 0 5.48 kB tootallnate
npm/util@0.12.5 environment 0 33.7 kB goto-bus-stop
npm/uuid@9.0.1 None 0 123 kB ctavan
npm/varuint-bitcoin@1.1.2 None 0 5.49 kB junderw
npm/viem@1.21.4 network +7 9.48 MB jmoxey
npm/vite@4.5.3 environment, eval, filesystem, network, shell, unsafe 0 3.34 MB vitebot
npm/webextension-polyfill@0.10.0 None 0 198 kB addons-robot
npm/wif@2.0.6 None 0 8.31 kB dcousens
npm/ws@8.13.0 environment, network +1 890 kB lpinca

🚮 Removed packages: npm/@antfu/utils@0.7.8, npm/@babel/helper-define-polyfill-provider@0.6.2, npm/@babel/plugin-transform-runtime@7.24.7, npm/@lit-labs/ssr-dom-shim@1.2.0, npm/@lit/reactive-element@1.6.3, npm/@motionone/animation@10.17.0, npm/@motionone/dom@10.17.0, npm/@motionone/types@10.17.0, npm/@motionone/utils@10.17.0, npm/@nodelib/fs.stat@2.0.5, npm/@protobufjs/aspromise@1.1.2

View full report↗︎