PortalMobileMpcEnclave

PortalMobileMpcEnclave is an implementation of PortalMobileMpc that handles signing requests using a remote MPC (Multi-Party Computation) enclave which runs the MPC code in a secure AWS Nitro Enclave with the same non-custodial guarantees as client-side MPC. It communicates

To use this, you need to enable it in io.portalhq.android.mpc.data.FeatureFlags

Parameters

hostUrl

The base URL of the MPC enclave. If it starts with "10.0.2.2", it's treated as a development environment and uses HTTP, otherwise HTTPS is used.

See also

Constructors

Link copied to clipboard
constructor(hostUrl: String)

Properties

Link copied to clipboard

The full URL to the signing endpoint on the enclave.

Functions

Link copied to clipboard
open fun backup(clientApiKey: String?, host: String?, dkgData: String?, apiAddress: String?, metadata: String?): String
Link copied to clipboard
open fun backupEd25519(clientApiKey: String?, mpcHost: String?, signingShare: String?, apiHost: String?, metadata: String?): String
Link copied to clipboard
open fun backupSecp256k1(clientApiKey: String?, mpcHost: String?, signingShare: String?, apiHost: String?, metadata: String?): String
Link copied to clipboard
open fun decrypt(privateKey: String, cipherText: String): DecryptResult
Link copied to clipboard
open fun decryptWithPassword(password: String, cipherText: String): DecryptResult
Link copied to clipboard
open fun eject(clientShare: String, orgShare: String): String
Link copied to clipboard
open fun ejectEd25519(clientShare: String, orgShare: String): String
Link copied to clipboard
open fun encrypt(value: String): EncryptedResult
Link copied to clipboard
open fun encryptWithPassword(value: String, password: String): EncryptedResult
Link copied to clipboard
open fun formatShares(sharesJSON: String): String
Link copied to clipboard
open fun generate(clientApiKey: String?, address: String?, apiAddress: String?, metadata: String?): String

Legacy functions

Link copied to clipboard
open fun generateEd25519(clientApiKey: String?, mpcHost: String?, apiHost: String?, metadata: String?): String
Link copied to clipboard
open fun generateSecp256k1(clientApiKey: String?, mpcHost: String?, apiHost: String?, metadata: String?): String
Link copied to clipboard
open fun getClient(url: String, apiKey: String): String
Link copied to clipboard
open fun getCustodianIdClientIdHashes(custodianIdClientIdJSON: String): String
Link copied to clipboard
open fun getVersion(): String
Link copied to clipboard
open fun isWebSocketAllowed(mpcHost: String): String
Link copied to clipboard
open fun recoverBackup(clientApiKey: String?, address: String?, dkgData: String?, apiAddress: String?, metadata: String?): String
Link copied to clipboard
open fun recoverEd25519(clientApiKey: String?, mpcHost: String?, backupShare: String?, apiHost: String?, metadata: String?): String
Link copied to clipboard
open fun recoverSecp256k1(clientApiKey: String?, mpcHost: String?, backupShare: String?, apiHost: String?, metadata: String?): String
Link copied to clipboard
open fun recoverSigning(clientApiKey: String?, address: String?, dkgData: String?, apiAddress: String?, metadata: String?): String
Link copied to clipboard
open suspend override fun sign(clientApiKey: String?, mpcHost: String?, dkgData: String?, method: String?, params: String?, rpcUrl: String?, chainId: String?, metadata: String?): String

Signs a transaction or message using the MPC enclave.