How Bindings Work
These language bindings are client libraries that your application imports and calls. They send requests to a local daemon, a separately running background service called antd, which handles the network connection, encryption, and configured payments.
Package availability
The Python, JavaScript, TypeScript, C#, Ruby, PHP, and Dart clients install from their language package registries, and the Go client installs as a public Go module. The Rust, Java, Kotlin, Swift, C++, and Zig clients build from source. The published packages are the 0.2.0 clients for antd 0.14.0, and the Go module version is v0.14.0. Follow the guide for your language: package versions and supported operations can differ.
How it connects
REST clients connect to http://localhost:8082 by default. gRPC clients connect to localhost:50051. You can override these addresses when you create a client.
Common operations
Each implementation includes operations for these tasks:
Check connectivity
health
Store public data
dataPutPublic or data_put_public
Retrieve public data
dataGetPublic or data_get_public
Store private data
dataPut or data_put
Retrieve private data
dataGet or data_get
Upload and download public files
filePutPublic / fileGetPublic, or snake_case equivalents
Estimate storage cost
dataCost, fileCost, or language-specific equivalents
Read the wallet balance
walletBalance or wallet_balance
Names follow each language's conventions, so exact capitalization varies by binding.
Error handling
The bindings map service failures to language-specific error types:
400
Invalid request parameters
402
Payment required or insufficient funds
404
Data, DataMap, prepared upload, or in-memory chunk not found
409
Data already exists or version conflict
413
Upload too large
500
Internal service error
502
Network communication failure, or a partial upload with code PARTIAL_UPLOAD
503
Service unavailable, such as an unconfigured wallet
A malformed address is an invalid request and returns status 400. A valid address with no stored DataMap returns status 404 over REST or NOT_FOUND over gRPC, and the bindings raise their not-found error type. A lookup also reports not found when antd has no connected peers, so check connectivity with health before treating data as absent. REST error bodies carry a machine-readable code alongside the error message; prefer code where it differs from the status, because a partial upload and a network failure both arrive as 502.
The 0.2.0 packages and the Go module v0.14.0 raise a typed partial-upload error, such as PartialUploadError in Python and JavaScript or PartialUploadException in C#, that carries the chunk counts and whether the same finalize call can be repeated.
Related pages
Native SDKs for SDKs that do not need a local daemon
Last updated