Portal

open class Portal

The main entry point for interacting with the Portal SDK.

The Portal class provides a high-level interface for managing user wallets, interacting with blockchains, and using various features of the Portal ecosystem.

It supports multiple chains, including Ethereum (EIP-155) and Solana, and offers features like wallet creation, backup, recovery, sending assets, signing transactions, and more.

Constructors

Link copied to clipboard
constructor(apiKey: String, rpcConfig: Map<String, String> = mapOf(), legacyEthChainId: Int = 1, autoApprove: Boolean = false, featureFlags: FeatureFlags? = null, version: String = "v6", api: Api? = null, apiHost: String = "api.portalhq.io", encryption: PortalEncryption = PortalEncryption(PortalMobileMpc()), keychain: MobileStorageAdapter? = null, mpc: Mpc? = null, mpcClient: PortalMobileMpc? = null, mpcHost: String = "mpc.portalhq.io", provider: Provider? = null, requests: PortalRequests? = PortalRequests(), webSocketHost: String = "connect.portalhq.io")

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val api: Api

The API client for interacting with the Portal backend services.

Link copied to clipboard

The API key used for authenticating requests to Portal services.

Link copied to clipboard

A boolean flag indicating whether transactions should be auto-approved.

Link copied to clipboard

A map of chain IDs to their respective gateway URLs.

Link copied to clipboard

The provider instance for interacting with blockchain RPC endpoints.

Functions

Link copied to clipboard

Retrieves the list of available recovery methods for a given namespace.

suspend fun availableRecoveryMethods(chainId: String? = null): List<BackupMethods>

Retrieves the available recovery methods for the specified chain ID.

Link copied to clipboard
suspend fun backupWallet(backupMethod: BackupMethods = BackupMethods.Gdrive, backupConfigs: BackupConfigs? = null, progress: (status: MpcStatus) -> Unit = {}): BackupWalletResponse

Backs up the wallet share using the specified backup method.

Link copied to clipboard
suspend fun canUsePasskeys(): Boolean

Checks if the device and the current configuration support the use of passkeys.

Link copied to clipboard

Configures the Google Storage backup method for the backups.

Link copied to clipboard
fun configurePasskeyStorage(relyingPartyId: String = "portalhq.io", relyingPartyOrigins: List<String>, webAuthnHost: String = "https://backup.web.portalhq.io")

Configures the Passkey Storage for the backups.

Link copied to clipboard

Creates an instance of PortalConnect.

Link copied to clipboard
suspend fun createWallet(progress: (status: MpcStatus) -> Unit = {}): Result<CreateWalletsResponse>

Creates a new wallet with Ethereum and Solana addresses.

Link copied to clipboard
fun createWebView(url: String, chainId: String? = "eip155:11155111", eip6963Icon: String = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6CAIAAAAHjs1qAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAA+qADAAQAAAABAAAA+gAAAACOvM8JAAAZaUlEQVR4Ae2debgU1ZnGq7puXbjs+yK7oCCCgBEFFxCcR5nEIYv7NsZlonIdhFHijIM6gpOMawC5GPc4ahBJ4sZk0CeyiUAC6kWQAAFBQPZNdnudt2npuUJ33z6nTp86y1d/aNN96tT3ve/vnq4+dRZ30OgjDh2kgB0KROxIk7IkBdIKEO7EgUUKEO4WmU2pEu7EgEUKEO4WmU2pEu7EgEUKEO4WmU2pEu7EgEUKEO4WmU2pEu7EgEUKEO4WmU2pEu7EgEUKEO4WmU2pEu7EgEUKEO4WmU2pEu7EgEUKEO4WmU2pEu7EgEUKEO4WmU2pEu7EgEUKEO4WmU2pEu7EgEUKEO4WmU2pEu7EgEUKEO4WmU2pEu7EgEUKEO4WmU2pEu7EgEUKEO4WmU2pEu7EgEUKEO4WmU2pEu7EgEUKEO4WmU2plpEEQRQ4u0dkSJ/Iqe0jjeo7+w46qzYl5yxN/mVlMkid2XNR+dC+kW7tIk0bOq7jROPOtDmJN+cnsgXoBasCLm1WwypZpnybZu6/XV3Wt1uOr8fl65PjX41v3Z3iqxlntW3mjr2+rFfnHJVXr03+cmqgyrmjMuBEwp3HxPNOj9x3rd+gIu+5+w45IydH123lIf7ktu7EEX6j+mjQcx8HDju/nBqbv1zMd0juaxj6rtdp4FhDUytJWq7r3Hixd/cVfh2/UP34dMBpkRmLEnHGW4+KOs7kO8ubN87LOq5a7jtD+3q4v1n6Bc+fU6G4Tf8sx9el6Snz5+eXOfdf5988rAzQ13rgbueaIc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0idySnvsWO98fdBZ81USA26D7NtRMzxUfmGfSPcOEexwve+gs3pTcvZSYZXXvJA9rwl3e7ymTOkxEzFgkwLUM2OT29bnSrhbj4BNAhDuNrltfa6Eu/UI2CQA4W6T29bnSrhbj4BNAhDuNrltfa6Eu/UI2CQA4W6T29bnSrhbj4BNAhDuNrltfa6Eu/UI2CQA4W6T29bnSrhbj4BNAhDuNrltfa6Eu/UI2CQA4W6T29bnSrhbj4BNAhDuNrltfa6Eu/UI2CQA4W6T29bnSrhbj4BNAhDuNrltfa6Eu/UI2CQA4W6T29bnSrhbj4BNAhDuNrltfa6Eu/UI2CQA4W6T29bnSrhbj4BNAhDuNrltfa6Eu/UI2CTA/wHlhdoM4ijZvwAAAABJRU5ErkJggg==", eip6963Name: String = "Portal MPC Wallet", eip6963Rdns: String = "io.portalhq", eip6963Uuid: String = "d73d7104-7e24-442b-913b-1147cd8e0325"): PortalWebViewFragment

Creates a new PortalWebViewFragment instance.

Link copied to clipboard

Deletes the locally stored address from the keychain.

Link copied to clipboard
suspend fun deleteKeychain(): Result<Unit>

Deletes the keychain from the storage.

Link copied to clipboard

Deletes the locally stored signing share from the keychain.

Link copied to clipboard
suspend fun doesWalletExist(namespace: PortalNamespace): Boolean

Checks if a wallet exists for the specified PortalNamespace.

suspend fun doesWalletExist(chainId: String? = null): Boolean

Checks if a wallet exists for the specified chain ID.

Link copied to clipboard
suspend fun ejectPrivateKey(clientBackupCiphertext: String? = null, orgBackupShare: String? = null, backupMethod: BackupMethods, backupConfigs: BackupConfigs? = null): String

Ejects the private key from the MPC (Multi-Party Computation) system.

suspend fun ejectPrivateKey(clientBackupCiphertext: String? = null, orgBackupShare: String? = null, orgSolanaBackupShare: String? = null, backupMethod: BackupMethods, backupConfigs: BackupConfigs? = null): Map<PortalNamespace, String>

Ejects the private keys managed by the MPC (Multi-Party Computation) system.

Link copied to clipboard
fun emit(event: PortalEvents, data: Any)

Emits an event with the specified data to the underlying event provider.

Link copied to clipboard
suspend fun ethEstimateGas(chainId: String, transaction: EthTransactionParam): Any

Estimates the amount of gas required to execute a transaction.

Link copied to clipboard
suspend fun ethGasPrice(chainId: String): Any

Retrieves the current gas price for the specified Ethereum-compatible chain.

Link copied to clipboard
suspend fun ethGetBalance(chainId: String): Any

Retrieves the Ether balance of the configured address for a given chain.

Link copied to clipboard
suspend fun ethSendTransaction(chainId: String, transaction: EthTransactionParam): Any

Sends a signed Ethereum transaction to the blockchain.

Link copied to clipboard
suspend fun ethSign(chainId: String, message: String): Any

Initiates an Ethereum signature request.

Link copied to clipboard
suspend fun ethSignTransaction(chainId: String, transaction: EthTransactionParam): Any

Initiates an Ethereum transaction signature request.

Link copied to clipboard
suspend fun ethSignTypedData(chainId: String, data: String): Any

Initiates an Ethereum typed data signature request.

Link copied to clipboard
suspend fun generateSolanaAndBackup(backupMethod: BackupMethods = BackupMethods.Gdrive, backupConfigs: BackupConfigs? = null, progress: (status: MpcStatus) -> Unit = {}): Result<BackupWalletResponse>

Generates a Solana wallet and then backs it up using the specified method.

Link copied to clipboard

Generates a Solana wallet.

Link copied to clipboard
suspend fun getAddress(chain: PortalNamespace): String?

Gets the address associated with the specified PortalNamespace.

suspend fun getAddress(chainId: String): String?

Gets the address associated with the specified chain ID.

Link copied to clipboard

Retrieves the cloud storage adapter associated with the specified backup method.

Link copied to clipboard
suspend fun isWalletBackedUp(namespace: PortalNamespace): Boolean

Checks if the wallet associated with the given namespace is backed up.

suspend fun isWalletBackedUp(chainId: String? = null): Boolean

Checks if the wallet is backed up for a specific chain or globally.

Link copied to clipboard
suspend fun isWalletOnDevice(namespace: PortalNamespace): Boolean

Checks if a wallet exists on the device for the specified PortalNamespace.

suspend fun isWalletOnDevice(chainId: String? = null): Boolean

Checks if a wallet exists on the device for the specified chain ID.

Link copied to clipboard

Checks if a wallet is recoverable for the specified PortalNamespace.

suspend fun isWalletRecoverable(chainId: String? = null): Boolean

Checks if the wallet is recoverable for a given chain ID.

Link copied to clipboard

Checks if the WebSocket connection is allowed.

Link copied to clipboard
fun on(event: PortalEvents, handler: (data: Any) -> Unit)

Sets a listener for a specific event.

Link copied to clipboard
fun once(event: PortalEvents, handler: (data: Any) -> Unit)

Sets a one-time listener for a specific event.

Link copied to clipboard
suspend fun personalSign(chainId: String, message: String): Any

Initiates a personal signature request.

Link copied to clipboard
suspend fun provisionWallet(cipherText: String? = null, backupMethod: BackupMethods, backupConfigs: BackupConfigs? = null, progress: (status: MpcStatus) -> Unit = {}): String

Recovers an existing one based on provided parameters.

Link copied to clipboard
suspend fun recoverWallet(cipherText: String? = null, backupMethod: BackupMethods, backupConfigs: BackupConfigs? = null, progress: (status: MpcStatus) -> Unit = {}): String

Recovers a wallet using the specified backup method.

Link copied to clipboard
suspend fun request(chainId: String, method: PortalRequestMethod, params: List<Any>): PortalProviderResult

Sends a request to the provider.

Link copied to clipboard

Retrieves the address associated with the given blockchain chain.

Link copied to clipboard
suspend fun sendSol(chainId: String, lamports: Long, to: String): String

Sends SOL to a specified address.

Link copied to clipboard
fun updateChain(newChainId: String)

Updates the currently active chain ID used by the provider.