# antd v0.4.1 - API Reference

## Modules

- [Antd](Antd.md): Elixir SDK for the antd daemon — the gateway to the Autonomi decentralized network.
- [Antd.BuiltManifest](Antd.BuiltManifest.md): The result of `build_manifest`.
- [Antd.CandidateNodeEntry](Antd.CandidateNodeEntry.md): A candidate node within a merkle payment pool.
- [Antd.Client](Antd.Client.md): REST client for the antd daemon.
- [Antd.DataPutPublicResult](Antd.DataPutPublicResult.md): Result of a public data put.
- [Antd.DataPutResult](Antd.DataPutResult.md): Result of a private data put.
- [Antd.DecodedManifest](Antd.DecodedManifest.md): The result of `decode_manifest` and `decode_manifest_link`.
- [Antd.Discover](Antd.Discover.md): Auto-discovers the antd daemon by reading the `daemon.port` file that antd
writes on startup.
- [Antd.DownloadFrame](Antd.DownloadFrame.md): One frame of a progress-enabled streaming download: the total size, a
plaintext data chunk, or a `Antd.DownloadProgress` update. At most one of
`:meta`, `:data`, or `:progress` is set. Yielded by the `*_with_progress`
streaming methods; the plain `data_stream` methods stay a pure binary stream
for callers that don't need progress.
- [Antd.DownloadProgress](Antd.DownloadProgress.md): A fetch-progress update emitted during a streaming download when progress is
requested. Counts are in *chunks*, not bytes — the byte denominator is the
download's total size (the `x-content-length` header over gRPC, the leading
NDJSON `meta` frame over REST). `total` is 0 while still unknown (mid
DataMap-resolution).
- [Antd.FilePutPublicResult](Antd.FilePutPublicResult.md): Result of a public file upload.
- [Antd.FilePutResult](Antd.FilePutResult.md): Result of a private file upload.
- [Antd.FinalizeUploadResult](Antd.FinalizeUploadResult.md): Result of finalizing an externally-signed upload.
- [Antd.GrpcClient](Antd.GrpcClient.md): gRPC client for the antd daemon.
- [Antd.HealthStatus](Antd.HealthStatus.md): Result of a health check.
- [Antd.ManifestEntryInfo](Antd.ManifestEntryInfo.md): What a manifest says about one entry.
- [Antd.ManifestEntryInput](Antd.ManifestEntryInput.md): One file for `Antd.Client.build_manifest/3` and
`Antd.GrpcClient.build_manifest/3`.
- [Antd.PaymentInfo](Antd.PaymentInfo.md): A single payment required for an upload.
- [Antd.PaymentMode](Antd.PaymentMode.md): Payment-batching strategy for uploads.
- [Antd.PointerController](Antd.PointerController.md): Whose pointer decides what an address resolves to, after following every
transfer (`pointer_controller`). `transfers` lists every pointer the
address was handed over to, in order. `frozen` is `true` when `pointer` is
final without being handed over: nobody can move it.

- [Antd.PointerFinalState](Antd.PointerFinalState.md): One final state, as a finality check reports it. `holders` is how many
peers of the close group hold it; `transferred_to` is the pointer the state
hands over to, or `nil`.

- [Antd.PointerFinality](Antd.PointerFinality.md): The whole close group's view of where a pointer stands
(`pointer_finality`). Check it before relying on a transfer: only
`status: :final` means it is beyond dispute.
- [Antd.PointerFinalizeResult](Antd.PointerFinalizeResult.md): The state a `pointer_finalize` stored. `finality` is set for a transfer.

- [Antd.PointerKind](Antd.PointerKind.md): What a pointer write points at: the `:kind` option of `pointer_create`,
`pointer_update` and a `pointer_prepare` create or update.
- [Antd.PointerOp](Antd.PointerOp.md): The write a `pointer_prepare` signs and quotes for an external signer
- [Antd.PointerPrepareResult](Antd.PointerPrepareResult.md): A pointer write signed with the daemon's loaded owner key, and the
wave-batch payment for it (`pointer_prepare`). Pay `payments` with
`payForQuotes()`, then call `pointer_finalize` with `upload_id`.
- [Antd.PointerRecord](Antd.PointerRecord.md): A pointer's current state, as the network serves it (`pointer_get`).
- [Antd.PointerTarget](Antd.PointerTarget.md): Where a chain of pointers ends (`pointer_resolve`): the `target` address,
its `kind` string and the raw `kind_tag`.

- [Antd.PointerTransferResult](Antd.PointerTransferResult.md): What a transfer stored, and where the close group says it stands
(`pointer_transfer`). `finality` is `nil` when that check failed, and
`finality_error` says why; the transfer itself is stored and final either
way. Ask again with `pointer_finality`.

- [Antd.PointerWriteResult](Antd.PointerWriteResult.md): The state a pointer write stored (`pointer_create` / `pointer_update`).
`state_id` is the hex identifier the state was paid against; `counter` is
its counter, an integer parsed from the daemon's decimal string.

- [Antd.PoolCommitmentEntry](Antd.PoolCommitmentEntry.md): A pool commitment containing candidate nodes for merkle batch payment.
- [Antd.PrepareChunkResult](Antd.PrepareChunkResult.md): Result of preparing a single-chunk external-signer publish via
`POST /v1/chunks/prepare`.
- [Antd.PrepareUploadResult](Antd.PrepareUploadResult.md): Result of preparing an upload for external signing.
- [Antd.PutResult](Antd.PutResult.md): Result of a single-chunk put (used by `Antd.Client.chunk_put/2`).
- [Antd.SignedQuoteEntry](Antd.SignedQuoteEntry.md): One `payments` quote in full signed form, returned by a prepare called with
`include_signed_quotes: true`. `quote` and `commitment_sidecar` are opaque
base64 blobs (the msgpack-serialized signed `PaymentQuote`, and the
`StorageCommitment` it pins); only antd parses them. `commitment_sidecar`
is `nil` for baseline quotes. Over gRPC the raw bytes are base64-encoded,
so both transports give the same values.

- [Antd.UploadCostEstimate](Antd.UploadCostEstimate.md): Pre-upload cost breakdown returned by `Antd.Client.data_cost/3` and
`Antd.Client.file_cost/4`.
- [Antd.WalletAddress](Antd.WalletAddress.md): Wallet address result.
- [Antd.WalletBalance](Antd.WalletBalance.md): Wallet balance result.

- Exceptions
  - [Antd.AlreadyExistsError](Antd.AlreadyExistsError.md): Resource already exists (HTTP 409).
  - [Antd.AntdError](Antd.AntdError.md): Base error for all antd errors.
  - [Antd.BadRequestError](Antd.BadRequestError.md): Invalid request parameters (HTTP 400).
  - [Antd.CloseGroupShortfallError](Antd.CloseGroupShortfallError.md): Too few of an address's close group answered, or took a write, for the
result to be the network's (HTTP 503 with `code: "CLOSE_GROUP_SHORTFALL"`;
gRPC `UNAVAILABLE` tagged `x-antd-error-code: CLOSE_GROUP_SHORTFALL`).
  - [Antd.ConflictError](Antd.ConflictError.md): The request conflicts with the resource's current state (HTTP 409 with
`code: "CONFLICT"`; gRPC `ABORTED` tagged `x-antd-error-code: CONFLICT`).
  - [Antd.ForkError](Antd.ForkError.md): Version conflict or fork detected (HTTP 409).
  - [Antd.InternalError](Antd.InternalError.md): Internal server error (HTTP 500).
  - [Antd.NetworkError](Antd.NetworkError.md): Daemon cannot reach the network (HTTP 502).
  - [Antd.NotFoundError](Antd.NotFoundError.md): Resource not found on the network (HTTP 404).
  - [Antd.PartialUploadError](Antd.PartialUploadError.md): An upload stored some chunks while others stayed unstored after the
daemon's retries (HTTP 502 with `code: "PARTIAL_UPLOAD"`; gRPC `ABORTED`
whose message starts with `Partial upload:`). The external-signer finalize
functions return it, and so can daemon-wallet uploads (`data_put`,
`file_put` and their `_public` variants): every REST and gRPC call shares
one error mapping.
  - [Antd.PaymentError](Antd.PaymentError.md): Insufficient funds or payment failure (HTTP 402).
  - [Antd.PointerFinalError](Antd.PointerFinalError.md): The pointer is at its final state: it was handed over (transferred) or
frozen, so nothing can update it or hand it over again (HTTP 409 with
`code: "POINTER_FINAL"`; gRPC `FAILED_PRECONDITION` tagged
`x-antd-error-code: POINTER_FINAL`). Usually refused before anything is
paid: the daemon reads the pointer first. A write that was already paid for
when the network refused it (the pointer became final while the write was in
flight) keeps that payment, so read the pointer before paying again.

  - [Antd.ServiceUnavailableError](Antd.ServiceUnavailableError.md): Service unavailable, e.g. wallet not configured (HTTP 503).
  - [Antd.TooLargeError](Antd.TooLargeError.md): Payload too large (HTTP 413).

