@telaro/agent-registry-bridge
v0.1.0
Published
Publish Telaro bond / slash / score signals to the ERC-8004 Agent Registry on Solana (QuantuLabs 8004-solana). Permissionless writes.
Maintainers
Readme
@telaro/agent-registry-bridge
Publish Telaro bond, slash, and score signals to the Solana
ERC-8004 Agent Registry
via the permissionless give_feedback instruction.
The Agent Registry is the Solana-native publish surface for agent reputation. Telaro runs the only on-chain bond + slash signal on Solana. Bridging the two means every Agent Registry consumer sees Telaro bond standing without integrating Telaro directly.
Install
npm install @telaro/agent-registry-bridge @solana/web3.jsWhat it ships
| Module | Role |
| --- | --- |
| constants.ts | Devnet + mainnet program ids, Atom engine id, tag conventions |
| mapping.ts | bondAttestation / slashAttestation / scoreAttestation: pure functions from a Telaro signal to a FeedbackArgs |
| instruction.ts | buildGiveFeedbackIx: encodes a FeedbackArgs into a TransactionInstruction against the Agent Registry program |
Two layers so callers can dry-run mapping logic without ever touching Solana, and only opt into the on-chain side when they're ready.
10-second look
import {
AGENT_REGISTRY_DEVNET,
bondAttestation,
buildGiveFeedbackIx,
} from "@telaro/agent-registry-bridge";
import { Connection, Transaction } from "@solana/web3.js";
const args = bondAttestation({
currentBondAtomic: 1_500_000_000n, // 1500 USDC
telaroScore: 720,
});
// args.value = 1_500_000_000n
// args.score = 72 (Telaro 720 / 10)
// args.tag1 = "telaro", args.tag2 = "bond"
const ix = buildGiveFeedbackIx(
AGENT_REGISTRY_DEVNET,
{
client: writerKey.publicKey, // the indexer's key
agentAccount: agentPdaInRegistry, // Agent Registry PDA for the agent
asset: agentAssetMplCore, // backing Metaplex Core asset
collection: agentCollectionMplCore,
},
args,
);
// Assemble + sign + send via your own Connection. The bridge does not.
const tx = new Transaction().add(ix);What goes into each attestation
| Telaro event | value (i128, 6dp) | score (0..100) | tag2 |
| --- | --- | --- | --- |
| Bond standing update | +current_bond_atomic | floor(telaro_score / 10) | bond |
| Claim resolved against agent (slash) | -slashed_atomic | (omitted) | slash |
| Score-only update | 0 | floor(telaro_score / 10) | score |
tag1 is always telaro, so any reader filtering by writer can
pick our attestations out of a mixed feed.
value is signed (i128) so a downstream that sums all the values
gets a net "lifetime bond posted minus lifetime slash" number for
the agent. The Telaro 0..1000 score is compressed by score / 10
into the Agent Registry's 0..100 byte; the full-precision score is
still on the Telaro chain.
What this package is not
- It is not a long-running worker. There is no event loop here. Callers wire this into their own indexer or trigger from an event bus.
- It is not an SDK for the rest of the Agent Registry. Only the
give_feedbackwrite path is encoded.revoke_feedbackandappend_responseare reserved for later versions. - It does not derive the agent's PDA in the Agent Registry. The
caller passes
agentAccountdirectly. The PDA seeds are defined by the registry program; the bridge intentionally stays out of cross-program PDA assumptions until that derivation is part of an official SDK.
License
MIT.
