@trylimbo/sdk-verifier 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.
- package/gen/ffi/index.d.ts +4026 -0
- package/gen/ffi/index.js +7029 -0
- package/gen/ffi/rolldown-runtime.js +43 -0
- package/package.json +42 -0
|
@@ -0,0 +1,4026 @@
|
|
|
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_verifier_d_exports {
|
|
184
|
+
export { Actor, AssertionMetadata, AssetType, AssetVerification, AssetVerifier, AssetVerifierInterface, AssetVerifierLike, AssetVerifierOptions, Binder, BinderInterface, BinderLike, ClaimGeneratorInfo, Code, ContentBindingClass, ContentBindingEvidence, Coordinate, CredentialOrigin, CredentialOrigin_Tags, DataSource, DeriveOptions, EndInclusivity, FieldViolation, FileSource, FileSourceInterface, FileSourceLike, FingerprintCheck, FingerprintCheck_Tags, FoundCredential, Frame, GoldenComparison, GoldenComparison_Tags, HashedUri, Ingredient, IngredientDeltaValidationResult, InitValidation, Item, Manifest, ManifestAssertion, ManifestAssertionKind, ManifestStore, MediaValidation, MemorySource, MemorySourceInterface, MemorySourceLike, PluginRead, PluginRegistry, PluginRegistryInterface, PluginRegistryLike, Range, RangeSource, RangeSourceImpl, RangeType, RecoveryIssue, RecoveryIssueKind, RecoveryPolicy, RecoveryStatus, RecoverySummary, Region, RegionOfInterest, RegistryOptions, RegistryQueries, Relationship, ResourceRef, ReviewRating, Role, SdkError, SdkError_Tags, SegmentTiming, SegmentValidation, SegmentValidation_Tags, SessionKeySummary, Shape, ShapeType, SignatureInfo, SigningAlgSchema, SimilarityScore, SoftBinding, StatusCodes, StreamValidation, StreamValidationInterface, StreamValidationLike, StreamVerifier, StreamVerifierInterface, StreamVerifierLike, StreamVerifierOptions, Text, TextSelector, TextSelectorRange, Time, TimeType, UnitType, UriOrResource, UriOrResource_Tags, ValidationCode, ValidationCodeKind, ValidationResults, ValidationState, ValidationStatus, Value, VerifyOptions, c2paTrustList, c2paTsaTrustList, _default$1 as default, devCa, parse, resource, thumbnails };
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Official C2PA Conformance Program signing-CA trust anchors (a compile-time
|
|
188
|
+
* snapshot). Trusted by default already; exposed for callers pinning their own list.
|
|
189
|
+
*/
|
|
190
|
+
declare function c2paTrustList(): string;
|
|
191
|
+
/**
|
|
192
|
+
* Official C2PA time-stamping-authority (TSA) trust anchors (a compile-time snapshot).
|
|
193
|
+
*/
|
|
194
|
+
declare function c2paTsaTrustList(): string;
|
|
195
|
+
/**
|
|
196
|
+
* PEM trust anchor for the Limbo Integrity development signing environment, **development
|
|
197
|
+
* only**, no security guarantees. Never ship it in a release anchor list.
|
|
198
|
+
*/
|
|
199
|
+
declare function devCa(): string;
|
|
200
|
+
/**
|
|
201
|
+
* Parse a detached C2PA manifest store: a `.c2pa` sidecar, or the bytes a registry serves for a
|
|
202
|
+
* manifest id.
|
|
203
|
+
*
|
|
204
|
+
* Contents, not a verdict. A hard binding is a hash of the asset, so a store read without one
|
|
205
|
+
* says nothing about whether the credential is authentic or which file it belongs to, and the
|
|
206
|
+
* validation fields it carries are not a state anything established here; verifying is
|
|
207
|
+
* `AssetVerifier.verify`, which takes the asset.
|
|
208
|
+
*
|
|
209
|
+
* Runs on the calling thread rather than an SDK worker, unlike `embed`: a manifest store is
|
|
210
|
+
* bounded by the decompression ceiling, where an asset is not.
|
|
211
|
+
*
|
|
212
|
+
* # Errors
|
|
213
|
+
*
|
|
214
|
+
* `READER_INVALID` when the bytes are not a manifest store c2pa can parse.
|
|
215
|
+
*/
|
|
216
|
+
declare function parse(manifest: ArrayBuffer): ManifestStore;
|
|
217
|
+
/**
|
|
218
|
+
* The bytes of one resource in a detached manifest store, or nothing when it holds none under
|
|
219
|
+
* `uri`.
|
|
220
|
+
*
|
|
221
|
+
* `uri` is the `identifier` on a resource reference the store carries, so walking the chain in
|
|
222
|
+
* the parsed store is what produces it: any manifest's claim thumbnail, including a non-active
|
|
223
|
+
* one, and any ingredient's. Render it with the `format` beside that identifier. A `uri` naming a
|
|
224
|
+
* manifest rather than a resource answers that manifest's own JUMBF, so pass what a reference
|
|
225
|
+
* states, never a bare label.
|
|
226
|
+
*
|
|
227
|
+
* # Errors
|
|
228
|
+
*
|
|
229
|
+
* `READER_INVALID` when the bytes are not a manifest store c2pa can parse, or the store holds
|
|
230
|
+
* the resource but cannot produce it.
|
|
231
|
+
*/
|
|
232
|
+
declare function resource(manifest: ArrayBuffer, uri: string): ArrayBuffer | undefined;
|
|
233
|
+
/**
|
|
234
|
+
* Every thumbnail the store references, by the `identifier` it references them under: each
|
|
235
|
+
* manifest's claim thumbnail and each ingredient's.
|
|
236
|
+
*
|
|
237
|
+
* One parse for the whole set, where [`resource`] pays one per call. A reference the store cannot
|
|
238
|
+
* produce is left out rather than failing the set.
|
|
239
|
+
*
|
|
240
|
+
* # Errors
|
|
241
|
+
*
|
|
242
|
+
* `READER_INVALID` when the bytes are not a manifest store c2pa can parse.
|
|
243
|
+
*/
|
|
244
|
+
declare function thumbnails(manifest: ArrayBuffer): Map<string, ArrayBuffer>;
|
|
245
|
+
/**
|
|
246
|
+
* A `HashedUri` provides a reference to content available within the same
|
|
247
|
+
* manifest store.
|
|
248
|
+
*
|
|
249
|
+
* This is described in [URI References in the C2PA Technical
|
|
250
|
+
* Specification](https://spec.c2pa.org/specifications/specifications/2.3/specs/C2PA_Specification.html#_uri_references).
|
|
251
|
+
*/
|
|
252
|
+
type HashedUri = {
|
|
253
|
+
/**
|
|
254
|
+
* A string identifying the cryptographic hash algorithm used to compute
|
|
255
|
+
* the hash
|
|
256
|
+
*/
|
|
257
|
+
alg?: string;
|
|
258
|
+
/**
|
|
259
|
+
* Byte string containing the hash value
|
|
260
|
+
*/
|
|
261
|
+
hash: ArrayBuffer;
|
|
262
|
+
/**
|
|
263
|
+
* JUMBF URI reference
|
|
264
|
+
*/
|
|
265
|
+
url: string;
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* Generated factory for {@link HashedUri} record objects.
|
|
269
|
+
*/
|
|
270
|
+
declare const HashedUri: Readonly<{
|
|
271
|
+
create: (partial: Partial<HashedUri> & Required<Omit<HashedUri, "alg">>) => HashedUri;
|
|
272
|
+
new: (partial: Partial<HashedUri> & Required<Omit<HashedUri, "alg">>) => HashedUri;
|
|
273
|
+
defaults: () => Partial<HashedUri>;
|
|
274
|
+
}>;
|
|
275
|
+
/**
|
|
276
|
+
* Identifies a person responsible for an action.
|
|
277
|
+
*/
|
|
278
|
+
type Actor = {
|
|
279
|
+
/**
|
|
280
|
+
* List of references to W3C Verifiable Credentials.
|
|
281
|
+
*/
|
|
282
|
+
credentials?: Array<HashedUri>;
|
|
283
|
+
/**
|
|
284
|
+
* An identifier for a human actor, used when the "type" is `humanEntry.identified`.
|
|
285
|
+
*/
|
|
286
|
+
identifier?: string;
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* Generated factory for {@link Actor} record objects.
|
|
290
|
+
*/
|
|
291
|
+
declare const Actor: Readonly<{
|
|
292
|
+
create: (partial: Partial<Actor> & Required<Omit<Actor, "credentials" | "identifier">>) => Actor;
|
|
293
|
+
new: (partial: Partial<Actor> & Required<Omit<Actor, "credentials" | "identifier">>) => Actor;
|
|
294
|
+
defaults: () => Partial<Actor>;
|
|
295
|
+
}>;
|
|
296
|
+
/**
|
|
297
|
+
* A description of the source for assertion data
|
|
298
|
+
*/
|
|
299
|
+
type DataSource = {
|
|
300
|
+
/**
|
|
301
|
+
* A list of [`Actor`]s associated with this source.
|
|
302
|
+
*/
|
|
303
|
+
actors?: Array<Actor>;
|
|
304
|
+
/**
|
|
305
|
+
* A human-readable string giving details about the source of the assertion data.
|
|
306
|
+
*/
|
|
307
|
+
details?: string;
|
|
308
|
+
/**
|
|
309
|
+
* A value from among the enumerated list indicating the source of the assertion.
|
|
310
|
+
*/
|
|
311
|
+
type: string;
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* Generated factory for {@link DataSource} record objects.
|
|
315
|
+
*/
|
|
316
|
+
declare const DataSource: Readonly<{
|
|
317
|
+
create: (partial: Partial<DataSource> & Required<Omit<DataSource, "actors" | "details">>) => DataSource;
|
|
318
|
+
new: (partial: Partial<DataSource> & Required<Omit<DataSource, "actors" | "details">>) => DataSource;
|
|
319
|
+
defaults: () => Partial<DataSource>;
|
|
320
|
+
}>;
|
|
321
|
+
/**
|
|
322
|
+
* Typealias from the type name used in the UDL file to the builtin type. This
|
|
323
|
+
* is needed because the UDL type name is used in function/method signatures.
|
|
324
|
+
*/
|
|
325
|
+
type Value = string;
|
|
326
|
+
/**
|
|
327
|
+
* A frame range representing starting and ending frames or pages.
|
|
328
|
+
*
|
|
329
|
+
* If both `start` and `end` are missing, the frame will span the entire asset.
|
|
330
|
+
*/
|
|
331
|
+
type Frame = {
|
|
332
|
+
/**
|
|
333
|
+
* The end of the frame inclusive or the end of the asset if not present.
|
|
334
|
+
*/
|
|
335
|
+
end?: number;
|
|
336
|
+
/**
|
|
337
|
+
* The start of the frame or the end of the asset if not present.
|
|
338
|
+
*
|
|
339
|
+
* The first frame/page starts at 0.
|
|
340
|
+
*/
|
|
341
|
+
start?: number;
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* Generated factory for {@link Frame} record objects.
|
|
345
|
+
*/
|
|
346
|
+
declare const Frame: Readonly<{
|
|
347
|
+
create: (partial: Partial<Frame> & Required<Omit<Frame, "end" | "start">>) => Frame;
|
|
348
|
+
new: (partial: Partial<Frame> & Required<Omit<Frame, "end" | "start">>) => Frame;
|
|
349
|
+
defaults: () => Partial<Frame>;
|
|
350
|
+
}>;
|
|
351
|
+
/**
|
|
352
|
+
* Description of the boundaries of an identified range.
|
|
353
|
+
*/
|
|
354
|
+
type Item = {
|
|
355
|
+
/**
|
|
356
|
+
* The container-specific term used to identify items, such as "track_id" for MP4 or "item_ID" for HEIF.
|
|
357
|
+
*/
|
|
358
|
+
identifier: string;
|
|
359
|
+
/**
|
|
360
|
+
* The value of the identifier, e.g. a value of "2" for an identifier of "track_id" would imply track 2 of the asset.
|
|
361
|
+
*/
|
|
362
|
+
value: string;
|
|
363
|
+
};
|
|
364
|
+
/**
|
|
365
|
+
* Generated factory for {@link Item} record objects.
|
|
366
|
+
*/
|
|
367
|
+
declare const Item: Readonly<{
|
|
368
|
+
create: (partial: Partial<Item> & Required<Omit<Item, never>>) => Item;
|
|
369
|
+
new: (partial: Partial<Item> & Required<Omit<Item, never>>) => Item;
|
|
370
|
+
defaults: () => Partial<Item>;
|
|
371
|
+
}>;
|
|
372
|
+
/**
|
|
373
|
+
* An x, y coordinate used for specifying vertices in polygons.
|
|
374
|
+
*/
|
|
375
|
+
type Coordinate = {
|
|
376
|
+
/**
|
|
377
|
+
* The coordinate along the x-axis.
|
|
378
|
+
*/
|
|
379
|
+
x: number;
|
|
380
|
+
/**
|
|
381
|
+
* The coordinate along the y-axis.
|
|
382
|
+
*/
|
|
383
|
+
y: number;
|
|
384
|
+
};
|
|
385
|
+
/**
|
|
386
|
+
* Generated factory for {@link Coordinate} record objects.
|
|
387
|
+
*/
|
|
388
|
+
declare const Coordinate: Readonly<{
|
|
389
|
+
create: (partial: Partial<Coordinate> & Required<Omit<Coordinate, never>>) => Coordinate;
|
|
390
|
+
new: (partial: Partial<Coordinate> & Required<Omit<Coordinate, never>>) => Coordinate;
|
|
391
|
+
defaults: () => Partial<Coordinate>;
|
|
392
|
+
}>;
|
|
393
|
+
/**
|
|
394
|
+
* The type of shape for the range.
|
|
395
|
+
*/
|
|
396
|
+
declare enum ShapeType {
|
|
397
|
+
/**
|
|
398
|
+
* A rectangle.
|
|
399
|
+
*/
|
|
400
|
+
Rectangle = 0,
|
|
401
|
+
/**
|
|
402
|
+
* A circle.
|
|
403
|
+
*/
|
|
404
|
+
Circle = 1,
|
|
405
|
+
/**
|
|
406
|
+
* A polygon.
|
|
407
|
+
*/
|
|
408
|
+
Polygon = 2
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* The type of unit for the range.
|
|
412
|
+
*/
|
|
413
|
+
declare enum UnitType {
|
|
414
|
+
/**
|
|
415
|
+
* Use pixels.
|
|
416
|
+
*/
|
|
417
|
+
Pixel = 0,
|
|
418
|
+
/**
|
|
419
|
+
* Use percentage.
|
|
420
|
+
*/
|
|
421
|
+
Percent = 1
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* A spatial range representing rectangle, circle, or a polygon.
|
|
425
|
+
*/
|
|
426
|
+
type Shape = {
|
|
427
|
+
/**
|
|
428
|
+
* The height of a rectnagle.
|
|
429
|
+
*
|
|
430
|
+
* This field can be ignored for circles and polygons.
|
|
431
|
+
*/
|
|
432
|
+
height?: number;
|
|
433
|
+
/**
|
|
434
|
+
* If the range is inside the shape.
|
|
435
|
+
*
|
|
436
|
+
* The default value is true.
|
|
437
|
+
*/
|
|
438
|
+
inside?: boolean;
|
|
439
|
+
/**
|
|
440
|
+
* THe origin of the coordinate in the shape.
|
|
441
|
+
*/
|
|
442
|
+
origin: Coordinate;
|
|
443
|
+
/**
|
|
444
|
+
* The type of shape.
|
|
445
|
+
*/
|
|
446
|
+
type: ShapeType;
|
|
447
|
+
/**
|
|
448
|
+
* The type of unit for the shape range.
|
|
449
|
+
*/
|
|
450
|
+
unit: UnitType;
|
|
451
|
+
/**
|
|
452
|
+
* The vertices of the polygon.
|
|
453
|
+
*
|
|
454
|
+
* This field can be ignored for rectangles and circles.
|
|
455
|
+
*/
|
|
456
|
+
vertices?: Array<Coordinate>;
|
|
457
|
+
/**
|
|
458
|
+
* The width for rectangles or diameter for circles.
|
|
459
|
+
*
|
|
460
|
+
* This field can be ignored for polygons.
|
|
461
|
+
*/
|
|
462
|
+
width?: number;
|
|
463
|
+
};
|
|
464
|
+
/**
|
|
465
|
+
* Generated factory for {@link Shape} record objects.
|
|
466
|
+
*/
|
|
467
|
+
declare const Shape: Readonly<{
|
|
468
|
+
create: (partial: Partial<Shape> & Required<Omit<Shape, "height" | "inside" | "vertices" | "width">>) => Shape;
|
|
469
|
+
new: (partial: Partial<Shape> & Required<Omit<Shape, "height" | "inside" | "vertices" | "width">>) => Shape;
|
|
470
|
+
defaults: () => Partial<Shape>;
|
|
471
|
+
}>;
|
|
472
|
+
/**
|
|
473
|
+
* Selects a range of text via a fragment identifier.
|
|
474
|
+
*
|
|
475
|
+
* This is modeled after the W3C Web Annotation selector model.
|
|
476
|
+
*/
|
|
477
|
+
type TextSelector = {
|
|
478
|
+
/**
|
|
479
|
+
* The end character offset or the end of the fragment if not present.
|
|
480
|
+
*/
|
|
481
|
+
end?: number;
|
|
482
|
+
/**
|
|
483
|
+
* Fragment identifier as per RFC3023 (XML) or ISO 32000-2 (PDF), Annex O.
|
|
484
|
+
*/
|
|
485
|
+
fragment: string;
|
|
486
|
+
/**
|
|
487
|
+
* The start character offset or the start of the fragment if not present.
|
|
488
|
+
*/
|
|
489
|
+
start?: number;
|
|
490
|
+
};
|
|
491
|
+
/**
|
|
492
|
+
* Generated factory for {@link TextSelector} record objects.
|
|
493
|
+
*/
|
|
494
|
+
declare const TextSelector: Readonly<{
|
|
495
|
+
create: (partial: Partial<TextSelector> & Required<Omit<TextSelector, "end" | "start">>) => TextSelector;
|
|
496
|
+
new: (partial: Partial<TextSelector> & Required<Omit<TextSelector, "end" | "start">>) => TextSelector;
|
|
497
|
+
defaults: () => Partial<TextSelector>;
|
|
498
|
+
}>;
|
|
499
|
+
/**
|
|
500
|
+
* One or two [`TextSelector`] identifiying the range to select.
|
|
501
|
+
*/
|
|
502
|
+
type TextSelectorRange = {
|
|
503
|
+
/**
|
|
504
|
+
* The end of the text range.
|
|
505
|
+
*/
|
|
506
|
+
end?: TextSelector;
|
|
507
|
+
/**
|
|
508
|
+
* The start (or entire) text range.
|
|
509
|
+
*/
|
|
510
|
+
selector: TextSelector;
|
|
511
|
+
};
|
|
512
|
+
/**
|
|
513
|
+
* Generated factory for {@link TextSelectorRange} record objects.
|
|
514
|
+
*/
|
|
515
|
+
declare const TextSelectorRange: Readonly<{
|
|
516
|
+
create: (partial: Partial<TextSelectorRange> & Required<Omit<TextSelectorRange, "end">>) => TextSelectorRange;
|
|
517
|
+
new: (partial: Partial<TextSelectorRange> & Required<Omit<TextSelectorRange, "end">>) => TextSelectorRange;
|
|
518
|
+
defaults: () => Partial<TextSelectorRange>;
|
|
519
|
+
}>;
|
|
520
|
+
/**
|
|
521
|
+
* A textual range representing multiple (possibly discontinuous) ranges of text.
|
|
522
|
+
*/
|
|
523
|
+
type Text = {
|
|
524
|
+
/**
|
|
525
|
+
* The ranges of text to select.
|
|
526
|
+
*/
|
|
527
|
+
selectors: Array<TextSelectorRange>;
|
|
528
|
+
};
|
|
529
|
+
/**
|
|
530
|
+
* Generated factory for {@link Text} record objects.
|
|
531
|
+
*/
|
|
532
|
+
declare const Text: Readonly<{
|
|
533
|
+
create: (partial: Partial<Text> & Required<Omit<Text, never>>) => Text;
|
|
534
|
+
new: (partial: Partial<Text> & Required<Omit<Text, never>>) => Text;
|
|
535
|
+
defaults: () => Partial<Text>;
|
|
536
|
+
}>;
|
|
537
|
+
/**
|
|
538
|
+
* Whether a temporal range includes its ending instant.
|
|
539
|
+
*/
|
|
540
|
+
declare enum EndInclusivity {
|
|
541
|
+
/**
|
|
542
|
+
* The ending instant is part of the range.
|
|
543
|
+
*/
|
|
544
|
+
Inclusive = 0,
|
|
545
|
+
/**
|
|
546
|
+
* The ending instant is excluded. This is the Core default.
|
|
547
|
+
*/
|
|
548
|
+
Exclusive = 1
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* The type of time.
|
|
552
|
+
*/
|
|
553
|
+
declare enum TimeType {
|
|
554
|
+
/**
|
|
555
|
+
* Times are described using Normal Play Time (npt) as described in RFC 2326.
|
|
556
|
+
*/
|
|
557
|
+
Npt = 0,
|
|
558
|
+
/**
|
|
559
|
+
* Times are absolute RFC 3339 wall-clock instants.
|
|
560
|
+
*/
|
|
561
|
+
WallClock = 1
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* A temporal range representing a starting time to an ending time.
|
|
565
|
+
*/
|
|
566
|
+
type Time = {
|
|
567
|
+
/**
|
|
568
|
+
* The end time or the end of the asset if not present.
|
|
569
|
+
*/
|
|
570
|
+
end?: string;
|
|
571
|
+
/**
|
|
572
|
+
* Whether the ending instant is inclusive. Omission means `exclusive`.
|
|
573
|
+
*/
|
|
574
|
+
endInclusivity?: EndInclusivity;
|
|
575
|
+
/**
|
|
576
|
+
* The start time or the start of the asset if not present.
|
|
577
|
+
*/
|
|
578
|
+
start?: string;
|
|
579
|
+
/**
|
|
580
|
+
* The type of time.
|
|
581
|
+
*/
|
|
582
|
+
type: TimeType;
|
|
583
|
+
};
|
|
584
|
+
/**
|
|
585
|
+
* Generated factory for {@link Time} record objects.
|
|
586
|
+
*/
|
|
587
|
+
declare const Time: Readonly<{
|
|
588
|
+
create: (partial: Partial<Time> & Required<Omit<Time, "end" | "endInclusivity" | "start">>) => Time;
|
|
589
|
+
new: (partial: Partial<Time> & Required<Omit<Time, "end" | "endInclusivity" | "start">>) => Time;
|
|
590
|
+
defaults: () => Partial<Time>;
|
|
591
|
+
}>;
|
|
592
|
+
/**
|
|
593
|
+
* The type of range for the region of interest.
|
|
594
|
+
*/
|
|
595
|
+
declare enum RangeType {
|
|
596
|
+
/**
|
|
597
|
+
* A spatial range, see [`Shape`] for more details.
|
|
598
|
+
*/
|
|
599
|
+
Spatial = 0,
|
|
600
|
+
/**
|
|
601
|
+
* A temporal range, see [`Time`] for more details.
|
|
602
|
+
*/
|
|
603
|
+
Temporal = 1,
|
|
604
|
+
/**
|
|
605
|
+
* A spatial range, see [`Frame`] for more details.
|
|
606
|
+
*/
|
|
607
|
+
Frame = 2,
|
|
608
|
+
/**
|
|
609
|
+
* A textual range, see [`Text`] for more details.
|
|
610
|
+
*/
|
|
611
|
+
Textual = 3,
|
|
612
|
+
/**
|
|
613
|
+
* A range identified by a specific identifier and value, see [`Item`] for more details.
|
|
614
|
+
*/
|
|
615
|
+
Identified = 4
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* A spatial, temporal, frame, or textual range describing the region of interest.
|
|
619
|
+
*/
|
|
620
|
+
type Range = {
|
|
621
|
+
/**
|
|
622
|
+
* A frame range.
|
|
623
|
+
*/
|
|
624
|
+
frame?: Frame;
|
|
625
|
+
/**
|
|
626
|
+
* A item identifier.
|
|
627
|
+
*/
|
|
628
|
+
item?: Item;
|
|
629
|
+
/**
|
|
630
|
+
* A spatial range.
|
|
631
|
+
*/
|
|
632
|
+
shape?: Shape;
|
|
633
|
+
/**
|
|
634
|
+
* A textual range.
|
|
635
|
+
*/
|
|
636
|
+
text?: Text;
|
|
637
|
+
/**
|
|
638
|
+
* A temporal range.
|
|
639
|
+
*/
|
|
640
|
+
time?: Time;
|
|
641
|
+
/**
|
|
642
|
+
* The type of range of interest.
|
|
643
|
+
*/
|
|
644
|
+
type: RangeType;
|
|
645
|
+
};
|
|
646
|
+
/**
|
|
647
|
+
* Generated factory for {@link Range} record objects.
|
|
648
|
+
*/
|
|
649
|
+
declare const Range: Readonly<{
|
|
650
|
+
create: (partial: Partial<Range> & Required<Omit<Range, "frame" | "item" | "shape" | "text" | "time">>) => Range;
|
|
651
|
+
new: (partial: Partial<Range> & Required<Omit<Range, "frame" | "item" | "shape" | "text" | "time">>) => Range;
|
|
652
|
+
defaults: () => Partial<Range>;
|
|
653
|
+
}>;
|
|
654
|
+
/**
|
|
655
|
+
* A role describing the region.
|
|
656
|
+
*/
|
|
657
|
+
declare enum Role {
|
|
658
|
+
/**
|
|
659
|
+
* Arbitrary area worth identifying.
|
|
660
|
+
*/
|
|
661
|
+
C2paAreaOfInterest = 0,
|
|
662
|
+
/**
|
|
663
|
+
* This area is all that is left after a crop action.
|
|
664
|
+
*/
|
|
665
|
+
C2paCropped = 1,
|
|
666
|
+
/**
|
|
667
|
+
* This area has had edits applied to it.
|
|
668
|
+
*/
|
|
669
|
+
C2paEdited = 2,
|
|
670
|
+
/**
|
|
671
|
+
* The area where an ingredient was placed/added.
|
|
672
|
+
*/
|
|
673
|
+
C2paPlaced = 3,
|
|
674
|
+
/**
|
|
675
|
+
* Something in this area was redacted.
|
|
676
|
+
*/
|
|
677
|
+
C2paRedacted = 4,
|
|
678
|
+
/**
|
|
679
|
+
* Area specific to a subject (human or not).
|
|
680
|
+
*/
|
|
681
|
+
C2paSubjectArea = 5,
|
|
682
|
+
/**
|
|
683
|
+
* A range of information was removed/deleted.
|
|
684
|
+
*/
|
|
685
|
+
C2paDeleted = 6,
|
|
686
|
+
/**
|
|
687
|
+
* Styling was applied to this area.
|
|
688
|
+
*/
|
|
689
|
+
C2paStyled = 7,
|
|
690
|
+
/**
|
|
691
|
+
* Invisible watermarking was applied to this area for the purpose of soft binding.
|
|
692
|
+
*/
|
|
693
|
+
C2paWatermarked = 8
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* A region of interest within an asset describing the change.
|
|
697
|
+
*
|
|
698
|
+
* This struct can be used from [`Action::changes`][crate::assertions::Action::changes],
|
|
699
|
+
* [`AssertionMetadata::region_of_interest`][crate::assertions::AssertionMetadata::region_of_interest], or
|
|
700
|
+
* [`SoftBindingScope::region`][crate::assertions::soft_binding::SoftBindingScope::region].
|
|
701
|
+
*/
|
|
702
|
+
type RegionOfInterest = {
|
|
703
|
+
/**
|
|
704
|
+
* A free-text string.
|
|
705
|
+
*/
|
|
706
|
+
description?: string;
|
|
707
|
+
/**
|
|
708
|
+
* A free-text string representing a machine-readable, unique to this assertion, identifier for the region.
|
|
709
|
+
*/
|
|
710
|
+
identifier?: string;
|
|
711
|
+
/**
|
|
712
|
+
* Nested metadata, as JSON: the reader's one recursive edge.
|
|
713
|
+
*/
|
|
714
|
+
metadata?: Value;
|
|
715
|
+
/**
|
|
716
|
+
* A free-text string representing a human-readable name for the region which might be used in a user interface.
|
|
717
|
+
*/
|
|
718
|
+
name?: string;
|
|
719
|
+
/**
|
|
720
|
+
* A range describing the region of interest for the specific asset.
|
|
721
|
+
*/
|
|
722
|
+
region: Array<Range>;
|
|
723
|
+
/**
|
|
724
|
+
* A value from our controlled vocabulary or an entity-specific value (e.g., com.litware.coolArea) that represents
|
|
725
|
+
* the role of a region among other regions.
|
|
726
|
+
*/
|
|
727
|
+
role?: Role;
|
|
728
|
+
/**
|
|
729
|
+
* A value from a controlled vocabulary such as <https://cv.iptc.org/newscodes/imageregiontype/> or an entity-specific
|
|
730
|
+
* value (e.g., com.litware.newType) that represents the type of thing(s) depicted by a region.
|
|
731
|
+
*
|
|
732
|
+
* Note this field serializes/deserializes into the name `type`.
|
|
733
|
+
*/
|
|
734
|
+
type?: string;
|
|
735
|
+
};
|
|
736
|
+
/**
|
|
737
|
+
* Generated factory for {@link RegionOfInterest} record objects.
|
|
738
|
+
*/
|
|
739
|
+
declare const RegionOfInterest: Readonly<{
|
|
740
|
+
create: (partial: Partial<RegionOfInterest> & Required<Omit<RegionOfInterest, "description" | "identifier" | "metadata" | "name" | "role" | "type">>) => RegionOfInterest;
|
|
741
|
+
new: (partial: Partial<RegionOfInterest> & Required<Omit<RegionOfInterest, "description" | "identifier" | "metadata" | "name" | "role" | "type">>) => RegionOfInterest;
|
|
742
|
+
defaults: () => Partial<RegionOfInterest>;
|
|
743
|
+
}>;
|
|
744
|
+
/**
|
|
745
|
+
* A rating on an Assertion.
|
|
746
|
+
*
|
|
747
|
+
* See [C2PA Specification - Review Ratings](https://spec.c2pa.org/specifications/specifications/2.3/specs/C2PA_Specification.html#_review_ratings).
|
|
748
|
+
*/
|
|
749
|
+
type ReviewRating = {
|
|
750
|
+
code?: string;
|
|
751
|
+
explanation: string;
|
|
752
|
+
value: number;
|
|
753
|
+
};
|
|
754
|
+
/**
|
|
755
|
+
* Generated factory for {@link ReviewRating} record objects.
|
|
756
|
+
*/
|
|
757
|
+
declare const ReviewRating: Readonly<{
|
|
758
|
+
create: (partial: Partial<ReviewRating> & Required<Omit<ReviewRating, "code">>) => ReviewRating;
|
|
759
|
+
new: (partial: Partial<ReviewRating> & Required<Omit<ReviewRating, "code">>) => ReviewRating;
|
|
760
|
+
defaults: () => Partial<ReviewRating>;
|
|
761
|
+
}>;
|
|
762
|
+
/**
|
|
763
|
+
* The AssertionMetadata structure can be used as part of other assertions or on its own to reference others
|
|
764
|
+
*/
|
|
765
|
+
type AssertionMetadata = {
|
|
766
|
+
dataSource?: DataSource;
|
|
767
|
+
dateTime?: string;
|
|
768
|
+
localizations?: Array<Map<string, Map<string, string>>>;
|
|
769
|
+
reference?: HashedUri;
|
|
770
|
+
regionOfInterest?: RegionOfInterest;
|
|
771
|
+
reviewRatings?: Array<ReviewRating>;
|
|
772
|
+
};
|
|
773
|
+
/**
|
|
774
|
+
* Generated factory for {@link AssertionMetadata} record objects.
|
|
775
|
+
*/
|
|
776
|
+
declare const AssertionMetadata: Readonly<{
|
|
777
|
+
create: (partial: Partial<AssertionMetadata> & Required<Omit<AssertionMetadata, "dataSource" | "dateTime" | "localizations" | "reference" | "regionOfInterest" | "reviewRatings">>) => AssertionMetadata;
|
|
778
|
+
new: (partial: Partial<AssertionMetadata> & Required<Omit<AssertionMetadata, "dataSource" | "dateTime" | "localizations" | "reference" | "regionOfInterest" | "reviewRatings">>) => AssertionMetadata;
|
|
779
|
+
defaults: () => Partial<AssertionMetadata>;
|
|
780
|
+
}>;
|
|
781
|
+
/**
|
|
782
|
+
* `AssetType`
|
|
783
|
+
*/
|
|
784
|
+
type AssetType = {
|
|
785
|
+
type: string;
|
|
786
|
+
version?: string;
|
|
787
|
+
};
|
|
788
|
+
/**
|
|
789
|
+
* Generated factory for {@link AssetType} record objects.
|
|
790
|
+
*/
|
|
791
|
+
declare const AssetType: Readonly<{
|
|
792
|
+
create: (partial: Partial<AssetType> & Required<Omit<AssetType, "version">>) => AssetType;
|
|
793
|
+
new: (partial: Partial<AssetType> & Required<Omit<AssetType, "version">>) => AssetType;
|
|
794
|
+
defaults: () => Partial<AssetType>;
|
|
795
|
+
}>;
|
|
796
|
+
type SoftBinding = {
|
|
797
|
+
alg: string;
|
|
798
|
+
value: string;
|
|
799
|
+
};
|
|
800
|
+
/**
|
|
801
|
+
* Generated factory for {@link SoftBinding} record objects.
|
|
802
|
+
*/
|
|
803
|
+
declare const SoftBinding: Readonly<{
|
|
804
|
+
create: (partial: Partial<SoftBinding> & Required<Omit<SoftBinding, never>>) => SoftBinding;
|
|
805
|
+
new: (partial: Partial<SoftBinding> & Required<Omit<SoftBinding, never>>) => SoftBinding;
|
|
806
|
+
defaults: () => Partial<SoftBinding>;
|
|
807
|
+
}>;
|
|
808
|
+
/**
|
|
809
|
+
* Typealias from the type name used in the UDL file to the builtin type. This
|
|
810
|
+
* is needed because the UDL type name is used in function/method signatures.
|
|
811
|
+
*/
|
|
812
|
+
type SimilarityScore = number;
|
|
813
|
+
/**
|
|
814
|
+
* The class of binding a registry derived from an uploaded asset.
|
|
815
|
+
*
|
|
816
|
+
* Unlike [`SoftBinding`], this carries no value: the C2PA `byContent` response does not return
|
|
817
|
+
* one. The algorithm and class are still evidence because the request selects exactly that
|
|
818
|
+
* advertised algorithm.
|
|
819
|
+
*/
|
|
820
|
+
declare enum ContentBindingClass {
|
|
821
|
+
Fingerprint = 0,
|
|
822
|
+
Watermark = 1
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
* One algorithm-specific piece of evidence returned by a content lookup.
|
|
826
|
+
*/
|
|
827
|
+
type ContentBindingEvidence = {
|
|
828
|
+
algorithm: string;
|
|
829
|
+
class: ContentBindingClass;
|
|
830
|
+
hint?: SoftBinding;
|
|
831
|
+
registryScore?: SimilarityScore;
|
|
832
|
+
};
|
|
833
|
+
/**
|
|
834
|
+
* Generated factory for {@link ContentBindingEvidence} record objects.
|
|
835
|
+
*/
|
|
836
|
+
declare const ContentBindingEvidence: Readonly<{
|
|
837
|
+
create: (partial: Partial<ContentBindingEvidence> & Required<Omit<ContentBindingEvidence, "hint" | "registryScore">>) => ContentBindingEvidence;
|
|
838
|
+
new: (partial: Partial<ContentBindingEvidence> & Required<Omit<ContentBindingEvidence, "hint" | "registryScore">>) => ContentBindingEvidence;
|
|
839
|
+
defaults: () => Partial<ContentBindingEvidence>;
|
|
840
|
+
}>;
|
|
841
|
+
declare enum CredentialOrigin_Tags {
|
|
842
|
+
Embedded = "Embedded",
|
|
843
|
+
RecoveredByFingerprint = "RecoveredByFingerprint",
|
|
844
|
+
RecoveredByWatermark = "RecoveredByWatermark",
|
|
845
|
+
RecoveredByContent = "RecoveredByContent"
|
|
846
|
+
}
|
|
847
|
+
/**
|
|
848
|
+
* FFI projection of the domain origin. The soft-binding DTO remains public and wire-shaped,
|
|
849
|
+
* while the domain value keeps its constructor invariant private.
|
|
850
|
+
*/
|
|
851
|
+
declare const CredentialOrigin: Readonly<{
|
|
852
|
+
instanceOf: (obj: any) => obj is CredentialOrigin;
|
|
853
|
+
Embedded: {
|
|
854
|
+
new (): {
|
|
855
|
+
/**
|
|
856
|
+
* @private
|
|
857
|
+
* This field is private and should not be used, use `tag` instead.
|
|
858
|
+
*/
|
|
859
|
+
readonly [uniffiTypeNameSymbol]: "CredentialOrigin";
|
|
860
|
+
readonly tag: CredentialOrigin_Tags.Embedded;
|
|
861
|
+
};
|
|
862
|
+
"new"(): {
|
|
863
|
+
/**
|
|
864
|
+
* @private
|
|
865
|
+
* This field is private and should not be used, use `tag` instead.
|
|
866
|
+
*/
|
|
867
|
+
readonly [uniffiTypeNameSymbol]: "CredentialOrigin";
|
|
868
|
+
readonly tag: CredentialOrigin_Tags.Embedded;
|
|
869
|
+
};
|
|
870
|
+
instanceOf(obj: any): obj is {
|
|
871
|
+
/**
|
|
872
|
+
* @private
|
|
873
|
+
* This field is private and should not be used, use `tag` instead.
|
|
874
|
+
*/
|
|
875
|
+
readonly [uniffiTypeNameSymbol]: "CredentialOrigin";
|
|
876
|
+
readonly tag: CredentialOrigin_Tags.Embedded;
|
|
877
|
+
};
|
|
878
|
+
};
|
|
879
|
+
RecoveredByFingerprint: {
|
|
880
|
+
new (inner: {
|
|
881
|
+
binding: SoftBinding;
|
|
882
|
+
registryScore?: SimilarityScore;
|
|
883
|
+
}): {
|
|
884
|
+
/**
|
|
885
|
+
* @private
|
|
886
|
+
* This field is private and should not be used, use `tag` instead.
|
|
887
|
+
*/
|
|
888
|
+
readonly [uniffiTypeNameSymbol]: "CredentialOrigin";
|
|
889
|
+
readonly tag: CredentialOrigin_Tags.RecoveredByFingerprint;
|
|
890
|
+
readonly inner: Readonly<{
|
|
891
|
+
binding: SoftBinding;
|
|
892
|
+
registryScore?: SimilarityScore;
|
|
893
|
+
}>;
|
|
894
|
+
};
|
|
895
|
+
"new"(inner: {
|
|
896
|
+
binding: SoftBinding;
|
|
897
|
+
registryScore?: SimilarityScore;
|
|
898
|
+
}): {
|
|
899
|
+
/**
|
|
900
|
+
* @private
|
|
901
|
+
* This field is private and should not be used, use `tag` instead.
|
|
902
|
+
*/
|
|
903
|
+
readonly [uniffiTypeNameSymbol]: "CredentialOrigin";
|
|
904
|
+
readonly tag: CredentialOrigin_Tags.RecoveredByFingerprint;
|
|
905
|
+
readonly inner: Readonly<{
|
|
906
|
+
binding: SoftBinding;
|
|
907
|
+
registryScore?: SimilarityScore;
|
|
908
|
+
}>;
|
|
909
|
+
};
|
|
910
|
+
instanceOf(obj: any): obj is {
|
|
911
|
+
/**
|
|
912
|
+
* @private
|
|
913
|
+
* This field is private and should not be used, use `tag` instead.
|
|
914
|
+
*/
|
|
915
|
+
readonly [uniffiTypeNameSymbol]: "CredentialOrigin";
|
|
916
|
+
readonly tag: CredentialOrigin_Tags.RecoveredByFingerprint;
|
|
917
|
+
readonly inner: Readonly<{
|
|
918
|
+
binding: SoftBinding;
|
|
919
|
+
registryScore?: SimilarityScore;
|
|
920
|
+
}>;
|
|
921
|
+
};
|
|
922
|
+
};
|
|
923
|
+
RecoveredByWatermark: {
|
|
924
|
+
new (inner: {
|
|
925
|
+
binding: SoftBinding;
|
|
926
|
+
registryScore?: SimilarityScore;
|
|
927
|
+
}): {
|
|
928
|
+
/**
|
|
929
|
+
* @private
|
|
930
|
+
* This field is private and should not be used, use `tag` instead.
|
|
931
|
+
*/
|
|
932
|
+
readonly [uniffiTypeNameSymbol]: "CredentialOrigin";
|
|
933
|
+
readonly tag: CredentialOrigin_Tags.RecoveredByWatermark;
|
|
934
|
+
readonly inner: Readonly<{
|
|
935
|
+
binding: SoftBinding;
|
|
936
|
+
registryScore?: SimilarityScore;
|
|
937
|
+
}>;
|
|
938
|
+
};
|
|
939
|
+
"new"(inner: {
|
|
940
|
+
binding: SoftBinding;
|
|
941
|
+
registryScore?: SimilarityScore;
|
|
942
|
+
}): {
|
|
943
|
+
/**
|
|
944
|
+
* @private
|
|
945
|
+
* This field is private and should not be used, use `tag` instead.
|
|
946
|
+
*/
|
|
947
|
+
readonly [uniffiTypeNameSymbol]: "CredentialOrigin";
|
|
948
|
+
readonly tag: CredentialOrigin_Tags.RecoveredByWatermark;
|
|
949
|
+
readonly inner: Readonly<{
|
|
950
|
+
binding: SoftBinding;
|
|
951
|
+
registryScore?: SimilarityScore;
|
|
952
|
+
}>;
|
|
953
|
+
};
|
|
954
|
+
instanceOf(obj: any): obj is {
|
|
955
|
+
/**
|
|
956
|
+
* @private
|
|
957
|
+
* This field is private and should not be used, use `tag` instead.
|
|
958
|
+
*/
|
|
959
|
+
readonly [uniffiTypeNameSymbol]: "CredentialOrigin";
|
|
960
|
+
readonly tag: CredentialOrigin_Tags.RecoveredByWatermark;
|
|
961
|
+
readonly inner: Readonly<{
|
|
962
|
+
binding: SoftBinding;
|
|
963
|
+
registryScore?: SimilarityScore;
|
|
964
|
+
}>;
|
|
965
|
+
};
|
|
966
|
+
};
|
|
967
|
+
RecoveredByContent: {
|
|
968
|
+
new (inner: {
|
|
969
|
+
discoveries: Array<ContentBindingEvidence>;
|
|
970
|
+
}): {
|
|
971
|
+
/**
|
|
972
|
+
* @private
|
|
973
|
+
* This field is private and should not be used, use `tag` instead.
|
|
974
|
+
*/
|
|
975
|
+
readonly [uniffiTypeNameSymbol]: "CredentialOrigin";
|
|
976
|
+
readonly tag: CredentialOrigin_Tags.RecoveredByContent;
|
|
977
|
+
readonly inner: Readonly<{
|
|
978
|
+
discoveries: Array<ContentBindingEvidence>;
|
|
979
|
+
}>;
|
|
980
|
+
};
|
|
981
|
+
"new"(inner: {
|
|
982
|
+
discoveries: Array<ContentBindingEvidence>;
|
|
983
|
+
}): {
|
|
984
|
+
/**
|
|
985
|
+
* @private
|
|
986
|
+
* This field is private and should not be used, use `tag` instead.
|
|
987
|
+
*/
|
|
988
|
+
readonly [uniffiTypeNameSymbol]: "CredentialOrigin";
|
|
989
|
+
readonly tag: CredentialOrigin_Tags.RecoveredByContent;
|
|
990
|
+
readonly inner: Readonly<{
|
|
991
|
+
discoveries: Array<ContentBindingEvidence>;
|
|
992
|
+
}>;
|
|
993
|
+
};
|
|
994
|
+
instanceOf(obj: any): obj is {
|
|
995
|
+
/**
|
|
996
|
+
* @private
|
|
997
|
+
* This field is private and should not be used, use `tag` instead.
|
|
998
|
+
*/
|
|
999
|
+
readonly [uniffiTypeNameSymbol]: "CredentialOrigin";
|
|
1000
|
+
readonly tag: CredentialOrigin_Tags.RecoveredByContent;
|
|
1001
|
+
readonly inner: Readonly<{
|
|
1002
|
+
discoveries: Array<ContentBindingEvidence>;
|
|
1003
|
+
}>;
|
|
1004
|
+
};
|
|
1005
|
+
};
|
|
1006
|
+
}>;
|
|
1007
|
+
/**
|
|
1008
|
+
* FFI projection of the domain origin. The soft-binding DTO remains public and wire-shaped,
|
|
1009
|
+
* while the domain value keeps its constructor invariant private.
|
|
1010
|
+
*/
|
|
1011
|
+
type CredentialOrigin = InstanceType<typeof CredentialOrigin['Embedded' | 'RecoveredByFingerprint' | 'RecoveredByWatermark' | 'RecoveredByContent']>;
|
|
1012
|
+
/**
|
|
1013
|
+
* Assertions in C2PA can be stored in several formats
|
|
1014
|
+
*/
|
|
1015
|
+
declare enum ManifestAssertionKind {
|
|
1016
|
+
Cbor = 0,
|
|
1017
|
+
Json = 1,
|
|
1018
|
+
Binary = 2,
|
|
1019
|
+
Uri = 3
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* A labeled container for an Assertion value in a Manifest
|
|
1023
|
+
*/
|
|
1024
|
+
type ManifestAssertion = {
|
|
1025
|
+
/**
|
|
1026
|
+
* True if this assertion is attributed to the signer
|
|
1027
|
+
* This maps to a created vs a gathered assertion. (defaults to false)
|
|
1028
|
+
*/
|
|
1029
|
+
created?: boolean;
|
|
1030
|
+
/**
|
|
1031
|
+
* The data of the assertion as Value
|
|
1032
|
+
*/
|
|
1033
|
+
data: Value;
|
|
1034
|
+
/**
|
|
1035
|
+
* There can be more than one assertion for any label
|
|
1036
|
+
*/
|
|
1037
|
+
instance?: number;
|
|
1038
|
+
/**
|
|
1039
|
+
* The [ManifestAssertionKind] for this assertion (as stored in c2pa content)
|
|
1040
|
+
*/
|
|
1041
|
+
kind?: ManifestAssertionKind;
|
|
1042
|
+
/**
|
|
1043
|
+
* An assertion label in reverse domain format
|
|
1044
|
+
*/
|
|
1045
|
+
label: string;
|
|
1046
|
+
};
|
|
1047
|
+
/**
|
|
1048
|
+
* Generated factory for {@link ManifestAssertion} record objects.
|
|
1049
|
+
*/
|
|
1050
|
+
declare const ManifestAssertion: Readonly<{
|
|
1051
|
+
create: (partial: Partial<ManifestAssertion> & Required<Omit<ManifestAssertion, "created" | "instance" | "kind">>) => ManifestAssertion;
|
|
1052
|
+
new: (partial: Partial<ManifestAssertion> & Required<Omit<ManifestAssertion, "created" | "instance" | "kind">>) => ManifestAssertion;
|
|
1053
|
+
defaults: () => Partial<ManifestAssertion>;
|
|
1054
|
+
}>;
|
|
1055
|
+
/**
|
|
1056
|
+
* A reference to a resource to be used in JSON serialization.
|
|
1057
|
+
*
|
|
1058
|
+
* The underlying data can be read as a stream via [`Reader::resource_to_stream`][crate::Reader::resource_to_stream].
|
|
1059
|
+
*/
|
|
1060
|
+
type ResourceRef = {
|
|
1061
|
+
/**
|
|
1062
|
+
* The algorithm used to hash the resource (if applicable).
|
|
1063
|
+
*/
|
|
1064
|
+
alg?: string;
|
|
1065
|
+
/**
|
|
1066
|
+
* More detailed data types as defined in the C2PA spec.
|
|
1067
|
+
*/
|
|
1068
|
+
dataTypes?: Array<AssetType>;
|
|
1069
|
+
/**
|
|
1070
|
+
* The mime type of the referenced resource.
|
|
1071
|
+
*/
|
|
1072
|
+
format: string;
|
|
1073
|
+
/**
|
|
1074
|
+
* The hash of the resource (if applicable).
|
|
1075
|
+
*/
|
|
1076
|
+
hash?: string;
|
|
1077
|
+
/**
|
|
1078
|
+
* A URI that identifies the resource as referenced from the manifest.
|
|
1079
|
+
*
|
|
1080
|
+
* This may be a JUMBF URI, a file path, a URL or any other string.
|
|
1081
|
+
* Relative JUMBF URIs will be resolved with the manifest label.
|
|
1082
|
+
* Relative file paths will be resolved with the base path if provided.
|
|
1083
|
+
*/
|
|
1084
|
+
identifier: string;
|
|
1085
|
+
};
|
|
1086
|
+
/**
|
|
1087
|
+
* Generated factory for {@link ResourceRef} record objects.
|
|
1088
|
+
*/
|
|
1089
|
+
declare const ResourceRef: Readonly<{
|
|
1090
|
+
create: (partial: Partial<ResourceRef> & Required<Omit<ResourceRef, "alg" | "dataTypes" | "hash">>) => ResourceRef;
|
|
1091
|
+
new: (partial: Partial<ResourceRef> & Required<Omit<ResourceRef, "alg" | "dataTypes" | "hash">>) => ResourceRef;
|
|
1092
|
+
defaults: () => Partial<ResourceRef>;
|
|
1093
|
+
}>;
|
|
1094
|
+
declare enum UriOrResource_Tags {
|
|
1095
|
+
ResourceRef = "ResourceRef",
|
|
1096
|
+
HashedUri = "HashedUri"
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* `UriOrResource`
|
|
1100
|
+
*/
|
|
1101
|
+
declare const UriOrResource: Readonly<{
|
|
1102
|
+
instanceOf: (obj: any) => obj is UriOrResource;
|
|
1103
|
+
ResourceRef: {
|
|
1104
|
+
new (v0: ResourceRef): {
|
|
1105
|
+
/**
|
|
1106
|
+
* @private
|
|
1107
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1108
|
+
*/
|
|
1109
|
+
readonly [uniffiTypeNameSymbol]: "UriOrResource";
|
|
1110
|
+
readonly tag: UriOrResource_Tags.ResourceRef;
|
|
1111
|
+
readonly inner: Readonly<[ResourceRef]>;
|
|
1112
|
+
};
|
|
1113
|
+
"new"(v0: ResourceRef): {
|
|
1114
|
+
/**
|
|
1115
|
+
* @private
|
|
1116
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1117
|
+
*/
|
|
1118
|
+
readonly [uniffiTypeNameSymbol]: "UriOrResource";
|
|
1119
|
+
readonly tag: UriOrResource_Tags.ResourceRef;
|
|
1120
|
+
readonly inner: Readonly<[ResourceRef]>;
|
|
1121
|
+
};
|
|
1122
|
+
instanceOf(obj: any): obj is {
|
|
1123
|
+
/**
|
|
1124
|
+
* @private
|
|
1125
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1126
|
+
*/
|
|
1127
|
+
readonly [uniffiTypeNameSymbol]: "UriOrResource";
|
|
1128
|
+
readonly tag: UriOrResource_Tags.ResourceRef;
|
|
1129
|
+
readonly inner: Readonly<[ResourceRef]>;
|
|
1130
|
+
};
|
|
1131
|
+
};
|
|
1132
|
+
HashedUri: {
|
|
1133
|
+
new (v0: HashedUri): {
|
|
1134
|
+
/**
|
|
1135
|
+
* @private
|
|
1136
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1137
|
+
*/
|
|
1138
|
+
readonly [uniffiTypeNameSymbol]: "UriOrResource";
|
|
1139
|
+
readonly tag: UriOrResource_Tags.HashedUri;
|
|
1140
|
+
readonly inner: Readonly<[HashedUri]>;
|
|
1141
|
+
};
|
|
1142
|
+
"new"(v0: HashedUri): {
|
|
1143
|
+
/**
|
|
1144
|
+
* @private
|
|
1145
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1146
|
+
*/
|
|
1147
|
+
readonly [uniffiTypeNameSymbol]: "UriOrResource";
|
|
1148
|
+
readonly tag: UriOrResource_Tags.HashedUri;
|
|
1149
|
+
readonly inner: Readonly<[HashedUri]>;
|
|
1150
|
+
};
|
|
1151
|
+
instanceOf(obj: any): obj is {
|
|
1152
|
+
/**
|
|
1153
|
+
* @private
|
|
1154
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1155
|
+
*/
|
|
1156
|
+
readonly [uniffiTypeNameSymbol]: "UriOrResource";
|
|
1157
|
+
readonly tag: UriOrResource_Tags.HashedUri;
|
|
1158
|
+
readonly inner: Readonly<[HashedUri]>;
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
1161
|
+
}>;
|
|
1162
|
+
/**
|
|
1163
|
+
* `UriOrResource`
|
|
1164
|
+
*/
|
|
1165
|
+
type UriOrResource = InstanceType<typeof UriOrResource['ResourceRef' | 'HashedUri']>;
|
|
1166
|
+
/**
|
|
1167
|
+
* Description of the claim generator, or the software used in generating the claim.
|
|
1168
|
+
*
|
|
1169
|
+
* This structure is also used for actions softwareAgent
|
|
1170
|
+
*/
|
|
1171
|
+
type ClaimGeneratorInfo = {
|
|
1172
|
+
/**
|
|
1173
|
+
* hashed URI to the icon (either embedded or remote)
|
|
1174
|
+
*/
|
|
1175
|
+
icon?: UriOrResource;
|
|
1176
|
+
/**
|
|
1177
|
+
* A human readable string naming the claim_generator
|
|
1178
|
+
*/
|
|
1179
|
+
name: string;
|
|
1180
|
+
/**
|
|
1181
|
+
* A human readable string of the OS the claim generator is running on.
|
|
1182
|
+
* CrJSON schema uses `operating_system`; C2PA CBOR may use `schema.org.SoftwareApplication.operatingSystem`.
|
|
1183
|
+
*/
|
|
1184
|
+
operatingSystem?: string;
|
|
1185
|
+
/**
|
|
1186
|
+
* The version of the specification used to produce this manifest (SemVer)
|
|
1187
|
+
*/
|
|
1188
|
+
specVersion?: string;
|
|
1189
|
+
/**
|
|
1190
|
+
* A human readable string of the product's version
|
|
1191
|
+
*/
|
|
1192
|
+
version?: string;
|
|
1193
|
+
};
|
|
1194
|
+
/**
|
|
1195
|
+
* Generated factory for {@link ClaimGeneratorInfo} record objects.
|
|
1196
|
+
*/
|
|
1197
|
+
declare const ClaimGeneratorInfo: Readonly<{
|
|
1198
|
+
create: (partial: Partial<ClaimGeneratorInfo> & Required<Omit<ClaimGeneratorInfo, "icon" | "operatingSystem" | "specVersion" | "version">>) => ClaimGeneratorInfo;
|
|
1199
|
+
new: (partial: Partial<ClaimGeneratorInfo> & Required<Omit<ClaimGeneratorInfo, "icon" | "operatingSystem" | "specVersion" | "version">>) => ClaimGeneratorInfo;
|
|
1200
|
+
defaults: () => Partial<ClaimGeneratorInfo>;
|
|
1201
|
+
}>;
|
|
1202
|
+
/**
|
|
1203
|
+
* The relationship of the ingredient to the current asset.
|
|
1204
|
+
*/
|
|
1205
|
+
declare enum Relationship {
|
|
1206
|
+
/**
|
|
1207
|
+
* The current asset is derived from this ingredient.
|
|
1208
|
+
*/
|
|
1209
|
+
ParentOf = 0,
|
|
1210
|
+
/**
|
|
1211
|
+
* The current asset is a part of this ingredient.
|
|
1212
|
+
*/
|
|
1213
|
+
ComponentOf = 1,
|
|
1214
|
+
/**
|
|
1215
|
+
* The ingredient was used as an input to a computational process to create or modify the asset.
|
|
1216
|
+
*/
|
|
1217
|
+
InputTo = 2
|
|
1218
|
+
}
|
|
1219
|
+
/**
|
|
1220
|
+
* A `ValidationStatus` struct describes the validation status of a
|
|
1221
|
+
* specific part of a manifest.
|
|
1222
|
+
*
|
|
1223
|
+
* See [Existing Manifests - C2PA Technical Specification](https://spec.c2pa.org/specifications/specifications/2.3/specs/C2PA_Specification.html#_existing_manifests).
|
|
1224
|
+
*/
|
|
1225
|
+
type ValidationStatus = {
|
|
1226
|
+
code: string;
|
|
1227
|
+
explanation?: string;
|
|
1228
|
+
url?: string;
|
|
1229
|
+
};
|
|
1230
|
+
/**
|
|
1231
|
+
* Generated factory for {@link ValidationStatus} record objects.
|
|
1232
|
+
*/
|
|
1233
|
+
declare const ValidationStatus: Readonly<{
|
|
1234
|
+
create: (partial: Partial<ValidationStatus> & Required<Omit<ValidationStatus, "explanation" | "url">>) => ValidationStatus;
|
|
1235
|
+
new: (partial: Partial<ValidationStatus> & Required<Omit<ValidationStatus, "explanation" | "url">>) => ValidationStatus;
|
|
1236
|
+
defaults: () => Partial<ValidationStatus>;
|
|
1237
|
+
}>;
|
|
1238
|
+
/**
|
|
1239
|
+
* Contains a set of success, informational, and failure validation status codes.
|
|
1240
|
+
*/
|
|
1241
|
+
type StatusCodes = {
|
|
1242
|
+
/**
|
|
1243
|
+
* An array of validation failure codes. May be empty.
|
|
1244
|
+
*/
|
|
1245
|
+
failure: Array<ValidationStatus>;
|
|
1246
|
+
/**
|
|
1247
|
+
* An array of validation informational codes. May be empty.
|
|
1248
|
+
*/
|
|
1249
|
+
informational: Array<ValidationStatus>;
|
|
1250
|
+
/**
|
|
1251
|
+
* An array of validation success codes. May be empty.
|
|
1252
|
+
*/
|
|
1253
|
+
success: Array<ValidationStatus>;
|
|
1254
|
+
};
|
|
1255
|
+
/**
|
|
1256
|
+
* Generated factory for {@link StatusCodes} record objects.
|
|
1257
|
+
*/
|
|
1258
|
+
declare const StatusCodes: Readonly<{
|
|
1259
|
+
create: (partial: Partial<StatusCodes> & Required<Omit<StatusCodes, never>>) => StatusCodes;
|
|
1260
|
+
new: (partial: Partial<StatusCodes> & Required<Omit<StatusCodes, never>>) => StatusCodes;
|
|
1261
|
+
defaults: () => Partial<StatusCodes>;
|
|
1262
|
+
}>;
|
|
1263
|
+
/**
|
|
1264
|
+
* Represents any changes or deltas between the current and previous validation results for an ingredient's manifest.
|
|
1265
|
+
*/
|
|
1266
|
+
type IngredientDeltaValidationResult = {
|
|
1267
|
+
/**
|
|
1268
|
+
* JUMBF URI reference to the ingredient assertion
|
|
1269
|
+
*/
|
|
1270
|
+
ingredientAssertionUri: string;
|
|
1271
|
+
/**
|
|
1272
|
+
* Validation results for the ingredient's active manifest
|
|
1273
|
+
*/
|
|
1274
|
+
validationDeltas: StatusCodes;
|
|
1275
|
+
};
|
|
1276
|
+
/**
|
|
1277
|
+
* Generated factory for {@link IngredientDeltaValidationResult} record objects.
|
|
1278
|
+
*/
|
|
1279
|
+
declare const IngredientDeltaValidationResult: Readonly<{
|
|
1280
|
+
create: (partial: Partial<IngredientDeltaValidationResult> & Required<Omit<IngredientDeltaValidationResult, never>>) => IngredientDeltaValidationResult;
|
|
1281
|
+
new: (partial: Partial<IngredientDeltaValidationResult> & Required<Omit<IngredientDeltaValidationResult, never>>) => IngredientDeltaValidationResult;
|
|
1282
|
+
defaults: () => Partial<IngredientDeltaValidationResult>;
|
|
1283
|
+
}>;
|
|
1284
|
+
/**
|
|
1285
|
+
* A map of validation results for a manifest store.
|
|
1286
|
+
*
|
|
1287
|
+
* The map contains the validation results for the active manifest and any ingredient deltas.
|
|
1288
|
+
* It is normal for there to be many
|
|
1289
|
+
*/
|
|
1290
|
+
type ValidationResults = {
|
|
1291
|
+
/**
|
|
1292
|
+
* Validation status codes for the ingredient's active manifest. Present if ingredient is a C2PA
|
|
1293
|
+
* asset. Not present if the ingredient is not a C2PA asset.
|
|
1294
|
+
*/
|
|
1295
|
+
activeManifest?: StatusCodes;
|
|
1296
|
+
/**
|
|
1297
|
+
* List of any changes/deltas between the current and previous validation results for each ingredient's
|
|
1298
|
+
* manifest. Present if the the ingredient is a C2PA asset.
|
|
1299
|
+
*/
|
|
1300
|
+
ingredientDeltas?: Array<IngredientDeltaValidationResult>;
|
|
1301
|
+
/**
|
|
1302
|
+
* The version of the specification against which the validation was performed (SemVer formatted string).
|
|
1303
|
+
*/
|
|
1304
|
+
specVersion?: string;
|
|
1305
|
+
/**
|
|
1306
|
+
* URI to the trust list that was used to validate manifests signing certificate.
|
|
1307
|
+
*/
|
|
1308
|
+
trustListUri?: string;
|
|
1309
|
+
};
|
|
1310
|
+
/**
|
|
1311
|
+
* Generated factory for {@link ValidationResults} record objects.
|
|
1312
|
+
*/
|
|
1313
|
+
declare const ValidationResults: Readonly<{
|
|
1314
|
+
create: (partial: Partial<ValidationResults> & Required<Omit<ValidationResults, "activeManifest" | "ingredientDeltas" | "specVersion" | "trustListUri">>) => ValidationResults;
|
|
1315
|
+
new: (partial: Partial<ValidationResults> & Required<Omit<ValidationResults, "activeManifest" | "ingredientDeltas" | "specVersion" | "trustListUri">>) => ValidationResults;
|
|
1316
|
+
defaults: () => Partial<ValidationResults>;
|
|
1317
|
+
}>;
|
|
1318
|
+
/**
|
|
1319
|
+
* An `Ingredient` is any external asset that has been used in the creation of an asset.
|
|
1320
|
+
*/
|
|
1321
|
+
type Ingredient = {
|
|
1322
|
+
/**
|
|
1323
|
+
* The active manifest label (if one exists).
|
|
1324
|
+
*
|
|
1325
|
+
* If this ingredient has a [`ManifestStore`],
|
|
1326
|
+
* this will hold the label of the active [`Manifest`].
|
|
1327
|
+
*
|
|
1328
|
+
* [`Manifest`]: crate::Manifest
|
|
1329
|
+
* [`ManifestStore`]: crate::ManifestStore
|
|
1330
|
+
*/
|
|
1331
|
+
activeManifest?: string;
|
|
1332
|
+
/**
|
|
1333
|
+
* A reference to the actual data of the ingredient.
|
|
1334
|
+
*/
|
|
1335
|
+
data?: ResourceRef;
|
|
1336
|
+
/**
|
|
1337
|
+
* Additional information about the data's type to the ingredient V2 structure.
|
|
1338
|
+
*/
|
|
1339
|
+
dataTypes?: Array<AssetType>;
|
|
1340
|
+
/**
|
|
1341
|
+
* Additional description of the ingredient.
|
|
1342
|
+
*/
|
|
1343
|
+
description?: string;
|
|
1344
|
+
/**
|
|
1345
|
+
* One of the source types defined at <https://cv.iptc.org/newscodes/digitalsourcetype/>
|
|
1346
|
+
* or in this specification. Cannot be combined with `activeManifest`.
|
|
1347
|
+
*/
|
|
1348
|
+
digitalSourceType?: string;
|
|
1349
|
+
/**
|
|
1350
|
+
* Document ID from `xmpMM:DocumentID` in XMP metadata.
|
|
1351
|
+
*/
|
|
1352
|
+
documentId?: string;
|
|
1353
|
+
/**
|
|
1354
|
+
* The format of the source file as a MIME type.
|
|
1355
|
+
*/
|
|
1356
|
+
format?: string;
|
|
1357
|
+
/**
|
|
1358
|
+
* An optional hash of the asset to prevent duplicates.
|
|
1359
|
+
*/
|
|
1360
|
+
hash?: string;
|
|
1361
|
+
/**
|
|
1362
|
+
* URI to an informational page about the ingredient or its data.
|
|
1363
|
+
*/
|
|
1364
|
+
informationalUri?: string;
|
|
1365
|
+
/**
|
|
1366
|
+
* Instance ID from `xmpMM:InstanceID` in XMP metadata.
|
|
1367
|
+
*/
|
|
1368
|
+
instanceId?: string;
|
|
1369
|
+
/**
|
|
1370
|
+
* The ingredient's label as assigned in the manifest.
|
|
1371
|
+
*/
|
|
1372
|
+
label?: string;
|
|
1373
|
+
/**
|
|
1374
|
+
* A [`ManifestStore`] from the source asset extracted as a binary C2PA blob.
|
|
1375
|
+
*
|
|
1376
|
+
* [`ManifestStore`]: crate::ManifestStore
|
|
1377
|
+
*/
|
|
1378
|
+
manifestData?: ResourceRef;
|
|
1379
|
+
/**
|
|
1380
|
+
* Any additional [`Metadata`] as defined in the C2PA spec.
|
|
1381
|
+
*
|
|
1382
|
+
* [`Metadata`]: crate::Metadata
|
|
1383
|
+
*/
|
|
1384
|
+
metadata?: AssertionMetadata;
|
|
1385
|
+
ocspResponses?: Array<ResourceRef>;
|
|
1386
|
+
/**
|
|
1387
|
+
* URI from `dcterms:provenance` in XMP metadata.
|
|
1388
|
+
*/
|
|
1389
|
+
provenance?: string;
|
|
1390
|
+
/**
|
|
1391
|
+
* Set to `ParentOf` if this is the parent ingredient.
|
|
1392
|
+
*
|
|
1393
|
+
* There can only be one parent ingredient in the ingredients.
|
|
1394
|
+
*/
|
|
1395
|
+
relationship: Relationship;
|
|
1396
|
+
/**
|
|
1397
|
+
* Soft binding algorithms that discovered this ingredient's active manifest, when it was
|
|
1398
|
+
* found by a soft binding lookup rather than read out of the asset.
|
|
1399
|
+
*
|
|
1400
|
+
* Drives `softBindingAlgorithmsMatched` and the `softBindingsMatched` that C2PA requires
|
|
1401
|
+
* beside it (C2PA 2.4 §18.16.14), which is derived rather than carried: the spec needs at least one algorithm
|
|
1402
|
+
* whenever the flag is true, so a list and a flag that could disagree is not worth modelling.
|
|
1403
|
+
*/
|
|
1404
|
+
softBindingAlgorithmsMatched?: Array<string>;
|
|
1405
|
+
/**
|
|
1406
|
+
* A thumbnail image capturing the visual state at the time of import.
|
|
1407
|
+
*
|
|
1408
|
+
* A tuple of thumbnail MIME format (for example `image/jpeg`) and binary bits of the image.
|
|
1409
|
+
*/
|
|
1410
|
+
thumbnail?: ResourceRef;
|
|
1411
|
+
/**
|
|
1412
|
+
* A human-readable title, generally source filename.
|
|
1413
|
+
*/
|
|
1414
|
+
title?: string;
|
|
1415
|
+
/**
|
|
1416
|
+
* Validation results (Ingredient.V3)
|
|
1417
|
+
*/
|
|
1418
|
+
validationResults?: ValidationResults;
|
|
1419
|
+
/**
|
|
1420
|
+
* Validation status (Ingredient v1 & v2)
|
|
1421
|
+
*/
|
|
1422
|
+
validationStatus?: Array<ValidationStatus>;
|
|
1423
|
+
};
|
|
1424
|
+
/**
|
|
1425
|
+
* Generated factory for {@link Ingredient} record objects.
|
|
1426
|
+
*/
|
|
1427
|
+
declare const Ingredient: Readonly<{
|
|
1428
|
+
create: (partial: Partial<Ingredient> & Required<Omit<Ingredient, "activeManifest" | "data" | "dataTypes" | "description" | "digitalSourceType" | "documentId" | "format" | "hash" | "informationalUri" | "instanceId" | "label" | "manifestData" | "metadata" | "ocspResponses" | "provenance" | "softBindingAlgorithmsMatched" | "thumbnail" | "title" | "validationResults" | "validationStatus">>) => Ingredient;
|
|
1429
|
+
new: (partial: Partial<Ingredient> & Required<Omit<Ingredient, "activeManifest" | "data" | "dataTypes" | "description" | "digitalSourceType" | "documentId" | "format" | "hash" | "informationalUri" | "instanceId" | "label" | "manifestData" | "metadata" | "ocspResponses" | "provenance" | "softBindingAlgorithmsMatched" | "thumbnail" | "title" | "validationResults" | "validationStatus">>) => Ingredient;
|
|
1430
|
+
defaults: () => Partial<Ingredient>;
|
|
1431
|
+
}>;
|
|
1432
|
+
/**
|
|
1433
|
+
* JSON Schema proxy for [`SigningAlg`].
|
|
1434
|
+
*
|
|
1435
|
+
* `c2pa_raw_crypto::SigningAlg` intentionally does not depend on `schemars`,
|
|
1436
|
+
* so it does not implement [`schemars::JsonSchema`]. SDK types that expose a
|
|
1437
|
+
* `SigningAlg` in their JSON schema reference this mirror (whose variants match
|
|
1438
|
+
* `SigningAlg`'s serialized form) via `#[schemars(with = "...")]`.
|
|
1439
|
+
*/
|
|
1440
|
+
declare enum SigningAlgSchema {
|
|
1441
|
+
Es256 = 0,
|
|
1442
|
+
Es384 = 1,
|
|
1443
|
+
Es512 = 2,
|
|
1444
|
+
Ps256 = 3,
|
|
1445
|
+
Ps384 = 4,
|
|
1446
|
+
Ps512 = 5,
|
|
1447
|
+
Ed25519 = 6
|
|
1448
|
+
}
|
|
1449
|
+
/**
|
|
1450
|
+
* Holds information about a signature
|
|
1451
|
+
*/
|
|
1452
|
+
type SignatureInfo = {
|
|
1453
|
+
/**
|
|
1454
|
+
* Human-readable issuing authority for this signature.
|
|
1455
|
+
*/
|
|
1456
|
+
alg?: SigningAlgSchema;
|
|
1457
|
+
/**
|
|
1458
|
+
* The serial number of the certificate.
|
|
1459
|
+
*/
|
|
1460
|
+
certSerialNumber?: string;
|
|
1461
|
+
/**
|
|
1462
|
+
* Human-readable for common name of this certificate.
|
|
1463
|
+
*/
|
|
1464
|
+
commonName?: string;
|
|
1465
|
+
/**
|
|
1466
|
+
* Human-readable issuing authority for this signature.
|
|
1467
|
+
*/
|
|
1468
|
+
issuer?: string;
|
|
1469
|
+
/**
|
|
1470
|
+
* Revocation status of the certificate.
|
|
1471
|
+
*/
|
|
1472
|
+
revocationStatus?: boolean;
|
|
1473
|
+
/**
|
|
1474
|
+
* The time the signature was created.
|
|
1475
|
+
*/
|
|
1476
|
+
time?: string;
|
|
1477
|
+
};
|
|
1478
|
+
/**
|
|
1479
|
+
* Generated factory for {@link SignatureInfo} record objects.
|
|
1480
|
+
*/
|
|
1481
|
+
declare const SignatureInfo: Readonly<{
|
|
1482
|
+
create: (partial: Partial<SignatureInfo> & Required<Omit<SignatureInfo, "alg" | "certSerialNumber" | "commonName" | "issuer" | "revocationStatus" | "time">>) => SignatureInfo;
|
|
1483
|
+
new: (partial: Partial<SignatureInfo> & Required<Omit<SignatureInfo, "alg" | "certSerialNumber" | "commonName" | "issuer" | "revocationStatus" | "time">>) => SignatureInfo;
|
|
1484
|
+
defaults: () => Partial<SignatureInfo>;
|
|
1485
|
+
}>;
|
|
1486
|
+
/**
|
|
1487
|
+
* A Manifest represents all the information in a c2pa manifest
|
|
1488
|
+
*/
|
|
1489
|
+
type Manifest = {
|
|
1490
|
+
/**
|
|
1491
|
+
* A list of assertions
|
|
1492
|
+
*/
|
|
1493
|
+
assertions: Array<ManifestAssertion>;
|
|
1494
|
+
/**
|
|
1495
|
+
* A User Agent formatted string identifying the software/hardware/system produced this claim
|
|
1496
|
+
* Spaces are not allowed in names, versions can be specified with product/1.0 syntax.
|
|
1497
|
+
*/
|
|
1498
|
+
claimGenerator?: string;
|
|
1499
|
+
/**
|
|
1500
|
+
* A list of claim generator info data identifying the software/hardware/system produced this claim.
|
|
1501
|
+
*/
|
|
1502
|
+
claimGeneratorInfo?: Array<ClaimGeneratorInfo>;
|
|
1503
|
+
/**
|
|
1504
|
+
* The version of the claim, parsed from the claim label.
|
|
1505
|
+
*
|
|
1506
|
+
* For example:
|
|
1507
|
+
* - `c2pa.claim.v2` -> 2
|
|
1508
|
+
* - `c2pa.claim` -> 1
|
|
1509
|
+
*/
|
|
1510
|
+
claimVersion?: number;
|
|
1511
|
+
/**
|
|
1512
|
+
* A List of verified credentials
|
|
1513
|
+
*/
|
|
1514
|
+
credentials?: Array<Value>;
|
|
1515
|
+
/**
|
|
1516
|
+
* The format of the source file as a MIME type.
|
|
1517
|
+
*/
|
|
1518
|
+
format?: string;
|
|
1519
|
+
/**
|
|
1520
|
+
* A List of ingredients
|
|
1521
|
+
*/
|
|
1522
|
+
ingredients: Array<Ingredient>;
|
|
1523
|
+
/**
|
|
1524
|
+
* Instance ID from `xmpMM:InstanceID` in XMP metadata.
|
|
1525
|
+
*/
|
|
1526
|
+
instanceId: string;
|
|
1527
|
+
label?: string;
|
|
1528
|
+
/**
|
|
1529
|
+
* A list of user metadata for this claim.
|
|
1530
|
+
*/
|
|
1531
|
+
metadata?: Array<AssertionMetadata>;
|
|
1532
|
+
/**
|
|
1533
|
+
* JUMBF URIs of assertions that were redacted by this manifest.
|
|
1534
|
+
*
|
|
1535
|
+
* Each entry has the form
|
|
1536
|
+
* `self#jumbf=/c2pa/<manifest_label>/c2pa.assertions/<assertion_label>`
|
|
1537
|
+
* and corresponds to an assertion that was intentionally removed from an
|
|
1538
|
+
* ingredient manifest in the claim chain.
|
|
1539
|
+
*/
|
|
1540
|
+
redactions?: Array<string>;
|
|
1541
|
+
/**
|
|
1542
|
+
* Signature data (only used for reporting)
|
|
1543
|
+
*/
|
|
1544
|
+
signatureInfo?: SignatureInfo;
|
|
1545
|
+
thumbnail?: ResourceRef;
|
|
1546
|
+
/**
|
|
1547
|
+
* A human-readable title, generally source filename.
|
|
1548
|
+
*/
|
|
1549
|
+
title?: string;
|
|
1550
|
+
/**
|
|
1551
|
+
* Optional prefix added to the generated Manifest label.
|
|
1552
|
+
* This is typically an internet domain name for the vendor (i.e. `adobe`).
|
|
1553
|
+
*/
|
|
1554
|
+
vendor?: string;
|
|
1555
|
+
};
|
|
1556
|
+
/**
|
|
1557
|
+
* Generated factory for {@link Manifest} record objects.
|
|
1558
|
+
*/
|
|
1559
|
+
declare const Manifest: Readonly<{
|
|
1560
|
+
create: (partial: Partial<Manifest> & Required<Omit<Manifest, "claimGenerator" | "claimGeneratorInfo" | "claimVersion" | "credentials" | "format" | "label" | "metadata" | "redactions" | "signatureInfo" | "thumbnail" | "title" | "vendor">>) => Manifest;
|
|
1561
|
+
new: (partial: Partial<Manifest> & Required<Omit<Manifest, "claimGenerator" | "claimGeneratorInfo" | "claimVersion" | "credentials" | "format" | "label" | "metadata" | "redactions" | "signatureInfo" | "thumbnail" | "title" | "vendor">>) => Manifest;
|
|
1562
|
+
defaults: () => Partial<Manifest>;
|
|
1563
|
+
}>;
|
|
1564
|
+
/**
|
|
1565
|
+
* Represents the levels of assurance a manifest store achieves when evaluated against the C2PA
|
|
1566
|
+
* specifications structural, cryptographic, and trust requirements.
|
|
1567
|
+
*
|
|
1568
|
+
* See [Validation states - C2PA Technical Specification](https://spec.c2pa.org/specifications/specifications/2.3/specs/C2PA_Specification.html#_validation_states).
|
|
1569
|
+
*/
|
|
1570
|
+
declare enum ValidationState {
|
|
1571
|
+
/**
|
|
1572
|
+
* The manifest store fails to meet ValidationState::WellFormed requirements, meaning it cannot
|
|
1573
|
+
* even be parsed or its basic structure is non-compliant.
|
|
1574
|
+
*
|
|
1575
|
+
* This case may also occur if validation is disabled in the SDK.
|
|
1576
|
+
*/
|
|
1577
|
+
Invalid = 0,
|
|
1578
|
+
/**
|
|
1579
|
+
* The manifest store is well-formed and the cryptographic integrity checks succeed.
|
|
1580
|
+
*
|
|
1581
|
+
* See [Valid Manifest - C2PA Technical Specification](https://spec.c2pa.org/specifications/specifications/2.3/specs/C2PA_Specification.html#_valid_manifest).
|
|
1582
|
+
*/
|
|
1583
|
+
Valid = 1,
|
|
1584
|
+
/**
|
|
1585
|
+
* The manifest store is valid and signed by a certificate that chains up to a trusted root or known
|
|
1586
|
+
* authority in the trust list.
|
|
1587
|
+
*
|
|
1588
|
+
* See [Trusted Manifest - C2PA Technical Specification](https://spec.c2pa.org/specifications/specifications/2.3/specs/C2PA_Specification.html#_trusted_manifest).
|
|
1589
|
+
*/
|
|
1590
|
+
Trusted = 2
|
|
1591
|
+
}
|
|
1592
|
+
/**
|
|
1593
|
+
* Use a Reader to read and validate a manifest store.
|
|
1594
|
+
*/
|
|
1595
|
+
type ManifestStore = {
|
|
1596
|
+
/**
|
|
1597
|
+
* A label for the active (most recent) manifest in the store
|
|
1598
|
+
*/
|
|
1599
|
+
activeManifest?: string;
|
|
1600
|
+
/**
|
|
1601
|
+
* A HashMap of Manifests
|
|
1602
|
+
*/
|
|
1603
|
+
manifests: Map<string, Manifest>;
|
|
1604
|
+
/**
|
|
1605
|
+
* ValidationStatus generated when loading the ManifestStore from an asset
|
|
1606
|
+
*/
|
|
1607
|
+
validationResults?: ValidationResults;
|
|
1608
|
+
/**
|
|
1609
|
+
* The validation state of the manifest store
|
|
1610
|
+
*/
|
|
1611
|
+
validationState?: ValidationState;
|
|
1612
|
+
/**
|
|
1613
|
+
* ValidationStatus generated when loading the ManifestStore from an asset
|
|
1614
|
+
*/
|
|
1615
|
+
validationStatus?: Array<ValidationStatus>;
|
|
1616
|
+
};
|
|
1617
|
+
/**
|
|
1618
|
+
* Generated factory for {@link ManifestStore} record objects.
|
|
1619
|
+
*/
|
|
1620
|
+
declare const ManifestStore: Readonly<{
|
|
1621
|
+
create: (partial: Partial<ManifestStore> & Required<Omit<ManifestStore, "activeManifest" | "validationResults" | "validationState" | "validationStatus">>) => ManifestStore;
|
|
1622
|
+
new: (partial: Partial<ManifestStore> & Required<Omit<ManifestStore, "activeManifest" | "validationResults" | "validationState" | "validationStatus">>) => ManifestStore;
|
|
1623
|
+
defaults: () => Partial<ManifestStore>;
|
|
1624
|
+
}>;
|
|
1625
|
+
declare enum FingerprintCheck_Tags {
|
|
1626
|
+
NotNeeded = "NotNeeded",
|
|
1627
|
+
NothingToCompare = "NothingToCompare",
|
|
1628
|
+
Unsupported = "Unsupported",
|
|
1629
|
+
Indeterminate = "Indeterminate",
|
|
1630
|
+
Compared = "Compared"
|
|
1631
|
+
}
|
|
1632
|
+
/**
|
|
1633
|
+
* Whether the asset's own fingerprint backs up a manifest that a watermark led to.
|
|
1634
|
+
*
|
|
1635
|
+
* C2PA 2.4 1.2.2.3: a watermark can be lifted from one asset onto another, so a mark alone does
|
|
1636
|
+
* not establish that the manifest it resolves to describes THIS asset. The mitigation the spec
|
|
1637
|
+
* gives is to compare a fingerprint computed from the asset against the one the recovered
|
|
1638
|
+
* manifest records, and `watermark-and-fingerprint` ends on exactly that comparison.
|
|
1639
|
+
*
|
|
1640
|
+
* Reported rather than enforced: a transcode legitimately shifts a fingerprint, so where the line
|
|
1641
|
+
* falls is the relying party's policy, not this SDK's. What the SDK owes them is the measurement.
|
|
1642
|
+
*/
|
|
1643
|
+
declare const FingerprintCheck: Readonly<{
|
|
1644
|
+
instanceOf: (obj: any) => obj is FingerprintCheck;
|
|
1645
|
+
NotNeeded: {
|
|
1646
|
+
new (): {
|
|
1647
|
+
/**
|
|
1648
|
+
* @private
|
|
1649
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1650
|
+
*/
|
|
1651
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1652
|
+
readonly tag: FingerprintCheck_Tags.NotNeeded;
|
|
1653
|
+
};
|
|
1654
|
+
"new"(): {
|
|
1655
|
+
/**
|
|
1656
|
+
* @private
|
|
1657
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1658
|
+
*/
|
|
1659
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1660
|
+
readonly tag: FingerprintCheck_Tags.NotNeeded;
|
|
1661
|
+
};
|
|
1662
|
+
instanceOf(obj: any): obj is {
|
|
1663
|
+
/**
|
|
1664
|
+
* @private
|
|
1665
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1666
|
+
*/
|
|
1667
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1668
|
+
readonly tag: FingerprintCheck_Tags.NotNeeded;
|
|
1669
|
+
};
|
|
1670
|
+
};
|
|
1671
|
+
NothingToCompare: {
|
|
1672
|
+
new (): {
|
|
1673
|
+
/**
|
|
1674
|
+
* @private
|
|
1675
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1676
|
+
*/
|
|
1677
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1678
|
+
readonly tag: FingerprintCheck_Tags.NothingToCompare;
|
|
1679
|
+
};
|
|
1680
|
+
"new"(): {
|
|
1681
|
+
/**
|
|
1682
|
+
* @private
|
|
1683
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1684
|
+
*/
|
|
1685
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1686
|
+
readonly tag: FingerprintCheck_Tags.NothingToCompare;
|
|
1687
|
+
};
|
|
1688
|
+
instanceOf(obj: any): obj is {
|
|
1689
|
+
/**
|
|
1690
|
+
* @private
|
|
1691
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1692
|
+
*/
|
|
1693
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1694
|
+
readonly tag: FingerprintCheck_Tags.NothingToCompare;
|
|
1695
|
+
};
|
|
1696
|
+
};
|
|
1697
|
+
Unsupported: {
|
|
1698
|
+
new (inner: {
|
|
1699
|
+
algorithm: string;
|
|
1700
|
+
}): {
|
|
1701
|
+
/**
|
|
1702
|
+
* @private
|
|
1703
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1704
|
+
*/
|
|
1705
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1706
|
+
readonly tag: FingerprintCheck_Tags.Unsupported;
|
|
1707
|
+
readonly inner: Readonly<{
|
|
1708
|
+
algorithm: string;
|
|
1709
|
+
}>;
|
|
1710
|
+
};
|
|
1711
|
+
"new"(inner: {
|
|
1712
|
+
algorithm: string;
|
|
1713
|
+
}): {
|
|
1714
|
+
/**
|
|
1715
|
+
* @private
|
|
1716
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1717
|
+
*/
|
|
1718
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1719
|
+
readonly tag: FingerprintCheck_Tags.Unsupported;
|
|
1720
|
+
readonly inner: Readonly<{
|
|
1721
|
+
algorithm: string;
|
|
1722
|
+
}>;
|
|
1723
|
+
};
|
|
1724
|
+
instanceOf(obj: any): obj is {
|
|
1725
|
+
/**
|
|
1726
|
+
* @private
|
|
1727
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1728
|
+
*/
|
|
1729
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1730
|
+
readonly tag: FingerprintCheck_Tags.Unsupported;
|
|
1731
|
+
readonly inner: Readonly<{
|
|
1732
|
+
algorithm: string;
|
|
1733
|
+
}>;
|
|
1734
|
+
};
|
|
1735
|
+
};
|
|
1736
|
+
Indeterminate: {
|
|
1737
|
+
new (): {
|
|
1738
|
+
/**
|
|
1739
|
+
* @private
|
|
1740
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1741
|
+
*/
|
|
1742
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1743
|
+
readonly tag: FingerprintCheck_Tags.Indeterminate;
|
|
1744
|
+
};
|
|
1745
|
+
"new"(): {
|
|
1746
|
+
/**
|
|
1747
|
+
* @private
|
|
1748
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1749
|
+
*/
|
|
1750
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1751
|
+
readonly tag: FingerprintCheck_Tags.Indeterminate;
|
|
1752
|
+
};
|
|
1753
|
+
instanceOf(obj: any): obj is {
|
|
1754
|
+
/**
|
|
1755
|
+
* @private
|
|
1756
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1757
|
+
*/
|
|
1758
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1759
|
+
readonly tag: FingerprintCheck_Tags.Indeterminate;
|
|
1760
|
+
};
|
|
1761
|
+
};
|
|
1762
|
+
Compared: {
|
|
1763
|
+
new (inner: {
|
|
1764
|
+
score: SimilarityScore;
|
|
1765
|
+
}): {
|
|
1766
|
+
/**
|
|
1767
|
+
* @private
|
|
1768
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1769
|
+
*/
|
|
1770
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1771
|
+
readonly tag: FingerprintCheck_Tags.Compared;
|
|
1772
|
+
readonly inner: Readonly<{
|
|
1773
|
+
score: SimilarityScore;
|
|
1774
|
+
}>;
|
|
1775
|
+
};
|
|
1776
|
+
"new"(inner: {
|
|
1777
|
+
score: SimilarityScore;
|
|
1778
|
+
}): {
|
|
1779
|
+
/**
|
|
1780
|
+
* @private
|
|
1781
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1782
|
+
*/
|
|
1783
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1784
|
+
readonly tag: FingerprintCheck_Tags.Compared;
|
|
1785
|
+
readonly inner: Readonly<{
|
|
1786
|
+
score: SimilarityScore;
|
|
1787
|
+
}>;
|
|
1788
|
+
};
|
|
1789
|
+
instanceOf(obj: any): obj is {
|
|
1790
|
+
/**
|
|
1791
|
+
* @private
|
|
1792
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1793
|
+
*/
|
|
1794
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1795
|
+
readonly tag: FingerprintCheck_Tags.Compared;
|
|
1796
|
+
readonly inner: Readonly<{
|
|
1797
|
+
score: SimilarityScore;
|
|
1798
|
+
}>;
|
|
1799
|
+
};
|
|
1800
|
+
};
|
|
1801
|
+
}>;
|
|
1802
|
+
/**
|
|
1803
|
+
* Whether the asset's own fingerprint backs up a manifest that a watermark led to.
|
|
1804
|
+
*
|
|
1805
|
+
* C2PA 2.4 1.2.2.3: a watermark can be lifted from one asset onto another, so a mark alone does
|
|
1806
|
+
* not establish that the manifest it resolves to describes THIS asset. The mitigation the spec
|
|
1807
|
+
* gives is to compare a fingerprint computed from the asset against the one the recovered
|
|
1808
|
+
* manifest records, and `watermark-and-fingerprint` ends on exactly that comparison.
|
|
1809
|
+
*
|
|
1810
|
+
* Reported rather than enforced: a transcode legitimately shifts a fingerprint, so where the line
|
|
1811
|
+
* falls is the relying party's policy, not this SDK's. What the SDK owes them is the measurement.
|
|
1812
|
+
*/
|
|
1813
|
+
type FingerprintCheck = InstanceType<typeof FingerprintCheck['NotNeeded' | 'NothingToCompare' | 'Unsupported' | 'Indeterminate' | 'Compared']>;
|
|
1814
|
+
/**
|
|
1815
|
+
* One `verify` result: the c2pa manifest store, plus where it came from: see [`asset::CredentialOrigin`],
|
|
1816
|
+
* whose recovered variants carry the same `SoftBinding` record `Binder.derive` returns, so a
|
|
1817
|
+
* derived binding and a recovering one are one type.
|
|
1818
|
+
*/
|
|
1819
|
+
type FoundCredential = {
|
|
1820
|
+
/**
|
|
1821
|
+
* The bytes behind every thumbnail the manifests reference, by that reference's
|
|
1822
|
+
* `identifier`: each manifest's claim thumbnail and each ingredient's. The manifests state
|
|
1823
|
+
* identifiers and no images, so this is what a chain draws from.
|
|
1824
|
+
*/
|
|
1825
|
+
thumbnails: Map<string, ArrayBuffer>;
|
|
1826
|
+
/**
|
|
1827
|
+
* Where this credential came from. See [`asset::CredentialOrigin`].
|
|
1828
|
+
*/
|
|
1829
|
+
origin: CredentialOrigin;
|
|
1830
|
+
/**
|
|
1831
|
+
* The c2pa manifest store: its manifests by label, the active one, and the
|
|
1832
|
+
* validation state and results.
|
|
1833
|
+
*/
|
|
1834
|
+
manifest: ManifestStore;
|
|
1835
|
+
/**
|
|
1836
|
+
* Whether the asset's own fingerprint backs up a mark that led here (C2PA 2.4 1.2.2.3).
|
|
1837
|
+
*/
|
|
1838
|
+
fingerprintCheck: FingerprintCheck;
|
|
1839
|
+
};
|
|
1840
|
+
/**
|
|
1841
|
+
* Generated factory for {@link FoundCredential} record objects.
|
|
1842
|
+
*/
|
|
1843
|
+
declare const FoundCredential: Readonly<{
|
|
1844
|
+
create: (partial: Partial<FoundCredential> & Required<Omit<FoundCredential, never>>) => FoundCredential;
|
|
1845
|
+
new: (partial: Partial<FoundCredential> & Required<Omit<FoundCredential, never>>) => FoundCredential;
|
|
1846
|
+
defaults: () => Partial<FoundCredential>;
|
|
1847
|
+
}>;
|
|
1848
|
+
/**
|
|
1849
|
+
* Whether the configured recovery sequence ran to a conclusive answer.
|
|
1850
|
+
*/
|
|
1851
|
+
declare enum RecoveryStatus {
|
|
1852
|
+
NotRequested = 0,
|
|
1853
|
+
NotFound = 1,
|
|
1854
|
+
Recovered = 2,
|
|
1855
|
+
/**
|
|
1856
|
+
* No credential was recovered and at least one required attempt failed or was skipped.
|
|
1857
|
+
*/
|
|
1858
|
+
Incomplete = 3
|
|
1859
|
+
}
|
|
1860
|
+
/**
|
|
1861
|
+
* Why registry recovery did not complete cleanly, or why one candidate was omitted while another
|
|
1862
|
+
* succeeded. Kept as data so a partial recovery never loses the rest of the lookup outcome.
|
|
1863
|
+
*/
|
|
1864
|
+
declare enum RecoveryIssueKind {
|
|
1865
|
+
Binder = 0,
|
|
1866
|
+
BindingQuery = 1,
|
|
1867
|
+
QueryRefused = 2,
|
|
1868
|
+
ContentQuery = 3,
|
|
1869
|
+
Capabilities = 4,
|
|
1870
|
+
ContentTooLarge = 5,
|
|
1871
|
+
CandidateFetch = 6,
|
|
1872
|
+
CandidateValidation = 7,
|
|
1873
|
+
ResourceLimit = 8
|
|
1874
|
+
}
|
|
1875
|
+
/**
|
|
1876
|
+
* One non-fatal recovery problem. `manifest_id` is present only for a returned candidate.
|
|
1877
|
+
*/
|
|
1878
|
+
type RecoveryIssue = {
|
|
1879
|
+
kind: RecoveryIssueKind;
|
|
1880
|
+
manifestId?: string;
|
|
1881
|
+
message: string;
|
|
1882
|
+
};
|
|
1883
|
+
/**
|
|
1884
|
+
* Generated factory for {@link RecoveryIssue} record objects.
|
|
1885
|
+
*/
|
|
1886
|
+
declare const RecoveryIssue: Readonly<{
|
|
1887
|
+
create: (partial: Partial<RecoveryIssue> & Required<Omit<RecoveryIssue, "manifestId">>) => RecoveryIssue;
|
|
1888
|
+
new: (partial: Partial<RecoveryIssue> & Required<Omit<RecoveryIssue, "manifestId">>) => RecoveryIssue;
|
|
1889
|
+
defaults: () => Partial<RecoveryIssue>;
|
|
1890
|
+
}>;
|
|
1891
|
+
/**
|
|
1892
|
+
* Registry recovery outcome, including the strongest successfully validated candidate and every
|
|
1893
|
+
* non-fatal issue encountered on the way.
|
|
1894
|
+
*/
|
|
1895
|
+
type RecoverySummary = {
|
|
1896
|
+
status: RecoveryStatus;
|
|
1897
|
+
/**
|
|
1898
|
+
* Index into [`AssetVerification::credentials`]. Ranking is strongest-first, so this is the
|
|
1899
|
+
* C2PA golden-flow candidate rather than an implicit positional convention.
|
|
1900
|
+
*/
|
|
1901
|
+
bestCredentialIndex?: number;
|
|
1902
|
+
issues: Array<RecoveryIssue>;
|
|
1903
|
+
};
|
|
1904
|
+
/**
|
|
1905
|
+
* Generated factory for {@link RecoverySummary} record objects.
|
|
1906
|
+
*/
|
|
1907
|
+
declare const RecoverySummary: Readonly<{
|
|
1908
|
+
create: (partial: Partial<RecoverySummary> & Required<Omit<RecoverySummary, "bestCredentialIndex">>) => RecoverySummary;
|
|
1909
|
+
new: (partial: Partial<RecoverySummary> & Required<Omit<RecoverySummary, "bestCredentialIndex">>) => RecoverySummary;
|
|
1910
|
+
defaults: () => Partial<RecoverySummary>;
|
|
1911
|
+
}>;
|
|
1912
|
+
declare enum GoldenComparison_Tags {
|
|
1913
|
+
NotRequested = "NotRequested",
|
|
1914
|
+
NoEmbeddedManifest = "NoEmbeddedManifest",
|
|
1915
|
+
NoRecoveredManifest = "NoRecoveredManifest",
|
|
1916
|
+
Matches = "Matches",
|
|
1917
|
+
Differs = "Differs",
|
|
1918
|
+
Indeterminate = "Indeterminate"
|
|
1919
|
+
}
|
|
1920
|
+
/**
|
|
1921
|
+
* Typed completion of C2PA 2.4's `watermark-golden` / `fingerprint-golden` final comparison.
|
|
1922
|
+
*/
|
|
1923
|
+
declare const GoldenComparison: Readonly<{
|
|
1924
|
+
instanceOf: (obj: any) => obj is GoldenComparison;
|
|
1925
|
+
NotRequested: {
|
|
1926
|
+
new (): {
|
|
1927
|
+
/**
|
|
1928
|
+
* @private
|
|
1929
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1930
|
+
*/
|
|
1931
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
1932
|
+
readonly tag: GoldenComparison_Tags.NotRequested;
|
|
1933
|
+
};
|
|
1934
|
+
"new"(): {
|
|
1935
|
+
/**
|
|
1936
|
+
* @private
|
|
1937
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1938
|
+
*/
|
|
1939
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
1940
|
+
readonly tag: GoldenComparison_Tags.NotRequested;
|
|
1941
|
+
};
|
|
1942
|
+
instanceOf(obj: any): obj is {
|
|
1943
|
+
/**
|
|
1944
|
+
* @private
|
|
1945
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1946
|
+
*/
|
|
1947
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
1948
|
+
readonly tag: GoldenComparison_Tags.NotRequested;
|
|
1949
|
+
};
|
|
1950
|
+
};
|
|
1951
|
+
NoEmbeddedManifest: {
|
|
1952
|
+
new (): {
|
|
1953
|
+
/**
|
|
1954
|
+
* @private
|
|
1955
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1956
|
+
*/
|
|
1957
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
1958
|
+
readonly tag: GoldenComparison_Tags.NoEmbeddedManifest;
|
|
1959
|
+
};
|
|
1960
|
+
"new"(): {
|
|
1961
|
+
/**
|
|
1962
|
+
* @private
|
|
1963
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1964
|
+
*/
|
|
1965
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
1966
|
+
readonly tag: GoldenComparison_Tags.NoEmbeddedManifest;
|
|
1967
|
+
};
|
|
1968
|
+
instanceOf(obj: any): obj is {
|
|
1969
|
+
/**
|
|
1970
|
+
* @private
|
|
1971
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1972
|
+
*/
|
|
1973
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
1974
|
+
readonly tag: GoldenComparison_Tags.NoEmbeddedManifest;
|
|
1975
|
+
};
|
|
1976
|
+
};
|
|
1977
|
+
NoRecoveredManifest: {
|
|
1978
|
+
new (): {
|
|
1979
|
+
/**
|
|
1980
|
+
* @private
|
|
1981
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1982
|
+
*/
|
|
1983
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
1984
|
+
readonly tag: GoldenComparison_Tags.NoRecoveredManifest;
|
|
1985
|
+
};
|
|
1986
|
+
"new"(): {
|
|
1987
|
+
/**
|
|
1988
|
+
* @private
|
|
1989
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1990
|
+
*/
|
|
1991
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
1992
|
+
readonly tag: GoldenComparison_Tags.NoRecoveredManifest;
|
|
1993
|
+
};
|
|
1994
|
+
instanceOf(obj: any): obj is {
|
|
1995
|
+
/**
|
|
1996
|
+
* @private
|
|
1997
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1998
|
+
*/
|
|
1999
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
2000
|
+
readonly tag: GoldenComparison_Tags.NoRecoveredManifest;
|
|
2001
|
+
};
|
|
2002
|
+
};
|
|
2003
|
+
Matches: {
|
|
2004
|
+
new (inner: {
|
|
2005
|
+
recoveredIndex: number;
|
|
2006
|
+
}): {
|
|
2007
|
+
/**
|
|
2008
|
+
* @private
|
|
2009
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2010
|
+
*/
|
|
2011
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
2012
|
+
readonly tag: GoldenComparison_Tags.Matches;
|
|
2013
|
+
readonly inner: Readonly<{
|
|
2014
|
+
recoveredIndex: number;
|
|
2015
|
+
}>;
|
|
2016
|
+
};
|
|
2017
|
+
"new"(inner: {
|
|
2018
|
+
recoveredIndex: number;
|
|
2019
|
+
}): {
|
|
2020
|
+
/**
|
|
2021
|
+
* @private
|
|
2022
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2023
|
+
*/
|
|
2024
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
2025
|
+
readonly tag: GoldenComparison_Tags.Matches;
|
|
2026
|
+
readonly inner: Readonly<{
|
|
2027
|
+
recoveredIndex: number;
|
|
2028
|
+
}>;
|
|
2029
|
+
};
|
|
2030
|
+
instanceOf(obj: any): obj is {
|
|
2031
|
+
/**
|
|
2032
|
+
* @private
|
|
2033
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2034
|
+
*/
|
|
2035
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
2036
|
+
readonly tag: GoldenComparison_Tags.Matches;
|
|
2037
|
+
readonly inner: Readonly<{
|
|
2038
|
+
recoveredIndex: number;
|
|
2039
|
+
}>;
|
|
2040
|
+
};
|
|
2041
|
+
};
|
|
2042
|
+
Differs: {
|
|
2043
|
+
new (inner: {
|
|
2044
|
+
recoveredIndex: number;
|
|
2045
|
+
}): {
|
|
2046
|
+
/**
|
|
2047
|
+
* @private
|
|
2048
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2049
|
+
*/
|
|
2050
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
2051
|
+
readonly tag: GoldenComparison_Tags.Differs;
|
|
2052
|
+
readonly inner: Readonly<{
|
|
2053
|
+
recoveredIndex: number;
|
|
2054
|
+
}>;
|
|
2055
|
+
};
|
|
2056
|
+
"new"(inner: {
|
|
2057
|
+
recoveredIndex: number;
|
|
2058
|
+
}): {
|
|
2059
|
+
/**
|
|
2060
|
+
* @private
|
|
2061
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2062
|
+
*/
|
|
2063
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
2064
|
+
readonly tag: GoldenComparison_Tags.Differs;
|
|
2065
|
+
readonly inner: Readonly<{
|
|
2066
|
+
recoveredIndex: number;
|
|
2067
|
+
}>;
|
|
2068
|
+
};
|
|
2069
|
+
instanceOf(obj: any): obj is {
|
|
2070
|
+
/**
|
|
2071
|
+
* @private
|
|
2072
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2073
|
+
*/
|
|
2074
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
2075
|
+
readonly tag: GoldenComparison_Tags.Differs;
|
|
2076
|
+
readonly inner: Readonly<{
|
|
2077
|
+
recoveredIndex: number;
|
|
2078
|
+
}>;
|
|
2079
|
+
};
|
|
2080
|
+
};
|
|
2081
|
+
Indeterminate: {
|
|
2082
|
+
new (inner: {
|
|
2083
|
+
recoveredIndex?: number;
|
|
2084
|
+
}): {
|
|
2085
|
+
/**
|
|
2086
|
+
* @private
|
|
2087
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2088
|
+
*/
|
|
2089
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
2090
|
+
readonly tag: GoldenComparison_Tags.Indeterminate;
|
|
2091
|
+
readonly inner: Readonly<{
|
|
2092
|
+
recoveredIndex?: number;
|
|
2093
|
+
}>;
|
|
2094
|
+
};
|
|
2095
|
+
new: (partial: Parameters<(partial: Partial<{
|
|
2096
|
+
recoveredIndex?: number;
|
|
2097
|
+
}> & Required<Omit<{
|
|
2098
|
+
recoveredIndex?: number;
|
|
2099
|
+
}, "recoveredIndex">>) => {
|
|
2100
|
+
recoveredIndex?: number;
|
|
2101
|
+
}>[0]) => {
|
|
2102
|
+
/**
|
|
2103
|
+
* @private
|
|
2104
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2105
|
+
*/
|
|
2106
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
2107
|
+
readonly tag: GoldenComparison_Tags.Indeterminate;
|
|
2108
|
+
readonly inner: Readonly<{
|
|
2109
|
+
recoveredIndex?: number;
|
|
2110
|
+
}>;
|
|
2111
|
+
};
|
|
2112
|
+
instanceOf(obj: any): obj is {
|
|
2113
|
+
/**
|
|
2114
|
+
* @private
|
|
2115
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2116
|
+
*/
|
|
2117
|
+
readonly [uniffiTypeNameSymbol]: "GoldenComparison";
|
|
2118
|
+
readonly tag: GoldenComparison_Tags.Indeterminate;
|
|
2119
|
+
readonly inner: Readonly<{
|
|
2120
|
+
recoveredIndex?: number;
|
|
2121
|
+
}>;
|
|
2122
|
+
};
|
|
2123
|
+
};
|
|
2124
|
+
}>;
|
|
2125
|
+
/**
|
|
2126
|
+
* Typed completion of C2PA 2.4's `watermark-golden` / `fingerprint-golden` final comparison.
|
|
2127
|
+
*/
|
|
2128
|
+
type GoldenComparison = InstanceType<typeof GoldenComparison['NotRequested' | 'NoEmbeddedManifest' | 'NoRecoveredManifest' | 'Matches' | 'Differs' | 'Indeterminate']>;
|
|
2129
|
+
/**
|
|
2130
|
+
* Complete asset verification result, including conclusive/incomplete recovery state and the
|
|
2131
|
+
* C2PA golden-flow comparison against the strongest recovered credential.
|
|
2132
|
+
*/
|
|
2133
|
+
type AssetVerification = {
|
|
2134
|
+
credentials: Array<FoundCredential>;
|
|
2135
|
+
recovery: RecoverySummary;
|
|
2136
|
+
goldenComparison: GoldenComparison;
|
|
2137
|
+
};
|
|
2138
|
+
/**
|
|
2139
|
+
* Generated factory for {@link AssetVerification} record objects.
|
|
2140
|
+
*/
|
|
2141
|
+
declare const AssetVerification: Readonly<{
|
|
2142
|
+
create: (partial: Partial<AssetVerification> & Required<Omit<AssetVerification, never>>) => AssetVerification;
|
|
2143
|
+
new: (partial: Partial<AssetVerification> & Required<Omit<AssetVerification, never>>) => AssetVerification;
|
|
2144
|
+
defaults: () => Partial<AssetVerification>;
|
|
2145
|
+
}>;
|
|
2146
|
+
/**
|
|
2147
|
+
* When [`AssetVerifier::verify_asset`] queries the registry.
|
|
2148
|
+
*/
|
|
2149
|
+
declare enum RecoveryPolicy {
|
|
2150
|
+
/**
|
|
2151
|
+
* Only when the asset carries no manifest of its own, the stripped or never-embedded copy
|
|
2152
|
+
* whose credential lives only in the registry. An asset that is still signed costs no round
|
|
2153
|
+
* trip, which is why this is the default.
|
|
2154
|
+
*/
|
|
2155
|
+
WhenMissing = 0,
|
|
2156
|
+
/**
|
|
2157
|
+
* On every verify, alongside the embedded manifest, so the two can be compared.
|
|
2158
|
+
*
|
|
2159
|
+
* C2PA 2.4's `watermark-golden` and `fingerprint-golden` flows end on exactly that
|
|
2160
|
+
* comparison, and it is the only thing that catches a manifest SUBSTITUTED under an
|
|
2161
|
+
* untouched mark (use case UC3 in the spec's list, UC2 in ours): the replacement verifies
|
|
2162
|
+
* perfectly on its own, and only disagrees with what the mark actually resolves to.
|
|
2163
|
+
*
|
|
2164
|
+
* It queries the registry on every verify, without making it load-bearing on the asset's own
|
|
2165
|
+
* credential: the flow provides information about a substitution rather than gating the local
|
|
2166
|
+
* manifest, so a registry that cannot be reached leaves [`RecoveryStatus::Incomplete`], the
|
|
2167
|
+
* reason as a [`RecoveryIssue`], and [`GoldenComparison::Indeterminate`]. A caller for whom a
|
|
2168
|
+
* cross-check that never ran must not pass for agreement branches on that status.
|
|
2169
|
+
*/
|
|
2170
|
+
Always = 1
|
|
2171
|
+
}
|
|
2172
|
+
/**
|
|
2173
|
+
* How far a recovery may go, which decides what leaves the caller.
|
|
2174
|
+
*
|
|
2175
|
+
* Separate from [`RecoveryPolicy`], which decides *when* a recovery runs: one names the trigger
|
|
2176
|
+
* and the other the reach, and crossing them is what the two enums exist to keep legible.
|
|
2177
|
+
*/
|
|
2178
|
+
declare enum RegistryQueries {
|
|
2179
|
+
/**
|
|
2180
|
+
* Bindings this client derived, looked up by value. The asset never leaves the caller, which
|
|
2181
|
+
* is what a verifier embedded in someone else's page needs: it can ask whether a code it
|
|
2182
|
+
* computed is known without handing over what it computed the code from.
|
|
2183
|
+
*
|
|
2184
|
+
* A binding nobody local can derive is therefore unreachable, watermarks included, because
|
|
2185
|
+
* detecting those is the registry's job and needs the asset.
|
|
2186
|
+
*/
|
|
2187
|
+
Derived = 0,
|
|
2188
|
+
/**
|
|
2189
|
+
* Also `POST /matches/byContent` when no derived binding hits, which uploads the asset so the
|
|
2190
|
+
* registry can derive the bindings its own deployment supports, detector-backed watermarks
|
|
2191
|
+
* among them. The upload happens only on that miss, and only for an asset small enough to
|
|
2192
|
+
* send.
|
|
2193
|
+
*/
|
|
2194
|
+
DerivedThenContent = 1
|
|
2195
|
+
}
|
|
2196
|
+
/**
|
|
2197
|
+
* Where the registry is, when to query it, and how far. One value rather than an endpoint beside
|
|
2198
|
+
* loose flags, so a policy cannot be configured on a verifier that has nowhere to apply it.
|
|
2199
|
+
*/
|
|
2200
|
+
type RegistryOptions = {
|
|
2201
|
+
/**
|
|
2202
|
+
* Soft Binding Resolution API base URL (`https://registry.trylimbo.com`).
|
|
2203
|
+
*/
|
|
2204
|
+
url: string;
|
|
2205
|
+
/**
|
|
2206
|
+
* Defaults to [`RecoveryPolicy::WhenMissing`].
|
|
2207
|
+
*/
|
|
2208
|
+
recovery?: RecoveryPolicy;
|
|
2209
|
+
/**
|
|
2210
|
+
* Defaults to [`RegistryQueries::DerivedThenContent`].
|
|
2211
|
+
*/
|
|
2212
|
+
queries?: RegistryQueries;
|
|
2213
|
+
};
|
|
2214
|
+
/**
|
|
2215
|
+
* Generated factory for {@link RegistryOptions} record objects.
|
|
2216
|
+
*/
|
|
2217
|
+
declare const RegistryOptions: Readonly<{
|
|
2218
|
+
create: (partial: Partial<RegistryOptions> & Required<Omit<RegistryOptions, "queries" | "recovery">>) => RegistryOptions;
|
|
2219
|
+
new: (partial: Partial<RegistryOptions> & Required<Omit<RegistryOptions, "queries" | "recovery">>) => RegistryOptions;
|
|
2220
|
+
defaults: () => Partial<RegistryOptions>;
|
|
2221
|
+
}>;
|
|
2222
|
+
/**
|
|
2223
|
+
* Construction options for [`AssetVerifier::new`] (and the `AssetVerifier.create` JS
|
|
2224
|
+
* binding). `trust_c2pa_anchors` defaults to `true` when omitted.
|
|
2225
|
+
*
|
|
2226
|
+
* One definition, all lanes: `#[binding]` derives the shapes directly here:
|
|
2227
|
+
* tsify (camelCase, optional fields) on wasm, a `uniffi::Record` on the native
|
|
2228
|
+
* `ffi` build, so there is no per-lane DTO copy. Off both lanes it is a plain struct.
|
|
2229
|
+
*/
|
|
2230
|
+
type AssetVerifierOptions = {
|
|
2231
|
+
/**
|
|
2232
|
+
* The registry to recover from. Omit for a verifier that only checks embedded manifests.
|
|
2233
|
+
*/
|
|
2234
|
+
registry?: RegistryOptions;
|
|
2235
|
+
/**
|
|
2236
|
+
* PEM trust anchors for the caller's own issuers.
|
|
2237
|
+
*/
|
|
2238
|
+
trustAnchors: Array<string>;
|
|
2239
|
+
/**
|
|
2240
|
+
* Also trust the bundled official C2PA anchors on top of `trust_anchors`.
|
|
2241
|
+
* Defaults to `true`; set `false` to trust only `trust_anchors`.
|
|
2242
|
+
*/
|
|
2243
|
+
trustC2paAnchors?: boolean;
|
|
2244
|
+
/**
|
|
2245
|
+
* Issuer DIDs whose CAWG identity (ICA) credentials count as validated, matched
|
|
2246
|
+
* exactly against the credential issuer. Omitted or empty trusts no issuer: every
|
|
2247
|
+
* identity assertion then reports `cawg.ica.untrusted_issuer` and withholds
|
|
2248
|
+
* `cawg.ica.credential_valid`, which leaves the manifest's own validity untouched.
|
|
2249
|
+
*/
|
|
2250
|
+
trustedIcaIssuers?: Array<string>;
|
|
2251
|
+
};
|
|
2252
|
+
/**
|
|
2253
|
+
* Generated factory for {@link AssetVerifierOptions} record objects.
|
|
2254
|
+
*/
|
|
2255
|
+
declare const AssetVerifierOptions: Readonly<{
|
|
2256
|
+
create: (partial: Partial<AssetVerifierOptions> & Required<Omit<AssetVerifierOptions, "registry" | "trustC2paAnchors" | "trustedIcaIssuers">>) => AssetVerifierOptions;
|
|
2257
|
+
new: (partial: Partial<AssetVerifierOptions> & Required<Omit<AssetVerifierOptions, "registry" | "trustC2paAnchors" | "trustedIcaIssuers">>) => AssetVerifierOptions;
|
|
2258
|
+
defaults: () => Partial<AssetVerifierOptions>;
|
|
2259
|
+
}>;
|
|
2260
|
+
/**
|
|
2261
|
+
* Everything one [`Binder::derive`] needs beyond the asset. `format` overrides the format sniffed
|
|
2262
|
+
* from the leading bytes.
|
|
2263
|
+
*/
|
|
2264
|
+
type DeriveOptions = {
|
|
2265
|
+
format?: string;
|
|
2266
|
+
};
|
|
2267
|
+
/**
|
|
2268
|
+
* Generated factory for {@link DeriveOptions} record objects.
|
|
2269
|
+
*/
|
|
2270
|
+
declare const DeriveOptions: Readonly<{
|
|
2271
|
+
create: (partial: Partial<DeriveOptions> & Required<Omit<DeriveOptions, "format">>) => DeriveOptions;
|
|
2272
|
+
new: (partial: Partial<DeriveOptions> & Required<Omit<DeriveOptions, "format">>) => DeriveOptions;
|
|
2273
|
+
defaults: () => Partial<DeriveOptions>;
|
|
2274
|
+
}>;
|
|
2275
|
+
/**
|
|
2276
|
+
* One `google.rpc.BadRequest.FieldViolation`: a request field that failed a constraint.
|
|
2277
|
+
*/
|
|
2278
|
+
type FieldViolation = {
|
|
2279
|
+
/**
|
|
2280
|
+
* A dotted proto path to the offending field (`""` for a message-level rule).
|
|
2281
|
+
*/
|
|
2282
|
+
field: string;
|
|
2283
|
+
/**
|
|
2284
|
+
* Human-readable explanation of the violation.
|
|
2285
|
+
*/
|
|
2286
|
+
description: string;
|
|
2287
|
+
/**
|
|
2288
|
+
* The constraint id that failed (a protovalidate/CEL rule id), stable across releases.
|
|
2289
|
+
*/
|
|
2290
|
+
reason: string;
|
|
2291
|
+
};
|
|
2292
|
+
/**
|
|
2293
|
+
* Generated factory for {@link FieldViolation} record objects.
|
|
2294
|
+
*/
|
|
2295
|
+
declare const FieldViolation: Readonly<{
|
|
2296
|
+
create: (partial: Partial<FieldViolation> & Required<Omit<FieldViolation, never>>) => FieldViolation;
|
|
2297
|
+
new: (partial: Partial<FieldViolation> & Required<Omit<FieldViolation, never>>) => FieldViolation;
|
|
2298
|
+
defaults: () => Partial<FieldViolation>;
|
|
2299
|
+
}>;
|
|
2300
|
+
/**
|
|
2301
|
+
* Whether a code is a success, an informational note, or a failure.
|
|
2302
|
+
*/
|
|
2303
|
+
declare enum ValidationCodeKind {
|
|
2304
|
+
Success = 0,
|
|
2305
|
+
Informational = 1,
|
|
2306
|
+
Failure = 2
|
|
2307
|
+
}
|
|
2308
|
+
/**
|
|
2309
|
+
* One C2PA validation status entry (spec §15.3).
|
|
2310
|
+
*/
|
|
2311
|
+
type ValidationCode = {
|
|
2312
|
+
/**
|
|
2313
|
+
* C2PA validation status string (e.g. `signingCredential.trusted`).
|
|
2314
|
+
*/
|
|
2315
|
+
code: string;
|
|
2316
|
+
kind: ValidationCodeKind;
|
|
2317
|
+
};
|
|
2318
|
+
/**
|
|
2319
|
+
* Generated factory for {@link ValidationCode} record objects.
|
|
2320
|
+
*/
|
|
2321
|
+
declare const ValidationCode: Readonly<{
|
|
2322
|
+
create: (partial: Partial<ValidationCode> & Required<Omit<ValidationCode, never>>) => ValidationCode;
|
|
2323
|
+
new: (partial: Partial<ValidationCode> & Required<Omit<ValidationCode, never>>) => ValidationCode;
|
|
2324
|
+
defaults: () => Partial<ValidationCode>;
|
|
2325
|
+
}>;
|
|
2326
|
+
/**
|
|
2327
|
+
* A session signing key from the init manifest's roster (spec §19.4.4).
|
|
2328
|
+
*/
|
|
2329
|
+
type SessionKeySummary = {
|
|
2330
|
+
/**
|
|
2331
|
+
* Identifier of the session signing key.
|
|
2332
|
+
*/
|
|
2333
|
+
keyId: ArrayBuffer;
|
|
2334
|
+
/**
|
|
2335
|
+
* The session key's public half (SEC1-encoded bytes).
|
|
2336
|
+
*/
|
|
2337
|
+
publicKey: ArrayBuffer;
|
|
2338
|
+
};
|
|
2339
|
+
/**
|
|
2340
|
+
* Generated factory for {@link SessionKeySummary} record objects.
|
|
2341
|
+
*/
|
|
2342
|
+
declare const SessionKeySummary: Readonly<{
|
|
2343
|
+
create: (partial: Partial<SessionKeySummary> & Required<Omit<SessionKeySummary, never>>) => SessionKeySummary;
|
|
2344
|
+
new: (partial: Partial<SessionKeySummary> & Required<Omit<SessionKeySummary, never>>) => SessionKeySummary;
|
|
2345
|
+
defaults: () => Partial<SessionKeySummary>;
|
|
2346
|
+
}>;
|
|
2347
|
+
/**
|
|
2348
|
+
* Outcome of validating a stream's init segment.
|
|
2349
|
+
*/
|
|
2350
|
+
type InitValidation = {
|
|
2351
|
+
/**
|
|
2352
|
+
* The init manifest's C2PA validation state (spec §14.3). Read from
|
|
2353
|
+
* `Reader::validation_state()`, so unlike `manifest.validation_state` it is
|
|
2354
|
+
* never absent.
|
|
2355
|
+
*/
|
|
2356
|
+
state: ValidationState;
|
|
2357
|
+
codes: Array<ValidationCode>;
|
|
2358
|
+
/**
|
|
2359
|
+
* The init segment's c2pa manifest store.
|
|
2360
|
+
*/
|
|
2361
|
+
manifest: ManifestStore;
|
|
2362
|
+
sessionKeys: Array<SessionKeySummary>;
|
|
2363
|
+
};
|
|
2364
|
+
/**
|
|
2365
|
+
* Generated factory for {@link InitValidation} record objects.
|
|
2366
|
+
*/
|
|
2367
|
+
declare const InitValidation: Readonly<{
|
|
2368
|
+
create: (partial: Partial<InitValidation> & Required<Omit<InitValidation, never>>) => InitValidation;
|
|
2369
|
+
new: (partial: Partial<InitValidation> & Required<Omit<InitValidation, never>>) => InitValidation;
|
|
2370
|
+
defaults: () => Partial<InitValidation>;
|
|
2371
|
+
}>;
|
|
2372
|
+
/**
|
|
2373
|
+
* Timing facts carried by a media segment's container.
|
|
2374
|
+
*/
|
|
2375
|
+
type SegmentTiming = {
|
|
2376
|
+
/**
|
|
2377
|
+
* Media segment sequence number (exact below 2^53).
|
|
2378
|
+
*/
|
|
2379
|
+
sequenceNumber: bigint;
|
|
2380
|
+
/**
|
|
2381
|
+
* MP4 timescale (ticks per second) for this segment's timing, if present.
|
|
2382
|
+
*/
|
|
2383
|
+
timescale?: number;
|
|
2384
|
+
/**
|
|
2385
|
+
* Segment duration in seconds, if the container reports it.
|
|
2386
|
+
*/
|
|
2387
|
+
eventDurationSecs?: number;
|
|
2388
|
+
};
|
|
2389
|
+
/**
|
|
2390
|
+
* Generated factory for {@link SegmentTiming} record objects.
|
|
2391
|
+
*/
|
|
2392
|
+
declare const SegmentTiming: Readonly<{
|
|
2393
|
+
create: (partial: Partial<SegmentTiming> & Required<Omit<SegmentTiming, "eventDurationSecs" | "timescale">>) => SegmentTiming;
|
|
2394
|
+
new: (partial: Partial<SegmentTiming> & Required<Omit<SegmentTiming, "eventDurationSecs" | "timescale">>) => SegmentTiming;
|
|
2395
|
+
defaults: () => Partial<SegmentTiming>;
|
|
2396
|
+
}>;
|
|
2397
|
+
/**
|
|
2398
|
+
* Outcome of validating a media segment against its stream's init.
|
|
2399
|
+
*/
|
|
2400
|
+
type MediaValidation = {
|
|
2401
|
+
valid: boolean;
|
|
2402
|
+
codes: Array<ValidationCode>;
|
|
2403
|
+
keyId: ArrayBuffer;
|
|
2404
|
+
timing: SegmentTiming;
|
|
2405
|
+
manifestId: string;
|
|
2406
|
+
};
|
|
2407
|
+
/**
|
|
2408
|
+
* Generated factory for {@link MediaValidation} record objects.
|
|
2409
|
+
*/
|
|
2410
|
+
declare const MediaValidation: Readonly<{
|
|
2411
|
+
create: (partial: Partial<MediaValidation> & Required<Omit<MediaValidation, never>>) => MediaValidation;
|
|
2412
|
+
new: (partial: Partial<MediaValidation> & Required<Omit<MediaValidation, never>>) => MediaValidation;
|
|
2413
|
+
defaults: () => Partial<MediaValidation>;
|
|
2414
|
+
}>;
|
|
2415
|
+
/**
|
|
2416
|
+
* A byte range holding a bare C2PA manifest store, or reserved for one. A record of
|
|
2417
|
+
* primitives, so a plugin in its OWN UniFFI namespace declares a structurally identical
|
|
2418
|
+
* one and the two cross the boundary without sharing a Rust type.
|
|
2419
|
+
*/
|
|
2420
|
+
type Region = {
|
|
2421
|
+
offset: bigint;
|
|
2422
|
+
length: bigint;
|
|
2423
|
+
};
|
|
2424
|
+
/**
|
|
2425
|
+
* Generated factory for {@link Region} record objects.
|
|
2426
|
+
*/
|
|
2427
|
+
declare const Region: Readonly<{
|
|
2428
|
+
create: (partial: Partial<Region> & Required<Omit<Region, never>>) => Region;
|
|
2429
|
+
new: (partial: Partial<Region> & Required<Omit<Region, never>>) => Region;
|
|
2430
|
+
defaults: () => Partial<Region>;
|
|
2431
|
+
}>;
|
|
2432
|
+
/**
|
|
2433
|
+
* Construction options for [`StreamVerifier::new`] (and the `StreamVerifier.create`
|
|
2434
|
+
* JS binding). `trust_c2pa_anchors` defaults to `true` when omitted.
|
|
2435
|
+
*
|
|
2436
|
+
* `#[binding]` derives the wasm shape (`trustC2paAnchors` camelCase, optional) and,
|
|
2437
|
+
* with `ffi`, a `uniffi::Record` for the native `StreamVerifier.create` binding, so there
|
|
2438
|
+
* is no per-lane DTO copy. Off both lanes it is a plain struct.
|
|
2439
|
+
*/
|
|
2440
|
+
type StreamVerifierOptions = {
|
|
2441
|
+
/**
|
|
2442
|
+
* PEM trust anchors for the caller's own issuers.
|
|
2443
|
+
*/
|
|
2444
|
+
trustAnchors: Array<string>;
|
|
2445
|
+
/**
|
|
2446
|
+
* Also trust the bundled official C2PA anchors on top of `trust_anchors`.
|
|
2447
|
+
* Defaults to `true`; set `false` to trust only `trust_anchors`.
|
|
2448
|
+
*/
|
|
2449
|
+
trustC2paAnchors?: boolean;
|
|
2450
|
+
/**
|
|
2451
|
+
* Issuer DIDs whose CAWG identity (ICA) credentials count as validated, matched
|
|
2452
|
+
* exactly against the credential issuer. Omitted or empty trusts no issuer: an
|
|
2453
|
+
* identity assertion on the init segment's manifest then reports
|
|
2454
|
+
* `cawg.ica.untrusted_issuer` and withholds `cawg.ica.credential_valid`.
|
|
2455
|
+
*/
|
|
2456
|
+
trustedIcaIssuers?: Array<string>;
|
|
2457
|
+
/**
|
|
2458
|
+
* How far a segment's timestamp may sit from wall-clock before it is rejected as
|
|
2459
|
+
* skewed. Defaults to [`DEFAULT_SEGMENT_SKEW_TOLERANCE_SECS`]. A deployment whose
|
|
2460
|
+
* encoder clock drifts further than that needs this rather than a fork.
|
|
2461
|
+
*/
|
|
2462
|
+
segmentSkewToleranceSecs?: bigint;
|
|
2463
|
+
};
|
|
2464
|
+
/**
|
|
2465
|
+
* Generated factory for {@link StreamVerifierOptions} record objects.
|
|
2466
|
+
*/
|
|
2467
|
+
declare const StreamVerifierOptions: Readonly<{
|
|
2468
|
+
create: (partial: Partial<StreamVerifierOptions> & Required<Omit<StreamVerifierOptions, "segmentSkewToleranceSecs" | "trustC2paAnchors" | "trustedIcaIssuers">>) => StreamVerifierOptions;
|
|
2469
|
+
new: (partial: Partial<StreamVerifierOptions> & Required<Omit<StreamVerifierOptions, "segmentSkewToleranceSecs" | "trustC2paAnchors" | "trustedIcaIssuers">>) => StreamVerifierOptions;
|
|
2470
|
+
defaults: () => Partial<StreamVerifierOptions>;
|
|
2471
|
+
}>;
|
|
2472
|
+
/**
|
|
2473
|
+
* A canonical gRPC/Connect status code: the coarse, closed failure class.
|
|
2474
|
+
*
|
|
2475
|
+
* The wasm lane projects this as the Connect `snake_case` string, so a consumer
|
|
2476
|
+
* narrows on `err.code === "resource_exhausted"`; the native lane projects an enum.
|
|
2477
|
+
*/
|
|
2478
|
+
declare enum Code {
|
|
2479
|
+
Canceled = 0,
|
|
2480
|
+
Unknown = 1,
|
|
2481
|
+
InvalidArgument = 2,
|
|
2482
|
+
DeadlineExceeded = 3,
|
|
2483
|
+
NotFound = 4,
|
|
2484
|
+
AlreadyExists = 5,
|
|
2485
|
+
PermissionDenied = 6,
|
|
2486
|
+
ResourceExhausted = 7,
|
|
2487
|
+
FailedPrecondition = 8,
|
|
2488
|
+
Aborted = 9,
|
|
2489
|
+
OutOfRange = 10,
|
|
2490
|
+
Unimplemented = 11,
|
|
2491
|
+
Internal = 12,
|
|
2492
|
+
Unavailable = 13,
|
|
2493
|
+
DataLoss = 14,
|
|
2494
|
+
Unauthenticated = 15
|
|
2495
|
+
}
|
|
2496
|
+
declare enum SdkError_Tags {
|
|
2497
|
+
Reason = "Reason",
|
|
2498
|
+
Invalid = "Invalid",
|
|
2499
|
+
Status = "Status"
|
|
2500
|
+
}
|
|
2501
|
+
/**
|
|
2502
|
+
* The error every SDK call throws: a decoded `google.rpc.Status`, discriminated
|
|
2503
|
+
* as a semantic reason, a request validation, or a bare status. `code` and `message`
|
|
2504
|
+
* are common to every variant.
|
|
2505
|
+
*/
|
|
2506
|
+
declare const SdkError: Readonly<{
|
|
2507
|
+
instanceOf: (obj: any) => obj is SdkError;
|
|
2508
|
+
Reason: {
|
|
2509
|
+
new (inner: {
|
|
2510
|
+
code: Code;
|
|
2511
|
+
message: string;
|
|
2512
|
+
reason: string;
|
|
2513
|
+
domain: string;
|
|
2514
|
+
metadata: Map<string, string>;
|
|
2515
|
+
}): {
|
|
2516
|
+
/**
|
|
2517
|
+
* @private
|
|
2518
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2519
|
+
*/
|
|
2520
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
2521
|
+
readonly tag: SdkError_Tags.Reason;
|
|
2522
|
+
readonly inner: Readonly<{
|
|
2523
|
+
code: Code;
|
|
2524
|
+
message: string;
|
|
2525
|
+
reason: string;
|
|
2526
|
+
domain: string;
|
|
2527
|
+
metadata: Map<string, string>;
|
|
2528
|
+
}>;
|
|
2529
|
+
name: string;
|
|
2530
|
+
message: string;
|
|
2531
|
+
stack?: string;
|
|
2532
|
+
cause?: unknown;
|
|
2533
|
+
};
|
|
2534
|
+
"new"(inner: {
|
|
2535
|
+
code: Code;
|
|
2536
|
+
message: string;
|
|
2537
|
+
reason: string;
|
|
2538
|
+
domain: string;
|
|
2539
|
+
metadata: Map<string, string>;
|
|
2540
|
+
}): {
|
|
2541
|
+
/**
|
|
2542
|
+
* @private
|
|
2543
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2544
|
+
*/
|
|
2545
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
2546
|
+
readonly tag: SdkError_Tags.Reason;
|
|
2547
|
+
readonly inner: Readonly<{
|
|
2548
|
+
code: Code;
|
|
2549
|
+
message: string;
|
|
2550
|
+
reason: string;
|
|
2551
|
+
domain: string;
|
|
2552
|
+
metadata: Map<string, string>;
|
|
2553
|
+
}>;
|
|
2554
|
+
name: string;
|
|
2555
|
+
message: string;
|
|
2556
|
+
stack?: string;
|
|
2557
|
+
cause?: unknown;
|
|
2558
|
+
};
|
|
2559
|
+
instanceOf(obj: any): obj is {
|
|
2560
|
+
/**
|
|
2561
|
+
* @private
|
|
2562
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2563
|
+
*/
|
|
2564
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
2565
|
+
readonly tag: SdkError_Tags.Reason;
|
|
2566
|
+
readonly inner: Readonly<{
|
|
2567
|
+
code: Code;
|
|
2568
|
+
message: string;
|
|
2569
|
+
reason: string;
|
|
2570
|
+
domain: string;
|
|
2571
|
+
metadata: Map<string, string>;
|
|
2572
|
+
}>;
|
|
2573
|
+
name: string;
|
|
2574
|
+
message: string;
|
|
2575
|
+
stack?: string;
|
|
2576
|
+
cause?: unknown;
|
|
2577
|
+
};
|
|
2578
|
+
hasInner(obj: any): obj is {
|
|
2579
|
+
/**
|
|
2580
|
+
* @private
|
|
2581
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2582
|
+
*/
|
|
2583
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
2584
|
+
readonly tag: SdkError_Tags.Reason;
|
|
2585
|
+
readonly inner: Readonly<{
|
|
2586
|
+
code: Code;
|
|
2587
|
+
message: string;
|
|
2588
|
+
reason: string;
|
|
2589
|
+
domain: string;
|
|
2590
|
+
metadata: Map<string, string>;
|
|
2591
|
+
}>;
|
|
2592
|
+
name: string;
|
|
2593
|
+
message: string;
|
|
2594
|
+
stack?: string;
|
|
2595
|
+
cause?: unknown;
|
|
2596
|
+
};
|
|
2597
|
+
getInner(obj: {
|
|
2598
|
+
/**
|
|
2599
|
+
* @private
|
|
2600
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2601
|
+
*/
|
|
2602
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
2603
|
+
readonly tag: SdkError_Tags.Reason;
|
|
2604
|
+
readonly inner: Readonly<{
|
|
2605
|
+
code: Code;
|
|
2606
|
+
message: string;
|
|
2607
|
+
reason: string;
|
|
2608
|
+
domain: string;
|
|
2609
|
+
metadata: Map<string, string>;
|
|
2610
|
+
}>;
|
|
2611
|
+
name: string;
|
|
2612
|
+
message: string;
|
|
2613
|
+
stack?: string;
|
|
2614
|
+
cause?: unknown;
|
|
2615
|
+
}): Readonly<{
|
|
2616
|
+
code: Code;
|
|
2617
|
+
message: string;
|
|
2618
|
+
reason: string;
|
|
2619
|
+
domain: string;
|
|
2620
|
+
metadata: Map<string, string>;
|
|
2621
|
+
}>;
|
|
2622
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2623
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2624
|
+
stackTraceLimit: number;
|
|
2625
|
+
};
|
|
2626
|
+
Invalid: {
|
|
2627
|
+
new (inner: {
|
|
2628
|
+
code: Code;
|
|
2629
|
+
message: string;
|
|
2630
|
+
fieldViolations: Array<FieldViolation>;
|
|
2631
|
+
}): {
|
|
2632
|
+
/**
|
|
2633
|
+
* @private
|
|
2634
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2635
|
+
*/
|
|
2636
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
2637
|
+
readonly tag: SdkError_Tags.Invalid;
|
|
2638
|
+
readonly inner: Readonly<{
|
|
2639
|
+
code: Code;
|
|
2640
|
+
message: string;
|
|
2641
|
+
fieldViolations: Array<FieldViolation>;
|
|
2642
|
+
}>;
|
|
2643
|
+
name: string;
|
|
2644
|
+
message: string;
|
|
2645
|
+
stack?: string;
|
|
2646
|
+
cause?: unknown;
|
|
2647
|
+
};
|
|
2648
|
+
"new"(inner: {
|
|
2649
|
+
code: Code;
|
|
2650
|
+
message: string;
|
|
2651
|
+
fieldViolations: Array<FieldViolation>;
|
|
2652
|
+
}): {
|
|
2653
|
+
/**
|
|
2654
|
+
* @private
|
|
2655
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2656
|
+
*/
|
|
2657
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
2658
|
+
readonly tag: SdkError_Tags.Invalid;
|
|
2659
|
+
readonly inner: Readonly<{
|
|
2660
|
+
code: Code;
|
|
2661
|
+
message: string;
|
|
2662
|
+
fieldViolations: Array<FieldViolation>;
|
|
2663
|
+
}>;
|
|
2664
|
+
name: string;
|
|
2665
|
+
message: string;
|
|
2666
|
+
stack?: string;
|
|
2667
|
+
cause?: unknown;
|
|
2668
|
+
};
|
|
2669
|
+
instanceOf(obj: any): obj is {
|
|
2670
|
+
/**
|
|
2671
|
+
* @private
|
|
2672
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2673
|
+
*/
|
|
2674
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
2675
|
+
readonly tag: SdkError_Tags.Invalid;
|
|
2676
|
+
readonly inner: Readonly<{
|
|
2677
|
+
code: Code;
|
|
2678
|
+
message: string;
|
|
2679
|
+
fieldViolations: Array<FieldViolation>;
|
|
2680
|
+
}>;
|
|
2681
|
+
name: string;
|
|
2682
|
+
message: string;
|
|
2683
|
+
stack?: string;
|
|
2684
|
+
cause?: unknown;
|
|
2685
|
+
};
|
|
2686
|
+
hasInner(obj: any): obj is {
|
|
2687
|
+
/**
|
|
2688
|
+
* @private
|
|
2689
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2690
|
+
*/
|
|
2691
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
2692
|
+
readonly tag: SdkError_Tags.Invalid;
|
|
2693
|
+
readonly inner: Readonly<{
|
|
2694
|
+
code: Code;
|
|
2695
|
+
message: string;
|
|
2696
|
+
fieldViolations: Array<FieldViolation>;
|
|
2697
|
+
}>;
|
|
2698
|
+
name: string;
|
|
2699
|
+
message: string;
|
|
2700
|
+
stack?: string;
|
|
2701
|
+
cause?: unknown;
|
|
2702
|
+
};
|
|
2703
|
+
getInner(obj: {
|
|
2704
|
+
/**
|
|
2705
|
+
* @private
|
|
2706
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2707
|
+
*/
|
|
2708
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
2709
|
+
readonly tag: SdkError_Tags.Invalid;
|
|
2710
|
+
readonly inner: Readonly<{
|
|
2711
|
+
code: Code;
|
|
2712
|
+
message: string;
|
|
2713
|
+
fieldViolations: Array<FieldViolation>;
|
|
2714
|
+
}>;
|
|
2715
|
+
name: string;
|
|
2716
|
+
message: string;
|
|
2717
|
+
stack?: string;
|
|
2718
|
+
cause?: unknown;
|
|
2719
|
+
}): Readonly<{
|
|
2720
|
+
code: Code;
|
|
2721
|
+
message: string;
|
|
2722
|
+
fieldViolations: Array<FieldViolation>;
|
|
2723
|
+
}>;
|
|
2724
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2725
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2726
|
+
stackTraceLimit: number;
|
|
2727
|
+
};
|
|
2728
|
+
Status: {
|
|
2729
|
+
new (inner: {
|
|
2730
|
+
code: Code;
|
|
2731
|
+
message: string;
|
|
2732
|
+
}): {
|
|
2733
|
+
/**
|
|
2734
|
+
* @private
|
|
2735
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2736
|
+
*/
|
|
2737
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
2738
|
+
readonly tag: SdkError_Tags.Status;
|
|
2739
|
+
readonly inner: Readonly<{
|
|
2740
|
+
code: Code;
|
|
2741
|
+
message: string;
|
|
2742
|
+
}>;
|
|
2743
|
+
name: string;
|
|
2744
|
+
message: string;
|
|
2745
|
+
stack?: string;
|
|
2746
|
+
cause?: unknown;
|
|
2747
|
+
};
|
|
2748
|
+
"new"(inner: {
|
|
2749
|
+
code: Code;
|
|
2750
|
+
message: string;
|
|
2751
|
+
}): {
|
|
2752
|
+
/**
|
|
2753
|
+
* @private
|
|
2754
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2755
|
+
*/
|
|
2756
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
2757
|
+
readonly tag: SdkError_Tags.Status;
|
|
2758
|
+
readonly inner: Readonly<{
|
|
2759
|
+
code: Code;
|
|
2760
|
+
message: string;
|
|
2761
|
+
}>;
|
|
2762
|
+
name: string;
|
|
2763
|
+
message: string;
|
|
2764
|
+
stack?: string;
|
|
2765
|
+
cause?: unknown;
|
|
2766
|
+
};
|
|
2767
|
+
instanceOf(obj: any): obj is {
|
|
2768
|
+
/**
|
|
2769
|
+
* @private
|
|
2770
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2771
|
+
*/
|
|
2772
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
2773
|
+
readonly tag: SdkError_Tags.Status;
|
|
2774
|
+
readonly inner: Readonly<{
|
|
2775
|
+
code: Code;
|
|
2776
|
+
message: string;
|
|
2777
|
+
}>;
|
|
2778
|
+
name: string;
|
|
2779
|
+
message: string;
|
|
2780
|
+
stack?: string;
|
|
2781
|
+
cause?: unknown;
|
|
2782
|
+
};
|
|
2783
|
+
hasInner(obj: any): obj is {
|
|
2784
|
+
/**
|
|
2785
|
+
* @private
|
|
2786
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2787
|
+
*/
|
|
2788
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
2789
|
+
readonly tag: SdkError_Tags.Status;
|
|
2790
|
+
readonly inner: Readonly<{
|
|
2791
|
+
code: Code;
|
|
2792
|
+
message: string;
|
|
2793
|
+
}>;
|
|
2794
|
+
name: string;
|
|
2795
|
+
message: string;
|
|
2796
|
+
stack?: string;
|
|
2797
|
+
cause?: unknown;
|
|
2798
|
+
};
|
|
2799
|
+
getInner(obj: {
|
|
2800
|
+
/**
|
|
2801
|
+
* @private
|
|
2802
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2803
|
+
*/
|
|
2804
|
+
readonly [uniffiTypeNameSymbol]: "SdkError";
|
|
2805
|
+
readonly tag: SdkError_Tags.Status;
|
|
2806
|
+
readonly inner: Readonly<{
|
|
2807
|
+
code: Code;
|
|
2808
|
+
message: string;
|
|
2809
|
+
}>;
|
|
2810
|
+
name: string;
|
|
2811
|
+
message: string;
|
|
2812
|
+
stack?: string;
|
|
2813
|
+
cause?: unknown;
|
|
2814
|
+
}): Readonly<{
|
|
2815
|
+
code: Code;
|
|
2816
|
+
message: string;
|
|
2817
|
+
}>;
|
|
2818
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2819
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2820
|
+
stackTraceLimit: number;
|
|
2821
|
+
};
|
|
2822
|
+
}>;
|
|
2823
|
+
/**
|
|
2824
|
+
* The error every SDK call throws: a decoded `google.rpc.Status`, discriminated
|
|
2825
|
+
* as a semantic reason, a request validation, or a bare status. `code` and `message`
|
|
2826
|
+
* are common to every variant.
|
|
2827
|
+
*/
|
|
2828
|
+
type SdkError = InstanceType<typeof SdkError['Reason' | 'Invalid' | 'Status']>;
|
|
2829
|
+
/**
|
|
2830
|
+
* The host-supplied ranged reader: `length()` returns the asset size in bytes, `read_at`
|
|
2831
|
+
* reads `length` bytes starting at `offset`. Each call crosses the FFI boundary, and the
|
|
2832
|
+
* caller controls the backing store (memory, file, S3, HTTP, custom).
|
|
2833
|
+
*
|
|
2834
|
+
* # Both methods are async
|
|
2835
|
+
*
|
|
2836
|
+
* Because storage is: an object store is a round trip, and so is anything behind `fetch`. A
|
|
2837
|
+
* synchronous `read_at` forces every such caller to make the asset local first, which is a
|
|
2838
|
+
* whole copy of a file that may be hundreds of gigabytes, to answer reads the SDK was going to
|
|
2839
|
+
* make one window at a time anyway. Implement this over `aiobotocore`, an S3 client, a ranged
|
|
2840
|
+
* `fetch`, or a plain file, and await whatever it takes.
|
|
2841
|
+
*
|
|
2842
|
+
* The SDK never calls back into the thread that called it (see [`task`](super::task)), so an
|
|
2843
|
+
* implementation is free to be as slow as its storage is.
|
|
2844
|
+
*
|
|
2845
|
+
* # Both methods are fallible
|
|
2846
|
+
*
|
|
2847
|
+
* They have to be: an infallible `read_at` can only report a failed read as a short one, which
|
|
2848
|
+
* is indistinguishable from a legitimate end of file, so an S3 timeout would silently verify or
|
|
2849
|
+
* sign a truncated asset.
|
|
2850
|
+
*/
|
|
2851
|
+
interface RangeSource {
|
|
2852
|
+
length(asyncOpts_?: {
|
|
2853
|
+
signal: AbortSignal;
|
|
2854
|
+
}): Promise<bigint>;
|
|
2855
|
+
readAt(offset: bigint, length: number, asyncOpts_?: {
|
|
2856
|
+
signal: AbortSignal;
|
|
2857
|
+
}): Promise<ArrayBuffer>;
|
|
2858
|
+
}
|
|
2859
|
+
/**
|
|
2860
|
+
* The host-supplied ranged reader: `length()` returns the asset size in bytes, `read_at`
|
|
2861
|
+
* reads `length` bytes starting at `offset`. Each call crosses the FFI boundary, and the
|
|
2862
|
+
* caller controls the backing store (memory, file, S3, HTTP, custom).
|
|
2863
|
+
*
|
|
2864
|
+
* # Both methods are async
|
|
2865
|
+
*
|
|
2866
|
+
* Because storage is: an object store is a round trip, and so is anything behind `fetch`. A
|
|
2867
|
+
* synchronous `read_at` forces every such caller to make the asset local first, which is a
|
|
2868
|
+
* whole copy of a file that may be hundreds of gigabytes, to answer reads the SDK was going to
|
|
2869
|
+
* make one window at a time anyway. Implement this over `aiobotocore`, an S3 client, a ranged
|
|
2870
|
+
* `fetch`, or a plain file, and await whatever it takes.
|
|
2871
|
+
*
|
|
2872
|
+
* The SDK never calls back into the thread that called it (see [`task`](super::task)), so an
|
|
2873
|
+
* implementation is free to be as slow as its storage is.
|
|
2874
|
+
*
|
|
2875
|
+
* # Both methods are fallible
|
|
2876
|
+
*
|
|
2877
|
+
* They have to be: an infallible `read_at` can only report a failed read as a short one, which
|
|
2878
|
+
* is indistinguishable from a legitimate end of file, so an S3 timeout would silently verify or
|
|
2879
|
+
* sign a truncated asset.
|
|
2880
|
+
*/
|
|
2881
|
+
declare class RangeSourceImpl extends UniffiAbstractObject implements RangeSource {
|
|
2882
|
+
readonly [uniffiTypeNameSymbol] = "RangeSourceImpl";
|
|
2883
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
2884
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
2885
|
+
private constructor();
|
|
2886
|
+
length(asyncOpts_?: {
|
|
2887
|
+
signal: AbortSignal;
|
|
2888
|
+
}): Promise<bigint>;
|
|
2889
|
+
readAt(offset: bigint, length: number, asyncOpts_?: {
|
|
2890
|
+
signal: AbortSignal;
|
|
2891
|
+
}): Promise<ArrayBuffer>;
|
|
2892
|
+
uniffiDestroy(): void;
|
|
2893
|
+
static instanceOf(obj_: any): obj_ is RangeSourceImpl;
|
|
2894
|
+
}
|
|
2895
|
+
/**
|
|
2896
|
+
* A soft-binding binder: how a recoverable binding is derived from an asset. Put these inside the
|
|
2897
|
+
* issuer's manifest mode to sign and index under them, and pass them in verify options to recover.
|
|
2898
|
+
*/
|
|
2899
|
+
interface BinderLike {
|
|
2900
|
+
/**
|
|
2901
|
+
* This binder's binding for `source`, or `None` when there is none. `format` overrides
|
|
2902
|
+
* the format sniffed from the leading bytes.
|
|
2903
|
+
*
|
|
2904
|
+
* `None` and an error mean different things: `None` is "no binding here", an error is
|
|
2905
|
+
* "the question could not be answered", so a binder that failed never reads as an
|
|
2906
|
+
* unmarked asset.
|
|
2907
|
+
*
|
|
2908
|
+
* # Errors
|
|
2909
|
+
*
|
|
2910
|
+
* An unreadable source, or a binder that could not answer.
|
|
2911
|
+
*/
|
|
2912
|
+
derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
|
|
2913
|
+
signal: AbortSignal;
|
|
2914
|
+
}): Promise<SoftBinding | undefined>;
|
|
2915
|
+
}
|
|
2916
|
+
/**
|
|
2917
|
+
* @deprecated Use `BinderLike` instead.
|
|
2918
|
+
*/
|
|
2919
|
+
type BinderInterface = BinderLike;
|
|
2920
|
+
/**
|
|
2921
|
+
* A soft-binding binder: how a recoverable binding is derived from an asset. Put these inside the
|
|
2922
|
+
* issuer's manifest mode to sign and index under them, and pass them in verify options to recover.
|
|
2923
|
+
*/
|
|
2924
|
+
declare class Binder extends UniffiAbstractObject implements BinderLike {
|
|
2925
|
+
readonly [uniffiTypeNameSymbol] = "Binder";
|
|
2926
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
2927
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
2928
|
+
private constructor();
|
|
2929
|
+
/**
|
|
2930
|
+
* A binding you already hold, such as an out-of-band video ISCC. Reads nothing.
|
|
2931
|
+
*/
|
|
2932
|
+
static held(binding: SoftBinding): BinderLike;
|
|
2933
|
+
/**
|
|
2934
|
+
* Local ISCC Image-Code for supported image formats.
|
|
2935
|
+
*/
|
|
2936
|
+
static iscc(): BinderLike;
|
|
2937
|
+
/**
|
|
2938
|
+
* This binder's binding for `source`, or `None` when there is none. `format` overrides
|
|
2939
|
+
* the format sniffed from the leading bytes.
|
|
2940
|
+
*
|
|
2941
|
+
* `None` and an error mean different things: `None` is "no binding here", an error is
|
|
2942
|
+
* "the question could not be answered", so a binder that failed never reads as an
|
|
2943
|
+
* unmarked asset.
|
|
2944
|
+
*
|
|
2945
|
+
* # Errors
|
|
2946
|
+
*
|
|
2947
|
+
* An unreadable source, or a binder that could not answer.
|
|
2948
|
+
*/
|
|
2949
|
+
derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
|
|
2950
|
+
signal: AbortSignal;
|
|
2951
|
+
}): Promise<SoftBinding | undefined>;
|
|
2952
|
+
uniffiDestroy(): void;
|
|
2953
|
+
static instanceOf(obj_: any): obj_ is Binder;
|
|
2954
|
+
}
|
|
2955
|
+
/**
|
|
2956
|
+
* The read surface a plugin implements. Implemented by the CALLER, in Rust
|
|
2957
|
+
* behind its own cdylib or directly in the host language, and handed to `verify`.
|
|
2958
|
+
*
|
|
2959
|
+
* Every method is given the asset as a [`RangeSource`], so a plugin never opens its own
|
|
2960
|
+
* view and the bytes it parses are the bytes the core hashes.
|
|
2961
|
+
*/
|
|
2962
|
+
interface PluginRead {
|
|
2963
|
+
/**
|
|
2964
|
+
* The media types this plugin owns: its dispatch set, declared as data. The core
|
|
2965
|
+
* asserts a [`sniff`](Self::sniff) result is a member of this list.
|
|
2966
|
+
*/
|
|
2967
|
+
mediaTypes(): Array<string>;
|
|
2968
|
+
/**
|
|
2969
|
+
* Recognize the format from the real asset, or `None` to decline it.
|
|
2970
|
+
*/
|
|
2971
|
+
sniff(src: RangeSource, asyncOpts_?: {
|
|
2972
|
+
signal: AbortSignal;
|
|
2973
|
+
}): Promise<string | undefined>;
|
|
2974
|
+
/**
|
|
2975
|
+
* The manifest window(s), or empty when none is present. MUST be byte-identical
|
|
2976
|
+
* regardless of slot contents (empty at sign, filled after embed, zeroed after strip).
|
|
2977
|
+
*/
|
|
2978
|
+
locate(src: RangeSource, asyncOpts_?: {
|
|
2979
|
+
signal: AbortSignal;
|
|
2980
|
+
}): Promise<Array<Region>>;
|
|
2981
|
+
}
|
|
2982
|
+
/**
|
|
2983
|
+
* The plugins one `verify` call may dispatch to. Rust-backed on purpose: see
|
|
2984
|
+
* the module docs for why a plain sequence of foreign objects cannot cross today.
|
|
2985
|
+
*/
|
|
2986
|
+
interface PluginRegistryLike {
|
|
2987
|
+
/**
|
|
2988
|
+
* Whether no plugin is registered, meaning a c2pa-only verify.
|
|
2989
|
+
*
|
|
2990
|
+
* # Errors
|
|
2991
|
+
*
|
|
2992
|
+
* `Internal` when the registry lock was poisoned by a panicking plugin.
|
|
2993
|
+
*/
|
|
2994
|
+
isEmpty(): boolean;
|
|
2995
|
+
/**
|
|
2996
|
+
* How many plugins are registered.
|
|
2997
|
+
*
|
|
2998
|
+
* # Errors
|
|
2999
|
+
*
|
|
3000
|
+
* `Internal` when the registry lock was poisoned by a panicking plugin.
|
|
3001
|
+
*/
|
|
3002
|
+
len(): number;
|
|
3003
|
+
/**
|
|
3004
|
+
* Add one plugin. The first registered whose `sniff` hits owns the asset; `c2pa`
|
|
3005
|
+
* remains the built-in fallback when none does. Verifying dispatches on content, not on
|
|
3006
|
+
* a declared format: there is no trustworthy declaration at verify time.
|
|
3007
|
+
*
|
|
3008
|
+
* # Errors
|
|
3009
|
+
*
|
|
3010
|
+
* `Internal` when the registry lock was poisoned by a panicking plugin.
|
|
3011
|
+
*/
|
|
3012
|
+
register(plugin: PluginRead): void;
|
|
3013
|
+
}
|
|
3014
|
+
/**
|
|
3015
|
+
* @deprecated Use `PluginRegistryLike` instead.
|
|
3016
|
+
*/
|
|
3017
|
+
type PluginRegistryInterface = PluginRegistryLike;
|
|
3018
|
+
/**
|
|
3019
|
+
* The plugins one `verify` call may dispatch to. Rust-backed on purpose: see
|
|
3020
|
+
* the module docs for why a plain sequence of foreign objects cannot cross today.
|
|
3021
|
+
*/
|
|
3022
|
+
declare class PluginRegistry extends UniffiAbstractObject implements PluginRegistryLike {
|
|
3023
|
+
readonly [uniffiTypeNameSymbol] = "PluginRegistry";
|
|
3024
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
3025
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
3026
|
+
constructor();
|
|
3027
|
+
/**
|
|
3028
|
+
* Whether no plugin is registered, meaning a c2pa-only verify.
|
|
3029
|
+
*
|
|
3030
|
+
* # Errors
|
|
3031
|
+
*
|
|
3032
|
+
* `Internal` when the registry lock was poisoned by a panicking plugin.
|
|
3033
|
+
*/
|
|
3034
|
+
isEmpty(): boolean;
|
|
3035
|
+
/**
|
|
3036
|
+
* How many plugins are registered.
|
|
3037
|
+
*
|
|
3038
|
+
* # Errors
|
|
3039
|
+
*
|
|
3040
|
+
* `Internal` when the registry lock was poisoned by a panicking plugin.
|
|
3041
|
+
*/
|
|
3042
|
+
len(): number;
|
|
3043
|
+
/**
|
|
3044
|
+
* Add one plugin. The first registered whose `sniff` hits owns the asset; `c2pa`
|
|
3045
|
+
* remains the built-in fallback when none does. Verifying dispatches on content, not on
|
|
3046
|
+
* a declared format: there is no trustworthy declaration at verify time.
|
|
3047
|
+
*
|
|
3048
|
+
* # Errors
|
|
3049
|
+
*
|
|
3050
|
+
* `Internal` when the registry lock was poisoned by a panicking plugin.
|
|
3051
|
+
*/
|
|
3052
|
+
register(plugin: PluginRead): void;
|
|
3053
|
+
uniffiDestroy(): void;
|
|
3054
|
+
static instanceOf(obj_: any): obj_ is PluginRegistry;
|
|
3055
|
+
}
|
|
3056
|
+
/**
|
|
3057
|
+
* Everything one [`AssetVerifier::verify`] needs beyond the asset.
|
|
3058
|
+
*
|
|
3059
|
+
* `binders` composes soft-binding recovery after the embedded pass, tried in order,
|
|
3060
|
+
* first hit wins; pass `[]` for none. `plugins` carries the caller's plugins for non-c2pa formats
|
|
3061
|
+
* (e.g. MXF); a built-in C2PA media format needs none.
|
|
3062
|
+
*/
|
|
3063
|
+
type VerifyOptions = {
|
|
3064
|
+
binders: Array<BinderLike>;
|
|
3065
|
+
plugins?: PluginRegistryLike;
|
|
3066
|
+
};
|
|
3067
|
+
/**
|
|
3068
|
+
* Generated factory for {@link VerifyOptions} record objects.
|
|
3069
|
+
*/
|
|
3070
|
+
declare const VerifyOptions: Readonly<{
|
|
3071
|
+
create: (partial: Partial<VerifyOptions> & Required<Omit<VerifyOptions, "plugins">>) => VerifyOptions;
|
|
3072
|
+
new: (partial: Partial<VerifyOptions> & Required<Omit<VerifyOptions, "plugins">>) => VerifyOptions;
|
|
3073
|
+
defaults: () => Partial<VerifyOptions>;
|
|
3074
|
+
}>;
|
|
3075
|
+
declare enum SegmentValidation_Tags {
|
|
3076
|
+
Init = "Init",
|
|
3077
|
+
Media = "Media",
|
|
3078
|
+
Unknown = "Unknown"
|
|
3079
|
+
}
|
|
3080
|
+
/**
|
|
3081
|
+
* Result of `StreamValidation.validate`.
|
|
3082
|
+
*/
|
|
3083
|
+
declare const SegmentValidation: Readonly<{
|
|
3084
|
+
instanceOf: (obj: any) => obj is SegmentValidation;
|
|
3085
|
+
Init: {
|
|
3086
|
+
new (v0: InitValidation): {
|
|
3087
|
+
/**
|
|
3088
|
+
* @private
|
|
3089
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3090
|
+
*/
|
|
3091
|
+
readonly [uniffiTypeNameSymbol]: "SegmentValidation";
|
|
3092
|
+
readonly tag: SegmentValidation_Tags.Init;
|
|
3093
|
+
readonly inner: Readonly<[InitValidation]>;
|
|
3094
|
+
};
|
|
3095
|
+
"new"(v0: InitValidation): {
|
|
3096
|
+
/**
|
|
3097
|
+
* @private
|
|
3098
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3099
|
+
*/
|
|
3100
|
+
readonly [uniffiTypeNameSymbol]: "SegmentValidation";
|
|
3101
|
+
readonly tag: SegmentValidation_Tags.Init;
|
|
3102
|
+
readonly inner: Readonly<[InitValidation]>;
|
|
3103
|
+
};
|
|
3104
|
+
instanceOf(obj: any): obj is {
|
|
3105
|
+
/**
|
|
3106
|
+
* @private
|
|
3107
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3108
|
+
*/
|
|
3109
|
+
readonly [uniffiTypeNameSymbol]: "SegmentValidation";
|
|
3110
|
+
readonly tag: SegmentValidation_Tags.Init;
|
|
3111
|
+
readonly inner: Readonly<[InitValidation]>;
|
|
3112
|
+
};
|
|
3113
|
+
};
|
|
3114
|
+
Media: {
|
|
3115
|
+
new (v0: MediaValidation): {
|
|
3116
|
+
/**
|
|
3117
|
+
* @private
|
|
3118
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3119
|
+
*/
|
|
3120
|
+
readonly [uniffiTypeNameSymbol]: "SegmentValidation";
|
|
3121
|
+
readonly tag: SegmentValidation_Tags.Media;
|
|
3122
|
+
readonly inner: Readonly<[MediaValidation]>;
|
|
3123
|
+
};
|
|
3124
|
+
"new"(v0: MediaValidation): {
|
|
3125
|
+
/**
|
|
3126
|
+
* @private
|
|
3127
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3128
|
+
*/
|
|
3129
|
+
readonly [uniffiTypeNameSymbol]: "SegmentValidation";
|
|
3130
|
+
readonly tag: SegmentValidation_Tags.Media;
|
|
3131
|
+
readonly inner: Readonly<[MediaValidation]>;
|
|
3132
|
+
};
|
|
3133
|
+
instanceOf(obj: any): obj is {
|
|
3134
|
+
/**
|
|
3135
|
+
* @private
|
|
3136
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3137
|
+
*/
|
|
3138
|
+
readonly [uniffiTypeNameSymbol]: "SegmentValidation";
|
|
3139
|
+
readonly tag: SegmentValidation_Tags.Media;
|
|
3140
|
+
readonly inner: Readonly<[MediaValidation]>;
|
|
3141
|
+
};
|
|
3142
|
+
};
|
|
3143
|
+
Unknown: {
|
|
3144
|
+
new (): {
|
|
3145
|
+
/**
|
|
3146
|
+
* @private
|
|
3147
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3148
|
+
*/
|
|
3149
|
+
readonly [uniffiTypeNameSymbol]: "SegmentValidation";
|
|
3150
|
+
readonly tag: SegmentValidation_Tags.Unknown;
|
|
3151
|
+
};
|
|
3152
|
+
"new"(): {
|
|
3153
|
+
/**
|
|
3154
|
+
* @private
|
|
3155
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3156
|
+
*/
|
|
3157
|
+
readonly [uniffiTypeNameSymbol]: "SegmentValidation";
|
|
3158
|
+
readonly tag: SegmentValidation_Tags.Unknown;
|
|
3159
|
+
};
|
|
3160
|
+
instanceOf(obj: any): obj is {
|
|
3161
|
+
/**
|
|
3162
|
+
* @private
|
|
3163
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3164
|
+
*/
|
|
3165
|
+
readonly [uniffiTypeNameSymbol]: "SegmentValidation";
|
|
3166
|
+
readonly tag: SegmentValidation_Tags.Unknown;
|
|
3167
|
+
};
|
|
3168
|
+
};
|
|
3169
|
+
}>;
|
|
3170
|
+
/**
|
|
3171
|
+
* Result of `StreamValidation.validate`.
|
|
3172
|
+
*/
|
|
3173
|
+
type SegmentValidation = InstanceType<typeof SegmentValidation['Init' | 'Media' | 'Unknown']>;
|
|
3174
|
+
/**
|
|
3175
|
+
* A C2PA asset verifier bound to a trust configuration. Construct once, verify many.
|
|
3176
|
+
*/
|
|
3177
|
+
interface AssetVerifierLike {
|
|
3178
|
+
/**
|
|
3179
|
+
* Verify an asset from a [`RangeSource`] (the host's ranged reader). `binders`
|
|
3180
|
+
* compose soft-binding recovery after the embedded pass, tried in order,
|
|
3181
|
+
* first hit wins; pass `[]` for none. `plugins` carries the caller's
|
|
3182
|
+
* plugins for non-c2pa formats (e.g. MXF); pass an empty `PluginRegistry` for a
|
|
3183
|
+
* built-in C2PA media format. The SDK links no plugin itself. Returns embedded/recovered
|
|
3184
|
+
* credentials plus typed recovery and golden-comparison outcomes.
|
|
3185
|
+
*
|
|
3186
|
+
* # Errors
|
|
3187
|
+
*
|
|
3188
|
+
* `READER_INVALID` when the source can't be read/parsed, or a registry failure
|
|
3189
|
+
* involving the asset backend, registry, or a fetched manifest. Local binder faults,
|
|
3190
|
+
* refused queries, and skipped oversized uploads are retained in the recovery summary.
|
|
3191
|
+
*/
|
|
3192
|
+
verify(source: RangeSource, options: VerifyOptions, asyncOpts_?: {
|
|
3193
|
+
signal: AbortSignal;
|
|
3194
|
+
}): Promise<AssetVerification>;
|
|
3195
|
+
}
|
|
3196
|
+
/**
|
|
3197
|
+
* @deprecated Use `AssetVerifierLike` instead.
|
|
3198
|
+
*/
|
|
3199
|
+
type AssetVerifierInterface = AssetVerifierLike;
|
|
3200
|
+
/**
|
|
3201
|
+
* A C2PA asset verifier bound to a trust configuration. Construct once, verify many.
|
|
3202
|
+
*/
|
|
3203
|
+
declare class AssetVerifier extends UniffiAbstractObject implements AssetVerifierLike {
|
|
3204
|
+
readonly [uniffiTypeNameSymbol] = "AssetVerifier";
|
|
3205
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
3206
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
3207
|
+
private constructor();
|
|
3208
|
+
/**
|
|
3209
|
+
* Build a verifier from [`AssetVerifierOptions`].
|
|
3210
|
+
*
|
|
3211
|
+
* # Errors
|
|
3212
|
+
*
|
|
3213
|
+
* `TRUST_CONFIG_INVALID` when the trust anchors can't be parsed.
|
|
3214
|
+
*/
|
|
3215
|
+
static create(options: AssetVerifierOptions): AssetVerifierLike;
|
|
3216
|
+
/**
|
|
3217
|
+
* Verify an asset from a [`RangeSource`] (the host's ranged reader). `binders`
|
|
3218
|
+
* compose soft-binding recovery after the embedded pass, tried in order,
|
|
3219
|
+
* first hit wins; pass `[]` for none. `plugins` carries the caller's
|
|
3220
|
+
* plugins for non-c2pa formats (e.g. MXF); pass an empty `PluginRegistry` for a
|
|
3221
|
+
* built-in C2PA media format. The SDK links no plugin itself. Returns embedded/recovered
|
|
3222
|
+
* credentials plus typed recovery and golden-comparison outcomes.
|
|
3223
|
+
*
|
|
3224
|
+
* # Errors
|
|
3225
|
+
*
|
|
3226
|
+
* `READER_INVALID` when the source can't be read/parsed, or a registry failure
|
|
3227
|
+
* involving the asset backend, registry, or a fetched manifest. Local binder faults,
|
|
3228
|
+
* refused queries, and skipped oversized uploads are retained in the recovery summary.
|
|
3229
|
+
*/
|
|
3230
|
+
verify(source: RangeSource, options: VerifyOptions, asyncOpts_?: {
|
|
3231
|
+
signal: AbortSignal;
|
|
3232
|
+
}): Promise<AssetVerification>;
|
|
3233
|
+
uniffiDestroy(): void;
|
|
3234
|
+
static instanceOf(obj_: any): obj_ is AssetVerifier;
|
|
3235
|
+
}
|
|
3236
|
+
/**
|
|
3237
|
+
* A [`RangeSource`] over a local file, opened and read by the SDK itself.
|
|
3238
|
+
*
|
|
3239
|
+
* The only source whose bytes never enter the host language. The other two both put the asset
|
|
3240
|
+
* through it: a [`RangeSource`] written in the host is awaited for every window, and
|
|
3241
|
+
* [`MemorySource`] avoids that only by holding the whole asset and copying it across the
|
|
3242
|
+
* boundary to get there. A path costs neither, so the reads happen on the same thread that is
|
|
3243
|
+
* already hashing, with no crossing at all.
|
|
3244
|
+
*
|
|
3245
|
+
* That is what makes the size ceilings stop applying: there is no byte array to count in an
|
|
3246
|
+
* `i32` and nothing resident, so a multi-GB master reads at the disk's speed rather than the
|
|
3247
|
+
* host thread's.
|
|
3248
|
+
*
|
|
3249
|
+
* This is an implementation of the [`RangeSource`] interface, not a way around it: the SDK still
|
|
3250
|
+
* only ever asks for the ranges it needs, and no entry point takes a path.
|
|
3251
|
+
*/
|
|
3252
|
+
interface FileSourceLike {
|
|
3253
|
+
length(asyncOpts_?: {
|
|
3254
|
+
signal: AbortSignal;
|
|
3255
|
+
}): Promise<bigint>;
|
|
3256
|
+
readAt(offset: bigint, length: number, asyncOpts_?: {
|
|
3257
|
+
signal: AbortSignal;
|
|
3258
|
+
}): Promise<ArrayBuffer>;
|
|
3259
|
+
}
|
|
3260
|
+
/**
|
|
3261
|
+
* @deprecated Use `FileSourceLike` instead.
|
|
3262
|
+
*/
|
|
3263
|
+
type FileSourceInterface = FileSourceLike;
|
|
3264
|
+
/**
|
|
3265
|
+
* A [`RangeSource`] over a local file, opened and read by the SDK itself.
|
|
3266
|
+
*
|
|
3267
|
+
* The only source whose bytes never enter the host language. The other two both put the asset
|
|
3268
|
+
* through it: a [`RangeSource`] written in the host is awaited for every window, and
|
|
3269
|
+
* [`MemorySource`] avoids that only by holding the whole asset and copying it across the
|
|
3270
|
+
* boundary to get there. A path costs neither, so the reads happen on the same thread that is
|
|
3271
|
+
* already hashing, with no crossing at all.
|
|
3272
|
+
*
|
|
3273
|
+
* That is what makes the size ceilings stop applying: there is no byte array to count in an
|
|
3274
|
+
* `i32` and nothing resident, so a multi-GB master reads at the disk's speed rather than the
|
|
3275
|
+
* host thread's.
|
|
3276
|
+
*
|
|
3277
|
+
* This is an implementation of the [`RangeSource`] interface, not a way around it: the SDK still
|
|
3278
|
+
* only ever asks for the ranges it needs, and no entry point takes a path.
|
|
3279
|
+
*/
|
|
3280
|
+
declare class FileSource extends UniffiAbstractObject implements FileSourceLike {
|
|
3281
|
+
readonly [uniffiTypeNameSymbol] = "FileSource";
|
|
3282
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
3283
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
3284
|
+
private constructor();
|
|
3285
|
+
/**
|
|
3286
|
+
* Open `path` for reading.
|
|
3287
|
+
*
|
|
3288
|
+
* # Errors
|
|
3289
|
+
*
|
|
3290
|
+
* The file does not exist, is not permitted, or cannot be opened.
|
|
3291
|
+
*/
|
|
3292
|
+
static open(path: string): FileSourceLike;
|
|
3293
|
+
length(asyncOpts_?: {
|
|
3294
|
+
signal: AbortSignal;
|
|
3295
|
+
}): Promise<bigint>;
|
|
3296
|
+
readAt(offset: bigint, length: number, asyncOpts_?: {
|
|
3297
|
+
signal: AbortSignal;
|
|
3298
|
+
}): Promise<ArrayBuffer>;
|
|
3299
|
+
uniffiDestroy(): void;
|
|
3300
|
+
static instanceOf(obj_: any): obj_ is FileSource;
|
|
3301
|
+
}
|
|
3302
|
+
/**
|
|
3303
|
+
* An in-memory [`RangeSource`], for a caller that already holds the whole asset as
|
|
3304
|
+
* bytes and doesn't want to write a custom source. A **native** implementation of a
|
|
3305
|
+
* `with_foreign` interface (`#[uniffi::export]` on the trait impl, not the foreign
|
|
3306
|
+
* callback path), so the generated binding is a plain constructible object and a Python
|
|
3307
|
+
* caller writes no subclass at all: `MemorySource(data)`.
|
|
3308
|
+
*
|
|
3309
|
+
* # Size ceiling
|
|
3310
|
+
*
|
|
3311
|
+
* The asset is resident for the object's lifetime, and the binding counts a byte array in an
|
|
3312
|
+
* `i32`, so a buffer at or above 2 GiB cannot cross the boundary at all. The constructor
|
|
3313
|
+
* rejects one rather than letting a later read come back quietly truncated. Implement
|
|
3314
|
+
* [`RangeSource`] over a file handle for anything approaching that: the SDK only ever asks for
|
|
3315
|
+
* bounded ranges, so nothing else has to hold the asset.
|
|
3316
|
+
*
|
|
3317
|
+
* Construction copies the whole asset across the boundary, on the calling thread: about 5ms for
|
|
3318
|
+
* 10 MB, 315ms for 500 MB. That is the one part of a sign or verify the SDK cannot move off your
|
|
3319
|
+
* thread, and neither a ranged source nor [`FileSource`] pays it.
|
|
3320
|
+
*/
|
|
3321
|
+
interface MemorySourceLike {
|
|
3322
|
+
length(asyncOpts_?: {
|
|
3323
|
+
signal: AbortSignal;
|
|
3324
|
+
}): Promise<bigint>;
|
|
3325
|
+
readAt(offset: bigint, length: number, asyncOpts_?: {
|
|
3326
|
+
signal: AbortSignal;
|
|
3327
|
+
}): Promise<ArrayBuffer>;
|
|
3328
|
+
}
|
|
3329
|
+
/**
|
|
3330
|
+
* @deprecated Use `MemorySourceLike` instead.
|
|
3331
|
+
*/
|
|
3332
|
+
type MemorySourceInterface = MemorySourceLike;
|
|
3333
|
+
/**
|
|
3334
|
+
* An in-memory [`RangeSource`], for a caller that already holds the whole asset as
|
|
3335
|
+
* bytes and doesn't want to write a custom source. A **native** implementation of a
|
|
3336
|
+
* `with_foreign` interface (`#[uniffi::export]` on the trait impl, not the foreign
|
|
3337
|
+
* callback path), so the generated binding is a plain constructible object and a Python
|
|
3338
|
+
* caller writes no subclass at all: `MemorySource(data)`.
|
|
3339
|
+
*
|
|
3340
|
+
* # Size ceiling
|
|
3341
|
+
*
|
|
3342
|
+
* The asset is resident for the object's lifetime, and the binding counts a byte array in an
|
|
3343
|
+
* `i32`, so a buffer at or above 2 GiB cannot cross the boundary at all. The constructor
|
|
3344
|
+
* rejects one rather than letting a later read come back quietly truncated. Implement
|
|
3345
|
+
* [`RangeSource`] over a file handle for anything approaching that: the SDK only ever asks for
|
|
3346
|
+
* bounded ranges, so nothing else has to hold the asset.
|
|
3347
|
+
*
|
|
3348
|
+
* Construction copies the whole asset across the boundary, on the calling thread: about 5ms for
|
|
3349
|
+
* 10 MB, 315ms for 500 MB. That is the one part of a sign or verify the SDK cannot move off your
|
|
3350
|
+
* thread, and neither a ranged source nor [`FileSource`] pays it.
|
|
3351
|
+
*/
|
|
3352
|
+
declare class MemorySource extends UniffiAbstractObject implements MemorySourceLike {
|
|
3353
|
+
readonly [uniffiTypeNameSymbol] = "MemorySource";
|
|
3354
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
3355
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
3356
|
+
/**
|
|
3357
|
+
* # Errors
|
|
3358
|
+
*
|
|
3359
|
+
* The buffer is at or above the 2 GiB a byte array can be counted in.
|
|
3360
|
+
*/
|
|
3361
|
+
constructor(data: ArrayBuffer);
|
|
3362
|
+
length(asyncOpts_?: {
|
|
3363
|
+
signal: AbortSignal;
|
|
3364
|
+
}): Promise<bigint>;
|
|
3365
|
+
readAt(offset: bigint, length: number, asyncOpts_?: {
|
|
3366
|
+
signal: AbortSignal;
|
|
3367
|
+
}): Promise<ArrayBuffer>;
|
|
3368
|
+
uniffiDestroy(): void;
|
|
3369
|
+
static instanceOf(obj_: any): obj_ is MemorySource;
|
|
3370
|
+
}
|
|
3371
|
+
/**
|
|
3372
|
+
* One stream being validated. It owns the session keys and manifest ids its init segments
|
|
3373
|
+
* advertised, so releasing the stream is dropping this object.
|
|
3374
|
+
*/
|
|
3375
|
+
interface StreamValidationLike {
|
|
3376
|
+
/**
|
|
3377
|
+
* Everything this stream's init segments have registered, as CBOR for another node to
|
|
3378
|
+
* [`resume`](StreamVerifier::resume) from.
|
|
3379
|
+
*
|
|
3380
|
+
* The one piece of stream state that leaves the SDK, and only because a clustered
|
|
3381
|
+
* verifier needs it: the init URL is overwritten on rotation, so a node joining during
|
|
3382
|
+
* the overlap cannot rebuild the previous key by refetching. One value, produced once
|
|
3383
|
+
* and consumed once. Not a store.
|
|
3384
|
+
*
|
|
3385
|
+
* # Errors
|
|
3386
|
+
*
|
|
3387
|
+
* `STREAM_INVALID` when a registered session key cannot be re-encoded.
|
|
3388
|
+
*/
|
|
3389
|
+
export_(): ArrayBuffer;
|
|
3390
|
+
/**
|
|
3391
|
+
* Validate any BMFF segment. Classifies internally and dispatches to init- or
|
|
3392
|
+
* media-processing, registering what an init advertises into this handle.
|
|
3393
|
+
*
|
|
3394
|
+
* # Errors
|
|
3395
|
+
*
|
|
3396
|
+
* A `stream.invalid` fault when an init segment is malformed or carries no valid
|
|
3397
|
+
* manifest, or when a media segment arrives before any init was processed for the
|
|
3398
|
+
* stream.
|
|
3399
|
+
*/
|
|
3400
|
+
validate(data: RangeSource, asyncOpts_?: {
|
|
3401
|
+
signal: AbortSignal;
|
|
3402
|
+
}): Promise<SegmentValidation>;
|
|
3403
|
+
}
|
|
3404
|
+
/**
|
|
3405
|
+
* @deprecated Use `StreamValidationLike` instead.
|
|
3406
|
+
*/
|
|
3407
|
+
type StreamValidationInterface = StreamValidationLike;
|
|
3408
|
+
/**
|
|
3409
|
+
* One stream being validated. It owns the session keys and manifest ids its init segments
|
|
3410
|
+
* advertised, so releasing the stream is dropping this object.
|
|
3411
|
+
*/
|
|
3412
|
+
declare class StreamValidation extends UniffiAbstractObject implements StreamValidationLike {
|
|
3413
|
+
readonly [uniffiTypeNameSymbol] = "StreamValidation";
|
|
3414
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
3415
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
3416
|
+
private constructor();
|
|
3417
|
+
/**
|
|
3418
|
+
* Everything this stream's init segments have registered, as CBOR for another node to
|
|
3419
|
+
* [`resume`](StreamVerifier::resume) from.
|
|
3420
|
+
*
|
|
3421
|
+
* The one piece of stream state that leaves the SDK, and only because a clustered
|
|
3422
|
+
* verifier needs it: the init URL is overwritten on rotation, so a node joining during
|
|
3423
|
+
* the overlap cannot rebuild the previous key by refetching. One value, produced once
|
|
3424
|
+
* and consumed once. Not a store.
|
|
3425
|
+
*
|
|
3426
|
+
* # Errors
|
|
3427
|
+
*
|
|
3428
|
+
* `STREAM_INVALID` when a registered session key cannot be re-encoded.
|
|
3429
|
+
*/
|
|
3430
|
+
export_(): ArrayBuffer;
|
|
3431
|
+
/**
|
|
3432
|
+
* Validate any BMFF segment. Classifies internally and dispatches to init- or
|
|
3433
|
+
* media-processing, registering what an init advertises into this handle.
|
|
3434
|
+
*
|
|
3435
|
+
* # Errors
|
|
3436
|
+
*
|
|
3437
|
+
* A `stream.invalid` fault when an init segment is malformed or carries no valid
|
|
3438
|
+
* manifest, or when a media segment arrives before any init was processed for the
|
|
3439
|
+
* stream.
|
|
3440
|
+
*/
|
|
3441
|
+
validate(data: RangeSource, asyncOpts_?: {
|
|
3442
|
+
signal: AbortSignal;
|
|
3443
|
+
}): Promise<SegmentValidation>;
|
|
3444
|
+
uniffiDestroy(): void;
|
|
3445
|
+
static instanceOf(obj_: any): obj_ is StreamValidation;
|
|
3446
|
+
}
|
|
3447
|
+
/**
|
|
3448
|
+
* A live-stream verifier bound to a trust configuration. Construct once with
|
|
3449
|
+
* [`create`](Self::create), then [`open`](Self::open) a stream to feed segments to.
|
|
3450
|
+
*/
|
|
3451
|
+
interface StreamVerifierLike {
|
|
3452
|
+
/**
|
|
3453
|
+
* Open `stream_id` for validation, handing back a [`StreamValidation`] to feed
|
|
3454
|
+
* segments to.
|
|
3455
|
+
*
|
|
3456
|
+
* No I/O: the handle carries the id so it cannot be mistyped or confused with another
|
|
3457
|
+
* stream's, and classification still happens per segment. Opening one id twice hands
|
|
3458
|
+
* back the same live session, so a caller that reconnects keeps the state its earlier
|
|
3459
|
+
* handle accumulated.
|
|
3460
|
+
*/
|
|
3461
|
+
open(streamId: string): StreamValidationLike;
|
|
3462
|
+
/**
|
|
3463
|
+
* Open `stream_id` on the state another node exported, merged into whatever this one
|
|
3464
|
+
* holds for that id already.
|
|
3465
|
+
*
|
|
3466
|
+
* # Errors
|
|
3467
|
+
*
|
|
3468
|
+
* `STREAM_INVALID` when `state` is not a value [`StreamValidation::export`] produced,
|
|
3469
|
+
* or carries a version this SDK no longer reads.
|
|
3470
|
+
*/
|
|
3471
|
+
resume(streamId: string, state: ArrayBuffer): StreamValidationLike;
|
|
3472
|
+
}
|
|
3473
|
+
/**
|
|
3474
|
+
* @deprecated Use `StreamVerifierLike` instead.
|
|
3475
|
+
*/
|
|
3476
|
+
type StreamVerifierInterface = StreamVerifierLike;
|
|
3477
|
+
/**
|
|
3478
|
+
* A live-stream verifier bound to a trust configuration. Construct once with
|
|
3479
|
+
* [`create`](Self::create), then [`open`](Self::open) a stream to feed segments to.
|
|
3480
|
+
*/
|
|
3481
|
+
declare class StreamVerifier extends UniffiAbstractObject implements StreamVerifierLike {
|
|
3482
|
+
readonly [uniffiTypeNameSymbol] = "StreamVerifier";
|
|
3483
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
3484
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
3485
|
+
private constructor();
|
|
3486
|
+
/**
|
|
3487
|
+
* Build a stream verifier from [`StreamVerifierOptions`].
|
|
3488
|
+
*
|
|
3489
|
+
* # Errors
|
|
3490
|
+
*
|
|
3491
|
+
* `TRUST_CONFIG_INVALID` when the trust anchors can't be parsed.
|
|
3492
|
+
*/
|
|
3493
|
+
static create(options: StreamVerifierOptions): StreamVerifierLike;
|
|
3494
|
+
/**
|
|
3495
|
+
* Open `stream_id` for validation, handing back a [`StreamValidation`] to feed
|
|
3496
|
+
* segments to.
|
|
3497
|
+
*
|
|
3498
|
+
* No I/O: the handle carries the id so it cannot be mistyped or confused with another
|
|
3499
|
+
* stream's, and classification still happens per segment. Opening one id twice hands
|
|
3500
|
+
* back the same live session, so a caller that reconnects keeps the state its earlier
|
|
3501
|
+
* handle accumulated.
|
|
3502
|
+
*/
|
|
3503
|
+
open(streamId: string): StreamValidationLike;
|
|
3504
|
+
/**
|
|
3505
|
+
* Open `stream_id` on the state another node exported, merged into whatever this one
|
|
3506
|
+
* holds for that id already.
|
|
3507
|
+
*
|
|
3508
|
+
* # Errors
|
|
3509
|
+
*
|
|
3510
|
+
* `STREAM_INVALID` when `state` is not a value [`StreamValidation::export`] produced,
|
|
3511
|
+
* or carries a version this SDK no longer reads.
|
|
3512
|
+
*/
|
|
3513
|
+
resume(streamId: string, state: ArrayBuffer): StreamValidationLike;
|
|
3514
|
+
uniffiDestroy(): void;
|
|
3515
|
+
static instanceOf(obj_: any): obj_ is StreamVerifier;
|
|
3516
|
+
}
|
|
3517
|
+
/**
|
|
3518
|
+
* This should be called before anything else.
|
|
3519
|
+
*
|
|
3520
|
+
* It is likely that this is being done for you by the library's `index.ts`.
|
|
3521
|
+
*
|
|
3522
|
+
* It checks versions of uniffi between when the Rust scaffolding was generated
|
|
3523
|
+
* and when the bindings were generated.
|
|
3524
|
+
*
|
|
3525
|
+
* It also initializes the machinery to enable Rust to talk back to Javascript.
|
|
3526
|
+
*/
|
|
3527
|
+
declare function uniffiEnsureInitialized(): void;
|
|
3528
|
+
declare const _default$1: Readonly<{
|
|
3529
|
+
initialize: typeof uniffiEnsureInitialized;
|
|
3530
|
+
converters: {
|
|
3531
|
+
FfiConverterTypeActor: {
|
|
3532
|
+
readFromCursor(c: Cursor): Actor;
|
|
3533
|
+
writeIntoCursor(value: Actor, c: Cursor): void;
|
|
3534
|
+
allocationSize(value: Actor): number;
|
|
3535
|
+
lift(value: UniffiByteArray): Actor;
|
|
3536
|
+
lower(value: Actor, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3537
|
+
};
|
|
3538
|
+
FfiConverterTypeAssertionMetadata: {
|
|
3539
|
+
readFromCursor(c: Cursor): AssertionMetadata;
|
|
3540
|
+
writeIntoCursor(value: AssertionMetadata, c: Cursor): void;
|
|
3541
|
+
allocationSize(value: AssertionMetadata): number;
|
|
3542
|
+
lift(value: UniffiByteArray): AssertionMetadata;
|
|
3543
|
+
lower(value: AssertionMetadata, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3544
|
+
};
|
|
3545
|
+
FfiConverterTypeAssetType: {
|
|
3546
|
+
readFromCursor(c: Cursor): AssetType;
|
|
3547
|
+
writeIntoCursor(value: AssetType, c: Cursor): void;
|
|
3548
|
+
allocationSize(value: AssetType): number;
|
|
3549
|
+
lift(value: UniffiByteArray): AssetType;
|
|
3550
|
+
lower(value: AssetType, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3551
|
+
};
|
|
3552
|
+
FfiConverterTypeAssetVerification: {
|
|
3553
|
+
readFromCursor(c: Cursor): AssetVerification;
|
|
3554
|
+
writeIntoCursor(value: AssetVerification, c: Cursor): void;
|
|
3555
|
+
allocationSize(value: AssetVerification): number;
|
|
3556
|
+
lift(value: UniffiByteArray): AssetVerification;
|
|
3557
|
+
lower(value: AssetVerification, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3558
|
+
};
|
|
3559
|
+
FfiConverterTypeAssetVerifier: FfiConverterObject<AssetVerifierLike>;
|
|
3560
|
+
FfiConverterTypeAssetVerifierOptions: {
|
|
3561
|
+
readFromCursor(c: Cursor): AssetVerifierOptions;
|
|
3562
|
+
writeIntoCursor(value: AssetVerifierOptions, c: Cursor): void;
|
|
3563
|
+
allocationSize(value: AssetVerifierOptions): number;
|
|
3564
|
+
lift(value: UniffiByteArray): AssetVerifierOptions;
|
|
3565
|
+
lower(value: AssetVerifierOptions, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3566
|
+
};
|
|
3567
|
+
FfiConverterTypeBinder: FfiConverterObject<BinderLike>;
|
|
3568
|
+
FfiConverterTypeClaimGeneratorInfo: {
|
|
3569
|
+
readFromCursor(c: Cursor): ClaimGeneratorInfo;
|
|
3570
|
+
writeIntoCursor(value: ClaimGeneratorInfo, c: Cursor): void;
|
|
3571
|
+
allocationSize(value: ClaimGeneratorInfo): number;
|
|
3572
|
+
lift(value: UniffiByteArray): ClaimGeneratorInfo;
|
|
3573
|
+
lower(value: ClaimGeneratorInfo, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3574
|
+
};
|
|
3575
|
+
FfiConverterTypeCode: {
|
|
3576
|
+
readFromCursor(c: Cursor): Code;
|
|
3577
|
+
writeIntoCursor(value: Code, c: Cursor): void;
|
|
3578
|
+
allocationSize(value: Code): number;
|
|
3579
|
+
lift(value: UniffiByteArray): Code;
|
|
3580
|
+
lower(value: Code, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3581
|
+
};
|
|
3582
|
+
FfiConverterTypeContentBindingClass: {
|
|
3583
|
+
readFromCursor(c: Cursor): ContentBindingClass;
|
|
3584
|
+
writeIntoCursor(value: ContentBindingClass, c: Cursor): void;
|
|
3585
|
+
allocationSize(value: ContentBindingClass): number;
|
|
3586
|
+
lift(value: UniffiByteArray): ContentBindingClass;
|
|
3587
|
+
lower(value: ContentBindingClass, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3588
|
+
};
|
|
3589
|
+
FfiConverterTypeContentBindingEvidence: {
|
|
3590
|
+
readFromCursor(c: Cursor): ContentBindingEvidence;
|
|
3591
|
+
writeIntoCursor(value: ContentBindingEvidence, c: Cursor): void;
|
|
3592
|
+
allocationSize(value: ContentBindingEvidence): number;
|
|
3593
|
+
lift(value: UniffiByteArray): ContentBindingEvidence;
|
|
3594
|
+
lower(value: ContentBindingEvidence, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3595
|
+
};
|
|
3596
|
+
FfiConverterTypeCoordinate: {
|
|
3597
|
+
readFromCursor(c: Cursor): Coordinate;
|
|
3598
|
+
writeIntoCursor(value: Coordinate, c: Cursor): void;
|
|
3599
|
+
allocationSize(value: Coordinate): number;
|
|
3600
|
+
lift(value: UniffiByteArray): Coordinate;
|
|
3601
|
+
lower(value: Coordinate, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3602
|
+
};
|
|
3603
|
+
FfiConverterTypeCredentialOrigin: {
|
|
3604
|
+
readFromCursor(c: Cursor): CredentialOrigin;
|
|
3605
|
+
writeIntoCursor(value: CredentialOrigin, c: Cursor): void;
|
|
3606
|
+
allocationSize(value: CredentialOrigin): number;
|
|
3607
|
+
lift(value: UniffiByteArray): CredentialOrigin;
|
|
3608
|
+
lower(value: CredentialOrigin, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3609
|
+
};
|
|
3610
|
+
FfiConverterTypeDataSource: {
|
|
3611
|
+
readFromCursor(c: Cursor): DataSource;
|
|
3612
|
+
writeIntoCursor(value: DataSource, c: Cursor): void;
|
|
3613
|
+
allocationSize(value: DataSource): number;
|
|
3614
|
+
lift(value: UniffiByteArray): DataSource;
|
|
3615
|
+
lower(value: DataSource, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3616
|
+
};
|
|
3617
|
+
FfiConverterTypeDeriveOptions: {
|
|
3618
|
+
readFromCursor(c: Cursor): DeriveOptions;
|
|
3619
|
+
writeIntoCursor(value: DeriveOptions, c: Cursor): void;
|
|
3620
|
+
allocationSize(value: DeriveOptions): number;
|
|
3621
|
+
lift(value: UniffiByteArray): DeriveOptions;
|
|
3622
|
+
lower(value: DeriveOptions, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3623
|
+
};
|
|
3624
|
+
FfiConverterTypeEndInclusivity: {
|
|
3625
|
+
readFromCursor(c: Cursor): EndInclusivity;
|
|
3626
|
+
writeIntoCursor(value: EndInclusivity, c: Cursor): void;
|
|
3627
|
+
allocationSize(value: EndInclusivity): number;
|
|
3628
|
+
lift(value: UniffiByteArray): EndInclusivity;
|
|
3629
|
+
lower(value: EndInclusivity, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3630
|
+
};
|
|
3631
|
+
FfiConverterTypeFieldViolation: {
|
|
3632
|
+
readFromCursor(c: Cursor): FieldViolation;
|
|
3633
|
+
writeIntoCursor(value: FieldViolation, c: Cursor): void;
|
|
3634
|
+
allocationSize(value: FieldViolation): number;
|
|
3635
|
+
lift(value: UniffiByteArray): FieldViolation;
|
|
3636
|
+
lower(value: FieldViolation, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3637
|
+
};
|
|
3638
|
+
FfiConverterTypeFileSource: FfiConverterObject<FileSourceLike>;
|
|
3639
|
+
FfiConverterTypeFingerprintCheck: {
|
|
3640
|
+
readFromCursor(c: Cursor): FingerprintCheck;
|
|
3641
|
+
writeIntoCursor(value: FingerprintCheck, c: Cursor): void;
|
|
3642
|
+
allocationSize(value: FingerprintCheck): number;
|
|
3643
|
+
lift(value: UniffiByteArray): FingerprintCheck;
|
|
3644
|
+
lower(value: FingerprintCheck, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3645
|
+
};
|
|
3646
|
+
FfiConverterTypeFoundCredential: {
|
|
3647
|
+
readFromCursor(c: Cursor): FoundCredential;
|
|
3648
|
+
writeIntoCursor(value: FoundCredential, c: Cursor): void;
|
|
3649
|
+
allocationSize(value: FoundCredential): number;
|
|
3650
|
+
lift(value: UniffiByteArray): FoundCredential;
|
|
3651
|
+
lower(value: FoundCredential, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3652
|
+
};
|
|
3653
|
+
FfiConverterTypeFrame: {
|
|
3654
|
+
readFromCursor(c: Cursor): Frame;
|
|
3655
|
+
writeIntoCursor(value: Frame, c: Cursor): void;
|
|
3656
|
+
allocationSize(value: Frame): number;
|
|
3657
|
+
lift(value: UniffiByteArray): Frame;
|
|
3658
|
+
lower(value: Frame, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3659
|
+
};
|
|
3660
|
+
FfiConverterTypeGoldenComparison: {
|
|
3661
|
+
readFromCursor(c: Cursor): GoldenComparison;
|
|
3662
|
+
writeIntoCursor(value: GoldenComparison, c: Cursor): void;
|
|
3663
|
+
allocationSize(value: GoldenComparison): number;
|
|
3664
|
+
lift(value: UniffiByteArray): GoldenComparison;
|
|
3665
|
+
lower(value: GoldenComparison, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3666
|
+
};
|
|
3667
|
+
FfiConverterTypeHashedUri: {
|
|
3668
|
+
readFromCursor(c: Cursor): HashedUri;
|
|
3669
|
+
writeIntoCursor(value: HashedUri, c: Cursor): void;
|
|
3670
|
+
allocationSize(value: HashedUri): number;
|
|
3671
|
+
lift(value: UniffiByteArray): HashedUri;
|
|
3672
|
+
lower(value: HashedUri, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3673
|
+
};
|
|
3674
|
+
FfiConverterTypeIngredient: {
|
|
3675
|
+
readFromCursor(c: Cursor): Ingredient;
|
|
3676
|
+
writeIntoCursor(value: Ingredient, c: Cursor): void;
|
|
3677
|
+
allocationSize(value: Ingredient): number;
|
|
3678
|
+
lift(value: UniffiByteArray): Ingredient;
|
|
3679
|
+
lower(value: Ingredient, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3680
|
+
};
|
|
3681
|
+
FfiConverterTypeIngredientDeltaValidationResult: {
|
|
3682
|
+
readFromCursor(c: Cursor): IngredientDeltaValidationResult;
|
|
3683
|
+
writeIntoCursor(value: IngredientDeltaValidationResult, c: Cursor): void;
|
|
3684
|
+
allocationSize(value: IngredientDeltaValidationResult): number;
|
|
3685
|
+
lift(value: UniffiByteArray): IngredientDeltaValidationResult;
|
|
3686
|
+
lower(value: IngredientDeltaValidationResult, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3687
|
+
};
|
|
3688
|
+
FfiConverterTypeInitValidation: {
|
|
3689
|
+
readFromCursor(c: Cursor): InitValidation;
|
|
3690
|
+
writeIntoCursor(value: InitValidation, c: Cursor): void;
|
|
3691
|
+
allocationSize(value: InitValidation): number;
|
|
3692
|
+
lift(value: UniffiByteArray): InitValidation;
|
|
3693
|
+
lower(value: InitValidation, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3694
|
+
};
|
|
3695
|
+
FfiConverterTypeItem: {
|
|
3696
|
+
readFromCursor(c: Cursor): Item;
|
|
3697
|
+
writeIntoCursor(value: Item, c: Cursor): void;
|
|
3698
|
+
allocationSize(value: Item): number;
|
|
3699
|
+
lift(value: UniffiByteArray): Item;
|
|
3700
|
+
lower(value: Item, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3701
|
+
};
|
|
3702
|
+
FfiConverterTypeManifest: {
|
|
3703
|
+
readFromCursor(c: Cursor): Manifest;
|
|
3704
|
+
writeIntoCursor(value: Manifest, c: Cursor): void;
|
|
3705
|
+
allocationSize(value: Manifest): number;
|
|
3706
|
+
lift(value: UniffiByteArray): Manifest;
|
|
3707
|
+
lower(value: Manifest, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3708
|
+
};
|
|
3709
|
+
FfiConverterTypeManifestAssertion: {
|
|
3710
|
+
readFromCursor(c: Cursor): ManifestAssertion;
|
|
3711
|
+
writeIntoCursor(value: ManifestAssertion, c: Cursor): void;
|
|
3712
|
+
allocationSize(value: ManifestAssertion): number;
|
|
3713
|
+
lift(value: UniffiByteArray): ManifestAssertion;
|
|
3714
|
+
lower(value: ManifestAssertion, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3715
|
+
};
|
|
3716
|
+
FfiConverterTypeManifestAssertionKind: {
|
|
3717
|
+
readFromCursor(c: Cursor): ManifestAssertionKind;
|
|
3718
|
+
writeIntoCursor(value: ManifestAssertionKind, c: Cursor): void;
|
|
3719
|
+
allocationSize(value: ManifestAssertionKind): number;
|
|
3720
|
+
lift(value: UniffiByteArray): ManifestAssertionKind;
|
|
3721
|
+
lower(value: ManifestAssertionKind, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3722
|
+
};
|
|
3723
|
+
FfiConverterTypeManifestStore: {
|
|
3724
|
+
readFromCursor(c: Cursor): ManifestStore;
|
|
3725
|
+
writeIntoCursor(value: ManifestStore, c: Cursor): void;
|
|
3726
|
+
allocationSize(value: ManifestStore): number;
|
|
3727
|
+
lift(value: UniffiByteArray): ManifestStore;
|
|
3728
|
+
lower(value: ManifestStore, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3729
|
+
};
|
|
3730
|
+
FfiConverterTypeMediaValidation: {
|
|
3731
|
+
readFromCursor(c: Cursor): MediaValidation;
|
|
3732
|
+
writeIntoCursor(value: MediaValidation, c: Cursor): void;
|
|
3733
|
+
allocationSize(value: MediaValidation): number;
|
|
3734
|
+
lift(value: UniffiByteArray): MediaValidation;
|
|
3735
|
+
lower(value: MediaValidation, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3736
|
+
};
|
|
3737
|
+
FfiConverterTypeMemorySource: FfiConverterObject<MemorySourceLike>;
|
|
3738
|
+
FfiConverterTypePluginRegistry: FfiConverterObject<PluginRegistryLike>;
|
|
3739
|
+
FfiConverterTypeRange: {
|
|
3740
|
+
readFromCursor(c: Cursor): Range;
|
|
3741
|
+
writeIntoCursor(value: Range, c: Cursor): void;
|
|
3742
|
+
allocationSize(value: Range): number;
|
|
3743
|
+
lift(value: UniffiByteArray): Range;
|
|
3744
|
+
lower(value: Range, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3745
|
+
};
|
|
3746
|
+
FfiConverterTypeRangeSource: FfiConverterObjectWithCallbacks<RangeSource>;
|
|
3747
|
+
FfiConverterTypeRangeType: {
|
|
3748
|
+
readFromCursor(c: Cursor): RangeType;
|
|
3749
|
+
writeIntoCursor(value: RangeType, c: Cursor): void;
|
|
3750
|
+
allocationSize(value: RangeType): number;
|
|
3751
|
+
lift(value: UniffiByteArray): RangeType;
|
|
3752
|
+
lower(value: RangeType, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3753
|
+
};
|
|
3754
|
+
FfiConverterTypeRecoveryIssue: {
|
|
3755
|
+
readFromCursor(c: Cursor): RecoveryIssue;
|
|
3756
|
+
writeIntoCursor(value: RecoveryIssue, c: Cursor): void;
|
|
3757
|
+
allocationSize(value: RecoveryIssue): number;
|
|
3758
|
+
lift(value: UniffiByteArray): RecoveryIssue;
|
|
3759
|
+
lower(value: RecoveryIssue, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3760
|
+
};
|
|
3761
|
+
FfiConverterTypeRecoveryIssueKind: {
|
|
3762
|
+
readFromCursor(c: Cursor): RecoveryIssueKind;
|
|
3763
|
+
writeIntoCursor(value: RecoveryIssueKind, c: Cursor): void;
|
|
3764
|
+
allocationSize(value: RecoveryIssueKind): number;
|
|
3765
|
+
lift(value: UniffiByteArray): RecoveryIssueKind;
|
|
3766
|
+
lower(value: RecoveryIssueKind, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3767
|
+
};
|
|
3768
|
+
FfiConverterTypeRecoveryPolicy: {
|
|
3769
|
+
readFromCursor(c: Cursor): RecoveryPolicy;
|
|
3770
|
+
writeIntoCursor(value: RecoveryPolicy, c: Cursor): void;
|
|
3771
|
+
allocationSize(value: RecoveryPolicy): number;
|
|
3772
|
+
lift(value: UniffiByteArray): RecoveryPolicy;
|
|
3773
|
+
lower(value: RecoveryPolicy, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3774
|
+
};
|
|
3775
|
+
FfiConverterTypeRecoveryStatus: {
|
|
3776
|
+
readFromCursor(c: Cursor): RecoveryStatus;
|
|
3777
|
+
writeIntoCursor(value: RecoveryStatus, c: Cursor): void;
|
|
3778
|
+
allocationSize(value: RecoveryStatus): number;
|
|
3779
|
+
lift(value: UniffiByteArray): RecoveryStatus;
|
|
3780
|
+
lower(value: RecoveryStatus, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3781
|
+
};
|
|
3782
|
+
FfiConverterTypeRecoverySummary: {
|
|
3783
|
+
readFromCursor(c: Cursor): RecoverySummary;
|
|
3784
|
+
writeIntoCursor(value: RecoverySummary, c: Cursor): void;
|
|
3785
|
+
allocationSize(value: RecoverySummary): number;
|
|
3786
|
+
lift(value: UniffiByteArray): RecoverySummary;
|
|
3787
|
+
lower(value: RecoverySummary, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3788
|
+
};
|
|
3789
|
+
FfiConverterTypeRegion: {
|
|
3790
|
+
readFromCursor(c: Cursor): Region;
|
|
3791
|
+
writeIntoCursor(value: Region, c: Cursor): void;
|
|
3792
|
+
allocationSize(value: Region): number;
|
|
3793
|
+
lift(value: UniffiByteArray): Region;
|
|
3794
|
+
lower(value: Region, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3795
|
+
};
|
|
3796
|
+
FfiConverterTypeRegionOfInterest: {
|
|
3797
|
+
readFromCursor(c: Cursor): RegionOfInterest;
|
|
3798
|
+
writeIntoCursor(value: RegionOfInterest, c: Cursor): void;
|
|
3799
|
+
allocationSize(value: RegionOfInterest): number;
|
|
3800
|
+
lift(value: UniffiByteArray): RegionOfInterest;
|
|
3801
|
+
lower(value: RegionOfInterest, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3802
|
+
};
|
|
3803
|
+
FfiConverterTypeRegistryOptions: {
|
|
3804
|
+
readFromCursor(c: Cursor): RegistryOptions;
|
|
3805
|
+
writeIntoCursor(value: RegistryOptions, c: Cursor): void;
|
|
3806
|
+
allocationSize(value: RegistryOptions): number;
|
|
3807
|
+
lift(value: UniffiByteArray): RegistryOptions;
|
|
3808
|
+
lower(value: RegistryOptions, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3809
|
+
};
|
|
3810
|
+
FfiConverterTypeRegistryQueries: {
|
|
3811
|
+
readFromCursor(c: Cursor): RegistryQueries;
|
|
3812
|
+
writeIntoCursor(value: RegistryQueries, c: Cursor): void;
|
|
3813
|
+
allocationSize(value: RegistryQueries): number;
|
|
3814
|
+
lift(value: UniffiByteArray): RegistryQueries;
|
|
3815
|
+
lower(value: RegistryQueries, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3816
|
+
};
|
|
3817
|
+
FfiConverterTypeRelationship: {
|
|
3818
|
+
readFromCursor(c: Cursor): Relationship;
|
|
3819
|
+
writeIntoCursor(value: Relationship, c: Cursor): void;
|
|
3820
|
+
allocationSize(value: Relationship): number;
|
|
3821
|
+
lift(value: UniffiByteArray): Relationship;
|
|
3822
|
+
lower(value: Relationship, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3823
|
+
};
|
|
3824
|
+
FfiConverterTypeResourceRef: {
|
|
3825
|
+
readFromCursor(c: Cursor): ResourceRef;
|
|
3826
|
+
writeIntoCursor(value: ResourceRef, c: Cursor): void;
|
|
3827
|
+
allocationSize(value: ResourceRef): number;
|
|
3828
|
+
lift(value: UniffiByteArray): ResourceRef;
|
|
3829
|
+
lower(value: ResourceRef, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3830
|
+
};
|
|
3831
|
+
FfiConverterTypeReviewRating: {
|
|
3832
|
+
readFromCursor(c: Cursor): ReviewRating;
|
|
3833
|
+
writeIntoCursor(value: ReviewRating, c: Cursor): void;
|
|
3834
|
+
allocationSize(value: ReviewRating): number;
|
|
3835
|
+
lift(value: UniffiByteArray): ReviewRating;
|
|
3836
|
+
lower(value: ReviewRating, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3837
|
+
};
|
|
3838
|
+
FfiConverterTypeRole: {
|
|
3839
|
+
readFromCursor(c: Cursor): Role;
|
|
3840
|
+
writeIntoCursor(value: Role, c: Cursor): void;
|
|
3841
|
+
allocationSize(value: Role): number;
|
|
3842
|
+
lift(value: UniffiByteArray): Role;
|
|
3843
|
+
lower(value: Role, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3844
|
+
};
|
|
3845
|
+
FfiConverterTypeSdkError: {
|
|
3846
|
+
readFromCursor(c: Cursor): SdkError;
|
|
3847
|
+
writeIntoCursor(value: SdkError, c: Cursor): void;
|
|
3848
|
+
allocationSize(value: SdkError): number;
|
|
3849
|
+
lift(value: UniffiByteArray): SdkError;
|
|
3850
|
+
lower(value: SdkError, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3851
|
+
};
|
|
3852
|
+
FfiConverterTypeSegmentTiming: {
|
|
3853
|
+
readFromCursor(c: Cursor): SegmentTiming;
|
|
3854
|
+
writeIntoCursor(value: SegmentTiming, c: Cursor): void;
|
|
3855
|
+
allocationSize(value: SegmentTiming): number;
|
|
3856
|
+
lift(value: UniffiByteArray): SegmentTiming;
|
|
3857
|
+
lower(value: SegmentTiming, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3858
|
+
};
|
|
3859
|
+
FfiConverterTypeSegmentValidation: {
|
|
3860
|
+
readFromCursor(c: Cursor): SegmentValidation;
|
|
3861
|
+
writeIntoCursor(value: SegmentValidation, c: Cursor): void;
|
|
3862
|
+
allocationSize(value: SegmentValidation): number;
|
|
3863
|
+
lift(value: UniffiByteArray): SegmentValidation;
|
|
3864
|
+
lower(value: SegmentValidation, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3865
|
+
};
|
|
3866
|
+
FfiConverterTypeSessionKeySummary: {
|
|
3867
|
+
readFromCursor(c: Cursor): SessionKeySummary;
|
|
3868
|
+
writeIntoCursor(value: SessionKeySummary, c: Cursor): void;
|
|
3869
|
+
allocationSize(value: SessionKeySummary): number;
|
|
3870
|
+
lift(value: UniffiByteArray): SessionKeySummary;
|
|
3871
|
+
lower(value: SessionKeySummary, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3872
|
+
};
|
|
3873
|
+
FfiConverterTypeShape: {
|
|
3874
|
+
readFromCursor(c: Cursor): Shape;
|
|
3875
|
+
writeIntoCursor(value: Shape, c: Cursor): void;
|
|
3876
|
+
allocationSize(value: Shape): number;
|
|
3877
|
+
lift(value: UniffiByteArray): Shape;
|
|
3878
|
+
lower(value: Shape, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3879
|
+
};
|
|
3880
|
+
FfiConverterTypeShapeType: {
|
|
3881
|
+
readFromCursor(c: Cursor): ShapeType;
|
|
3882
|
+
writeIntoCursor(value: ShapeType, c: Cursor): void;
|
|
3883
|
+
allocationSize(value: ShapeType): number;
|
|
3884
|
+
lift(value: UniffiByteArray): ShapeType;
|
|
3885
|
+
lower(value: ShapeType, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3886
|
+
};
|
|
3887
|
+
FfiConverterTypeSignatureInfo: {
|
|
3888
|
+
readFromCursor(c: Cursor): SignatureInfo;
|
|
3889
|
+
writeIntoCursor(value: SignatureInfo, c: Cursor): void;
|
|
3890
|
+
allocationSize(value: SignatureInfo): number;
|
|
3891
|
+
lift(value: UniffiByteArray): SignatureInfo;
|
|
3892
|
+
lower(value: SignatureInfo, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3893
|
+
};
|
|
3894
|
+
FfiConverterTypeSigningAlgSchema: {
|
|
3895
|
+
readFromCursor(c: Cursor): SigningAlgSchema;
|
|
3896
|
+
writeIntoCursor(value: SigningAlgSchema, c: Cursor): void;
|
|
3897
|
+
allocationSize(value: SigningAlgSchema): number;
|
|
3898
|
+
lift(value: UniffiByteArray): SigningAlgSchema;
|
|
3899
|
+
lower(value: SigningAlgSchema, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3900
|
+
};
|
|
3901
|
+
FfiConverterTypeSimilarityScore: FfiConverter<number, number>;
|
|
3902
|
+
FfiConverterTypeSoftBinding: {
|
|
3903
|
+
readFromCursor(c: Cursor): SoftBinding;
|
|
3904
|
+
writeIntoCursor(value: SoftBinding, c: Cursor): void;
|
|
3905
|
+
allocationSize(value: SoftBinding): number;
|
|
3906
|
+
lift(value: UniffiByteArray): SoftBinding;
|
|
3907
|
+
lower(value: SoftBinding, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3908
|
+
};
|
|
3909
|
+
FfiConverterTypeStatusCodes: {
|
|
3910
|
+
readFromCursor(c: Cursor): StatusCodes;
|
|
3911
|
+
writeIntoCursor(value: StatusCodes, c: Cursor): void;
|
|
3912
|
+
allocationSize(value: StatusCodes): number;
|
|
3913
|
+
lift(value: UniffiByteArray): StatusCodes;
|
|
3914
|
+
lower(value: StatusCodes, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3915
|
+
};
|
|
3916
|
+
FfiConverterTypeStreamValidation: FfiConverterObject<StreamValidationLike>;
|
|
3917
|
+
FfiConverterTypeStreamVerifier: FfiConverterObject<StreamVerifierLike>;
|
|
3918
|
+
FfiConverterTypeStreamVerifierOptions: {
|
|
3919
|
+
readFromCursor(c: Cursor): StreamVerifierOptions;
|
|
3920
|
+
writeIntoCursor(value: StreamVerifierOptions, c: Cursor): void;
|
|
3921
|
+
allocationSize(value: StreamVerifierOptions): number;
|
|
3922
|
+
lift(value: UniffiByteArray): StreamVerifierOptions;
|
|
3923
|
+
lower(value: StreamVerifierOptions, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3924
|
+
};
|
|
3925
|
+
FfiConverterTypeText: {
|
|
3926
|
+
readFromCursor(c: Cursor): Text;
|
|
3927
|
+
writeIntoCursor(value: Text, c: Cursor): void;
|
|
3928
|
+
allocationSize(value: Text): number;
|
|
3929
|
+
lift(value: UniffiByteArray): Text;
|
|
3930
|
+
lower(value: Text, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3931
|
+
};
|
|
3932
|
+
FfiConverterTypeTextSelector: {
|
|
3933
|
+
readFromCursor(c: Cursor): TextSelector;
|
|
3934
|
+
writeIntoCursor(value: TextSelector, c: Cursor): void;
|
|
3935
|
+
allocationSize(value: TextSelector): number;
|
|
3936
|
+
lift(value: UniffiByteArray): TextSelector;
|
|
3937
|
+
lower(value: TextSelector, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3938
|
+
};
|
|
3939
|
+
FfiConverterTypeTextSelectorRange: {
|
|
3940
|
+
readFromCursor(c: Cursor): TextSelectorRange;
|
|
3941
|
+
writeIntoCursor(value: TextSelectorRange, c: Cursor): void;
|
|
3942
|
+
allocationSize(value: TextSelectorRange): number;
|
|
3943
|
+
lift(value: UniffiByteArray): TextSelectorRange;
|
|
3944
|
+
lower(value: TextSelectorRange, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3945
|
+
};
|
|
3946
|
+
FfiConverterTypeTime: {
|
|
3947
|
+
readFromCursor(c: Cursor): Time;
|
|
3948
|
+
writeIntoCursor(value: Time, c: Cursor): void;
|
|
3949
|
+
allocationSize(value: Time): number;
|
|
3950
|
+
lift(value: UniffiByteArray): Time;
|
|
3951
|
+
lower(value: Time, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3952
|
+
};
|
|
3953
|
+
FfiConverterTypeTimeType: {
|
|
3954
|
+
readFromCursor(c: Cursor): TimeType;
|
|
3955
|
+
writeIntoCursor(value: TimeType, c: Cursor): void;
|
|
3956
|
+
allocationSize(value: TimeType): number;
|
|
3957
|
+
lift(value: UniffiByteArray): TimeType;
|
|
3958
|
+
lower(value: TimeType, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3959
|
+
};
|
|
3960
|
+
FfiConverterTypeUnitType: {
|
|
3961
|
+
readFromCursor(c: Cursor): UnitType;
|
|
3962
|
+
writeIntoCursor(value: UnitType, c: Cursor): void;
|
|
3963
|
+
allocationSize(value: UnitType): number;
|
|
3964
|
+
lift(value: UniffiByteArray): UnitType;
|
|
3965
|
+
lower(value: UnitType, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3966
|
+
};
|
|
3967
|
+
FfiConverterTypeUriOrResource: {
|
|
3968
|
+
readFromCursor(c: Cursor): UriOrResource;
|
|
3969
|
+
writeIntoCursor(value: UriOrResource, c: Cursor): void;
|
|
3970
|
+
allocationSize(value: UriOrResource): number;
|
|
3971
|
+
lift(value: UniffiByteArray): UriOrResource;
|
|
3972
|
+
lower(value: UriOrResource, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3973
|
+
};
|
|
3974
|
+
FfiConverterTypeValidationCode: {
|
|
3975
|
+
readFromCursor(c: Cursor): ValidationCode;
|
|
3976
|
+
writeIntoCursor(value: ValidationCode, c: Cursor): void;
|
|
3977
|
+
allocationSize(value: ValidationCode): number;
|
|
3978
|
+
lift(value: UniffiByteArray): ValidationCode;
|
|
3979
|
+
lower(value: ValidationCode, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3980
|
+
};
|
|
3981
|
+
FfiConverterTypeValidationCodeKind: {
|
|
3982
|
+
readFromCursor(c: Cursor): ValidationCodeKind;
|
|
3983
|
+
writeIntoCursor(value: ValidationCodeKind, c: Cursor): void;
|
|
3984
|
+
allocationSize(value: ValidationCodeKind): number;
|
|
3985
|
+
lift(value: UniffiByteArray): ValidationCodeKind;
|
|
3986
|
+
lower(value: ValidationCodeKind, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3987
|
+
};
|
|
3988
|
+
FfiConverterTypeValidationResults: {
|
|
3989
|
+
readFromCursor(c: Cursor): ValidationResults;
|
|
3990
|
+
writeIntoCursor(value: ValidationResults, c: Cursor): void;
|
|
3991
|
+
allocationSize(value: ValidationResults): number;
|
|
3992
|
+
lift(value: UniffiByteArray): ValidationResults;
|
|
3993
|
+
lower(value: ValidationResults, alloc: RustBufferAllocator): UniffiByteArray;
|
|
3994
|
+
};
|
|
3995
|
+
FfiConverterTypeValidationState: {
|
|
3996
|
+
readFromCursor(c: Cursor): ValidationState;
|
|
3997
|
+
writeIntoCursor(value: ValidationState, c: Cursor): void;
|
|
3998
|
+
allocationSize(value: ValidationState): number;
|
|
3999
|
+
lift(value: UniffiByteArray): ValidationState;
|
|
4000
|
+
lower(value: ValidationState, alloc: RustBufferAllocator): UniffiByteArray;
|
|
4001
|
+
};
|
|
4002
|
+
FfiConverterTypeValidationStatus: {
|
|
4003
|
+
readFromCursor(c: Cursor): ValidationStatus;
|
|
4004
|
+
writeIntoCursor(value: ValidationStatus, c: Cursor): void;
|
|
4005
|
+
allocationSize(value: ValidationStatus): number;
|
|
4006
|
+
lift(value: UniffiByteArray): ValidationStatus;
|
|
4007
|
+
lower(value: ValidationStatus, alloc: RustBufferAllocator): UniffiByteArray;
|
|
4008
|
+
};
|
|
4009
|
+
FfiConverterTypeValue: FfiConverter<UniffiByteArray, string>;
|
|
4010
|
+
FfiConverterTypeVerifyOptions: {
|
|
4011
|
+
readFromCursor(c: Cursor): VerifyOptions;
|
|
4012
|
+
writeIntoCursor(value: VerifyOptions, c: Cursor): void;
|
|
4013
|
+
allocationSize(value: VerifyOptions): number;
|
|
4014
|
+
lift(value: UniffiByteArray): VerifyOptions;
|
|
4015
|
+
lower(value: VerifyOptions, alloc: RustBufferAllocator): UniffiByteArray;
|
|
4016
|
+
};
|
|
4017
|
+
};
|
|
4018
|
+
}>;
|
|
4019
|
+
//#endregion
|
|
4020
|
+
//#region ../../../../target/trylimbo/codegen/ffi-trylimbo_sdk_verifier/index.d.ts
|
|
4021
|
+
declare function uniffiInitAsync(): Promise<void>;
|
|
4022
|
+
declare const _default: {
|
|
4023
|
+
trylimbo_verifier: typeof trylimbo_verifier_d_exports;
|
|
4024
|
+
};
|
|
4025
|
+
//#endregion
|
|
4026
|
+
export { Actor, AssertionMetadata, AssetType, AssetVerification, AssetVerifier, AssetVerifierInterface, AssetVerifierLike, AssetVerifierOptions, Binder, BinderInterface, BinderLike, ClaimGeneratorInfo, Code, ContentBindingClass, ContentBindingEvidence, Coordinate, CredentialOrigin, CredentialOrigin_Tags, DataSource, DeriveOptions, EndInclusivity, FieldViolation, FileSource, FileSourceInterface, FileSourceLike, FingerprintCheck, FingerprintCheck_Tags, FoundCredential, Frame, GoldenComparison, GoldenComparison_Tags, HashedUri, Ingredient, IngredientDeltaValidationResult, InitValidation, Item, Manifest, ManifestAssertion, ManifestAssertionKind, ManifestStore, MediaValidation, MemorySource, MemorySourceInterface, MemorySourceLike, PluginRead, PluginRegistry, PluginRegistryInterface, PluginRegistryLike, Range, RangeSource, RangeSourceImpl, RangeType, RecoveryIssue, RecoveryIssueKind, RecoveryPolicy, RecoveryStatus, RecoverySummary, Region, RegionOfInterest, RegistryOptions, RegistryQueries, Relationship, ResourceRef, ReviewRating, Role, SdkError, SdkError_Tags, SegmentTiming, SegmentValidation, SegmentValidation_Tags, SessionKeySummary, Shape, ShapeType, SignatureInfo, SigningAlgSchema, SimilarityScore, SoftBinding, StatusCodes, StreamValidation, StreamValidationInterface, StreamValidationLike, StreamVerifier, StreamVerifierInterface, StreamVerifierLike, StreamVerifierOptions, Text, TextSelector, TextSelectorRange, Time, TimeType, UnitType, UriOrResource, UriOrResource_Tags, ValidationCode, ValidationCodeKind, ValidationResults, ValidationState, ValidationStatus, Value, VerifyOptions, c2paTrustList, c2paTsaTrustList, _default as default, devCa, parse, resource, thumbnails, uniffiInitAsync };
|