v1

latestOpenAPI 3.0.02026-07-175152156.1 KB
User

Install an application for a user

Installs an app for a user. If the user has never installed the app, mints a PKP and permits the app. If the user previously uninstalled the app, re-enables it.

post/user/{appId}/install-app

Path parameters

appIdnumber required

ID of the target application

Request body

userControllerAddressstring required

EOA address that controls the user smart wallet

sponsorGasboolean

If true (default), returns EIP2771 typed data for sponsored gas relay. If false, returns raw transaction data for direct EOA submission (user pays gas).

Example request

{
  "userControllerAddress": "0x123456789012345678901234567890123456abcd",
  "sponsorGas": true
}

Response

App installation data returned successfully

agentSignerAddressstring required

The PKP address that the app will use to sign things

agentSmartAccountAddressstring required

The smart account address calculated from the PKP address, used on the frontend to verify they get the same smart wallet address

alreadyInstalledboolean

True if the app is already installed for this user. If true, the typed data fields will be undefined.

Example response

{
  "agentSignerAddress": "0x123456789012345678901234567890123456abcd",
  "agentSmartAccountAddress": "0x123456789012345678901234567890123456abcd",
  "appInstallationDataToSign": {
    "target": "0x1234567890123456789012345678901234567890",
    "data": "0x...",
    "user": "0x123456789012345678901234567890123456abcd"
  },
  "agentSmartAccountDeploymentDataToSign": {
    "messageToSign": "0x1234...",
    "userOperation": {
      "sender": "0x123456789012345678901234567890123456abcd",
      "nonce": "0",
      "factory": "0x1234567890123456789012345678901234567890",
      "factoryData": "0x...",
      "callData": "0x...",
      "callGasLimit": "100000",
      "verificationGasLimit": "100000",
      "preVerificationGas": "50000",
      "maxFeePerGas": "1000000000",
      "maxPriorityFeePerGas": "1000000000",
      "paymaster": "0x1234567890123456789012345678901234567890",
      "paymasterVerificationGasLimit": "100000",
      "paymasterPostOpGasLimit": "50000",
      "paymasterData": "0x",
      "signature": "0x"
    }
  }
}