@zenland/sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +246 -0
- package/dist/index.cjs +502 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +382 -0
- package/dist/index.d.ts +382 -0
- package/dist/index.js +465 -0
- package/dist/index.js.map +1 -0
- package/dist/react.cjs +743 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.d.cts +554 -0
- package/dist/react.d.ts +554 -0
- package/dist/react.js +704 -0
- package/dist/react.js.map +1 -0
- package/package.json +78 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/react.ts","../src/react/context.tsx","../src/request.ts","../src/queries.ts","../src/domains/escrows.ts","../src/domains/agents.ts","../src/domains/protocol-stats.ts","../src/domains/transaction-logs.ts","../src/client.ts","../src/react/hooks/useEscrow.ts","../src/react/hooks/useEscrows.ts","../src/react/hooks/useAgent.ts","../src/react/hooks/useAgents.ts","../src/react/hooks/useProtocolStats.ts","../src/react/hooks/useRecentEscrows.ts","../src/react/hooks/useUserStats.ts","../src/react/hooks/useTransactionLogsByEscrow.ts"],"sourcesContent":["/**\n * @zenland/sdk/react\n *\n * React hooks and components for the Zenland SDK.\n *\n * @example\n * ```tsx\n * import { ZenlandProvider, useEscrows, useAgent } from '@zenland/sdk/react';\n *\n * function App() {\n * return (\n * <ZenlandProvider>\n * <MyComponent />\n * </ZenlandProvider>\n * );\n * }\n *\n * function MyComponent() {\n * const { data: escrows } = useEscrows({ address: '0x...' });\n * const { data: agent } = useAgent('0x...');\n * // ...\n * }\n * ```\n */\n\n// Context and provider\nexport { ZenlandProvider, useZenlandClient, useZenlandClientOptional } from \"./react/context\";\nexport type { ZenlandProviderProps } from \"./react/context\";\n\n// Hooks\nexport {\n useEscrow,\n useEscrows,\n useAgent,\n useAgents,\n useProtocolStats,\n useUserStats,\n useGlobalStats,\n useTransactionLogsByEscrow,\n useRecentEscrows,\n STATE_GROUPS,\n} from \"./react/hooks\";\nexport type {\n UseEscrowOptions,\n UseEscrowsArgs,\n EscrowRole,\n EscrowStateTab,\n UseAgentOptions,\n UseAgentsArgs,\n UseProtocolStatsOptions,\n UseRecentEscrowsOptions,\n UserDashboardStats,\n UseTransactionLogsByEscrowOptions,\n ProtocolStats,\n} from \"./react/hooks\";\n\n// Re-export types from core for convenience\nexport type {\n GqlAgent,\n GqlAgentPage,\n GqlEscrow,\n GqlEscrowPage,\n GqlProtocolStats,\n GqlTransactionLog,\n GqlPageInfo,\n} from \"./generated/types\";\n\n// Re-export client for advanced usage\nexport { createZenlandClient } from \"./client\";\nexport type { ZenlandClient, ZenlandClientConfig } from \"./client\";\n","\"use client\";\n\nimport { createContext, useContext, useMemo, type ReactNode } from \"react\";\nimport { createZenlandClient, type ZenlandClient, type ZenlandClientConfig } from \"../client\";\n\nconst ZenlandContext = createContext<ZenlandClient | null>(null);\n\nexport interface ZenlandProviderProps {\n children: ReactNode;\n /** Optional configuration for the SDK client */\n config?: ZenlandClientConfig;\n}\n\n/**\n * Provider component for the Zenland SDK.\n *\n * Wrap your app with this provider to use the React hooks.\n *\n * @example\n * ```tsx\n * import { ZenlandProvider } from '@zenland/sdk/react';\n *\n * function App() {\n * return (\n * <ZenlandProvider>\n * <YourApp />\n * </ZenlandProvider>\n * );\n * }\n *\n * // With custom config\n * <ZenlandProvider config={{ baseUrl: 'http://localhost:42069' }}>\n * <YourApp />\n * </ZenlandProvider>\n * ```\n */\nexport function ZenlandProvider({ children, config }: ZenlandProviderProps) {\n const client = useMemo(() => createZenlandClient(config), [config]);\n\n return <ZenlandContext.Provider value={client}>{children}</ZenlandContext.Provider>;\n}\n\n/**\n * Hook to access the Zenland SDK client.\n *\n * Must be used within a ZenlandProvider.\n *\n * @example\n * ```tsx\n * import { useZenlandClient } from '@zenland/sdk/react';\n *\n * function MyComponent() {\n * const client = useZenlandClient();\n * // Use client.escrows, client.agents, etc.\n * }\n * ```\n */\nexport function useZenlandClient(): ZenlandClient {\n const context = useContext(ZenlandContext);\n if (!context) {\n throw new Error(\"useZenlandClient must be used within a ZenlandProvider\");\n }\n return context;\n}\n\n/**\n * Hook to access the Zenland SDK client, creating a default one if not in a provider.\n *\n * This is useful for components that might be used outside of a ZenlandProvider.\n */\nexport function useZenlandClientOptional(): ZenlandClient {\n const context = useContext(ZenlandContext);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useMemo(() => context ?? createZenlandClient(), [context]);\n}\n","/**\n * GraphQL request utilities for the Zenland SDK\n */\n\ntype GraphQLErrorLike = {\n message?: string;\n [key: string]: unknown;\n};\n\ntype GraphQLResponse<TData> = {\n data?: TData;\n errors?: GraphQLErrorLike[];\n};\n\n/**\n * Error thrown when the indexer returns GraphQL errors\n */\nexport class ZenlandGraphQLError extends Error {\n public readonly errors: GraphQLErrorLike[];\n\n constructor(message: string, errors: GraphQLErrorLike[]) {\n super(message);\n this.name = \"ZenlandGraphQLError\";\n this.errors = errors;\n }\n}\n\n/**\n * Error thrown when the indexer request fails at the network/HTTP level\n */\nexport class ZenlandRequestError extends Error {\n public readonly status: number;\n public readonly statusText: string;\n\n constructor(message: string, status: number, statusText: string) {\n super(message);\n this.name = \"ZenlandRequestError\";\n this.status = status;\n this.statusText = statusText;\n }\n}\n\nexport interface GraphQLRequestOptions {\n signal?: AbortSignal;\n}\n\n/**\n * Execute a GraphQL request against the Zenland indexer\n */\nexport async function graphqlRequest<TData, TVariables extends object | undefined>(\n baseUrl: string,\n document: string,\n variables?: TVariables,\n options?: GraphQLRequestOptions,\n): Promise<TData> {\n const endpoint = `${baseUrl}/graphql`;\n\n const res = await fetch(endpoint, {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({ query: document, variables }),\n signal: options?.signal,\n cache: \"no-store\",\n });\n\n if (!res.ok) {\n const text = await res.text().catch(() => \"\");\n throw new ZenlandRequestError(\n `Zenland request failed (${res.status} ${res.statusText})${text ? `: ${text}` : \"\"}`,\n res.status,\n res.statusText,\n );\n }\n\n const json = (await res.json()) as GraphQLResponse<TData>;\n\n if (json.errors?.length) {\n throw new ZenlandGraphQLError(\n json.errors.map((e) => e.message ?? \"GraphQL error\").join(\"; \"),\n json.errors,\n );\n }\n\n if (!json.data) {\n throw new Error(\"Zenland response missing data.\");\n }\n\n return json.data;\n}\n","/**\n * GraphQL query strings for the Zenland indexer.\n * These are compiled into the SDK to avoid runtime parsing.\n */\n\nexport const AGENT_QUERY = `\nquery Agent($id: String!) {\n agent(id: $id) {\n id\n isActive\n isAvailable\n stablecoinDecimals\n stablecoinToken\n stablecoinStake\n daoTokenStake\n disputeFeeBps\n assignmentFeeBps\n description\n contact\n totalResolved\n activeCases\n registrationTime\n lastEngagementTimestamp\n totalEarnings\n totalSlashed\n cases(limit: 5, orderBy: \"invitedAt\", orderDirection: \"desc\") {\n items {\n id\n escrow\n invitedAt\n resolvedAt\n timedOut\n escrowRef {\n id\n amount\n token\n state\n }\n }\n totalCount\n }\n }\n}\n`;\n\nexport const AGENTS_QUERY = `\nquery Agents($where: agentFilter, $orderBy: String, $orderDirection: String, $limit: Int, $offset: Int) {\n agents(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, limit: $limit, offset: $offset) {\n totalCount\n items {\n id\n isActive\n isAvailable\n stablecoinDecimals\n stablecoinStake\n daoTokenStake\n disputeFeeBps\n assignmentFeeBps\n description\n contact\n totalResolved\n activeCases\n registrationTime\n lastEngagementTimestamp\n totalEarnings\n totalSlashed\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n }\n }\n}\n`;\n\nexport const ESCROW_QUERY = `\nquery escrow($id: String!) {\n escrow(id: $id) {\n id\n buyer\n seller\n agent\n amount\n token\n state\n createdAt\n sellerAcceptDeadline\n buyerProtectionTime\n termsHash\n version\n fundedAt\n fulfilledAt\n resolvedAt\n agentInvitedAt\n splitProposer\n proposedBuyerBps\n proposedSellerBps\n buyerApprovedSplit\n sellerApprovedSplit\n agentFeeReceived\n buyerReceived\n sellerReceived\n creationFee\n }\n}\n`;\n\nexport const ESCROWS_QUERY = `\nquery escrows(\n $limit: Int = 30\n $offset: Int = 0\n $orderBy: String = \"createdAt\"\n $orderDirection: String = \"desc\"\n $where: escrowFilter\n) {\n escrows(\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n ) {\n items {\n id\n buyer\n seller\n agent\n amount\n token\n state\n createdAt\n fundedAt\n fulfilledAt\n sellerAcceptDeadline\n agentInvitedAt\n buyerProtectionTime\n splitProposer\n buyerApprovedSplit\n sellerApprovedSplit\n proposedBuyerBps\n proposedSellerBps\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n }\n totalCount\n }\n}\n`;\n\nexport const PROTOCOL_STATS_QUERY = `\nquery protocolStats($id: String! = \"global\") {\n protocolStats(id: $id) {\n id\n totalEscrowsCreated\n totalVolumeEscrowed\n totalFeesCollected\n currentTVL\n activeEscrowCount\n totalAgentsRegistered\n activeAgentsCount\n }\n}\n`;\n\nexport const RECENT_ESCROWS_QUERY = `\nquery recentEscrows($limit: Int = 5) {\n escrows(\n limit: $limit\n orderBy: \"createdAt\"\n orderDirection: \"desc\"\n ) {\n items {\n id\n amount\n token\n state\n createdAt\n }\n }\n}\n`;\n\nexport const TRANSACTION_LOGS_QUERY = `\nquery transactionLogs(\n $escrowAddress: String\n $limit: Int\n $offset: Int\n $orderBy: String\n $orderDirection: String\n) {\n transactionLogs(\n where: { escrowAddress: $escrowAddress }\n limit: $limit\n offset: $offset\n orderBy: $orderBy\n orderDirection: $orderDirection\n ) {\n items {\n id\n txHash\n blockNumber\n timestamp\n eventName\n contractAddress\n contractType\n escrowAddress\n agentAddress\n userAddress\n eventData\n }\n }\n}\n`;\n","/**\n * Escrow domain module for the Zenland SDK\n */\n\nimport { graphqlRequest } from \"../request\";\nimport { ESCROW_QUERY, ESCROWS_QUERY } from \"../queries\";\nimport type {\n GqlEscrow,\n GqlEscrowPage,\n GqlEscrowFilter,\n EscrowQueryResponse,\n EscrowsQueryResponse,\n} from \"../generated/types\";\n\n/** State groups for filtering escrows */\nexport const STATE_GROUPS = {\n ACTIVE: [\"PENDING\", \"ACTIVE\", \"FULFILLED\"] as const,\n IN_DISPUTE: [\"DISPUTED\", \"AGENT_INVITED\"] as const,\n COMPLETED: [\"RELEASED\", \"AGENT_RESOLVED\", \"REFUNDED\", \"SPLIT\"] as const,\n} as const;\n\nexport type StateGroup = keyof typeof STATE_GROUPS;\n\nexport interface ListEscrowsArgs {\n limit?: number;\n offset?: number;\n buyer?: string;\n seller?: string;\n agent?: string;\n /** Search across buyer, seller, or agent roles */\n user?: string;\n state?: string;\n /** Multiple states for group filtering */\n states?: string[];\n orderBy?: string;\n orderDirection?: \"asc\" | \"desc\";\n}\n\n/**\n * Creates escrow domain functions bound to a base URL\n */\nexport function createEscrowsDomain(baseUrl: string) {\n /**\n * List escrows with filtering and pagination\n */\n async function list(args?: ListEscrowsArgs): Promise<GqlEscrowPage> {\n const where: GqlEscrowFilter = {};\n\n // Role-specific filters\n if (args?.buyer) where.buyer = args.buyer.toLowerCase();\n if (args?.seller) where.seller = args.seller.toLowerCase();\n if (args?.agent) where.agent = args.agent.toLowerCase();\n\n // State filters - single or multiple\n if (args?.states && args.states.length > 0) {\n where.state_in = args.states;\n } else if (args?.state) {\n where.state = args.state;\n }\n\n // User filter: search across buyer, seller, or agent roles\n if (args?.user) {\n const userLower = args.user.toLowerCase();\n where.OR = [{ buyer: userLower }, { seller: userLower }, { agent: userLower }];\n }\n\n const variables = {\n limit: args?.limit ?? 30,\n offset: args?.offset ?? 0,\n orderBy: args?.orderBy ?? \"createdAt\",\n orderDirection: args?.orderDirection ?? \"desc\",\n where: Object.keys(where).length > 0 ? where : undefined,\n };\n\n const response = await graphqlRequest<EscrowsQueryResponse, typeof variables>(\n baseUrl,\n ESCROWS_QUERY,\n variables,\n );\n\n return response.escrows;\n }\n\n /**\n * Get a single escrow by ID (address)\n */\n async function getById(id: string): Promise<GqlEscrow | null> {\n const variables = { id: id.toLowerCase() };\n\n const response = await graphqlRequest<EscrowQueryResponse, typeof variables>(\n baseUrl,\n ESCROW_QUERY,\n variables,\n );\n\n return response.escrow;\n }\n\n /**\n * Get escrows for a specific user across all roles\n */\n async function getByUser(\n userAddress: string,\n args?: Omit<ListEscrowsArgs, \"user\" | \"buyer\" | \"seller\" | \"agent\">,\n ): Promise<GqlEscrowPage> {\n return list({ ...args, user: userAddress });\n }\n\n /**\n * Get escrows by state group\n */\n async function getByStateGroup(\n stateGroup: StateGroup,\n args?: Omit<ListEscrowsArgs, \"state\" | \"states\">,\n ): Promise<GqlEscrowPage> {\n return list({ ...args, states: [...STATE_GROUPS[stateGroup]] });\n }\n\n return {\n list,\n getById,\n getByUser,\n getByStateGroup,\n };\n}\n\nexport type EscrowsDomain = ReturnType<typeof createEscrowsDomain>;\n","/**\n * Agent domain module for the Zenland SDK\n */\n\nimport { graphqlRequest } from \"../request\";\nimport { AGENT_QUERY, AGENTS_QUERY } from \"../queries\";\nimport type {\n GqlAgent,\n GqlAgentPage,\n GqlAgentFilter,\n AgentQueryResponse,\n AgentsQueryResponse,\n} from \"../generated/types\";\n\nexport interface ListAgentsArgs {\n limit?: number;\n offset?: number;\n onlyActive?: boolean;\n onlyAvailable?: boolean;\n orderBy?: string;\n orderDirection?: \"asc\" | \"desc\";\n}\n\n/**\n * Creates agent domain functions bound to a base URL\n */\nexport function createAgentsDomain(baseUrl: string) {\n /**\n * List agents with filtering and pagination\n */\n async function list(args?: ListAgentsArgs): Promise<GqlAgentPage> {\n const where: GqlAgentFilter = {};\n\n if (args?.onlyActive) where.isActive = true;\n if (args?.onlyAvailable) where.isAvailable = true;\n\n const variables = {\n limit: args?.limit ?? 30,\n offset: args?.offset ?? 0,\n orderBy: args?.orderBy ?? \"totalResolved\",\n orderDirection: args?.orderDirection ?? \"desc\",\n where: Object.keys(where).length > 0 ? where : undefined,\n };\n\n const response = await graphqlRequest<AgentsQueryResponse, typeof variables>(\n baseUrl,\n AGENTS_QUERY,\n variables,\n );\n\n return response.agents;\n }\n\n /**\n * Get a single agent by ID (address)\n */\n async function getById(id: string): Promise<GqlAgent | null> {\n const variables = { id: id.toLowerCase() };\n\n const response = await graphqlRequest<AgentQueryResponse, typeof variables>(\n baseUrl,\n AGENT_QUERY,\n variables,\n );\n\n return response.agent;\n }\n\n /**\n * Get all active and available agents\n */\n async function getAvailable(args?: Omit<ListAgentsArgs, \"onlyActive\" | \"onlyAvailable\">): Promise<GqlAgentPage> {\n return list({ ...args, onlyActive: true, onlyAvailable: true });\n }\n\n return {\n list,\n getById,\n getAvailable,\n };\n}\n\nexport type AgentsDomain = ReturnType<typeof createAgentsDomain>;\n","/**\n * Protocol Stats domain module for the Zenland SDK\n */\n\nimport { graphqlRequest } from \"../request\";\nimport { PROTOCOL_STATS_QUERY } from \"../queries\";\nimport type { GqlProtocolStats, ProtocolStatsQueryResponse } from \"../generated/types\";\n\n/** Normalized protocol stats with BigInt values */\nexport interface ProtocolStats {\n id: string;\n totalEscrowsCreated: number;\n totalVolumeEscrowed: bigint;\n totalFeesCollected: bigint;\n currentTVL: bigint;\n activeEscrowCount: number;\n totalAgentsRegistered: number;\n activeAgentsCount: number;\n}\n\n/**\n * Convert raw GraphQL response to normalized ProtocolStats\n */\nfunction normalizeProtocolStats(raw: GqlProtocolStats): ProtocolStats {\n return {\n id: raw.id,\n totalEscrowsCreated: raw.totalEscrowsCreated,\n totalVolumeEscrowed: BigInt(raw.totalVolumeEscrowed),\n totalFeesCollected: BigInt(raw.totalFeesCollected),\n currentTVL: BigInt(raw.currentTVL),\n activeEscrowCount: raw.activeEscrowCount,\n totalAgentsRegistered: raw.totalAgentsRegistered,\n activeAgentsCount: raw.activeAgentsCount,\n };\n}\n\n/**\n * Creates protocol stats domain functions bound to a base URL\n */\nexport function createProtocolStatsDomain(baseUrl: string) {\n /**\n * Fetch global protocol statistics\n */\n async function get(): Promise<ProtocolStats | null> {\n const variables = { id: \"global\" };\n\n const response = await graphqlRequest<ProtocolStatsQueryResponse, typeof variables>(\n baseUrl,\n PROTOCOL_STATS_QUERY,\n variables,\n );\n\n if (!response.protocolStats) {\n return null;\n }\n\n return normalizeProtocolStats(response.protocolStats);\n }\n\n /**\n * Fetch raw protocol statistics (without BigInt conversion)\n */\n async function getRaw(): Promise<GqlProtocolStats | null> {\n const variables = { id: \"global\" };\n\n const response = await graphqlRequest<ProtocolStatsQueryResponse, typeof variables>(\n baseUrl,\n PROTOCOL_STATS_QUERY,\n variables,\n );\n\n return response.protocolStats;\n }\n\n return {\n get,\n getRaw,\n };\n}\n\nexport type ProtocolStatsDomain = ReturnType<typeof createProtocolStatsDomain>;\n","/**\n * Transaction Logs domain module for the Zenland SDK\n */\n\nimport { graphqlRequest } from \"../request\";\nimport { TRANSACTION_LOGS_QUERY } from \"../queries\";\nimport type { GqlTransactionLog, TransactionLogsQueryResponse } from \"../generated/types\";\n\nexport interface ListTransactionLogsArgs {\n escrowAddress?: string;\n limit?: number;\n offset?: number;\n orderBy?: string;\n orderDirection?: \"asc\" | \"desc\";\n}\n\n/**\n * Creates transaction logs domain functions bound to a base URL\n */\nexport function createTransactionLogsDomain(baseUrl: string) {\n /**\n * List transaction logs with filtering and pagination\n */\n async function list(args?: ListTransactionLogsArgs): Promise<GqlTransactionLog[]> {\n const variables = {\n escrowAddress: args?.escrowAddress?.toLowerCase(),\n limit: args?.limit ?? 100,\n offset: args?.offset ?? 0,\n orderBy: args?.orderBy ?? \"timestamp\",\n orderDirection: args?.orderDirection ?? \"asc\",\n };\n\n const response = await graphqlRequest<TransactionLogsQueryResponse, typeof variables>(\n baseUrl,\n TRANSACTION_LOGS_QUERY,\n variables,\n );\n\n return response.transactionLogs.items;\n }\n\n /**\n * Get transaction logs for a specific escrow\n */\n async function getByEscrow(\n escrowAddress: string,\n args?: Omit<ListTransactionLogsArgs, \"escrowAddress\">,\n ): Promise<GqlTransactionLog[]> {\n return list({ ...args, escrowAddress });\n }\n\n /**\n * Parse eventData JSON string from a transaction log\n */\n function parseEventData(eventData: string): Record<string, unknown> {\n try {\n return JSON.parse(eventData);\n } catch {\n return {};\n }\n }\n\n return {\n list,\n getByEscrow,\n parseEventData,\n };\n}\n\nexport type TransactionLogsDomain = ReturnType<typeof createTransactionLogsDomain>;\n","/**\n * Zenland SDK Client\n *\n * The main entry point for interacting with the Zenland indexer.\n */\n\nimport { createEscrowsDomain, type EscrowsDomain } from \"./domains/escrows\";\nimport { createAgentsDomain, type AgentsDomain } from \"./domains/agents\";\nimport { createProtocolStatsDomain, type ProtocolStatsDomain } from \"./domains/protocol-stats\";\nimport { createTransactionLogsDomain, type TransactionLogsDomain } from \"./domains/transaction-logs\";\n\n/** Default production indexer URL */\nconst DEFAULT_BASE_URL = \"https://api.zen.land\";\n\nexport interface ZenlandClientConfig {\n /** Base URL for the indexer API. Defaults to https://api.zen.land */\n baseUrl?: string;\n}\n\nexport interface ZenlandClient {\n /** The base URL being used by this client */\n readonly baseUrl: string;\n\n /** Escrow-related operations */\n readonly escrows: EscrowsDomain;\n\n /** Agent-related operations */\n readonly agents: AgentsDomain;\n\n /** Protocol statistics */\n readonly protocolStats: ProtocolStatsDomain;\n\n /** Transaction logs */\n readonly transactionLogs: TransactionLogsDomain;\n}\n\n/**\n * Create a new Zenland SDK client.\n *\n * @example\n * ```typescript\n * // Use production API (default)\n * const client = createZenlandClient();\n *\n * // Use custom endpoint (e.g., local development)\n * const client = createZenlandClient({ baseUrl: 'http://localhost:42069' });\n *\n * // Fetch escrows\n * const { items, totalCount } = await client.escrows.list({ limit: 10 });\n *\n * // Fetch a specific escrow\n * const escrow = await client.escrows.getById('0x...');\n *\n * // Fetch agents\n * const agents = await client.agents.list({ onlyActive: true });\n *\n * // Fetch protocol stats\n * const stats = await client.protocolStats.get();\n * ```\n */\nexport function createZenlandClient(config?: ZenlandClientConfig): ZenlandClient {\n const baseUrl = normalizeBaseUrl(config?.baseUrl ?? DEFAULT_BASE_URL);\n\n return {\n baseUrl,\n escrows: createEscrowsDomain(baseUrl),\n agents: createAgentsDomain(baseUrl),\n protocolStats: createProtocolStatsDomain(baseUrl),\n transactionLogs: createTransactionLogsDomain(baseUrl),\n };\n}\n\n/**\n * Normalize base URL by removing trailing slash\n */\nfunction normalizeBaseUrl(url: string): string {\n return url.endsWith(\"/\") ? url.slice(0, -1) : url;\n}\n\n/**\n * Default client instance using production API.\n * Use this for quick access without creating a new client.\n *\n * @example\n * ```typescript\n * import { zenland } from '@zenland/sdk';\n *\n * const escrows = await zenland.escrows.list();\n * ```\n */\nexport const zenland = createZenlandClient();\n","\"use client\";\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useZenlandClientOptional } from \"../context\";\nimport type { GqlEscrow } from \"../../generated/types\";\n\nexport interface UseEscrowOptions {\n /** Whether to enable the query */\n enabled?: boolean;\n}\n\n/**\n * Hook to fetch a single escrow by ID.\n *\n * @example\n * ```tsx\n * import { useEscrow } from '@zenland/sdk/react';\n *\n * function EscrowDetail({ id }: { id: string }) {\n * const { data: escrow, isLoading, error } = useEscrow(id);\n *\n * if (isLoading) return <div>Loading...</div>;\n * if (error) return <div>Error: {error.message}</div>;\n * if (!escrow) return <div>Escrow not found</div>;\n *\n * return <div>{escrow.state}</div>;\n * }\n * ```\n */\nexport function useEscrow(id: string | undefined, options?: UseEscrowOptions) {\n const client = useZenlandClientOptional();\n\n return useQuery<GqlEscrow | null>({\n queryKey: [\"zenland\", \"escrow\", id],\n queryFn: () => {\n if (!id) return null;\n return client.escrows.getById(id);\n },\n enabled: !!id && (options?.enabled ?? true),\n });\n}\n","\"use client\";\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useZenlandClientOptional } from \"../context\";\nimport { STATE_GROUPS, type StateGroup } from \"../../domains/escrows\";\nimport type { GqlEscrowPage } from \"../../generated/types\";\n\nexport type EscrowRole = \"all\" | \"buyer\" | \"seller\" | \"agent\";\nexport type EscrowStateTab = \"all\" | StateGroup;\n\nexport interface UseEscrowsArgs {\n /** User address to filter by */\n address?: string;\n /** Pagination limit */\n limit?: number;\n /** Pagination offset */\n offset?: number;\n /** Filter by role (requires address) */\n role?: EscrowRole;\n /** Filter by state group */\n stateTab?: EscrowStateTab;\n /** Filter by specific state */\n state?: string;\n /** Filter by multiple states */\n states?: string[];\n /** Whether to enable the query */\n enabled?: boolean;\n}\n\n/**\n * Hook to fetch escrows with filtering and pagination.\n *\n * @example\n * ```tsx\n * import { useEscrows } from '@zenland/sdk/react';\n *\n * function MyEscrows({ address }: { address: string }) {\n * const { data, isLoading } = useEscrows({\n * address,\n * role: 'buyer',\n * stateTab: 'ACTIVE',\n * });\n *\n * if (isLoading) return <div>Loading...</div>;\n *\n * return (\n * <ul>\n * {data?.items.map(escrow => (\n * <li key={escrow.id}>{escrow.state}</li>\n * ))}\n * </ul>\n * );\n * }\n * ```\n */\nexport function useEscrows(args?: UseEscrowsArgs) {\n const client = useZenlandClientOptional();\n const { address, role = \"all\", stateTab, enabled = true } = args ?? {};\n\n // Determine states to filter based on stateTab\n const getStatesFromTab = (): string[] | undefined => {\n if (!stateTab || stateTab === \"all\") {\n return args?.states;\n }\n return [...STATE_GROUPS[stateTab]];\n };\n\n return useQuery<GqlEscrowPage>({\n queryKey: [\"zenland\", \"escrows\", address, role, stateTab, args?.state, args?.states, args?.limit, args?.offset],\n queryFn: async () => {\n if (!address) {\n return { items: [], totalCount: 0, pageInfo: { hasNextPage: false, hasPreviousPage: false } };\n }\n\n const states = getStatesFromTab();\n\n return client.escrows.list({\n limit: args?.limit,\n offset: args?.offset,\n buyer: role === \"buyer\" ? address : undefined,\n seller: role === \"seller\" ? address : undefined,\n agent: role === \"agent\" ? address : undefined,\n user: role === \"all\" ? address : undefined,\n state: args?.state,\n states,\n });\n },\n enabled: !!address && enabled,\n });\n}\n\n// Re-export for convenience\nexport { STATE_GROUPS } from \"../../domains/escrows\";\n","\"use client\";\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useZenlandClientOptional } from \"../context\";\nimport type { GqlAgent } from \"../../generated/types\";\n\nexport interface UseAgentOptions {\n /** Whether to enable the query */\n enabled?: boolean;\n}\n\n/**\n * Hook to fetch a single agent by address.\n *\n * @example\n * ```tsx\n * import { useAgent } from '@zenland/sdk/react';\n *\n * function AgentProfile({ address }: { address: string }) {\n * const { data: agent, isLoading, error } = useAgent(address);\n *\n * if (isLoading) return <div>Loading...</div>;\n * if (error) return <div>Error: {error.message}</div>;\n * if (!agent) return <div>Agent not found</div>;\n *\n * return <div>{agent.description}</div>;\n * }\n * ```\n */\nexport function useAgent(address: string | undefined, options?: UseAgentOptions) {\n const client = useZenlandClientOptional();\n\n return useQuery<GqlAgent | null>({\n queryKey: [\"zenland\", \"agent\", address],\n queryFn: () => {\n if (!address) return null;\n return client.agents.getById(address);\n },\n enabled: !!address && (options?.enabled ?? true),\n });\n}\n","\"use client\";\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useZenlandClientOptional } from \"../context\";\nimport type { GqlAgentPage } from \"../../generated/types\";\n\nexport interface UseAgentsArgs {\n /** Only return active agents */\n onlyActive?: boolean;\n /** Only return available agents */\n onlyAvailable?: boolean;\n /** Pagination limit */\n limit?: number;\n /** Pagination offset */\n offset?: number;\n /** Whether to enable the query */\n enabled?: boolean;\n}\n\n/**\n * Hook to fetch agents with filtering and pagination.\n *\n * @example\n * ```tsx\n * import { useAgents } from '@zenland/sdk/react';\n *\n * function AgentList() {\n * const { data, isLoading } = useAgents({ onlyActive: true });\n *\n * if (isLoading) return <div>Loading...</div>;\n *\n * return (\n * <ul>\n * {data?.items.map(agent => (\n * <li key={agent.id}>{agent.description}</li>\n * ))}\n * </ul>\n * );\n * }\n * ```\n */\nexport function useAgents(args?: UseAgentsArgs) {\n const client = useZenlandClientOptional();\n const { enabled = true, ...filterArgs } = args ?? {};\n\n return useQuery<GqlAgentPage>({\n queryKey: [\"zenland\", \"agents\", filterArgs.onlyActive, filterArgs.onlyAvailable, filterArgs.limit, filterArgs.offset],\n queryFn: () => client.agents.list(filterArgs),\n enabled,\n });\n}\n","\"use client\";\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useZenlandClientOptional } from \"../context\";\nimport type { ProtocolStats } from \"../../domains/protocol-stats\";\n\nexport interface UseProtocolStatsOptions {\n /** Whether to enable the query */\n enabled?: boolean;\n /** Stale time in milliseconds (default: 30s) */\n staleTime?: number;\n /** Refetch interval in milliseconds (default: 60s) */\n refetchInterval?: number;\n}\n\n/**\n * Hook to fetch global protocol statistics.\n *\n * @example\n * ```tsx\n * import { useProtocolStats } from '@zenland/sdk/react';\n *\n * function ProtocolOverview() {\n * const { data: stats, isLoading } = useProtocolStats();\n *\n * if (isLoading) return <div>Loading...</div>;\n * if (!stats) return <div>Stats not available</div>;\n *\n * return (\n * <div>\n * <p>Total Escrows: {stats.totalEscrowsCreated}</p>\n * <p>TVL: {stats.currentTVL.toString()}</p>\n * </div>\n * );\n * }\n * ```\n */\nexport function useProtocolStats(options?: UseProtocolStatsOptions) {\n const client = useZenlandClientOptional();\n\n return useQuery<ProtocolStats | null>({\n queryKey: [\"zenland\", \"protocolStats\"],\n queryFn: () => client.protocolStats.get(),\n enabled: options?.enabled ?? true,\n staleTime: options?.staleTime ?? 30 * 1000, // 30 seconds\n refetchInterval: options?.refetchInterval ?? 60 * 1000, // 1 minute\n });\n}\n\nexport type { ProtocolStats };\n","\"use client\";\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useZenlandClientOptional } from \"../context\";\nimport type { GqlEscrow } from \"../../generated/types\";\n\nexport interface UseRecentEscrowsOptions {\n /** Number of escrows to fetch (default: 5) */\n limit?: number;\n /** Whether to enable the query */\n enabled?: boolean;\n /** Stale time in milliseconds (default: 15s) */\n staleTime?: number;\n /** Refetch interval in milliseconds (default: 30s) */\n refetchInterval?: number;\n}\n\n/**\n * Hook to fetch recent escrows for activity feeds.\n *\n * @example\n * ```tsx\n * import { useRecentEscrows } from '@zenland/sdk/react';\n *\n * function ActivityFeed() {\n * const { data: escrows, isLoading } = useRecentEscrows({ limit: 10 });\n *\n * if (isLoading) return <div>Loading...</div>;\n *\n * return (\n * <ul>\n * {escrows?.map(escrow => (\n * <li key={escrow.id}>\n * {escrow.state} - {escrow.amount}\n * </li>\n * ))}\n * </ul>\n * );\n * }\n * ```\n */\nexport function useRecentEscrows(options?: UseRecentEscrowsOptions) {\n const client = useZenlandClientOptional();\n const limit = options?.limit ?? 5;\n\n return useQuery<GqlEscrow[]>({\n queryKey: [\"zenland\", \"recentEscrows\", limit],\n queryFn: async () => {\n const result = await client.escrows.list({\n limit,\n orderBy: \"createdAt\",\n orderDirection: \"desc\",\n });\n return result.items;\n },\n enabled: options?.enabled ?? true,\n staleTime: options?.staleTime ?? 15 * 1000, // 15 seconds\n refetchInterval: options?.refetchInterval ?? 30 * 1000, // 30 seconds\n });\n}\n","\"use client\";\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useZenlandClientOptional } from \"../context\";\nimport { STATE_GROUPS } from \"../../domains/escrows\";\nimport type { GqlEscrow, ZenlandClient } from \"../../index\";\n\n/** State groups for categorization */\nconst ACTIVE_STATES = STATE_GROUPS.ACTIVE;\nconst DISPUTE_STATES = STATE_GROUPS.IN_DISPUTE;\nconst COMPLETED_STATES = STATE_GROUPS.COMPLETED;\nconst TVL_STATES = [...ACTIVE_STATES, ...DISPUTE_STATES] as const;\n\nexport interface UserDashboardStats {\n activeCount: number;\n disputeCount: number;\n completedCount: number;\n tvl: bigint;\n recentEscrows: GqlEscrow[];\n}\n\n/**\n * Fetch count of escrows for a user filtered by states.\n */\nasync function fetchUserEscrowCount(\n client: ZenlandClient,\n userAddress: string,\n states: readonly string[],\n): Promise<number> {\n const userLower = userAddress.toLowerCase();\n\n const result = await client.escrows.list({\n limit: 1,\n user: userLower,\n states: [...states],\n });\n\n return result.totalCount;\n}\n\n/**\n * Fetch user's escrows that contribute to TVL and calculate sum.\n */\nasync function fetchUserTVL(client: ZenlandClient, userAddress: string): Promise<bigint> {\n const userLower = userAddress.toLowerCase();\n\n const result = await client.escrows.list({\n limit: 1000,\n user: userLower,\n states: [...TVL_STATES],\n });\n\n return result.items.reduce((sum, escrow) => sum + BigInt(escrow.amount), BigInt(0));\n}\n\n/**\n * Fetch user's recent escrows for dashboard display.\n */\nasync function fetchUserRecentEscrows(\n client: ZenlandClient,\n userAddress: string,\n limit: number = 5,\n): Promise<GqlEscrow[]> {\n const userLower = userAddress.toLowerCase();\n\n const result = await client.escrows.list({\n limit,\n user: userLower,\n });\n\n return result.items;\n}\n\n/**\n * Fetch all user dashboard stats in parallel.\n */\nasync function getUserDashboardStats(\n client: ZenlandClient,\n userAddress: string,\n): Promise<UserDashboardStats> {\n const [activeCount, disputeCount, completedCount, tvl, recentEscrows] = await Promise.all([\n fetchUserEscrowCount(client, userAddress, ACTIVE_STATES),\n fetchUserEscrowCount(client, userAddress, DISPUTE_STATES),\n fetchUserEscrowCount(client, userAddress, COMPLETED_STATES),\n fetchUserTVL(client, userAddress),\n fetchUserRecentEscrows(client, userAddress, 5),\n ]);\n\n return {\n activeCount,\n disputeCount,\n completedCount,\n tvl,\n recentEscrows,\n };\n}\n\n/**\n * Fetch global dashboard stats.\n */\nasync function getGlobalDashboardStats(\n client: ZenlandClient,\n): Promise<Omit<UserDashboardStats, \"tvl\"> & { tvl: null }> {\n const [activeCount, disputeCount, completedCount, recentEscrows] = await Promise.all([\n fetchGlobalEscrowCount(client, [...ACTIVE_STATES]),\n fetchGlobalEscrowCount(client, [...DISPUTE_STATES]),\n fetchGlobalEscrowCount(client, [...COMPLETED_STATES]),\n fetchGlobalRecentEscrows(client, 5),\n ]);\n\n return {\n activeCount,\n disputeCount,\n completedCount,\n tvl: null,\n recentEscrows,\n };\n}\n\nasync function fetchGlobalEscrowCount(client: ZenlandClient, states: string[]): Promise<number> {\n const result = await client.escrows.list({\n limit: 1,\n states,\n });\n return result.totalCount;\n}\n\nasync function fetchGlobalRecentEscrows(client: ZenlandClient, limit: number = 5): Promise<GqlEscrow[]> {\n const result = await client.escrows.list({ limit });\n return result.items;\n}\n\n/**\n * Hook to fetch user-specific dashboard statistics.\n */\nexport function useUserStats(userAddress: string | undefined) {\n const client = useZenlandClientOptional();\n return useQuery<UserDashboardStats | null>({\n queryKey: [\"zenland\", \"userStats\", userAddress],\n queryFn: async () => {\n if (!userAddress) return null;\n return getUserDashboardStats(client, userAddress);\n },\n enabled: !!userAddress,\n staleTime: 15 * 1000,\n refetchInterval: 30 * 1000,\n });\n}\n\n/**\n * Hook to fetch global dashboard statistics.\n */\nexport function useGlobalStats() {\n const client = useZenlandClientOptional();\n return useQuery({\n queryKey: [\"zenland\", \"globalStats\"],\n queryFn: () => getGlobalDashboardStats(client),\n staleTime: 30 * 1000,\n refetchInterval: 60 * 1000,\n });\n}\n","\"use client\";\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { useZenlandClientOptional } from \"../context\";\nimport type { GqlTransactionLog } from \"../../generated/types\";\nimport type { ListTransactionLogsArgs } from \"../../domains/transaction-logs\";\n\nexport interface UseTransactionLogsByEscrowOptions {\n /** Whether to enable the query */\n enabled?: boolean;\n /** Stale time in milliseconds (default: 30s) */\n staleTime?: number;\n /** Refetch interval in milliseconds */\n refetchInterval?: number;\n /** Transaction log list options */\n list?: Omit<ListTransactionLogsArgs, \"escrowAddress\">;\n}\n\n/**\n * Hook to fetch transaction logs for a specific escrow.\n */\nexport function useTransactionLogsByEscrow(\n escrowAddress: string | undefined | null,\n options?: UseTransactionLogsByEscrowOptions,\n) {\n const client = useZenlandClientOptional();\n const addr = escrowAddress?.toLowerCase();\n\n return useQuery<GqlTransactionLog[]>({\n queryKey: [\n \"zenland\",\n \"transactionLogs\",\n \"escrow\",\n addr,\n options?.list?.limit,\n options?.list?.offset,\n options?.list?.orderBy,\n options?.list?.orderDirection,\n ],\n queryFn: async () => {\n if (!addr) return [];\n return client.transactionLogs.getByEscrow(addr, options?.list);\n },\n enabled: !!addr && (options?.enabled ?? true),\n staleTime: options?.staleTime ?? 30_000,\n refetchInterval: options?.refetchInterval,\n refetch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,MAAM;AAAA,IAC7C,WAAW,KAAK;AAAA,IAChB,iBAAiB,KAAK;AAAA,EACxB,CAAC;AACH;;;AC9JA,IAAAC,sBAAyB;AAmBlB,SAAS,2BACd,eACA,SACA;AACA,QAAM,SAAS,yBAAyB;AACxC,QAAM,OAAO,eAAe,YAAY;AAExC,aAAO,8BAA8B;AAAA,IACnC,UAAU;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,MAAM;AAAA,MACf,SAAS,MAAM;AAAA,MACf,SAAS,MAAM;AAAA,MACf,SAAS,MAAM;AAAA,IACjB;AAAA,IACA,SAAS,YAAY;AACnB,UAAI,CAAC,KAAM,QAAO,CAAC;AACnB,aAAO,OAAO,gBAAgB,YAAY,MAAM,SAAS,IAAI;AAAA,IAC/D;AAAA,IACA,SAAS,CAAC,CAAC,SAAS,SAAS,WAAW;AAAA,IACxC,WAAW,SAAS,aAAa;AAAA,IACjC,iBAAiB,SAAS;AAAA,IAC1B,sBAAsB;AAAA,EACxB,CAAC;AACH;","names":["import_react_query","import_react_query","import_react_query","import_react_query","import_react_query","import_react_query","import_react_query"]}
|
package/dist/react.d.cts
ADDED
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Generated types from the Zenland indexer GraphQL schema.
|
|
7
|
+
* These types are bundled with the SDK for convenience.
|
|
8
|
+
*/
|
|
9
|
+
type Maybe<T> = T | null;
|
|
10
|
+
/** GraphQL BigInt scalar - can be string or number from the API */
|
|
11
|
+
type BigIntScalar = string | number | bigint;
|
|
12
|
+
/** Page info for paginated queries */
|
|
13
|
+
interface GqlPageInfo {
|
|
14
|
+
hasNextPage: boolean;
|
|
15
|
+
hasPreviousPage: boolean;
|
|
16
|
+
startCursor?: Maybe<string>;
|
|
17
|
+
endCursor?: Maybe<string>;
|
|
18
|
+
}
|
|
19
|
+
interface GqlAgent {
|
|
20
|
+
id: string;
|
|
21
|
+
isActive: boolean;
|
|
22
|
+
isAvailable: boolean;
|
|
23
|
+
stablecoinDecimals: number;
|
|
24
|
+
stablecoinToken: string;
|
|
25
|
+
stablecoinStake: BigIntScalar;
|
|
26
|
+
daoTokenStake: BigIntScalar;
|
|
27
|
+
disputeFeeBps: number;
|
|
28
|
+
assignmentFeeBps: number;
|
|
29
|
+
description: string;
|
|
30
|
+
contact: string;
|
|
31
|
+
totalResolved: number;
|
|
32
|
+
activeCases: number;
|
|
33
|
+
registrationTime: BigIntScalar;
|
|
34
|
+
lastEngagementTimestamp: BigIntScalar;
|
|
35
|
+
totalEarnings: BigIntScalar;
|
|
36
|
+
totalSlashed: BigIntScalar;
|
|
37
|
+
cases?: Maybe<GqlAgentCasePage>;
|
|
38
|
+
}
|
|
39
|
+
interface GqlAgentCase {
|
|
40
|
+
id: string;
|
|
41
|
+
escrow: string;
|
|
42
|
+
agent: string;
|
|
43
|
+
invitedAt: BigIntScalar;
|
|
44
|
+
resolvedAt?: Maybe<BigIntScalar>;
|
|
45
|
+
timedOut: boolean;
|
|
46
|
+
feeEarned?: Maybe<BigIntScalar>;
|
|
47
|
+
escrowRef?: Maybe<GqlEscrow>;
|
|
48
|
+
}
|
|
49
|
+
interface GqlAgentCasePage {
|
|
50
|
+
items: GqlAgentCase[];
|
|
51
|
+
totalCount: number;
|
|
52
|
+
pageInfo: GqlPageInfo;
|
|
53
|
+
}
|
|
54
|
+
interface GqlAgentPage {
|
|
55
|
+
items: GqlAgent[];
|
|
56
|
+
totalCount: number;
|
|
57
|
+
pageInfo: GqlPageInfo;
|
|
58
|
+
}
|
|
59
|
+
interface GqlEscrow {
|
|
60
|
+
id: string;
|
|
61
|
+
buyer: string;
|
|
62
|
+
seller: string;
|
|
63
|
+
agent?: Maybe<string>;
|
|
64
|
+
amount: BigIntScalar;
|
|
65
|
+
token: string;
|
|
66
|
+
state: string;
|
|
67
|
+
createdAt: BigIntScalar;
|
|
68
|
+
sellerAcceptDeadline: BigIntScalar;
|
|
69
|
+
buyerProtectionTime: BigIntScalar;
|
|
70
|
+
termsHash: string;
|
|
71
|
+
version: number;
|
|
72
|
+
fundedAt: BigIntScalar;
|
|
73
|
+
fulfilledAt?: Maybe<BigIntScalar>;
|
|
74
|
+
resolvedAt?: Maybe<BigIntScalar>;
|
|
75
|
+
agentInvitedAt?: Maybe<BigIntScalar>;
|
|
76
|
+
splitProposer?: Maybe<string>;
|
|
77
|
+
proposedBuyerBps?: Maybe<number>;
|
|
78
|
+
proposedSellerBps?: Maybe<number>;
|
|
79
|
+
buyerApprovedSplit?: Maybe<boolean>;
|
|
80
|
+
sellerApprovedSplit?: Maybe<boolean>;
|
|
81
|
+
agentFeeReceived?: Maybe<BigIntScalar>;
|
|
82
|
+
buyerReceived?: Maybe<BigIntScalar>;
|
|
83
|
+
sellerReceived?: Maybe<BigIntScalar>;
|
|
84
|
+
creationFee: BigIntScalar;
|
|
85
|
+
sellerAcceptedAt?: Maybe<BigIntScalar>;
|
|
86
|
+
sellerDeclinedAt?: Maybe<BigIntScalar>;
|
|
87
|
+
cancelledExpiredAt?: Maybe<BigIntScalar>;
|
|
88
|
+
}
|
|
89
|
+
interface GqlEscrowPage {
|
|
90
|
+
items: GqlEscrow[];
|
|
91
|
+
totalCount: number;
|
|
92
|
+
pageInfo: GqlPageInfo;
|
|
93
|
+
}
|
|
94
|
+
interface GqlProtocolStats {
|
|
95
|
+
id: string;
|
|
96
|
+
totalEscrowsCreated: number;
|
|
97
|
+
totalVolumeEscrowed: BigIntScalar;
|
|
98
|
+
totalFeesCollected: BigIntScalar;
|
|
99
|
+
currentTVL: BigIntScalar;
|
|
100
|
+
activeEscrowCount: number;
|
|
101
|
+
totalAgentsRegistered: number;
|
|
102
|
+
activeAgentsCount: number;
|
|
103
|
+
}
|
|
104
|
+
interface GqlTransactionLog {
|
|
105
|
+
id: string;
|
|
106
|
+
txHash: string;
|
|
107
|
+
blockNumber: BigIntScalar;
|
|
108
|
+
timestamp: BigIntScalar;
|
|
109
|
+
eventName: string;
|
|
110
|
+
contractAddress: string;
|
|
111
|
+
contractType: string;
|
|
112
|
+
escrowAddress?: Maybe<string>;
|
|
113
|
+
agentAddress?: Maybe<string>;
|
|
114
|
+
userAddress?: Maybe<string>;
|
|
115
|
+
eventData: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Escrow domain module for the Zenland SDK
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
/** State groups for filtering escrows */
|
|
123
|
+
declare const STATE_GROUPS: {
|
|
124
|
+
readonly ACTIVE: readonly ["PENDING", "ACTIVE", "FULFILLED"];
|
|
125
|
+
readonly IN_DISPUTE: readonly ["DISPUTED", "AGENT_INVITED"];
|
|
126
|
+
readonly COMPLETED: readonly ["RELEASED", "AGENT_RESOLVED", "REFUNDED", "SPLIT"];
|
|
127
|
+
};
|
|
128
|
+
type StateGroup = keyof typeof STATE_GROUPS;
|
|
129
|
+
interface ListEscrowsArgs {
|
|
130
|
+
limit?: number;
|
|
131
|
+
offset?: number;
|
|
132
|
+
buyer?: string;
|
|
133
|
+
seller?: string;
|
|
134
|
+
agent?: string;
|
|
135
|
+
/** Search across buyer, seller, or agent roles */
|
|
136
|
+
user?: string;
|
|
137
|
+
state?: string;
|
|
138
|
+
/** Multiple states for group filtering */
|
|
139
|
+
states?: string[];
|
|
140
|
+
orderBy?: string;
|
|
141
|
+
orderDirection?: "asc" | "desc";
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Creates escrow domain functions bound to a base URL
|
|
145
|
+
*/
|
|
146
|
+
declare function createEscrowsDomain(baseUrl: string): {
|
|
147
|
+
list: (args?: ListEscrowsArgs) => Promise<GqlEscrowPage>;
|
|
148
|
+
getById: (id: string) => Promise<GqlEscrow | null>;
|
|
149
|
+
getByUser: (userAddress: string, args?: Omit<ListEscrowsArgs, "user" | "buyer" | "seller" | "agent">) => Promise<GqlEscrowPage>;
|
|
150
|
+
getByStateGroup: (stateGroup: StateGroup, args?: Omit<ListEscrowsArgs, "state" | "states">) => Promise<GqlEscrowPage>;
|
|
151
|
+
};
|
|
152
|
+
type EscrowsDomain = ReturnType<typeof createEscrowsDomain>;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Agent domain module for the Zenland SDK
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
interface ListAgentsArgs {
|
|
159
|
+
limit?: number;
|
|
160
|
+
offset?: number;
|
|
161
|
+
onlyActive?: boolean;
|
|
162
|
+
onlyAvailable?: boolean;
|
|
163
|
+
orderBy?: string;
|
|
164
|
+
orderDirection?: "asc" | "desc";
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Creates agent domain functions bound to a base URL
|
|
168
|
+
*/
|
|
169
|
+
declare function createAgentsDomain(baseUrl: string): {
|
|
170
|
+
list: (args?: ListAgentsArgs) => Promise<GqlAgentPage>;
|
|
171
|
+
getById: (id: string) => Promise<GqlAgent | null>;
|
|
172
|
+
getAvailable: (args?: Omit<ListAgentsArgs, "onlyActive" | "onlyAvailable">) => Promise<GqlAgentPage>;
|
|
173
|
+
};
|
|
174
|
+
type AgentsDomain = ReturnType<typeof createAgentsDomain>;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Protocol Stats domain module for the Zenland SDK
|
|
178
|
+
*/
|
|
179
|
+
|
|
180
|
+
/** Normalized protocol stats with BigInt values */
|
|
181
|
+
interface ProtocolStats {
|
|
182
|
+
id: string;
|
|
183
|
+
totalEscrowsCreated: number;
|
|
184
|
+
totalVolumeEscrowed: bigint;
|
|
185
|
+
totalFeesCollected: bigint;
|
|
186
|
+
currentTVL: bigint;
|
|
187
|
+
activeEscrowCount: number;
|
|
188
|
+
totalAgentsRegistered: number;
|
|
189
|
+
activeAgentsCount: number;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Creates protocol stats domain functions bound to a base URL
|
|
193
|
+
*/
|
|
194
|
+
declare function createProtocolStatsDomain(baseUrl: string): {
|
|
195
|
+
get: () => Promise<ProtocolStats | null>;
|
|
196
|
+
getRaw: () => Promise<GqlProtocolStats | null>;
|
|
197
|
+
};
|
|
198
|
+
type ProtocolStatsDomain = ReturnType<typeof createProtocolStatsDomain>;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Transaction Logs domain module for the Zenland SDK
|
|
202
|
+
*/
|
|
203
|
+
|
|
204
|
+
interface ListTransactionLogsArgs {
|
|
205
|
+
escrowAddress?: string;
|
|
206
|
+
limit?: number;
|
|
207
|
+
offset?: number;
|
|
208
|
+
orderBy?: string;
|
|
209
|
+
orderDirection?: "asc" | "desc";
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Creates transaction logs domain functions bound to a base URL
|
|
213
|
+
*/
|
|
214
|
+
declare function createTransactionLogsDomain(baseUrl: string): {
|
|
215
|
+
list: (args?: ListTransactionLogsArgs) => Promise<GqlTransactionLog[]>;
|
|
216
|
+
getByEscrow: (escrowAddress: string, args?: Omit<ListTransactionLogsArgs, "escrowAddress">) => Promise<GqlTransactionLog[]>;
|
|
217
|
+
parseEventData: (eventData: string) => Record<string, unknown>;
|
|
218
|
+
};
|
|
219
|
+
type TransactionLogsDomain = ReturnType<typeof createTransactionLogsDomain>;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Zenland SDK Client
|
|
223
|
+
*
|
|
224
|
+
* The main entry point for interacting with the Zenland indexer.
|
|
225
|
+
*/
|
|
226
|
+
|
|
227
|
+
interface ZenlandClientConfig {
|
|
228
|
+
/** Base URL for the indexer API. Defaults to https://api.zen.land */
|
|
229
|
+
baseUrl?: string;
|
|
230
|
+
}
|
|
231
|
+
interface ZenlandClient {
|
|
232
|
+
/** The base URL being used by this client */
|
|
233
|
+
readonly baseUrl: string;
|
|
234
|
+
/** Escrow-related operations */
|
|
235
|
+
readonly escrows: EscrowsDomain;
|
|
236
|
+
/** Agent-related operations */
|
|
237
|
+
readonly agents: AgentsDomain;
|
|
238
|
+
/** Protocol statistics */
|
|
239
|
+
readonly protocolStats: ProtocolStatsDomain;
|
|
240
|
+
/** Transaction logs */
|
|
241
|
+
readonly transactionLogs: TransactionLogsDomain;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Create a new Zenland SDK client.
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```typescript
|
|
248
|
+
* // Use production API (default)
|
|
249
|
+
* const client = createZenlandClient();
|
|
250
|
+
*
|
|
251
|
+
* // Use custom endpoint (e.g., local development)
|
|
252
|
+
* const client = createZenlandClient({ baseUrl: 'http://localhost:42069' });
|
|
253
|
+
*
|
|
254
|
+
* // Fetch escrows
|
|
255
|
+
* const { items, totalCount } = await client.escrows.list({ limit: 10 });
|
|
256
|
+
*
|
|
257
|
+
* // Fetch a specific escrow
|
|
258
|
+
* const escrow = await client.escrows.getById('0x...');
|
|
259
|
+
*
|
|
260
|
+
* // Fetch agents
|
|
261
|
+
* const agents = await client.agents.list({ onlyActive: true });
|
|
262
|
+
*
|
|
263
|
+
* // Fetch protocol stats
|
|
264
|
+
* const stats = await client.protocolStats.get();
|
|
265
|
+
* ```
|
|
266
|
+
*/
|
|
267
|
+
declare function createZenlandClient(config?: ZenlandClientConfig): ZenlandClient;
|
|
268
|
+
|
|
269
|
+
interface ZenlandProviderProps {
|
|
270
|
+
children: ReactNode;
|
|
271
|
+
/** Optional configuration for the SDK client */
|
|
272
|
+
config?: ZenlandClientConfig;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Provider component for the Zenland SDK.
|
|
276
|
+
*
|
|
277
|
+
* Wrap your app with this provider to use the React hooks.
|
|
278
|
+
*
|
|
279
|
+
* @example
|
|
280
|
+
* ```tsx
|
|
281
|
+
* import { ZenlandProvider } from '@zenland/sdk/react';
|
|
282
|
+
*
|
|
283
|
+
* function App() {
|
|
284
|
+
* return (
|
|
285
|
+
* <ZenlandProvider>
|
|
286
|
+
* <YourApp />
|
|
287
|
+
* </ZenlandProvider>
|
|
288
|
+
* );
|
|
289
|
+
* }
|
|
290
|
+
*
|
|
291
|
+
* // With custom config
|
|
292
|
+
* <ZenlandProvider config={{ baseUrl: 'http://localhost:42069' }}>
|
|
293
|
+
* <YourApp />
|
|
294
|
+
* </ZenlandProvider>
|
|
295
|
+
* ```
|
|
296
|
+
*/
|
|
297
|
+
declare function ZenlandProvider({ children, config }: ZenlandProviderProps): react_jsx_runtime.JSX.Element;
|
|
298
|
+
/**
|
|
299
|
+
* Hook to access the Zenland SDK client.
|
|
300
|
+
*
|
|
301
|
+
* Must be used within a ZenlandProvider.
|
|
302
|
+
*
|
|
303
|
+
* @example
|
|
304
|
+
* ```tsx
|
|
305
|
+
* import { useZenlandClient } from '@zenland/sdk/react';
|
|
306
|
+
*
|
|
307
|
+
* function MyComponent() {
|
|
308
|
+
* const client = useZenlandClient();
|
|
309
|
+
* // Use client.escrows, client.agents, etc.
|
|
310
|
+
* }
|
|
311
|
+
* ```
|
|
312
|
+
*/
|
|
313
|
+
declare function useZenlandClient(): ZenlandClient;
|
|
314
|
+
/**
|
|
315
|
+
* Hook to access the Zenland SDK client, creating a default one if not in a provider.
|
|
316
|
+
*
|
|
317
|
+
* This is useful for components that might be used outside of a ZenlandProvider.
|
|
318
|
+
*/
|
|
319
|
+
declare function useZenlandClientOptional(): ZenlandClient;
|
|
320
|
+
|
|
321
|
+
interface UseEscrowOptions {
|
|
322
|
+
/** Whether to enable the query */
|
|
323
|
+
enabled?: boolean;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Hook to fetch a single escrow by ID.
|
|
327
|
+
*
|
|
328
|
+
* @example
|
|
329
|
+
* ```tsx
|
|
330
|
+
* import { useEscrow } from '@zenland/sdk/react';
|
|
331
|
+
*
|
|
332
|
+
* function EscrowDetail({ id }: { id: string }) {
|
|
333
|
+
* const { data: escrow, isLoading, error } = useEscrow(id);
|
|
334
|
+
*
|
|
335
|
+
* if (isLoading) return <div>Loading...</div>;
|
|
336
|
+
* if (error) return <div>Error: {error.message}</div>;
|
|
337
|
+
* if (!escrow) return <div>Escrow not found</div>;
|
|
338
|
+
*
|
|
339
|
+
* return <div>{escrow.state}</div>;
|
|
340
|
+
* }
|
|
341
|
+
* ```
|
|
342
|
+
*/
|
|
343
|
+
declare function useEscrow(id: string | undefined, options?: UseEscrowOptions): _tanstack_react_query.UseQueryResult<GqlEscrow | null, Error>;
|
|
344
|
+
|
|
345
|
+
type EscrowRole = "all" | "buyer" | "seller" | "agent";
|
|
346
|
+
type EscrowStateTab = "all" | StateGroup;
|
|
347
|
+
interface UseEscrowsArgs {
|
|
348
|
+
/** User address to filter by */
|
|
349
|
+
address?: string;
|
|
350
|
+
/** Pagination limit */
|
|
351
|
+
limit?: number;
|
|
352
|
+
/** Pagination offset */
|
|
353
|
+
offset?: number;
|
|
354
|
+
/** Filter by role (requires address) */
|
|
355
|
+
role?: EscrowRole;
|
|
356
|
+
/** Filter by state group */
|
|
357
|
+
stateTab?: EscrowStateTab;
|
|
358
|
+
/** Filter by specific state */
|
|
359
|
+
state?: string;
|
|
360
|
+
/** Filter by multiple states */
|
|
361
|
+
states?: string[];
|
|
362
|
+
/** Whether to enable the query */
|
|
363
|
+
enabled?: boolean;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Hook to fetch escrows with filtering and pagination.
|
|
367
|
+
*
|
|
368
|
+
* @example
|
|
369
|
+
* ```tsx
|
|
370
|
+
* import { useEscrows } from '@zenland/sdk/react';
|
|
371
|
+
*
|
|
372
|
+
* function MyEscrows({ address }: { address: string }) {
|
|
373
|
+
* const { data, isLoading } = useEscrows({
|
|
374
|
+
* address,
|
|
375
|
+
* role: 'buyer',
|
|
376
|
+
* stateTab: 'ACTIVE',
|
|
377
|
+
* });
|
|
378
|
+
*
|
|
379
|
+
* if (isLoading) return <div>Loading...</div>;
|
|
380
|
+
*
|
|
381
|
+
* return (
|
|
382
|
+
* <ul>
|
|
383
|
+
* {data?.items.map(escrow => (
|
|
384
|
+
* <li key={escrow.id}>{escrow.state}</li>
|
|
385
|
+
* ))}
|
|
386
|
+
* </ul>
|
|
387
|
+
* );
|
|
388
|
+
* }
|
|
389
|
+
* ```
|
|
390
|
+
*/
|
|
391
|
+
declare function useEscrows(args?: UseEscrowsArgs): _tanstack_react_query.UseQueryResult<GqlEscrowPage, Error>;
|
|
392
|
+
|
|
393
|
+
interface UseAgentOptions {
|
|
394
|
+
/** Whether to enable the query */
|
|
395
|
+
enabled?: boolean;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Hook to fetch a single agent by address.
|
|
399
|
+
*
|
|
400
|
+
* @example
|
|
401
|
+
* ```tsx
|
|
402
|
+
* import { useAgent } from '@zenland/sdk/react';
|
|
403
|
+
*
|
|
404
|
+
* function AgentProfile({ address }: { address: string }) {
|
|
405
|
+
* const { data: agent, isLoading, error } = useAgent(address);
|
|
406
|
+
*
|
|
407
|
+
* if (isLoading) return <div>Loading...</div>;
|
|
408
|
+
* if (error) return <div>Error: {error.message}</div>;
|
|
409
|
+
* if (!agent) return <div>Agent not found</div>;
|
|
410
|
+
*
|
|
411
|
+
* return <div>{agent.description}</div>;
|
|
412
|
+
* }
|
|
413
|
+
* ```
|
|
414
|
+
*/
|
|
415
|
+
declare function useAgent(address: string | undefined, options?: UseAgentOptions): _tanstack_react_query.UseQueryResult<GqlAgent | null, Error>;
|
|
416
|
+
|
|
417
|
+
interface UseAgentsArgs {
|
|
418
|
+
/** Only return active agents */
|
|
419
|
+
onlyActive?: boolean;
|
|
420
|
+
/** Only return available agents */
|
|
421
|
+
onlyAvailable?: boolean;
|
|
422
|
+
/** Pagination limit */
|
|
423
|
+
limit?: number;
|
|
424
|
+
/** Pagination offset */
|
|
425
|
+
offset?: number;
|
|
426
|
+
/** Whether to enable the query */
|
|
427
|
+
enabled?: boolean;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Hook to fetch agents with filtering and pagination.
|
|
431
|
+
*
|
|
432
|
+
* @example
|
|
433
|
+
* ```tsx
|
|
434
|
+
* import { useAgents } from '@zenland/sdk/react';
|
|
435
|
+
*
|
|
436
|
+
* function AgentList() {
|
|
437
|
+
* const { data, isLoading } = useAgents({ onlyActive: true });
|
|
438
|
+
*
|
|
439
|
+
* if (isLoading) return <div>Loading...</div>;
|
|
440
|
+
*
|
|
441
|
+
* return (
|
|
442
|
+
* <ul>
|
|
443
|
+
* {data?.items.map(agent => (
|
|
444
|
+
* <li key={agent.id}>{agent.description}</li>
|
|
445
|
+
* ))}
|
|
446
|
+
* </ul>
|
|
447
|
+
* );
|
|
448
|
+
* }
|
|
449
|
+
* ```
|
|
450
|
+
*/
|
|
451
|
+
declare function useAgents(args?: UseAgentsArgs): _tanstack_react_query.UseQueryResult<GqlAgentPage, Error>;
|
|
452
|
+
|
|
453
|
+
interface UseProtocolStatsOptions {
|
|
454
|
+
/** Whether to enable the query */
|
|
455
|
+
enabled?: boolean;
|
|
456
|
+
/** Stale time in milliseconds (default: 30s) */
|
|
457
|
+
staleTime?: number;
|
|
458
|
+
/** Refetch interval in milliseconds (default: 60s) */
|
|
459
|
+
refetchInterval?: number;
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Hook to fetch global protocol statistics.
|
|
463
|
+
*
|
|
464
|
+
* @example
|
|
465
|
+
* ```tsx
|
|
466
|
+
* import { useProtocolStats } from '@zenland/sdk/react';
|
|
467
|
+
*
|
|
468
|
+
* function ProtocolOverview() {
|
|
469
|
+
* const { data: stats, isLoading } = useProtocolStats();
|
|
470
|
+
*
|
|
471
|
+
* if (isLoading) return <div>Loading...</div>;
|
|
472
|
+
* if (!stats) return <div>Stats not available</div>;
|
|
473
|
+
*
|
|
474
|
+
* return (
|
|
475
|
+
* <div>
|
|
476
|
+
* <p>Total Escrows: {stats.totalEscrowsCreated}</p>
|
|
477
|
+
* <p>TVL: {stats.currentTVL.toString()}</p>
|
|
478
|
+
* </div>
|
|
479
|
+
* );
|
|
480
|
+
* }
|
|
481
|
+
* ```
|
|
482
|
+
*/
|
|
483
|
+
declare function useProtocolStats(options?: UseProtocolStatsOptions): _tanstack_react_query.UseQueryResult<ProtocolStats | null, Error>;
|
|
484
|
+
|
|
485
|
+
interface UseRecentEscrowsOptions {
|
|
486
|
+
/** Number of escrows to fetch (default: 5) */
|
|
487
|
+
limit?: number;
|
|
488
|
+
/** Whether to enable the query */
|
|
489
|
+
enabled?: boolean;
|
|
490
|
+
/** Stale time in milliseconds (default: 15s) */
|
|
491
|
+
staleTime?: number;
|
|
492
|
+
/** Refetch interval in milliseconds (default: 30s) */
|
|
493
|
+
refetchInterval?: number;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Hook to fetch recent escrows for activity feeds.
|
|
497
|
+
*
|
|
498
|
+
* @example
|
|
499
|
+
* ```tsx
|
|
500
|
+
* import { useRecentEscrows } from '@zenland/sdk/react';
|
|
501
|
+
*
|
|
502
|
+
* function ActivityFeed() {
|
|
503
|
+
* const { data: escrows, isLoading } = useRecentEscrows({ limit: 10 });
|
|
504
|
+
*
|
|
505
|
+
* if (isLoading) return <div>Loading...</div>;
|
|
506
|
+
*
|
|
507
|
+
* return (
|
|
508
|
+
* <ul>
|
|
509
|
+
* {escrows?.map(escrow => (
|
|
510
|
+
* <li key={escrow.id}>
|
|
511
|
+
* {escrow.state} - {escrow.amount}
|
|
512
|
+
* </li>
|
|
513
|
+
* ))}
|
|
514
|
+
* </ul>
|
|
515
|
+
* );
|
|
516
|
+
* }
|
|
517
|
+
* ```
|
|
518
|
+
*/
|
|
519
|
+
declare function useRecentEscrows(options?: UseRecentEscrowsOptions): _tanstack_react_query.UseQueryResult<GqlEscrow[], Error>;
|
|
520
|
+
|
|
521
|
+
interface UserDashboardStats {
|
|
522
|
+
activeCount: number;
|
|
523
|
+
disputeCount: number;
|
|
524
|
+
completedCount: number;
|
|
525
|
+
tvl: bigint;
|
|
526
|
+
recentEscrows: GqlEscrow[];
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Hook to fetch user-specific dashboard statistics.
|
|
530
|
+
*/
|
|
531
|
+
declare function useUserStats(userAddress: string | undefined): _tanstack_react_query.UseQueryResult<UserDashboardStats | null, Error>;
|
|
532
|
+
/**
|
|
533
|
+
* Hook to fetch global dashboard statistics.
|
|
534
|
+
*/
|
|
535
|
+
declare function useGlobalStats(): _tanstack_react_query.UseQueryResult<Omit<UserDashboardStats, "tvl"> & {
|
|
536
|
+
tvl: null;
|
|
537
|
+
}, Error>;
|
|
538
|
+
|
|
539
|
+
interface UseTransactionLogsByEscrowOptions {
|
|
540
|
+
/** Whether to enable the query */
|
|
541
|
+
enabled?: boolean;
|
|
542
|
+
/** Stale time in milliseconds (default: 30s) */
|
|
543
|
+
staleTime?: number;
|
|
544
|
+
/** Refetch interval in milliseconds */
|
|
545
|
+
refetchInterval?: number;
|
|
546
|
+
/** Transaction log list options */
|
|
547
|
+
list?: Omit<ListTransactionLogsArgs, "escrowAddress">;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Hook to fetch transaction logs for a specific escrow.
|
|
551
|
+
*/
|
|
552
|
+
declare function useTransactionLogsByEscrow(escrowAddress: string | undefined | null, options?: UseTransactionLogsByEscrowOptions): _tanstack_react_query.UseQueryResult<GqlTransactionLog[], Error>;
|
|
553
|
+
|
|
554
|
+
export { type EscrowRole, type EscrowStateTab, type GqlAgent, type GqlAgentPage, type GqlEscrow, type GqlEscrowPage, type GqlPageInfo, type GqlProtocolStats, type GqlTransactionLog, type ProtocolStats, STATE_GROUPS, type UseAgentOptions, type UseAgentsArgs, type UseEscrowOptions, type UseEscrowsArgs, type UseProtocolStatsOptions, type UseRecentEscrowsOptions, type UseTransactionLogsByEscrowOptions, type UserDashboardStats, type ZenlandClient, type ZenlandClientConfig, ZenlandProvider, type ZenlandProviderProps, createZenlandClient, useAgent, useAgents, useEscrow, useEscrows, useGlobalStats, useProtocolStats, useRecentEscrows, useTransactionLogsByEscrow, useUserStats, useZenlandClient, useZenlandClientOptional };
|