Unreal SDK Reference
Information includes method descriptions, parameters and return types.
Initialize
Initialises Passport. This sets up the Passport instance, configures the web browser, and waits for the ready signal.
Method parameters
Parameters to initialise the Passport with.
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.
Connect
Logs the user into Passport via Device Code Authorisation. This will open the user's default browser and take them through the Passport login flow.
Method parameters
If true
, uses the "re-connect" method to authenticate with Immutable X. Otherwise, uses "re-login" for authentication. To access a wallet with Immutable X or zkEVM later, you must either call Connect
again with this set to true
or use ConnectEvm
, respectively. Please set this value to false
for use on Immutable zkEVM.
If true
, attempts to re-connect or re-login the user using a cached session, avoiding the need to open a web browser. If this fails, it will fall back to Device Code Authorisation.
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.
ConnectPKCE
(Android, iOS, and macOS only) Logs into Passport using Authorization Code Flow with Proof Key for Code Exchange (PKCE).
Method parameters
If true
, the game bridge will use a cached session to re-connect or re-login the user, avoiding the need to open a web browser. If this attempt fails, it will fall back to Device Code Authorisation. Please set this value to false
for use on Immutable zkEVM.
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.
Logout
Logs the user out of Passport.
Method parameters
If true
, clears sessions and any stored credentials from both the SDK/plugin and the browser. Otherwise, only clears session and credentials from the SDK, leaving the browser session.
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.
ConnectEvm
Initializes the zkEVM provider.
Method parameters
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.
ZkEvmRequestAccounts
Authenticates the user and initializes their Passport wallet before returning an array of wallet addresses. Must be called before other zkEVM functions.
Method parameters
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.
ZkEvmGetBalance
Returns the balance of the account of the given address in wei.
Method parameters
The address and block number for the request.
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.
ZkEvmSendTransaction
Creates new message call transaction or a contract creation, if the data field contains code.
Method parameters
The transaction request data.
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.
ZkEvmSendTransactionWithConfirmation
Similar to ZkEvmSendTransaction
. Creates new message call transaction or a contract creation, if the data field contains code, and signs it using the account specified in from. Additionally, it also resolves to the FZkEvmTransactionReceipt
once the transaction has been included in the chain for confirms blocks. If confirms is 0, and the transaction has not been mined, null
is returned. The callback response data may contain the receipt of the transaction or null
if it is still processing.
Method parameters
The transaction request data.
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.
ZkEvmGetTransactionReceipt
Retrieves the transaction information of a given transaction hash. This function uses the Ethereum JSON-RPC eth_getTransactionReceipt method. Response will contain the receipt of the transaction or null
if it is still processing.
Method parameters
The request data(Hash) to perform the transaction.
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.
GetIdToken
Gets the currently saved ID token without verifying its validity.
Method parameters
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.
GetAccessToken
Gets the currently saved access token without verifying its validity.
Method parameters
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.
GetEmail
Retrieves the email address of the user whose credentials are currently stored.
Method parameters
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.
GetLinkedAddresses
Gets the list of external wallets the user has linked to their Passport account via the Dashboard.
Method parameters
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.
HasStoredCredentials
Checks if the user's credentials have been stored.
Method parameters
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.
ZkEvmSignTypedDataV4
Generates a signature for a typed data V4 object. Signs the EIP-712 structured message in JSON string format using the logged-in Passport account.
Method parameters
The EIP-712 structured data in JSON string format.
The response delegate of type FImtblPassportResponseDelegate
to call on response from JS.
Returns
No return value.