Skip to content

Create TypeScript SDK wrappers for all Soroban contracts #490

Description

@devJaja

Summary

The TypeScript SDK currently has registry.ts and coordinator.ts, but wrappers for agent_bidding, agent_marketplace, dispute_resolution, task_store, and upgrade-manager contracts are missing. Developers need typed SDK wrappers to interact with all contracts from TypeScript/JavaScript applications.

Priority

P2

Files to work on

smart-contracts/src/agents/bidding.ts (new)
smart-contracts/src/agents/marketplace.ts (new)
smart-contracts/src/dispute/resolution.ts (new)
smart-contracts/src/tasks/store.ts (new)
smart-contracts/src/upgrade/manager.ts (new)
smart-contracts/src/shared/types.ts

Requirements

  • Create src/agents/bidding.ts: typed wrapper for agent_bidding contract (submit_bid, reveal_bid, get_winner)
  • Create src/agents/marketplace.ts: typed wrapper for agent_marketplace (list_service, search, purchase, confirm_delivery)
  • Create src/dispute/resolution.ts: typed wrapper for dispute_resolution (file_dispute, submit_evidence, vote, resolve)
  • Create src/tasks/store.ts: typed wrapper for task_store (create_task, update_status, get_task, get_history)
  • Create src/upgrade/manager.ts: typed wrapper for upgrade-manager (propose, approve, execute, rollback)
  • Shared types in src/shared/types.ts: AgentRecord, BidRecord, DisputeRecord, TaskRecord, UpgradeProposal
  • Each wrapper: typed parameters, typed return values, error handling, event parsing
  • Add JSDoc documentation for all public methods
  • Add unit tests with mocked Soroban RPC

Acceptance Criteria

  • All 5 contract wrappers exist and compile
  • Each wrapper method has typed parameters and return values (no any)
  • Error handling converts Soroban errors to typed SDK errors
  • Event parsing extracts typed data from Soroban events
  • JSDoc documentation exists for all public methods
  • Unit tests cover all wrapper methods with mocked RPC
  • TypeScript compilation passes with strict mode

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions