Documentation Index
Fetch the complete documentation index at: https://docs.phala.com/llms.txt
Use this file to discover all available pages before exploring further.
getAppEnvEncryptPubKey
GET /kms/{kms}/pubkey/{app_id}
Retrieves the encryption public key managed by a KMS instance for a specific app. This key is used to encrypt environment variables before sending them to the Phala Cloud API.
For PHALA KMS, the public key is returned directly in the provisionCvm response as app_env_encrypt_pubkey. You only need to call this function explicitly when using on-chain KMS (ETHEREUM/BASE), where the app ID comes from deploying a contract.
Parameters:
| Field | Type | Required | Description |
|---|---|---|---|
kms | string | Yes | KMS ID or slug |
app_id | string | Yes | App ID (40 hex chars, optional 0x prefix) |
GetAppEnvEncryptPubKey
| Field | Type | Description |
|---|---|---|
public_key | string | RSA public key for encrypting env vars |
signature | string | KMS signature over the public key |
safeGetAppEnvEncryptPubKey
Safe variant that returns aSafeResult<GetAppEnvEncryptPubKey> instead of throwing on errors.
