Description
The SDK defines two entirely different, incompatible Escrow type systems for the same domain concept:
src/types.ts (top-level file): Escrow/EscrowStatus with fields sender, recipient, amount
src/types/index.ts (folder barrel): EscrowState/EscrowParams with fields depositor, beneficiary, amountXLM — naming that actually matches the rest of the ecosystem (backend, contract)
src/index.ts does export * from './types'. Because Node/TypeScript module resolution prefers a file (types.ts) over a same-named directory (types/) when both exist, this line resolves to the top-level file — meaning src/types/index.ts is never actually exported from the package's public API, despite src/types/contract.ts, types/events.ts, and types/multisig.ts being explicitly re-exported separately from the same folder. Any consumer importing Escrow from @trustflow/sdk today silently gets the sender/recipient/amount shape, not the depositor/beneficiary/amountXLM shape used everywhere else in the protocol.
Component
SDK
Difficulty
🔴 Hard
Tasks
Acceptance Criteria
Estimated Time
2-3 days
Description
The SDK defines two entirely different, incompatible
Escrowtype systems for the same domain concept:src/types.ts(top-level file):Escrow/EscrowStatuswith fieldssender,recipient,amountsrc/types/index.ts(folder barrel):EscrowState/EscrowParamswith fieldsdepositor,beneficiary,amountXLM— naming that actually matches the rest of the ecosystem (backend, contract)src/index.tsdoesexport * from './types'. Because Node/TypeScript module resolution prefers a file (types.ts) over a same-named directory (types/) when both exist, this line resolves to the top-level file — meaningsrc/types/index.tsis never actually exported from the package's public API, despitesrc/types/contract.ts,types/events.ts, andtypes/multisig.tsbeing explicitly re-exported separately from the same folder. Any consumer importingEscrowfrom@trustflow/sdktoday silently gets thesender/recipient/amountshape, not thedepositor/beneficiary/amountXLMshape used everywhere else in the protocol.Component
SDK
Difficulty
🔴 Hard
Tasks
types/index.ts's naming (depositor/beneficiary/amountXLM) matches the backend and contract conventions, so it's likely the intended one, but confirm against actual contract/backend usageEscrow,EscrowStatus,CreateEscrowParams, etc. acrosssrc/escrow/*.tsto confirm which type they're actually resolving to today (this may reveal internal inconsistencies too)tsup/tscconfig check) to catch future file/folder name collisions like thisAcceptance Criteria
Escrowtype definition exists and is exported from the package entrypointEstimated Time
2-3 days