a4a_encrypt_file
Encrypts a file for A4A transfer, writing a local .a4a blob with ChaCha20-Poly1305 and a per-file key kept on this machine, so only this machine can send the blob.
Instructions
Encrypt a file for A4A transfer (step 1 of 3).
Writes a `<path>.a4a` blob beside the file using ChaCha20-Poly1305 and a random
per-file key. The key is stored LOCALLY in ~/.a4a/file-keys.json and is NOT shown
in the response. Only this machine can send the blob because step 3 reads that key.
Next, upload the blob to storage of your choice (https, ipfs, or ar; the SDK does
not upload it). For content-addressed storage, use the returned sha256. Then call
a4a_send_file(to_pubkey, blob_path, url, name, mime).
Args:
path: Source file path.
Returns:
Blob path, sha256, sizes, and the next step.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |