Skip to main content

Passport

Immutable Passport is the best way for your game to onboard web2 and web3 users simultaneously.


MethodDescription
LoginLogs 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)
HasCredentialsSavedChecks if there are stored credits from the previous login
GetAccessTokenGets the gamer's access token
GetIDTokenGets the gamer's ID token
LogoutLogs the gamer out of Passport and removes any stored credentials.

It is recommended to be used alongside Login to keep the gamer experience consistent.
LogoutPKCELogs the gamer out of Passport and removes any stored credentials.

It is recommended to be used alongside LoginPKCE to keep the gamer experience consistent.
GetLinkedAddressesGets the list of external wallets the user has linked to their Passport account via the Dashboard.
GetEmailGets the gamer's email address
GetPassportIdGets the gamer's Passport ID
ConnectEvmInstantiates the zkEVM provider
ZkEvmRequestAccountsInitialises the gamer's Passport wallet and retrieves their wallet address
ZkEvmGetBalanceGets the balance of the given address in wei
ZkEvmSendTransactionSends a transaction to the network and signs it using the logged-in Passport account.
ZkEvmSendTransactionWithConfirmationSimilar 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.
ZkEvmGetTransactionReceiptRetrieves the transaction information of a given transaction hash. This function uses the Ethereum JSON-RPC eth_getTransactionReceipt method.
ZkEvmSignTypedDataSigns an EIP-712 structured message in JSON string format using the logged-in Passport account.