Ruby

The Ruby SDK talks to antd over REST by default and also includes a gRPC client.

Install

gem install antd

Connect to the daemon

require "antd"

client = Antd::Client.new(base_url: "http://localhost:8082")
health = client.health
puts health.network

Store and retrieve data

require "antd"

client = Antd::Client.new
result = client.data_put_public("Hello, Autonomi!")
puts result.address

data = client.data_get_public(result.address)
puts data

Type mappings

Autonomi type
Ruby type

HealthStatus

model object with ok and network

PutResult

model object with cost and address

Raw data

String

Error handling

Full API reference

For all available daemon endpoints, see the REST API.

Last updated