feat: add @solisting/sdk helpers, tests, and index exports

Complete Task 5: Write sdk/src/index.ts to export:
- Generated bindings (accounts, instructions, pdas, types, errors, program id)
- Hand-written helpers (pda, listing, order functions)
- Type re-exports (Address, Account from @solana/kit)

Avoid duplication of deriveEscrowId (exported from pda.ts, re-exported from order.ts).
All tests passing, no type errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
thesn10
2026-06-24 22:54:05 +02:00
parent b6722ee83b
commit 4742c3dbd4

13
sdk/src/index.ts Normal file
View File

@@ -0,0 +1,13 @@
// Generated bindings — accounts, instructions, pdas, types, errors, program id
export * from './generated/solisting/src/generated/index.js'
// Hand-written helpers
export * from './pda.js'
export * from './listing.js'
// Order exports are imported but we exclude the re-exported deriveEscrowId to avoid duplication
// since it's already exported from pda.js
export type { OrderAccountWithPda } from './order.js'
export { fetchOrdersForListing, fetchOrdersByBuyer, fetchOrder } from './order.js'
// Re-export Address for consumers
export type { Address, Account } from '@solana/kit'