Passport
Immutable Passport is the best way for your game to onboard web2 and web3 users simultaneously.
Method | Description |
---|---|
Login | Logs into Passport using Device Code Authorisation. If useCachedSession is true, stored credentials will be used to re-login the gamer. If re-login fails, it will not fall back to Device Code Authorisation. |
LoginPKCE | (Android, iOS and macOS only) Logs into Passport using Authorization Code Flow with Proof Key for Code Exchange (PKCE) |
HasCredentialsSaved | Checks if there are stored credits from the previous login |
GetAccessToken | Gets the gamer's access token |
GetIDToken | Gets the gamer's ID token |
Logout | Logs the gamer out of Passport and removes any stored credentials. It is recommended to be used alongside Login to keep the gamer experience consistent. |
LogoutPKCE | Logs the gamer out of Passport and removes any stored credentials. It is recommended to be used alongside LoginPKCE to keep the gamer experience consistent. |
GetLinkedAddresses | Gets the list of external wallets the user has linked to their Passport account via the Dashboard. |
GetEmail | Gets the gamer's email address |
GetPassportId | Gets the gamer's Passport ID |
ConnectEvm | Instantiates the zkEVM provider |
ZkEvmRequestAccounts | Initialises the gamer's Passport wallet and retrieves their wallet address |
ZkEvmGetBalance | Gets the balance of the given address in wei |
ZkEvmSendTransaction | Sends a transaction to the network and signs it using the logged-in Passport account. |
ZkEvmSendTransactionWithConfirmation | Similar to ZkEvmSendTransaction .Sends a transaction to the network, signs it using the logged-in Passport account, and waits for the transaction to be included in a block. |
ZkEvmGetTransactionReceipt | Retrieves the transaction information of a given transaction hash. This function uses the Ethereum JSON-RPC eth_getTransactionReceipt method. |
ZkEvmSignTypedData | Signs an EIP-712 structured message in JSON string format using the logged-in Passport account. |