@elisym/sdk 0.24.1 → 0.25.1

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.ts CHANGED
@@ -50,6 +50,51 @@ declare const FileTransportSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<
50
50
  }, {
51
51
  kind: "iroh";
52
52
  ticket: string;
53
+ }>, z.ZodObject<{
54
+ kind: z.ZodLiteral<"blossom">;
55
+ /** Public HTTP(S) URL of the CIPHERTEXT blob on a Blossom relay. */
56
+ url: z.ZodString;
57
+ /** sha256 (lowercase hex) of the ciphertext - what the relay stores and addresses. */
58
+ sha256: z.ZodString;
59
+ /**
60
+ * Hybrid-encryption parameters. The file bytes are AES-256-GCM encrypted with a random
61
+ * content key; that key is NIP-44-wrapped to the recipient. `name`/`mime`/`size` on the
62
+ * attachment describe the PLAINTEXT and live only inside the (encrypted) envelope - never
63
+ * sent to the relay (the relay only ever sees opaque ciphertext).
64
+ */
65
+ enc: z.ZodObject<{
66
+ alg: z.ZodLiteral<"AES-256-GCM">;
67
+ /** base64 12-byte GCM IV (non-secret). */
68
+ iv: z.ZodString;
69
+ /** NIP-44-wrapped content key. */
70
+ key: z.ZodString;
71
+ }, "strip", z.ZodTypeAny, {
72
+ alg: "AES-256-GCM";
73
+ iv: string;
74
+ key: string;
75
+ }, {
76
+ alg: "AES-256-GCM";
77
+ iv: string;
78
+ key: string;
79
+ }>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ kind: "blossom";
82
+ url: string;
83
+ sha256: string;
84
+ enc: {
85
+ alg: "AES-256-GCM";
86
+ iv: string;
87
+ key: string;
88
+ };
89
+ }, {
90
+ kind: "blossom";
91
+ url: string;
92
+ sha256: string;
93
+ enc: {
94
+ alg: "AES-256-GCM";
95
+ iv: string;
96
+ key: string;
97
+ };
53
98
  }>]>;
54
99
  declare const FileAttachmentSchema: z.ZodObject<{
55
100
  /** Display name only. Never used to derive a filesystem path (callers sanitize). */
@@ -57,37 +102,62 @@ declare const FileAttachmentSchema: z.ZodObject<{
57
102
  /** Declared size in bytes (display/hint only; enforcement is on actual streamed bytes). */
58
103
  size: z.ZodNumber;
59
104
  mime: z.ZodString;
60
- /** Ordered by sender preference; at least one. */
61
- transports: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
62
- kind: z.ZodLiteral<"iroh">;
63
- /** Opaque iroh `BlobTicket` string. Parsed into a real ticket only at fetch time. */
64
- ticket: z.ZodString;
65
- }, "strip", z.ZodTypeAny, {
105
+ /**
106
+ * Ordered by sender preference; at least one KNOWN transport. Parsed leniently: unknown
107
+ * transport `kind`s are dropped (not rejected) so adding a new transport never makes an older
108
+ * decoder throw away the whole envelope - it just ignores the kinds it doesn't know and uses
109
+ * the ones it does. At least one known transport must survive, else the attachment is invalid.
110
+ */
111
+ transports: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, ({
66
112
  kind: "iroh";
67
113
  ticket: string;
68
- }, {
114
+ } | {
115
+ kind: "blossom";
116
+ url: string;
117
+ sha256: string;
118
+ enc: {
119
+ alg: "AES-256-GCM";
120
+ iv: string;
121
+ key: string;
122
+ };
123
+ })[], unknown[]>, ({
69
124
  kind: "iroh";
70
125
  ticket: string;
71
- }>]>, "many">;
126
+ } | {
127
+ kind: "blossom";
128
+ url: string;
129
+ sha256: string;
130
+ enc: {
131
+ alg: "AES-256-GCM";
132
+ iv: string;
133
+ key: string;
134
+ };
135
+ })[], unknown[]>;
72
136
  /** Optional provider hint (unix seconds) for when seeding may stop. */
73
137
  seedingExpiresAt: z.ZodOptional<z.ZodNumber>;
74
138
  }, "strip", z.ZodTypeAny, {
75
139
  name: string;
76
140
  size: number;
77
141
  mime: string;
78
- transports: {
142
+ transports: ({
79
143
  kind: "iroh";
80
144
  ticket: string;
81
- }[];
145
+ } | {
146
+ kind: "blossom";
147
+ url: string;
148
+ sha256: string;
149
+ enc: {
150
+ alg: "AES-256-GCM";
151
+ iv: string;
152
+ key: string;
153
+ };
154
+ })[];
82
155
  seedingExpiresAt?: number | undefined;
83
156
  }, {
84
157
  name: string;
85
158
  size: number;
86
159
  mime: string;
87
- transports: {
88
- kind: "iroh";
89
- ticket: string;
90
- }[];
160
+ transports: unknown[];
91
161
  seedingExpiresAt?: number | undefined;
92
162
  }>;
93
163
  declare const JobPayloadEnvelopeSchema: z.ZodObject<{
@@ -99,37 +169,62 @@ declare const JobPayloadEnvelopeSchema: z.ZodObject<{
99
169
  /** Declared size in bytes (display/hint only; enforcement is on actual streamed bytes). */
100
170
  size: z.ZodNumber;
101
171
  mime: z.ZodString;
102
- /** Ordered by sender preference; at least one. */
103
- transports: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
104
- kind: z.ZodLiteral<"iroh">;
105
- /** Opaque iroh `BlobTicket` string. Parsed into a real ticket only at fetch time. */
106
- ticket: z.ZodString;
107
- }, "strip", z.ZodTypeAny, {
172
+ /**
173
+ * Ordered by sender preference; at least one KNOWN transport. Parsed leniently: unknown
174
+ * transport `kind`s are dropped (not rejected) so adding a new transport never makes an older
175
+ * decoder throw away the whole envelope - it just ignores the kinds it doesn't know and uses
176
+ * the ones it does. At least one known transport must survive, else the attachment is invalid.
177
+ */
178
+ transports: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, ({
108
179
  kind: "iroh";
109
180
  ticket: string;
110
- }, {
181
+ } | {
182
+ kind: "blossom";
183
+ url: string;
184
+ sha256: string;
185
+ enc: {
186
+ alg: "AES-256-GCM";
187
+ iv: string;
188
+ key: string;
189
+ };
190
+ })[], unknown[]>, ({
111
191
  kind: "iroh";
112
192
  ticket: string;
113
- }>]>, "many">;
193
+ } | {
194
+ kind: "blossom";
195
+ url: string;
196
+ sha256: string;
197
+ enc: {
198
+ alg: "AES-256-GCM";
199
+ iv: string;
200
+ key: string;
201
+ };
202
+ })[], unknown[]>;
114
203
  /** Optional provider hint (unix seconds) for when seeding may stop. */
115
204
  seedingExpiresAt: z.ZodOptional<z.ZodNumber>;
116
205
  }, "strip", z.ZodTypeAny, {
117
206
  name: string;
118
207
  size: number;
119
208
  mime: string;
120
- transports: {
209
+ transports: ({
121
210
  kind: "iroh";
122
211
  ticket: string;
123
- }[];
212
+ } | {
213
+ kind: "blossom";
214
+ url: string;
215
+ sha256: string;
216
+ enc: {
217
+ alg: "AES-256-GCM";
218
+ iv: string;
219
+ key: string;
220
+ };
221
+ })[];
124
222
  seedingExpiresAt?: number | undefined;
125
223
  }, {
126
224
  name: string;
127
225
  size: number;
128
226
  mime: string;
129
- transports: {
130
- kind: "iroh";
131
- ticket: string;
132
- }[];
227
+ transports: unknown[];
133
228
  seedingExpiresAt?: number | undefined;
134
229
  }>>;
135
230
  }, "strip", z.ZodTypeAny, {
@@ -139,10 +234,19 @@ declare const JobPayloadEnvelopeSchema: z.ZodObject<{
139
234
  name: string;
140
235
  size: number;
141
236
  mime: string;
142
- transports: {
237
+ transports: ({
143
238
  kind: "iroh";
144
239
  ticket: string;
145
- }[];
240
+ } | {
241
+ kind: "blossom";
242
+ url: string;
243
+ sha256: string;
244
+ enc: {
245
+ alg: "AES-256-GCM";
246
+ iv: string;
247
+ key: string;
248
+ };
249
+ })[];
146
250
  seedingExpiresAt?: number | undefined;
147
251
  } | undefined;
148
252
  }, {
@@ -152,16 +256,29 @@ declare const JobPayloadEnvelopeSchema: z.ZodObject<{
152
256
  name: string;
153
257
  size: number;
154
258
  mime: string;
155
- transports: {
156
- kind: "iroh";
157
- ticket: string;
158
- }[];
259
+ transports: unknown[];
159
260
  seedingExpiresAt?: number | undefined;
160
261
  } | undefined;
161
262
  }>;
162
263
  type FileTransport = z.infer<typeof FileTransportSchema>;
163
264
  type FileAttachment = z.infer<typeof FileAttachmentSchema>;
164
265
  type JobPayloadEnvelope = z.infer<typeof JobPayloadEnvelopeSchema>;
266
+ /** The kinds of file transport a job can use ('iroh' | 'blossom'). */
267
+ type TransportKind = FileTransport['kind'];
268
+ /** Public job-request tag advertising which transports a customer can RECEIVE output on. */
269
+ declare const ACCEPT_TRANSPORTS_TAG = "accept";
270
+ /**
271
+ * Build the `['accept', ...kinds]` job-request tag from a client's RECEIVE-capable transports.
272
+ * Drops unknown kinds and dedupes, preserving the client's preference order.
273
+ */
274
+ declare function buildAcceptTransportsTag(kinds: TransportKind[]): string[];
275
+ /**
276
+ * Read accepted transports from an event's tags. Returns the ordered, deduped, known kinds, or
277
+ * `undefined` when there is no `accept` tag or it carries no known kind - both normalize to the
278
+ * provider's default (seed all transports). Lenient: unknown kinds (from a newer client) are ignored
279
+ * so this never strands a job.
280
+ */
281
+ declare function readAcceptedTransports(tags: string[][]): TransportKind[] | undefined;
165
282
  /** Decoded job payload: a free-text note and/or a file attachment. */
166
283
  interface DecodedJobPayload {
167
284
  text?: string;
@@ -329,6 +446,12 @@ interface SubmitJobOptions {
329
446
  * itself travels out-of-band (P2P via iroh), not in the Nostr event.
330
447
  */
331
448
  attachment?: FileAttachment;
449
+ /**
450
+ * Ordered (by client preference) transports this customer can RECEIVE output on. Published as a
451
+ * public `accept` tag. When omitted, providers default to seeding all transports (back-compat);
452
+ * advertising `['iroh']` makes a provider skip the (encrypted-Blossom) upload it can't use.
453
+ */
454
+ acceptTransports?: TransportKind[];
332
455
  }
333
456
  interface JobUpdateCallbacks {
334
457
  onFeedback?: (status: string, amount?: number, paymentRequest?: string, senderPubkey?: string) => void;
@@ -527,6 +650,53 @@ interface BuildTransactionOptions {
527
650
  programId?: Address;
528
651
  }
529
652
 
653
+ /** Result of an upload. */
654
+ interface BlobDescriptor {
655
+ /**
656
+ * Publicly GET-able URL. Content-addressed (https://<host>/<sha256>.<ext>) ONLY when
657
+ * `provider === 'blossom'`; on `'fallback'` it is a provider-assigned nostr.build URL
658
+ * that may NOT be addressed by `sha256` (the host may re-encode the bytes).
659
+ */
660
+ url: string;
661
+ /**
662
+ * Lowercase-hex SHA-256 of the bytes the caller uploaded. On `'blossom'` it is also
663
+ * verified to equal what the server stored (integrity check). On `'fallback'` it is the
664
+ * local hash only - do NOT assume `url` resolves to it.
665
+ */
666
+ sha256: string;
667
+ size: number;
668
+ type: string;
669
+ /** Unix seconds; only the Blossom path returns it. */
670
+ uploaded?: number;
671
+ provider: 'blossom' | 'fallback';
672
+ }
673
+ /** Fallback uploader invoked when the Blossom upload fails; returns the stored URL. */
674
+ type BlossomUploadFallback = (identity: ElisymIdentity, file: Blob) => Promise<string>;
675
+ declare class BlossomService {
676
+ private serverUrl;
677
+ private fallback?;
678
+ constructor(serverUrl?: string, fallback?: BlossomUploadFallback | undefined);
679
+ /**
680
+ * Upload a file to the Blossom server, returning its descriptor. On any failure, falls
681
+ * back to the configured uploader (if any) and returns a normalized descriptor with
682
+ * `provider: 'fallback'`. Works with browser File objects and Node.js/Bun Blobs.
683
+ */
684
+ upload(identity: ElisymIdentity, file: Blob): Promise<BlobDescriptor>;
685
+ /** Delete a blob by sha256 (BUD-02). Blossom only - there is no fallback for deletes. */
686
+ delete(identity: ElisymIdentity, sha256: string): Promise<void>;
687
+ /**
688
+ * Download a public blob (BUD-01 GET, no auth). Bounds memory on the ACTUAL streamed bytes (never
689
+ * the declared Content-Length) and verifies the sha256 when `expectedSha256` is given. Browser-safe.
690
+ */
691
+ download(url: string, opts?: {
692
+ maxBytes?: number;
693
+ timeoutMs?: number;
694
+ expectedSha256?: string;
695
+ }): Promise<Uint8Array>;
696
+ private uploadToBlossom;
697
+ private authHeader;
698
+ }
699
+
530
700
  declare class NostrPool {
531
701
  private pool;
532
702
  private relays;
@@ -855,6 +1025,8 @@ interface ElisymClientFullConfig extends ElisymClientConfig {
855
1025
  payment?: PaymentStrategy;
856
1026
  /** Custom upload URL for file uploads (defaults to nostr.build). */
857
1027
  uploadUrl?: string;
1028
+ /** Custom Blossom server base URL for blob uploads (defaults to files.elisym.network). */
1029
+ blossomUrl?: string;
858
1030
  }
859
1031
  declare class ElisymClient {
860
1032
  readonly pool: NostrPool;
@@ -862,12 +1034,87 @@ declare class ElisymClient {
862
1034
  readonly marketplace: MarketplaceService;
863
1035
  readonly ping: PingService;
864
1036
  readonly media: MediaService;
1037
+ readonly blossom: BlossomService;
865
1038
  readonly policies: PoliciesService;
866
1039
  readonly payment: PaymentStrategy;
867
1040
  constructor(config?: ElisymClientFullConfig);
868
1041
  close(): void;
869
1042
  }
870
1043
 
1044
+ type BlossomTransport = Extract<FileTransport, {
1045
+ kind: 'blossom';
1046
+ }>;
1047
+ interface BlossomBlobTransport {
1048
+ /** Encrypt `bytes` to `recipientPubkey`, upload the ciphertext, return a `blossom` transport member. */
1049
+ seedBytes(args: {
1050
+ bytes: Uint8Array;
1051
+ recipientPubkey: string;
1052
+ }): Promise<BlossomTransport>;
1053
+ /** Download the ciphertext (bounded + sha256-verified) and decrypt it (sent by `senderPubkey`). */
1054
+ fetchToBytes(args: {
1055
+ transport: BlossomTransport;
1056
+ senderPubkey: string;
1057
+ maxBytes?: number;
1058
+ }): Promise<Uint8Array>;
1059
+ }
1060
+ declare function createBlossomTransport(opts: {
1061
+ blossom: BlossomService;
1062
+ identity: ElisymIdentity;
1063
+ }): BlossomBlobTransport;
1064
+
1065
+ /**
1066
+ * Customer-side helpers to send/receive ENCRYPTED file jobs over Blossom with no iroh/Node dependency
1067
+ * (browser-safe). These are the seams a web app calls.
1068
+ *
1069
+ * Encrypted-Blossom needs a recipient pubkey, so a file INPUT is only meaningful on a TARGETED job (a
1070
+ * chosen provider) - hence `buildEncryptedFileInput` requires `providerPubkey`. Broadcast file inputs
1071
+ * are not supported here (no recipient to encrypt to); those stay on iroh.
1072
+ */
1073
+
1074
+ /**
1075
+ * Encrypt `file` to `providerPubkey` and upload the ciphertext to Blossom, returning a `FileAttachment`
1076
+ * with a single `blossom` transport. TARGETED jobs only (a recipient pubkey is required to encrypt).
1077
+ */
1078
+ declare function buildEncryptedFileInput(args: {
1079
+ file: Blob & {
1080
+ name?: string;
1081
+ };
1082
+ providerPubkey: string;
1083
+ identity: ElisymIdentity;
1084
+ blossom: BlossomService;
1085
+ }): Promise<FileAttachment>;
1086
+ /**
1087
+ * Download + decrypt a `blossom` file output from an attachment (sent by `providerPubkey`). Returns the
1088
+ * plaintext bytes plus the envelope-carried name/mime. Throws if there is no blossom transport.
1089
+ */
1090
+ declare function fetchEncryptedFileOutput(args: {
1091
+ attachment: FileAttachment;
1092
+ providerPubkey: string;
1093
+ identity: ElisymIdentity;
1094
+ blossom: BlossomService;
1095
+ maxBytes?: number;
1096
+ }): Promise<{
1097
+ bytes: Uint8Array;
1098
+ name: string;
1099
+ mime: string;
1100
+ }>;
1101
+
1102
+ interface EncryptedBytes {
1103
+ /** AES-256-GCM ciphertext with the 16-byte auth tag appended (WebCrypto layout). */
1104
+ ciphertext: Uint8Array;
1105
+ /** NIP-44-wrapped content key (sender secret key -> recipient pubkey). */
1106
+ wrappedKey: string;
1107
+ /** base64 GCM IV (non-secret). */
1108
+ iv: string;
1109
+ }
1110
+ /** Encrypt `bytes` so that only `recipientPubkey` (with the sender's pubkey) can decrypt. */
1111
+ declare function encryptBytesForRecipient(bytes: Uint8Array, senderSk: Uint8Array, recipientPubkey: string): Promise<EncryptedBytes>;
1112
+ /**
1113
+ * Decrypt bytes produced by `encryptBytesForRecipient`. Throws on any tamper (GCM auth tag), a
1114
+ * corrupted/forged wrapped key (NIP-44 MAC), or the wrong receiver/sender key pair.
1115
+ */
1116
+ declare function decryptBytesFromSender(ciphertext: Uint8Array, wrappedKey: string, iv: string, receiverSk: Uint8Array, senderPubkey: string): Promise<Uint8Array>;
1117
+
871
1118
  /**
872
1119
  * Customer-facing error feedback that arrives via `subscribeToJobUpdates`'s
873
1120
  * `onError` callback can come from many places:
@@ -1478,6 +1725,8 @@ declare const DEFAULTS: {
1478
1725
  readonly QUERY_MAX_CONCURRENCY: 6;
1479
1726
  readonly VERIFY_SIGNATURE_LIMIT: 25;
1480
1727
  readonly IROH_FETCH_TIMEOUT_MS: 300000;
1728
+ readonly BLOSSOM_UPLOAD_TIMEOUT_MS: 300000;
1729
+ readonly BLOSSOM_FETCH_TIMEOUT_MS: 300000;
1481
1730
  };
1482
1731
  /** Protocol limits for input validation. */
1483
1732
  declare const LIMITS: {
@@ -1486,6 +1735,7 @@ declare const LIMITS: {
1486
1735
  readonly MAX_ENCRYPTED_INLINE_BYTES: 60000;
1487
1736
  readonly MAX_REINLINE_TEXT_BYTES: 4194304;
1488
1737
  readonly MAX_FILE_SIZE: 1073741824;
1738
+ readonly MAX_BLOSSOM_ENCRYPTED_BYTES: 104857600;
1489
1739
  readonly MAX_TIMEOUT_SECS: 600;
1490
1740
  readonly MAX_EXECUTION_SECS: 2147483;
1491
1741
  readonly MAX_CAPABILITIES: 20;
@@ -1506,4 +1756,4 @@ declare const LIMITS: {
1506
1756
  */
1507
1757
  declare function utf8ByteLength(value: string): number;
1508
1758
 
1509
- export { type Agent, type AgentPolicy, type AggregateNetworkStatsOptions, Asset, BoundedSet, type BuildTransactionOptions, type CapabilityCard, DEFAULTS, DEFAULT_KIND_OFFSET, DEFAULT_REDACT_PATHS, type DecodedJobPayload, DiscoveryService, ELISYM_PROTOCOL_TAG, ENVELOPE_VERSION, ElisymClient, type ElisymClientConfig, type ElisymClientFullConfig, ElisymIdentity, type EstimatePriorityFeeOptions, type EstimateSolFeeOptions, type FileAttachment, type FileTransport, type GetProtocolConfigOptions, INPUT_REDACT_PATHS, type Job, type JobErrorKind, type JobPayloadEnvelope, type JobStatus, type JobSubscriptionOptions, type JobUpdateCallbacks, JobWaitTimeoutError, KIND_APP_HANDLER, KIND_JOB_FEEDBACK, KIND_JOB_REQUEST, KIND_JOB_REQUEST_BASE, KIND_JOB_RESULT, KIND_JOB_RESULT_BASE, KIND_LONG_FORM_ARTICLE, KIND_PING, KIND_PONG, LAMPORTS_PER_SOL, LIMITS, MarketplaceService, MediaService, type Network, type NetworkBaselineEstimate, type NetworkBaselineOptions, type NetworkStats, type NetworkStatsResult, NostrPool, type OnchainNetworkStats, POLICY_D_TAG_PREFIX, POLICY_TYPE_REGEX, POLICY_T_TAG, PROTOCOL_PROGRAM_ID_DEVNET, type ParseOptions, type ParseResult, type ParsedPaymentRequest, type PaymentAssetRef, type PaymentInfo, type PaymentRequestData, PaymentRequestSchema, type PaymentStrategy, type PaymentValidationCode, type PaymentValidationError, type PingResult, PingService, PoliciesService, type PolicyInput, type ProtocolCluster, type ProtocolConfig, type ProtocolConfigInput, type QuickVerifyReason, type QuickVerifyResult, RELAYS, type RankKey, SECRET_REDACT_PATHS, type Signer, type SolFeeEstimate, SolanaPaymentStrategy, type SubCloser, type SubmitJobOptions, type VerifyOptions, type VerifyResult, aggregateNetworkStats, assertExpiry, assertLamports, buildPaymentInstructions, calculateProtocolFee, classifyJobError, clearPriorityFeeCache, clearProtocolConfigCache, clearQuickVerifyCache, compareAgentsByRank, computeRankKey, createPaymentRequestWithOnchainConfig, decodeJobPayload, encodeJobPayload, estimateNetworkBaseline, estimatePriorityFeeMicroLamports, estimateSolFeeLamports, formatFeeBreakdown, formatNetworkBaseline, formatSol, getNetworkStats, getProtocolConfig, getProtocolProgramId, jobRequestKind, jobResultKind, makeCensor, nip44Decrypt, nip44Encrypt, parsePaymentRequest, pickPercentileFee, timeAgo, toDTag, truncateKey, utf8ByteLength, validateAgentName, validateExpiry, verifyJobPaymentQuick };
1759
+ export { ACCEPT_TRANSPORTS_TAG, type Agent, type AgentPolicy, type AggregateNetworkStatsOptions, Asset, type BlobDescriptor, type BlossomBlobTransport, BlossomService, type BlossomUploadFallback, BoundedSet, type BuildTransactionOptions, type CapabilityCard, DEFAULTS, DEFAULT_KIND_OFFSET, DEFAULT_REDACT_PATHS, type DecodedJobPayload, DiscoveryService, ELISYM_PROTOCOL_TAG, ENVELOPE_VERSION, ElisymClient, type ElisymClientConfig, type ElisymClientFullConfig, ElisymIdentity, type EncryptedBytes, type EstimatePriorityFeeOptions, type EstimateSolFeeOptions, type FileAttachment, type FileTransport, type GetProtocolConfigOptions, INPUT_REDACT_PATHS, type Job, type JobErrorKind, type JobPayloadEnvelope, type JobStatus, type JobSubscriptionOptions, type JobUpdateCallbacks, JobWaitTimeoutError, KIND_APP_HANDLER, KIND_JOB_FEEDBACK, KIND_JOB_REQUEST, KIND_JOB_REQUEST_BASE, KIND_JOB_RESULT, KIND_JOB_RESULT_BASE, KIND_LONG_FORM_ARTICLE, KIND_PING, KIND_PONG, LAMPORTS_PER_SOL, LIMITS, MarketplaceService, MediaService, type Network, type NetworkBaselineEstimate, type NetworkBaselineOptions, type NetworkStats, type NetworkStatsResult, NostrPool, type OnchainNetworkStats, POLICY_D_TAG_PREFIX, POLICY_TYPE_REGEX, POLICY_T_TAG, PROTOCOL_PROGRAM_ID_DEVNET, type ParseOptions, type ParseResult, type ParsedPaymentRequest, type PaymentAssetRef, type PaymentInfo, type PaymentRequestData, PaymentRequestSchema, type PaymentStrategy, type PaymentValidationCode, type PaymentValidationError, type PingResult, PingService, PoliciesService, type PolicyInput, type ProtocolCluster, type ProtocolConfig, type ProtocolConfigInput, type QuickVerifyReason, type QuickVerifyResult, RELAYS, type RankKey, SECRET_REDACT_PATHS, type Signer, type SolFeeEstimate, SolanaPaymentStrategy, type SubCloser, type SubmitJobOptions, type TransportKind, type VerifyOptions, type VerifyResult, aggregateNetworkStats, assertExpiry, assertLamports, buildAcceptTransportsTag, buildEncryptedFileInput, buildPaymentInstructions, calculateProtocolFee, classifyJobError, clearPriorityFeeCache, clearProtocolConfigCache, clearQuickVerifyCache, compareAgentsByRank, computeRankKey, createBlossomTransport, createPaymentRequestWithOnchainConfig, decodeJobPayload, decryptBytesFromSender, encodeJobPayload, encryptBytesForRecipient, estimateNetworkBaseline, estimatePriorityFeeMicroLamports, estimateSolFeeLamports, fetchEncryptedFileOutput, formatFeeBreakdown, formatNetworkBaseline, formatSol, getNetworkStats, getProtocolConfig, getProtocolProgramId, jobRequestKind, jobResultKind, makeCensor, nip44Decrypt, nip44Encrypt, parsePaymentRequest, pickPercentileFee, readAcceptedTransports, timeAgo, toDTag, truncateKey, utf8ByteLength, validateAgentName, validateExpiry, verifyJobPaymentQuick };