@elisym/sdk 0.1.3 → 0.2.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/dist/index.d.cts CHANGED
@@ -1,16 +1,45 @@
1
+ import { P as PaymentRequestData, a as PaymentValidationError, V as VerifyOptions, b as VerifyResult, S as SubCloser, N as Network, A as Agent, E as ElisymIdentity, C as CapabilityCard, c as SubmitJobOptions, J as JobSubscriptionOptions, d as Job, e as PingResult, f as ElisymClientConfig, g as AgentConfig } from './types-CII4k_8d.cjs';
2
+ export { h as Capability, I as Identity, i as JobStatus, j as JobUpdateCallbacks, L as LlmConfig, k as NetworkStats, l as PaymentAddress, m as PaymentInfo, n as PaymentValidationCode, W as WalletConfig } from './types-CII4k_8d.cjs';
1
3
  import { Filter, Event } from 'nostr-tools';
2
- import { PublicKey, Transaction } from '@solana/web3.js';
4
+ import { Transaction } from '@solana/web3.js';
5
+
6
+ /**
7
+ * Pluggable payment strategy interface.
8
+ * Implement this for each payment chain (Solana, Lightning, Cashu, EVM).
9
+ */
10
+ interface PaymentStrategy {
11
+ readonly chain: string;
12
+ /** Calculate protocol fee using basis-point math. */
13
+ calculateFee(amount: number): number;
14
+ /** Create a payment request with auto-calculated protocol fee. */
15
+ createPaymentRequest(recipientAddress: string, amount: number, expirySecs?: number): PaymentRequestData;
16
+ /**
17
+ * Validate that a payment request has the correct recipient and protocol fee.
18
+ * Returns a typed validation error if invalid, null if OK.
19
+ */
20
+ validatePaymentRequest(requestJson: string, expectedRecipient?: string): PaymentValidationError | null;
21
+ /**
22
+ * Build an unsigned transaction from a payment request.
23
+ * Returns chain-specific transaction type. The caller is responsible for signing and sending.
24
+ * @example For Solana: `const tx = await strategy.buildTransaction(...) as Transaction;`
25
+ */
26
+ buildTransaction(payerAddress: string, paymentRequest: PaymentRequestData): Promise<unknown>;
27
+ /**
28
+ * Verify a payment on-chain.
29
+ * @param connection Chain-specific connection (e.g. Solana `Connection`).
30
+ */
31
+ verifyPayment(connection: unknown, paymentRequest: PaymentRequestData, options?: VerifyOptions): Promise<VerifyResult>;
32
+ }
3
33
 
4
- type SubCloser = {
5
- close: (reason?: string) => void;
6
- };
7
34
  declare class NostrPool {
8
35
  private pool;
9
36
  private relays;
37
+ private activeSubscriptions;
10
38
  constructor(relays?: string[]);
39
+ /** Query relays synchronously. Returns `[]` on timeout (no error thrown). */
11
40
  querySync(filter: Filter): Promise<Event[]>;
12
- queryBatched(filter: Omit<Filter, "authors">, keys: string[], batchSize?: number): Promise<Event[]>;
13
- queryBatchedByTag(filter: Filter, tagName: string, values: string[], batchSize?: number): Promise<Event[]>;
41
+ queryBatched(filter: Omit<Filter, 'authors'>, keys: string[], batchSize?: number, maxConcurrency?: number): Promise<Event[]>;
42
+ queryBatchedByTag(filter: Filter, tagName: string, values: string[], batchSize?: number, maxConcurrency?: number): Promise<Event[]>;
14
43
  publish(event: Event): Promise<void>;
15
44
  /** Publish to all relays and wait for all to settle. Throws if none accepted. */
16
45
  publishAll(event: Event): Promise<void>;
@@ -20,11 +49,15 @@ declare class NostrPool {
20
49
  * is active (EOSE). Resolves on the first relay that responds.
21
50
  * Essential for ephemeral events where the subscription must be live
22
51
  * before publishing.
52
+ *
53
+ * Note: resolves on timeout even if no relay sent EOSE. The caller
54
+ * cannot distinguish timeout from success - this is intentional for
55
+ * best-effort ephemeral event delivery.
23
56
  */
24
57
  subscribeAndWait(filter: Filter, onEvent: (event: Event) => void, timeoutMs?: number): Promise<SubCloser>;
25
58
  /**
26
59
  * Tear down pool and create a fresh one.
27
- * Works around nostr-tools `onerror skipReconnection = true` bug
60
+ * Works around nostr-tools `onerror - skipReconnection = true` bug
28
61
  * that permanently kills subscriptions. Callers must re-subscribe.
29
62
  */
30
63
  reset(): void;
@@ -36,95 +69,20 @@ declare class NostrPool {
36
69
  close(): void;
37
70
  }
38
71
 
39
- declare class ElisymIdentity {
40
- readonly secretKey: Uint8Array;
41
- readonly publicKey: string;
42
- readonly npub: string;
43
- private constructor();
44
- static generate(): ElisymIdentity;
45
- static fromSecretKey(sk: Uint8Array): ElisymIdentity;
46
- static fromHex(hex: string): ElisymIdentity;
47
- }
48
-
49
- interface PaymentInfo {
50
- chain: string;
51
- network: string;
52
- address: string;
53
- job_price?: number;
54
- }
55
- interface CapabilityCard {
56
- name: string;
57
- description: string;
58
- capabilities: string[];
59
- payment?: PaymentInfo;
60
- image?: string;
61
- static?: boolean;
62
- }
63
- interface Agent {
64
- pubkey: string;
65
- npub: string;
66
- cards: CapabilityCard[];
67
- eventId: string;
68
- supportedKinds: number[];
69
- lastSeen: number;
70
- picture?: string;
71
- name?: string;
72
- about?: string;
73
- }
74
- type JobStatus = "payment-required" | "payment-completed" | "processing" | "error" | "success" | "partial";
75
- interface Job {
76
- eventId: string;
77
- customer: string;
78
- agentPubkey?: string;
79
- capability?: string;
80
- bid?: number;
81
- status: JobStatus | string;
82
- result?: string;
83
- resultEventId?: string;
84
- amount?: number;
85
- txHash?: string;
86
- createdAt: number;
87
- }
88
- interface NetworkStats {
89
- totalAgentCount: number;
90
- agentCount: number;
91
- jobCount: number;
92
- totalLamports: number;
93
- }
94
- type Network = "mainnet" | "devnet";
95
- interface PingResult {
96
- online: boolean;
97
- /** The identity used for the ping session — reuse for job submission so pubkeys match. */
98
- identity: ElisymIdentity | null;
99
- }
100
- interface PaymentRequestData {
101
- recipient: string;
102
- amount: number;
103
- reference: string;
104
- description?: string;
105
- fee_address?: string;
106
- fee_amount?: number;
107
- /** Creation timestamp (Unix seconds). */
108
- created_at: number;
109
- /** Expiry duration in seconds. */
110
- expiry_secs: number;
111
- }
112
- interface ElisymClientConfig {
113
- relays?: string[];
114
- }
115
-
116
- /** Convert a capability name to its Nostr d-tag form. */
72
+ /** Convert a capability name to its Nostr d-tag form (ASCII-only, lowercase, hyphen-separated). */
117
73
  declare function toDTag(name: string): string;
118
74
  declare class DiscoveryService {
119
75
  private pool;
120
- private allSeenAgents;
121
76
  constructor(pool: NostrPool);
122
77
  /** Count elisym agents (kind:31990 with "elisym" tag). */
123
78
  fetchAllAgentCount(): Promise<number>;
124
79
  /**
125
80
  * Fetch a single page of elisym agents with relay-side pagination.
126
81
  * Uses `until` cursor for Nostr cursor-based pagination.
127
- * Does NOT fetch activity (faster than fetchAgents).
82
+ *
83
+ * Unlike `fetchAgents`, this method does NOT enrich agents with
84
+ * kind:0 metadata (name, picture, about) or update `lastSeen` from
85
+ * recent job activity. Call `enrichWithMetadata()` separately if needed.
128
86
  */
129
87
  fetchAgentsPage(network?: Network, limit?: number, until?: number): Promise<{
130
88
  agents: Agent[];
@@ -135,10 +93,14 @@ declare class DiscoveryService {
135
93
  enrichWithMetadata(agents: Agent[]): Promise<Agent[]>;
136
94
  /** Fetch elisym agents filtered by network. */
137
95
  fetchAgents(network?: Network, limit?: number): Promise<Agent[]>;
138
- /** Publish a capability card (kind:31990) as a provider. */
96
+ /**
97
+ * Publish a capability card (kind:31990) as a provider.
98
+ * Solana address is validated for Base58 format only - full decode
99
+ * validation (32-byte public key) happens at payment time.
100
+ */
139
101
  publishCapability(identity: ElisymIdentity, card: CapabilityCard, kinds?: number[]): Promise<string>;
140
102
  /** Publish a Nostr profile (kind:0) as a provider. */
141
- publishProfile(identity: ElisymIdentity, name: string, about: string, picture?: string): Promise<string>;
103
+ publishProfile(identity: ElisymIdentity, name: string, about: string, picture?: string, banner?: string): Promise<string>;
142
104
  /**
143
105
  * Delete a capability by publishing a tombstone replacement.
144
106
  * Since kind:31990 is a parameterized replaceable event,
@@ -148,18 +110,6 @@ declare class DiscoveryService {
148
110
  deleteCapability(identity: ElisymIdentity, capabilityName: string): Promise<string>;
149
111
  }
150
112
 
151
- interface SubmitJobOptions {
152
- input: string;
153
- capability: string;
154
- providerPubkey?: string;
155
- /** Kind offset (default 100 → kind 5100). */
156
- kindOffset?: number;
157
- }
158
- interface JobUpdateCallbacks {
159
- onFeedback?: (status: string, amount?: number, paymentRequest?: string) => void;
160
- onResult?: (content: string, eventId: string) => void;
161
- onError?: (error: string) => void;
162
- }
163
113
  declare class MarketplaceService {
164
114
  private pool;
165
115
  constructor(pool: NostrPool);
@@ -167,22 +117,48 @@ declare class MarketplaceService {
167
117
  submitJobRequest(identity: ElisymIdentity, options: SubmitJobOptions): Promise<string>;
168
118
  /**
169
119
  * Subscribe to job updates (feedback + results) for a given job.
170
- * Returns a cleanup function.
120
+ * Creates 3 subscriptions per call (feedback, result by #e, result by #p+#e)
121
+ * to cover different relay indexing strategies. Returns a cleanup function.
171
122
  */
172
- subscribeToJobUpdates(jobEventId: string, providerPubkey: string | undefined, customerPublicKey: string, callbacks: JobUpdateCallbacks, timeoutMs?: number, customerSecretKey?: Uint8Array,
173
- /** Kind offsets to listen for (default [100]). */
174
- kindOffsets?: number[]): () => void;
123
+ subscribeToJobUpdates(options: JobSubscriptionOptions): () => void;
175
124
  /** Submit payment confirmation feedback. */
176
125
  submitPaymentConfirmation(identity: ElisymIdentity, jobEventId: string, providerPubkey: string, txSignature: string): Promise<void>;
177
126
  /** Submit rating feedback for a job. */
178
127
  submitFeedback(identity: ElisymIdentity, jobEventId: string, providerPubkey: string, positive: boolean, capability?: string): Promise<void>;
179
- /** Subscribe to incoming job requests for specific kinds. */
128
+ /**
129
+ * Subscribe to incoming job requests for specific kinds.
130
+ * Automatically decrypts NIP-44 encrypted content.
131
+ * Note: decrypted events have modified `content` - do not call `verifyEvent()` on them.
132
+ * Signature verification is performed before decryption.
133
+ */
180
134
  subscribeToJobRequests(identity: ElisymIdentity, kinds: number[], onRequest: (event: Event) => void): SubCloser;
181
135
  /** Submit a job result with NIP-44 encrypted content. Result kind is derived from the request kind. */
182
136
  submitJobResult(identity: ElisymIdentity, requestEvent: Event, content: string, amount?: number): Promise<string>;
137
+ /**
138
+ * Submit a job result with retry and exponential backoff.
139
+ * Retries on publish failures (e.g. relay disconnects).
140
+ * With maxAttempts=3: try, ~1s, try, ~2s, try, throw.
141
+ * Jitter: 0.5x-1.0x of calculated delay.
142
+ */
143
+ submitJobResultWithRetry(identity: ElisymIdentity, requestEvent: Event, content: string, amount?: number, maxAttempts?: number, baseDelayMs?: number): Promise<string>;
183
144
  /** Submit payment-required feedback with a payment request. */
184
145
  submitPaymentRequiredFeedback(identity: ElisymIdentity, requestEvent: Event, amount: number, paymentRequestJson: string): Promise<void>;
185
- /** Fetch recent jobs from the network. */
146
+ /** Submit processing feedback to notify customer that work has started. */
147
+ submitProcessingFeedback(identity: ElisymIdentity, requestEvent: Event): Promise<void>;
148
+ /** Submit error feedback to notify customer of a failure. */
149
+ submitErrorFeedback(identity: ElisymIdentity, requestEvent: Event, message: string): Promise<void>;
150
+ /** Query job results by request IDs and decrypt NIP-44 content. */
151
+ queryJobResults(identity: ElisymIdentity, requestIds: string[], kindOffsets?: number[], providerPubkey?: string): Promise<Map<string, {
152
+ content: string;
153
+ amount?: number;
154
+ senderPubkey: string;
155
+ decryptionFailed: boolean;
156
+ }>>;
157
+ /**
158
+ * Fetch recent jobs from the network.
159
+ * NOTE: Job.result contains raw event content. For encrypted jobs,
160
+ * this will be NIP-44 ciphertext - use queryJobResults() for decryption.
161
+ */
186
162
  fetchRecentJobs(agentPubkeys?: Set<string>, limit?: number, since?: number,
187
163
  /** Kind offsets to query (default [100]). */
188
164
  kindOffsets?: number[]): Promise<Job[]>;
@@ -190,12 +166,36 @@ declare class MarketplaceService {
190
166
  subscribeToEvents(kinds: number[], onEvent: (event: Event) => void): SubCloser;
191
167
  }
192
168
 
169
+ declare class MediaService {
170
+ private uploadUrl;
171
+ constructor(uploadUrl?: string);
172
+ /**
173
+ * Upload a file with NIP-98 authentication.
174
+ * Works with browser File objects and Node.js/Bun Blobs.
175
+ *
176
+ * @param identity - Nostr identity used to sign the NIP-98 auth event.
177
+ * @param file - File or Blob to upload.
178
+ * @param filename - Optional filename for the upload (defaults to "upload").
179
+ * @returns URL of the uploaded file.
180
+ */
181
+ upload(identity: ElisymIdentity, file: Blob, filename?: string): Promise<string>;
182
+ }
183
+
184
+ /**
185
+ * Ping/pong and NIP-17 DM service.
186
+ *
187
+ * Uses a session identity (random keypair) for ping operations to avoid
188
+ * relay rate-limiting. The session identity persists for the lifetime of
189
+ * this instance - recreating the service generates a new keypair.
190
+ *
191
+ * Requires `globalThis.crypto` (Node 20+, Bun, browsers).
192
+ */
193
193
  declare class MessagingService {
194
194
  private pool;
195
+ private static readonly PING_CACHE_MAX;
195
196
  private sessionIdentity;
196
197
  private pingCache;
197
198
  private pendingPings;
198
- private static PING_CACHE_TTL;
199
199
  constructor(pool: NostrPool);
200
200
  /**
201
201
  * Ping an agent via ephemeral Nostr events (kind 20200/20201).
@@ -203,7 +203,8 @@ declare class MessagingService {
203
203
  * Publishes to ALL relays for maximum delivery reliability.
204
204
  * Caches results for 30s to prevent redundant publishes.
205
205
  */
206
- pingAgent(agentPubkey: string, timeoutMs?: number, signal?: AbortSignal): Promise<PingResult>;
206
+ pingAgent(agentPubkey: string, timeoutMs?: number, signal?: AbortSignal, retries?: number): Promise<PingResult>;
207
+ private _doPingWithRetry;
207
208
  private _doPing;
208
209
  /**
209
210
  * Subscribe to incoming ephemeral ping events (kind 20200).
@@ -225,34 +226,81 @@ declare class MessagingService {
225
226
  subscribeToMessages(identity: ElisymIdentity, onMessage: (senderPubkey: string, content: string, createdAt: number, rumorId: string) => void, since?: number): SubCloser;
226
227
  }
227
228
 
228
- declare class PaymentService {
229
- /**
230
- * Calculate protocol fee using Decimal basis-point math (no floats).
231
- * Returns ceil(amount * PROTOCOL_FEE_BPS / 10000).
232
- */
233
- static calculateProtocolFee(amount: number): number;
234
- /**
235
- * Validate that a payment request has the correct recipient and protocol fee.
236
- * Returns an error message if invalid, null if OK.
237
- */
238
- static validatePaymentFee(requestJson: string, expectedRecipient?: string): string | null;
239
- /**
240
- * Build a Solana transaction from a payment request.
241
- * The caller must sign and send via wallet adapter.
242
- */
243
- static buildPaymentTransaction(payerPubkey: PublicKey, paymentRequest: PaymentRequestData): Transaction;
229
+ interface ElisymClientFullConfig extends ElisymClientConfig {
230
+ payment?: PaymentStrategy;
231
+ /** Custom upload URL for file uploads (defaults to nostr.build). */
232
+ uploadUrl?: string;
233
+ }
234
+ declare class ElisymClient {
235
+ readonly pool: NostrPool;
236
+ readonly discovery: DiscoveryService;
237
+ readonly marketplace: MarketplaceService;
238
+ readonly messaging: MessagingService;
239
+ readonly media: MediaService;
240
+ readonly payment: PaymentStrategy;
241
+ constructor(config?: ElisymClientFullConfig);
242
+ close(): void;
243
+ }
244
+
245
+ declare class SolanaPaymentStrategy implements PaymentStrategy {
246
+ readonly chain = "solana";
247
+ calculateFee(amount: number): number;
248
+ createPaymentRequest(recipientAddress: string, amount: number, expirySecs?: number): PaymentRequestData;
249
+ validatePaymentRequest(requestJson: string, expectedRecipient?: string): PaymentValidationError | null;
244
250
  /**
245
- * Create a payment request with auto-calculated protocol fee.
246
- * Used by providers to generate payment requests for customers.
251
+ * Build an unsigned transaction from a payment request.
252
+ * The caller must set `recentBlockhash` and `feePayer` on the
253
+ * returned Transaction before signing and sending.
247
254
  */
248
- static createPaymentRequest(recipientAddress: string, amount: number, expirySecs?: number): PaymentRequestData;
255
+ buildTransaction(payerAddress: string, paymentRequest: PaymentRequestData): Promise<Transaction>;
256
+ verifyPayment(connection: unknown, paymentRequest: PaymentRequestData, options?: VerifyOptions): Promise<VerifyResult>;
257
+ private _verifyBySignature;
258
+ private _verifyByReference;
249
259
  }
250
260
 
261
+ /** Assert that a value is a non-negative integer (lamports). */
262
+ declare function assertLamports(value: number, field: string): void;
263
+ /**
264
+ * Calculate protocol fee using Decimal basis-point math (no floats).
265
+ * Returns ceil(amount * PROTOCOL_FEE_BPS / 10000).
266
+ * Safe for amounts up to Number.MAX_SAFE_INTEGER - Decimal handles intermediate values.
267
+ */
268
+ declare function calculateProtocolFee(amount: number): number;
269
+ /** Validate payment request timestamps. Returns error message or null if valid. */
270
+ declare function validateExpiry(createdAt: number, expirySecs: number): string | null;
271
+ /** Assert that payment request timestamps are valid and not expired. Throws on failure. */
272
+ declare function assertExpiry(createdAt: number, expirySecs: number): void;
273
+
274
+ /** Encrypt plaintext using NIP-44 v2 (sender secret key + recipient public key). */
275
+ declare function nip44Encrypt(plaintext: string, senderSk: Uint8Array, recipientPubkey: string): string;
276
+ /** Decrypt ciphertext using NIP-44 v2 (receiver secret key + sender public key). */
277
+ declare function nip44Decrypt(ciphertext: string, receiverSk: Uint8Array, senderPubkey: string): string;
278
+
251
279
  declare function formatSol(lamports: number): string;
252
280
  declare function timeAgo(unix: number): string;
253
281
  declare function truncateKey(hex: string, chars?: number): string;
254
282
 
255
- declare function makeNjumpUrl(eventId: string, relays?: string[]): string;
283
+ /**
284
+ * Shared agent config - validation and serialization.
285
+ * Browser-safe - no Node.js imports.
286
+ * parseConfig lives in config-node.ts (exported from @elisym/sdk/node).
287
+ */
288
+
289
+ declare function validateAgentName(name: string): void;
290
+ /** Serialize an AgentConfig to JSON string. */
291
+ declare function serializeConfig(config: AgentConfig): string;
292
+
293
+ /** A Set that evicts the oldest entries when it exceeds maxSize. Uses a ring buffer for O(1) eviction. */
294
+ declare class BoundedSet<T> {
295
+ private maxSize;
296
+ private items;
297
+ private set;
298
+ private head;
299
+ private count;
300
+ constructor(maxSize: number);
301
+ has(item: T): boolean;
302
+ add(item: T): void;
303
+ }
256
304
 
257
305
  declare const RELAYS: string[];
258
306
  declare const KIND_APP_HANDLER = 31990;
@@ -277,14 +325,34 @@ declare const LAMPORTS_PER_SOL = 1000000000;
277
325
  declare const PROTOCOL_FEE_BPS = 300;
278
326
  /** Solana address of the protocol treasury. */
279
327
  declare const PROTOCOL_TREASURY = "GY7vnWMkKpftU4nQ16C2ATkj1JwrQpHhknkaBUn67VTy";
328
+ /** Default values for timeouts, retries, and batch sizes. */
329
+ declare const DEFAULTS: {
330
+ readonly SUBSCRIPTION_TIMEOUT_MS: 120000;
331
+ readonly PING_TIMEOUT_MS: 15000;
332
+ readonly PING_RETRIES: 2;
333
+ readonly PING_CACHE_TTL_MS: 30000;
334
+ readonly PAYMENT_EXPIRY_SECS: 600;
335
+ readonly BATCH_SIZE: 250;
336
+ readonly QUERY_TIMEOUT_MS: 15000;
337
+ readonly EOSE_TIMEOUT_MS: 3000;
338
+ readonly VERIFY_RETRIES: 10;
339
+ readonly VERIFY_INTERVAL_MS: 3000;
340
+ readonly VERIFY_BY_REF_RETRIES: 15;
341
+ readonly VERIFY_BY_REF_INTERVAL_MS: 2000;
342
+ readonly RESULT_RETRY_COUNT: 3;
343
+ readonly RESULT_RETRY_BASE_MS: 1000;
344
+ readonly QUERY_MAX_CONCURRENCY: 6;
345
+ readonly VERIFY_SIGNATURE_LIMIT: 25;
346
+ };
347
+ /** Protocol limits for input validation. */
348
+ declare const LIMITS: {
349
+ readonly MAX_INPUT_LENGTH: 100000;
350
+ readonly MAX_TIMEOUT_SECS: 600;
351
+ readonly MAX_CAPABILITIES: 20;
352
+ readonly MAX_DESCRIPTION_LENGTH: 500;
353
+ readonly MAX_AGENT_NAME_LENGTH: 64;
354
+ readonly MAX_MESSAGE_LENGTH: 10000;
355
+ readonly MAX_CAPABILITY_LENGTH: 64;
356
+ };
280
357
 
281
- declare class ElisymClient {
282
- readonly pool: NostrPool;
283
- readonly discovery: DiscoveryService;
284
- readonly marketplace: MarketplaceService;
285
- readonly messaging: MessagingService;
286
- constructor(config?: ElisymClientConfig);
287
- close(): void;
288
- }
289
-
290
- export { type Agent, type CapabilityCard, DEFAULT_KIND_OFFSET, DiscoveryService, ElisymClient, type ElisymClientConfig, ElisymIdentity, type Job, type JobStatus, type JobUpdateCallbacks, KIND_APP_HANDLER, KIND_GIFT_WRAP, KIND_JOB_FEEDBACK, KIND_JOB_REQUEST, KIND_JOB_REQUEST_BASE, KIND_JOB_RESULT, KIND_JOB_RESULT_BASE, KIND_PING, KIND_PONG, LAMPORTS_PER_SOL, MarketplaceService, MessagingService, type Network, type NetworkStats, NostrPool, PROTOCOL_FEE_BPS, PROTOCOL_TREASURY, type PaymentInfo, type PaymentRequestData, PaymentService, type PingResult, RELAYS, type SubCloser, type SubmitJobOptions, formatSol, jobRequestKind, jobResultKind, makeNjumpUrl, timeAgo, toDTag, truncateKey };
358
+ export { Agent, AgentConfig, BoundedSet, CapabilityCard, DEFAULTS, DEFAULT_KIND_OFFSET, DiscoveryService, ElisymClient, ElisymClientConfig, type ElisymClientFullConfig, ElisymIdentity, Job, JobSubscriptionOptions, KIND_APP_HANDLER, KIND_GIFT_WRAP, KIND_JOB_FEEDBACK, KIND_JOB_REQUEST, KIND_JOB_REQUEST_BASE, KIND_JOB_RESULT, KIND_JOB_RESULT_BASE, KIND_PING, KIND_PONG, LAMPORTS_PER_SOL, LIMITS, MarketplaceService, MediaService, MessagingService, Network, NostrPool, PROTOCOL_FEE_BPS, PROTOCOL_TREASURY, PaymentRequestData, type PaymentStrategy, PaymentValidationError, PingResult, RELAYS, SolanaPaymentStrategy, SubCloser, SubmitJobOptions, VerifyOptions, VerifyResult, assertExpiry, assertLamports, calculateProtocolFee, formatSol, jobRequestKind, jobResultKind, nip44Decrypt, nip44Encrypt, serializeConfig, timeAgo, toDTag, truncateKey, validateAgentName, validateExpiry };