-
public final class HolochainServiceAppClient
-
-
Constructor Summary
Constructors Constructor Description HolochainServiceAppClient(Activity activity, ComponentName serviceComponentName)
-
Method Summary
Modifier and Type Method Description final Unitconnect(String installedAppId)Connects to the Holochain service using the App API for a specific app. final AppAuthFfisetupApp(InstallAppPayloadFfi installAppPayload, Boolean enableAfterInstall)Complete process to setup a Holochain app. final AppAuthFficonnectSetupApp(InstallAppPayloadFfi installAppPayload, Boolean enableAfterInstall)Connects to service, waits for connection to be ready, and sets up an app. final AppInfoFfienableApp(String installedAppId)Enables an installed Holochain app. final ZomeCallFfisignZomeCall(ZomeCallUnsignedFfi args)Signs a zome call with the agent's private key. -
-
Constructor Detail
-
HolochainServiceAppClient
HolochainServiceAppClient(Activity activity, ComponentName serviceComponentName)
-
-
Method Detail
-
connect
final Unit connect(String installedAppId)
Connects to the Holochain service using the App API for a specific app.
- Parameters:
installedAppId- The ID of the app to connect to
-
setupApp
final AppAuthFfi setupApp(InstallAppPayloadFfi installAppPayload, Boolean enableAfterInstall)
Complete process to setup a Holochain app.
This method will:
Check if the app is installed
If not installed, install it
Optionally enable it
Ensure there is an app websocket available for it
If an app is already installed, it will not be enabled automatically. It is only enabled after a successful install. The reasoning is that if an app is disabled after initial installation,
- Parameters:
installAppPayload- The payload containing app installation dataenableAfterInstall- Whether to enable the app after installation
-
connectSetupApp
final AppAuthFfi connectSetupApp(InstallAppPayloadFfi installAppPayload, Boolean enableAfterInstall)
Connects to service, waits for connection to be ready, and sets up an app.
Convenience method that combines connect(), waitForConnectReady(), and setupApp() into a single call.
- Parameters:
installAppPayload- The payload containing app installation dataenableAfterInstall- Whether to enable the app after installation
-
enableApp
final AppInfoFfi enableApp(String installedAppId)
Enables an installed Holochain app.
- Parameters:
installedAppId- The ID of the app to enable
-
signZomeCall
final ZomeCallFfi signZomeCall(ZomeCallUnsignedFfi args)
Signs a zome call with the agent's private key.
This is required for making authenticated calls to Holochain zome functions.
- Parameters:
args- The unsigned zome call to sign
-
-
-
-