Allow users to connect to any website and physical location
Crossmint’s wallets are interoperable. This means you can allow users to connect their wallets to any website and offer benefits based on the NFTs they hold or their wallet activity.
Crossmint’s wallets can be connected in two different ways:
Best UX
More ubiquitous
You may test both options here. Note that returning users will remained logged in.
Once a user has connected their wallet and you have their public address, you can use Crossmint’s APIs to read the content of their wallets and decide whether any action is required, like unlocking exclusive content or offering them rewards.
Connectivity will generally not work if wallets are created using userID
instead of email addresses. Whitelabel
connectors and userID
connectivity available only for large enterprises.
Crossmint Connect provides a more seamless experience to connect a Crossmint wallet than Wallet Connect. The implementation varies slightly by chain:
On this guide, you will allow users to connect their Crossmint wallet to your site, obtain their public key, store it, and allow them to sign a message. To get started:
First, you must create a new react component called EVMConnectButton.tsx
, with an onClick
handler
CrossmintEVMWalletAdapter
and BlockchainTypes
Next, we will import CrossmintEVMWalletAdapter
and BlockchainTypes
from @crossmint/connect
, and instance it inside the component.
apiKey
parameter has been deprecated. Please set the value as empty quotes.Here we set up CrossmintEVMWalletAdapter
for Ethereum. If you’d like to use another chain, swap
BlockchainTypes.ETHEREUM
for BlockchainTypes.POLYGON
or the relevant chain.
Finally, you must prompt the user to trust your app by calling await crossmintConnect.connect()
. If the user accepts, it will return a string containing the user’s public key. If the user rejects, the function will return undefined
.
apiKey
parameter has been deprecated. Please set the value as empty quotes.That’s all you need to connect to a user’s Crossmint wallet and get their public key! To put the user’s public key into react state, and displaying it once they have connected:
apiKey
parameter has been deprecated. Please set the value as empty quotes.To ask a user to sign a message, you must instance a new CrossmintEVMWalletAdapter
, and call the .signMessage(message)
function, where message
is a string. Find the high-level code below. Not all steps are described as the code is very similar to the one used to get a user’s public key:
apiKey
parameter has been deprecated. Please set the value as empty quotes.On this guide, you will allow users to connect their Crossmint wallet to your site, obtain their public key, store it, and allow them to sign a message. To get started:
First, you must create a new react component called EVMConnectButton.tsx
, with an onClick
handler
CrossmintEVMWalletAdapter
and BlockchainTypes
Next, we will import CrossmintEVMWalletAdapter
and BlockchainTypes
from @crossmint/connect
, and instance it inside the component.
apiKey
parameter has been deprecated. Please set the value as empty quotes.Here we set up CrossmintEVMWalletAdapter
for Ethereum. If you’d like to use another chain, swap
BlockchainTypes.ETHEREUM
for BlockchainTypes.POLYGON
or the relevant chain.
Finally, you must prompt the user to trust your app by calling await crossmintConnect.connect()
. If the user accepts, it will return a string containing the user’s public key. If the user rejects, the function will return undefined
.
apiKey
parameter has been deprecated. Please set the value as empty quotes.That’s all you need to connect to a user’s Crossmint wallet and get their public key! To put the user’s public key into react state, and displaying it once they have connected:
apiKey
parameter has been deprecated. Please set the value as empty quotes.To ask a user to sign a message, you must instance a new CrossmintEVMWalletAdapter
, and call the .signMessage(message)
function, where message
is a string. Find the high-level code below. Not all steps are described as the code is very similar to the one used to get a user’s public key:
apiKey
parameter has been deprecated. Please set the value as empty quotes.On this guide, you will allow users to connect their Crossmint wallet to a site with 2 lines of code, using Solana Wallet Adapter. To get started:
WalletProvider
In your project’s code, find the file where you are initializing the WalletProvider
component. If you are following Solana’s example projects, the correct files are listed here:
React App | NextJs | React UI | Material UI
Once you have found the correct file, we need to make 2 alterations:
At the top of your file, import the CrossmintSolanaWalletAdapter
and networkToCrossmintEnvironment
from @crossmint/connect
:
The WalletProvider
component accepts an array of wallets, which are the wallets your users will be able to connect with. You must add CrossmintSolanaWalletAdapter
to the wallets
array, together with any other wallets you may want to incorporate:
apiKey
parameter has been deprecated. Please set the value as empty quotes.Congrats! You can now allow users to connect their Crossmint wallets to your site using Crossmint Connect! Refer to the Solana Adapter repo for inspiration and questions.
Troubleshooting
If you encounter issues, please ensure that: - Your project credentials are set correctly. - The user is correctly authenticated. - You have adequate error handling in your code to manage issues with API requests.
Allow users to connect to any website and physical location
Crossmint’s wallets are interoperable. This means you can allow users to connect their wallets to any website and offer benefits based on the NFTs they hold or their wallet activity.
Crossmint’s wallets can be connected in two different ways:
Best UX
More ubiquitous
You may test both options here. Note that returning users will remained logged in.
Once a user has connected their wallet and you have their public address, you can use Crossmint’s APIs to read the content of their wallets and decide whether any action is required, like unlocking exclusive content or offering them rewards.
Connectivity will generally not work if wallets are created using userID
instead of email addresses. Whitelabel
connectors and userID
connectivity available only for large enterprises.
Crossmint Connect provides a more seamless experience to connect a Crossmint wallet than Wallet Connect. The implementation varies slightly by chain:
On this guide, you will allow users to connect their Crossmint wallet to your site, obtain their public key, store it, and allow them to sign a message. To get started:
First, you must create a new react component called EVMConnectButton.tsx
, with an onClick
handler
CrossmintEVMWalletAdapter
and BlockchainTypes
Next, we will import CrossmintEVMWalletAdapter
and BlockchainTypes
from @crossmint/connect
, and instance it inside the component.
apiKey
parameter has been deprecated. Please set the value as empty quotes.Here we set up CrossmintEVMWalletAdapter
for Ethereum. If you’d like to use another chain, swap
BlockchainTypes.ETHEREUM
for BlockchainTypes.POLYGON
or the relevant chain.
Finally, you must prompt the user to trust your app by calling await crossmintConnect.connect()
. If the user accepts, it will return a string containing the user’s public key. If the user rejects, the function will return undefined
.
apiKey
parameter has been deprecated. Please set the value as empty quotes.That’s all you need to connect to a user’s Crossmint wallet and get their public key! To put the user’s public key into react state, and displaying it once they have connected:
apiKey
parameter has been deprecated. Please set the value as empty quotes.To ask a user to sign a message, you must instance a new CrossmintEVMWalletAdapter
, and call the .signMessage(message)
function, where message
is a string. Find the high-level code below. Not all steps are described as the code is very similar to the one used to get a user’s public key:
apiKey
parameter has been deprecated. Please set the value as empty quotes.On this guide, you will allow users to connect their Crossmint wallet to your site, obtain their public key, store it, and allow them to sign a message. To get started:
First, you must create a new react component called EVMConnectButton.tsx
, with an onClick
handler
CrossmintEVMWalletAdapter
and BlockchainTypes
Next, we will import CrossmintEVMWalletAdapter
and BlockchainTypes
from @crossmint/connect
, and instance it inside the component.
apiKey
parameter has been deprecated. Please set the value as empty quotes.Here we set up CrossmintEVMWalletAdapter
for Ethereum. If you’d like to use another chain, swap
BlockchainTypes.ETHEREUM
for BlockchainTypes.POLYGON
or the relevant chain.
Finally, you must prompt the user to trust your app by calling await crossmintConnect.connect()
. If the user accepts, it will return a string containing the user’s public key. If the user rejects, the function will return undefined
.
apiKey
parameter has been deprecated. Please set the value as empty quotes.That’s all you need to connect to a user’s Crossmint wallet and get their public key! To put the user’s public key into react state, and displaying it once they have connected:
apiKey
parameter has been deprecated. Please set the value as empty quotes.To ask a user to sign a message, you must instance a new CrossmintEVMWalletAdapter
, and call the .signMessage(message)
function, where message
is a string. Find the high-level code below. Not all steps are described as the code is very similar to the one used to get a user’s public key:
apiKey
parameter has been deprecated. Please set the value as empty quotes.On this guide, you will allow users to connect their Crossmint wallet to a site with 2 lines of code, using Solana Wallet Adapter. To get started:
WalletProvider
In your project’s code, find the file where you are initializing the WalletProvider
component. If you are following Solana’s example projects, the correct files are listed here:
React App | NextJs | React UI | Material UI
Once you have found the correct file, we need to make 2 alterations:
At the top of your file, import the CrossmintSolanaWalletAdapter
and networkToCrossmintEnvironment
from @crossmint/connect
:
The WalletProvider
component accepts an array of wallets, which are the wallets your users will be able to connect with. You must add CrossmintSolanaWalletAdapter
to the wallets
array, together with any other wallets you may want to incorporate:
apiKey
parameter has been deprecated. Please set the value as empty quotes.Congrats! You can now allow users to connect their Crossmint wallets to your site using Crossmint Connect! Refer to the Solana Adapter repo for inspiration and questions.
Troubleshooting
If you encounter issues, please ensure that: - Your project credentials are set correctly. - The user is correctly authenticated. - You have adequate error handling in your code to manage issues with API requests.