> For the complete documentation index, see [llms.txt](https://cryptococo.gitbook.io/cocoshop-theme-development/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cryptococo.gitbook.io/cocoshop-theme-development/liquid/functions/connectwallet.md).

# connectWallet

The `connectWallet` function is used to connect to a crypto wallet such as Metamask.

When the function is executed, the following processing is performed

1. request a connection to Metamask
2. set up the chain when it is connected
3. save the account and chainId in the cookie
4. reload and update the [connected\_wallet](/cocoshop-theme-development/liquid/objects/connected_wallet.md) object with the cookie
