@trylimbo/sdk-verifier 0.2.25-canary.37 → 0.2.25-canary.38
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 +109 -117
- package/gen/ffi/index.js +170 -155
- package/package.json +3 -3
package/gen/ffi/index.d.ts
CHANGED
|
@@ -181,7 +181,7 @@ declare const pointerLiteralSymbol: unique symbol;
|
|
|
181
181
|
*/
|
|
182
182
|
declare const uniffiTypeNameSymbol: unique symbol;
|
|
183
183
|
declare namespace trylimbo_verifier_d_exports {
|
|
184
|
-
export { Actor, AssertionMetadata, AssetType, AssetVerification, AssetVerifier, AssetVerifierInterface, AssetVerifierLike, AssetVerifierOptions, Block, ByteRange, ClaimGeneratorInfo, Code, Compute, ComputeImpl, ComputeRequest, Content, ContentWhen, Coordinate, Credential, CredentialInterface, CredentialLike, CredentialOrigin, CredentialOrigin_Tags, DataSource, Discovery, DiscoveryVia, DiscoveryVia_Tags, EndInclusivity, FieldViolation, FileSource, FileSourceInterface, FileSourceLike, FingerprintCheck, FingerprintCheck_Tags, Frame, Golden, Golden_Tags, HardBinding, HashedUri, Hint, Ingredient, IngredientDeltaValidationResult, InitValidation, Item, JsonValue, Lineage, Manifest, ManifestAssertion, ManifestAssertionKind, ManifestStore, MediaValidation, MemorySource, MemorySourceInterface, MemorySourceLike, PluginReader, Range, RangeSource, RangeSourceImpl, RangeType, Recovery, RecoveryIssue, RecoveryIssue_Tags, RecoveryStatus, RecoverySummary, RecoveryTrigger, Reference, RegionOfInterest, Relationship, Repository, Repository_Tags, ResourceRef, ReviewRating,
|
|
184
|
+
export { Actor, AssertionMetadata, AssetType, AssetVerification, AssetVerifier, AssetVerifierInterface, AssetVerifierLike, AssetVerifierOptions, Block, ByteRange, ClaimGeneratorInfo, Code, Compute, ComputeImpl, ComputeRequest, Content, ContentWhen, Coordinate, Credential, CredentialInterface, CredentialLike, CredentialOrigin, CredentialOrigin_Tags, DataSource, Discovery, DiscoveryVia, DiscoveryVia_Tags, EndInclusivity, FieldViolation, FileSource, FileSourceInterface, FileSourceLike, FingerprintCheck, FingerprintCheck_Tags, Frame, Golden, Golden_Tags, HardBinding, HashedUri, Hint, Ingredient, IngredientDeltaValidationResult, InitValidation, Item, JsonValue, Lineage, Manifest, ManifestAssertion, ManifestAssertionKind, ManifestStore, MediaValidation, MemorySource, MemorySourceInterface, MemorySourceLike, PluginReader, Range, RangeSource, RangeSourceImpl, RangeType, Recovery, RecoveryIssue, RecoveryIssue_Tags, RecoveryStatus, RecoverySummary, RecoveryTrigger, Reference, RegionOfInterest, Relationship, Repository, Repository_Tags, ResourceRef, ReviewRating, Scope, SdkError, SdkError_Tags, SegmentTiming, SegmentValidation, SegmentValidation_Tags, SessionKey, Shape, ShapeType, SignatureInfo, SigningAlgSchema, SimilarityScore, SoftBindingSource, SoftBindingSource_Tags, SoftBindingType, StatusCodes, StreamSession, StreamSessionInterface, StreamSessionLike, StreamVerifier, StreamVerifierInterface, StreamVerifierLike, StreamVerifierOptions, Text, TextSelector, TextSelectorRange, Time, TimeType, Timespan, Trust, UnitType, UriOrResource, UriOrResource_Tags, ValidationCode, ValidationCodeKind, ValidationResults, ValidationState, ValidationStatus, Verdict, VerdictRule, Verdict_Tags, c2paTrustList, c2paTsaTrustList, computeSoftBinding, _default$1 as default, devCa, parse, resource };
|
|
185
185
|
}
|
|
186
186
|
/**
|
|
187
187
|
* The bundled C2PA Conformance Program signing-CA trust list (a release snapshot). Trusted by
|
|
@@ -648,47 +648,6 @@ export declare const Range: Readonly<{
|
|
|
648
648
|
new: (partial: Partial<Range> & Required<Omit<Range, "frame" | "item" | "shape" | "text" | "time">>) => Range;
|
|
649
649
|
defaults: () => Partial<Range>;
|
|
650
650
|
}>;
|
|
651
|
-
/**
|
|
652
|
-
* A role describing the region.
|
|
653
|
-
*/
|
|
654
|
-
export declare enum Role {
|
|
655
|
-
/**
|
|
656
|
-
* Arbitrary area worth identifying.
|
|
657
|
-
*/
|
|
658
|
-
C2paAreaOfInterest = 0,
|
|
659
|
-
/**
|
|
660
|
-
* This area is all that is left after a crop action.
|
|
661
|
-
*/
|
|
662
|
-
C2paCropped = 1,
|
|
663
|
-
/**
|
|
664
|
-
* This area has had edits applied to it.
|
|
665
|
-
*/
|
|
666
|
-
C2paEdited = 2,
|
|
667
|
-
/**
|
|
668
|
-
* The area where an ingredient was placed/added.
|
|
669
|
-
*/
|
|
670
|
-
C2paPlaced = 3,
|
|
671
|
-
/**
|
|
672
|
-
* Something in this area was redacted.
|
|
673
|
-
*/
|
|
674
|
-
C2paRedacted = 4,
|
|
675
|
-
/**
|
|
676
|
-
* Area specific to a subject (human or not).
|
|
677
|
-
*/
|
|
678
|
-
C2paSubjectArea = 5,
|
|
679
|
-
/**
|
|
680
|
-
* A range of information was removed/deleted.
|
|
681
|
-
*/
|
|
682
|
-
C2paDeleted = 6,
|
|
683
|
-
/**
|
|
684
|
-
* Styling was applied to this area.
|
|
685
|
-
*/
|
|
686
|
-
C2paStyled = 7,
|
|
687
|
-
/**
|
|
688
|
-
* Invisible watermarking was applied to this area for the purpose of soft binding.
|
|
689
|
-
*/
|
|
690
|
-
C2paWatermarked = 8
|
|
691
|
-
}
|
|
692
651
|
/**
|
|
693
652
|
* A region of interest within an asset describing the change.
|
|
694
653
|
*
|
|
@@ -717,11 +676,6 @@ export type RegionOfInterest = {
|
|
|
717
676
|
* A range describing the region of interest for the specific asset.
|
|
718
677
|
*/
|
|
719
678
|
region: Array<Range>;
|
|
720
|
-
/**
|
|
721
|
-
* A value from our controlled vocabulary or an entity-specific value (e.g., com.litware.coolArea) that represents
|
|
722
|
-
* the role of a region among other regions.
|
|
723
|
-
*/
|
|
724
|
-
role?: Role;
|
|
725
679
|
/**
|
|
726
680
|
* A value from a controlled vocabulary such as <https://cv.iptc.org/newscodes/imageregiontype/> or an entity-specific
|
|
727
681
|
* value (e.g., com.litware.newType) that represents the type of thing(s) depicted by a region.
|
|
@@ -734,8 +688,8 @@ export type RegionOfInterest = {
|
|
|
734
688
|
* Generated factory for {@link RegionOfInterest} record objects.
|
|
735
689
|
*/
|
|
736
690
|
export declare const RegionOfInterest: Readonly<{
|
|
737
|
-
create: (partial: Partial<RegionOfInterest> & Required<Omit<RegionOfInterest, "description" | "identifier" | "metadata" | "name" | "
|
|
738
|
-
new: (partial: Partial<RegionOfInterest> & Required<Omit<RegionOfInterest, "description" | "identifier" | "metadata" | "name" | "
|
|
691
|
+
create: (partial: Partial<RegionOfInterest> & Required<Omit<RegionOfInterest, "description" | "identifier" | "metadata" | "name" | "type">>) => RegionOfInterest;
|
|
692
|
+
new: (partial: Partial<RegionOfInterest> & Required<Omit<RegionOfInterest, "description" | "identifier" | "metadata" | "name" | "type">>) => RegionOfInterest;
|
|
739
693
|
defaults: () => Partial<RegionOfInterest>;
|
|
740
694
|
}>;
|
|
741
695
|
/**
|
|
@@ -800,14 +754,19 @@ export declare const AssetType: Readonly<{
|
|
|
800
754
|
*/
|
|
801
755
|
export declare enum HardBinding {
|
|
802
756
|
/**
|
|
803
|
-
*
|
|
757
|
+
* A data, box, BMFF or collection hash was checked against these bytes and held.
|
|
804
758
|
*/
|
|
805
759
|
Match = 0,
|
|
806
760
|
/**
|
|
807
761
|
* A hash mismatch is among the active manifest's failures: the manifest describes other
|
|
808
762
|
* bytes. Whether it is otherwise authentic is its remaining statuses.
|
|
809
763
|
*/
|
|
810
|
-
Mismatch = 1
|
|
764
|
+
Mismatch = 1,
|
|
765
|
+
/**
|
|
766
|
+
* No hash was checked against these bytes: the active manifest carries no hard binding, or
|
|
767
|
+
* validation never reached it. Says nothing about the bytes, so it is never a match.
|
|
768
|
+
*/
|
|
769
|
+
Unverified = 2
|
|
811
770
|
}
|
|
812
771
|
/**
|
|
813
772
|
* The re-sign chain, read from the validated stores themselves: C2PA 2.4 18.16.11 copies a
|
|
@@ -1191,6 +1150,11 @@ export type Ingredient = {
|
|
|
1191
1150
|
* Instance ID from `xmpMM:InstanceID` in XMP metadata.
|
|
1192
1151
|
*/
|
|
1193
1152
|
instanceId?: string;
|
|
1153
|
+
/**
|
|
1154
|
+
* If true, the ingredient assertion is added to created_assertions, rather than to gathered_assertions, which is the default.
|
|
1155
|
+
* ParentOf ingredients are always created assertions, and this field is ignored for them.
|
|
1156
|
+
*/
|
|
1157
|
+
isCreated?: boolean;
|
|
1194
1158
|
/**
|
|
1195
1159
|
* The ingredient's label as assigned in the manifest.
|
|
1196
1160
|
*/
|
|
@@ -1250,8 +1214,8 @@ export type Ingredient = {
|
|
|
1250
1214
|
* Generated factory for {@link Ingredient} record objects.
|
|
1251
1215
|
*/
|
|
1252
1216
|
export declare const Ingredient: Readonly<{
|
|
1253
|
-
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;
|
|
1254
|
-
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;
|
|
1217
|
+
create: (partial: Partial<Ingredient> & Required<Omit<Ingredient, "activeManifest" | "data" | "dataTypes" | "description" | "digitalSourceType" | "documentId" | "format" | "hash" | "informationalUri" | "instanceId" | "isCreated" | "label" | "manifestData" | "metadata" | "ocspResponses" | "provenance" | "softBindingAlgorithmsMatched" | "thumbnail" | "title" | "validationResults" | "validationStatus">>) => Ingredient;
|
|
1218
|
+
new: (partial: Partial<Ingredient> & Required<Omit<Ingredient, "activeManifest" | "data" | "dataTypes" | "description" | "digitalSourceType" | "documentId" | "format" | "hash" | "informationalUri" | "instanceId" | "isCreated" | "label" | "manifestData" | "metadata" | "ocspResponses" | "provenance" | "softBindingAlgorithmsMatched" | "thumbnail" | "title" | "validationResults" | "validationStatus">>) => Ingredient;
|
|
1255
1219
|
defaults: () => Partial<Ingredient>;
|
|
1256
1220
|
}>;
|
|
1257
1221
|
/**
|
|
@@ -3055,18 +3019,20 @@ export type Golden = InstanceType<typeof Golden['Matches' | 'Differs' | 'NoneMat
|
|
|
3055
3019
|
export declare enum VerdictRule {
|
|
3056
3020
|
OnlyCandidate = 0,
|
|
3057
3021
|
/**
|
|
3058
|
-
*
|
|
3022
|
+
* Its hash holds over these bytes and no other candidate's does.
|
|
3059
3023
|
*/
|
|
3060
|
-
|
|
3024
|
+
HardBinding = 1,
|
|
3061
3025
|
/**
|
|
3062
|
-
*
|
|
3026
|
+
* Every other candidate with the same hard-binding standing is superseded by a credential
|
|
3027
|
+
* in this report.
|
|
3063
3028
|
*/
|
|
3064
|
-
|
|
3029
|
+
NotSuperseded = 2
|
|
3065
3030
|
}
|
|
3066
3031
|
export declare enum Verdict_Tags {
|
|
3067
3032
|
Unsigned = "Unsigned",
|
|
3068
3033
|
Inconclusive = "Inconclusive",
|
|
3069
3034
|
Embedded = "Embedded",
|
|
3035
|
+
Invalid = "Invalid",
|
|
3070
3036
|
Recovered = "Recovered",
|
|
3071
3037
|
RecoveredDerivative = "RecoveredDerivative",
|
|
3072
3038
|
Ambiguous = "Ambiguous"
|
|
@@ -3080,12 +3046,17 @@ export declare enum Verdict_Tags {
|
|
|
3080
3046
|
* and the golden comparison does not contradict it. When it `differs` from what the repository
|
|
3081
3047
|
* holds, or several recovered candidates leave the comparison indeterminate, the embedded and
|
|
3082
3048
|
* the recovered manifests are reported as ambiguous: C2PA 2.4's substitution use case leaves
|
|
3083
|
-
* that trust decision to the client.
|
|
3084
|
-
*
|
|
3085
|
-
*
|
|
3086
|
-
*
|
|
3087
|
-
*
|
|
3088
|
-
*
|
|
3049
|
+
* that trust decision to the client.
|
|
3050
|
+
*
|
|
3051
|
+
* Otherwise a recovered candidate is named only when evidence singles it out, and only among
|
|
3052
|
+
* those that are authentic (they fail on nothing but a hash mismatch) and state a hard binding.
|
|
3053
|
+
* The verdict is about THESE bytes, so a candidate whose hash holds over them outranks any whose
|
|
3054
|
+
* hash does not, whatever the repository calls its head; among equals, one that no other
|
|
3055
|
+
* credential supersedes (the successor's signed `parentOf` link) outranks the rest. A repository
|
|
3056
|
+
* score, a signature time or a position in the list is not evidence of which manifest belongs to
|
|
3057
|
+
* these bytes, so candidates those alone would separate are reported as ambiguous. When no
|
|
3058
|
+
* credential is both authentic and bound to some bytes, the verdict is `Invalid`, never a
|
|
3059
|
+
* recovered one: a manifest that fails its own signature or signer vouches for nothing.
|
|
3089
3060
|
*/
|
|
3090
3061
|
export declare const Verdict: Readonly<{
|
|
3091
3062
|
instanceOf: (obj: any) => obj is Verdict;
|
|
@@ -3167,6 +3138,45 @@ export declare const Verdict: Readonly<{
|
|
|
3167
3138
|
readonly tag: Verdict_Tags.Embedded;
|
|
3168
3139
|
};
|
|
3169
3140
|
};
|
|
3141
|
+
Invalid: {
|
|
3142
|
+
new (inner: {
|
|
3143
|
+
index: number;
|
|
3144
|
+
}): {
|
|
3145
|
+
/**
|
|
3146
|
+
* @private
|
|
3147
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3148
|
+
*/
|
|
3149
|
+
readonly [uniffiTypeNameSymbol]: "Verdict";
|
|
3150
|
+
readonly tag: Verdict_Tags.Invalid;
|
|
3151
|
+
readonly inner: Readonly<{
|
|
3152
|
+
index: number;
|
|
3153
|
+
}>;
|
|
3154
|
+
};
|
|
3155
|
+
"new"(inner: {
|
|
3156
|
+
index: number;
|
|
3157
|
+
}): {
|
|
3158
|
+
/**
|
|
3159
|
+
* @private
|
|
3160
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3161
|
+
*/
|
|
3162
|
+
readonly [uniffiTypeNameSymbol]: "Verdict";
|
|
3163
|
+
readonly tag: Verdict_Tags.Invalid;
|
|
3164
|
+
readonly inner: Readonly<{
|
|
3165
|
+
index: number;
|
|
3166
|
+
}>;
|
|
3167
|
+
};
|
|
3168
|
+
instanceOf(obj: any): obj is {
|
|
3169
|
+
/**
|
|
3170
|
+
* @private
|
|
3171
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3172
|
+
*/
|
|
3173
|
+
readonly [uniffiTypeNameSymbol]: "Verdict";
|
|
3174
|
+
readonly tag: Verdict_Tags.Invalid;
|
|
3175
|
+
readonly inner: Readonly<{
|
|
3176
|
+
index: number;
|
|
3177
|
+
}>;
|
|
3178
|
+
};
|
|
3179
|
+
};
|
|
3170
3180
|
Recovered: {
|
|
3171
3181
|
new (inner: {
|
|
3172
3182
|
index: number;
|
|
@@ -3304,14 +3314,19 @@ export declare const Verdict: Readonly<{
|
|
|
3304
3314
|
* and the golden comparison does not contradict it. When it `differs` from what the repository
|
|
3305
3315
|
* holds, or several recovered candidates leave the comparison indeterminate, the embedded and
|
|
3306
3316
|
* the recovered manifests are reported as ambiguous: C2PA 2.4's substitution use case leaves
|
|
3307
|
-
* that trust decision to the client.
|
|
3308
|
-
*
|
|
3309
|
-
*
|
|
3310
|
-
*
|
|
3311
|
-
*
|
|
3312
|
-
*
|
|
3313
|
-
|
|
3314
|
-
|
|
3317
|
+
* that trust decision to the client.
|
|
3318
|
+
*
|
|
3319
|
+
* Otherwise a recovered candidate is named only when evidence singles it out, and only among
|
|
3320
|
+
* those that are authentic (they fail on nothing but a hash mismatch) and state a hard binding.
|
|
3321
|
+
* The verdict is about THESE bytes, so a candidate whose hash holds over them outranks any whose
|
|
3322
|
+
* hash does not, whatever the repository calls its head; among equals, one that no other
|
|
3323
|
+
* credential supersedes (the successor's signed `parentOf` link) outranks the rest. A repository
|
|
3324
|
+
* score, a signature time or a position in the list is not evidence of which manifest belongs to
|
|
3325
|
+
* these bytes, so candidates those alone would separate are reported as ambiguous. When no
|
|
3326
|
+
* credential is both authentic and bound to some bytes, the verdict is `Invalid`, never a
|
|
3327
|
+
* recovered one: a manifest that fails its own signature or signer vouches for nothing.
|
|
3328
|
+
*/
|
|
3329
|
+
export type Verdict = InstanceType<typeof Verdict['Unsigned' | 'Inconclusive' | 'Embedded' | 'Invalid' | 'Recovered' | 'RecoveredDerivative' | 'Ambiguous']>;
|
|
3315
3330
|
/**
|
|
3316
3331
|
* Complete asset verification result: every credential, the recovery state, the C2PA
|
|
3317
3332
|
* golden-flow comparison when there was something to compare, and the verdict the SDK's rules
|
|
@@ -3728,7 +3743,7 @@ export type SessionKey = {
|
|
|
3728
3743
|
*/
|
|
3729
3744
|
kid: ArrayBuffer;
|
|
3730
3745
|
/**
|
|
3731
|
-
*
|
|
3746
|
+
* SEC1 EC, raw Ed25519 or PKCS#1 DER RSA public-key bytes.
|
|
3732
3747
|
*/
|
|
3733
3748
|
publicKey: ArrayBuffer;
|
|
3734
3749
|
};
|
|
@@ -3770,7 +3785,7 @@ export declare const InitValidation: Readonly<{
|
|
|
3770
3785
|
*/
|
|
3771
3786
|
export type SegmentTiming = {
|
|
3772
3787
|
/**
|
|
3773
|
-
* The segment's `sequenceNumber`
|
|
3788
|
+
* The segment's `sequenceNumber`: a `bigint` in both Node lanes.
|
|
3774
3789
|
*/
|
|
3775
3790
|
sequence: bigint;
|
|
3776
3791
|
/**
|
|
@@ -4037,19 +4052,23 @@ export type StreamVerifierOptions = {
|
|
|
4037
4052
|
* the encoder clock's allowance. Absent, 5 minutes. Compared in whole seconds.
|
|
4038
4053
|
*/
|
|
4039
4054
|
skewTolerance?: number;
|
|
4055
|
+
/**
|
|
4056
|
+
* Exact HTTPS origins permitted for a segment's `manifestUri` (§19.4.4.1).
|
|
4057
|
+
* Empty disables external manifest recovery. Paths and wildcard hosts are not accepted.
|
|
4058
|
+
*/
|
|
4059
|
+
manifestOrigins: Array<string>;
|
|
4040
4060
|
};
|
|
4041
4061
|
/**
|
|
4042
4062
|
* Generated factory for {@link StreamVerifierOptions} record objects.
|
|
4043
4063
|
*/
|
|
4044
4064
|
export declare const StreamVerifierOptions: Readonly<{
|
|
4045
|
-
create: (partial: Partial<StreamVerifierOptions> & Required<Omit<StreamVerifierOptions, "skewTolerance">>) => StreamVerifierOptions;
|
|
4046
|
-
new: (partial: Partial<StreamVerifierOptions> & Required<Omit<StreamVerifierOptions, "skewTolerance">>) => StreamVerifierOptions;
|
|
4065
|
+
create: (partial: Partial<StreamVerifierOptions> & Required<Omit<StreamVerifierOptions, "manifestOrigins" | "skewTolerance">>) => StreamVerifierOptions;
|
|
4066
|
+
new: (partial: Partial<StreamVerifierOptions> & Required<Omit<StreamVerifierOptions, "manifestOrigins" | "skewTolerance">>) => StreamVerifierOptions;
|
|
4047
4067
|
defaults: () => Partial<StreamVerifierOptions>;
|
|
4048
4068
|
}>;
|
|
4049
4069
|
export declare enum SegmentValidation_Tags {
|
|
4050
4070
|
Init = "Init",
|
|
4051
|
-
Media = "Media"
|
|
4052
|
-
Unknown = "Unknown"
|
|
4071
|
+
Media = "Media"
|
|
4053
4072
|
}
|
|
4054
4073
|
/**
|
|
4055
4074
|
* Result of `StreamSession.validate`.
|
|
@@ -4114,37 +4133,11 @@ export declare const SegmentValidation: Readonly<{
|
|
|
4114
4133
|
readonly inner: Readonly<[MediaValidation]>;
|
|
4115
4134
|
};
|
|
4116
4135
|
};
|
|
4117
|
-
Unknown: {
|
|
4118
|
-
new (): {
|
|
4119
|
-
/**
|
|
4120
|
-
* @private
|
|
4121
|
-
* This field is private and should not be used, use `tag` instead.
|
|
4122
|
-
*/
|
|
4123
|
-
readonly [uniffiTypeNameSymbol]: "SegmentValidation";
|
|
4124
|
-
readonly tag: SegmentValidation_Tags.Unknown;
|
|
4125
|
-
};
|
|
4126
|
-
"new"(): {
|
|
4127
|
-
/**
|
|
4128
|
-
* @private
|
|
4129
|
-
* This field is private and should not be used, use `tag` instead.
|
|
4130
|
-
*/
|
|
4131
|
-
readonly [uniffiTypeNameSymbol]: "SegmentValidation";
|
|
4132
|
-
readonly tag: SegmentValidation_Tags.Unknown;
|
|
4133
|
-
};
|
|
4134
|
-
instanceOf(obj: any): obj is {
|
|
4135
|
-
/**
|
|
4136
|
-
* @private
|
|
4137
|
-
* This field is private and should not be used, use `tag` instead.
|
|
4138
|
-
*/
|
|
4139
|
-
readonly [uniffiTypeNameSymbol]: "SegmentValidation";
|
|
4140
|
-
readonly tag: SegmentValidation_Tags.Unknown;
|
|
4141
|
-
};
|
|
4142
|
-
};
|
|
4143
4136
|
}>;
|
|
4144
4137
|
/**
|
|
4145
4138
|
* Result of `StreamSession.validate`.
|
|
4146
4139
|
*/
|
|
4147
|
-
export type SegmentValidation = InstanceType<typeof SegmentValidation['Init' | 'Media'
|
|
4140
|
+
export type SegmentValidation = InstanceType<typeof SegmentValidation['Init' | 'Media']>;
|
|
4148
4141
|
/**
|
|
4149
4142
|
* The read surface a plugin implements. Implemented by the CALLER, in Rust
|
|
4150
4143
|
* behind its own cdylib or directly in the host language, and handed to `verify`.
|
|
@@ -4183,6 +4176,7 @@ export interface AssetVerifierLike {
|
|
|
4183
4176
|
* order; an empty list is a built-in C2PA media format. The SDK links no plugin itself.
|
|
4184
4177
|
* Returns embedded/recovered credentials plus typed recovery and golden-comparison
|
|
4185
4178
|
* outcomes.
|
|
4179
|
+
* `format` optionally declares the media type for inputs such as SVG and plain text.
|
|
4186
4180
|
*
|
|
4187
4181
|
* # Errors
|
|
4188
4182
|
*
|
|
@@ -4190,7 +4184,7 @@ export interface AssetVerifierLike {
|
|
|
4190
4184
|
* parsed, and the backend's fault when it fails mid-read. Everything a repository answers
|
|
4191
4185
|
* or fails to answer is in the recovery summary.
|
|
4192
4186
|
*/
|
|
4193
|
-
verify(source: RangeSource, recovery: Recovery | undefined, plugins: Array<PluginReader>, asyncOpts_?: {
|
|
4187
|
+
verify(source: RangeSource, recovery: Recovery | undefined, plugins: Array<PluginReader>, format: string | undefined, asyncOpts_?: {
|
|
4194
4188
|
signal: AbortSignal;
|
|
4195
4189
|
}): Promise<AssetVerification>;
|
|
4196
4190
|
}
|
|
@@ -4221,6 +4215,7 @@ export declare class AssetVerifier extends UniffiAbstractObject implements Asset
|
|
|
4221
4215
|
* order; an empty list is a built-in C2PA media format. The SDK links no plugin itself.
|
|
4222
4216
|
* Returns embedded/recovered credentials plus typed recovery and golden-comparison
|
|
4223
4217
|
* outcomes.
|
|
4218
|
+
* `format` optionally declares the media type for inputs such as SVG and plain text.
|
|
4224
4219
|
*
|
|
4225
4220
|
* # Errors
|
|
4226
4221
|
*
|
|
@@ -4228,7 +4223,7 @@ export declare class AssetVerifier extends UniffiAbstractObject implements Asset
|
|
|
4228
4223
|
* parsed, and the backend's fault when it fails mid-read. Everything a repository answers
|
|
4229
4224
|
* or fails to answer is in the recovery summary.
|
|
4230
4225
|
*/
|
|
4231
|
-
verify(source: RangeSource, recovery?: Recovery | undefined, plugins?: Array<PluginReader>, asyncOpts_?: {
|
|
4226
|
+
verify(source: RangeSource, recovery?: Recovery | undefined, plugins?: Array<PluginReader>, format?: string | undefined, asyncOpts_?: {
|
|
4232
4227
|
signal: AbortSignal;
|
|
4233
4228
|
}): Promise<AssetVerification>;
|
|
4234
4229
|
uniffiDestroy(): void;
|
|
@@ -4383,7 +4378,7 @@ export interface StreamSessionLike {
|
|
|
4383
4378
|
*
|
|
4384
4379
|
* `STREAM_INVALID` when a registered session key cannot be re-encoded.
|
|
4385
4380
|
*/
|
|
4386
|
-
|
|
4381
|
+
export(): ArrayBuffer;
|
|
4387
4382
|
/**
|
|
4388
4383
|
* Validate any BMFF segment. Classifies internally and dispatches to init- or
|
|
4389
4384
|
* media-processing, registering what an init advertises into this handle.
|
|
@@ -4424,7 +4419,7 @@ export declare class StreamSession extends UniffiAbstractObject implements Strea
|
|
|
4424
4419
|
*
|
|
4425
4420
|
* `STREAM_INVALID` when a registered session key cannot be re-encoded.
|
|
4426
4421
|
*/
|
|
4427
|
-
|
|
4422
|
+
export(): ArrayBuffer;
|
|
4428
4423
|
/**
|
|
4429
4424
|
* Validate any BMFF segment. Classifies internally and dispatches to init- or
|
|
4430
4425
|
* media-processing, registering what an init advertises into this handle.
|
|
@@ -4465,7 +4460,9 @@ export interface StreamVerifierLike {
|
|
|
4465
4460
|
* A field violation at `state` when it is not a value [`StreamSession::export`]
|
|
4466
4461
|
* produced (`state.malformed`), or one of another export version (`state.version`).
|
|
4467
4462
|
*/
|
|
4468
|
-
resume(state: ArrayBuffer
|
|
4463
|
+
resume(state: ArrayBuffer, asyncOpts_?: {
|
|
4464
|
+
signal: AbortSignal;
|
|
4465
|
+
}): Promise<StreamSessionLike>;
|
|
4469
4466
|
}
|
|
4470
4467
|
/**
|
|
4471
4468
|
* @deprecated Use `StreamVerifierLike` instead.
|
|
@@ -4507,7 +4504,9 @@ export declare class StreamVerifier extends UniffiAbstractObject implements Stre
|
|
|
4507
4504
|
* A field violation at `state` when it is not a value [`StreamSession::export`]
|
|
4508
4505
|
* produced (`state.malformed`), or one of another export version (`state.version`).
|
|
4509
4506
|
*/
|
|
4510
|
-
resume(state: ArrayBuffer
|
|
4507
|
+
resume(state: ArrayBuffer, asyncOpts_?: {
|
|
4508
|
+
signal: AbortSignal;
|
|
4509
|
+
}): Promise<StreamSessionLike>;
|
|
4511
4510
|
uniffiDestroy(): void;
|
|
4512
4511
|
static instanceOf(obj_: any): obj_ is StreamVerifier;
|
|
4513
4512
|
}
|
|
@@ -4868,13 +4867,6 @@ declare const _default$1: Readonly<{
|
|
|
4868
4867
|
lift(value: UniffiByteArray): ReviewRating;
|
|
4869
4868
|
lower(value: ReviewRating, alloc: RustBufferAllocator): UniffiByteArray;
|
|
4870
4869
|
};
|
|
4871
|
-
FfiConverterTypeRole: {
|
|
4872
|
-
readFromCursor(c: Cursor): Role;
|
|
4873
|
-
writeIntoCursor(value: Role, c: Cursor): void;
|
|
4874
|
-
allocationSize(value: Role): number;
|
|
4875
|
-
lift(value: UniffiByteArray): Role;
|
|
4876
|
-
lower(value: Role, alloc: RustBufferAllocator): UniffiByteArray;
|
|
4877
|
-
};
|
|
4878
4870
|
FfiConverterTypeScope: {
|
|
4879
4871
|
readFromCursor(c: Cursor): Scope;
|
|
4880
4872
|
writeIntoCursor(value: Scope, c: Cursor): void;
|
package/gen/ffi/index.js
CHANGED
|
@@ -658,10 +658,17 @@ const UNIFFI_FOREIGN_FUTURE_HANDLE_MAP = new UniffiHandleMap();
|
|
|
658
658
|
function uniffiTraitInterfaceCallAsyncWithError(makeCall, handleSuccess, handleError, isErrorType, lowerError, lowerString, alloc) {
|
|
659
659
|
const settledHolder = { settled: false };
|
|
660
660
|
const abortController = new AbortController();
|
|
661
|
+
let onRejected;
|
|
661
662
|
const promiseHelper = {
|
|
662
663
|
abortController,
|
|
663
664
|
settledHolder,
|
|
664
|
-
promise: makeCall(abortController.signal).finally(() => settledHolder.settled = true).then(
|
|
665
|
+
promise: makeCall(abortController.signal).finally(() => settledHolder.settled = true).then((value) => {
|
|
666
|
+
try {
|
|
667
|
+
handleSuccess(value);
|
|
668
|
+
} catch (error) {
|
|
669
|
+
onRejected(error);
|
|
670
|
+
}
|
|
671
|
+
}, onRejected = (error) => {
|
|
665
672
|
let message = error.message ? error.message : error.toString();
|
|
666
673
|
if (isErrorType(error)) try {
|
|
667
674
|
handleError(1, lowerError(error, alloc));
|
|
@@ -906,16 +913,58 @@ var Cursor = class Cursor {
|
|
|
906
913
|
};
|
|
907
914
|
//#endregion
|
|
908
915
|
//#region ../../../../node_modules/@ubjs/core/dist/esm/ffi-converters.js
|
|
916
|
+
function uniffiInvalid(message) {
|
|
917
|
+
return SdkError.Invalid.new({
|
|
918
|
+
code: Code.InvalidArgument,
|
|
919
|
+
message,
|
|
920
|
+
fieldViolations: []
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
const uniffiUnsignedBounds = {
|
|
924
|
+
UInt8: 255,
|
|
925
|
+
UInt16: 65535,
|
|
926
|
+
UInt32: 4294967295
|
|
927
|
+
};
|
|
928
|
+
function uniffiChecked(kind, converter) {
|
|
929
|
+
const unsigned = kind.startsWith("UInt");
|
|
930
|
+
const bits = Number(kind.replace(/\D/g, ""));
|
|
931
|
+
const wide = bits === 64;
|
|
932
|
+
const lower = wide ? unsigned ? BigInt("0") : -(BigInt("1") << BigInt("63")) : unsigned ? 0 : -(2 ** (bits - 1));
|
|
933
|
+
const upper = wide ? unsigned ? (BigInt("1") << BigInt("64")) - BigInt("1") : (BigInt("1") << BigInt("63")) - BigInt("1") : unsigned ? uniffiUnsignedBounds[kind] : 2 ** (bits - 1) - 1;
|
|
934
|
+
return {
|
|
935
|
+
...converter,
|
|
936
|
+
lower: (v, _alloc) => {
|
|
937
|
+
if (wide ? typeof v !== "bigint" : typeof v !== "number" || !Number.isInteger(v)) throw uniffiInvalid(`expected ${wide ? "a bigint" : "an integer number"} for a ${kind}, got ${typeof v === "number" ? v : typeof v}`);
|
|
938
|
+
if (v < lower || v > upper) throw uniffiInvalid(`${v} is outside the range of a ${kind}`);
|
|
939
|
+
return v;
|
|
940
|
+
}
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
function uniffiMillis(value) {
|
|
944
|
+
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 0) throw uniffiInvalid(`a duration is a non-negative whole number of milliseconds, got ${typeof value === "number" ? value : typeof value}`);
|
|
945
|
+
return value;
|
|
946
|
+
}
|
|
947
|
+
function uniffiObject(value) {
|
|
948
|
+
if (value === null || typeof value !== "object" && typeof value !== "function") throw uniffiInvalid(`expected an object, got ${value === null ? "null" : typeof value}`);
|
|
949
|
+
}
|
|
950
|
+
function uniffiBytes(value) {
|
|
951
|
+
if (!(value instanceof ArrayBuffer || value instanceof Uint8Array)) throw uniffiInvalid(`expected an ArrayBuffer or Uint8Array, got ${value === null ? "null" : typeof value}`);
|
|
952
|
+
}
|
|
909
953
|
var AbstractFfiConverterByteArray = class {
|
|
910
954
|
lift(value) {
|
|
911
955
|
const c = Cursor.fromUint8Array(value);
|
|
912
956
|
return this.readFromCursor(c);
|
|
913
957
|
}
|
|
914
958
|
lower(value, alloc) {
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
959
|
+
try {
|
|
960
|
+
const view = alloc(this.allocationSize(value));
|
|
961
|
+
const c = Cursor.fromUint8Array(view);
|
|
962
|
+
this.writeIntoCursor(value, c);
|
|
963
|
+
return view;
|
|
964
|
+
} catch (error) {
|
|
965
|
+
if (error != null && SdkError.instanceOf(error)) throw error;
|
|
966
|
+
throw uniffiInvalid(error instanceof Error ? error.message : String(error));
|
|
967
|
+
}
|
|
919
968
|
}
|
|
920
969
|
};
|
|
921
970
|
/**
|
|
@@ -935,12 +984,15 @@ function makePrimitive(read, write, byteSize) {
|
|
|
935
984
|
writeIntoCursor: write
|
|
936
985
|
};
|
|
937
986
|
}
|
|
938
|
-
|
|
939
|
-
|
|
987
|
+
uniffiChecked("Int8", makePrimitive((c) => c.readI8(), (v, c) => c.writeI8(v), 1));
|
|
988
|
+
uniffiChecked("Int16", makePrimitive((c) => c.readI16(), (v, c) => c.writeI16(v), 2));
|
|
989
|
+
const FfiConverterInt32 = uniffiChecked("Int32", makePrimitive((c) => c.readI32(), (v, c) => c.writeI32(v), 4));
|
|
990
|
+
const FfiConverterInt64 = uniffiChecked("Int64", makePrimitive((c) => c.readI64(), (v, c) => c.writeI64(v), 8));
|
|
940
991
|
const FfiConverterFloat64 = makePrimitive((c) => c.readF64(), (v, c) => c.writeF64(v), 8);
|
|
941
|
-
const FfiConverterUInt8 = makePrimitive((c) => c.readU8(), (v, c) => c.writeU8(v), 1);
|
|
942
|
-
|
|
943
|
-
const
|
|
992
|
+
const FfiConverterUInt8 = uniffiChecked("UInt8", makePrimitive((c) => c.readU8(), (v, c) => c.writeU8(v), 1));
|
|
993
|
+
uniffiChecked("UInt16", makePrimitive((c) => c.readU16(), (v, c) => c.writeU16(v), 2));
|
|
994
|
+
const FfiConverterUInt32 = uniffiChecked("UInt32", makePrimitive((c) => c.readU32(), (v, c) => c.writeU32(v), 4));
|
|
995
|
+
const FfiConverterUInt64 = uniffiChecked("UInt64", makePrimitive((c) => c.readU64(), (v, c) => c.writeU64(v), 8));
|
|
944
996
|
const FfiConverterBool = (() => {
|
|
945
997
|
const read = (c) => c.readBool();
|
|
946
998
|
const write = (v, c) => c.writeBool(v);
|
|
@@ -964,7 +1016,7 @@ const FfiConverterDuration = (() => {
|
|
|
964
1016
|
return ms + nanos / nanosPerMs;
|
|
965
1017
|
}
|
|
966
1018
|
writeIntoCursor(value, c) {
|
|
967
|
-
const ms = value
|
|
1019
|
+
const ms = uniffiMillis(value);
|
|
968
1020
|
const secsBigInt = BigInt(Math.trunc(ms)) / msPerSecBigInt;
|
|
969
1021
|
const remainingNanos = ms % 1e3 * nanosPerMs;
|
|
970
1022
|
c.writeU64(secsBigInt);
|
|
@@ -1086,6 +1138,7 @@ const FfiConverterArrayBuffer = (() => {
|
|
|
1086
1138
|
c.writeBytes(new Uint8Array(value));
|
|
1087
1139
|
}
|
|
1088
1140
|
allocationSize(value) {
|
|
1141
|
+
uniffiBytes(value);
|
|
1089
1142
|
return 4 + value.byteLength;
|
|
1090
1143
|
}
|
|
1091
1144
|
}
|
|
@@ -1159,6 +1212,7 @@ var FfiConverterCallback = class {
|
|
|
1159
1212
|
return this.handleMap.get(value);
|
|
1160
1213
|
}
|
|
1161
1214
|
lower(value, _alloc) {
|
|
1215
|
+
uniffiObject(value);
|
|
1162
1216
|
return this.handleMap.insert(value);
|
|
1163
1217
|
}
|
|
1164
1218
|
readFromCursor(c) {
|
|
@@ -1241,6 +1295,7 @@ var FfiConverterObject = class {
|
|
|
1241
1295
|
pointerConverter.writeIntoCursor(this.lowerHandle(value), c);
|
|
1242
1296
|
}
|
|
1243
1297
|
lowerHandle(value) {
|
|
1298
|
+
uniffiObject(value);
|
|
1244
1299
|
if (this.factory.isConcreteType(value)) return this.factory.clonePointer(value);
|
|
1245
1300
|
else throw new Error("Cannot lower this object to a pointer");
|
|
1246
1301
|
}
|
|
@@ -1255,6 +1310,7 @@ var FfiConverterObjectWithCallbacks = class extends FfiConverterObject {
|
|
|
1255
1310
|
this.handleMap = handleMap;
|
|
1256
1311
|
}
|
|
1257
1312
|
lowerHandle(value) {
|
|
1313
|
+
uniffiObject(value);
|
|
1258
1314
|
if (this.factory.isConcreteType(value)) return super.lowerHandle(value);
|
|
1259
1315
|
return this.handleMap.insert(value);
|
|
1260
1316
|
}
|
|
@@ -1745,6 +1801,7 @@ const DEFINITIONS = {
|
|
|
1745
1801
|
FfiType.Handle,
|
|
1746
1802
|
FfiType.Handle,
|
|
1747
1803
|
FfiType.RustBuffer,
|
|
1804
|
+
FfiType.RustBuffer,
|
|
1748
1805
|
FfiType.RustBuffer
|
|
1749
1806
|
],
|
|
1750
1807
|
ret: FfiType.Handle,
|
|
@@ -1860,7 +1917,7 @@ const DEFINITIONS = {
|
|
|
1860
1917
|
"uniffi_trylimbo_sdk_verifier_fn_method_streamverifier_resume": {
|
|
1861
1918
|
args: [FfiType.Handle, FfiType.RustBuffer],
|
|
1862
1919
|
ret: FfiType.Handle,
|
|
1863
|
-
hasRustCallStatus:
|
|
1920
|
+
hasRustCallStatus: false
|
|
1864
1921
|
},
|
|
1865
1922
|
"ffi_trylimbo_sdk_verifier_uniffi_contract_version": {
|
|
1866
1923
|
args: [],
|
|
@@ -2285,7 +2342,6 @@ var trylimbo_verifier_exports = /* @__PURE__ */ __exportAll({
|
|
|
2285
2342
|
Repository_Tags: () => Repository_Tags,
|
|
2286
2343
|
ResourceRef: () => ResourceRef,
|
|
2287
2344
|
ReviewRating: () => ReviewRating,
|
|
2288
|
-
Role: () => Role,
|
|
2289
2345
|
Scope: () => Scope,
|
|
2290
2346
|
SdkError: () => SdkError,
|
|
2291
2347
|
SdkError_Tags: () => SdkError_Tags,
|
|
@@ -3085,84 +3141,6 @@ const FfiConverterTypeRange = (() => {
|
|
|
3085
3141
|
return new FFIConverter();
|
|
3086
3142
|
})();
|
|
3087
3143
|
/**
|
|
3088
|
-
* A role describing the region.
|
|
3089
|
-
|
|
3090
|
-
*/
|
|
3091
|
-
let Role = /* @__PURE__ */ function(Role) {
|
|
3092
|
-
/**
|
|
3093
|
-
* Arbitrary area worth identifying.
|
|
3094
|
-
*/
|
|
3095
|
-
Role[Role["C2paAreaOfInterest"] = 0] = "C2paAreaOfInterest";
|
|
3096
|
-
/**
|
|
3097
|
-
* This area is all that is left after a crop action.
|
|
3098
|
-
*/
|
|
3099
|
-
Role[Role["C2paCropped"] = 1] = "C2paCropped";
|
|
3100
|
-
/**
|
|
3101
|
-
* This area has had edits applied to it.
|
|
3102
|
-
*/
|
|
3103
|
-
Role[Role["C2paEdited"] = 2] = "C2paEdited";
|
|
3104
|
-
/**
|
|
3105
|
-
* The area where an ingredient was placed/added.
|
|
3106
|
-
*/
|
|
3107
|
-
Role[Role["C2paPlaced"] = 3] = "C2paPlaced";
|
|
3108
|
-
/**
|
|
3109
|
-
* Something in this area was redacted.
|
|
3110
|
-
*/
|
|
3111
|
-
Role[Role["C2paRedacted"] = 4] = "C2paRedacted";
|
|
3112
|
-
/**
|
|
3113
|
-
* Area specific to a subject (human or not).
|
|
3114
|
-
*/
|
|
3115
|
-
Role[Role["C2paSubjectArea"] = 5] = "C2paSubjectArea";
|
|
3116
|
-
/**
|
|
3117
|
-
* A range of information was removed/deleted.
|
|
3118
|
-
*/
|
|
3119
|
-
Role[Role["C2paDeleted"] = 6] = "C2paDeleted";
|
|
3120
|
-
/**
|
|
3121
|
-
* Styling was applied to this area.
|
|
3122
|
-
*/
|
|
3123
|
-
Role[Role["C2paStyled"] = 7] = "C2paStyled";
|
|
3124
|
-
/**
|
|
3125
|
-
* Invisible watermarking was applied to this area for the purpose of soft binding.
|
|
3126
|
-
*/
|
|
3127
|
-
Role[Role["C2paWatermarked"] = 8] = "C2paWatermarked";
|
|
3128
|
-
return Role;
|
|
3129
|
-
}({});
|
|
3130
|
-
const FfiConverterTypeRole = (() => {
|
|
3131
|
-
class FFIConverter extends AbstractFfiConverterByteArray {
|
|
3132
|
-
readFromCursor(c) {
|
|
3133
|
-
switch (c.readI32()) {
|
|
3134
|
-
case 1: return 0;
|
|
3135
|
-
case 2: return 1;
|
|
3136
|
-
case 3: return 2;
|
|
3137
|
-
case 4: return 3;
|
|
3138
|
-
case 5: return 4;
|
|
3139
|
-
case 6: return 5;
|
|
3140
|
-
case 7: return 6;
|
|
3141
|
-
case 8: return 7;
|
|
3142
|
-
case 9: return 8;
|
|
3143
|
-
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
3144
|
-
}
|
|
3145
|
-
}
|
|
3146
|
-
writeIntoCursor(value, c) {
|
|
3147
|
-
switch (value) {
|
|
3148
|
-
case 0: return c.writeI32(1);
|
|
3149
|
-
case 1: return c.writeI32(2);
|
|
3150
|
-
case 2: return c.writeI32(3);
|
|
3151
|
-
case 3: return c.writeI32(4);
|
|
3152
|
-
case 4: return c.writeI32(5);
|
|
3153
|
-
case 5: return c.writeI32(6);
|
|
3154
|
-
case 6: return c.writeI32(7);
|
|
3155
|
-
case 7: return c.writeI32(8);
|
|
3156
|
-
case 8: return c.writeI32(9);
|
|
3157
|
-
}
|
|
3158
|
-
}
|
|
3159
|
-
allocationSize(value) {
|
|
3160
|
-
return 4;
|
|
3161
|
-
}
|
|
3162
|
-
}
|
|
3163
|
-
return new FFIConverter();
|
|
3164
|
-
})();
|
|
3165
|
-
/**
|
|
3166
3144
|
* Generated factory for {@link RegionOfInterest} record objects.
|
|
3167
3145
|
*/
|
|
3168
3146
|
const RegionOfInterest = (() => {
|
|
@@ -3185,7 +3163,6 @@ const FfiConverterTypeRegionOfInterest = (() => {
|
|
|
3185
3163
|
metadata: FfiConverterOptionalTypeJsonValue.readFromCursor(c),
|
|
3186
3164
|
name: FfiConverterOptionalString.readFromCursor(c),
|
|
3187
3165
|
region: FfiConverterSequenceTypeRange.readFromCursor(c),
|
|
3188
|
-
role: FfiConverterOptionalTypeRole.readFromCursor(c),
|
|
3189
3166
|
type: FfiConverterOptionalString.readFromCursor(c)
|
|
3190
3167
|
};
|
|
3191
3168
|
}
|
|
@@ -3195,11 +3172,10 @@ const FfiConverterTypeRegionOfInterest = (() => {
|
|
|
3195
3172
|
FfiConverterOptionalTypeJsonValue.writeIntoCursor(value.metadata, c);
|
|
3196
3173
|
FfiConverterOptionalString.writeIntoCursor(value.name, c);
|
|
3197
3174
|
FfiConverterSequenceTypeRange.writeIntoCursor(value.region, c);
|
|
3198
|
-
FfiConverterOptionalTypeRole.writeIntoCursor(value.role, c);
|
|
3199
3175
|
FfiConverterOptionalString.writeIntoCursor(value.type, c);
|
|
3200
3176
|
}
|
|
3201
3177
|
allocationSize(value) {
|
|
3202
|
-
return FfiConverterOptionalString.allocationSize(value.description) + FfiConverterOptionalString.allocationSize(value.identifier) + FfiConverterOptionalTypeJsonValue.allocationSize(value.metadata) + FfiConverterOptionalString.allocationSize(value.name) + FfiConverterSequenceTypeRange.allocationSize(value.region) +
|
|
3178
|
+
return FfiConverterOptionalString.allocationSize(value.description) + FfiConverterOptionalString.allocationSize(value.identifier) + FfiConverterOptionalTypeJsonValue.allocationSize(value.metadata) + FfiConverterOptionalString.allocationSize(value.name) + FfiConverterSequenceTypeRange.allocationSize(value.region) + FfiConverterOptionalString.allocationSize(value.type);
|
|
3203
3179
|
}
|
|
3204
3180
|
}
|
|
3205
3181
|
return new FFIConverter();
|
|
@@ -3320,7 +3296,7 @@ const FfiConverterTypeAssetType = (() => {
|
|
|
3320
3296
|
*/
|
|
3321
3297
|
let HardBinding = /* @__PURE__ */ function(HardBinding) {
|
|
3322
3298
|
/**
|
|
3323
|
-
*
|
|
3299
|
+
* A data, box, BMFF or collection hash was checked against these bytes and held.
|
|
3324
3300
|
*/
|
|
3325
3301
|
HardBinding[HardBinding["Match"] = 0] = "Match";
|
|
3326
3302
|
/**
|
|
@@ -3328,6 +3304,11 @@ let HardBinding = /* @__PURE__ */ function(HardBinding) {
|
|
|
3328
3304
|
* bytes. Whether it is otherwise authentic is its remaining statuses.
|
|
3329
3305
|
*/
|
|
3330
3306
|
HardBinding[HardBinding["Mismatch"] = 1] = "Mismatch";
|
|
3307
|
+
/**
|
|
3308
|
+
* No hash was checked against these bytes: the active manifest carries no hard binding, or
|
|
3309
|
+
* validation never reached it. Says nothing about the bytes, so it is never a match.
|
|
3310
|
+
*/
|
|
3311
|
+
HardBinding[HardBinding["Unverified"] = 2] = "Unverified";
|
|
3331
3312
|
return HardBinding;
|
|
3332
3313
|
}({});
|
|
3333
3314
|
const FfiConverterTypeHardBinding = (() => {
|
|
@@ -3336,6 +3317,7 @@ const FfiConverterTypeHardBinding = (() => {
|
|
|
3336
3317
|
switch (c.readI32()) {
|
|
3337
3318
|
case 1: return 0;
|
|
3338
3319
|
case 2: return 1;
|
|
3320
|
+
case 3: return 2;
|
|
3339
3321
|
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
3340
3322
|
}
|
|
3341
3323
|
}
|
|
@@ -3343,6 +3325,7 @@ const FfiConverterTypeHardBinding = (() => {
|
|
|
3343
3325
|
switch (value) {
|
|
3344
3326
|
case 0: return c.writeI32(1);
|
|
3345
3327
|
case 1: return c.writeI32(2);
|
|
3328
|
+
case 2: return c.writeI32(3);
|
|
3346
3329
|
}
|
|
3347
3330
|
}
|
|
3348
3331
|
allocationSize(value) {
|
|
@@ -3842,6 +3825,7 @@ const FfiConverterTypeIngredient = (() => {
|
|
|
3842
3825
|
hash: FfiConverterOptionalString.readFromCursor(c),
|
|
3843
3826
|
informationalUri: FfiConverterOptionalString.readFromCursor(c),
|
|
3844
3827
|
instanceId: FfiConverterOptionalString.readFromCursor(c),
|
|
3828
|
+
isCreated: FfiConverterOptionalBoolean.readFromCursor(c),
|
|
3845
3829
|
label: FfiConverterOptionalString.readFromCursor(c),
|
|
3846
3830
|
manifestData: FfiConverterOptionalTypeResourceRef.readFromCursor(c),
|
|
3847
3831
|
metadata: FfiConverterOptionalTypeAssertionMetadata.readFromCursor(c),
|
|
@@ -3866,6 +3850,7 @@ const FfiConverterTypeIngredient = (() => {
|
|
|
3866
3850
|
FfiConverterOptionalString.writeIntoCursor(value.hash, c);
|
|
3867
3851
|
FfiConverterOptionalString.writeIntoCursor(value.informationalUri, c);
|
|
3868
3852
|
FfiConverterOptionalString.writeIntoCursor(value.instanceId, c);
|
|
3853
|
+
FfiConverterOptionalBoolean.writeIntoCursor(value.isCreated, c);
|
|
3869
3854
|
FfiConverterOptionalString.writeIntoCursor(value.label, c);
|
|
3870
3855
|
FfiConverterOptionalTypeResourceRef.writeIntoCursor(value.manifestData, c);
|
|
3871
3856
|
FfiConverterOptionalTypeAssertionMetadata.writeIntoCursor(value.metadata, c);
|
|
@@ -3879,7 +3864,7 @@ const FfiConverterTypeIngredient = (() => {
|
|
|
3879
3864
|
FfiConverterOptionalSequenceTypeValidationStatus.writeIntoCursor(value.validationStatus, c);
|
|
3880
3865
|
}
|
|
3881
3866
|
allocationSize(value) {
|
|
3882
|
-
return FfiConverterOptionalString.allocationSize(value.activeManifest) + FfiConverterOptionalTypeResourceRef.allocationSize(value.data) + FfiConverterOptionalSequenceTypeAssetType.allocationSize(value.dataTypes) + FfiConverterOptionalString.allocationSize(value.description) + FfiConverterOptionalString.allocationSize(value.digitalSourceType) + FfiConverterOptionalString.allocationSize(value.documentId) + FfiConverterOptionalString.allocationSize(value.format) + FfiConverterOptionalString.allocationSize(value.hash) + FfiConverterOptionalString.allocationSize(value.informationalUri) + FfiConverterOptionalString.allocationSize(value.instanceId) + FfiConverterOptionalString.allocationSize(value.label) + FfiConverterOptionalTypeResourceRef.allocationSize(value.manifestData) + FfiConverterOptionalTypeAssertionMetadata.allocationSize(value.metadata) + FfiConverterOptionalSequenceTypeResourceRef.allocationSize(value.ocspResponses) + FfiConverterOptionalString.allocationSize(value.provenance) + FfiConverterTypeRelationship.allocationSize(value.relationship) + FfiConverterOptionalSequenceString.allocationSize(value.softBindingAlgorithmsMatched) + FfiConverterOptionalTypeResourceRef.allocationSize(value.thumbnail) + FfiConverterOptionalString.allocationSize(value.title) + FfiConverterOptionalTypeValidationResults.allocationSize(value.validationResults) + FfiConverterOptionalSequenceTypeValidationStatus.allocationSize(value.validationStatus);
|
|
3867
|
+
return FfiConverterOptionalString.allocationSize(value.activeManifest) + FfiConverterOptionalTypeResourceRef.allocationSize(value.data) + FfiConverterOptionalSequenceTypeAssetType.allocationSize(value.dataTypes) + FfiConverterOptionalString.allocationSize(value.description) + FfiConverterOptionalString.allocationSize(value.digitalSourceType) + FfiConverterOptionalString.allocationSize(value.documentId) + FfiConverterOptionalString.allocationSize(value.format) + FfiConverterOptionalString.allocationSize(value.hash) + FfiConverterOptionalString.allocationSize(value.informationalUri) + FfiConverterOptionalString.allocationSize(value.instanceId) + FfiConverterOptionalBoolean.allocationSize(value.isCreated) + FfiConverterOptionalString.allocationSize(value.label) + FfiConverterOptionalTypeResourceRef.allocationSize(value.manifestData) + FfiConverterOptionalTypeAssertionMetadata.allocationSize(value.metadata) + FfiConverterOptionalSequenceTypeResourceRef.allocationSize(value.ocspResponses) + FfiConverterOptionalString.allocationSize(value.provenance) + FfiConverterTypeRelationship.allocationSize(value.relationship) + FfiConverterOptionalSequenceString.allocationSize(value.softBindingAlgorithmsMatched) + FfiConverterOptionalTypeResourceRef.allocationSize(value.thumbnail) + FfiConverterOptionalString.allocationSize(value.title) + FfiConverterOptionalTypeValidationResults.allocationSize(value.validationResults) + FfiConverterOptionalSequenceTypeValidationStatus.allocationSize(value.validationStatus);
|
|
3883
3868
|
}
|
|
3884
3869
|
}
|
|
3885
3870
|
return new FFIConverter();
|
|
@@ -5830,13 +5815,14 @@ const FfiConverterTypeGolden = (() => {
|
|
|
5830
5815
|
let VerdictRule = /* @__PURE__ */ function(VerdictRule) {
|
|
5831
5816
|
VerdictRule[VerdictRule["OnlyCandidate"] = 0] = "OnlyCandidate";
|
|
5832
5817
|
/**
|
|
5833
|
-
*
|
|
5818
|
+
* Its hash holds over these bytes and no other candidate's does.
|
|
5834
5819
|
*/
|
|
5835
|
-
VerdictRule[VerdictRule["
|
|
5820
|
+
VerdictRule[VerdictRule["HardBinding"] = 1] = "HardBinding";
|
|
5836
5821
|
/**
|
|
5837
|
-
*
|
|
5822
|
+
* Every other candidate with the same hard-binding standing is superseded by a credential
|
|
5823
|
+
* in this report.
|
|
5838
5824
|
*/
|
|
5839
|
-
VerdictRule[VerdictRule["
|
|
5825
|
+
VerdictRule[VerdictRule["NotSuperseded"] = 2] = "NotSuperseded";
|
|
5840
5826
|
return VerdictRule;
|
|
5841
5827
|
}({});
|
|
5842
5828
|
const FfiConverterTypeVerdictRule = (() => {
|
|
@@ -5866,6 +5852,7 @@ let Verdict_Tags = /* @__PURE__ */ function(Verdict_Tags) {
|
|
|
5866
5852
|
Verdict_Tags["Unsigned"] = "Unsigned";
|
|
5867
5853
|
Verdict_Tags["Inconclusive"] = "Inconclusive";
|
|
5868
5854
|
Verdict_Tags["Embedded"] = "Embedded";
|
|
5855
|
+
Verdict_Tags["Invalid"] = "Invalid";
|
|
5869
5856
|
Verdict_Tags["Recovered"] = "Recovered";
|
|
5870
5857
|
Verdict_Tags["RecoveredDerivative"] = "RecoveredDerivative";
|
|
5871
5858
|
Verdict_Tags["Ambiguous"] = "Ambiguous";
|
|
@@ -5880,12 +5867,17 @@ let Verdict_Tags = /* @__PURE__ */ function(Verdict_Tags) {
|
|
|
5880
5867
|
* and the golden comparison does not contradict it. When it `differs` from what the repository
|
|
5881
5868
|
* holds, or several recovered candidates leave the comparison indeterminate, the embedded and
|
|
5882
5869
|
* the recovered manifests are reported as ambiguous: C2PA 2.4's substitution use case leaves
|
|
5883
|
-
* that trust decision to the client.
|
|
5884
|
-
*
|
|
5885
|
-
*
|
|
5886
|
-
*
|
|
5887
|
-
*
|
|
5888
|
-
*
|
|
5870
|
+
* that trust decision to the client.
|
|
5871
|
+
*
|
|
5872
|
+
* Otherwise a recovered candidate is named only when evidence singles it out, and only among
|
|
5873
|
+
* those that are authentic (they fail on nothing but a hash mismatch) and state a hard binding.
|
|
5874
|
+
* The verdict is about THESE bytes, so a candidate whose hash holds over them outranks any whose
|
|
5875
|
+
* hash does not, whatever the repository calls its head; among equals, one that no other
|
|
5876
|
+
* credential supersedes (the successor's signed `parentOf` link) outranks the rest. A repository
|
|
5877
|
+
* score, a signature time or a position in the list is not evidence of which manifest belongs to
|
|
5878
|
+
* these bytes, so candidates those alone would separate are reported as ambiguous. When no
|
|
5879
|
+
* credential is both authentic and bound to some bytes, the verdict is `Invalid`, never a
|
|
5880
|
+
* recovered one: a manifest that fails its own signature or signer vouches for nothing.
|
|
5889
5881
|
*/
|
|
5890
5882
|
const Verdict = (() => {
|
|
5891
5883
|
/**
|
|
@@ -5929,8 +5921,7 @@ const Verdict = (() => {
|
|
|
5929
5921
|
}
|
|
5930
5922
|
}
|
|
5931
5923
|
/**
|
|
5932
|
-
* The manifest the asset carries, always the first credential
|
|
5933
|
-
* verdict only when nothing was recovered.
|
|
5924
|
+
* The manifest the asset carries, always the first credential, and not `Invalid`.
|
|
5934
5925
|
*/
|
|
5935
5926
|
class Embedded_ extends UniffiEnum {
|
|
5936
5927
|
/**
|
|
@@ -5950,6 +5941,29 @@ const Verdict = (() => {
|
|
|
5950
5941
|
}
|
|
5951
5942
|
}
|
|
5952
5943
|
/**
|
|
5944
|
+
* The credential at `index`, embedded or recovered, is the best there is and it does not
|
|
5945
|
+
* hold up: it fails validation beyond a hash mismatch, or states no hard binding at all.
|
|
5946
|
+
*/
|
|
5947
|
+
class Invalid_ extends UniffiEnum {
|
|
5948
|
+
/**
|
|
5949
|
+
* @private
|
|
5950
|
+
* This field is private and should not be used, use `tag` instead.
|
|
5951
|
+
*/
|
|
5952
|
+
[uniffiTypeNameSymbol] = "Verdict";
|
|
5953
|
+
tag = "Invalid";
|
|
5954
|
+
inner;
|
|
5955
|
+
constructor(inner) {
|
|
5956
|
+
super("Verdict", "Invalid");
|
|
5957
|
+
this.inner = Object.freeze(inner);
|
|
5958
|
+
}
|
|
5959
|
+
static new(inner) {
|
|
5960
|
+
return new Invalid_(inner);
|
|
5961
|
+
}
|
|
5962
|
+
static instanceOf(obj) {
|
|
5963
|
+
return obj.tag === "Invalid";
|
|
5964
|
+
}
|
|
5965
|
+
}
|
|
5966
|
+
/**
|
|
5953
5967
|
* A recovered manifest whose hard binding holds over these bytes.
|
|
5954
5968
|
*/
|
|
5955
5969
|
class Recovered_ extends UniffiEnum {
|
|
@@ -5972,7 +5986,8 @@ const Verdict = (() => {
|
|
|
5972
5986
|
}
|
|
5973
5987
|
}
|
|
5974
5988
|
/**
|
|
5975
|
-
* A recovered manifest for
|
|
5989
|
+
* A recovered manifest for another state of these bytes: its hard binding mismatches, and
|
|
5990
|
+
* no candidate's holds.
|
|
5976
5991
|
*/
|
|
5977
5992
|
class RecoveredDerivative_ extends UniffiEnum {
|
|
5978
5993
|
/**
|
|
@@ -6025,6 +6040,7 @@ const Verdict = (() => {
|
|
|
6025
6040
|
Unsigned: Unsigned_,
|
|
6026
6041
|
Inconclusive: Inconclusive_,
|
|
6027
6042
|
Embedded: Embedded_,
|
|
6043
|
+
Invalid: Invalid_,
|
|
6028
6044
|
Recovered: Recovered_,
|
|
6029
6045
|
RecoveredDerivative: RecoveredDerivative_,
|
|
6030
6046
|
Ambiguous: Ambiguous_
|
|
@@ -6037,15 +6053,16 @@ const FfiConverterTypeVerdict = (() => {
|
|
|
6037
6053
|
case 1: return new Verdict.Unsigned();
|
|
6038
6054
|
case 2: return new Verdict.Inconclusive();
|
|
6039
6055
|
case 3: return new Verdict.Embedded();
|
|
6040
|
-
case 4: return new Verdict.
|
|
6056
|
+
case 4: return new Verdict.Invalid({ index: FfiConverterUInt32.readFromCursor(c) });
|
|
6057
|
+
case 5: return new Verdict.Recovered({
|
|
6041
6058
|
index: FfiConverterUInt32.readFromCursor(c),
|
|
6042
6059
|
decidedBy: FfiConverterTypeVerdictRule.readFromCursor(c)
|
|
6043
6060
|
});
|
|
6044
|
-
case
|
|
6061
|
+
case 6: return new Verdict.RecoveredDerivative({
|
|
6045
6062
|
index: FfiConverterUInt32.readFromCursor(c),
|
|
6046
6063
|
decidedBy: FfiConverterTypeVerdictRule.readFromCursor(c)
|
|
6047
6064
|
});
|
|
6048
|
-
case
|
|
6065
|
+
case 7: return new Verdict.Ambiguous({ candidates: FfiConverterSequenceUInt32.readFromCursor(c) });
|
|
6049
6066
|
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
6050
6067
|
}
|
|
6051
6068
|
}
|
|
@@ -6060,22 +6077,28 @@ const FfiConverterTypeVerdict = (() => {
|
|
|
6060
6077
|
case "Embedded":
|
|
6061
6078
|
c.writeI32(3);
|
|
6062
6079
|
return;
|
|
6063
|
-
case "
|
|
6080
|
+
case "Invalid": {
|
|
6064
6081
|
c.writeI32(4);
|
|
6065
6082
|
const inner = value.inner;
|
|
6066
6083
|
FfiConverterUInt32.writeIntoCursor(inner.index, c);
|
|
6084
|
+
return;
|
|
6085
|
+
}
|
|
6086
|
+
case "Recovered": {
|
|
6087
|
+
c.writeI32(5);
|
|
6088
|
+
const inner = value.inner;
|
|
6089
|
+
FfiConverterUInt32.writeIntoCursor(inner.index, c);
|
|
6067
6090
|
FfiConverterTypeVerdictRule.writeIntoCursor(inner.decidedBy, c);
|
|
6068
6091
|
return;
|
|
6069
6092
|
}
|
|
6070
6093
|
case "RecoveredDerivative": {
|
|
6071
|
-
c.writeI32(
|
|
6094
|
+
c.writeI32(6);
|
|
6072
6095
|
const inner = value.inner;
|
|
6073
6096
|
FfiConverterUInt32.writeIntoCursor(inner.index, c);
|
|
6074
6097
|
FfiConverterTypeVerdictRule.writeIntoCursor(inner.decidedBy, c);
|
|
6075
6098
|
return;
|
|
6076
6099
|
}
|
|
6077
6100
|
case "Ambiguous": {
|
|
6078
|
-
c.writeI32(
|
|
6101
|
+
c.writeI32(7);
|
|
6079
6102
|
const inner = value.inner;
|
|
6080
6103
|
FfiConverterSequenceUInt32.writeIntoCursor(inner.candidates, c);
|
|
6081
6104
|
return;
|
|
@@ -6088,6 +6111,12 @@ const FfiConverterTypeVerdict = (() => {
|
|
|
6088
6111
|
case "Unsigned": return 4;
|
|
6089
6112
|
case "Inconclusive": return 4;
|
|
6090
6113
|
case "Embedded": return 4;
|
|
6114
|
+
case "Invalid": {
|
|
6115
|
+
const inner = value.inner;
|
|
6116
|
+
let size = 4;
|
|
6117
|
+
size += FfiConverterUInt32.allocationSize(inner.index);
|
|
6118
|
+
return size;
|
|
6119
|
+
}
|
|
6091
6120
|
case "Recovered": {
|
|
6092
6121
|
const inner = value.inner;
|
|
6093
6122
|
let size = 4;
|
|
@@ -7357,7 +7386,10 @@ const FfiConverterTypeRecovery = (() => {
|
|
|
7357
7386
|
* Generated factory for {@link StreamVerifierOptions} record objects.
|
|
7358
7387
|
*/
|
|
7359
7388
|
const StreamVerifierOptions = (() => {
|
|
7360
|
-
const defaults = () => ({
|
|
7389
|
+
const defaults = () => ({
|
|
7390
|
+
skewTolerance: void 0,
|
|
7391
|
+
manifestOrigins: []
|
|
7392
|
+
});
|
|
7361
7393
|
const create = (() => {
|
|
7362
7394
|
return uniffiCreateRecord(defaults);
|
|
7363
7395
|
})();
|
|
@@ -7372,15 +7404,17 @@ const FfiConverterTypeStreamVerifierOptions = (() => {
|
|
|
7372
7404
|
readFromCursor(c) {
|
|
7373
7405
|
return {
|
|
7374
7406
|
trust: FfiConverterTypeTrust.readFromCursor(c),
|
|
7375
|
-
skewTolerance: FfiConverterOptionalDuration.readFromCursor(c)
|
|
7407
|
+
skewTolerance: FfiConverterOptionalDuration.readFromCursor(c),
|
|
7408
|
+
manifestOrigins: FfiConverterSequenceString.readFromCursor(c)
|
|
7376
7409
|
};
|
|
7377
7410
|
}
|
|
7378
7411
|
writeIntoCursor(value, c) {
|
|
7379
7412
|
FfiConverterTypeTrust.writeIntoCursor(value.trust, c);
|
|
7380
7413
|
FfiConverterOptionalDuration.writeIntoCursor(value.skewTolerance, c);
|
|
7414
|
+
FfiConverterSequenceString.writeIntoCursor(value.manifestOrigins, c);
|
|
7381
7415
|
}
|
|
7382
7416
|
allocationSize(value) {
|
|
7383
|
-
return FfiConverterTypeTrust.allocationSize(value.trust) + FfiConverterOptionalDuration.allocationSize(value.skewTolerance);
|
|
7417
|
+
return FfiConverterTypeTrust.allocationSize(value.trust) + FfiConverterOptionalDuration.allocationSize(value.skewTolerance) + FfiConverterSequenceString.allocationSize(value.manifestOrigins);
|
|
7384
7418
|
}
|
|
7385
7419
|
}
|
|
7386
7420
|
return new FFIConverter();
|
|
@@ -7388,7 +7422,6 @@ const FfiConverterTypeStreamVerifierOptions = (() => {
|
|
|
7388
7422
|
let SegmentValidation_Tags = /* @__PURE__ */ function(SegmentValidation_Tags) {
|
|
7389
7423
|
SegmentValidation_Tags["Init"] = "Init";
|
|
7390
7424
|
SegmentValidation_Tags["Media"] = "Media";
|
|
7391
|
-
SegmentValidation_Tags["Unknown"] = "Unknown";
|
|
7392
7425
|
return SegmentValidation_Tags;
|
|
7393
7426
|
}({});
|
|
7394
7427
|
/**
|
|
@@ -7433,31 +7466,13 @@ const SegmentValidation = (() => {
|
|
|
7433
7466
|
return obj.tag === "Media";
|
|
7434
7467
|
}
|
|
7435
7468
|
}
|
|
7436
|
-
class Unknown_ extends UniffiEnum {
|
|
7437
|
-
/**
|
|
7438
|
-
* @private
|
|
7439
|
-
* This field is private and should not be used, use `tag` instead.
|
|
7440
|
-
*/
|
|
7441
|
-
[uniffiTypeNameSymbol] = "SegmentValidation";
|
|
7442
|
-
tag = "Unknown";
|
|
7443
|
-
constructor() {
|
|
7444
|
-
super("SegmentValidation", "Unknown");
|
|
7445
|
-
}
|
|
7446
|
-
static new() {
|
|
7447
|
-
return new Unknown_();
|
|
7448
|
-
}
|
|
7449
|
-
static instanceOf(obj) {
|
|
7450
|
-
return obj.tag === "Unknown";
|
|
7451
|
-
}
|
|
7452
|
-
}
|
|
7453
7469
|
function instanceOf(obj) {
|
|
7454
7470
|
return obj[uniffiTypeNameSymbol] === "SegmentValidation";
|
|
7455
7471
|
}
|
|
7456
7472
|
return Object.freeze({
|
|
7457
7473
|
instanceOf,
|
|
7458
7474
|
Init: Init_,
|
|
7459
|
-
Media: Media_
|
|
7460
|
-
Unknown: Unknown_
|
|
7475
|
+
Media: Media_
|
|
7461
7476
|
});
|
|
7462
7477
|
})();
|
|
7463
7478
|
const FfiConverterTypeSegmentValidation = (() => {
|
|
@@ -7466,7 +7481,6 @@ const FfiConverterTypeSegmentValidation = (() => {
|
|
|
7466
7481
|
switch (c.readI32()) {
|
|
7467
7482
|
case 1: return new SegmentValidation.Init(FfiConverterTypeInitValidation.readFromCursor(c));
|
|
7468
7483
|
case 2: return new SegmentValidation.Media(FfiConverterTypeMediaValidation.readFromCursor(c));
|
|
7469
|
-
case 3: return new SegmentValidation.Unknown();
|
|
7470
7484
|
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
7471
7485
|
}
|
|
7472
7486
|
}
|
|
@@ -7484,9 +7498,6 @@ const FfiConverterTypeSegmentValidation = (() => {
|
|
|
7484
7498
|
FfiConverterTypeMediaValidation.writeIntoCursor(inner[0], c);
|
|
7485
7499
|
return;
|
|
7486
7500
|
}
|
|
7487
|
-
case "Unknown":
|
|
7488
|
-
c.writeI32(3);
|
|
7489
|
-
return;
|
|
7490
7501
|
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
7491
7502
|
}
|
|
7492
7503
|
}
|
|
@@ -7504,7 +7515,6 @@ const FfiConverterTypeSegmentValidation = (() => {
|
|
|
7504
7515
|
size += FfiConverterTypeMediaValidation.allocationSize(inner[0]);
|
|
7505
7516
|
return size;
|
|
7506
7517
|
}
|
|
7507
|
-
case "Unknown": return 4;
|
|
7508
7518
|
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
7509
7519
|
}
|
|
7510
7520
|
}
|
|
@@ -7606,6 +7616,7 @@ var AssetVerifier = class extends UniffiAbstractObject {
|
|
|
7606
7616
|
* order; an empty list is a built-in C2PA media format. The SDK links no plugin itself.
|
|
7607
7617
|
* Returns embedded/recovered credentials plus typed recovery and golden-comparison
|
|
7608
7618
|
* outcomes.
|
|
7619
|
+
* `format` optionally declares the media type for inputs such as SVG and plain text.
|
|
7609
7620
|
*
|
|
7610
7621
|
* # Errors
|
|
7611
7622
|
*
|
|
@@ -7613,11 +7624,11 @@ var AssetVerifier = class extends UniffiAbstractObject {
|
|
|
7613
7624
|
* parsed, and the backend's fault when it fails mid-read. Everything a repository answers
|
|
7614
7625
|
* or fails to answer is in the recovery summary.
|
|
7615
7626
|
*/
|
|
7616
|
-
async verify(source, recovery = void 0, plugins = [], asyncOpts_) {
|
|
7627
|
+
async verify(source, recovery = void 0, plugins = [], format = void 0, asyncOpts_) {
|
|
7617
7628
|
const __stack = uniffiIsDebug ? (/* @__PURE__ */ new Error()).stack : void 0;
|
|
7618
7629
|
try {
|
|
7619
7630
|
return await uniffiRustCallAsync(uniffiCaller, () => {
|
|
7620
|
-
return getter().uniffi_trylimbo_sdk_verifier_fn_method_assetverifier_verify(uniffiTypeAssetVerifierObjectFactory.clonePointer(this), FfiConverterTypeRangeSource.lower(source, getter().rustbuffer_alloc), FfiConverterOptionalTypeRecovery.lower(recovery, getter().rustbuffer_alloc), FfiConverterSequenceTypePluginReader.lower(plugins, getter().rustbuffer_alloc));
|
|
7631
|
+
return getter().uniffi_trylimbo_sdk_verifier_fn_method_assetverifier_verify(uniffiTypeAssetVerifierObjectFactory.clonePointer(this), FfiConverterTypeRangeSource.lower(source, getter().rustbuffer_alloc), FfiConverterOptionalTypeRecovery.lower(recovery, getter().rustbuffer_alloc), FfiConverterSequenceTypePluginReader.lower(plugins, getter().rustbuffer_alloc), FfiConverterOptionalString.lower(format, getter().rustbuffer_alloc));
|
|
7621
7632
|
}, getter().ffi_trylimbo_sdk_verifier_rust_future_poll_rust_buffer, getter().ffi_trylimbo_sdk_verifier_rust_future_cancel_rust_buffer, getter().ffi_trylimbo_sdk_verifier_rust_future_complete_rust_buffer, getter().ffi_trylimbo_sdk_verifier_rust_future_free_rust_buffer, (__rb) => {
|
|
7622
7633
|
try {
|
|
7623
7634
|
return FfiConverterTypeAssetVerification.lift(__rb);
|
|
@@ -7942,7 +7953,7 @@ var StreamSession = class extends UniffiAbstractObject {
|
|
|
7942
7953
|
*
|
|
7943
7954
|
* `STREAM_INVALID` when a registered session key cannot be re-encoded.
|
|
7944
7955
|
*/
|
|
7945
|
-
|
|
7956
|
+
export() {
|
|
7946
7957
|
const __rb = uniffiCaller.rustCallWithError(FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError), (callStatus) => {
|
|
7947
7958
|
return getter().uniffi_trylimbo_sdk_verifier_fn_method_streamsession_export(uniffiTypeStreamSessionObjectFactory.clonePointer(this), callStatus);
|
|
7948
7959
|
}, FfiConverterString.lift.bind(FfiConverterString));
|
|
@@ -8080,10 +8091,16 @@ var StreamVerifier = class extends UniffiAbstractObject {
|
|
|
8080
8091
|
* A field violation at `state` when it is not a value [`StreamSession::export`]
|
|
8081
8092
|
* produced (`state.malformed`), or one of another export version (`state.version`).
|
|
8082
8093
|
*/
|
|
8083
|
-
resume(state) {
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8094
|
+
async resume(state, asyncOpts_) {
|
|
8095
|
+
const __stack = uniffiIsDebug ? (/* @__PURE__ */ new Error()).stack : void 0;
|
|
8096
|
+
try {
|
|
8097
|
+
return await uniffiRustCallAsync(uniffiCaller, () => {
|
|
8098
|
+
return getter().uniffi_trylimbo_sdk_verifier_fn_method_streamverifier_resume(uniffiTypeStreamVerifierObjectFactory.clonePointer(this), FfiConverterArrayBuffer.lower(state, getter().rustbuffer_alloc));
|
|
8099
|
+
}, getter().ffi_trylimbo_sdk_verifier_rust_future_poll_u64, getter().ffi_trylimbo_sdk_verifier_rust_future_cancel_u64, getter().ffi_trylimbo_sdk_verifier_rust_future_complete_u64, getter().ffi_trylimbo_sdk_verifier_rust_future_free_u64, FfiConverterTypeStreamSession.lift.bind(FfiConverterTypeStreamSession), FfiConverterString.lift.bind(FfiConverterString), asyncOpts_, FfiConverterTypeSdkError.lift.bind(FfiConverterTypeSdkError));
|
|
8100
|
+
} catch (__error) {
|
|
8101
|
+
if (uniffiIsDebug && __error instanceof Error) __error.stack = __stack;
|
|
8102
|
+
throw __error;
|
|
8103
|
+
}
|
|
8087
8104
|
}
|
|
8088
8105
|
uniffiDestroy() {
|
|
8089
8106
|
const ptr = this[destructorGuardSymbol];
|
|
@@ -8159,7 +8176,6 @@ const FfiConverterOptionalTypeText = new FfiConverterOptional(FfiConverterTypeTe
|
|
|
8159
8176
|
const FfiConverterOptionalTypeEndInclusivity = new FfiConverterOptional(FfiConverterTypeEndInclusivity);
|
|
8160
8177
|
const FfiConverterOptionalTypeTime = new FfiConverterOptional(FfiConverterTypeTime);
|
|
8161
8178
|
const FfiConverterSequenceTypeRange = new FfiConverterArray(FfiConverterTypeRange);
|
|
8162
|
-
const FfiConverterOptionalTypeRole = new FfiConverterOptional(FfiConverterTypeRole);
|
|
8163
8179
|
const FfiConverterOptionalTypeRegionOfInterest = new FfiConverterOptional(FfiConverterTypeRegionOfInterest);
|
|
8164
8180
|
const FfiConverterOptionalSequenceTypeReviewRating = new FfiConverterOptional(new FfiConverterArray(FfiConverterTypeReviewRating));
|
|
8165
8181
|
const FfiConverterSequenceString = new FfiConverterArray(FfiConverterString);
|
|
@@ -8228,7 +8244,7 @@ function uniffiEnsureInitialized() {
|
|
|
8228
8244
|
if (getter().uniffi_trylimbo_sdk_verifier_checksum_func_parse() !== 2838) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_sdk_verifier_checksum_func_parse");
|
|
8229
8245
|
if (getter().uniffi_trylimbo_sdk_verifier_checksum_func_resource() !== 21307) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_sdk_verifier_checksum_func_resource");
|
|
8230
8246
|
if (getter().uniffi_trylimbo_sdk_verifier_checksum_constructor_assetverifier_create() !== 14882) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_sdk_verifier_checksum_constructor_assetverifier_create");
|
|
8231
|
-
if (getter().uniffi_trylimbo_sdk_verifier_checksum_method_assetverifier_verify() !==
|
|
8247
|
+
if (getter().uniffi_trylimbo_sdk_verifier_checksum_method_assetverifier_verify() !== 20785) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_sdk_verifier_checksum_method_assetverifier_verify");
|
|
8232
8248
|
if (getter().uniffi_trylimbo_sdk_verifier_checksum_method_compute_alg() !== 65518) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_sdk_verifier_checksum_method_compute_alg");
|
|
8233
8249
|
if (getter().uniffi_trylimbo_sdk_verifier_checksum_method_compute_compute() !== 17061) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_sdk_verifier_checksum_method_compute_compute");
|
|
8234
8250
|
if (getter().uniffi_trylimbo_sdk_verifier_checksum_method_credential_hard_binding() !== 52977) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_sdk_verifier_checksum_method_credential_hard_binding");
|
|
@@ -8248,7 +8264,7 @@ function uniffiEnsureInitialized() {
|
|
|
8248
8264
|
if (getter().uniffi_trylimbo_sdk_verifier_checksum_method_streamsession_validate() !== 59142) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_sdk_verifier_checksum_method_streamsession_validate");
|
|
8249
8265
|
if (getter().uniffi_trylimbo_sdk_verifier_checksum_constructor_streamverifier_create() !== 14621) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_sdk_verifier_checksum_constructor_streamverifier_create");
|
|
8250
8266
|
if (getter().uniffi_trylimbo_sdk_verifier_checksum_method_streamverifier_open() !== 3844) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_sdk_verifier_checksum_method_streamverifier_open");
|
|
8251
|
-
if (getter().uniffi_trylimbo_sdk_verifier_checksum_method_streamverifier_resume() !==
|
|
8267
|
+
if (getter().uniffi_trylimbo_sdk_verifier_checksum_method_streamverifier_resume() !== 25844) throw new UniffiInternalError.ApiChecksumMismatch("uniffi_trylimbo_sdk_verifier_checksum_method_streamverifier_resume");
|
|
8252
8268
|
uniffiCallbackInterfaceRangeSource.register();
|
|
8253
8269
|
uniffiCallbackInterfaceCompute.register();
|
|
8254
8270
|
uniffiCallbackInterfacePluginReader.register();
|
|
@@ -8311,7 +8327,6 @@ var trylimbo_verifier_default = Object.freeze({
|
|
|
8311
8327
|
FfiConverterTypeRepository,
|
|
8312
8328
|
FfiConverterTypeResourceRef,
|
|
8313
8329
|
FfiConverterTypeReviewRating,
|
|
8314
|
-
FfiConverterTypeRole,
|
|
8315
8330
|
FfiConverterTypeScope,
|
|
8316
8331
|
FfiConverterTypeSdkError,
|
|
8317
8332
|
FfiConverterTypeSegmentTiming,
|
|
@@ -8356,4 +8371,4 @@ if (!initialized) {
|
|
|
8356
8371
|
async function uniffiInitAsync() {}
|
|
8357
8372
|
var ffi_trylimbo_sdk_verifier_default = { trylimbo_verifier: trylimbo_verifier_exports };
|
|
8358
8373
|
//#endregion
|
|
8359
|
-
export { Actor, AssertionMetadata, AssetType, AssetVerification, AssetVerifier, AssetVerifierOptions, Block, ByteRange, ClaimGeneratorInfo, Code, ComputeImpl, ComputeRequest, Content, ContentWhen, Coordinate, Credential, CredentialOrigin, CredentialOrigin_Tags, DataSource, Discovery, DiscoveryVia, DiscoveryVia_Tags, EndInclusivity, FieldViolation, FileSource, FingerprintCheck, FingerprintCheck_Tags, Frame, Golden, Golden_Tags, HardBinding, HashedUri, Hint, Ingredient, IngredientDeltaValidationResult, InitValidation, Item, Lineage, Manifest, ManifestAssertion, ManifestAssertionKind, ManifestStore, MediaValidation, MemorySource, Range, RangeSourceImpl, RangeType, Recovery, RecoveryIssue, RecoveryIssue_Tags, RecoveryStatus, RecoverySummary, RecoveryTrigger, Reference, RegionOfInterest, Relationship, Repository, Repository_Tags, ResourceRef, ReviewRating,
|
|
8374
|
+
export { Actor, AssertionMetadata, AssetType, AssetVerification, AssetVerifier, AssetVerifierOptions, Block, ByteRange, ClaimGeneratorInfo, Code, ComputeImpl, ComputeRequest, Content, ContentWhen, Coordinate, Credential, CredentialOrigin, CredentialOrigin_Tags, DataSource, Discovery, DiscoveryVia, DiscoveryVia_Tags, EndInclusivity, FieldViolation, FileSource, FingerprintCheck, FingerprintCheck_Tags, Frame, Golden, Golden_Tags, HardBinding, HashedUri, Hint, Ingredient, IngredientDeltaValidationResult, InitValidation, Item, Lineage, Manifest, ManifestAssertion, ManifestAssertionKind, ManifestStore, MediaValidation, MemorySource, Range, RangeSourceImpl, RangeType, Recovery, RecoveryIssue, RecoveryIssue_Tags, RecoveryStatus, RecoverySummary, RecoveryTrigger, Reference, RegionOfInterest, Relationship, Repository, Repository_Tags, ResourceRef, ReviewRating, Scope, SdkError, SdkError_Tags, SegmentTiming, SegmentValidation, SegmentValidation_Tags, SessionKey, Shape, ShapeType, SignatureInfo, SigningAlgSchema, SoftBindingSource, SoftBindingSource_Tags, SoftBindingType, StatusCodes, StreamSession, StreamVerifier, StreamVerifierOptions, Text, TextSelector, TextSelectorRange, Time, TimeType, Timespan, Trust, UnitType, UriOrResource, UriOrResource_Tags, ValidationCode, ValidationCodeKind, ValidationResults, ValidationState, ValidationStatus, Verdict, VerdictRule, Verdict_Tags, c2paTrustList, c2paTsaTrustList, computeSoftBinding, ffi_trylimbo_sdk_verifier_default as default, devCa, parse, resource, uniffiInitAsync };
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"optionalDependencies": {
|
|
3
|
-
"@trylimbo/sdk-verifier-linux-arm64-gnu": "0.2.25-canary.
|
|
4
|
-
"@trylimbo/sdk-verifier-linux-x64-gnu": "0.2.25-canary.
|
|
3
|
+
"@trylimbo/sdk-verifier-linux-arm64-gnu": "0.2.25-canary.38",
|
|
4
|
+
"@trylimbo/sdk-verifier-linux-x64-gnu": "0.2.25-canary.38",
|
|
5
5
|
"@ubjs/node-linux-arm64-gnu": "0.31.0-5",
|
|
6
6
|
"@ubjs/node-linux-x64-gnu": "0.31.0-5"
|
|
7
7
|
},
|
|
8
8
|
"name": "@trylimbo/sdk-verifier",
|
|
9
|
-
"version": "0.2.25-canary.
|
|
9
|
+
"version": "0.2.25-canary.38",
|
|
10
10
|
"license": "UNLICENSED",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|