toAddresses
toAddresses
array within the TransferOptions
object of your link token request is the primary mechanism for configuring where users can deposit their cryptocurrency assets. Each object in this array defines a specific cryptocurrency, the network it resides on, and the receiving address.
Key Requirement: For each item in the toAddresses
array, you must provide the Mesh-specific Unique Identifier (UID) for the target network. You can find a comprehensive list of supported tokens, networks, and their corresponding Mesh UIDs here: Tokens | Networks | Integrations.
toAddresses
array. This will instruct the Link UI to skip the asset and network selection screens, taking the user directly to the connection and authorization steps.
Link Token Request Body:
NetworkId
: The Mesh UID of the target network (e.g., Ethereum Mainnet in this case).Symbol
: The symbol of the cryptocurrency being deposited (e.g., ETH).Address
: The receiving cryptocurrency address.toAddresses
array. Each object will represent a specific token and the network it can be deposited over.
Link Token Request Body:
ToAddresses
array defines a specific deposit option (Network and Symbol).onIntegrationConnected
SDK event (more information about UI Events can be found here) to capture and save the accessToken
. You will need to construct the accessToken
object prior to sending it back to Mesh for the reconnection. Here’s how:
accessToken
. Never store it directly in client-side code (e.g., local storage) for production applications.accessToken
with the corresponding user in your application’s database.createLink
for the same user, include the stored accessToken
in the accessTokens
property:
accessTokens
and pass them to the accessTokens
property:
accessTokens
provided.expiresInSeconds
). You’ll need to handle token refreshes or re-authentication before the tokens expire.ToAddresses
array.createLink
.