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:
13
sdk/src/index.ts
Normal file
13
sdk/src/index.ts
Normal 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'
|
||||
Reference in New Issue
Block a user