Connect
ArConnect Injected API connect() function
To use the different functionalities the ArConnect API provides, you need to request permissions from the user to interact with their wallets. Each API function has their own permission(s), which can be requested at any time with the connect()
function.
Argument | Type | Description |
---|---|---|
| An array of permission to request from the user (at least one has to be included) | |
| Additional information about the app | |
| Custom gateway config |
Note: The appInfo
argument is optional, if it is not provided, the extension will use your site's title and favicon as application data.
Note: The gateway
argument is optional, if it is not provided, the extension will use the default arweave.net
gateway for the executed API. functions
Permissions
ArConnect requires specific permissions from the user for each interaction that involves the usage of their wallet.
Permission | Description |
---|---|
| Allow the app to get the active wallet's address |
| Enable the app to access the active wallet's public key |
| Enable the app to access all wallet addresses added to ArConnect |
| Allow the app to sign an Arweave transaction (Base layer) |
| Enable the app to encrypt data with the user's wallet through ArConnect |
| Allow the app to decrypt data encrypted with the user's wallet |
| Allow the app to sign messages with the user's wallet through ArConnect |
| Enable the app to access the current gateway config |
| Allow the app to dispatch a transaction (bundle or base layer) |
| Allow the app to access all tokens and token balances added in ArConnect |
Additional application information
You can provide your application's name and logo to the extension. Please make sure the app name only includes the name of your application and the logo is high quality and clearly visible on dark and light backgrounds.
Custom gateway config
If your application requires the usage of a special gateway or you want to test with an ArLocal testnet gateway, you'll have to provide some information about these when connecting to ArConnect.
Example usage
Last updated