Radiator v0.4.5 - STEEM Ruby API Client: Steem Engine Support
Repository
https://github.com/inertia186/radiator
One of the major advantages to using Radiator is HTTP Persistence. This is the idea that the API client maintains a persistent connection to the server and only recreates the connection as needed or when there's a service interruption.
This means that instead of connecting to the server for each request, it keeps the connection open over the course of the application lifetime. For applications that use Steem Engine, this can be particularly useful.
The normal Steem Engine request/response lifecycle on the public RPC node can take between 1 and 4 seconds, depending on how busy the side-chain is. But using Radiator, I've gotten this down to 200 milliseconds after the first initialization.
To update your applications:
bundle update
Changes in v0.4.5
- Added support to query and stream a Steem Smart Contract backed side-chains like Steem Engine.
Generalized Side-Chain Support
Steem Smart Contract side-chains are now supported by Radiator. The default side-chain is Steem Engine.
This will fetch the latest block from the side-chain ...
rpc = Radiator::SSC::Blockchain.new
rpc.latest_block_info
This will fetch block 1 ...
rpc.block_info(1)
Or a specific transaction ...
rpc.transaction_info('9d288aab2eb66064dc0d4492cb281512386e2293')
You can also do contract queries. This will look up the tokens contract:
rpc = Radiator::SSC::Contracts.new
rpc.contract('tokens')
This will look up a specific record in a contract result ...
rpc.find_one(
contract: "tokens",
table: "balances",
query: {
symbol: "STINGY",
account: "inertia"
}
)
Or get multiple results ...
rpc.find(
contract: "tokens",
table: "balances",
query: {
symbol: "STINGY"
}
)
Side-chain Streaming
Streaming side-chain transactions are also now supported:
# Default side-chain is Steem Engine.
stream = Radiator::SSC::Stream.new
stream.transactions do |tx, trx_id|
puts "[#{trx_id}] #{tx.to_json}"
end
Even whole side-chain blocks:
stream.blocks do |bk, num|
puts "[#{num}] #{bk.to_json}"
end
Resources
Previous Changes
Github
Leave Radiator v0.4.5 - STEEM Ruby API Client: Steem Engine Support to:
Read more #utopian-io posts
Best Posts From inertia Ⓐ³
We have not curated any of inertia's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From inertia Ⓐ³
- The ZPM Null Hypothesis
- Using Hyperion for Agentic Analysis of Hive
- Hyperion Update: The Curation Inbox Lives Again
- Star Trek Voyager: Living Witness
- Star Trek Voyager: Living Witness
- I (Codex) made a thing (again): Let's Hive Together
- Radiator v0.5.1 - Hive Ruby API Client: OpenSSL 3 Signing Rescue
- The Goblin Attractor
- Skill: Morty's Mind Blowers
- Skill: M*A*L*P
- Skill: Unreliable Teleplay Lens
- Multiverse Workforce
- SPS Validator :: Active
- Science Fiction’s Dilemma: Preserving Continuity While Exploring New ‘What If’ Scenarios
- What AI Can Do
- Hive Trust
- How Antimatter Spacecraft Will (Actually) Work
- Unreliable Teleplay
- Buy The Dip
- Against ESG