antd_client 0.2.0
antd_client: ^0.2.0 copied to clipboard
Dart client for the antd daemon - REST and gRPC access to the Autonomi decentralized storage network (public and private data, chunks, files, external-signer uploads).
Changelog #
0.2.0 #
PartialUploadError(aNetworkErrorsubclass) for a finalize that stored some chunks but not all: carrieschunksStored/chunksFailed/totalChunks,retryableandretentionKnown. REST maps the daemon's 502code: "PARTIAL_UPLOAD"body (retentionKnownonly when the body'sretryableis a JSON boolean; daemons before 0.14.0 never send it). gRPC maps statusABORTEDwhose message starts withPartial upload:, parsing the counts from the message (retentionKnownonly when all three counts parse and the message ends with one of the daemon's two retention hints:(paid attempt retained...)setsretryable,(stored chunks persist; re-prepare the same content...)means nothing was retained; readable counts with a missing, truncated or unrecognised hint keep the counts but read as retention unknown; any otherABORTEDstays a plainAntdError).retryable: call the same finalize with the sameupload_idto store the remainder against the same payment.retentionKnown && !retryable: nothing was retained, so re-prepare.!retentionKnown: retention is unknown, so keep theupload_idand payment artefacts and reconcile before re-preparing or paying again.example/finalize_with_retry.dart(used by07_external_signer.dart):finalizeWithRetry, a bounded retry loop aroundfinalizeUploadthat resumes only whenretryable, stops at once when retention is unknown, stops whenchunksFailedstops shrinking, and rethrows thePartialUploadErrorunchanged whenever it gives up.
0.1.0 #
Initial release on pub.dev as antd_client.
- REST client (
AntdClient) and gRPC client (GrpcAntdClient) for the antd daemon. - Public and private data put/get, raw chunk put/get, file upload/download.
- Cost estimation with payment-mode selection (
auto,merkle,single). - External-signer flow: prepare upload, pay with your own wallet, finalize.
- Typed error hierarchy (
AntdErrorsubclasses) shared by both transports. - Tested against antd 0.13.x.