Passport
The Immutable SDK for Unity helps you integrate your game with Immutable Passport.
Method | Description |
---|---|
Login | Logs into Passport using Authorization Code Flow with Proof Key for Code Exchange (PKCE). If useCachedSession is true, stored credentials will be used to re-login the gamer. If re-login fails, it won't automatically prompt the user to log in again. |
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. |
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. |