# How to use Web3.js in Wix?

**URL:** <https://forum.wixstudio.com/t/how-to-use-web3-js-in-wix/35703>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [July 29, 2021, 9:09pm UTC](https://forum.wixstudio.com/t/how-to-use-web3-js-in-wix/35703 "2021-07-29T21:09:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayushguptacse14](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/ayushguptacse14/32/29362_2.png) [@ayushguptacse14](https://forum.wixstudio.com/u/ayushguptacse14)\
**Post date:** [July 29, 2021, 9:09pm UTC](https://forum.wixstudio.com/t/how-to-use-web3-js-in-wix/35703/1 "2021-07-29T21:09:28Z")

</div>

How to use Web3.js in Wix? How to connect to wallets like Metamask?

---

<div class="post-metadata">

**Author:** ![J.D](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/j.d/32/7312_2.png) [@J.D](https://forum.wixstudio.com/u/J.D)\
**Post date:** [July 29, 2021, 10:32pm UTC](https://forum.wixstudio.com/t/how-to-use-web3-js-in-wix/35703/2 "2021-07-29T22:32:46Z")

</div>

You can install the Web3 NPM (read [**here**](https://support.wix.com/en/article/velo-working-with-npm-packages) how to install NPMs).

---

<div class="post-metadata">

**Author:** ![ayushguptacse14](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/ayushguptacse14/32/29362_2.png) [@ayushguptacse14](https://forum.wixstudio.com/u/ayushguptacse14)\
**Post date:** [July 30, 2021, 5:02am UTC](https://forum.wixstudio.com/t/how-to-use-web3-js-in-wix/35703/3 "2021-07-30T05:02:52Z")

</div>

I did install via npm but to connect to wallet like metamask I need access to windows.ethereum but wixwindow doesn’t have .ethereum, nor wix allows to access window. How can we connect to say metamask or any web3 wallet ?

---

<div class="post-metadata">

**Author:** ![J.D](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/j.d/32/7312_2.png) [@J.D](https://forum.wixstudio.com/u/J.D)\
**Post date:** [August 1, 2021, 1:15pm UTC](https://forum.wixstudio.com/t/how-to-use-web3-js-in-wix/35703/4 "2021-08-01T13:15:22Z")

</div>

I’ve never tried it so I can’t tell you for sure. But maybe you have to use it in a [custom element](https://support.wix.com/en/article/wix-editor-adding-a-custom-element-to-your-site) where you have access to the DOM (including to window).

---

<div class="post-metadata">

**Author:** ![yasinn12](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yasinn12/32/30812_2.png) [@yasinn12](https://forum.wixstudio.com/u/yasinn12)\
**Post date:** [November 10, 2021, 4:13am UTC](https://forum.wixstudio.com/t/how-to-use-web3-js-in-wix/35703/5 "2021-11-10T04:13:27Z")

</div>

Hello there. Did you find a solution for web3?

---

<div class="post-metadata">

**Author:** ![simonadams](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@simonadams](https://forum.wixstudio.com/u/simonadams)\
**Post date:** [January 26, 2022, 10:32am UTC](https://forum.wixstudio.com/t/how-to-use-web3-js-in-wix/35703/6 "2022-01-26T10:32:37Z")

</div>

Hi All,

I will look to see if it can be achieved in a custom element, however this would lead to more code I believe, the easiest way is to create your own wallets on wix using web3 or ethers in the backend and calling the functions from the client side.

Si
