|
Aranya
a software development tool for governing access to data and services over a decentralized, zero-trust framework with secure end-to-end encrypted data exchange built-in.
|
The Aranya C API allows a C application to interface directly with the Aranya client using a library and header file.
Before attempting to use this API, verify that you are using a matching version of the C library, Aranya client header file, Rust example application, getting started documentation, and API documentation.
aranya_create_team() - Create an Aranya teamaranya_add_team() - Add an Aranya team to a devicearanya_add_device_to_team() - Add a device to the Aranya teamaranya_add_sync_peer() - Add peer to sync witharanya_create_label() - Create a new labelaranya_assign_label() - Assign a label to a devicearanya_afc_create_channel() - Create a send-only AFC channelaranya_afc_accept_channel() - Accept a receive-only AFC channel from a peeraranya_afc_channel_seal() - Seal data with AFC channelaranya_afc_channel_open() - Open data with AFC channelObjects for creating an Aranya client and Aranya team:
AranyaClientAranyaClientConfigAranyaCreateTeamConfigAranyaCreateTeamConfigBuilderAranyaCreateTeamQuicSyncConfigAranyaCreateTeamQuicSyncConfigBuilderAranyaAddTeamConfigAranyaAddTeamConfigBuilderAranyaAddTeamQuicSyncConfigAranyaAddTeamQuicSyncConfigBuilderAranyaSyncPeerConfigAranyaSyncPeerConfigBuilderAFC related types:
Functions suffixed with _ext accept an extra struct AranyaExtError *ext_err parameter for extended error information.
ext_err must be a valid, non-NULL pointer.ARANYA_ERROR_SUCCESS, *ext_err is populated with additional error details.ext_err is unchanged.To extract a human-readable message: AranyaError aranya_ext_error_msg(
const struct AranyaExtError *err,
char *msg,
size_t *msg_len
);
Example: struct AranyaExtError ext_err; AranyaError rc = aranya_get_device_id_ext(client, &id, &ext_err); if (rc != ARANYA_ERROR_SUCCESS) { size_t len = 0; aranya_ext_error_msg(&ext_err, NULL, &len); char *buf = malloc(len); aranya_ext_error_msg(&ext_err, buf, &len); // `buf` now holds the detailed error message }