@trylimbo/sdk-issuer 0.1.0-canary.100

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,2778 @@
1
+ //#region ../../../../node_modules/@ubjs/core/dist/esm/ffi-types.d.ts
2
+ type UniffiByteArray = Uint8Array;
3
+ //#endregion
4
+ //#region ../../../../node_modules/@ubjs/core/dist/esm/cursor.d.ts
5
+ /**
6
+ * Positional reader/writer over an `ArrayBuffer` slice with monomorphic typed
7
+ * accessors. One `DataView` and one `Uint8Array` are built at construction and
8
+ * reused for every primitive operation — no per-read DataView allocation, no
9
+ * function-pointer dispatch.
10
+ *
11
+ * Big-endian on the wire (matches the UniFFI RustBuffer wire format).
12
+ */
13
+ declare class Cursor {
14
+ private readonly dv;
15
+ private readonly u8;
16
+ private readonly start;
17
+ private readonly end;
18
+ private pos;
19
+ constructor(buffer: ArrayBuffer, offset: number, length: number);
20
+ static fromUint8Array(view: Uint8Array): Cursor;
21
+ remaining(): number;
22
+ skip(n: number): void;
23
+ readU8(): number;
24
+ readI8(): number;
25
+ readU16(): number;
26
+ readI16(): number;
27
+ readU32(): number;
28
+ readI32(): number;
29
+ readU64(): bigint;
30
+ readI64(): bigint;
31
+ readF32(): number;
32
+ readF64(): number;
33
+ readBool(): boolean;
34
+ writeU8(v: number): void;
35
+ writeI8(v: number): void;
36
+ writeU16(v: number): void;
37
+ writeI16(v: number): void;
38
+ writeU32(v: number): void;
39
+ writeI32(v: number): void;
40
+ writeU64(v: bigint): void;
41
+ writeI64(v: bigint): void;
42
+ writeF32(v: number): void;
43
+ writeF64(v: number): void;
44
+ writeBool(v: boolean): void;
45
+ readBytes(len: number): Uint8Array;
46
+ readArrayBuffer(len: number): ArrayBuffer;
47
+ writeBytes(src: Uint8Array): void;
48
+ private boundsCheck;
49
+ }
50
+ //#endregion
51
+ //#region ../../../../node_modules/@ubjs/core/dist/esm/ffi-converters.d.ts
52
+ type RustBufferAllocator = (n: number) => Uint8Array;
53
+ interface FfiConverter<FfiType, TsType> {
54
+ lift(value: FfiType): TsType;
55
+ lower(value: TsType, alloc: RustBufferAllocator): FfiType;
56
+ readFromCursor(c: Cursor): TsType;
57
+ writeIntoCursor(value: TsType, c: Cursor): void;
58
+ allocationSize(value: TsType): number;
59
+ }
60
+ //#endregion
61
+ //#region ../../../../node_modules/@ubjs/core/dist/esm/handle-map.d.ts
62
+ type UniffiHandle = bigint;
63
+ declare class UniffiHandleMap<T> {
64
+ private map;
65
+ private currentHandle;
66
+ insert(value: T): UniffiHandle;
67
+ get(handle: UniffiHandle): T;
68
+ /**
69
+ * Creates a second handle pointing to the same object. Rust calls this (via
70
+ * `CallbackInterfaceClone`) when it clones an Arc holding a foreign-implemented
71
+ * trait object, so two Arc references can exist with independent lifetimes.
72
+ *
73
+ * This clones the *handle*, not the object itself. Both handles resolve to the
74
+ * same JS object reference, and removing either handle does not affect the other.
75
+ */
76
+ clone(handle: UniffiHandle): UniffiHandle;
77
+ remove(handle: UniffiHandle): T | undefined;
78
+ has(handle: UniffiHandle): boolean;
79
+ get size(): number;
80
+ }
81
+ //#endregion
82
+ //#region ../../../../node_modules/@ubjs/core/dist/esm/rust-call.d.ts
83
+ /**
84
+ * A member of any object, acting as a GC guard / destructor guard.
85
+ *
86
+ * The object has a destructor lambda, called when the GC collects the object.
87
+ */
88
+ type UniffiGcObject = {
89
+ /**
90
+ * Called by the `object.uniffiDestroy()` to disable the
91
+ * action of the destructor guard.
92
+ */
93
+ markDestroyed(): void;
94
+ };
95
+ //#endregion
96
+ //#region ../../../../node_modules/@ubjs/core/dist/esm/objects.d.ts
97
+ /**
98
+ * Marker interface for all `interface` objects that cross the FFI.
99
+ * Reminder: `interface` objects have methods written in Rust.
100
+ *
101
+ * This typesscript interface contains the unffi methods that are needed to make
102
+ * the FFI work. It should shrink to zero methods.
103
+ */
104
+ declare abstract class UniffiAbstractObject {
105
+ /**
106
+ * Explicitly tell Rust to destroy the native peer that backs this object.
107
+ *
108
+ * Once this method has been called, any following method calls will throw an error.
109
+ *
110
+ * Can be called more than once.
111
+ */
112
+ abstract uniffiDestroy(): void;
113
+ /**
114
+ * A convenience method to use this object, then destroy it after its use.
115
+ * @param block
116
+ * @returns
117
+ */
118
+ uniffiUse<T>(block: (obj: this) => T): T;
119
+ }
120
+ /**
121
+ * The interface for a helper class generated for each `interface` class.
122
+ *
123
+ * Methods of this interface are not exposed to the API.
124
+ */
125
+ interface UniffiObjectFactory<T> {
126
+ bless(pointer: UniffiHandle): UniffiGcObject;
127
+ unbless(ptr: UniffiGcObject): void;
128
+ create(pointer: UniffiHandle): T;
129
+ pointer(obj: T): UniffiHandle;
130
+ clonePointer(obj: T): UniffiHandle;
131
+ freePointer(pointer: UniffiHandle): void;
132
+ isConcreteType(obj: any): obj is T;
133
+ }
134
+ /**
135
+ * An FfiConverter for an object.
136
+ */
137
+ declare class FfiConverterObject<T> implements FfiConverter<UniffiHandle, T> {
138
+ protected factory: UniffiObjectFactory<T>;
139
+ constructor(factory: UniffiObjectFactory<T>);
140
+ lift(value: UniffiHandle): T;
141
+ lower(value: T, _alloc: RustBufferAllocator): UniffiHandle;
142
+ readFromCursor(c: Cursor): T;
143
+ writeIntoCursor(value: T, c: Cursor): void;
144
+ protected lowerHandle(value: T): UniffiHandle;
145
+ allocationSize(value: T): number;
146
+ }
147
+ declare class FfiConverterObjectWithCallbacks<T> extends FfiConverterObject<T> {
148
+ private handleMap;
149
+ constructor(factory: UniffiObjectFactory<T>, handleMap?: UniffiHandleMap<T>);
150
+ protected lowerHandle(value: T): UniffiHandle;
151
+ lift(value: UniffiHandle): T;
152
+ drop(handle: UniffiHandle): T | undefined;
153
+ /**
154
+ * Called by Rust's `CallbackInterfaceClone` vtable entry when it clones an
155
+ * Arc holding a foreign-implemented object. Returns a new handle pointing to
156
+ * the same JS object; removing either handle does not affect the other.
157
+ */
158
+ clone(handle: UniffiHandle): UniffiHandle;
159
+ }
160
+ //#endregion
161
+ //#region ../../../../node_modules/@ubjs/core/dist/esm/symbols.d.ts
162
+ /**
163
+ * A destructor guard object is created for every
164
+ * `interface` object.
165
+ *
166
+ * It corresponds to the `DestructibleObject` in C++, which
167
+ * uses a C++ destructor to simulate the JS garbage collector.
168
+ *
169
+ * The implementation is in {@link RustArcPtr.h}.
170
+ */
171
+ declare const destructorGuardSymbol: unique symbol;
172
+ /**
173
+ * The `bigint` pointer corresponding to the Rust memory address
174
+ * of the native peer.
175
+ */
176
+ declare const pointerLiteralSymbol: unique symbol;
177
+ /**
178
+ * The `string` name of the object, enum or error class.
179
+ *
180
+ * This drives the `instanceOf` method implementations.
181
+ */
182
+ declare const uniffiTypeNameSymbol: unique symbol;
183
+ declare namespace trylimbo_issuer_d_exports {
184
+ export { Action, ActionDetail, ActionKind, Action_Tags, Assertion, AssetIssuer, AssetIssuerInterface, AssetIssuerLike, AssetMarker, AssetMarkerInterface, AssetMarkerLike, Binder, BinderInterface, BinderLike, Code, Component, ComponentEvent, ConnectOptions, CreatedOrigin, CustomAction, DeriveOptions, EmbedOptions, FieldViolation, FileSink, FileSinkInterface, FileSinkLike, FileSource, FileSourceInterface, FileSourceLike, IdentityOptions, Ingredient, InitOutcome, ManifestMode, ManifestMode_Tags, ManifestSpec, Mark, MarkOptions, Mark_Tags, Marked, MemorySink, MemorySinkInterface, MemorySinkLike, MemorySource, MemorySourceInterface, MemorySourceLike, OpenedOrigin, Origin, Origin_Tags, PluginAuthor, PluginRegistry, PluginRegistryInterface, PluginRegistryLike, RangeSink, RangeSinkImpl, RangeSource, RangeSourceImpl, Region, RotationPolicy, SdkError, SdkError_Tags, SegmentKind, SignOptions, SignOutcome, SignedSegmentOutcome, SignerClient, SignerClientInterface, SignerClientLike, SigningVault, SoftBinding, StandardAction, StreamIssuer, StreamIssuerInterface, StreamIssuerLike, StreamSession, StreamSessionInterface, StreamSessionLike, StreamStart, Thumbnail, Value, VaultPublicKey, classifySegment, _default$1 as default, embed };
185
+ }
186
+ /**
187
+ * Classify a fragmented-MP4 segment from a [`RangeSource`] as init/media/unknown: the
188
+ * SDK-owned box parse (`moov` vs `moof`) a streaming consumer uses to route each segment
189
+ * to [`StreamIssuer::init`](stream::StreamIssuer::init) vs
190
+ * [`StreamSession::sign`](stream::StreamSession::sign) without hand-parsing ISOBMFF itself.
191
+ *
192
+ * Async because it reads, and reading is the caller's storage: the two windows below may each
193
+ * be a round trip. It stays off the island, uniquely among the read-path entry points, because
194
+ * it awaits the source directly instead of driving anything synchronous underneath, so there is
195
+ * no blocking thread for one to protect.
196
+ *
197
+ * # Errors
198
+ *
199
+ * Fails when the source cannot be read.
200
+ */
201
+ declare function classifySegment(source: RangeSource, asyncOpts_?: {
202
+ signal: AbortSignal;
203
+ }): Promise<SegmentKind>;
204
+ /**
205
+ * Embed a signed manifest into an asset, writing the composed result back through
206
+ * `sink`. `plugins` resolves a non-c2pa format (e.g. MXF) the same way
207
+ * [`AssetIssuer::sign`](asset::AssetIssuer::sign) did, per [the `plugins`
208
+ * contract](crate::asset#the-plugins-contract): the write lands on a bounded region
209
+ * for a plugin match, on the whole (small) asset otherwise. `format` overrides the
210
+ * sniffed format. Pure local byte-wrangling: no signer round-trip.
211
+ *
212
+ * # Why the body is offloaded rather than run inline
213
+ *
214
+ * UniFFI polls a future on the thread that called it and never spawns, so an `async fn` whose
215
+ * body never suspends completes in its first poll, on the caller's thread, blocking it exactly
216
+ * as a sync export would: measured at 88ms for a 10MB asset on Node, during which nothing else
217
+ * in the process runs. It is also the read path's hard requirement, not just a courtesy: the
218
+ * splice reads through `sink`, and the caller's thread is the one that has to answer those
219
+ * reads. See [`task`](shared::task).
220
+ *
221
+ * # Errors
222
+ *
223
+ * Fails when the format can't be inferred and none was given, a plugin's
224
+ * authoring/`locate` disagrees after the write, or the c2pa handler can't
225
+ * parse/splice the asset.
226
+ */
227
+ declare function embed(sink: RangeSink, manifest: ArrayBuffer, options: EmbedOptions, asyncOpts_?: {
228
+ signal: AbortSignal;
229
+ }): Promise<void>;
230
+ /**
231
+ * Optional facts folded into a derived or workflow action.
232
+ */
233
+ type ActionDetail = {
234
+ /**
235
+ * RFC 3339 timestamp of when the action happened.
236
+ */
237
+ when?: string;
238
+ softwareAgent?: string;
239
+ description?: string;
240
+ /**
241
+ * The URI its term is published at, e.g.
242
+ * `http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture`.
243
+ */
244
+ sourceType?: string;
245
+ };
246
+ /**
247
+ * Generated factory for {@link ActionDetail} record objects.
248
+ */
249
+ declare const ActionDetail: Readonly<{
250
+ create: (partial: Partial<ActionDetail> & Required<Omit<ActionDetail, "description" | "softwareAgent" | "sourceType" | "when">>) => ActionDetail;
251
+ new: (partial: Partial<ActionDetail> & Required<Omit<ActionDetail, "description" | "softwareAgent" | "sourceType" | "when">>) => ActionDetail;
252
+ defaults: () => Partial<ActionDetail>;
253
+ }>;
254
+ /**
255
+ * Typealias from the type name used in the UDL file to the builtin type. This
256
+ * is needed because the UDL type name is used in function/method signatures.
257
+ */
258
+ type Value = string;
259
+ /**
260
+ * `data` is JSON; converted to CBOR before crossing the wire. Labels are
261
+ * client-namespaced: the `c2pa.*`/`cawg.identity` namespaces belong to
262
+ * the signer, which derives those assertions from the typed request
263
+ * fields and rejects them here. Foreign callers build an `Assertion`
264
+ * directly (`{ label, data }`) and nest it in `ManifestSpec.assertions`.
265
+ */
266
+ type Assertion = {
267
+ label: string;
268
+ data: Value;
269
+ };
270
+ /**
271
+ * Generated factory for {@link Assertion} record objects.
272
+ */
273
+ declare const Assertion: Readonly<{
274
+ create: (partial: Partial<Assertion> & Required<Omit<Assertion, never>>) => Assertion;
275
+ new: (partial: Partial<Assertion> & Required<Omit<Assertion, never>>) => Assertion;
276
+ defaults: () => Partial<Assertion>;
277
+ }>;
278
+ /**
279
+ * A pre-rendered thumbnail of the asset, attached to the manifest as a
280
+ * `c2pa.thumbnail.claim.{jpeg|png}` assertion. The split-signer has no asset
281
+ * bytes to generate one, so studios render their own small JPEG/PNG and pass
282
+ * it here; external verifiers (Adobe inspect) use it as the preview tile.
283
+ */
284
+ type Thumbnail = {
285
+ data: ArrayBuffer;
286
+ /**
287
+ * MIME type. C2PA defines `c2pa.thumbnail.claim.{jpeg,png,svg}`;
288
+ * `image/jpeg` and `image/png` are the interop-safe choices (consumer
289
+ * verifiers like Adobe inspect may not render SVG previews).
290
+ */
291
+ format: string;
292
+ };
293
+ /**
294
+ * Generated factory for {@link Thumbnail} record objects.
295
+ */
296
+ declare const Thumbnail: Readonly<{
297
+ create: (partial: Partial<Thumbnail> & Required<Omit<Thumbnail, never>>) => Thumbnail;
298
+ new: (partial: Partial<Thumbnail> & Required<Omit<Thumbnail, never>>) => Thumbnail;
299
+ defaults: () => Partial<Thumbnail>;
300
+ }>;
301
+ type Ingredient = {
302
+ data: ArrayBuffer;
303
+ title?: string;
304
+ format?: string;
305
+ thumbnail?: Thumbnail;
306
+ discoveredBy: Array<string>;
307
+ };
308
+ /**
309
+ * Generated factory for {@link Ingredient} record objects.
310
+ */
311
+ declare const Ingredient: Readonly<{
312
+ create: (partial: Partial<Ingredient> & Required<Omit<Ingredient, "discoveredBy" | "format" | "thumbnail" | "title">>) => Ingredient;
313
+ new: (partial: Partial<Ingredient> & Required<Omit<Ingredient, "discoveredBy" | "format" | "thumbnail" | "title">>) => Ingredient;
314
+ defaults: () => Partial<Ingredient>;
315
+ }>;
316
+ /**
317
+ * The event that brought a [`Component`] into (or out of) the asset. The
318
+ * signer derives the relationship and lifecycle action from it: `placed` /
319
+ * `removed` → `componentOf` + `c2pa.placed`/`c2pa.removed`; `inputTo` →
320
+ * the `inputTo` relationship, no action.
321
+ */
322
+ declare enum ComponentEvent {
323
+ Placed = 0,
324
+ Removed = 1,
325
+ InputTo = 2
326
+ }
327
+ type Component = {
328
+ id: string;
329
+ asset: Ingredient;
330
+ event: ComponentEvent;
331
+ detail?: ActionDetail;
332
+ };
333
+ /**
334
+ * Generated factory for {@link Component} record objects.
335
+ */
336
+ declare const Component: Readonly<{
337
+ create: (partial: Partial<Component> & Required<Omit<Component, "detail">>) => Component;
338
+ new: (partial: Partial<Component> & Required<Omit<Component, "detail">>) => Component;
339
+ defaults: () => Partial<Component>;
340
+ }>;
341
+ /**
342
+ * Transport tunables and per-request metadata for the signer connection.
343
+ *
344
+ * `headers`, when present, are attached to every RPC (e.g.
345
+ * `Authorization: Bearer …`, or routing/tenant metadata) and are
346
+ * lower-cased on the wire; omit them to connect with no extra metadata.
347
+ *
348
+ * # Both deadlines are required
349
+ *
350
+ * They were optional, and omitting them left a call with no deadline at all: a signer that
351
+ * accepted the connection and then stopped answering held the caller's thread for ever, with no
352
+ * cancellation path, because the SDK runs each call on a thread of its own and nothing was
353
+ * watching the clock. There is no figure the SDK could pick on a caller's behalf that is right
354
+ * for both a local signer and one across a region, so it asks.
355
+ *
356
+ * Neither bounds the hash: that runs client side, between the two legs of the signing protocol,
357
+ * and is not an RPC. These bound the network alone.
358
+ */
359
+ type ConnectOptions = {
360
+ headers?: Map<string, string>;
361
+ /**
362
+ * Per-RPC deadline. Bounds one leg of the signing protocol, not the whole sign.
363
+ */
364
+ rpcTimeoutMs: number;
365
+ /**
366
+ * Bounds the initial connection setup, so an unreachable signer fails fast rather than
367
+ * waiting out the OS SYN timeout.
368
+ */
369
+ connectTimeoutMs: number;
370
+ };
371
+ /**
372
+ * Generated factory for {@link ConnectOptions} record objects.
373
+ */
374
+ declare const ConnectOptions: Readonly<{
375
+ create: (partial: Partial<ConnectOptions> & Required<Omit<ConnectOptions, "headers">>) => ConnectOptions;
376
+ new: (partial: Partial<ConnectOptions> & Required<Omit<ConnectOptions, "headers">>) => ConnectOptions;
377
+ defaults: () => Partial<ConnectOptions>;
378
+ }>;
379
+ /**
380
+ * The asset is an original; the signer derives `c2pa.created`.
381
+ */
382
+ type CreatedOrigin = {
383
+ /**
384
+ * The URI its term is published at, e.g.
385
+ * `http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture`.
386
+ */
387
+ sourceType: string;
388
+ detail?: ActionDetail;
389
+ };
390
+ /**
391
+ * Generated factory for {@link CreatedOrigin} record objects.
392
+ */
393
+ declare const CreatedOrigin: Readonly<{
394
+ create: (partial: Partial<CreatedOrigin> & Required<Omit<CreatedOrigin, "detail">>) => CreatedOrigin;
395
+ new: (partial: Partial<CreatedOrigin> & Required<Omit<CreatedOrigin, "detail">>) => CreatedOrigin;
396
+ defaults: () => Partial<CreatedOrigin>;
397
+ }>;
398
+ /**
399
+ * An entity-namespaced action (reverse-DNS `label`; the signer rejects
400
+ * `c2pa.*`/`cawg.*`). `params` (a JSON object) merges into the action's
401
+ * `parameters`.
402
+ */
403
+ type CustomAction = {
404
+ label: string;
405
+ params?: Value;
406
+ detail?: ActionDetail;
407
+ /**
408
+ * `Component.id`s this action acted on.
409
+ */
410
+ componentIds?: Array<string>;
411
+ };
412
+ /**
413
+ * Generated factory for {@link CustomAction} record objects.
414
+ */
415
+ declare const CustomAction: Readonly<{
416
+ create: (partial: Partial<CustomAction> & Required<Omit<CustomAction, "componentIds" | "detail" | "params">>) => CustomAction;
417
+ new: (partial: Partial<CustomAction> & Required<Omit<CustomAction, "componentIds" | "detail" | "params">>) => CustomAction;
418
+ defaults: () => Partial<CustomAction>;
419
+ }>;
420
+ /**
421
+ * Everything one [`Binder::derive`] needs beyond the asset. `format` overrides the format sniffed
422
+ * from the leading bytes.
423
+ */
424
+ type DeriveOptions = {
425
+ format?: string;
426
+ };
427
+ /**
428
+ * Generated factory for {@link DeriveOptions} record objects.
429
+ */
430
+ declare const DeriveOptions: Readonly<{
431
+ create: (partial: Partial<DeriveOptions> & Required<Omit<DeriveOptions, "format">>) => DeriveOptions;
432
+ new: (partial: Partial<DeriveOptions> & Required<Omit<DeriveOptions, "format">>) => DeriveOptions;
433
+ defaults: () => Partial<DeriveOptions>;
434
+ }>;
435
+ /**
436
+ * A canonical gRPC/Connect status code: the coarse, closed failure class.
437
+ *
438
+ * The wasm lane projects this as the Connect `snake_case` string, so a consumer
439
+ * narrows on `err.code === "resource_exhausted"`; the native lane projects an enum.
440
+ */
441
+ declare enum Code {
442
+ Canceled = 0,
443
+ Unknown = 1,
444
+ InvalidArgument = 2,
445
+ DeadlineExceeded = 3,
446
+ NotFound = 4,
447
+ AlreadyExists = 5,
448
+ PermissionDenied = 6,
449
+ ResourceExhausted = 7,
450
+ FailedPrecondition = 8,
451
+ Aborted = 9,
452
+ OutOfRange = 10,
453
+ Unimplemented = 11,
454
+ Internal = 12,
455
+ Unavailable = 13,
456
+ DataLoss = 14,
457
+ Unauthenticated = 15
458
+ }
459
+ /**
460
+ * One `google.rpc.BadRequest.FieldViolation`: a request field that failed a constraint.
461
+ */
462
+ type FieldViolation = {
463
+ /**
464
+ * A dotted proto path to the offending field (`""` for a message-level rule).
465
+ */
466
+ field: string;
467
+ /**
468
+ * Human-readable explanation of the violation.
469
+ */
470
+ description: string;
471
+ /**
472
+ * The constraint id that failed (a protovalidate/CEL rule id), stable across releases.
473
+ */
474
+ reason: string;
475
+ };
476
+ /**
477
+ * Generated factory for {@link FieldViolation} record objects.
478
+ */
479
+ declare const FieldViolation: Readonly<{
480
+ create: (partial: Partial<FieldViolation> & Required<Omit<FieldViolation, never>>) => FieldViolation;
481
+ new: (partial: Partial<FieldViolation> & Required<Omit<FieldViolation, never>>) => FieldViolation;
482
+ defaults: () => Partial<FieldViolation>;
483
+ }>;
484
+ declare enum SdkError_Tags {
485
+ Reason = "Reason",
486
+ Invalid = "Invalid",
487
+ Status = "Status"
488
+ }
489
+ /**
490
+ * The error every SDK call throws: a decoded `google.rpc.Status`, discriminated
491
+ * as a semantic reason, a request validation, or a bare status. `code` and `message`
492
+ * are common to every variant.
493
+ */
494
+ declare const SdkError: Readonly<{
495
+ instanceOf: (obj: any) => obj is SdkError;
496
+ Reason: {
497
+ new (inner: {
498
+ code: Code;
499
+ message: string;
500
+ reason: string;
501
+ domain: string;
502
+ metadata: Map<string, string>;
503
+ }): {
504
+ /**
505
+ * @private
506
+ * This field is private and should not be used, use `tag` instead.
507
+ */
508
+ readonly [uniffiTypeNameSymbol]: "SdkError";
509
+ readonly tag: SdkError_Tags.Reason;
510
+ readonly inner: Readonly<{
511
+ code: Code;
512
+ message: string;
513
+ reason: string;
514
+ domain: string;
515
+ metadata: Map<string, string>;
516
+ }>;
517
+ name: string;
518
+ message: string;
519
+ stack?: string;
520
+ cause?: unknown;
521
+ };
522
+ "new"(inner: {
523
+ code: Code;
524
+ message: string;
525
+ reason: string;
526
+ domain: string;
527
+ metadata: Map<string, string>;
528
+ }): {
529
+ /**
530
+ * @private
531
+ * This field is private and should not be used, use `tag` instead.
532
+ */
533
+ readonly [uniffiTypeNameSymbol]: "SdkError";
534
+ readonly tag: SdkError_Tags.Reason;
535
+ readonly inner: Readonly<{
536
+ code: Code;
537
+ message: string;
538
+ reason: string;
539
+ domain: string;
540
+ metadata: Map<string, string>;
541
+ }>;
542
+ name: string;
543
+ message: string;
544
+ stack?: string;
545
+ cause?: unknown;
546
+ };
547
+ instanceOf(obj: any): obj is {
548
+ /**
549
+ * @private
550
+ * This field is private and should not be used, use `tag` instead.
551
+ */
552
+ readonly [uniffiTypeNameSymbol]: "SdkError";
553
+ readonly tag: SdkError_Tags.Reason;
554
+ readonly inner: Readonly<{
555
+ code: Code;
556
+ message: string;
557
+ reason: string;
558
+ domain: string;
559
+ metadata: Map<string, string>;
560
+ }>;
561
+ name: string;
562
+ message: string;
563
+ stack?: string;
564
+ cause?: unknown;
565
+ };
566
+ hasInner(obj: any): obj is {
567
+ /**
568
+ * @private
569
+ * This field is private and should not be used, use `tag` instead.
570
+ */
571
+ readonly [uniffiTypeNameSymbol]: "SdkError";
572
+ readonly tag: SdkError_Tags.Reason;
573
+ readonly inner: Readonly<{
574
+ code: Code;
575
+ message: string;
576
+ reason: string;
577
+ domain: string;
578
+ metadata: Map<string, string>;
579
+ }>;
580
+ name: string;
581
+ message: string;
582
+ stack?: string;
583
+ cause?: unknown;
584
+ };
585
+ getInner(obj: {
586
+ /**
587
+ * @private
588
+ * This field is private and should not be used, use `tag` instead.
589
+ */
590
+ readonly [uniffiTypeNameSymbol]: "SdkError";
591
+ readonly tag: SdkError_Tags.Reason;
592
+ readonly inner: Readonly<{
593
+ code: Code;
594
+ message: string;
595
+ reason: string;
596
+ domain: string;
597
+ metadata: Map<string, string>;
598
+ }>;
599
+ name: string;
600
+ message: string;
601
+ stack?: string;
602
+ cause?: unknown;
603
+ }): Readonly<{
604
+ code: Code;
605
+ message: string;
606
+ reason: string;
607
+ domain: string;
608
+ metadata: Map<string, string>;
609
+ }>;
610
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
611
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
612
+ stackTraceLimit: number;
613
+ };
614
+ Invalid: {
615
+ new (inner: {
616
+ code: Code;
617
+ message: string;
618
+ fieldViolations: Array<FieldViolation>;
619
+ }): {
620
+ /**
621
+ * @private
622
+ * This field is private and should not be used, use `tag` instead.
623
+ */
624
+ readonly [uniffiTypeNameSymbol]: "SdkError";
625
+ readonly tag: SdkError_Tags.Invalid;
626
+ readonly inner: Readonly<{
627
+ code: Code;
628
+ message: string;
629
+ fieldViolations: Array<FieldViolation>;
630
+ }>;
631
+ name: string;
632
+ message: string;
633
+ stack?: string;
634
+ cause?: unknown;
635
+ };
636
+ "new"(inner: {
637
+ code: Code;
638
+ message: string;
639
+ fieldViolations: Array<FieldViolation>;
640
+ }): {
641
+ /**
642
+ * @private
643
+ * This field is private and should not be used, use `tag` instead.
644
+ */
645
+ readonly [uniffiTypeNameSymbol]: "SdkError";
646
+ readonly tag: SdkError_Tags.Invalid;
647
+ readonly inner: Readonly<{
648
+ code: Code;
649
+ message: string;
650
+ fieldViolations: Array<FieldViolation>;
651
+ }>;
652
+ name: string;
653
+ message: string;
654
+ stack?: string;
655
+ cause?: unknown;
656
+ };
657
+ instanceOf(obj: any): obj is {
658
+ /**
659
+ * @private
660
+ * This field is private and should not be used, use `tag` instead.
661
+ */
662
+ readonly [uniffiTypeNameSymbol]: "SdkError";
663
+ readonly tag: SdkError_Tags.Invalid;
664
+ readonly inner: Readonly<{
665
+ code: Code;
666
+ message: string;
667
+ fieldViolations: Array<FieldViolation>;
668
+ }>;
669
+ name: string;
670
+ message: string;
671
+ stack?: string;
672
+ cause?: unknown;
673
+ };
674
+ hasInner(obj: any): obj is {
675
+ /**
676
+ * @private
677
+ * This field is private and should not be used, use `tag` instead.
678
+ */
679
+ readonly [uniffiTypeNameSymbol]: "SdkError";
680
+ readonly tag: SdkError_Tags.Invalid;
681
+ readonly inner: Readonly<{
682
+ code: Code;
683
+ message: string;
684
+ fieldViolations: Array<FieldViolation>;
685
+ }>;
686
+ name: string;
687
+ message: string;
688
+ stack?: string;
689
+ cause?: unknown;
690
+ };
691
+ getInner(obj: {
692
+ /**
693
+ * @private
694
+ * This field is private and should not be used, use `tag` instead.
695
+ */
696
+ readonly [uniffiTypeNameSymbol]: "SdkError";
697
+ readonly tag: SdkError_Tags.Invalid;
698
+ readonly inner: Readonly<{
699
+ code: Code;
700
+ message: string;
701
+ fieldViolations: Array<FieldViolation>;
702
+ }>;
703
+ name: string;
704
+ message: string;
705
+ stack?: string;
706
+ cause?: unknown;
707
+ }): Readonly<{
708
+ code: Code;
709
+ message: string;
710
+ fieldViolations: Array<FieldViolation>;
711
+ }>;
712
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
713
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
714
+ stackTraceLimit: number;
715
+ };
716
+ Status: {
717
+ new (inner: {
718
+ code: Code;
719
+ message: string;
720
+ }): {
721
+ /**
722
+ * @private
723
+ * This field is private and should not be used, use `tag` instead.
724
+ */
725
+ readonly [uniffiTypeNameSymbol]: "SdkError";
726
+ readonly tag: SdkError_Tags.Status;
727
+ readonly inner: Readonly<{
728
+ code: Code;
729
+ message: string;
730
+ }>;
731
+ name: string;
732
+ message: string;
733
+ stack?: string;
734
+ cause?: unknown;
735
+ };
736
+ "new"(inner: {
737
+ code: Code;
738
+ message: string;
739
+ }): {
740
+ /**
741
+ * @private
742
+ * This field is private and should not be used, use `tag` instead.
743
+ */
744
+ readonly [uniffiTypeNameSymbol]: "SdkError";
745
+ readonly tag: SdkError_Tags.Status;
746
+ readonly inner: Readonly<{
747
+ code: Code;
748
+ message: string;
749
+ }>;
750
+ name: string;
751
+ message: string;
752
+ stack?: string;
753
+ cause?: unknown;
754
+ };
755
+ instanceOf(obj: any): obj is {
756
+ /**
757
+ * @private
758
+ * This field is private and should not be used, use `tag` instead.
759
+ */
760
+ readonly [uniffiTypeNameSymbol]: "SdkError";
761
+ readonly tag: SdkError_Tags.Status;
762
+ readonly inner: Readonly<{
763
+ code: Code;
764
+ message: string;
765
+ }>;
766
+ name: string;
767
+ message: string;
768
+ stack?: string;
769
+ cause?: unknown;
770
+ };
771
+ hasInner(obj: any): obj is {
772
+ /**
773
+ * @private
774
+ * This field is private and should not be used, use `tag` instead.
775
+ */
776
+ readonly [uniffiTypeNameSymbol]: "SdkError";
777
+ readonly tag: SdkError_Tags.Status;
778
+ readonly inner: Readonly<{
779
+ code: Code;
780
+ message: string;
781
+ }>;
782
+ name: string;
783
+ message: string;
784
+ stack?: string;
785
+ cause?: unknown;
786
+ };
787
+ getInner(obj: {
788
+ /**
789
+ * @private
790
+ * This field is private and should not be used, use `tag` instead.
791
+ */
792
+ readonly [uniffiTypeNameSymbol]: "SdkError";
793
+ readonly tag: SdkError_Tags.Status;
794
+ readonly inner: Readonly<{
795
+ code: Code;
796
+ message: string;
797
+ }>;
798
+ name: string;
799
+ message: string;
800
+ stack?: string;
801
+ cause?: unknown;
802
+ }): Readonly<{
803
+ code: Code;
804
+ message: string;
805
+ }>;
806
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
807
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
808
+ stackTraceLimit: number;
809
+ };
810
+ }>;
811
+ /**
812
+ * The error every SDK call throws: a decoded `google.rpc.Status`, discriminated
813
+ * as a semantic reason, a request validation, or a bare status. `code` and `message`
814
+ * are common to every variant.
815
+ */
816
+ type SdkError = InstanceType<typeof SdkError['Reason' | 'Invalid' | 'Status']>;
817
+ /**
818
+ * The host-supplied ranged reader: `length()` returns the asset size in bytes, `read_at`
819
+ * reads `length` bytes starting at `offset`. Each call crosses the FFI boundary, and the
820
+ * caller controls the backing store (memory, file, S3, HTTP, custom).
821
+ *
822
+ * # Both methods are async
823
+ *
824
+ * Because storage is: an object store is a round trip, and so is anything behind `fetch`. A
825
+ * synchronous `read_at` forces every such caller to make the asset local first, which is a
826
+ * whole copy of a file that may be hundreds of gigabytes, to answer reads the SDK was going to
827
+ * make one window at a time anyway. Implement this over `aiobotocore`, an S3 client, a ranged
828
+ * `fetch`, or a plain file, and await whatever it takes.
829
+ *
830
+ * The SDK never calls back into the thread that called it (see [`task`](super::task)), so an
831
+ * implementation is free to be as slow as its storage is.
832
+ *
833
+ * # Both methods are fallible
834
+ *
835
+ * They have to be: an infallible `read_at` can only report a failed read as a short one, which
836
+ * is indistinguishable from a legitimate end of file, so an S3 timeout would silently verify or
837
+ * sign a truncated asset.
838
+ */
839
+ interface RangeSource {
840
+ length(asyncOpts_?: {
841
+ signal: AbortSignal;
842
+ }): Promise<bigint>;
843
+ readAt(offset: bigint, length: number, asyncOpts_?: {
844
+ signal: AbortSignal;
845
+ }): Promise<ArrayBuffer>;
846
+ }
847
+ /**
848
+ * The host-supplied ranged reader: `length()` returns the asset size in bytes, `read_at`
849
+ * reads `length` bytes starting at `offset`. Each call crosses the FFI boundary, and the
850
+ * caller controls the backing store (memory, file, S3, HTTP, custom).
851
+ *
852
+ * # Both methods are async
853
+ *
854
+ * Because storage is: an object store is a round trip, and so is anything behind `fetch`. A
855
+ * synchronous `read_at` forces every such caller to make the asset local first, which is a
856
+ * whole copy of a file that may be hundreds of gigabytes, to answer reads the SDK was going to
857
+ * make one window at a time anyway. Implement this over `aiobotocore`, an S3 client, a ranged
858
+ * `fetch`, or a plain file, and await whatever it takes.
859
+ *
860
+ * The SDK never calls back into the thread that called it (see [`task`](super::task)), so an
861
+ * implementation is free to be as slow as its storage is.
862
+ *
863
+ * # Both methods are fallible
864
+ *
865
+ * They have to be: an infallible `read_at` can only report a failed read as a short one, which
866
+ * is indistinguishable from a legitimate end of file, so an S3 timeout would silently verify or
867
+ * sign a truncated asset.
868
+ */
869
+ declare class RangeSourceImpl extends UniffiAbstractObject implements RangeSource {
870
+ readonly [uniffiTypeNameSymbol] = "RangeSourceImpl";
871
+ readonly [destructorGuardSymbol]: UniffiGcObject;
872
+ readonly [pointerLiteralSymbol]: UniffiHandle;
873
+ private constructor();
874
+ length(asyncOpts_?: {
875
+ signal: AbortSignal;
876
+ }): Promise<bigint>;
877
+ readAt(offset: bigint, length: number, asyncOpts_?: {
878
+ signal: AbortSignal;
879
+ }): Promise<ArrayBuffer>;
880
+ uniffiDestroy(): void;
881
+ static instanceOf(obj_: any): obj_ is RangeSourceImpl;
882
+ }
883
+ /**
884
+ * A byte range holding a bare C2PA manifest store, or reserved for one. A record of
885
+ * primitives, so a plugin in its OWN UniFFI namespace declares a structurally identical
886
+ * one and the two cross the boundary without sharing a Rust type.
887
+ */
888
+ type Region = {
889
+ offset: bigint;
890
+ length: bigint;
891
+ };
892
+ /**
893
+ * Generated factory for {@link Region} record objects.
894
+ */
895
+ declare const Region: Readonly<{
896
+ create: (partial: Partial<Region> & Required<Omit<Region, never>>) => Region;
897
+ new: (partial: Partial<Region> & Required<Omit<Region, never>>) => Region;
898
+ defaults: () => Partial<Region>;
899
+ }>;
900
+ /**
901
+ * A ranged read+write backend for embedding. All four methods are first-class (UniFFI
902
+ * has no trait inheritance for foreign callbacks, so the read half is duplicated from
903
+ * [`super::source::RangeSource`] rather than extended), and all four are async for the same
904
+ * reason its two are: the store on the other side is a round trip, whether that is an object
905
+ * store, a file behind an async runtime, or anything reached with `fetch`.
906
+ *
907
+ * Every method is fallible. `write_at` in particular has to be: an infallible write can
908
+ * only be ignored, so `embed` would report success on a write that never reached the
909
+ * caller's storage.
910
+ */
911
+ interface RangeSink {
912
+ length(asyncOpts_?: {
913
+ signal: AbortSignal;
914
+ }): Promise<bigint>;
915
+ readAt(offset: bigint, length: number, asyncOpts_?: {
916
+ signal: AbortSignal;
917
+ }): Promise<ArrayBuffer>;
918
+ writeAt(offset: bigint, data: ArrayBuffer, asyncOpts_?: {
919
+ signal: AbortSignal;
920
+ }): Promise<void>;
921
+ setLength(length: bigint, asyncOpts_?: {
922
+ signal: AbortSignal;
923
+ }): Promise<void>;
924
+ }
925
+ /**
926
+ * A ranged read+write backend for embedding. All four methods are first-class (UniFFI
927
+ * has no trait inheritance for foreign callbacks, so the read half is duplicated from
928
+ * [`super::source::RangeSource`] rather than extended), and all four are async for the same
929
+ * reason its two are: the store on the other side is a round trip, whether that is an object
930
+ * store, a file behind an async runtime, or anything reached with `fetch`.
931
+ *
932
+ * Every method is fallible. `write_at` in particular has to be: an infallible write can
933
+ * only be ignored, so `embed` would report success on a write that never reached the
934
+ * caller's storage.
935
+ */
936
+ declare class RangeSinkImpl extends UniffiAbstractObject implements RangeSink {
937
+ readonly [uniffiTypeNameSymbol] = "RangeSinkImpl";
938
+ readonly [destructorGuardSymbol]: UniffiGcObject;
939
+ readonly [pointerLiteralSymbol]: UniffiHandle;
940
+ private constructor();
941
+ length(asyncOpts_?: {
942
+ signal: AbortSignal;
943
+ }): Promise<bigint>;
944
+ readAt(offset: bigint, length: number, asyncOpts_?: {
945
+ signal: AbortSignal;
946
+ }): Promise<ArrayBuffer>;
947
+ writeAt(offset: bigint, data: ArrayBuffer, asyncOpts_?: {
948
+ signal: AbortSignal;
949
+ }): Promise<void>;
950
+ setLength(length: bigint, asyncOpts_?: {
951
+ signal: AbortSignal;
952
+ }): Promise<void>;
953
+ uniffiDestroy(): void;
954
+ static instanceOf(obj_: any): obj_ is RangeSinkImpl;
955
+ }
956
+ /**
957
+ * The surface an authoring plugin implements: the read half plus `reserve_slot`.
958
+ */
959
+ interface PluginAuthor {
960
+ /**
961
+ * The media types this plugin owns: its dispatch set, declared as data.
962
+ */
963
+ mediaTypes(): Array<string>;
964
+ /**
965
+ * Recognize the format from the real asset, or `None` to decline it.
966
+ *
967
+ * Signing never calls this: it dispatches on `media_types` against the format the caller
968
+ * resolved, because at sign time the caller is authoritative about what it is signing.
969
+ * Implement it correctly anyway, since the verify side dispatches on it and whatever
970
+ * signs a format is eventually verified by it.
971
+ */
972
+ sniff(src: RangeSource, asyncOpts_?: {
973
+ signal: AbortSignal;
974
+ }): Promise<string | undefined>;
975
+ /**
976
+ * The manifest window(s), or empty when none is present. MUST be byte-identical
977
+ * regardless of slot contents; the sign driver enforces that with a round-trip.
978
+ */
979
+ locate(src: RangeSource, asyncOpts_?: {
980
+ signal: AbortSignal;
981
+ }): Promise<Array<Region>>;
982
+ /**
983
+ * Reserve `reserve` bytes of manifest slot by writing container structure through
984
+ * `dst`, and return exactly where it landed. The core excludes those regions from the
985
+ * content hash and writes the signed manifest into them, so the plugin never embeds
986
+ * and never re-locates.
987
+ */
988
+ reserveSlot(dst: RangeSink, reserve: bigint, asyncOpts_?: {
989
+ signal: AbortSignal;
990
+ }): Promise<Array<Region>>;
991
+ }
992
+ /**
993
+ * The plugins one `sign`/`embed` call may dispatch to.
994
+ */
995
+ interface PluginRegistryLike {
996
+ /**
997
+ * Whether no plugin is registered, meaning a c2pa-only sign.
998
+ *
999
+ * # Errors
1000
+ *
1001
+ * `Internal` when the registry lock was poisoned by a panicking plugin.
1002
+ */
1003
+ isEmpty(): boolean;
1004
+ /**
1005
+ * How many plugins are registered.
1006
+ *
1007
+ * # Errors
1008
+ *
1009
+ * `Internal` when the registry lock was poisoned by a panicking plugin.
1010
+ */
1011
+ len(): number;
1012
+ /**
1013
+ * Add one plugin. The first registered whose declared media types match the resolved
1014
+ * format owns the asset; a c2pa-native layout is signed internally when none does.
1015
+ *
1016
+ * # Errors
1017
+ *
1018
+ * `Internal` when the registry lock was poisoned by a panicking plugin.
1019
+ */
1020
+ register(plugin: PluginAuthor): void;
1021
+ }
1022
+ /**
1023
+ * @deprecated Use `PluginRegistryLike` instead.
1024
+ */
1025
+ type PluginRegistryInterface = PluginRegistryLike;
1026
+ /**
1027
+ * The plugins one `sign`/`embed` call may dispatch to.
1028
+ */
1029
+ declare class PluginRegistry extends UniffiAbstractObject implements PluginRegistryLike {
1030
+ readonly [uniffiTypeNameSymbol] = "PluginRegistry";
1031
+ readonly [destructorGuardSymbol]: UniffiGcObject;
1032
+ readonly [pointerLiteralSymbol]: UniffiHandle;
1033
+ constructor();
1034
+ /**
1035
+ * Whether no plugin is registered, meaning a c2pa-only sign.
1036
+ *
1037
+ * # Errors
1038
+ *
1039
+ * `Internal` when the registry lock was poisoned by a panicking plugin.
1040
+ */
1041
+ isEmpty(): boolean;
1042
+ /**
1043
+ * How many plugins are registered.
1044
+ *
1045
+ * # Errors
1046
+ *
1047
+ * `Internal` when the registry lock was poisoned by a panicking plugin.
1048
+ */
1049
+ len(): number;
1050
+ /**
1051
+ * Add one plugin. The first registered whose declared media types match the resolved
1052
+ * format owns the asset; a c2pa-native layout is signed internally when none does.
1053
+ *
1054
+ * # Errors
1055
+ *
1056
+ * `Internal` when the registry lock was poisoned by a panicking plugin.
1057
+ */
1058
+ register(plugin: PluginAuthor): void;
1059
+ uniffiDestroy(): void;
1060
+ static instanceOf(obj_: any): obj_ is PluginRegistry;
1061
+ }
1062
+ /**
1063
+ * Everything one [`embed`] needs beyond the sink and the manifest.
1064
+ *
1065
+ * `format` overrides the format sniffed from the sink's leading bytes. `plugins` resolves a
1066
+ * non-c2pa format (e.g. MXF) the same way [`AssetIssuer::sign`](asset::AssetIssuer::sign) did; a
1067
+ * c2pa-native embed needs none.
1068
+ */
1069
+ type EmbedOptions = {
1070
+ format?: string;
1071
+ plugins?: PluginRegistryLike;
1072
+ };
1073
+ /**
1074
+ * Generated factory for {@link EmbedOptions} record objects.
1075
+ */
1076
+ declare const EmbedOptions: Readonly<{
1077
+ create: (partial: Partial<EmbedOptions> & Required<Omit<EmbedOptions, "format" | "plugins">>) => EmbedOptions;
1078
+ new: (partial: Partial<EmbedOptions> & Required<Omit<EmbedOptions, "format" | "plugins">>) => EmbedOptions;
1079
+ defaults: () => Partial<EmbedOptions>;
1080
+ }>;
1081
+ /**
1082
+ * Pass `None` to skip the CAWG identity signing path entirely. `identities`
1083
+ * is a JSON array of CAWG `VerifiedIdentity` objects.
1084
+ */
1085
+ type IdentityOptions = {
1086
+ roles: Array<string>;
1087
+ identities: Value;
1088
+ };
1089
+ /**
1090
+ * Generated factory for {@link IdentityOptions} record objects.
1091
+ */
1092
+ declare const IdentityOptions: Readonly<{
1093
+ create: (partial: Partial<IdentityOptions> & Required<Omit<IdentityOptions, never>>) => IdentityOptions;
1094
+ new: (partial: Partial<IdentityOptions> & Required<Omit<IdentityOptions, never>>) => IdentityOptions;
1095
+ defaults: () => Partial<IdentityOptions>;
1096
+ }>;
1097
+ /**
1098
+ * Result of [`StreamIssuer::init`](super::StreamIssuer::init). `valid_until_epoch_secs` is the
1099
+ * UNIX-epoch second at which the session key's validity elapses.
1100
+ */
1101
+ type InitOutcome = {
1102
+ signedInitBytes: ArrayBuffer;
1103
+ validUntilEpochSecs: bigint;
1104
+ };
1105
+ /**
1106
+ * Generated factory for {@link InitOutcome} record objects.
1107
+ */
1108
+ declare const InitOutcome: Readonly<{
1109
+ create: (partial: Partial<InitOutcome> & Required<Omit<InitOutcome, never>>) => InitOutcome;
1110
+ new: (partial: Partial<InitOutcome> & Required<Omit<InitOutcome, never>>) => InitOutcome;
1111
+ defaults: () => Partial<InitOutcome>;
1112
+ }>;
1113
+ type OpenedOrigin = {
1114
+ parent: Ingredient;
1115
+ detail?: ActionDetail;
1116
+ };
1117
+ /**
1118
+ * Generated factory for {@link OpenedOrigin} record objects.
1119
+ */
1120
+ declare const OpenedOrigin: Readonly<{
1121
+ create: (partial: Partial<OpenedOrigin> & Required<Omit<OpenedOrigin, "detail">>) => OpenedOrigin;
1122
+ new: (partial: Partial<OpenedOrigin> & Required<Omit<OpenedOrigin, "detail">>) => OpenedOrigin;
1123
+ defaults: () => Partial<OpenedOrigin>;
1124
+ }>;
1125
+ declare enum Origin_Tags {
1126
+ Created = "Created",
1127
+ Opened = "Opened"
1128
+ }
1129
+ declare const Origin: Readonly<{
1130
+ instanceOf: (obj: any) => obj is Origin;
1131
+ Created: {
1132
+ new (v0: CreatedOrigin): {
1133
+ /**
1134
+ * @private
1135
+ * This field is private and should not be used, use `tag` instead.
1136
+ */
1137
+ readonly [uniffiTypeNameSymbol]: "Origin";
1138
+ readonly tag: Origin_Tags.Created;
1139
+ readonly inner: Readonly<[CreatedOrigin]>;
1140
+ };
1141
+ "new"(v0: CreatedOrigin): {
1142
+ /**
1143
+ * @private
1144
+ * This field is private and should not be used, use `tag` instead.
1145
+ */
1146
+ readonly [uniffiTypeNameSymbol]: "Origin";
1147
+ readonly tag: Origin_Tags.Created;
1148
+ readonly inner: Readonly<[CreatedOrigin]>;
1149
+ };
1150
+ instanceOf(obj: any): obj is {
1151
+ /**
1152
+ * @private
1153
+ * This field is private and should not be used, use `tag` instead.
1154
+ */
1155
+ readonly [uniffiTypeNameSymbol]: "Origin";
1156
+ readonly tag: Origin_Tags.Created;
1157
+ readonly inner: Readonly<[CreatedOrigin]>;
1158
+ };
1159
+ };
1160
+ Opened: {
1161
+ new (v0: OpenedOrigin): {
1162
+ /**
1163
+ * @private
1164
+ * This field is private and should not be used, use `tag` instead.
1165
+ */
1166
+ readonly [uniffiTypeNameSymbol]: "Origin";
1167
+ readonly tag: Origin_Tags.Opened;
1168
+ readonly inner: Readonly<[OpenedOrigin]>;
1169
+ };
1170
+ "new"(v0: OpenedOrigin): {
1171
+ /**
1172
+ * @private
1173
+ * This field is private and should not be used, use `tag` instead.
1174
+ */
1175
+ readonly [uniffiTypeNameSymbol]: "Origin";
1176
+ readonly tag: Origin_Tags.Opened;
1177
+ readonly inner: Readonly<[OpenedOrigin]>;
1178
+ };
1179
+ instanceOf(obj: any): obj is {
1180
+ /**
1181
+ * @private
1182
+ * This field is private and should not be used, use `tag` instead.
1183
+ */
1184
+ readonly [uniffiTypeNameSymbol]: "Origin";
1185
+ readonly tag: Origin_Tags.Opened;
1186
+ readonly inner: Readonly<[OpenedOrigin]>;
1187
+ };
1188
+ };
1189
+ }>;
1190
+ type Origin = InstanceType<typeof Origin['Created' | 'Opened']>;
1191
+ /**
1192
+ * The C2PA workflow actions expressible as facts. Lifecycle actions
1193
+ * (`c2pa.created`/`opened`/`placed`/`removed`) are not representable; the
1194
+ * signer derives them from [`Origin`] and [`Component`]s.
1195
+ */
1196
+ declare enum ActionKind {
1197
+ ColorAdjustments = 0,
1198
+ Converted = 1,
1199
+ Cropped = 2,
1200
+ Drawing = 3,
1201
+ Edited = 4,
1202
+ Filtered = 5,
1203
+ Orientation = 6,
1204
+ Published = 7,
1205
+ Repackaged = 8,
1206
+ Resized = 9,
1207
+ Transcoded = 10,
1208
+ Unknown = 11,
1209
+ /**
1210
+ * An invisible watermark was inserted, creating a soft binding that resolves back to this
1211
+ * manifest. Supply the corresponding binding strategy on the signing request;
1212
+ * signing fails if nothing in the request describes the watermark.
1213
+ */
1214
+ WatermarkedBound = 12,
1215
+ /**
1216
+ * An invisible watermark was inserted that creates no soft binding, so nothing resolves it
1217
+ * back to this manifest. A signposting layer is one.
1218
+ */
1219
+ WatermarkedUnbound = 13
1220
+ }
1221
+ /**
1222
+ * One C2PA workflow action applied to the asset, in application order.
1223
+ */
1224
+ type StandardAction = {
1225
+ kind: ActionKind;
1226
+ detail?: ActionDetail;
1227
+ /**
1228
+ * `Component.id`s this action acted on.
1229
+ */
1230
+ componentIds?: Array<string>;
1231
+ };
1232
+ /**
1233
+ * Generated factory for {@link StandardAction} record objects.
1234
+ */
1235
+ declare const StandardAction: Readonly<{
1236
+ create: (partial: Partial<StandardAction> & Required<Omit<StandardAction, "componentIds" | "detail">>) => StandardAction;
1237
+ new: (partial: Partial<StandardAction> & Required<Omit<StandardAction, "componentIds" | "detail">>) => StandardAction;
1238
+ defaults: () => Partial<StandardAction>;
1239
+ }>;
1240
+ declare enum Action_Tags {
1241
+ Custom = "Custom",
1242
+ Standard = "Standard"
1243
+ }
1244
+ /**
1245
+ * A workflow action: standard C2PA vocabulary or entity-namespaced.
1246
+ * Discriminated structurally: variants are tried in declaration order:
1247
+ * [`Standard`](StandardAction) (has `kind`), then [`Custom`](CustomAction)
1248
+ * (has `label`); first with all required fields present wins.
1249
+ *
1250
+ * With no discriminant, a value matching *neither* shape (e.g. a `Standard`
1251
+ * with an unknown `kind`, or a `Custom` missing `label`) fails with a
1252
+ * non-specific "not `StandardAction | CustomAction`" error that doesn't name
1253
+ * the offending field.
1254
+ */
1255
+ declare const Action: Readonly<{
1256
+ instanceOf: (obj: any) => obj is Action;
1257
+ Custom: {
1258
+ new (v0: CustomAction): {
1259
+ /**
1260
+ * @private
1261
+ * This field is private and should not be used, use `tag` instead.
1262
+ */
1263
+ readonly [uniffiTypeNameSymbol]: "Action";
1264
+ readonly tag: Action_Tags.Custom;
1265
+ readonly inner: Readonly<[CustomAction]>;
1266
+ };
1267
+ "new"(v0: CustomAction): {
1268
+ /**
1269
+ * @private
1270
+ * This field is private and should not be used, use `tag` instead.
1271
+ */
1272
+ readonly [uniffiTypeNameSymbol]: "Action";
1273
+ readonly tag: Action_Tags.Custom;
1274
+ readonly inner: Readonly<[CustomAction]>;
1275
+ };
1276
+ instanceOf(obj: any): obj is {
1277
+ /**
1278
+ * @private
1279
+ * This field is private and should not be used, use `tag` instead.
1280
+ */
1281
+ readonly [uniffiTypeNameSymbol]: "Action";
1282
+ readonly tag: Action_Tags.Custom;
1283
+ readonly inner: Readonly<[CustomAction]>;
1284
+ };
1285
+ };
1286
+ Standard: {
1287
+ new (v0: StandardAction): {
1288
+ /**
1289
+ * @private
1290
+ * This field is private and should not be used, use `tag` instead.
1291
+ */
1292
+ readonly [uniffiTypeNameSymbol]: "Action";
1293
+ readonly tag: Action_Tags.Standard;
1294
+ readonly inner: Readonly<[StandardAction]>;
1295
+ };
1296
+ "new"(v0: StandardAction): {
1297
+ /**
1298
+ * @private
1299
+ * This field is private and should not be used, use `tag` instead.
1300
+ */
1301
+ readonly [uniffiTypeNameSymbol]: "Action";
1302
+ readonly tag: Action_Tags.Standard;
1303
+ readonly inner: Readonly<[StandardAction]>;
1304
+ };
1305
+ instanceOf(obj: any): obj is {
1306
+ /**
1307
+ * @private
1308
+ * This field is private and should not be used, use `tag` instead.
1309
+ */
1310
+ readonly [uniffiTypeNameSymbol]: "Action";
1311
+ readonly tag: Action_Tags.Standard;
1312
+ readonly inner: Readonly<[StandardAction]>;
1313
+ };
1314
+ };
1315
+ }>;
1316
+ /**
1317
+ * A workflow action: standard C2PA vocabulary or entity-namespaced.
1318
+ * Discriminated structurally: variants are tried in declaration order:
1319
+ * [`Standard`](StandardAction) (has `kind`), then [`Custom`](CustomAction)
1320
+ * (has `label`); first with all required fields present wins.
1321
+ *
1322
+ * With no discriminant, a value matching *neither* shape (e.g. a `Standard`
1323
+ * with an unknown `kind`, or a `Custom` missing `label`) fails with a
1324
+ * non-specific "not `StandardAction | CustomAction`" error that doesn't name
1325
+ * the offending field.
1326
+ */
1327
+ type Action = InstanceType<typeof Action['Custom' | 'Standard']>;
1328
+ type ManifestSpec = {
1329
+ title?: string;
1330
+ origin: Origin;
1331
+ actions?: Array<Action>;
1332
+ identity?: IdentityOptions;
1333
+ thumbnail?: Thumbnail;
1334
+ assertions?: Array<Assertion>;
1335
+ components?: Array<Component>;
1336
+ };
1337
+ /**
1338
+ * Generated factory for {@link ManifestSpec} record objects.
1339
+ */
1340
+ declare const ManifestSpec: Readonly<{
1341
+ create: (partial: Partial<ManifestSpec> & Required<Omit<ManifestSpec, "actions" | "assertions" | "components" | "identity" | "thumbnail" | "title">>) => ManifestSpec;
1342
+ new: (partial: Partial<ManifestSpec> & Required<Omit<ManifestSpec, "actions" | "assertions" | "components" | "identity" | "thumbnail" | "title">>) => ManifestSpec;
1343
+ defaults: () => Partial<ManifestSpec>;
1344
+ }>;
1345
+ /**
1346
+ * Everything one [`AssetMarker::mark`] needs beyond the asset.
1347
+ */
1348
+ type MarkOptions = {
1349
+ /**
1350
+ * Filename recorded with the mark, and the multipart part name.
1351
+ */
1352
+ fileName?: string;
1353
+ /**
1354
+ * Skip the signposting layer, leaving only marks that resolve back to the manifest.
1355
+ */
1356
+ skipSignpost?: boolean;
1357
+ };
1358
+ /**
1359
+ * Generated factory for {@link MarkOptions} record objects.
1360
+ */
1361
+ declare const MarkOptions: Readonly<{
1362
+ create: (partial: Partial<MarkOptions> & Required<Omit<MarkOptions, "fileName" | "skipSignpost">>) => MarkOptions;
1363
+ new: (partial: Partial<MarkOptions> & Required<Omit<MarkOptions, "fileName" | "skipSignpost">>) => MarkOptions;
1364
+ defaults: () => Partial<MarkOptions>;
1365
+ }>;
1366
+ type SoftBinding = {
1367
+ alg: string;
1368
+ value: string;
1369
+ };
1370
+ /**
1371
+ * Generated factory for {@link SoftBinding} record objects.
1372
+ */
1373
+ declare const SoftBinding: Readonly<{
1374
+ create: (partial: Partial<SoftBinding> & Required<Omit<SoftBinding, never>>) => SoftBinding;
1375
+ new: (partial: Partial<SoftBinding> & Required<Omit<SoftBinding, never>>) => SoftBinding;
1376
+ defaults: () => Partial<SoftBinding>;
1377
+ }>;
1378
+ declare enum Mark_Tags {
1379
+ Bound = "Bound",
1380
+ Unbound = "Unbound"
1381
+ }
1382
+ declare const Mark: Readonly<{
1383
+ instanceOf: (obj: any) => obj is Mark;
1384
+ Bound: {
1385
+ new (inner: {
1386
+ binding: SoftBinding;
1387
+ }): {
1388
+ /**
1389
+ * @private
1390
+ * This field is private and should not be used, use `tag` instead.
1391
+ */
1392
+ readonly [uniffiTypeNameSymbol]: "Mark";
1393
+ readonly tag: Mark_Tags.Bound;
1394
+ readonly inner: Readonly<{
1395
+ binding: SoftBinding;
1396
+ }>;
1397
+ };
1398
+ "new"(inner: {
1399
+ binding: SoftBinding;
1400
+ }): {
1401
+ /**
1402
+ * @private
1403
+ * This field is private and should not be used, use `tag` instead.
1404
+ */
1405
+ readonly [uniffiTypeNameSymbol]: "Mark";
1406
+ readonly tag: Mark_Tags.Bound;
1407
+ readonly inner: Readonly<{
1408
+ binding: SoftBinding;
1409
+ }>;
1410
+ };
1411
+ instanceOf(obj: any): obj is {
1412
+ /**
1413
+ * @private
1414
+ * This field is private and should not be used, use `tag` instead.
1415
+ */
1416
+ readonly [uniffiTypeNameSymbol]: "Mark";
1417
+ readonly tag: Mark_Tags.Bound;
1418
+ readonly inner: Readonly<{
1419
+ binding: SoftBinding;
1420
+ }>;
1421
+ };
1422
+ };
1423
+ Unbound: {
1424
+ new (): {
1425
+ /**
1426
+ * @private
1427
+ * This field is private and should not be used, use `tag` instead.
1428
+ */
1429
+ readonly [uniffiTypeNameSymbol]: "Mark";
1430
+ readonly tag: Mark_Tags.Unbound;
1431
+ };
1432
+ "new"(): {
1433
+ /**
1434
+ * @private
1435
+ * This field is private and should not be used, use `tag` instead.
1436
+ */
1437
+ readonly [uniffiTypeNameSymbol]: "Mark";
1438
+ readonly tag: Mark_Tags.Unbound;
1439
+ };
1440
+ instanceOf(obj: any): obj is {
1441
+ /**
1442
+ * @private
1443
+ * This field is private and should not be used, use `tag` instead.
1444
+ */
1445
+ readonly [uniffiTypeNameSymbol]: "Mark";
1446
+ readonly tag: Mark_Tags.Unbound;
1447
+ };
1448
+ };
1449
+ }>;
1450
+ type Mark = InstanceType<typeof Mark['Bound' | 'Unbound']>;
1451
+ /**
1452
+ * Result of [`AssetMarker::mark`](super::AssetMarker::mark): the marked asset and the provenance
1453
+ * its marking created. The neutral core is [`marker::Marked`]; this differs only in carrying the
1454
+ * asset as [`Bytes`].
1455
+ */
1456
+ type Marked = {
1457
+ /**
1458
+ * The marked asset. Sign these bytes, not the ones handed in.
1459
+ */
1460
+ bytes: ArrayBuffer;
1461
+ /**
1462
+ * The marked asset's media type, which a marker may change by re-encoding.
1463
+ */
1464
+ format: string;
1465
+ /**
1466
+ * The name the marking service recorded.
1467
+ */
1468
+ fileName: string;
1469
+ /**
1470
+ * Every mark applied, in the order applied.
1471
+ */
1472
+ marks: Array<Mark>;
1473
+ /**
1474
+ * One `c2pa.watermarked.bound` or `.unbound` per mark, in the same order. Append to the
1475
+ * manifest's `actions`.
1476
+ */
1477
+ actions: Array<Action>;
1478
+ /**
1479
+ * What the bound marks resolve through; index the manifest under these.
1480
+ */
1481
+ bindings: Array<SoftBinding>;
1482
+ };
1483
+ /**
1484
+ * Generated factory for {@link Marked} record objects.
1485
+ */
1486
+ declare const Marked: Readonly<{
1487
+ create: (partial: Partial<Marked> & Required<Omit<Marked, never>>) => Marked;
1488
+ new: (partial: Partial<Marked> & Required<Omit<Marked, never>>) => Marked;
1489
+ defaults: () => Partial<Marked>;
1490
+ }>;
1491
+ /**
1492
+ * `validity_period_secs` is the session-key validity window in seconds
1493
+ * after `created_at`; the verifier rejects segments signed past this
1494
+ * (plus skew tolerance).
1495
+ *
1496
+ * `refresh_percent` is 0..=100; once this percentage of
1497
+ * `validity_period_secs` elapses, `sign` returns `rotation_due: true`
1498
+ * so the consumer can rotate before verifier-side expiry.
1499
+ */
1500
+ type RotationPolicy = {
1501
+ validityPeriodSecs: number;
1502
+ refreshPercent: number;
1503
+ };
1504
+ /**
1505
+ * Generated factory for {@link RotationPolicy} record objects.
1506
+ */
1507
+ declare const RotationPolicy: Readonly<{
1508
+ create: (partial: Partial<RotationPolicy> & Required<Omit<RotationPolicy, "refreshPercent" | "validityPeriodSecs">>) => RotationPolicy;
1509
+ new: (partial: Partial<RotationPolicy> & Required<Omit<RotationPolicy, "refreshPercent" | "validityPeriodSecs">>) => RotationPolicy;
1510
+ defaults: () => Partial<RotationPolicy>;
1511
+ }>;
1512
+ /**
1513
+ * A soft-binding binder: how a recoverable binding is derived from an asset. Put these inside the
1514
+ * issuer's manifest mode to sign and index under them, and pass them in verify options to recover.
1515
+ */
1516
+ interface BinderLike {
1517
+ /**
1518
+ * This binder's binding for `source`, or `None` when there is none. `format` overrides
1519
+ * the format sniffed from the leading bytes.
1520
+ *
1521
+ * `None` and an error mean different things: `None` is "no binding here", an error is
1522
+ * "the question could not be answered", so a binder that failed never reads as an
1523
+ * unmarked asset.
1524
+ *
1525
+ * # Errors
1526
+ *
1527
+ * An unreadable source, or a binder that could not answer.
1528
+ */
1529
+ derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
1530
+ signal: AbortSignal;
1531
+ }): Promise<SoftBinding | undefined>;
1532
+ }
1533
+ /**
1534
+ * @deprecated Use `BinderLike` instead.
1535
+ */
1536
+ type BinderInterface = BinderLike;
1537
+ /**
1538
+ * A soft-binding binder: how a recoverable binding is derived from an asset. Put these inside the
1539
+ * issuer's manifest mode to sign and index under them, and pass them in verify options to recover.
1540
+ */
1541
+ declare class Binder extends UniffiAbstractObject implements BinderLike {
1542
+ readonly [uniffiTypeNameSymbol] = "Binder";
1543
+ readonly [destructorGuardSymbol]: UniffiGcObject;
1544
+ readonly [pointerLiteralSymbol]: UniffiHandle;
1545
+ private constructor();
1546
+ /**
1547
+ * A binding you already hold, such as an out-of-band video ISCC. Reads nothing.
1548
+ */
1549
+ static held(binding: SoftBinding): BinderLike;
1550
+ /**
1551
+ * Local ISCC Image-Code for supported image formats.
1552
+ */
1553
+ static iscc(): BinderLike;
1554
+ /**
1555
+ * This binder's binding for `source`, or `None` when there is none. `format` overrides
1556
+ * the format sniffed from the leading bytes.
1557
+ *
1558
+ * `None` and an error mean different things: `None` is "no binding here", an error is
1559
+ * "the question could not be answered", so a binder that failed never reads as an
1560
+ * unmarked asset.
1561
+ *
1562
+ * # Errors
1563
+ *
1564
+ * An unreadable source, or a binder that could not answer.
1565
+ */
1566
+ derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
1567
+ signal: AbortSignal;
1568
+ }): Promise<SoftBinding | undefined>;
1569
+ uniffiDestroy(): void;
1570
+ static instanceOf(obj_: any): obj_ is Binder;
1571
+ }
1572
+ declare enum ManifestMode_Tags {
1573
+ Embedded = "Embedded",
1574
+ Remote = "Remote",
1575
+ Both = "Both"
1576
+ }
1577
+ /**
1578
+ * How the manifest is delivered and which soft-binding strategies it declares.
1579
+ *
1580
+ * Embedded manifests may still need bindings, for example to describe a bound watermark, but
1581
+ * are not indexed. Remote requires at least one resolved binding at the signer protocol boundary;
1582
+ * both is recoverable through its embedded manifest and permits an empty strategy list.
1583
+ */
1584
+ declare const ManifestMode: Readonly<{
1585
+ instanceOf: (obj: any) => obj is ManifestMode;
1586
+ Embedded: {
1587
+ new (inner: {
1588
+ binders: Array<BinderLike>;
1589
+ into?: RangeSink;
1590
+ }): {
1591
+ /**
1592
+ * @private
1593
+ * This field is private and should not be used, use `tag` instead.
1594
+ */
1595
+ readonly [uniffiTypeNameSymbol]: "ManifestMode";
1596
+ readonly tag: ManifestMode_Tags.Embedded;
1597
+ readonly inner: Readonly<{
1598
+ binders: Array<BinderLike>;
1599
+ into?: RangeSink;
1600
+ }>;
1601
+ };
1602
+ new: (partial: Parameters<(partial: Partial<{
1603
+ binders: Array<BinderLike>;
1604
+ into?: RangeSink;
1605
+ }> & Required<Omit<{
1606
+ binders: Array<BinderLike>;
1607
+ into?: RangeSink;
1608
+ }, "binders" | "into">>) => {
1609
+ binders: Array<BinderLike>;
1610
+ into?: RangeSink;
1611
+ }>[0]) => {
1612
+ /**
1613
+ * @private
1614
+ * This field is private and should not be used, use `tag` instead.
1615
+ */
1616
+ readonly [uniffiTypeNameSymbol]: "ManifestMode";
1617
+ readonly tag: ManifestMode_Tags.Embedded;
1618
+ readonly inner: Readonly<{
1619
+ binders: Array<BinderLike>;
1620
+ into?: RangeSink;
1621
+ }>;
1622
+ };
1623
+ instanceOf(obj: any): obj is {
1624
+ /**
1625
+ * @private
1626
+ * This field is private and should not be used, use `tag` instead.
1627
+ */
1628
+ readonly [uniffiTypeNameSymbol]: "ManifestMode";
1629
+ readonly tag: ManifestMode_Tags.Embedded;
1630
+ readonly inner: Readonly<{
1631
+ binders: Array<BinderLike>;
1632
+ into?: RangeSink;
1633
+ }>;
1634
+ };
1635
+ };
1636
+ Remote: {
1637
+ new (inner: {
1638
+ binders: Array<BinderLike>;
1639
+ }): {
1640
+ /**
1641
+ * @private
1642
+ * This field is private and should not be used, use `tag` instead.
1643
+ */
1644
+ readonly [uniffiTypeNameSymbol]: "ManifestMode";
1645
+ readonly tag: ManifestMode_Tags.Remote;
1646
+ readonly inner: Readonly<{
1647
+ binders: Array<BinderLike>;
1648
+ }>;
1649
+ };
1650
+ "new"(inner: {
1651
+ binders: Array<BinderLike>;
1652
+ }): {
1653
+ /**
1654
+ * @private
1655
+ * This field is private and should not be used, use `tag` instead.
1656
+ */
1657
+ readonly [uniffiTypeNameSymbol]: "ManifestMode";
1658
+ readonly tag: ManifestMode_Tags.Remote;
1659
+ readonly inner: Readonly<{
1660
+ binders: Array<BinderLike>;
1661
+ }>;
1662
+ };
1663
+ instanceOf(obj: any): obj is {
1664
+ /**
1665
+ * @private
1666
+ * This field is private and should not be used, use `tag` instead.
1667
+ */
1668
+ readonly [uniffiTypeNameSymbol]: "ManifestMode";
1669
+ readonly tag: ManifestMode_Tags.Remote;
1670
+ readonly inner: Readonly<{
1671
+ binders: Array<BinderLike>;
1672
+ }>;
1673
+ };
1674
+ };
1675
+ Both: {
1676
+ new (inner: {
1677
+ binders: Array<BinderLike>;
1678
+ into?: RangeSink;
1679
+ }): {
1680
+ /**
1681
+ * @private
1682
+ * This field is private and should not be used, use `tag` instead.
1683
+ */
1684
+ readonly [uniffiTypeNameSymbol]: "ManifestMode";
1685
+ readonly tag: ManifestMode_Tags.Both;
1686
+ readonly inner: Readonly<{
1687
+ binders: Array<BinderLike>;
1688
+ into?: RangeSink;
1689
+ }>;
1690
+ };
1691
+ new: (partial: Parameters<(partial: Partial<{
1692
+ binders: Array<BinderLike>;
1693
+ into?: RangeSink;
1694
+ }> & Required<Omit<{
1695
+ binders: Array<BinderLike>;
1696
+ into?: RangeSink;
1697
+ }, "binders" | "into">>) => {
1698
+ binders: Array<BinderLike>;
1699
+ into?: RangeSink;
1700
+ }>[0]) => {
1701
+ /**
1702
+ * @private
1703
+ * This field is private and should not be used, use `tag` instead.
1704
+ */
1705
+ readonly [uniffiTypeNameSymbol]: "ManifestMode";
1706
+ readonly tag: ManifestMode_Tags.Both;
1707
+ readonly inner: Readonly<{
1708
+ binders: Array<BinderLike>;
1709
+ into?: RangeSink;
1710
+ }>;
1711
+ };
1712
+ instanceOf(obj: any): obj is {
1713
+ /**
1714
+ * @private
1715
+ * This field is private and should not be used, use `tag` instead.
1716
+ */
1717
+ readonly [uniffiTypeNameSymbol]: "ManifestMode";
1718
+ readonly tag: ManifestMode_Tags.Both;
1719
+ readonly inner: Readonly<{
1720
+ binders: Array<BinderLike>;
1721
+ into?: RangeSink;
1722
+ }>;
1723
+ };
1724
+ };
1725
+ }>;
1726
+ /**
1727
+ * How the manifest is delivered and which soft-binding strategies it declares.
1728
+ *
1729
+ * Embedded manifests may still need bindings, for example to describe a bound watermark, but
1730
+ * are not indexed. Remote requires at least one resolved binding at the signer protocol boundary;
1731
+ * both is recoverable through its embedded manifest and permits an empty strategy list.
1732
+ */
1733
+ type ManifestMode = InstanceType<typeof ManifestMode['Embedded' | 'Remote' | 'Both']>;
1734
+ /**
1735
+ * Options for `sign`. The mode owns delivery and binding strategies; format and plugins remain
1736
+ * independent transport concerns.
1737
+ */
1738
+ type SignOptions = {
1739
+ mode: ManifestMode;
1740
+ format?: string;
1741
+ /**
1742
+ * Resolves a non-c2pa format (e.g. MXF); a c2pa-native sign needs none.
1743
+ */
1744
+ plugins?: PluginRegistryLike;
1745
+ };
1746
+ /**
1747
+ * Generated factory for {@link SignOptions} record objects.
1748
+ */
1749
+ declare const SignOptions: Readonly<{
1750
+ create: (partial: Partial<SignOptions> & Required<Omit<SignOptions, "format" | "plugins">>) => SignOptions;
1751
+ new: (partial: Partial<SignOptions> & Required<Omit<SignOptions, "format" | "plugins">>) => SignOptions;
1752
+ defaults: () => Partial<SignOptions>;
1753
+ }>;
1754
+ /**
1755
+ * Result of [`AssetIssuer::sign`](super::AssetIssuer::sign): the sidecar to embed plus its active
1756
+ * C2PA manifest id. Remote and both modes persist that id; embedded mode does not.
1757
+ */
1758
+ type SignOutcome = {
1759
+ /**
1760
+ * The manifest sidecar to embed into the asset (see [`embed`](crate::ffi::embed)).
1761
+ */
1762
+ sidecar: ArrayBuffer;
1763
+ /**
1764
+ * Active C2PA manifest id.
1765
+ */
1766
+ manifestId: string;
1767
+ };
1768
+ /**
1769
+ * Generated factory for {@link SignOutcome} record objects.
1770
+ */
1771
+ declare const SignOutcome: Readonly<{
1772
+ create: (partial: Partial<SignOutcome> & Required<Omit<SignOutcome, never>>) => SignOutcome;
1773
+ new: (partial: Partial<SignOutcome> & Required<Omit<SignOutcome, never>>) => SignOutcome;
1774
+ defaults: () => Partial<SignOutcome>;
1775
+ }>;
1776
+ /**
1777
+ * Result of [`StreamSession::sign`](super::StreamSession::sign). `rotation_due` flips once
1778
+ * `policy.refresh_percent`% of validity has elapsed; `valid_until_epoch_secs` is repeated
1779
+ * per segment so callers can schedule rotation precisely instead of reacting only to the
1780
+ * flag.
1781
+ */
1782
+ type SignedSegmentOutcome = {
1783
+ bytes: ArrayBuffer;
1784
+ rotationDue: boolean;
1785
+ validUntilEpochSecs: bigint;
1786
+ };
1787
+ /**
1788
+ * Generated factory for {@link SignedSegmentOutcome} record objects.
1789
+ */
1790
+ declare const SignedSegmentOutcome: Readonly<{
1791
+ create: (partial: Partial<SignedSegmentOutcome> & Required<Omit<SignedSegmentOutcome, never>>) => SignedSegmentOutcome;
1792
+ new: (partial: Partial<SignedSegmentOutcome> & Required<Omit<SignedSegmentOutcome, never>>) => SignedSegmentOutcome;
1793
+ defaults: () => Partial<SignedSegmentOutcome>;
1794
+ }>;
1795
+ /**
1796
+ * One live stream, from `init` to `stop`.
1797
+ *
1798
+ * Carries the whole per-stream state, so it cannot be mistyped, reused after `stop`, or
1799
+ * confused with another stream's: every call after `init` goes through the handle that started
1800
+ * it, and nothing about the stream ever appears in a caller's argument list again.
1801
+ */
1802
+ interface StreamSessionLike {
1803
+ /**
1804
+ * Sign one media (moof) segment from a [`RangeSource`]. Does not touch the signer channel;
1805
+ * works through a signer outage. `rotation_due` flips when the key validity threshold
1806
+ * passes; re-`init` on the issuer to rotate.
1807
+ *
1808
+ * # Errors
1809
+ *
1810
+ * Fails on a vault error, or a segment that isn't a BMFF media segment.
1811
+ */
1812
+ sign(body: RangeSource, asyncOpts_?: {
1813
+ signal: AbortSignal;
1814
+ }): Promise<SignedSegmentOutcome>;
1815
+ /**
1816
+ * End the stream: forget its session key, so nothing can sign under it again.
1817
+ *
1818
+ * # Errors
1819
+ *
1820
+ * Fails on a vault error.
1821
+ */
1822
+ stop(asyncOpts_?: {
1823
+ signal: AbortSignal;
1824
+ }): Promise<void>;
1825
+ }
1826
+ /**
1827
+ * @deprecated Use `StreamSessionLike` instead.
1828
+ */
1829
+ type StreamSessionInterface = StreamSessionLike;
1830
+ /**
1831
+ * One live stream, from `init` to `stop`.
1832
+ *
1833
+ * Carries the whole per-stream state, so it cannot be mistyped, reused after `stop`, or
1834
+ * confused with another stream's: every call after `init` goes through the handle that started
1835
+ * it, and nothing about the stream ever appears in a caller's argument list again.
1836
+ */
1837
+ declare class StreamSession extends UniffiAbstractObject implements StreamSessionLike {
1838
+ readonly [uniffiTypeNameSymbol] = "StreamSession";
1839
+ readonly [destructorGuardSymbol]: UniffiGcObject;
1840
+ readonly [pointerLiteralSymbol]: UniffiHandle;
1841
+ private constructor();
1842
+ /**
1843
+ * Sign one media (moof) segment from a [`RangeSource`]. Does not touch the signer channel;
1844
+ * works through a signer outage. `rotation_due` flips when the key validity threshold
1845
+ * passes; re-`init` on the issuer to rotate.
1846
+ *
1847
+ * # Errors
1848
+ *
1849
+ * Fails on a vault error, or a segment that isn't a BMFF media segment.
1850
+ */
1851
+ sign(body: RangeSource, asyncOpts_?: {
1852
+ signal: AbortSignal;
1853
+ }): Promise<SignedSegmentOutcome>;
1854
+ /**
1855
+ * End the stream: forget its session key, so nothing can sign under it again.
1856
+ *
1857
+ * # Errors
1858
+ *
1859
+ * Fails on a vault error.
1860
+ */
1861
+ stop(asyncOpts_?: {
1862
+ signal: AbortSignal;
1863
+ }): Promise<void>;
1864
+ uniffiDestroy(): void;
1865
+ static instanceOf(obj_: any): obj_ is StreamSession;
1866
+ }
1867
+ /**
1868
+ * What [`StreamIssuer::init`] hands back: the signed init segment, and the session to sign the
1869
+ * rest of the stream through.
1870
+ */
1871
+ type StreamStart = {
1872
+ /**
1873
+ * The signed init (moov) segment and the session key's expiry.
1874
+ */
1875
+ init: InitOutcome;
1876
+ /**
1877
+ * Sign every subsequent media segment through this.
1878
+ */
1879
+ session: StreamSessionLike;
1880
+ };
1881
+ /**
1882
+ * Generated factory for {@link StreamStart} record objects.
1883
+ */
1884
+ declare const StreamStart: Readonly<{
1885
+ create: (partial: Partial<StreamStart> & Required<Omit<StreamStart, never>>) => StreamStart;
1886
+ new: (partial: Partial<StreamStart> & Required<Omit<StreamStart, never>>) => StreamStart;
1887
+ defaults: () => Partial<StreamStart>;
1888
+ }>;
1889
+ /**
1890
+ * `kid` is the vault-derived handle (typically SHA-256 of SEC1 public).
1891
+ * `public_key_sec1` is uncompressed SEC1 (65 bytes starting with `0x04`
1892
+ * for ES256); the SDK rewraps as `COSE_Key` for §19.4.4.
1893
+ */
1894
+ type VaultPublicKey = {
1895
+ kid: ArrayBuffer;
1896
+ publicKeySec1: ArrayBuffer;
1897
+ };
1898
+ /**
1899
+ * Generated factory for {@link VaultPublicKey} record objects.
1900
+ */
1901
+ declare const VaultPublicKey: Readonly<{
1902
+ create: (partial: Partial<VaultPublicKey> & Required<Omit<VaultPublicKey, never>>) => VaultPublicKey;
1903
+ new: (partial: Partial<VaultPublicKey> & Required<Omit<VaultPublicKey, never>>) => VaultPublicKey;
1904
+ defaults: () => Partial<VaultPublicKey>;
1905
+ }>;
1906
+ /**
1907
+ * Whether a fragmented-MP4 segment is the init (moov) or a media (moof) segment: which
1908
+ * [`StreamIssuer`](stream::StreamIssuer) entrypoint (`init` vs `sign`) a segment belongs to.
1909
+ */
1910
+ declare enum SegmentKind {
1911
+ Init = 0,
1912
+ Media = 1,
1913
+ Unknown = 2
1914
+ }
1915
+ /**
1916
+ * A C2PA asset signer bound to a [`SignerClient`](super::client::SignerClient).
1917
+ * Construct once with [`create`](Self::create), sign many.
1918
+ */
1919
+ interface AssetIssuerLike {
1920
+ /**
1921
+ * Sign an asset from a [`RangeSource`], returning the sidecar plus the registry
1922
+ * `manifest_id`. `options.mode` selects delivery, binding strategies, and, through its
1923
+ * `into`, the sink the signed asset is written through. `options.format` overrides the
1924
+ * format sniffed from the source's leading bytes. `options.plugins` resolves a non-c2pa
1925
+ * format (e.g. MXF); see the module docs for the dispatch.
1926
+ *
1927
+ * # Errors
1928
+ *
1929
+ * Fails on RPC failure, a hashing error, an authoring error, a protocol violation,
1930
+ * or when the format can't be inferred and none was given.
1931
+ */
1932
+ sign(source: RangeSource, manifest: ManifestSpec, options: SignOptions, asyncOpts_?: {
1933
+ signal: AbortSignal;
1934
+ }): Promise<SignOutcome>;
1935
+ }
1936
+ /**
1937
+ * @deprecated Use `AssetIssuerLike` instead.
1938
+ */
1939
+ type AssetIssuerInterface = AssetIssuerLike;
1940
+ /**
1941
+ * A C2PA asset signer bound to a [`SignerClient`](super::client::SignerClient).
1942
+ * Construct once with [`create`](Self::create), sign many.
1943
+ */
1944
+ declare class AssetIssuer extends UniffiAbstractObject implements AssetIssuerLike {
1945
+ readonly [uniffiTypeNameSymbol] = "AssetIssuer";
1946
+ readonly [destructorGuardSymbol]: UniffiGcObject;
1947
+ readonly [pointerLiteralSymbol]: UniffiHandle;
1948
+ private constructor();
1949
+ /**
1950
+ * Build a signer over an existing signer connection.
1951
+ */
1952
+ static create(client: SignerClientLike): AssetIssuerLike;
1953
+ /**
1954
+ * Sign an asset from a [`RangeSource`], returning the sidecar plus the registry
1955
+ * `manifest_id`. `options.mode` selects delivery, binding strategies, and, through its
1956
+ * `into`, the sink the signed asset is written through. `options.format` overrides the
1957
+ * format sniffed from the source's leading bytes. `options.plugins` resolves a non-c2pa
1958
+ * format (e.g. MXF); see the module docs for the dispatch.
1959
+ *
1960
+ * # Errors
1961
+ *
1962
+ * Fails on RPC failure, a hashing error, an authoring error, a protocol violation,
1963
+ * or when the format can't be inferred and none was given.
1964
+ */
1965
+ sign(source: RangeSource, manifest: ManifestSpec, options: SignOptions, asyncOpts_?: {
1966
+ signal: AbortSignal;
1967
+ }): Promise<SignOutcome>;
1968
+ uniffiDestroy(): void;
1969
+ static instanceOf(obj_: any): obj_ is AssetIssuer;
1970
+ }
1971
+ /**
1972
+ * Applies invisible watermarks through the deployment's marking service.
1973
+ *
1974
+ * Separate from [`AssetIssuer`] because marking is a content edit, not a signing step: it
1975
+ * changes pixels, it happens before signing, and it returns the provenance facts it created
1976
+ * rather than leaving anything downstream to infer them.
1977
+ */
1978
+ interface AssetMarkerLike {
1979
+ /**
1980
+ * Mark an image from a [`RangeSource`] and return it with the actions and bindings the
1981
+ * marking created. `format` overrides the sniffed format.
1982
+ *
1983
+ * # Errors
1984
+ *
1985
+ * Fails when the format can't be resolved, the asset is above the upload ceiling, the HTTP
1986
+ * request fails, or the service response is malformed.
1987
+ */
1988
+ mark(source: RangeSource, format: string | undefined, options: MarkOptions, asyncOpts_?: {
1989
+ signal: AbortSignal;
1990
+ }): Promise<Marked>;
1991
+ }
1992
+ /**
1993
+ * @deprecated Use `AssetMarkerLike` instead.
1994
+ */
1995
+ type AssetMarkerInterface = AssetMarkerLike;
1996
+ /**
1997
+ * Applies invisible watermarks through the deployment's marking service.
1998
+ *
1999
+ * Separate from [`AssetIssuer`] because marking is a content edit, not a signing step: it
2000
+ * changes pixels, it happens before signing, and it returns the provenance facts it created
2001
+ * rather than leaving anything downstream to infer them.
2002
+ */
2003
+ declare class AssetMarker extends UniffiAbstractObject implements AssetMarkerLike {
2004
+ readonly [uniffiTypeNameSymbol] = "AssetMarker";
2005
+ readonly [destructorGuardSymbol]: UniffiGcObject;
2006
+ readonly [pointerLiteralSymbol]: UniffiHandle;
2007
+ private constructor();
2008
+ /**
2009
+ * Build a marker over a connected client.
2010
+ */
2011
+ static create(client: SignerClientLike): AssetMarkerLike;
2012
+ /**
2013
+ * Mark an image from a [`RangeSource`] and return it with the actions and bindings the
2014
+ * marking created. `format` overrides the sniffed format.
2015
+ *
2016
+ * # Errors
2017
+ *
2018
+ * Fails when the format can't be resolved, the asset is above the upload ceiling, the HTTP
2019
+ * request fails, or the service response is malformed.
2020
+ */
2021
+ mark(source: RangeSource, format: string | undefined, options: MarkOptions, asyncOpts_?: {
2022
+ signal: AbortSignal;
2023
+ }): Promise<Marked>;
2024
+ uniffiDestroy(): void;
2025
+ static instanceOf(obj_: any): obj_ is AssetMarker;
2026
+ }
2027
+ /**
2028
+ * A [`RangeSink`] over a local file, opened and written by the SDK itself. The write twin of
2029
+ * [`FileSource`](super::source::FileSource), and the counterpart [`MemorySink`] has no answer to.
2030
+ *
2031
+ * The only sink whose bytes never enter the host language. A [`RangeSink`] written in the host is
2032
+ * called back into for every range, on the host thread that made the call, and [`MemorySink`]
2033
+ * avoids that only by holding the whole asset. A path costs neither, so the writes land on the
2034
+ * same SDK worker thread that is already composing.
2035
+ *
2036
+ * That is what makes [`MemorySink`]'s ceiling stop applying: there is no byte array to count in an
2037
+ * `i32` and nothing resident, so a multi-GB master is signed at the disk's speed rather than the
2038
+ * host thread's, and `bytes()` is not something anyone has to call.
2039
+ *
2040
+ * No lock. A positioned write to a file is one `pwrite`, which the OS already makes atomic per
2041
+ * call, and [`RangeWriter`] takes a shared borrow precisely so a backend like this pays nothing
2042
+ * for being shared.
2043
+ */
2044
+ interface FileSinkLike {
2045
+ length(asyncOpts_?: {
2046
+ signal: AbortSignal;
2047
+ }): Promise<bigint>;
2048
+ readAt(offset: bigint, length: number, asyncOpts_?: {
2049
+ signal: AbortSignal;
2050
+ }): Promise<ArrayBuffer>;
2051
+ setLength(length: bigint, asyncOpts_?: {
2052
+ signal: AbortSignal;
2053
+ }): Promise<void>;
2054
+ writeAt(offset: bigint, data: ArrayBuffer, asyncOpts_?: {
2055
+ signal: AbortSignal;
2056
+ }): Promise<void>;
2057
+ }
2058
+ /**
2059
+ * @deprecated Use `FileSinkLike` instead.
2060
+ */
2061
+ type FileSinkInterface = FileSinkLike;
2062
+ /**
2063
+ * A [`RangeSink`] over a local file, opened and written by the SDK itself. The write twin of
2064
+ * [`FileSource`](super::source::FileSource), and the counterpart [`MemorySink`] has no answer to.
2065
+ *
2066
+ * The only sink whose bytes never enter the host language. A [`RangeSink`] written in the host is
2067
+ * called back into for every range, on the host thread that made the call, and [`MemorySink`]
2068
+ * avoids that only by holding the whole asset. A path costs neither, so the writes land on the
2069
+ * same SDK worker thread that is already composing.
2070
+ *
2071
+ * That is what makes [`MemorySink`]'s ceiling stop applying: there is no byte array to count in an
2072
+ * `i32` and nothing resident, so a multi-GB master is signed at the disk's speed rather than the
2073
+ * host thread's, and `bytes()` is not something anyone has to call.
2074
+ *
2075
+ * No lock. A positioned write to a file is one `pwrite`, which the OS already makes atomic per
2076
+ * call, and [`RangeWriter`] takes a shared borrow precisely so a backend like this pays nothing
2077
+ * for being shared.
2078
+ */
2079
+ declare class FileSink extends UniffiAbstractObject implements FileSinkLike {
2080
+ readonly [uniffiTypeNameSymbol] = "FileSink";
2081
+ readonly [destructorGuardSymbol]: UniffiGcObject;
2082
+ readonly [pointerLiteralSymbol]: UniffiHandle;
2083
+ private constructor();
2084
+ /**
2085
+ * Create `path`, or truncate it if it is already there. What `embed` wants: it composes a
2086
+ * whole asset, so the sink starts empty and grows.
2087
+ *
2088
+ * # Errors
2089
+ *
2090
+ * The path cannot be created or opened for writing.
2091
+ */
2092
+ static create(path: string): FileSinkLike;
2093
+ /**
2094
+ * Open an existing `path` for reading and writing, keeping what is in it. What a fixed-slot
2095
+ * patch wants: the asset is already there and only its reserved range changes, so truncating
2096
+ * it would destroy the very thing being signed.
2097
+ *
2098
+ * # Errors
2099
+ *
2100
+ * The path does not exist, is not permitted, or cannot be opened for writing.
2101
+ */
2102
+ static open(path: string): FileSinkLike;
2103
+ length(asyncOpts_?: {
2104
+ signal: AbortSignal;
2105
+ }): Promise<bigint>;
2106
+ readAt(offset: bigint, length: number, asyncOpts_?: {
2107
+ signal: AbortSignal;
2108
+ }): Promise<ArrayBuffer>;
2109
+ setLength(length: bigint, asyncOpts_?: {
2110
+ signal: AbortSignal;
2111
+ }): Promise<void>;
2112
+ writeAt(offset: bigint, data: ArrayBuffer, asyncOpts_?: {
2113
+ signal: AbortSignal;
2114
+ }): Promise<void>;
2115
+ uniffiDestroy(): void;
2116
+ static instanceOf(obj_: any): obj_ is FileSink;
2117
+ }
2118
+ /**
2119
+ * A [`RangeSource`] over a local file, opened and read by the SDK itself.
2120
+ *
2121
+ * The only source whose bytes never enter the host language. The other two both put the asset
2122
+ * through it: a [`RangeSource`] written in the host is awaited for every window, and
2123
+ * [`MemorySource`] avoids that only by holding the whole asset and copying it across the
2124
+ * boundary to get there. A path costs neither, so the reads happen on the same thread that is
2125
+ * already hashing, with no crossing at all.
2126
+ *
2127
+ * That is what makes the size ceilings stop applying: there is no byte array to count in an
2128
+ * `i32` and nothing resident, so a multi-GB master reads at the disk's speed rather than the
2129
+ * host thread's.
2130
+ *
2131
+ * This is an implementation of the [`RangeSource`] interface, not a way around it: the SDK still
2132
+ * only ever asks for the ranges it needs, and no entry point takes a path.
2133
+ */
2134
+ interface FileSourceLike {
2135
+ length(asyncOpts_?: {
2136
+ signal: AbortSignal;
2137
+ }): Promise<bigint>;
2138
+ readAt(offset: bigint, length: number, asyncOpts_?: {
2139
+ signal: AbortSignal;
2140
+ }): Promise<ArrayBuffer>;
2141
+ }
2142
+ /**
2143
+ * @deprecated Use `FileSourceLike` instead.
2144
+ */
2145
+ type FileSourceInterface = FileSourceLike;
2146
+ /**
2147
+ * A [`RangeSource`] over a local file, opened and read by the SDK itself.
2148
+ *
2149
+ * The only source whose bytes never enter the host language. The other two both put the asset
2150
+ * through it: a [`RangeSource`] written in the host is awaited for every window, and
2151
+ * [`MemorySource`] avoids that only by holding the whole asset and copying it across the
2152
+ * boundary to get there. A path costs neither, so the reads happen on the same thread that is
2153
+ * already hashing, with no crossing at all.
2154
+ *
2155
+ * That is what makes the size ceilings stop applying: there is no byte array to count in an
2156
+ * `i32` and nothing resident, so a multi-GB master reads at the disk's speed rather than the
2157
+ * host thread's.
2158
+ *
2159
+ * This is an implementation of the [`RangeSource`] interface, not a way around it: the SDK still
2160
+ * only ever asks for the ranges it needs, and no entry point takes a path.
2161
+ */
2162
+ declare class FileSource extends UniffiAbstractObject implements FileSourceLike {
2163
+ readonly [uniffiTypeNameSymbol] = "FileSource";
2164
+ readonly [destructorGuardSymbol]: UniffiGcObject;
2165
+ readonly [pointerLiteralSymbol]: UniffiHandle;
2166
+ private constructor();
2167
+ /**
2168
+ * Open `path` for reading.
2169
+ *
2170
+ * # Errors
2171
+ *
2172
+ * The file does not exist, is not permitted, or cannot be opened.
2173
+ */
2174
+ static open(path: string): FileSourceLike;
2175
+ length(asyncOpts_?: {
2176
+ signal: AbortSignal;
2177
+ }): Promise<bigint>;
2178
+ readAt(offset: bigint, length: number, asyncOpts_?: {
2179
+ signal: AbortSignal;
2180
+ }): Promise<ArrayBuffer>;
2181
+ uniffiDestroy(): void;
2182
+ static instanceOf(obj_: any): obj_ is FileSource;
2183
+ }
2184
+ /**
2185
+ * An in-memory [`RangeSink`], for a caller that wants `embed`'s composed result back
2186
+ * without writing a custom sink. A **native** implementation of a `with_foreign`
2187
+ * interface (`#[uniffi::export]` on the trait impl, not the foreign callback path), so
2188
+ * a Python caller writes no subclass: `sink = MemorySink(data)`, pass it to `embed`,
2189
+ * then read `sink.bytes()` back. `&self`-only methods need interior mutability, so the
2190
+ * buffer is `Mutex`-guarded (contention is a non-issue: the SDK calls it from one task
2191
+ * at a time per sink).
2192
+ *
2193
+ * # Size ceiling
2194
+ *
2195
+ * The buffer and the copy `bytes()` returns are resident together, so this suits an asset
2196
+ * that fits in memory twice over. The binding counts a byte array in an `i32`, which puts a
2197
+ * hard 2 GiB ceiling on what `bytes()` can hand back; past it `bytes()` fails rather than
2198
+ * returning a truncated asset that looks structurally fine. Embedding into a larger asset
2199
+ * still works, because the SDK only ever writes and reads bounded ranges. Implement
2200
+ * [`RangeSink`] over a file (or any store that seeks) for anything approaching that: the SDK
2201
+ * writes ranges straight through it and never holds the asset.
2202
+ *
2203
+ * Construction and `bytes()` each copy the whole asset, on the calling thread: together with a
2204
+ * `MemorySource` over the same asset that is about 12ms for 10 MB and 1.2s for 500 MB. A ranged
2205
+ * sink pays none of it.
2206
+ */
2207
+ interface MemorySinkLike {
2208
+ /**
2209
+ * The buffer's current contents, e.g. after passing this sink through `embed`. A copy.
2210
+ *
2211
+ * # Errors
2212
+ *
2213
+ * The buffer has grown at or above the 2 GiB a byte array can be counted in. `embed` grows
2214
+ * the sink, so a buffer that fitted at construction need not fit here.
2215
+ */
2216
+ bytes(): ArrayBuffer;
2217
+ length(asyncOpts_?: {
2218
+ signal: AbortSignal;
2219
+ }): Promise<bigint>;
2220
+ readAt(offset: bigint, length: number, asyncOpts_?: {
2221
+ signal: AbortSignal;
2222
+ }): Promise<ArrayBuffer>;
2223
+ setLength(length: bigint, asyncOpts_?: {
2224
+ signal: AbortSignal;
2225
+ }): Promise<void>;
2226
+ writeAt(offset: bigint, data: ArrayBuffer, asyncOpts_?: {
2227
+ signal: AbortSignal;
2228
+ }): Promise<void>;
2229
+ }
2230
+ /**
2231
+ * @deprecated Use `MemorySinkLike` instead.
2232
+ */
2233
+ type MemorySinkInterface = MemorySinkLike;
2234
+ /**
2235
+ * An in-memory [`RangeSink`], for a caller that wants `embed`'s composed result back
2236
+ * without writing a custom sink. A **native** implementation of a `with_foreign`
2237
+ * interface (`#[uniffi::export]` on the trait impl, not the foreign callback path), so
2238
+ * a Python caller writes no subclass: `sink = MemorySink(data)`, pass it to `embed`,
2239
+ * then read `sink.bytes()` back. `&self`-only methods need interior mutability, so the
2240
+ * buffer is `Mutex`-guarded (contention is a non-issue: the SDK calls it from one task
2241
+ * at a time per sink).
2242
+ *
2243
+ * # Size ceiling
2244
+ *
2245
+ * The buffer and the copy `bytes()` returns are resident together, so this suits an asset
2246
+ * that fits in memory twice over. The binding counts a byte array in an `i32`, which puts a
2247
+ * hard 2 GiB ceiling on what `bytes()` can hand back; past it `bytes()` fails rather than
2248
+ * returning a truncated asset that looks structurally fine. Embedding into a larger asset
2249
+ * still works, because the SDK only ever writes and reads bounded ranges. Implement
2250
+ * [`RangeSink`] over a file (or any store that seeks) for anything approaching that: the SDK
2251
+ * writes ranges straight through it and never holds the asset.
2252
+ *
2253
+ * Construction and `bytes()` each copy the whole asset, on the calling thread: together with a
2254
+ * `MemorySource` over the same asset that is about 12ms for 10 MB and 1.2s for 500 MB. A ranged
2255
+ * sink pays none of it.
2256
+ */
2257
+ declare class MemorySink extends UniffiAbstractObject implements MemorySinkLike {
2258
+ readonly [uniffiTypeNameSymbol] = "MemorySink";
2259
+ readonly [destructorGuardSymbol]: UniffiGcObject;
2260
+ readonly [pointerLiteralSymbol]: UniffiHandle;
2261
+ /**
2262
+ * # Errors
2263
+ *
2264
+ * The buffer is at or above the 2 GiB a byte array can be counted in.
2265
+ */
2266
+ constructor(data: ArrayBuffer);
2267
+ /**
2268
+ * The buffer's current contents, e.g. after passing this sink through `embed`. A copy.
2269
+ *
2270
+ * # Errors
2271
+ *
2272
+ * The buffer has grown at or above the 2 GiB a byte array can be counted in. `embed` grows
2273
+ * the sink, so a buffer that fitted at construction need not fit here.
2274
+ */
2275
+ bytes(): ArrayBuffer;
2276
+ length(asyncOpts_?: {
2277
+ signal: AbortSignal;
2278
+ }): Promise<bigint>;
2279
+ readAt(offset: bigint, length: number, asyncOpts_?: {
2280
+ signal: AbortSignal;
2281
+ }): Promise<ArrayBuffer>;
2282
+ setLength(length: bigint, asyncOpts_?: {
2283
+ signal: AbortSignal;
2284
+ }): Promise<void>;
2285
+ writeAt(offset: bigint, data: ArrayBuffer, asyncOpts_?: {
2286
+ signal: AbortSignal;
2287
+ }): Promise<void>;
2288
+ uniffiDestroy(): void;
2289
+ static instanceOf(obj_: any): obj_ is MemorySink;
2290
+ }
2291
+ /**
2292
+ * An in-memory [`RangeSource`], for a caller that already holds the whole asset as
2293
+ * bytes and doesn't want to write a custom source. A **native** implementation of a
2294
+ * `with_foreign` interface (`#[uniffi::export]` on the trait impl, not the foreign
2295
+ * callback path), so the generated binding is a plain constructible object and a Python
2296
+ * caller writes no subclass at all: `MemorySource(data)`.
2297
+ *
2298
+ * # Size ceiling
2299
+ *
2300
+ * The asset is resident for the object's lifetime, and the binding counts a byte array in an
2301
+ * `i32`, so a buffer at or above 2 GiB cannot cross the boundary at all. The constructor
2302
+ * rejects one rather than letting a later read come back quietly truncated. Implement
2303
+ * [`RangeSource`] over a file handle for anything approaching that: the SDK only ever asks for
2304
+ * bounded ranges, so nothing else has to hold the asset.
2305
+ *
2306
+ * Construction copies the whole asset across the boundary, on the calling thread: about 5ms for
2307
+ * 10 MB, 315ms for 500 MB. That is the one part of a sign or verify the SDK cannot move off your
2308
+ * thread, and neither a ranged source nor [`FileSource`] pays it.
2309
+ */
2310
+ interface MemorySourceLike {
2311
+ length(asyncOpts_?: {
2312
+ signal: AbortSignal;
2313
+ }): Promise<bigint>;
2314
+ readAt(offset: bigint, length: number, asyncOpts_?: {
2315
+ signal: AbortSignal;
2316
+ }): Promise<ArrayBuffer>;
2317
+ }
2318
+ /**
2319
+ * @deprecated Use `MemorySourceLike` instead.
2320
+ */
2321
+ type MemorySourceInterface = MemorySourceLike;
2322
+ /**
2323
+ * An in-memory [`RangeSource`], for a caller that already holds the whole asset as
2324
+ * bytes and doesn't want to write a custom source. A **native** implementation of a
2325
+ * `with_foreign` interface (`#[uniffi::export]` on the trait impl, not the foreign
2326
+ * callback path), so the generated binding is a plain constructible object and a Python
2327
+ * caller writes no subclass at all: `MemorySource(data)`.
2328
+ *
2329
+ * # Size ceiling
2330
+ *
2331
+ * The asset is resident for the object's lifetime, and the binding counts a byte array in an
2332
+ * `i32`, so a buffer at or above 2 GiB cannot cross the boundary at all. The constructor
2333
+ * rejects one rather than letting a later read come back quietly truncated. Implement
2334
+ * [`RangeSource`] over a file handle for anything approaching that: the SDK only ever asks for
2335
+ * bounded ranges, so nothing else has to hold the asset.
2336
+ *
2337
+ * Construction copies the whole asset across the boundary, on the calling thread: about 5ms for
2338
+ * 10 MB, 315ms for 500 MB. That is the one part of a sign or verify the SDK cannot move off your
2339
+ * thread, and neither a ranged source nor [`FileSource`] pays it.
2340
+ */
2341
+ declare class MemorySource extends UniffiAbstractObject implements MemorySourceLike {
2342
+ readonly [uniffiTypeNameSymbol] = "MemorySource";
2343
+ readonly [destructorGuardSymbol]: UniffiGcObject;
2344
+ readonly [pointerLiteralSymbol]: UniffiHandle;
2345
+ /**
2346
+ * # Errors
2347
+ *
2348
+ * The buffer is at or above the 2 GiB a byte array can be counted in.
2349
+ */
2350
+ constructor(data: ArrayBuffer);
2351
+ length(asyncOpts_?: {
2352
+ signal: AbortSignal;
2353
+ }): Promise<bigint>;
2354
+ readAt(offset: bigint, length: number, asyncOpts_?: {
2355
+ signal: AbortSignal;
2356
+ }): Promise<ArrayBuffer>;
2357
+ uniffiDestroy(): void;
2358
+ static instanceOf(obj_: any): obj_ is MemorySource;
2359
+ }
2360
+ /**
2361
+ * A connection to the Limbo Integrity signer service. Construct once with [`connect`](Self::connect);
2362
+ * share it across every [`AssetIssuer`](super::asset::AssetIssuer) so the leaf cert is fetched once.
2363
+ */
2364
+ interface SignerClientLike {}
2365
+ /**
2366
+ * @deprecated Use `SignerClientLike` instead.
2367
+ */
2368
+ type SignerClientInterface = SignerClientLike;
2369
+ /**
2370
+ * A connection to the Limbo Integrity signer service. Construct once with [`connect`](Self::connect);
2371
+ * share it across every [`AssetIssuer`](super::asset::AssetIssuer) so the leaf cert is fetched once.
2372
+ */
2373
+ declare class SignerClient extends UniffiAbstractObject implements SignerClientLike {
2374
+ readonly [uniffiTypeNameSymbol] = "SignerClient";
2375
+ readonly [destructorGuardSymbol]: UniffiGcObject;
2376
+ readonly [pointerLiteralSymbol]: UniffiHandle;
2377
+ private constructor();
2378
+ /**
2379
+ * Connect to the signing service at `endpoint`.
2380
+ *
2381
+ * # Errors
2382
+ *
2383
+ * `INVALID_ARGUMENT` when `endpoint` is not a valid URI or a header name/value in
2384
+ * `options` is malformed. The channel connects lazily, so an unreachable Signer
2385
+ * surfaces on the first sign RPC instead.
2386
+ */
2387
+ static connect(endpoint: string, options: ConnectOptions, asyncOpts_?: {
2388
+ signal: AbortSignal;
2389
+ }): Promise<SignerClientLike>;
2390
+ uniffiDestroy(): void;
2391
+ static instanceOf(obj_: any): obj_ is SignerClient;
2392
+ }
2393
+ /**
2394
+ * A live-stream signer bound to a [`SignerClient`](super::client::SignerClient) and a
2395
+ * [`SigningVault`]. Construct once with [`create`](Self::create), then `init` a session and
2396
+ * sign every segment through the [`StreamSession`] it returns.
2397
+ */
2398
+ interface StreamIssuerLike {
2399
+ /**
2400
+ * Open the stream at `stream_id`: mint its first session key under `rotation_policy`, sign
2401
+ * the init (moov) segment, and hand back a [`StreamSession`] to sign through.
2402
+ *
2403
+ * On `rotation_due`, call [`StreamIssuer::rotate`], not this.
2404
+ *
2405
+ * # Errors
2406
+ *
2407
+ * Fails on signer RPC failure, a vault error, or an `init_body` that isn't a BMFF init
2408
+ * segment.
2409
+ */
2410
+ init(streamId: string, initBody: RangeSource, mode: ManifestMode, rotationPolicy: RotationPolicy, manifest: ManifestSpec, asyncOpts_?: {
2411
+ signal: AbortSignal;
2412
+ }): Promise<StreamStart>;
2413
+ /**
2414
+ * Succeed `session` on the stream it already names, signing a fresh init (moov) segment
2415
+ * under a new key and forgetting the outgoing one.
2416
+ *
2417
+ * The stream id comes from `session`, so a rotation cannot be pointed at the wrong stream,
2418
+ * and the retired key cannot be left behind: it would still sign for the rest of its
2419
+ * validity window.
2420
+ *
2421
+ * # Errors
2422
+ *
2423
+ * As [`StreamIssuer::init`].
2424
+ */
2425
+ rotate(session: StreamSessionLike, initBody: RangeSource, mode: ManifestMode, rotationPolicy: RotationPolicy, manifest: ManifestSpec, asyncOpts_?: {
2426
+ signal: AbortSignal;
2427
+ }): Promise<StreamStart>;
2428
+ }
2429
+ /**
2430
+ * @deprecated Use `StreamIssuerLike` instead.
2431
+ */
2432
+ type StreamIssuerInterface = StreamIssuerLike;
2433
+ /**
2434
+ * A live-stream signer bound to a [`SignerClient`](super::client::SignerClient) and a
2435
+ * [`SigningVault`]. Construct once with [`create`](Self::create), then `init` a session and
2436
+ * sign every segment through the [`StreamSession`] it returns.
2437
+ */
2438
+ declare class StreamIssuer extends UniffiAbstractObject implements StreamIssuerLike {
2439
+ readonly [uniffiTypeNameSymbol] = "StreamIssuer";
2440
+ readonly [destructorGuardSymbol]: UniffiGcObject;
2441
+ readonly [pointerLiteralSymbol]: UniffiHandle;
2442
+ private constructor();
2443
+ /**
2444
+ * Build a stream signer over an existing signer connection plus the host's vault.
2445
+ */
2446
+ static create(client: SignerClientLike, vault: SigningVault): StreamIssuerLike;
2447
+ /**
2448
+ * Open the stream at `stream_id`: mint its first session key under `rotation_policy`, sign
2449
+ * the init (moov) segment, and hand back a [`StreamSession`] to sign through.
2450
+ *
2451
+ * On `rotation_due`, call [`StreamIssuer::rotate`], not this.
2452
+ *
2453
+ * # Errors
2454
+ *
2455
+ * Fails on signer RPC failure, a vault error, or an `init_body` that isn't a BMFF init
2456
+ * segment.
2457
+ */
2458
+ init(streamId: string, initBody: RangeSource, mode: ManifestMode, rotationPolicy: RotationPolicy, manifest: ManifestSpec, asyncOpts_?: {
2459
+ signal: AbortSignal;
2460
+ }): Promise<StreamStart>;
2461
+ /**
2462
+ * Succeed `session` on the stream it already names, signing a fresh init (moov) segment
2463
+ * under a new key and forgetting the outgoing one.
2464
+ *
2465
+ * The stream id comes from `session`, so a rotation cannot be pointed at the wrong stream,
2466
+ * and the retired key cannot be left behind: it would still sign for the rest of its
2467
+ * validity window.
2468
+ *
2469
+ * # Errors
2470
+ *
2471
+ * As [`StreamIssuer::init`].
2472
+ */
2473
+ rotate(session: StreamSessionLike, initBody: RangeSource, mode: ManifestMode, rotationPolicy: RotationPolicy, manifest: ManifestSpec, asyncOpts_?: {
2474
+ signal: AbortSignal;
2475
+ }): Promise<StreamStart>;
2476
+ uniffiDestroy(): void;
2477
+ static instanceOf(obj_: any): obj_ is StreamIssuer;
2478
+ }
2479
+ /**
2480
+ * A per-session ECDSA key store, implemented by the host. `mint` returns a fresh public key
2481
+ * that will be signed under for `validity_period_secs`, so give it that lifetime and let the
2482
+ * store expire it; `sign` produces the raw ECDSA signature over `payload` (the SDK frames it
2483
+ * into COSE); `forget` drops a retired key. Every method may raise to abort.
2484
+ */
2485
+ interface SigningVault {
2486
+ mint(validityPeriodSecs: bigint, asyncOpts_?: {
2487
+ signal: AbortSignal;
2488
+ }): Promise<VaultPublicKey>;
2489
+ sign(kid: ArrayBuffer, payload: ArrayBuffer, asyncOpts_?: {
2490
+ signal: AbortSignal;
2491
+ }): Promise<ArrayBuffer>;
2492
+ forget(kid: ArrayBuffer, asyncOpts_?: {
2493
+ signal: AbortSignal;
2494
+ }): Promise<void>;
2495
+ }
2496
+ /**
2497
+ * This should be called before anything else.
2498
+ *
2499
+ * It is likely that this is being done for you by the library's `index.ts`.
2500
+ *
2501
+ * It checks versions of uniffi between when the Rust scaffolding was generated
2502
+ * and when the bindings were generated.
2503
+ *
2504
+ * It also initializes the machinery to enable Rust to talk back to Javascript.
2505
+ */
2506
+ declare function uniffiEnsureInitialized(): void;
2507
+ declare const _default$1: Readonly<{
2508
+ initialize: typeof uniffiEnsureInitialized;
2509
+ converters: {
2510
+ FfiConverterTypeAction: {
2511
+ readFromCursor(c: Cursor): Action;
2512
+ writeIntoCursor(value: Action, c: Cursor): void;
2513
+ allocationSize(value: Action): number;
2514
+ lift(value: UniffiByteArray): Action;
2515
+ lower(value: Action, alloc: RustBufferAllocator): UniffiByteArray;
2516
+ };
2517
+ FfiConverterTypeActionDetail: {
2518
+ readFromCursor(c: Cursor): ActionDetail;
2519
+ writeIntoCursor(value: ActionDetail, c: Cursor): void;
2520
+ allocationSize(value: ActionDetail): number;
2521
+ lift(value: UniffiByteArray): ActionDetail;
2522
+ lower(value: ActionDetail, alloc: RustBufferAllocator): UniffiByteArray;
2523
+ };
2524
+ FfiConverterTypeActionKind: {
2525
+ readFromCursor(c: Cursor): ActionKind;
2526
+ writeIntoCursor(value: ActionKind, c: Cursor): void;
2527
+ allocationSize(value: ActionKind): number;
2528
+ lift(value: UniffiByteArray): ActionKind;
2529
+ lower(value: ActionKind, alloc: RustBufferAllocator): UniffiByteArray;
2530
+ };
2531
+ FfiConverterTypeAssertion: {
2532
+ readFromCursor(c: Cursor): Assertion;
2533
+ writeIntoCursor(value: Assertion, c: Cursor): void;
2534
+ allocationSize(value: Assertion): number;
2535
+ lift(value: UniffiByteArray): Assertion;
2536
+ lower(value: Assertion, alloc: RustBufferAllocator): UniffiByteArray;
2537
+ };
2538
+ FfiConverterTypeAssetIssuer: FfiConverterObject<AssetIssuerLike>;
2539
+ FfiConverterTypeAssetMarker: FfiConverterObject<AssetMarkerLike>;
2540
+ FfiConverterTypeBinder: FfiConverterObject<BinderLike>;
2541
+ FfiConverterTypeCode: {
2542
+ readFromCursor(c: Cursor): Code;
2543
+ writeIntoCursor(value: Code, c: Cursor): void;
2544
+ allocationSize(value: Code): number;
2545
+ lift(value: UniffiByteArray): Code;
2546
+ lower(value: Code, alloc: RustBufferAllocator): UniffiByteArray;
2547
+ };
2548
+ FfiConverterTypeComponent: {
2549
+ readFromCursor(c: Cursor): Component;
2550
+ writeIntoCursor(value: Component, c: Cursor): void;
2551
+ allocationSize(value: Component): number;
2552
+ lift(value: UniffiByteArray): Component;
2553
+ lower(value: Component, alloc: RustBufferAllocator): UniffiByteArray;
2554
+ };
2555
+ FfiConverterTypeComponentEvent: {
2556
+ readFromCursor(c: Cursor): ComponentEvent;
2557
+ writeIntoCursor(value: ComponentEvent, c: Cursor): void;
2558
+ allocationSize(value: ComponentEvent): number;
2559
+ lift(value: UniffiByteArray): ComponentEvent;
2560
+ lower(value: ComponentEvent, alloc: RustBufferAllocator): UniffiByteArray;
2561
+ };
2562
+ FfiConverterTypeConnectOptions: {
2563
+ readFromCursor(c: Cursor): ConnectOptions;
2564
+ writeIntoCursor(value: ConnectOptions, c: Cursor): void;
2565
+ allocationSize(value: ConnectOptions): number;
2566
+ lift(value: UniffiByteArray): ConnectOptions;
2567
+ lower(value: ConnectOptions, alloc: RustBufferAllocator): UniffiByteArray;
2568
+ };
2569
+ FfiConverterTypeCreatedOrigin: {
2570
+ readFromCursor(c: Cursor): CreatedOrigin;
2571
+ writeIntoCursor(value: CreatedOrigin, c: Cursor): void;
2572
+ allocationSize(value: CreatedOrigin): number;
2573
+ lift(value: UniffiByteArray): CreatedOrigin;
2574
+ lower(value: CreatedOrigin, alloc: RustBufferAllocator): UniffiByteArray;
2575
+ };
2576
+ FfiConverterTypeCustomAction: {
2577
+ readFromCursor(c: Cursor): CustomAction;
2578
+ writeIntoCursor(value: CustomAction, c: Cursor): void;
2579
+ allocationSize(value: CustomAction): number;
2580
+ lift(value: UniffiByteArray): CustomAction;
2581
+ lower(value: CustomAction, alloc: RustBufferAllocator): UniffiByteArray;
2582
+ };
2583
+ FfiConverterTypeDeriveOptions: {
2584
+ readFromCursor(c: Cursor): DeriveOptions;
2585
+ writeIntoCursor(value: DeriveOptions, c: Cursor): void;
2586
+ allocationSize(value: DeriveOptions): number;
2587
+ lift(value: UniffiByteArray): DeriveOptions;
2588
+ lower(value: DeriveOptions, alloc: RustBufferAllocator): UniffiByteArray;
2589
+ };
2590
+ FfiConverterTypeEmbedOptions: {
2591
+ readFromCursor(c: Cursor): EmbedOptions;
2592
+ writeIntoCursor(value: EmbedOptions, c: Cursor): void;
2593
+ allocationSize(value: EmbedOptions): number;
2594
+ lift(value: UniffiByteArray): EmbedOptions;
2595
+ lower(value: EmbedOptions, alloc: RustBufferAllocator): UniffiByteArray;
2596
+ };
2597
+ FfiConverterTypeFieldViolation: {
2598
+ readFromCursor(c: Cursor): FieldViolation;
2599
+ writeIntoCursor(value: FieldViolation, c: Cursor): void;
2600
+ allocationSize(value: FieldViolation): number;
2601
+ lift(value: UniffiByteArray): FieldViolation;
2602
+ lower(value: FieldViolation, alloc: RustBufferAllocator): UniffiByteArray;
2603
+ };
2604
+ FfiConverterTypeFileSink: FfiConverterObject<FileSinkLike>;
2605
+ FfiConverterTypeFileSource: FfiConverterObject<FileSourceLike>;
2606
+ FfiConverterTypeIdentityOptions: {
2607
+ readFromCursor(c: Cursor): IdentityOptions;
2608
+ writeIntoCursor(value: IdentityOptions, c: Cursor): void;
2609
+ allocationSize(value: IdentityOptions): number;
2610
+ lift(value: UniffiByteArray): IdentityOptions;
2611
+ lower(value: IdentityOptions, alloc: RustBufferAllocator): UniffiByteArray;
2612
+ };
2613
+ FfiConverterTypeIngredient: {
2614
+ readFromCursor(c: Cursor): Ingredient;
2615
+ writeIntoCursor(value: Ingredient, c: Cursor): void;
2616
+ allocationSize(value: Ingredient): number;
2617
+ lift(value: UniffiByteArray): Ingredient;
2618
+ lower(value: Ingredient, alloc: RustBufferAllocator): UniffiByteArray;
2619
+ };
2620
+ FfiConverterTypeInitOutcome: {
2621
+ readFromCursor(c: Cursor): InitOutcome;
2622
+ writeIntoCursor(value: InitOutcome, c: Cursor): void;
2623
+ allocationSize(value: InitOutcome): number;
2624
+ lift(value: UniffiByteArray): InitOutcome;
2625
+ lower(value: InitOutcome, alloc: RustBufferAllocator): UniffiByteArray;
2626
+ };
2627
+ FfiConverterTypeManifestMode: {
2628
+ readFromCursor(c: Cursor): ManifestMode;
2629
+ writeIntoCursor(value: ManifestMode, c: Cursor): void;
2630
+ allocationSize(value: ManifestMode): number;
2631
+ lift(value: UniffiByteArray): ManifestMode;
2632
+ lower(value: ManifestMode, alloc: RustBufferAllocator): UniffiByteArray;
2633
+ };
2634
+ FfiConverterTypeManifestSpec: {
2635
+ readFromCursor(c: Cursor): ManifestSpec;
2636
+ writeIntoCursor(value: ManifestSpec, c: Cursor): void;
2637
+ allocationSize(value: ManifestSpec): number;
2638
+ lift(value: UniffiByteArray): ManifestSpec;
2639
+ lower(value: ManifestSpec, alloc: RustBufferAllocator): UniffiByteArray;
2640
+ };
2641
+ FfiConverterTypeMark: {
2642
+ readFromCursor(c: Cursor): Mark;
2643
+ writeIntoCursor(value: Mark, c: Cursor): void;
2644
+ allocationSize(value: Mark): number;
2645
+ lift(value: UniffiByteArray): Mark;
2646
+ lower(value: Mark, alloc: RustBufferAllocator): UniffiByteArray;
2647
+ };
2648
+ FfiConverterTypeMarkOptions: {
2649
+ readFromCursor(c: Cursor): MarkOptions;
2650
+ writeIntoCursor(value: MarkOptions, c: Cursor): void;
2651
+ allocationSize(value: MarkOptions): number;
2652
+ lift(value: UniffiByteArray): MarkOptions;
2653
+ lower(value: MarkOptions, alloc: RustBufferAllocator): UniffiByteArray;
2654
+ };
2655
+ FfiConverterTypeMarked: {
2656
+ readFromCursor(c: Cursor): Marked;
2657
+ writeIntoCursor(value: Marked, c: Cursor): void;
2658
+ allocationSize(value: Marked): number;
2659
+ lift(value: UniffiByteArray): Marked;
2660
+ lower(value: Marked, alloc: RustBufferAllocator): UniffiByteArray;
2661
+ };
2662
+ FfiConverterTypeMemorySink: FfiConverterObject<MemorySinkLike>;
2663
+ FfiConverterTypeMemorySource: FfiConverterObject<MemorySourceLike>;
2664
+ FfiConverterTypeOpenedOrigin: {
2665
+ readFromCursor(c: Cursor): OpenedOrigin;
2666
+ writeIntoCursor(value: OpenedOrigin, c: Cursor): void;
2667
+ allocationSize(value: OpenedOrigin): number;
2668
+ lift(value: UniffiByteArray): OpenedOrigin;
2669
+ lower(value: OpenedOrigin, alloc: RustBufferAllocator): UniffiByteArray;
2670
+ };
2671
+ FfiConverterTypeOrigin: {
2672
+ readFromCursor(c: Cursor): Origin;
2673
+ writeIntoCursor(value: Origin, c: Cursor): void;
2674
+ allocationSize(value: Origin): number;
2675
+ lift(value: UniffiByteArray): Origin;
2676
+ lower(value: Origin, alloc: RustBufferAllocator): UniffiByteArray;
2677
+ };
2678
+ FfiConverterTypePluginRegistry: FfiConverterObject<PluginRegistryLike>;
2679
+ FfiConverterTypeRangeSink: FfiConverterObjectWithCallbacks<RangeSink>;
2680
+ FfiConverterTypeRangeSource: FfiConverterObjectWithCallbacks<RangeSource>;
2681
+ FfiConverterTypeRegion: {
2682
+ readFromCursor(c: Cursor): Region;
2683
+ writeIntoCursor(value: Region, c: Cursor): void;
2684
+ allocationSize(value: Region): number;
2685
+ lift(value: UniffiByteArray): Region;
2686
+ lower(value: Region, alloc: RustBufferAllocator): UniffiByteArray;
2687
+ };
2688
+ FfiConverterTypeRotationPolicy: {
2689
+ readFromCursor(c: Cursor): RotationPolicy;
2690
+ writeIntoCursor(value: RotationPolicy, c: Cursor): void;
2691
+ allocationSize(value: RotationPolicy): number;
2692
+ lift(value: UniffiByteArray): RotationPolicy;
2693
+ lower(value: RotationPolicy, alloc: RustBufferAllocator): UniffiByteArray;
2694
+ };
2695
+ FfiConverterTypeSdkError: {
2696
+ readFromCursor(c: Cursor): SdkError;
2697
+ writeIntoCursor(value: SdkError, c: Cursor): void;
2698
+ allocationSize(value: SdkError): number;
2699
+ lift(value: UniffiByteArray): SdkError;
2700
+ lower(value: SdkError, alloc: RustBufferAllocator): UniffiByteArray;
2701
+ };
2702
+ FfiConverterTypeSegmentKind: {
2703
+ readFromCursor(c: Cursor): SegmentKind;
2704
+ writeIntoCursor(value: SegmentKind, c: Cursor): void;
2705
+ allocationSize(value: SegmentKind): number;
2706
+ lift(value: UniffiByteArray): SegmentKind;
2707
+ lower(value: SegmentKind, alloc: RustBufferAllocator): UniffiByteArray;
2708
+ };
2709
+ FfiConverterTypeSignOptions: {
2710
+ readFromCursor(c: Cursor): SignOptions;
2711
+ writeIntoCursor(value: SignOptions, c: Cursor): void;
2712
+ allocationSize(value: SignOptions): number;
2713
+ lift(value: UniffiByteArray): SignOptions;
2714
+ lower(value: SignOptions, alloc: RustBufferAllocator): UniffiByteArray;
2715
+ };
2716
+ FfiConverterTypeSignOutcome: {
2717
+ readFromCursor(c: Cursor): SignOutcome;
2718
+ writeIntoCursor(value: SignOutcome, c: Cursor): void;
2719
+ allocationSize(value: SignOutcome): number;
2720
+ lift(value: UniffiByteArray): SignOutcome;
2721
+ lower(value: SignOutcome, alloc: RustBufferAllocator): UniffiByteArray;
2722
+ };
2723
+ FfiConverterTypeSignedSegmentOutcome: {
2724
+ readFromCursor(c: Cursor): SignedSegmentOutcome;
2725
+ writeIntoCursor(value: SignedSegmentOutcome, c: Cursor): void;
2726
+ allocationSize(value: SignedSegmentOutcome): number;
2727
+ lift(value: UniffiByteArray): SignedSegmentOutcome;
2728
+ lower(value: SignedSegmentOutcome, alloc: RustBufferAllocator): UniffiByteArray;
2729
+ };
2730
+ FfiConverterTypeSignerClient: FfiConverterObject<SignerClientLike>;
2731
+ FfiConverterTypeSoftBinding: {
2732
+ readFromCursor(c: Cursor): SoftBinding;
2733
+ writeIntoCursor(value: SoftBinding, c: Cursor): void;
2734
+ allocationSize(value: SoftBinding): number;
2735
+ lift(value: UniffiByteArray): SoftBinding;
2736
+ lower(value: SoftBinding, alloc: RustBufferAllocator): UniffiByteArray;
2737
+ };
2738
+ FfiConverterTypeStandardAction: {
2739
+ readFromCursor(c: Cursor): StandardAction;
2740
+ writeIntoCursor(value: StandardAction, c: Cursor): void;
2741
+ allocationSize(value: StandardAction): number;
2742
+ lift(value: UniffiByteArray): StandardAction;
2743
+ lower(value: StandardAction, alloc: RustBufferAllocator): UniffiByteArray;
2744
+ };
2745
+ FfiConverterTypeStreamIssuer: FfiConverterObject<StreamIssuerLike>;
2746
+ FfiConverterTypeStreamSession: FfiConverterObject<StreamSessionLike>;
2747
+ FfiConverterTypeStreamStart: {
2748
+ readFromCursor(c: Cursor): StreamStart;
2749
+ writeIntoCursor(value: StreamStart, c: Cursor): void;
2750
+ allocationSize(value: StreamStart): number;
2751
+ lift(value: UniffiByteArray): StreamStart;
2752
+ lower(value: StreamStart, alloc: RustBufferAllocator): UniffiByteArray;
2753
+ };
2754
+ FfiConverterTypeThumbnail: {
2755
+ readFromCursor(c: Cursor): Thumbnail;
2756
+ writeIntoCursor(value: Thumbnail, c: Cursor): void;
2757
+ allocationSize(value: Thumbnail): number;
2758
+ lift(value: UniffiByteArray): Thumbnail;
2759
+ lower(value: Thumbnail, alloc: RustBufferAllocator): UniffiByteArray;
2760
+ };
2761
+ FfiConverterTypeValue: FfiConverter<UniffiByteArray, string>;
2762
+ FfiConverterTypeVaultPublicKey: {
2763
+ readFromCursor(c: Cursor): VaultPublicKey;
2764
+ writeIntoCursor(value: VaultPublicKey, c: Cursor): void;
2765
+ allocationSize(value: VaultPublicKey): number;
2766
+ lift(value: UniffiByteArray): VaultPublicKey;
2767
+ lower(value: VaultPublicKey, alloc: RustBufferAllocator): UniffiByteArray;
2768
+ };
2769
+ };
2770
+ }>;
2771
+ //#endregion
2772
+ //#region ../../../../target/trylimbo/codegen/ffi-trylimbo_sdk_issuer/index.d.ts
2773
+ declare function uniffiInitAsync(): Promise<void>;
2774
+ declare const _default: {
2775
+ trylimbo_issuer: typeof trylimbo_issuer_d_exports;
2776
+ };
2777
+ //#endregion
2778
+ export { Action, ActionDetail, ActionKind, Action_Tags, Assertion, AssetIssuer, AssetIssuerInterface, AssetIssuerLike, AssetMarker, AssetMarkerInterface, AssetMarkerLike, Binder, BinderInterface, BinderLike, Code, Component, ComponentEvent, ConnectOptions, CreatedOrigin, CustomAction, DeriveOptions, EmbedOptions, FieldViolation, FileSink, FileSinkInterface, FileSinkLike, FileSource, FileSourceInterface, FileSourceLike, IdentityOptions, Ingredient, InitOutcome, ManifestMode, ManifestMode_Tags, ManifestSpec, Mark, MarkOptions, Mark_Tags, Marked, MemorySink, MemorySinkInterface, MemorySinkLike, MemorySource, MemorySourceInterface, MemorySourceLike, OpenedOrigin, Origin, Origin_Tags, PluginAuthor, PluginRegistry, PluginRegistryInterface, PluginRegistryLike, RangeSink, RangeSinkImpl, RangeSource, RangeSourceImpl, Region, RotationPolicy, SdkError, SdkError_Tags, SegmentKind, SignOptions, SignOutcome, SignedSegmentOutcome, SignerClient, SignerClientInterface, SignerClientLike, SigningVault, SoftBinding, StandardAction, StreamIssuer, StreamIssuerInterface, StreamIssuerLike, StreamSession, StreamSessionInterface, StreamSessionLike, StreamStart, Thumbnail, Value, VaultPublicKey, classifySegment, _default as default, embed, uniffiInitAsync };