Installing Particle Auth
ParticleAuthCore
ParticleMPCCore
Thresh
ParticleWalletAPI
for transaction construction.ParticleWallerGUI
to enable an embedded wallet interface.Configuring Particle Auth
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, client key, and application ID
ParticleNetwork-Info.plist
to your project, then insert the aforementioned keys as is exemplified below.Initialize Particle Auth
initialize
method on ParticleNetwork
. This takes the following parameters:config
, which takes:
chainInfo
, representing the primary chain you intend to use (for example, .ethereum
, .polygon
).devEnv
, affecting the information logged within your environment (.debug
, .production
, or .staging
).Facilitating social login
auth.connect
to initiate social login, passing in the specific login type you’d like the user to use (.google
, .twitter
, .discord
, etc.) alongside, if applicable, the type of account prompt used by the OAuth provider (.selectAccount
, .consent
, .none
).auth.switchChain
to switch chains, and after waiting for 2 seconds, a new address for the selected chain will be generated for you.auth.evm.getAddress
and auth.getUserInfo
(getUserInfo
returns an object with numerous points of information; to learn more, head over to its API reference).
The following snippet is an example of retrieving a user’s address on both EVM and Solana alongside pulling their broader account information.
ParticleWalletAPI.createTransaction
using standard parameters such as from
, to
, value
, and (optionally) data
.
Upon construction, the transaction can be sent through auth.evm.sendTransaction
; once the user signs/confirms, it’ll be pushed to the network; an example of this is shown below.
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.