Installing Particle Connect
ParticleConnectKit
ParticleConnect
ConnectCommon
ParticleAuthCore
ParticleMPCCore
Thresh
AuthCoreAdapter
ConnectWalletConnectAdapter
ConnectPhantomAdapter
ParticleWalletAPI
ParticleWalletGUI
ParticleWalletConnect
Configuring Particle Connect
Access the Particle Dashboard
Create a new project or enter an existing project
Create a new iOS application, or skip this step if you already have one
Retrieve the project ID, the client key, and the application ID
ParticleNetwork-Info.plist
to your project, then insert these values as is shown below.Configuring Xcode
Info.plist
file; this file should contain an array of strings representing the wallets you intend to support, alongside a number of permissions, as is shown below.appId
is 63bfa427-cf5f-4742-9ff1-e8f5a1b9828f
, then the scheme URL would be pn63bfa427-cf5f-4742-9ff1-e8f5a1b9828f
, simply adding pn
to the beginning of the appId
.Initialize SDK
initialize
method on ParticleConnect
, which takes the following parameters:env
, representing the mode in which you’d like your environment to be in, such as .debug
, .staging
, or .production
. This primarily affects the amount of information logged during usage.chainInfo
, specifying the primary chain you intend to use within your application.dAppData
, the metadata used for WalletConnect.adapters
, an array of adapters representing the wallets you’d like to support within your application.chainInfo
structures) with setWalletConnectV2SupportChainInfos
. An example of this can be found below.Facilitating connection
config
specifying the:connectOptions
(such as .email
, .phone
).socialProviders
(such as .google
, .apple
).walletProviders
(specified through an instance of EnableWalletProvider
, as shown below).additionalLayoutOptions
.designOptions
.ConnectKitConfig
), you’ll be able to call ParticleConnectUI.connect
, initiating the resulting connection modal.ParticleConnectUI.connect
, in this case, that was saved to account
, which contains properties such as publicAddress
and walletType
.
To explicitly retrieve userInfo
(a collection of information regarding the login mechanism, attached addresses, and so on; more information can be found within its API reference), you’ll need to call auth.getUserInfo
.
An example of both approaches can be found below.
ParticleWalletAPI.evm().createTransaction
, this takes basic parameters such as from
, to
, value
, and (optionally) data
and returns a machine-readable transaction object.
To execute the resulting transaction, you’ll need to initialize an instance of the active connected wallet; an example of doing this has been included in the snippet below.
Finally, using this instance, the transaction can be executed through {adapter}.signAndSendTransaction
, taking the sender’s address alongside the previously constructed transaction object.
ParticleWalletGUI
within your Podfile, you can open the (optional) embedded wallet interface at any time after a user connects, use ParticleWalletGUI.setSupportChain
to set supported chains, then PNRouter
to open the interface.
ParticleAA
SDK and refer to this documentation. Additionally, a demo repository can be found here.