@chillwhales/lsp29 0.1.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.
@@ -0,0 +1,1875 @@
1
+ import { z } from 'zod';
2
+ import * as _chillwhales_lsp2 from '@chillwhales/lsp2';
3
+ import { Hex } from 'viem';
4
+
5
+ /**
6
+ * LSP29 Encrypted Assets Constants
7
+ *
8
+ * ERC725Y data keys, encryption providers, access control methods,
9
+ * storage backends, and UI metadata for the LSP29 standard.
10
+ *
11
+ * @see LSP-29-EncryptedAssets.md for full specification
12
+ */
13
+ /**
14
+ * ERC725Y data key prefixes for LSP29 encrypted asset storage
15
+ *
16
+ * - `LSP29EncryptedAssets[]`: Array of encrypted asset entries (index + length)
17
+ * - `LSP29EncryptedAssetsMap`: Mapping prefix for content ID → array index
18
+ * - `LSP29EncryptedAssetRevisionCount`: Mapping prefix for content ID → revision count
19
+ */
20
+ declare const LSP29DataKeys: {
21
+ readonly "LSP29EncryptedAssets[]": {
22
+ readonly index: "0x1965f98377ddff08e78c93d820cc8de4";
23
+ readonly length: "0x1965f98377ddff08e78c93d820cc8de4eeb331e684b7724bce0debb1958386c3";
24
+ };
25
+ readonly LSP29EncryptedAssetsMap: "0x2b9a7a38a67cedc507c2";
26
+ readonly LSP29EncryptedAssetRevisionCount: "0xb41f63e335c22bded814";
27
+ };
28
+ /**
29
+ * Separator used in ERC725Y mapping key construction (2 bytes)
30
+ * Used between the mapping prefix and the key-specific suffix
31
+ */
32
+ declare const MAPPING_SEPARATOR: "0x0000";
33
+ /**
34
+ * Supported encryption providers
35
+ *
36
+ * - `taco`: Threshold Access Control (TACo) — current primary provider
37
+ * - `lit`: Lit Protocol — legacy provider (no longer active)
38
+ */
39
+ declare const LSP29_PROVIDERS: readonly ["taco", "lit"];
40
+ /**
41
+ * Provider-agnostic access control method identifiers
42
+ *
43
+ * These method names are independent of the encryption provider.
44
+ * The provider field determines which network handles the encryption;
45
+ * the method field determines which on-chain condition is checked.
46
+ *
47
+ * - `digital-asset-balance`: Require holding a minimum balance of LSP7 tokens or LSP8 NFTs
48
+ * - `lsp8-ownership`: Require owning a specific LSP8 NFT by token ID
49
+ * - `lsp26-follower`: Require following specific Universal Profiles on-chain
50
+ * - `time-locked`: Content unlocks after a specific date/time
51
+ */
52
+ declare const LSP29_METHODS: readonly ["digital-asset-balance", "lsp8-ownership", "lsp26-follower", "time-locked"];
53
+ /**
54
+ * Closed set of supported storage backends for encrypted content chunks
55
+ *
56
+ * Matches LSP30's backend set by convention (not by import).
57
+ * Adding a backend requires a schema update.
58
+ */
59
+ declare const LSP29_BACKENDS: readonly ["ipfs", "s3", "lumera", "arweave"];
60
+ /**
61
+ * Human-readable metadata for each access control method
62
+ *
63
+ * Keyed by provider-agnostic method name (not the old compound `taco-*-v1` strings).
64
+ * Used for displaying method information in the UI.
65
+ */
66
+ declare const ENCRYPTION_METHOD_METADATA: {
67
+ readonly "digital-asset-balance": {
68
+ readonly label: "Digital Asset Balance";
69
+ readonly description: "Require holding a minimum balance of LSP7 tokens or LSP8 NFTs";
70
+ };
71
+ readonly "lsp8-ownership": {
72
+ readonly label: "LSP8 NFT Ownership";
73
+ readonly description: "Require owning a specific NFT by token ID";
74
+ };
75
+ readonly "lsp26-follower": {
76
+ readonly label: "On-Chain Follower";
77
+ readonly description: "Require following specific Universal Profiles";
78
+ };
79
+ readonly "time-locked": {
80
+ readonly label: "Time-Locked";
81
+ readonly description: "Content unlocks after a specific date/time";
82
+ };
83
+ };
84
+
85
+ /**
86
+ * File metadata schema
87
+ * Technical metadata about the encrypted file
88
+ */
89
+ declare const lsp29FileSchema: z.ZodObject<{
90
+ /** MIME type of the original file (e.g., "video/mp4") */
91
+ type: z.ZodString;
92
+ /** Original filename */
93
+ name: z.ZodString;
94
+ /** Original file size in bytes (before encryption) */
95
+ size: z.ZodNumber;
96
+ /** Unix timestamp (ms) of file's last modification */
97
+ lastModified: z.ZodOptional<z.ZodNumber>;
98
+ /** Hash of the original file content (SHA-256, hex) */
99
+ hash: z.ZodString;
100
+ }, "strip", z.ZodTypeAny, {
101
+ type: string;
102
+ name: string;
103
+ size: number;
104
+ hash: string;
105
+ lastModified?: number | undefined;
106
+ }, {
107
+ type: string;
108
+ name: string;
109
+ size: number;
110
+ hash: string;
111
+ lastModified?: number | undefined;
112
+ }>;
113
+ /**
114
+ * IPFS chunk references
115
+ * Array of Content Identifiers (CIDs) for encrypted content chunks
116
+ */
117
+ declare const lsp29IpfsChunksSchema: z.ZodObject<{
118
+ cids: z.ZodArray<z.ZodString, "many">;
119
+ }, "strip", z.ZodTypeAny, {
120
+ cids: string[];
121
+ }, {
122
+ cids: string[];
123
+ }>;
124
+ /**
125
+ * Lumera/Pastel Cascade chunk references
126
+ * Array of Cascade action IDs for encrypted content chunks
127
+ */
128
+ declare const lsp29LumeraChunksSchema: z.ZodObject<{
129
+ actionIds: z.ZodArray<z.ZodString, "many">;
130
+ }, "strip", z.ZodTypeAny, {
131
+ actionIds: string[];
132
+ }, {
133
+ actionIds: string[];
134
+ }>;
135
+ /**
136
+ * S3 chunk references
137
+ * Array of S3 object keys plus bucket and region identifiers
138
+ */
139
+ declare const lsp29S3ChunksSchema: z.ZodObject<{
140
+ keys: z.ZodArray<z.ZodString, "many">;
141
+ bucket: z.ZodString;
142
+ region: z.ZodString;
143
+ }, "strip", z.ZodTypeAny, {
144
+ keys: string[];
145
+ bucket: string;
146
+ region: string;
147
+ }, {
148
+ keys: string[];
149
+ bucket: string;
150
+ region: string;
151
+ }>;
152
+ /**
153
+ * Arweave chunk references
154
+ * Array of Arweave transaction IDs for encrypted content chunks
155
+ */
156
+ declare const lsp29ArweaveChunksSchema: z.ZodObject<{
157
+ transactionIds: z.ZodArray<z.ZodString, "many">;
158
+ }, "strip", z.ZodTypeAny, {
159
+ transactionIds: string[];
160
+ }, {
161
+ transactionIds: string[];
162
+ }>;
163
+ /**
164
+ * LSP29 chunks schema — per-backend arrays of chunk references
165
+ *
166
+ * Each backend stores its own array of chunk identifiers independently.
167
+ * Chunk counts MAY differ between backends (backends may chunk differently).
168
+ * At least one backend must have chunk entries.
169
+ *
170
+ * @example
171
+ * ```typescript
172
+ * const chunks = {
173
+ * ipfs: { cids: ['QmX...', 'QmY...'] },
174
+ * lumera: { actionIds: ['abc123'] },
175
+ * iv: 'base64-iv-string',
176
+ * totalSize: 1048576,
177
+ * };
178
+ * ```
179
+ */
180
+ declare const lsp29ChunksSchema: z.ZodEffects<z.ZodObject<{
181
+ /** IPFS chunk references */
182
+ ipfs: z.ZodOptional<z.ZodObject<{
183
+ cids: z.ZodArray<z.ZodString, "many">;
184
+ }, "strip", z.ZodTypeAny, {
185
+ cids: string[];
186
+ }, {
187
+ cids: string[];
188
+ }>>;
189
+ /** Lumera/Pastel Cascade chunk references */
190
+ lumera: z.ZodOptional<z.ZodObject<{
191
+ actionIds: z.ZodArray<z.ZodString, "many">;
192
+ }, "strip", z.ZodTypeAny, {
193
+ actionIds: string[];
194
+ }, {
195
+ actionIds: string[];
196
+ }>>;
197
+ /** S3 chunk references */
198
+ s3: z.ZodOptional<z.ZodObject<{
199
+ keys: z.ZodArray<z.ZodString, "many">;
200
+ bucket: z.ZodString;
201
+ region: z.ZodString;
202
+ }, "strip", z.ZodTypeAny, {
203
+ keys: string[];
204
+ bucket: string;
205
+ region: string;
206
+ }, {
207
+ keys: string[];
208
+ bucket: string;
209
+ region: string;
210
+ }>>;
211
+ /** Arweave chunk references */
212
+ arweave: z.ZodOptional<z.ZodObject<{
213
+ transactionIds: z.ZodArray<z.ZodString, "many">;
214
+ }, "strip", z.ZodTypeAny, {
215
+ transactionIds: string[];
216
+ }, {
217
+ transactionIds: string[];
218
+ }>>;
219
+ /** Initialization vector for symmetric encryption (base64) */
220
+ iv: z.ZodString;
221
+ /** Total size of encrypted content in bytes */
222
+ totalSize: z.ZodNumber;
223
+ }, "strip", z.ZodTypeAny, {
224
+ iv: string;
225
+ totalSize: number;
226
+ ipfs?: {
227
+ cids: string[];
228
+ } | undefined;
229
+ s3?: {
230
+ keys: string[];
231
+ bucket: string;
232
+ region: string;
233
+ } | undefined;
234
+ lumera?: {
235
+ actionIds: string[];
236
+ } | undefined;
237
+ arweave?: {
238
+ transactionIds: string[];
239
+ } | undefined;
240
+ }, {
241
+ iv: string;
242
+ totalSize: number;
243
+ ipfs?: {
244
+ cids: string[];
245
+ } | undefined;
246
+ s3?: {
247
+ keys: string[];
248
+ bucket: string;
249
+ region: string;
250
+ } | undefined;
251
+ lumera?: {
252
+ actionIds: string[];
253
+ } | undefined;
254
+ arweave?: {
255
+ transactionIds: string[];
256
+ } | undefined;
257
+ }>, {
258
+ iv: string;
259
+ totalSize: number;
260
+ ipfs?: {
261
+ cids: string[];
262
+ } | undefined;
263
+ s3?: {
264
+ keys: string[];
265
+ bucket: string;
266
+ region: string;
267
+ } | undefined;
268
+ lumera?: {
269
+ actionIds: string[];
270
+ } | undefined;
271
+ arweave?: {
272
+ transactionIds: string[];
273
+ } | undefined;
274
+ }, {
275
+ iv: string;
276
+ totalSize: number;
277
+ ipfs?: {
278
+ cids: string[];
279
+ } | undefined;
280
+ s3?: {
281
+ keys: string[];
282
+ bucket: string;
283
+ region: string;
284
+ } | undefined;
285
+ lumera?: {
286
+ actionIds: string[];
287
+ } | undefined;
288
+ arweave?: {
289
+ transactionIds: string[];
290
+ } | undefined;
291
+ }>;
292
+ /**
293
+ * Digital Asset Balance encryption parameters
294
+ * Require holding a minimum balance of LSP7 tokens or LSP8 NFTs
295
+ */
296
+ declare const lsp29DigitalAssetBalanceParamsSchema: z.ZodObject<{
297
+ method: z.ZodLiteral<"digital-asset-balance">;
298
+ /** Digital asset contract address (LSP7 or LSP8) */
299
+ tokenAddress: z.ZodString;
300
+ /** Required balance as string (for BigInt compatibility), must be > 0 */
301
+ requiredBalance: z.ZodEffects<z.ZodString, string, string>;
302
+ }, "strip", z.ZodTypeAny, {
303
+ method: "digital-asset-balance";
304
+ tokenAddress: string;
305
+ requiredBalance: string;
306
+ }, {
307
+ method: "digital-asset-balance";
308
+ tokenAddress: string;
309
+ requiredBalance: string;
310
+ }>;
311
+ /**
312
+ * LSP8 Ownership encryption parameters
313
+ * Require owning a specific LSP8 NFT by token ID
314
+ */
315
+ declare const lsp29Lsp8OwnershipParamsSchema: z.ZodObject<{
316
+ method: z.ZodLiteral<"lsp8-ownership">;
317
+ /** LSP8 token contract address */
318
+ tokenAddress: z.ZodString;
319
+ /** Required token ID as string */
320
+ requiredTokenId: z.ZodString;
321
+ }, "strip", z.ZodTypeAny, {
322
+ method: "lsp8-ownership";
323
+ tokenAddress: string;
324
+ requiredTokenId: string;
325
+ }, {
326
+ method: "lsp8-ownership";
327
+ tokenAddress: string;
328
+ requiredTokenId: string;
329
+ }>;
330
+ /**
331
+ * LSP26 Follower encryption parameters
332
+ * Require following specific Universal Profiles on-chain
333
+ */
334
+ declare const lsp29Lsp26FollowerParamsSchema: z.ZodObject<{
335
+ method: z.ZodLiteral<"lsp26-follower">;
336
+ /** Array of Universal Profile addresses that must be followed */
337
+ followedAddresses: z.ZodArray<z.ZodString, "many">;
338
+ }, "strip", z.ZodTypeAny, {
339
+ method: "lsp26-follower";
340
+ followedAddresses: string[];
341
+ }, {
342
+ method: "lsp26-follower";
343
+ followedAddresses: string[];
344
+ }>;
345
+ /**
346
+ * Time-Locked encryption parameters
347
+ * Content unlocks after a specific date/time
348
+ */
349
+ declare const lsp29TimeLockedParamsSchema: z.ZodObject<{
350
+ method: z.ZodLiteral<"time-locked">;
351
+ /** Unix timestamp (seconds) when content becomes accessible */
352
+ unlockTimestamp: z.ZodString;
353
+ }, "strip", z.ZodTypeAny, {
354
+ method: "time-locked";
355
+ unlockTimestamp: string;
356
+ }, {
357
+ method: "time-locked";
358
+ unlockTimestamp: string;
359
+ }>;
360
+ /**
361
+ * Encryption parameters discriminated union
362
+ *
363
+ * The `method` field serves as the discriminator for type narrowing.
364
+ * Each variant contains method-specific parameters needed for access control verification.
365
+ *
366
+ * @example
367
+ * ```typescript
368
+ * const params = {
369
+ * method: 'digital-asset-balance' as const,
370
+ * tokenAddress: '0x1234...',
371
+ * requiredBalance: '1000000',
372
+ * };
373
+ * ```
374
+ */
375
+ declare const lsp29EncryptionParamsSchema: z.ZodDiscriminatedUnion<"method", [z.ZodObject<{
376
+ method: z.ZodLiteral<"digital-asset-balance">;
377
+ /** Digital asset contract address (LSP7 or LSP8) */
378
+ tokenAddress: z.ZodString;
379
+ /** Required balance as string (for BigInt compatibility), must be > 0 */
380
+ requiredBalance: z.ZodEffects<z.ZodString, string, string>;
381
+ }, "strip", z.ZodTypeAny, {
382
+ method: "digital-asset-balance";
383
+ tokenAddress: string;
384
+ requiredBalance: string;
385
+ }, {
386
+ method: "digital-asset-balance";
387
+ tokenAddress: string;
388
+ requiredBalance: string;
389
+ }>, z.ZodObject<{
390
+ method: z.ZodLiteral<"lsp8-ownership">;
391
+ /** LSP8 token contract address */
392
+ tokenAddress: z.ZodString;
393
+ /** Required token ID as string */
394
+ requiredTokenId: z.ZodString;
395
+ }, "strip", z.ZodTypeAny, {
396
+ method: "lsp8-ownership";
397
+ tokenAddress: string;
398
+ requiredTokenId: string;
399
+ }, {
400
+ method: "lsp8-ownership";
401
+ tokenAddress: string;
402
+ requiredTokenId: string;
403
+ }>, z.ZodObject<{
404
+ method: z.ZodLiteral<"lsp26-follower">;
405
+ /** Array of Universal Profile addresses that must be followed */
406
+ followedAddresses: z.ZodArray<z.ZodString, "many">;
407
+ }, "strip", z.ZodTypeAny, {
408
+ method: "lsp26-follower";
409
+ followedAddresses: string[];
410
+ }, {
411
+ method: "lsp26-follower";
412
+ followedAddresses: string[];
413
+ }>, z.ZodObject<{
414
+ method: z.ZodLiteral<"time-locked">;
415
+ /** Unix timestamp (seconds) when content becomes accessible */
416
+ unlockTimestamp: z.ZodString;
417
+ }, "strip", z.ZodTypeAny, {
418
+ method: "time-locked";
419
+ unlockTimestamp: string;
420
+ }, {
421
+ method: "time-locked";
422
+ unlockTimestamp: string;
423
+ }>]>;
424
+ /**
425
+ * LSP29 encryption schema — provider-first structure
426
+ *
427
+ * Separates the encryption provider from the access control method,
428
+ * enabling provider-agnostic method definitions and extensibility.
429
+ *
430
+ * - `provider`: Which encryption network (taco, lit)
431
+ * - `method`: Which access control check (digital-asset-balance, lsp8-ownership, etc.)
432
+ * - `params`: User-facing parameters for the method (token address, balance, etc.)
433
+ * - `condition`: Full provider-native condition object, stored as-is for external dApp interop
434
+ * - `encryptedKey`: Provider-specific encrypted key data (messageKit for TACo, etc.)
435
+ *
436
+ * @example
437
+ * ```typescript
438
+ * const encryption = {
439
+ * provider: 'taco',
440
+ * method: 'digital-asset-balance',
441
+ * params: { method: 'digital-asset-balance', tokenAddress: '0x...', requiredBalance: '100' },
442
+ * condition: { /* TACo CompoundCondition * / },
443
+ * encryptedKey: { messageKit: '0x...' },
444
+ * };
445
+ * ```
446
+ */
447
+ declare const lsp29EncryptionSchema: z.ZodEffects<z.ZodObject<{
448
+ /** Encryption provider network */
449
+ provider: z.ZodEnum<["taco", "lit"]>;
450
+ /** Access control method (provider-agnostic) */
451
+ method: z.ZodEnum<["digital-asset-balance", "lsp8-ownership", "lsp26-follower", "time-locked"]>;
452
+ /** Method-specific parameters for access control verification */
453
+ params: z.ZodDiscriminatedUnion<"method", [z.ZodObject<{
454
+ method: z.ZodLiteral<"digital-asset-balance">;
455
+ /** Digital asset contract address (LSP7 or LSP8) */
456
+ tokenAddress: z.ZodString;
457
+ /** Required balance as string (for BigInt compatibility), must be > 0 */
458
+ requiredBalance: z.ZodEffects<z.ZodString, string, string>;
459
+ }, "strip", z.ZodTypeAny, {
460
+ method: "digital-asset-balance";
461
+ tokenAddress: string;
462
+ requiredBalance: string;
463
+ }, {
464
+ method: "digital-asset-balance";
465
+ tokenAddress: string;
466
+ requiredBalance: string;
467
+ }>, z.ZodObject<{
468
+ method: z.ZodLiteral<"lsp8-ownership">;
469
+ /** LSP8 token contract address */
470
+ tokenAddress: z.ZodString;
471
+ /** Required token ID as string */
472
+ requiredTokenId: z.ZodString;
473
+ }, "strip", z.ZodTypeAny, {
474
+ method: "lsp8-ownership";
475
+ tokenAddress: string;
476
+ requiredTokenId: string;
477
+ }, {
478
+ method: "lsp8-ownership";
479
+ tokenAddress: string;
480
+ requiredTokenId: string;
481
+ }>, z.ZodObject<{
482
+ method: z.ZodLiteral<"lsp26-follower">;
483
+ /** Array of Universal Profile addresses that must be followed */
484
+ followedAddresses: z.ZodArray<z.ZodString, "many">;
485
+ }, "strip", z.ZodTypeAny, {
486
+ method: "lsp26-follower";
487
+ followedAddresses: string[];
488
+ }, {
489
+ method: "lsp26-follower";
490
+ followedAddresses: string[];
491
+ }>, z.ZodObject<{
492
+ method: z.ZodLiteral<"time-locked">;
493
+ /** Unix timestamp (seconds) when content becomes accessible */
494
+ unlockTimestamp: z.ZodString;
495
+ }, "strip", z.ZodTypeAny, {
496
+ method: "time-locked";
497
+ unlockTimestamp: string;
498
+ }, {
499
+ method: "time-locked";
500
+ unlockTimestamp: string;
501
+ }>]>;
502
+ /** Provider-native condition object (stored as-is for external interop) */
503
+ condition: z.ZodUnknown;
504
+ /** Provider-specific encrypted key data */
505
+ encryptedKey: z.ZodRecord<z.ZodString, z.ZodUnknown>;
506
+ }, "strip", z.ZodTypeAny, {
507
+ params: {
508
+ method: "digital-asset-balance";
509
+ tokenAddress: string;
510
+ requiredBalance: string;
511
+ } | {
512
+ method: "lsp8-ownership";
513
+ tokenAddress: string;
514
+ requiredTokenId: string;
515
+ } | {
516
+ method: "lsp26-follower";
517
+ followedAddresses: string[];
518
+ } | {
519
+ method: "time-locked";
520
+ unlockTimestamp: string;
521
+ };
522
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
523
+ provider: "taco" | "lit";
524
+ encryptedKey: Record<string, unknown>;
525
+ condition?: unknown;
526
+ }, {
527
+ params: {
528
+ method: "digital-asset-balance";
529
+ tokenAddress: string;
530
+ requiredBalance: string;
531
+ } | {
532
+ method: "lsp8-ownership";
533
+ tokenAddress: string;
534
+ requiredTokenId: string;
535
+ } | {
536
+ method: "lsp26-follower";
537
+ followedAddresses: string[];
538
+ } | {
539
+ method: "time-locked";
540
+ unlockTimestamp: string;
541
+ };
542
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
543
+ provider: "taco" | "lit";
544
+ encryptedKey: Record<string, unknown>;
545
+ condition?: unknown;
546
+ }>, {
547
+ params: {
548
+ method: "digital-asset-balance";
549
+ tokenAddress: string;
550
+ requiredBalance: string;
551
+ } | {
552
+ method: "lsp8-ownership";
553
+ tokenAddress: string;
554
+ requiredTokenId: string;
555
+ } | {
556
+ method: "lsp26-follower";
557
+ followedAddresses: string[];
558
+ } | {
559
+ method: "time-locked";
560
+ unlockTimestamp: string;
561
+ };
562
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
563
+ provider: "taco" | "lit";
564
+ encryptedKey: Record<string, unknown>;
565
+ condition?: unknown;
566
+ }, {
567
+ params: {
568
+ method: "digital-asset-balance";
569
+ tokenAddress: string;
570
+ requiredBalance: string;
571
+ } | {
572
+ method: "lsp8-ownership";
573
+ tokenAddress: string;
574
+ requiredTokenId: string;
575
+ } | {
576
+ method: "lsp26-follower";
577
+ followedAddresses: string[];
578
+ } | {
579
+ method: "time-locked";
580
+ unlockTimestamp: string;
581
+ };
582
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
583
+ provider: "taco" | "lit";
584
+ encryptedKey: Record<string, unknown>;
585
+ condition?: unknown;
586
+ }>;
587
+ /**
588
+ * LSP29 encrypted asset inner schema (v2.0.0)
589
+ *
590
+ * Contains all metadata fields for an encrypted asset.
591
+ * Version bumped to 2.0.0 due to breaking schema changes
592
+ * (provider-first encryption, per-backend chunks).
593
+ */
594
+ declare const lsp29EncryptedAssetInnerSchema: z.ZodObject<{
595
+ /** Schema version — 2.0.0 for new encryption + chunks structure */
596
+ version: z.ZodLiteral<"2.0.0">;
597
+ /** Unique content identifier chosen by creator */
598
+ id: z.ZodString;
599
+ /** Human-readable title for the content */
600
+ title: z.ZodString;
601
+ /** Human-readable description of the content */
602
+ description: z.ZodOptional<z.ZodString>;
603
+ /** Version number starting at 1, incremented for each update */
604
+ revision: z.ZodNumber;
605
+ /** Social feed images for content preview (LSP4 images format) */
606
+ images: z.ZodArray<z.ZodArray<z.ZodObject<{
607
+ url: z.ZodString;
608
+ width: z.ZodNumber;
609
+ height: z.ZodNumber;
610
+ verification: z.ZodDiscriminatedUnion<"method", [z.ZodObject<{
611
+ data: z.ZodString;
612
+ method: z.ZodEnum<[_chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES, _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8]>;
613
+ }, "strip", z.ZodTypeAny, {
614
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8 | _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES;
615
+ data: string;
616
+ }, {
617
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8 | _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES;
618
+ data: string;
619
+ }>, z.ZodObject<{
620
+ method: z.ZodEnum<[_chillwhales_lsp2.VERIFICATION_METHODS.ECDSA]>;
621
+ data: z.ZodString;
622
+ source: z.ZodString;
623
+ }, "strip", z.ZodTypeAny, {
624
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.ECDSA;
625
+ data: string;
626
+ source: string;
627
+ }, {
628
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.ECDSA;
629
+ data: string;
630
+ source: string;
631
+ }>]>;
632
+ }, "strip", z.ZodTypeAny, {
633
+ url: string;
634
+ width: number;
635
+ height: number;
636
+ verification: {
637
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8 | _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES;
638
+ data: string;
639
+ } | {
640
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.ECDSA;
641
+ data: string;
642
+ source: string;
643
+ };
644
+ }, {
645
+ url: string;
646
+ width: number;
647
+ height: number;
648
+ verification: {
649
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8 | _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES;
650
+ data: string;
651
+ } | {
652
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.ECDSA;
653
+ data: string;
654
+ source: string;
655
+ };
656
+ }>, "many">, "many">;
657
+ /** Technical metadata about the encrypted file */
658
+ file: z.ZodObject<{
659
+ /** MIME type of the original file (e.g., "video/mp4") */
660
+ type: z.ZodString;
661
+ /** Original filename */
662
+ name: z.ZodString;
663
+ /** Original file size in bytes (before encryption) */
664
+ size: z.ZodNumber;
665
+ /** Unix timestamp (ms) of file's last modification */
666
+ lastModified: z.ZodOptional<z.ZodNumber>;
667
+ /** Hash of the original file content (SHA-256, hex) */
668
+ hash: z.ZodString;
669
+ }, "strip", z.ZodTypeAny, {
670
+ type: string;
671
+ name: string;
672
+ size: number;
673
+ hash: string;
674
+ lastModified?: number | undefined;
675
+ }, {
676
+ type: string;
677
+ name: string;
678
+ size: number;
679
+ hash: string;
680
+ lastModified?: number | undefined;
681
+ }>;
682
+ /** Encryption metadata for decryption */
683
+ encryption: z.ZodEffects<z.ZodObject<{
684
+ /** Encryption provider network */
685
+ provider: z.ZodEnum<["taco", "lit"]>;
686
+ /** Access control method (provider-agnostic) */
687
+ method: z.ZodEnum<["digital-asset-balance", "lsp8-ownership", "lsp26-follower", "time-locked"]>;
688
+ /** Method-specific parameters for access control verification */
689
+ params: z.ZodDiscriminatedUnion<"method", [z.ZodObject<{
690
+ method: z.ZodLiteral<"digital-asset-balance">;
691
+ /** Digital asset contract address (LSP7 or LSP8) */
692
+ tokenAddress: z.ZodString;
693
+ /** Required balance as string (for BigInt compatibility), must be > 0 */
694
+ requiredBalance: z.ZodEffects<z.ZodString, string, string>;
695
+ }, "strip", z.ZodTypeAny, {
696
+ method: "digital-asset-balance";
697
+ tokenAddress: string;
698
+ requiredBalance: string;
699
+ }, {
700
+ method: "digital-asset-balance";
701
+ tokenAddress: string;
702
+ requiredBalance: string;
703
+ }>, z.ZodObject<{
704
+ method: z.ZodLiteral<"lsp8-ownership">;
705
+ /** LSP8 token contract address */
706
+ tokenAddress: z.ZodString;
707
+ /** Required token ID as string */
708
+ requiredTokenId: z.ZodString;
709
+ }, "strip", z.ZodTypeAny, {
710
+ method: "lsp8-ownership";
711
+ tokenAddress: string;
712
+ requiredTokenId: string;
713
+ }, {
714
+ method: "lsp8-ownership";
715
+ tokenAddress: string;
716
+ requiredTokenId: string;
717
+ }>, z.ZodObject<{
718
+ method: z.ZodLiteral<"lsp26-follower">;
719
+ /** Array of Universal Profile addresses that must be followed */
720
+ followedAddresses: z.ZodArray<z.ZodString, "many">;
721
+ }, "strip", z.ZodTypeAny, {
722
+ method: "lsp26-follower";
723
+ followedAddresses: string[];
724
+ }, {
725
+ method: "lsp26-follower";
726
+ followedAddresses: string[];
727
+ }>, z.ZodObject<{
728
+ method: z.ZodLiteral<"time-locked">;
729
+ /** Unix timestamp (seconds) when content becomes accessible */
730
+ unlockTimestamp: z.ZodString;
731
+ }, "strip", z.ZodTypeAny, {
732
+ method: "time-locked";
733
+ unlockTimestamp: string;
734
+ }, {
735
+ method: "time-locked";
736
+ unlockTimestamp: string;
737
+ }>]>;
738
+ /** Provider-native condition object (stored as-is for external interop) */
739
+ condition: z.ZodUnknown;
740
+ /** Provider-specific encrypted key data */
741
+ encryptedKey: z.ZodRecord<z.ZodString, z.ZodUnknown>;
742
+ }, "strip", z.ZodTypeAny, {
743
+ params: {
744
+ method: "digital-asset-balance";
745
+ tokenAddress: string;
746
+ requiredBalance: string;
747
+ } | {
748
+ method: "lsp8-ownership";
749
+ tokenAddress: string;
750
+ requiredTokenId: string;
751
+ } | {
752
+ method: "lsp26-follower";
753
+ followedAddresses: string[];
754
+ } | {
755
+ method: "time-locked";
756
+ unlockTimestamp: string;
757
+ };
758
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
759
+ provider: "taco" | "lit";
760
+ encryptedKey: Record<string, unknown>;
761
+ condition?: unknown;
762
+ }, {
763
+ params: {
764
+ method: "digital-asset-balance";
765
+ tokenAddress: string;
766
+ requiredBalance: string;
767
+ } | {
768
+ method: "lsp8-ownership";
769
+ tokenAddress: string;
770
+ requiredTokenId: string;
771
+ } | {
772
+ method: "lsp26-follower";
773
+ followedAddresses: string[];
774
+ } | {
775
+ method: "time-locked";
776
+ unlockTimestamp: string;
777
+ };
778
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
779
+ provider: "taco" | "lit";
780
+ encryptedKey: Record<string, unknown>;
781
+ condition?: unknown;
782
+ }>, {
783
+ params: {
784
+ method: "digital-asset-balance";
785
+ tokenAddress: string;
786
+ requiredBalance: string;
787
+ } | {
788
+ method: "lsp8-ownership";
789
+ tokenAddress: string;
790
+ requiredTokenId: string;
791
+ } | {
792
+ method: "lsp26-follower";
793
+ followedAddresses: string[];
794
+ } | {
795
+ method: "time-locked";
796
+ unlockTimestamp: string;
797
+ };
798
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
799
+ provider: "taco" | "lit";
800
+ encryptedKey: Record<string, unknown>;
801
+ condition?: unknown;
802
+ }, {
803
+ params: {
804
+ method: "digital-asset-balance";
805
+ tokenAddress: string;
806
+ requiredBalance: string;
807
+ } | {
808
+ method: "lsp8-ownership";
809
+ tokenAddress: string;
810
+ requiredTokenId: string;
811
+ } | {
812
+ method: "lsp26-follower";
813
+ followedAddresses: string[];
814
+ } | {
815
+ method: "time-locked";
816
+ unlockTimestamp: string;
817
+ };
818
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
819
+ provider: "taco" | "lit";
820
+ encryptedKey: Record<string, unknown>;
821
+ condition?: unknown;
822
+ }>;
823
+ /** Chunked storage information */
824
+ chunks: z.ZodEffects<z.ZodObject<{
825
+ /** IPFS chunk references */
826
+ ipfs: z.ZodOptional<z.ZodObject<{
827
+ cids: z.ZodArray<z.ZodString, "many">;
828
+ }, "strip", z.ZodTypeAny, {
829
+ cids: string[];
830
+ }, {
831
+ cids: string[];
832
+ }>>;
833
+ /** Lumera/Pastel Cascade chunk references */
834
+ lumera: z.ZodOptional<z.ZodObject<{
835
+ actionIds: z.ZodArray<z.ZodString, "many">;
836
+ }, "strip", z.ZodTypeAny, {
837
+ actionIds: string[];
838
+ }, {
839
+ actionIds: string[];
840
+ }>>;
841
+ /** S3 chunk references */
842
+ s3: z.ZodOptional<z.ZodObject<{
843
+ keys: z.ZodArray<z.ZodString, "many">;
844
+ bucket: z.ZodString;
845
+ region: z.ZodString;
846
+ }, "strip", z.ZodTypeAny, {
847
+ keys: string[];
848
+ bucket: string;
849
+ region: string;
850
+ }, {
851
+ keys: string[];
852
+ bucket: string;
853
+ region: string;
854
+ }>>;
855
+ /** Arweave chunk references */
856
+ arweave: z.ZodOptional<z.ZodObject<{
857
+ transactionIds: z.ZodArray<z.ZodString, "many">;
858
+ }, "strip", z.ZodTypeAny, {
859
+ transactionIds: string[];
860
+ }, {
861
+ transactionIds: string[];
862
+ }>>;
863
+ /** Initialization vector for symmetric encryption (base64) */
864
+ iv: z.ZodString;
865
+ /** Total size of encrypted content in bytes */
866
+ totalSize: z.ZodNumber;
867
+ }, "strip", z.ZodTypeAny, {
868
+ iv: string;
869
+ totalSize: number;
870
+ ipfs?: {
871
+ cids: string[];
872
+ } | undefined;
873
+ s3?: {
874
+ keys: string[];
875
+ bucket: string;
876
+ region: string;
877
+ } | undefined;
878
+ lumera?: {
879
+ actionIds: string[];
880
+ } | undefined;
881
+ arweave?: {
882
+ transactionIds: string[];
883
+ } | undefined;
884
+ }, {
885
+ iv: string;
886
+ totalSize: number;
887
+ ipfs?: {
888
+ cids: string[];
889
+ } | undefined;
890
+ s3?: {
891
+ keys: string[];
892
+ bucket: string;
893
+ region: string;
894
+ } | undefined;
895
+ lumera?: {
896
+ actionIds: string[];
897
+ } | undefined;
898
+ arweave?: {
899
+ transactionIds: string[];
900
+ } | undefined;
901
+ }>, {
902
+ iv: string;
903
+ totalSize: number;
904
+ ipfs?: {
905
+ cids: string[];
906
+ } | undefined;
907
+ s3?: {
908
+ keys: string[];
909
+ bucket: string;
910
+ region: string;
911
+ } | undefined;
912
+ lumera?: {
913
+ actionIds: string[];
914
+ } | undefined;
915
+ arweave?: {
916
+ transactionIds: string[];
917
+ } | undefined;
918
+ }, {
919
+ iv: string;
920
+ totalSize: number;
921
+ ipfs?: {
922
+ cids: string[];
923
+ } | undefined;
924
+ s3?: {
925
+ keys: string[];
926
+ bucket: string;
927
+ region: string;
928
+ } | undefined;
929
+ lumera?: {
930
+ actionIds: string[];
931
+ } | undefined;
932
+ arweave?: {
933
+ transactionIds: string[];
934
+ } | undefined;
935
+ }>;
936
+ }, "strip", z.ZodTypeAny, {
937
+ version: "2.0.0";
938
+ id: string;
939
+ title: string;
940
+ revision: number;
941
+ images: {
942
+ url: string;
943
+ width: number;
944
+ height: number;
945
+ verification: {
946
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8 | _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES;
947
+ data: string;
948
+ } | {
949
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.ECDSA;
950
+ data: string;
951
+ source: string;
952
+ };
953
+ }[][];
954
+ file: {
955
+ type: string;
956
+ name: string;
957
+ size: number;
958
+ hash: string;
959
+ lastModified?: number | undefined;
960
+ };
961
+ encryption: {
962
+ params: {
963
+ method: "digital-asset-balance";
964
+ tokenAddress: string;
965
+ requiredBalance: string;
966
+ } | {
967
+ method: "lsp8-ownership";
968
+ tokenAddress: string;
969
+ requiredTokenId: string;
970
+ } | {
971
+ method: "lsp26-follower";
972
+ followedAddresses: string[];
973
+ } | {
974
+ method: "time-locked";
975
+ unlockTimestamp: string;
976
+ };
977
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
978
+ provider: "taco" | "lit";
979
+ encryptedKey: Record<string, unknown>;
980
+ condition?: unknown;
981
+ };
982
+ chunks: {
983
+ iv: string;
984
+ totalSize: number;
985
+ ipfs?: {
986
+ cids: string[];
987
+ } | undefined;
988
+ s3?: {
989
+ keys: string[];
990
+ bucket: string;
991
+ region: string;
992
+ } | undefined;
993
+ lumera?: {
994
+ actionIds: string[];
995
+ } | undefined;
996
+ arweave?: {
997
+ transactionIds: string[];
998
+ } | undefined;
999
+ };
1000
+ description?: string | undefined;
1001
+ }, {
1002
+ version: "2.0.0";
1003
+ id: string;
1004
+ title: string;
1005
+ revision: number;
1006
+ images: {
1007
+ url: string;
1008
+ width: number;
1009
+ height: number;
1010
+ verification: {
1011
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8 | _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES;
1012
+ data: string;
1013
+ } | {
1014
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.ECDSA;
1015
+ data: string;
1016
+ source: string;
1017
+ };
1018
+ }[][];
1019
+ file: {
1020
+ type: string;
1021
+ name: string;
1022
+ size: number;
1023
+ hash: string;
1024
+ lastModified?: number | undefined;
1025
+ };
1026
+ encryption: {
1027
+ params: {
1028
+ method: "digital-asset-balance";
1029
+ tokenAddress: string;
1030
+ requiredBalance: string;
1031
+ } | {
1032
+ method: "lsp8-ownership";
1033
+ tokenAddress: string;
1034
+ requiredTokenId: string;
1035
+ } | {
1036
+ method: "lsp26-follower";
1037
+ followedAddresses: string[];
1038
+ } | {
1039
+ method: "time-locked";
1040
+ unlockTimestamp: string;
1041
+ };
1042
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
1043
+ provider: "taco" | "lit";
1044
+ encryptedKey: Record<string, unknown>;
1045
+ condition?: unknown;
1046
+ };
1047
+ chunks: {
1048
+ iv: string;
1049
+ totalSize: number;
1050
+ ipfs?: {
1051
+ cids: string[];
1052
+ } | undefined;
1053
+ s3?: {
1054
+ keys: string[];
1055
+ bucket: string;
1056
+ region: string;
1057
+ } | undefined;
1058
+ lumera?: {
1059
+ actionIds: string[];
1060
+ } | undefined;
1061
+ arweave?: {
1062
+ transactionIds: string[];
1063
+ } | undefined;
1064
+ };
1065
+ description?: string | undefined;
1066
+ }>;
1067
+ /**
1068
+ * LSP29 encrypted asset schema (root wrapper)
1069
+ *
1070
+ * The top-level schema wraps the inner asset with an `LSP29EncryptedAsset` key,
1071
+ * following the LSP convention for typed metadata objects.
1072
+ */
1073
+ declare const lsp29EncryptedAssetSchema: z.ZodObject<{
1074
+ LSP29EncryptedAsset: z.ZodObject<{
1075
+ /** Schema version — 2.0.0 for new encryption + chunks structure */
1076
+ version: z.ZodLiteral<"2.0.0">;
1077
+ /** Unique content identifier chosen by creator */
1078
+ id: z.ZodString;
1079
+ /** Human-readable title for the content */
1080
+ title: z.ZodString;
1081
+ /** Human-readable description of the content */
1082
+ description: z.ZodOptional<z.ZodString>;
1083
+ /** Version number starting at 1, incremented for each update */
1084
+ revision: z.ZodNumber;
1085
+ /** Social feed images for content preview (LSP4 images format) */
1086
+ images: z.ZodArray<z.ZodArray<z.ZodObject<{
1087
+ url: z.ZodString;
1088
+ width: z.ZodNumber;
1089
+ height: z.ZodNumber;
1090
+ verification: z.ZodDiscriminatedUnion<"method", [z.ZodObject<{
1091
+ data: z.ZodString;
1092
+ method: z.ZodEnum<[_chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES, _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8]>;
1093
+ }, "strip", z.ZodTypeAny, {
1094
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8 | _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES;
1095
+ data: string;
1096
+ }, {
1097
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8 | _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES;
1098
+ data: string;
1099
+ }>, z.ZodObject<{
1100
+ method: z.ZodEnum<[_chillwhales_lsp2.VERIFICATION_METHODS.ECDSA]>;
1101
+ data: z.ZodString;
1102
+ source: z.ZodString;
1103
+ }, "strip", z.ZodTypeAny, {
1104
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.ECDSA;
1105
+ data: string;
1106
+ source: string;
1107
+ }, {
1108
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.ECDSA;
1109
+ data: string;
1110
+ source: string;
1111
+ }>]>;
1112
+ }, "strip", z.ZodTypeAny, {
1113
+ url: string;
1114
+ width: number;
1115
+ height: number;
1116
+ verification: {
1117
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8 | _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES;
1118
+ data: string;
1119
+ } | {
1120
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.ECDSA;
1121
+ data: string;
1122
+ source: string;
1123
+ };
1124
+ }, {
1125
+ url: string;
1126
+ width: number;
1127
+ height: number;
1128
+ verification: {
1129
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8 | _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES;
1130
+ data: string;
1131
+ } | {
1132
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.ECDSA;
1133
+ data: string;
1134
+ source: string;
1135
+ };
1136
+ }>, "many">, "many">;
1137
+ /** Technical metadata about the encrypted file */
1138
+ file: z.ZodObject<{
1139
+ /** MIME type of the original file (e.g., "video/mp4") */
1140
+ type: z.ZodString;
1141
+ /** Original filename */
1142
+ name: z.ZodString;
1143
+ /** Original file size in bytes (before encryption) */
1144
+ size: z.ZodNumber;
1145
+ /** Unix timestamp (ms) of file's last modification */
1146
+ lastModified: z.ZodOptional<z.ZodNumber>;
1147
+ /** Hash of the original file content (SHA-256, hex) */
1148
+ hash: z.ZodString;
1149
+ }, "strip", z.ZodTypeAny, {
1150
+ type: string;
1151
+ name: string;
1152
+ size: number;
1153
+ hash: string;
1154
+ lastModified?: number | undefined;
1155
+ }, {
1156
+ type: string;
1157
+ name: string;
1158
+ size: number;
1159
+ hash: string;
1160
+ lastModified?: number | undefined;
1161
+ }>;
1162
+ /** Encryption metadata for decryption */
1163
+ encryption: z.ZodEffects<z.ZodObject<{
1164
+ /** Encryption provider network */
1165
+ provider: z.ZodEnum<["taco", "lit"]>;
1166
+ /** Access control method (provider-agnostic) */
1167
+ method: z.ZodEnum<["digital-asset-balance", "lsp8-ownership", "lsp26-follower", "time-locked"]>;
1168
+ /** Method-specific parameters for access control verification */
1169
+ params: z.ZodDiscriminatedUnion<"method", [z.ZodObject<{
1170
+ method: z.ZodLiteral<"digital-asset-balance">;
1171
+ /** Digital asset contract address (LSP7 or LSP8) */
1172
+ tokenAddress: z.ZodString;
1173
+ /** Required balance as string (for BigInt compatibility), must be > 0 */
1174
+ requiredBalance: z.ZodEffects<z.ZodString, string, string>;
1175
+ }, "strip", z.ZodTypeAny, {
1176
+ method: "digital-asset-balance";
1177
+ tokenAddress: string;
1178
+ requiredBalance: string;
1179
+ }, {
1180
+ method: "digital-asset-balance";
1181
+ tokenAddress: string;
1182
+ requiredBalance: string;
1183
+ }>, z.ZodObject<{
1184
+ method: z.ZodLiteral<"lsp8-ownership">;
1185
+ /** LSP8 token contract address */
1186
+ tokenAddress: z.ZodString;
1187
+ /** Required token ID as string */
1188
+ requiredTokenId: z.ZodString;
1189
+ }, "strip", z.ZodTypeAny, {
1190
+ method: "lsp8-ownership";
1191
+ tokenAddress: string;
1192
+ requiredTokenId: string;
1193
+ }, {
1194
+ method: "lsp8-ownership";
1195
+ tokenAddress: string;
1196
+ requiredTokenId: string;
1197
+ }>, z.ZodObject<{
1198
+ method: z.ZodLiteral<"lsp26-follower">;
1199
+ /** Array of Universal Profile addresses that must be followed */
1200
+ followedAddresses: z.ZodArray<z.ZodString, "many">;
1201
+ }, "strip", z.ZodTypeAny, {
1202
+ method: "lsp26-follower";
1203
+ followedAddresses: string[];
1204
+ }, {
1205
+ method: "lsp26-follower";
1206
+ followedAddresses: string[];
1207
+ }>, z.ZodObject<{
1208
+ method: z.ZodLiteral<"time-locked">;
1209
+ /** Unix timestamp (seconds) when content becomes accessible */
1210
+ unlockTimestamp: z.ZodString;
1211
+ }, "strip", z.ZodTypeAny, {
1212
+ method: "time-locked";
1213
+ unlockTimestamp: string;
1214
+ }, {
1215
+ method: "time-locked";
1216
+ unlockTimestamp: string;
1217
+ }>]>;
1218
+ /** Provider-native condition object (stored as-is for external interop) */
1219
+ condition: z.ZodUnknown;
1220
+ /** Provider-specific encrypted key data */
1221
+ encryptedKey: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1222
+ }, "strip", z.ZodTypeAny, {
1223
+ params: {
1224
+ method: "digital-asset-balance";
1225
+ tokenAddress: string;
1226
+ requiredBalance: string;
1227
+ } | {
1228
+ method: "lsp8-ownership";
1229
+ tokenAddress: string;
1230
+ requiredTokenId: string;
1231
+ } | {
1232
+ method: "lsp26-follower";
1233
+ followedAddresses: string[];
1234
+ } | {
1235
+ method: "time-locked";
1236
+ unlockTimestamp: string;
1237
+ };
1238
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
1239
+ provider: "taco" | "lit";
1240
+ encryptedKey: Record<string, unknown>;
1241
+ condition?: unknown;
1242
+ }, {
1243
+ params: {
1244
+ method: "digital-asset-balance";
1245
+ tokenAddress: string;
1246
+ requiredBalance: string;
1247
+ } | {
1248
+ method: "lsp8-ownership";
1249
+ tokenAddress: string;
1250
+ requiredTokenId: string;
1251
+ } | {
1252
+ method: "lsp26-follower";
1253
+ followedAddresses: string[];
1254
+ } | {
1255
+ method: "time-locked";
1256
+ unlockTimestamp: string;
1257
+ };
1258
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
1259
+ provider: "taco" | "lit";
1260
+ encryptedKey: Record<string, unknown>;
1261
+ condition?: unknown;
1262
+ }>, {
1263
+ params: {
1264
+ method: "digital-asset-balance";
1265
+ tokenAddress: string;
1266
+ requiredBalance: string;
1267
+ } | {
1268
+ method: "lsp8-ownership";
1269
+ tokenAddress: string;
1270
+ requiredTokenId: string;
1271
+ } | {
1272
+ method: "lsp26-follower";
1273
+ followedAddresses: string[];
1274
+ } | {
1275
+ method: "time-locked";
1276
+ unlockTimestamp: string;
1277
+ };
1278
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
1279
+ provider: "taco" | "lit";
1280
+ encryptedKey: Record<string, unknown>;
1281
+ condition?: unknown;
1282
+ }, {
1283
+ params: {
1284
+ method: "digital-asset-balance";
1285
+ tokenAddress: string;
1286
+ requiredBalance: string;
1287
+ } | {
1288
+ method: "lsp8-ownership";
1289
+ tokenAddress: string;
1290
+ requiredTokenId: string;
1291
+ } | {
1292
+ method: "lsp26-follower";
1293
+ followedAddresses: string[];
1294
+ } | {
1295
+ method: "time-locked";
1296
+ unlockTimestamp: string;
1297
+ };
1298
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
1299
+ provider: "taco" | "lit";
1300
+ encryptedKey: Record<string, unknown>;
1301
+ condition?: unknown;
1302
+ }>;
1303
+ /** Chunked storage information */
1304
+ chunks: z.ZodEffects<z.ZodObject<{
1305
+ /** IPFS chunk references */
1306
+ ipfs: z.ZodOptional<z.ZodObject<{
1307
+ cids: z.ZodArray<z.ZodString, "many">;
1308
+ }, "strip", z.ZodTypeAny, {
1309
+ cids: string[];
1310
+ }, {
1311
+ cids: string[];
1312
+ }>>;
1313
+ /** Lumera/Pastel Cascade chunk references */
1314
+ lumera: z.ZodOptional<z.ZodObject<{
1315
+ actionIds: z.ZodArray<z.ZodString, "many">;
1316
+ }, "strip", z.ZodTypeAny, {
1317
+ actionIds: string[];
1318
+ }, {
1319
+ actionIds: string[];
1320
+ }>>;
1321
+ /** S3 chunk references */
1322
+ s3: z.ZodOptional<z.ZodObject<{
1323
+ keys: z.ZodArray<z.ZodString, "many">;
1324
+ bucket: z.ZodString;
1325
+ region: z.ZodString;
1326
+ }, "strip", z.ZodTypeAny, {
1327
+ keys: string[];
1328
+ bucket: string;
1329
+ region: string;
1330
+ }, {
1331
+ keys: string[];
1332
+ bucket: string;
1333
+ region: string;
1334
+ }>>;
1335
+ /** Arweave chunk references */
1336
+ arweave: z.ZodOptional<z.ZodObject<{
1337
+ transactionIds: z.ZodArray<z.ZodString, "many">;
1338
+ }, "strip", z.ZodTypeAny, {
1339
+ transactionIds: string[];
1340
+ }, {
1341
+ transactionIds: string[];
1342
+ }>>;
1343
+ /** Initialization vector for symmetric encryption (base64) */
1344
+ iv: z.ZodString;
1345
+ /** Total size of encrypted content in bytes */
1346
+ totalSize: z.ZodNumber;
1347
+ }, "strip", z.ZodTypeAny, {
1348
+ iv: string;
1349
+ totalSize: number;
1350
+ ipfs?: {
1351
+ cids: string[];
1352
+ } | undefined;
1353
+ s3?: {
1354
+ keys: string[];
1355
+ bucket: string;
1356
+ region: string;
1357
+ } | undefined;
1358
+ lumera?: {
1359
+ actionIds: string[];
1360
+ } | undefined;
1361
+ arweave?: {
1362
+ transactionIds: string[];
1363
+ } | undefined;
1364
+ }, {
1365
+ iv: string;
1366
+ totalSize: number;
1367
+ ipfs?: {
1368
+ cids: string[];
1369
+ } | undefined;
1370
+ s3?: {
1371
+ keys: string[];
1372
+ bucket: string;
1373
+ region: string;
1374
+ } | undefined;
1375
+ lumera?: {
1376
+ actionIds: string[];
1377
+ } | undefined;
1378
+ arweave?: {
1379
+ transactionIds: string[];
1380
+ } | undefined;
1381
+ }>, {
1382
+ iv: string;
1383
+ totalSize: number;
1384
+ ipfs?: {
1385
+ cids: string[];
1386
+ } | undefined;
1387
+ s3?: {
1388
+ keys: string[];
1389
+ bucket: string;
1390
+ region: string;
1391
+ } | undefined;
1392
+ lumera?: {
1393
+ actionIds: string[];
1394
+ } | undefined;
1395
+ arweave?: {
1396
+ transactionIds: string[];
1397
+ } | undefined;
1398
+ }, {
1399
+ iv: string;
1400
+ totalSize: number;
1401
+ ipfs?: {
1402
+ cids: string[];
1403
+ } | undefined;
1404
+ s3?: {
1405
+ keys: string[];
1406
+ bucket: string;
1407
+ region: string;
1408
+ } | undefined;
1409
+ lumera?: {
1410
+ actionIds: string[];
1411
+ } | undefined;
1412
+ arweave?: {
1413
+ transactionIds: string[];
1414
+ } | undefined;
1415
+ }>;
1416
+ }, "strip", z.ZodTypeAny, {
1417
+ version: "2.0.0";
1418
+ id: string;
1419
+ title: string;
1420
+ revision: number;
1421
+ images: {
1422
+ url: string;
1423
+ width: number;
1424
+ height: number;
1425
+ verification: {
1426
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8 | _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES;
1427
+ data: string;
1428
+ } | {
1429
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.ECDSA;
1430
+ data: string;
1431
+ source: string;
1432
+ };
1433
+ }[][];
1434
+ file: {
1435
+ type: string;
1436
+ name: string;
1437
+ size: number;
1438
+ hash: string;
1439
+ lastModified?: number | undefined;
1440
+ };
1441
+ encryption: {
1442
+ params: {
1443
+ method: "digital-asset-balance";
1444
+ tokenAddress: string;
1445
+ requiredBalance: string;
1446
+ } | {
1447
+ method: "lsp8-ownership";
1448
+ tokenAddress: string;
1449
+ requiredTokenId: string;
1450
+ } | {
1451
+ method: "lsp26-follower";
1452
+ followedAddresses: string[];
1453
+ } | {
1454
+ method: "time-locked";
1455
+ unlockTimestamp: string;
1456
+ };
1457
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
1458
+ provider: "taco" | "lit";
1459
+ encryptedKey: Record<string, unknown>;
1460
+ condition?: unknown;
1461
+ };
1462
+ chunks: {
1463
+ iv: string;
1464
+ totalSize: number;
1465
+ ipfs?: {
1466
+ cids: string[];
1467
+ } | undefined;
1468
+ s3?: {
1469
+ keys: string[];
1470
+ bucket: string;
1471
+ region: string;
1472
+ } | undefined;
1473
+ lumera?: {
1474
+ actionIds: string[];
1475
+ } | undefined;
1476
+ arweave?: {
1477
+ transactionIds: string[];
1478
+ } | undefined;
1479
+ };
1480
+ description?: string | undefined;
1481
+ }, {
1482
+ version: "2.0.0";
1483
+ id: string;
1484
+ title: string;
1485
+ revision: number;
1486
+ images: {
1487
+ url: string;
1488
+ width: number;
1489
+ height: number;
1490
+ verification: {
1491
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8 | _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES;
1492
+ data: string;
1493
+ } | {
1494
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.ECDSA;
1495
+ data: string;
1496
+ source: string;
1497
+ };
1498
+ }[][];
1499
+ file: {
1500
+ type: string;
1501
+ name: string;
1502
+ size: number;
1503
+ hash: string;
1504
+ lastModified?: number | undefined;
1505
+ };
1506
+ encryption: {
1507
+ params: {
1508
+ method: "digital-asset-balance";
1509
+ tokenAddress: string;
1510
+ requiredBalance: string;
1511
+ } | {
1512
+ method: "lsp8-ownership";
1513
+ tokenAddress: string;
1514
+ requiredTokenId: string;
1515
+ } | {
1516
+ method: "lsp26-follower";
1517
+ followedAddresses: string[];
1518
+ } | {
1519
+ method: "time-locked";
1520
+ unlockTimestamp: string;
1521
+ };
1522
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
1523
+ provider: "taco" | "lit";
1524
+ encryptedKey: Record<string, unknown>;
1525
+ condition?: unknown;
1526
+ };
1527
+ chunks: {
1528
+ iv: string;
1529
+ totalSize: number;
1530
+ ipfs?: {
1531
+ cids: string[];
1532
+ } | undefined;
1533
+ s3?: {
1534
+ keys: string[];
1535
+ bucket: string;
1536
+ region: string;
1537
+ } | undefined;
1538
+ lumera?: {
1539
+ actionIds: string[];
1540
+ } | undefined;
1541
+ arweave?: {
1542
+ transactionIds: string[];
1543
+ } | undefined;
1544
+ };
1545
+ description?: string | undefined;
1546
+ }>;
1547
+ }, "strip", z.ZodTypeAny, {
1548
+ LSP29EncryptedAsset: {
1549
+ version: "2.0.0";
1550
+ id: string;
1551
+ title: string;
1552
+ revision: number;
1553
+ images: {
1554
+ url: string;
1555
+ width: number;
1556
+ height: number;
1557
+ verification: {
1558
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8 | _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES;
1559
+ data: string;
1560
+ } | {
1561
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.ECDSA;
1562
+ data: string;
1563
+ source: string;
1564
+ };
1565
+ }[][];
1566
+ file: {
1567
+ type: string;
1568
+ name: string;
1569
+ size: number;
1570
+ hash: string;
1571
+ lastModified?: number | undefined;
1572
+ };
1573
+ encryption: {
1574
+ params: {
1575
+ method: "digital-asset-balance";
1576
+ tokenAddress: string;
1577
+ requiredBalance: string;
1578
+ } | {
1579
+ method: "lsp8-ownership";
1580
+ tokenAddress: string;
1581
+ requiredTokenId: string;
1582
+ } | {
1583
+ method: "lsp26-follower";
1584
+ followedAddresses: string[];
1585
+ } | {
1586
+ method: "time-locked";
1587
+ unlockTimestamp: string;
1588
+ };
1589
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
1590
+ provider: "taco" | "lit";
1591
+ encryptedKey: Record<string, unknown>;
1592
+ condition?: unknown;
1593
+ };
1594
+ chunks: {
1595
+ iv: string;
1596
+ totalSize: number;
1597
+ ipfs?: {
1598
+ cids: string[];
1599
+ } | undefined;
1600
+ s3?: {
1601
+ keys: string[];
1602
+ bucket: string;
1603
+ region: string;
1604
+ } | undefined;
1605
+ lumera?: {
1606
+ actionIds: string[];
1607
+ } | undefined;
1608
+ arweave?: {
1609
+ transactionIds: string[];
1610
+ } | undefined;
1611
+ };
1612
+ description?: string | undefined;
1613
+ };
1614
+ }, {
1615
+ LSP29EncryptedAsset: {
1616
+ version: "2.0.0";
1617
+ id: string;
1618
+ title: string;
1619
+ revision: number;
1620
+ images: {
1621
+ url: string;
1622
+ width: number;
1623
+ height: number;
1624
+ verification: {
1625
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_UTF8 | _chillwhales_lsp2.VERIFICATION_METHODS.HASH_KECCAK256_BYTES;
1626
+ data: string;
1627
+ } | {
1628
+ method: _chillwhales_lsp2.VERIFICATION_METHODS.ECDSA;
1629
+ data: string;
1630
+ source: string;
1631
+ };
1632
+ }[][];
1633
+ file: {
1634
+ type: string;
1635
+ name: string;
1636
+ size: number;
1637
+ hash: string;
1638
+ lastModified?: number | undefined;
1639
+ };
1640
+ encryption: {
1641
+ params: {
1642
+ method: "digital-asset-balance";
1643
+ tokenAddress: string;
1644
+ requiredBalance: string;
1645
+ } | {
1646
+ method: "lsp8-ownership";
1647
+ tokenAddress: string;
1648
+ requiredTokenId: string;
1649
+ } | {
1650
+ method: "lsp26-follower";
1651
+ followedAddresses: string[];
1652
+ } | {
1653
+ method: "time-locked";
1654
+ unlockTimestamp: string;
1655
+ };
1656
+ method: "digital-asset-balance" | "lsp8-ownership" | "lsp26-follower" | "time-locked";
1657
+ provider: "taco" | "lit";
1658
+ encryptedKey: Record<string, unknown>;
1659
+ condition?: unknown;
1660
+ };
1661
+ chunks: {
1662
+ iv: string;
1663
+ totalSize: number;
1664
+ ipfs?: {
1665
+ cids: string[];
1666
+ } | undefined;
1667
+ s3?: {
1668
+ keys: string[];
1669
+ bucket: string;
1670
+ region: string;
1671
+ } | undefined;
1672
+ lumera?: {
1673
+ actionIds: string[];
1674
+ } | undefined;
1675
+ arweave?: {
1676
+ transactionIds: string[];
1677
+ } | undefined;
1678
+ };
1679
+ description?: string | undefined;
1680
+ };
1681
+ }>;
1682
+
1683
+ /**
1684
+ * LSP29 Encrypted Assets TypeScript Types
1685
+ *
1686
+ * Types are inferred from Zod schemas via z.infer for single source of truth.
1687
+ * Re-exports constant-derived types for convenience.
1688
+ *
1689
+ * @see LSP-29-EncryptedAssets.md for full specification
1690
+ */
1691
+
1692
+ /** Union type of supported encryption provider identifiers */
1693
+ type LSP29Provider = (typeof LSP29_PROVIDERS)[number];
1694
+ /** Union type of supported access control method identifiers */
1695
+ type LSP29Method = (typeof LSP29_METHODS)[number];
1696
+ /** Union type of supported storage backend identifiers */
1697
+ type LSP29Backend = (typeof LSP29_BACKENDS)[number];
1698
+ /** File metadata for the encrypted original */
1699
+ type LSP29File = z.infer<typeof lsp29FileSchema>;
1700
+ /** IPFS chunk references */
1701
+ type LSP29IpfsChunks = z.infer<typeof lsp29IpfsChunksSchema>;
1702
+ /** Lumera/Pastel Cascade chunk references */
1703
+ type LSP29LumeraChunks = z.infer<typeof lsp29LumeraChunksSchema>;
1704
+ /** S3 chunk references */
1705
+ type LSP29S3Chunks = z.infer<typeof lsp29S3ChunksSchema>;
1706
+ /** Arweave chunk references */
1707
+ type LSP29ArweaveChunks = z.infer<typeof lsp29ArweaveChunksSchema>;
1708
+ /** Combined chunks with per-backend arrays and encryption IV */
1709
+ type LSP29Chunks = z.infer<typeof lsp29ChunksSchema>;
1710
+ /** Digital Asset Balance access control parameters */
1711
+ type LSP29DigitalAssetBalanceParams = z.infer<typeof lsp29DigitalAssetBalanceParamsSchema>;
1712
+ /** LSP8 NFT Ownership access control parameters */
1713
+ type LSP29Lsp8OwnershipParams = z.infer<typeof lsp29Lsp8OwnershipParamsSchema>;
1714
+ /** LSP26 Follower access control parameters */
1715
+ type LSP29Lsp26FollowerParams = z.infer<typeof lsp29Lsp26FollowerParamsSchema>;
1716
+ /** Time-Locked access control parameters */
1717
+ type LSP29TimeLockedParams = z.infer<typeof lsp29TimeLockedParamsSchema>;
1718
+ /** Discriminated union of all encryption parameter variants */
1719
+ type LSP29EncryptionParams = z.infer<typeof lsp29EncryptionParamsSchema>;
1720
+ /** Provider-first encryption metadata */
1721
+ type LSP29Encryption = z.infer<typeof lsp29EncryptionSchema>;
1722
+ /** Inner encrypted asset metadata (without the LSP29EncryptedAsset wrapper) */
1723
+ type LSP29EncryptedAssetInner = z.infer<typeof lsp29EncryptedAssetInnerSchema>;
1724
+ /** Root encrypted asset with LSP29EncryptedAsset wrapper key */
1725
+ type LSP29EncryptedAsset = z.infer<typeof lsp29EncryptedAssetSchema>;
1726
+ /** Subset of asset fields needed for encryption/decryption operations */
1727
+ type LSP29EncryptionData = Pick<LSP29EncryptedAssetInner, "file" | "encryption" | "chunks">;
1728
+
1729
+ /**
1730
+ * LSP29 Metadata Decoding
1731
+ *
1732
+ * Parses and validates LSP29 encrypted asset metadata JSON.
1733
+ *
1734
+ * @see LSP-29-EncryptedAssets.md for full specification
1735
+ */
1736
+
1737
+ /**
1738
+ * Parses an LSP29 metadata JSON string and validates it against the v2.0.0 schema.
1739
+ *
1740
+ * @param json - JSON string containing LSP29 encrypted asset metadata
1741
+ * @returns Parsed and validated LSP29EncryptedAsset
1742
+ * @throws Error if JSON is invalid or doesn't match the v2.0.0 schema
1743
+ *
1744
+ * @example
1745
+ * ```typescript
1746
+ * const metadata = decodeLsp29Metadata(jsonString);
1747
+ * console.log(metadata.LSP29EncryptedAsset.title);
1748
+ * console.log(metadata.LSP29EncryptedAsset.encryption.provider);
1749
+ * ```
1750
+ */
1751
+ declare function decodeLsp29Metadata(json: string): LSP29EncryptedAsset;
1752
+
1753
+ /**
1754
+ * LSP29 Data Key Computation Utilities
1755
+ *
1756
+ * Pure functions for computing ERC725Y data keys according to the LSP-29
1757
+ * Encrypted Assets specification. These utilities enable storage and
1758
+ * retrieval of encrypted assets on Universal Profiles.
1759
+ *
1760
+ * Ported from packages/utils/src/lsp29.ts — uses local constants (zero external imports).
1761
+ *
1762
+ * @see LSP-29-EncryptedAssets.md for full specification
1763
+ * @see https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md
1764
+ */
1765
+
1766
+ /**
1767
+ * Computes the data key for a specific LSP29EncryptedAssets[] array element
1768
+ *
1769
+ * According to LSP2 Array specification, element keys are formed by:
1770
+ * - First 16 bytes: First 16 bytes of the array key
1771
+ * - Last 16 bytes: uint128 index value
1772
+ *
1773
+ * @param index - Zero-based array index (must be non-negative integer or bigint)
1774
+ * @returns 32-byte data key for the array element
1775
+ * @throws Error if index is negative
1776
+ *
1777
+ * @example
1778
+ * ```typescript
1779
+ * const key0 = computeLsp29ArrayIndexKey(0);
1780
+ * // '0x1965f98377ddff08e78c93d820cc8de400000000000000000000000000000000'
1781
+ *
1782
+ * const key1 = computeLsp29ArrayIndexKey(1);
1783
+ * // '0x1965f98377ddff08e78c93d820cc8de400000000000000000000000000000001'
1784
+ *
1785
+ * // Also works with bigint
1786
+ * const keyBigInt = computeLsp29ArrayIndexKey(BigInt(5));
1787
+ * ```
1788
+ */
1789
+ declare function computeLsp29ArrayIndexKey(index: number | bigint): Hex;
1790
+ /**
1791
+ * Computes the mapping key for the latest version of encrypted content
1792
+ *
1793
+ * This key maps a content ID to the array index of its most recent revision.
1794
+ * The key is updated each time a new revision is added.
1795
+ *
1796
+ * Key format: LSP29EncryptedAssetsMap prefix + first 20 bytes of keccak256(contentId)
1797
+ *
1798
+ * @param contentId - Unique content identifier chosen by the creator
1799
+ * @returns 32-byte mapping data key
1800
+ *
1801
+ * @example
1802
+ * ```typescript
1803
+ * const key = computeLsp29MapKey('premium-content');
1804
+ * // Returns: '0x2b9a7a38a67cedc507c20000...' (32 bytes)
1805
+ * ```
1806
+ */
1807
+ declare function computeLsp29MapKey(contentId: string): Hex;
1808
+ /**
1809
+ * Computes the mapping key for a specific revision of encrypted content
1810
+ *
1811
+ * This key maps a content ID + revision number to the array index of that
1812
+ * specific version. These keys are immutable once set.
1813
+ *
1814
+ * Key format: LSP29EncryptedAssetsMap prefix + first 20 bytes of keccak256(abi.encodePacked(contentId, uint32(revision)))
1815
+ *
1816
+ * @param contentId - Unique content identifier chosen by the creator
1817
+ * @param revision - Version number (1-based, must be positive integer)
1818
+ * @returns 32-byte mapping data key
1819
+ * @throws Error if revision is not a positive integer
1820
+ *
1821
+ * @example
1822
+ * ```typescript
1823
+ * const keyV1 = computeLsp29MapKeyVersioned('premium-content', 1);
1824
+ * const keyV2 = computeLsp29MapKeyVersioned('premium-content', 2);
1825
+ * ```
1826
+ */
1827
+ declare function computeLsp29MapKeyVersioned(contentId: string, revision: number): Hex;
1828
+ /**
1829
+ * Computes the revision count mapping key for a content ID
1830
+ *
1831
+ * This key maps a content ID to the total number of revisions published.
1832
+ * Used to enumerate all versions and validate revision numbers.
1833
+ *
1834
+ * Key format: LSP29EncryptedAssetRevisionCount prefix + first 20 bytes of keccak256(contentId)
1835
+ *
1836
+ * @param contentId - Unique content identifier chosen by the creator
1837
+ * @returns 32-byte mapping data key
1838
+ *
1839
+ * @example
1840
+ * ```typescript
1841
+ * const key = computeLsp29RevisionCountKey('premium-content');
1842
+ * ```
1843
+ */
1844
+ declare function computeLsp29RevisionCountKey(contentId: string): Hex;
1845
+
1846
+ /**
1847
+ * LSP29 Encrypted Assets Type Guards
1848
+ *
1849
+ * Structural validation for identifying LSP29 v2.0.0 encrypted asset objects.
1850
+ *
1851
+ * @see LSP-29-EncryptedAssets.md for full specification
1852
+ */
1853
+
1854
+ /**
1855
+ * Type guard to check if data is a valid LSP29 Encrypted Asset (v2.0.0)
1856
+ *
1857
+ * Uses Zod schema validation to verify the structure matches the
1858
+ * LSP29EncryptedAsset specification. Does not throw on invalid data.
1859
+ *
1860
+ * @param data - Unknown data to check
1861
+ * @returns true if data is a valid LSP29EncryptedAsset
1862
+ *
1863
+ * @example
1864
+ * ```typescript
1865
+ * if (isLsp29Asset(unknownData)) {
1866
+ * console.log(unknownData.LSP29EncryptedAsset.title);
1867
+ * }
1868
+ *
1869
+ * const lsp29Assets = decodedItems.filter(isLsp29Asset);
1870
+ * ```
1871
+ */
1872
+ declare function isLsp29Asset(data: unknown): data is LSP29EncryptedAsset;
1873
+
1874
+ export { ENCRYPTION_METHOD_METADATA, LSP29DataKeys, LSP29_BACKENDS, LSP29_METHODS, LSP29_PROVIDERS, MAPPING_SEPARATOR, computeLsp29ArrayIndexKey, computeLsp29MapKey, computeLsp29MapKeyVersioned, computeLsp29RevisionCountKey, decodeLsp29Metadata, isLsp29Asset, lsp29ArweaveChunksSchema, lsp29ChunksSchema, lsp29DigitalAssetBalanceParamsSchema, lsp29EncryptedAssetInnerSchema, lsp29EncryptedAssetSchema, lsp29EncryptionParamsSchema, lsp29EncryptionSchema, lsp29FileSchema, lsp29IpfsChunksSchema, lsp29Lsp26FollowerParamsSchema, lsp29Lsp8OwnershipParamsSchema, lsp29LumeraChunksSchema, lsp29S3ChunksSchema, lsp29TimeLockedParamsSchema };
1875
+ export type { LSP29ArweaveChunks, LSP29Backend, LSP29Chunks, LSP29DigitalAssetBalanceParams, LSP29EncryptedAsset, LSP29EncryptedAssetInner, LSP29Encryption, LSP29EncryptionData, LSP29EncryptionParams, LSP29File, LSP29IpfsChunks, LSP29Lsp26FollowerParams, LSP29Lsp8OwnershipParams, LSP29LumeraChunks, LSP29Method, LSP29Provider, LSP29S3Chunks, LSP29TimeLockedParams };