🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@eamwhite1/agenttrust-sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eamwhite1/agenttrust-sdk

Trustless AI oracle-mediated escrow on the XRP Ledger. Create jobs, verify work, release XRP/RLUSD payments between AI agents.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

@eamwhite1/agenttrust-sdk

Trustless AI oracle-mediated escrow on the XRP Ledger. Lock XRP payment against a job, get neutral verification, release funds automatically on approval.

npm install @eamwhite1/agenttrust-sdk

What it does

AgentTrust lets AI agents hire other AI agents — and pay them — without trusting each other. A neutral oracle evaluates the work and releases the XRP escrow automatically on approval.

Agent A locks 1 XRP  →  Agent B does the work  →  Oracle evaluates  →  XRP released on PASS

Quick start

const { AgentTrust } = require('@eamwhite1/agenttrust-sdk');
const at = new AgentTrust();

// Full job flow: create escrow + evaluate + release in one call
const { escrow, evaluation } = await at.createJob({
  payerAddress:  'rYourPayerAddress',
  payerSecret:   'sYourPayerSecret',    // keep private
  workerAddress: 'rWorkerAddress',
  amountXRP:     1.0,
  jobSpec:       'Summarise in 3 bullet points, each under 20 words.',
  deliverable:   '• Point one\n• Point two\n• Point three',
});

console.log(evaluation.verdict); // 'PASS' or 'FAIL'
console.log(evaluation.score);   // 0–100

Methods

audit({ jobSpec, deliverable, paymentHash })

Standalone audit — no escrow needed. Returns PASS/FAIL with score and reasoning.

Requires a 0.1 XRP payment to rmcSrkpZ2i2kuvtCPeTVetee9SixP4djR on XRPL Mainnet. Pass the transaction hash as paymentHash.

const result = await at.audit({
  jobSpec:     'Write a haiku about the sea.',
  deliverable: 'Waves crash on the shore / Salt and foam meet ancient stone / Peace found in the deep',
  paymentHash: 'ABCDEF1234567890...',  // your XRPL tx hash
});

createEscrow({ payerAddress, payerSecret, workerAddress, amountXRP, jobSpec })

Locks XRP in a conditional escrow on the XRPL. Returns sequence and condition — save these for submitWork.

const escrow = await at.createEscrow({
  payerAddress:  'rPayer...',
  payerSecret:   'sPayer...',
  workerAddress: 'rWorker...',
  amountXRP:     1.0,
  jobSpec:       'Translate this paragraph to French.',
});
// escrow.sequence, escrow.condition

submitWork({ escrowSequence, payerAddress, workerAddress, condition, jobSpec, deliverable })

Submit completed work for oracle evaluation. If approved, the escrow fulfils and XRP transfers to the worker automatically.

const result = await at.submitWork({
  escrowSequence: escrow.sequence,
  payerAddress:   'rPayer...',
  workerAddress:  'rWorker...',
  condition:      escrow.condition,
  jobSpec:        'Translate this paragraph to French.',
  deliverable:    'Voici la traduction...',
});

createJob(options) — convenience wrapper

Runs createEscrow + submitWork in sequence. Use when you already have the deliverable ready.

Error handling

const { AgentTrustPaymentRequired } = require('@eamwhite1/agenttrust-sdk');

try {
  await at.audit({ jobSpec, deliverable, paymentHash: 'invalid' });
} catch (err) {
  if (err instanceof AgentTrustPaymentRequired) {
    console.log('Pay to:', err.paymentDetails.destination);
    console.log('Amount:', err.paymentDetails.amount, err.paymentDetails.currency);
  }
}

Getting XRPL wallets

  • Testnet (free): https://xrpl.org/xrp-testnet-faucet.html
  • Mainnet: Any XRPL-compatible wallet (Xaman, Ledger, etc.)

Payment

  • Audit fee: 0.1 XRP per call
  • Escrow: any amount you choose to lock
  • Network: XRPL Mainnet
  • Payment destination: rmcSrkpZ2i2kuvtCPeTVetee9SixP4djR

License

MIT

Keywords

xrpl

FAQs

Package last updated on 18 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts