224 Commits

Author SHA1 Message Date
david
057ff03b92 Update governance ref script UTxOs after redeployment
Previous proposal_spend and proposal_mint reference script UTxOs were
consumed. Redeployed all 5 governance reference scripts to unspendable
script-hash-derived addresses via redeploy_ref_scripts.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 21:23:06 +02:00
david
e4b2697afd Update governance refs to v2-Module-6 redeployment
Module-6 was redeployed with agent-registry v2 baked into
GovernanceConfig (be1a0a2912da180757ed3cd61b56bb8eab0188c19dc3c0e3912d2c01),
producing fresh validator hashes and reference/refs UTxOs. Smoke test
passed end-to-end on Vector testnet (proposal → critique → endorse →
withdraw → adopt all green).

Updated env-fallback defaults:
- GOV_PROPOSAL_SPEND_HASH:    40fe1895… → f815f51a…
- GOV_PROPOSAL_MINT_HASH:     10dff07b… → e8f38052…
- GOV_CRITIQUE_SPEND_HASH:    9e9aaf7e… → ced52074…
- GOV_CRITIQUE_MINT_HASH:     1f5614b7… → 2e252a89…
- GOV_ENDORSEMENT_SPEND_HASH: 1fac8b35… → 5fc44984…
- GOV_PROPOSAL_SPEND_REF:     f0d52877… → 221cdfbd…
- GOV_PROPOSAL_MINT_REF:      3cb52ec8… → c89f2e05…
- GOV_PARAMS_UTXO:            47d17de5… → 2c082e83…
- GOV_ORACLE_UTXO:            3e0685b9… → 7a23dfdf…
- GOV_CROSSREFS_UTXO:         71815087… → 96a4acff…

GOV_TREASURY_ADDRESS unchanged — treasury holder is unparameterized.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 19:17:48 +02:00
david
bda3c30747 Migrate agent-registry from v1 to v2 (audited, Conway-compliant)
Repoint REGISTRY_SCRIPT_CBOR + REGISTRY_POLICY_ID from
5dd5118943d5aa7329696181252a6565a27dbf2c6de92b02a6aae361 (v1) to
be1a0a2912da180757ed3cd61b56bb8eab0188c19dc3c0e3912d2c01 (v2),
deployed to Vector mainnet via TX
3c53fa482245a82f88a39e90191a90cce3b6f09f6e28613bc53d35a0c3ba8587.

v2 enforces indefinite-length CBOR (D8 79 9F ... FF) for the
OutputReference inside the asset-name derivation, matching Aiken's
builtin.serialise_data() on Conway. Lucid's Data.to(new Constr(...))
emits definite-length arrays (D8 79 82 ...), so deriveNftAssetName is
hand-rolled from cborUint + cborBytes primitives. Verified byte-for-byte
against pycardano OutputReference.to_cbor() and agent-sdk-py
plutus_serialise_data across 5 test vectors (see new
test/derive-asset-name.test.ts).

governance.ts: AGENT_REGISTRY_POLICY env-fallback updated to v2.

Datum/redeemer schemas are unchanged between v1 and v2 — no other
tx-building changes required.

Follow-up: agent-sdk-ts at /home/david/code/agent-sdk-ts still ships
v1 constants and the pre-Conway Lucid asset-name derivation; needs the
same migration before consumers can use v2 from that SDK.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 18:49:53 +02:00
david
7a335f21fc fix: clarify proposal TX output to prevent wrong hash usage in critiques/endorsements
Remove the internal Lock TX hash from submit_proposal output and label the
Proposal TX explicitly so agents use the correct hash as proposalTxHash.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 17:57:18 +02:00
david
ebfc9c0ad9 fix: use POSIX ms (not slot) for datum timestamps
Plutus validity_range.lower_bound is POSIX time in ms, not a slot number.
The validator's get_slot trace misleadingly names it 'current_slot' but
it's actually POSIX ms. Activity datum and proposal datum timestamps
must use POSIX ms to match the tx validity range.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 15:48:38 +02:00
david
dfb48fb311 fix: compute validFrom POSIX directly (drop slotToUnixTime import)
Simple arithmetic: genesis_ms + slot * 1000. No import dependency issues.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 15:42:25 +02:00
david
095eaf8614 fix: inline Vector slot config (SLOT_CONFIG_NETWORK not available at runtime)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 15:40:38 +02:00
david
2d07d25e2c fix: use Lucid slotToUnixTime for guaranteed slot roundtrip
Use Lucid's own conversion function to ensure the POSIX→slot→POSIX
roundtrip produces the exact same slot in the tx validity range
as the spendSlot used in the activity datum.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 15:39:11 +02:00
david
356542211b fix: derive validFrom from chain tip slot for exact slot matching
Validator requires activity.last_proposal_slot == tx_validity_lower_bound.
Derive POSIX time from the same slot used in the datum to guarantee
they convert to the same slot after Lucid's POSIX→slot roundtrip.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 15:36:36 +02:00
david
422d336257 fix: use slot number (not POSIX ms) for activity datum last_proposal_slot
The on-chain validator checks slot_mismatch against the tx validity range.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 15:32:45 +02:00
david
a1b06ecf3f fix: update proposal_spend_ref after isolated redeployment
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 15:29:37 +02:00
david
db21b56e99 feat: redeploy governance contracts with correct agent registry hash
Full redeployment with AGENT_REGISTRY_HASH=5dd51189... (matching the
MCP agent-network registry). All validator hashes, reference scripts,
and infrastructure UTxO refs updated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 15:26:20 +02:00
david
52420c3cad fix: lookup registry NFT at script address, not wallet
The registry NFT is locked at the registry script address with
the 10 AP3X deposit, not in the agent's wallet. Use getUtxoByUnit
to find it on-chain regardless of address.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 14:34:00 +02:00
david
0bf2d5230c fix: include agent registry NFT as reference input for DID validation
The on-chain proposal_spend validator checks did_valid by looking for
the agent's registry NFT in reference inputs. Added lookup + .readFrom()
for the NFT UTxO in Step 2 of proposal submission.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 14:30:54 +02:00
david
2f84a416e1 fix: configure Vector testnet slot config for Lucid
SLOT_CONFIG_NETWORK.Mainnet was using Cardano mainnet genesis (2020),
causing POSIX→slot conversion to produce slots far beyond the Vector
testnet's era boundaries. Set to Vector testnet genesis 2025-07-09.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 13:44:41 +02:00
david
fa137a75c1 fix: use POSIX time (ms) for validity range, not slot numbers
Lucid-Evolution .validFrom/.validTo expect POSIX time in milliseconds.
The code was passing raw slot numbers, which Lucid tried to convert
back causing unsigned integer wraparound and PastHorizon errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 13:40:42 +02:00
david
a0f5dc25f8 fix: implement getNetworkTip() in OgmiosProvider
Missing method caused slot=0, then spendSlot=-60, which wraps to
a huge unsigned int triggering PastHorizon errors from Ogmios.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 13:37:47 +02:00
david
c14752ad75 fix: parse Ogmios v6 script reference format (language+cbor)
Ogmios v6+ returns script references as { language: "plutus:v3", cbor: "..." }
but the parser only handled the legacy { "plutus:v3": "..." } format.
This caused scriptRef to always be null, breaking reference script
resolution for governance proposal submission.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 13:33:48 +02:00
david
5adebf19f4 fix: update proposal_spend_ref to verified on-chain UTxO
Previous batch deployment consumed the spend ref as a coin input.
Redeployed in isolation and verified on-chain at index #0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 13:26:33 +02:00
david
062c5ebfc6 fix: update proposal_spend reference script UTxO + add validation
The proposal_spend reference script UTxO was accidentally consumed,
causing MISSING_SCRIPT errors on proposal submission. Updated to the
redeployed UTxO ref and added validation that detects consumed/missing
reference scripts with actionable error messages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 13:21:12 +02:00
david
07251b7f01 Disable local UPLC eval on governance lock transactions
Fixes transaction build failures by passing localUPLCEval: false
to all three governance lock operations (proposal, critique, endorsement).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 12:41:08 +02:00
david
4344b78784 Upgrade governance submit_proposal to validated 2-step flow (mint+spend)
Replace the lock-only proposal submission with the full validated flow:
- Step 1: Lock ProposalDatum at proposal_spend address
- Step 2: Spend locked UTxO + mint prop_ token + mint pact_ activity token
  using CIP-33 reference scripts and governance reference inputs

This makes proposals visible on the Foundation dashboard (which filters
out tokenless proposals). The flow mirrors the Python SDK's
validated_submit_proposal.

Adds:
- Reference script UTxO env vars (CIP-33) with deployment.json defaults
- Infrastructure UTxO env vars (GovernanceParams, Oracle, CrossRefs)
- parseUtxoRef() and waitForTx() helpers
- Activity datum creation (first-time proposer, count=1)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 12:20:28 +02:00
david
8ceb92aec8 Add Filebase IPFS upload to governance tools, fix stale script hashes
- Add @aws-sdk/client-s3 dependency for Filebase S3-compatible IPFS uploads
- Add uploadToFilebase() helper: uploads JSON, computes blake2b_256 hash,
  returns CID from Filebase IPFS bucket
- vector_governance_submit_proposal: add optional proposalDocument param
  for automatic IPFS upload + hash computation (proposalHash/storageUri
  become optional when document is provided)
- vector_governance_critique: add optional critiqueDocument param, same flow
- Fix stale default script hashes to match v6 deployment
- Fix address derivation: replace broken validatorToAddress(CBOR) with
  credentialToAddress(hash) — eliminates need for GOV_*_CBOR env vars
- Fix getAddressDetails: import from Lucid instead of globalThis
- Backward compatible: manual proposalHash + storageUri still works

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 10:53:04 +02:00
david
178a6a4154 Added governance tools 2026-04-08 11:48:06 +02:00
david
8ff02f244e Fix BigInt crash in protocol parameter parsing, add docker-compose
Protocol parameter fields (minFeeA, minFeeB, maxTxSize, maxValSize)
lacked fallback defaults, causing "Cannot convert undefined to a BigInt"
when Lucid-Evolution processed them. Added safe defaults sourced from
Vector public testnet and updated deposit values to match. Made
lovelaceToAda() defensive against undefined/null. Added diagnostic
logging to getWalletInfo and getProtocolParameters error paths.

Converted Dockerfile to multi-stage build and added docker-compose.yml
with inline Vector testnet environment config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 13:26:49 +02:00
david
96a2d12005 Update package.json to reflect repo naming 2026-03-20 10:32:48 +01:00
david
500e7cf729 Added mainnet deploy gh workflow 2026-03-19 16:30:58 +01:00
david
0b3ac4ae82 Migrate to @lucid-evolution/lucid, fix agent registration (blake2b dkLen), contract spend (PlutusV2), and add Ogmios fallback for agent resolution 2026-03-19 15:57:51 +01:00
david
daf2f9aa62 Fix error display 2026-03-19 11:05:14 +01:00
david
23bcf7ec11 Added readme 2026-03-19 02:27:16 +01:00
david
e7626763e8 change messaging 2026-03-19 02:23:35 +01:00
david
e5d56460a0 reduce wait time 30 > 10s 2026-03-19 02:21:48 +01:00
david
23ead76aba Add agent lifecycle tools (update, deregister, transfer), harden registry, and add integration tests 2026-03-19 02:17:25 +01:00
david
74a2e13432 fix bug 2026-03-19 01:10:05 +01:00
david
94e42c2223 fix typo 2026-03-19 00:38:20 +01:00
david
fdbc226bae speed up build 2026-03-19 00:37:23 +01:00
david
ed510247ee added package-lock.json 2026-03-19 00:26:55 +01:00
david
8f11ee991e fix deploy workflow 2026-03-18 23:59:33 +01:00
david
e1528d575e Add SSE transport, Docker CI/CD pipeline, and make mnemonic a per-call parameter 2026-03-18 23:56:24 +01:00
david
2ae246dd40 Add on-chain agent registry tools and rate limiter 2026-03-18 23:26:34 +01:00
david
c2200d7674 fix vector_get_address 2026-03-18 10:43:09 +01:00
david
e761052090 Renamed vector_send_ada to vector_send_apex 2026-03-18 10:31:38 +01:00
david
8a7f676fe3 Add contract tools, tx builder, dry-run, history, and persistent audit log
- Add 5 new MCP tools: vector_build_transaction, vector_dry_run,
  vector_get_transaction_history, vector_deploy_contract,
  vector_interact_contract
- Persist audit log to JSON file with daily spend recovery on restart
- Add evaluateTransaction and getTransactionHistory to OgmiosProvider
- Support PlutusV1/V2/V3 contract deployment and interaction
- Update docs, types, and bump build heap to 12GB for lucid-cardano

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 13:21:41 +01:00
david
5b52a3b273 Added support for Vector L2 and removed everything else 2026-03-17 10:15:55 +01:00
Alex Cheng
1b9e5ce23c TON support 2025-03-18 13:54:58 -05:00
Alex Cheng
9b86ce4a74 cardano support 2025-03-13 13:01:50 -05:00
Alex Cheng
7135d5af5a ripple support 2025-03-11 13:45:37 -05:00
Alex Cheng
5cca76eb6a crosschain bridges and swaps aggregation through Rubic 2025-02-24 14:03:50 -06:00
Alex Cheng
d848dd2298 sonic support 2025-02-21 17:53:37 -06:00
Alex Cheng
9800a57067 sonic support 2025-02-21 15:47:24 -06:00