@trylimbo/sdk-verifier 0.2.12-canary.25 → 0.2.12-canary.28
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 +768 -732
- package/gen/ffi/index.js +1194 -1090
- package/package.json +6 -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, Binder,
|
|
184
|
+
export { Actor, AssertionMetadata, AssetFormat, AssetFormat_Tags, AssetType, AssetVerification, AssetVerifier, AssetVerifierInterface, AssetVerifierLike, AssetVerifierOptions, Binder, BinderImpl, ByContent, ByReference, ClaimGeneratorInfo, Code, ContentBindingClass, ContentTrigger, Coordinate, CredentialOrigin, CredentialOrigin_Tags, DataSource, DeriveOptions, EndInclusivity, FieldViolation, FileSource, FileSourceInterface, FileSourceLike, FingerprintCheck, FingerprintCheck_Tags, FoundCredential, Frame, GoldenComparison, GoldenComparison_Tags, HardBinding, HashedUri, HeldBinder, HeldBinderInterface, HeldBinderLike, Ingredient, IngredientDeltaValidationResult, InitValidation, IsccBinder, IsccBinderInterface, IsccBinderLike, Item, Lineage, Manifest, ManifestAssertion, ManifestAssertionKind, ManifestStore, MediaValidation, MemorySource, MemorySourceInterface, MemorySourceLike, PluginRead, Range, RangeSource, RangeSourceImpl, RangeType, Recovery, RecoveryDiscovery, RecoveryDiscovery_Tags, RecoveryIssue, RecoveryIssue_Tags, RecoveryPolicy, RecoveryStatus, RecoverySummary, Region, RegionOfInterest, Relationship, Repository, Repository_Tags, 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, Verdict, VerdictRule, Verdict_Tags, c2paTrustList, c2paTsaTrustList, _default$1 as default, devCa, parse, resource, thumbnails };
|
|
185
185
|
}
|
|
186
186
|
/**
|
|
187
187
|
* Official C2PA Conformance Program signing-CA trust anchors (a compile-time
|
|
@@ -198,7 +198,7 @@ export declare function c2paTsaTrustList(): string;
|
|
|
198
198
|
*/
|
|
199
199
|
export declare function devCa(): string;
|
|
200
200
|
/**
|
|
201
|
-
* Parse a detached C2PA manifest store: a `.c2pa` sidecar, or the bytes a
|
|
201
|
+
* Parse a detached C2PA manifest store: a `.c2pa` sidecar, or the bytes a repository serves for a
|
|
202
202
|
* manifest id.
|
|
203
203
|
*
|
|
204
204
|
* Contents, not a verdict. A hard binding is a hash of the asset, so a store read without one
|
|
@@ -806,7 +806,7 @@ export declare const SoftBinding: Readonly<{
|
|
|
806
806
|
defaults: () => Partial<SoftBinding>;
|
|
807
807
|
}>;
|
|
808
808
|
/**
|
|
809
|
-
* The class of binding a
|
|
809
|
+
* The class of binding a repository derived from an uploaded asset.
|
|
810
810
|
*
|
|
811
811
|
* Unlike [`SoftBinding`], this carries no value: the C2PA `byContent` response does not return
|
|
812
812
|
* one. The algorithm and class are still evidence because every request selects exactly one
|
|
@@ -833,8 +833,9 @@ export declare const RecoveryDiscovery: Readonly<{
|
|
|
833
833
|
binderIndex: number;
|
|
834
834
|
binding: SoftBinding;
|
|
835
835
|
class: ContentBindingClass;
|
|
836
|
-
|
|
837
|
-
|
|
836
|
+
repositoryScore?: SimilarityScore;
|
|
837
|
+
repository: string;
|
|
838
|
+
fetchedFrom: string;
|
|
838
839
|
}): {
|
|
839
840
|
/**
|
|
840
841
|
* @private
|
|
@@ -846,16 +847,18 @@ export declare const RecoveryDiscovery: Readonly<{
|
|
|
846
847
|
binderIndex: number;
|
|
847
848
|
binding: SoftBinding;
|
|
848
849
|
class: ContentBindingClass;
|
|
849
|
-
|
|
850
|
-
|
|
850
|
+
repositoryScore?: SimilarityScore;
|
|
851
|
+
repository: string;
|
|
852
|
+
fetchedFrom: string;
|
|
851
853
|
}>;
|
|
852
854
|
};
|
|
853
855
|
"new"(inner: {
|
|
854
856
|
binderIndex: number;
|
|
855
857
|
binding: SoftBinding;
|
|
856
858
|
class: ContentBindingClass;
|
|
857
|
-
|
|
858
|
-
|
|
859
|
+
repositoryScore?: SimilarityScore;
|
|
860
|
+
repository: string;
|
|
861
|
+
fetchedFrom: string;
|
|
859
862
|
}): {
|
|
860
863
|
/**
|
|
861
864
|
* @private
|
|
@@ -867,8 +870,9 @@ export declare const RecoveryDiscovery: Readonly<{
|
|
|
867
870
|
binderIndex: number;
|
|
868
871
|
binding: SoftBinding;
|
|
869
872
|
class: ContentBindingClass;
|
|
870
|
-
|
|
871
|
-
|
|
873
|
+
repositoryScore?: SimilarityScore;
|
|
874
|
+
repository: string;
|
|
875
|
+
fetchedFrom: string;
|
|
872
876
|
}>;
|
|
873
877
|
};
|
|
874
878
|
instanceOf(obj: any): obj is {
|
|
@@ -882,8 +886,9 @@ export declare const RecoveryDiscovery: Readonly<{
|
|
|
882
886
|
binderIndex: number;
|
|
883
887
|
binding: SoftBinding;
|
|
884
888
|
class: ContentBindingClass;
|
|
885
|
-
|
|
886
|
-
|
|
889
|
+
repositoryScore?: SimilarityScore;
|
|
890
|
+
repository: string;
|
|
891
|
+
fetchedFrom: string;
|
|
887
892
|
}>;
|
|
888
893
|
};
|
|
889
894
|
};
|
|
@@ -892,8 +897,9 @@ export declare const RecoveryDiscovery: Readonly<{
|
|
|
892
897
|
algorithm: string;
|
|
893
898
|
class: ContentBindingClass;
|
|
894
899
|
hint?: SoftBinding;
|
|
895
|
-
|
|
896
|
-
|
|
900
|
+
repositoryScore?: SimilarityScore;
|
|
901
|
+
repository: string;
|
|
902
|
+
fetchedFrom: string;
|
|
897
903
|
}): {
|
|
898
904
|
/**
|
|
899
905
|
* @private
|
|
@@ -905,16 +911,18 @@ export declare const RecoveryDiscovery: Readonly<{
|
|
|
905
911
|
algorithm: string;
|
|
906
912
|
class: ContentBindingClass;
|
|
907
913
|
hint?: SoftBinding;
|
|
908
|
-
|
|
909
|
-
|
|
914
|
+
repositoryScore?: SimilarityScore;
|
|
915
|
+
repository: string;
|
|
916
|
+
fetchedFrom: string;
|
|
910
917
|
}>;
|
|
911
918
|
};
|
|
912
919
|
"new"(inner: {
|
|
913
920
|
algorithm: string;
|
|
914
921
|
class: ContentBindingClass;
|
|
915
922
|
hint?: SoftBinding;
|
|
916
|
-
|
|
917
|
-
|
|
923
|
+
repositoryScore?: SimilarityScore;
|
|
924
|
+
repository: string;
|
|
925
|
+
fetchedFrom: string;
|
|
918
926
|
}): {
|
|
919
927
|
/**
|
|
920
928
|
* @private
|
|
@@ -926,8 +934,9 @@ export declare const RecoveryDiscovery: Readonly<{
|
|
|
926
934
|
algorithm: string;
|
|
927
935
|
class: ContentBindingClass;
|
|
928
936
|
hint?: SoftBinding;
|
|
929
|
-
|
|
930
|
-
|
|
937
|
+
repositoryScore?: SimilarityScore;
|
|
938
|
+
repository: string;
|
|
939
|
+
fetchedFrom: string;
|
|
931
940
|
}>;
|
|
932
941
|
};
|
|
933
942
|
instanceOf(obj: any): obj is {
|
|
@@ -941,8 +950,9 @@ export declare const RecoveryDiscovery: Readonly<{
|
|
|
941
950
|
algorithm: string;
|
|
942
951
|
class: ContentBindingClass;
|
|
943
952
|
hint?: SoftBinding;
|
|
944
|
-
|
|
945
|
-
|
|
953
|
+
repositoryScore?: SimilarityScore;
|
|
954
|
+
repository: string;
|
|
955
|
+
fetchedFrom: string;
|
|
946
956
|
}>;
|
|
947
957
|
};
|
|
948
958
|
};
|
|
@@ -951,8 +961,9 @@ export declare const RecoveryDiscovery: Readonly<{
|
|
|
951
961
|
algorithm: string;
|
|
952
962
|
class: ContentBindingClass;
|
|
953
963
|
hint?: SoftBinding;
|
|
954
|
-
|
|
955
|
-
|
|
964
|
+
repositoryScore?: SimilarityScore;
|
|
965
|
+
repository: string;
|
|
966
|
+
fetchedFrom: string;
|
|
956
967
|
}): {
|
|
957
968
|
/**
|
|
958
969
|
* @private
|
|
@@ -964,16 +975,18 @@ export declare const RecoveryDiscovery: Readonly<{
|
|
|
964
975
|
algorithm: string;
|
|
965
976
|
class: ContentBindingClass;
|
|
966
977
|
hint?: SoftBinding;
|
|
967
|
-
|
|
968
|
-
|
|
978
|
+
repositoryScore?: SimilarityScore;
|
|
979
|
+
repository: string;
|
|
980
|
+
fetchedFrom: string;
|
|
969
981
|
}>;
|
|
970
982
|
};
|
|
971
983
|
"new"(inner: {
|
|
972
984
|
algorithm: string;
|
|
973
985
|
class: ContentBindingClass;
|
|
974
986
|
hint?: SoftBinding;
|
|
975
|
-
|
|
976
|
-
|
|
987
|
+
repositoryScore?: SimilarityScore;
|
|
988
|
+
repository: string;
|
|
989
|
+
fetchedFrom: string;
|
|
977
990
|
}): {
|
|
978
991
|
/**
|
|
979
992
|
* @private
|
|
@@ -985,8 +998,9 @@ export declare const RecoveryDiscovery: Readonly<{
|
|
|
985
998
|
algorithm: string;
|
|
986
999
|
class: ContentBindingClass;
|
|
987
1000
|
hint?: SoftBinding;
|
|
988
|
-
|
|
989
|
-
|
|
1001
|
+
repositoryScore?: SimilarityScore;
|
|
1002
|
+
repository: string;
|
|
1003
|
+
fetchedFrom: string;
|
|
990
1004
|
}>;
|
|
991
1005
|
};
|
|
992
1006
|
instanceOf(obj: any): obj is {
|
|
@@ -1000,13 +1014,203 @@ export declare const RecoveryDiscovery: Readonly<{
|
|
|
1000
1014
|
algorithm: string;
|
|
1001
1015
|
class: ContentBindingClass;
|
|
1002
1016
|
hint?: SoftBinding;
|
|
1003
|
-
|
|
1004
|
-
|
|
1017
|
+
repositoryScore?: SimilarityScore;
|
|
1018
|
+
repository: string;
|
|
1019
|
+
fetchedFrom: string;
|
|
1005
1020
|
}>;
|
|
1006
1021
|
};
|
|
1007
1022
|
};
|
|
1008
1023
|
}>;
|
|
1009
1024
|
export type RecoveryDiscovery = InstanceType<typeof RecoveryDiscovery['ByBinding' | 'ByContent' | 'ByReference']>;
|
|
1025
|
+
export declare enum FingerprintCheck_Tags {
|
|
1026
|
+
NotNeeded = "NotNeeded",
|
|
1027
|
+
NothingToCompare = "NothingToCompare",
|
|
1028
|
+
Unsupported = "Unsupported",
|
|
1029
|
+
Indeterminate = "Indeterminate",
|
|
1030
|
+
Compared = "Compared"
|
|
1031
|
+
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Whether the asset's own fingerprint backs up a manifest that a watermark led to.
|
|
1034
|
+
*
|
|
1035
|
+
* C2PA 2.4 1.2.2.3: a watermark can be lifted from one asset onto another, so a mark alone does
|
|
1036
|
+
* not establish that the manifest it resolves to describes THIS asset. The mitigation the spec
|
|
1037
|
+
* gives is to compare a fingerprint computed from the asset against the one the recovered
|
|
1038
|
+
* manifest records, and `watermark-and-fingerprint` ends on exactly that comparison.
|
|
1039
|
+
*
|
|
1040
|
+
* Reported rather than enforced: a transcode legitimately shifts a fingerprint, so where the line
|
|
1041
|
+
* falls is the relying party's policy, not this SDK's. What the SDK owes them is the measurement.
|
|
1042
|
+
*/
|
|
1043
|
+
export declare const FingerprintCheck: Readonly<{
|
|
1044
|
+
instanceOf: (obj: any) => obj is FingerprintCheck;
|
|
1045
|
+
NotNeeded: {
|
|
1046
|
+
new (): {
|
|
1047
|
+
/**
|
|
1048
|
+
* @private
|
|
1049
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1050
|
+
*/
|
|
1051
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1052
|
+
readonly tag: FingerprintCheck_Tags.NotNeeded;
|
|
1053
|
+
};
|
|
1054
|
+
"new"(): {
|
|
1055
|
+
/**
|
|
1056
|
+
* @private
|
|
1057
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1058
|
+
*/
|
|
1059
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1060
|
+
readonly tag: FingerprintCheck_Tags.NotNeeded;
|
|
1061
|
+
};
|
|
1062
|
+
instanceOf(obj: any): obj is {
|
|
1063
|
+
/**
|
|
1064
|
+
* @private
|
|
1065
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1066
|
+
*/
|
|
1067
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1068
|
+
readonly tag: FingerprintCheck_Tags.NotNeeded;
|
|
1069
|
+
};
|
|
1070
|
+
};
|
|
1071
|
+
NothingToCompare: {
|
|
1072
|
+
new (): {
|
|
1073
|
+
/**
|
|
1074
|
+
* @private
|
|
1075
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1076
|
+
*/
|
|
1077
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1078
|
+
readonly tag: FingerprintCheck_Tags.NothingToCompare;
|
|
1079
|
+
};
|
|
1080
|
+
"new"(): {
|
|
1081
|
+
/**
|
|
1082
|
+
* @private
|
|
1083
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1084
|
+
*/
|
|
1085
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1086
|
+
readonly tag: FingerprintCheck_Tags.NothingToCompare;
|
|
1087
|
+
};
|
|
1088
|
+
instanceOf(obj: any): obj is {
|
|
1089
|
+
/**
|
|
1090
|
+
* @private
|
|
1091
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1092
|
+
*/
|
|
1093
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1094
|
+
readonly tag: FingerprintCheck_Tags.NothingToCompare;
|
|
1095
|
+
};
|
|
1096
|
+
};
|
|
1097
|
+
Unsupported: {
|
|
1098
|
+
new (inner: {
|
|
1099
|
+
algorithm: string;
|
|
1100
|
+
}): {
|
|
1101
|
+
/**
|
|
1102
|
+
* @private
|
|
1103
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1104
|
+
*/
|
|
1105
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1106
|
+
readonly tag: FingerprintCheck_Tags.Unsupported;
|
|
1107
|
+
readonly inner: Readonly<{
|
|
1108
|
+
algorithm: string;
|
|
1109
|
+
}>;
|
|
1110
|
+
};
|
|
1111
|
+
"new"(inner: {
|
|
1112
|
+
algorithm: string;
|
|
1113
|
+
}): {
|
|
1114
|
+
/**
|
|
1115
|
+
* @private
|
|
1116
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1117
|
+
*/
|
|
1118
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1119
|
+
readonly tag: FingerprintCheck_Tags.Unsupported;
|
|
1120
|
+
readonly inner: Readonly<{
|
|
1121
|
+
algorithm: string;
|
|
1122
|
+
}>;
|
|
1123
|
+
};
|
|
1124
|
+
instanceOf(obj: any): obj is {
|
|
1125
|
+
/**
|
|
1126
|
+
* @private
|
|
1127
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1128
|
+
*/
|
|
1129
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1130
|
+
readonly tag: FingerprintCheck_Tags.Unsupported;
|
|
1131
|
+
readonly inner: Readonly<{
|
|
1132
|
+
algorithm: string;
|
|
1133
|
+
}>;
|
|
1134
|
+
};
|
|
1135
|
+
};
|
|
1136
|
+
Indeterminate: {
|
|
1137
|
+
new (): {
|
|
1138
|
+
/**
|
|
1139
|
+
* @private
|
|
1140
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1141
|
+
*/
|
|
1142
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1143
|
+
readonly tag: FingerprintCheck_Tags.Indeterminate;
|
|
1144
|
+
};
|
|
1145
|
+
"new"(): {
|
|
1146
|
+
/**
|
|
1147
|
+
* @private
|
|
1148
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1149
|
+
*/
|
|
1150
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1151
|
+
readonly tag: FingerprintCheck_Tags.Indeterminate;
|
|
1152
|
+
};
|
|
1153
|
+
instanceOf(obj: any): obj is {
|
|
1154
|
+
/**
|
|
1155
|
+
* @private
|
|
1156
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1157
|
+
*/
|
|
1158
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1159
|
+
readonly tag: FingerprintCheck_Tags.Indeterminate;
|
|
1160
|
+
};
|
|
1161
|
+
};
|
|
1162
|
+
Compared: {
|
|
1163
|
+
new (inner: {
|
|
1164
|
+
score: SimilarityScore;
|
|
1165
|
+
}): {
|
|
1166
|
+
/**
|
|
1167
|
+
* @private
|
|
1168
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1169
|
+
*/
|
|
1170
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1171
|
+
readonly tag: FingerprintCheck_Tags.Compared;
|
|
1172
|
+
readonly inner: Readonly<{
|
|
1173
|
+
score: SimilarityScore;
|
|
1174
|
+
}>;
|
|
1175
|
+
};
|
|
1176
|
+
"new"(inner: {
|
|
1177
|
+
score: SimilarityScore;
|
|
1178
|
+
}): {
|
|
1179
|
+
/**
|
|
1180
|
+
* @private
|
|
1181
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1182
|
+
*/
|
|
1183
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1184
|
+
readonly tag: FingerprintCheck_Tags.Compared;
|
|
1185
|
+
readonly inner: Readonly<{
|
|
1186
|
+
score: SimilarityScore;
|
|
1187
|
+
}>;
|
|
1188
|
+
};
|
|
1189
|
+
instanceOf(obj: any): obj is {
|
|
1190
|
+
/**
|
|
1191
|
+
* @private
|
|
1192
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1193
|
+
*/
|
|
1194
|
+
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1195
|
+
readonly tag: FingerprintCheck_Tags.Compared;
|
|
1196
|
+
readonly inner: Readonly<{
|
|
1197
|
+
score: SimilarityScore;
|
|
1198
|
+
}>;
|
|
1199
|
+
};
|
|
1200
|
+
};
|
|
1201
|
+
}>;
|
|
1202
|
+
/**
|
|
1203
|
+
* Whether the asset's own fingerprint backs up a manifest that a watermark led to.
|
|
1204
|
+
*
|
|
1205
|
+
* C2PA 2.4 1.2.2.3: a watermark can be lifted from one asset onto another, so a mark alone does
|
|
1206
|
+
* not establish that the manifest it resolves to describes THIS asset. The mitigation the spec
|
|
1207
|
+
* gives is to compare a fingerprint computed from the asset against the one the recovered
|
|
1208
|
+
* manifest records, and `watermark-and-fingerprint` ends on exactly that comparison.
|
|
1209
|
+
*
|
|
1210
|
+
* Reported rather than enforced: a transcode legitimately shifts a fingerprint, so where the line
|
|
1211
|
+
* falls is the relying party's policy, not this SDK's. What the SDK owes them is the measurement.
|
|
1212
|
+
*/
|
|
1213
|
+
export type FingerprintCheck = InstanceType<typeof FingerprintCheck['NotNeeded' | 'NothingToCompare' | 'Unsupported' | 'Indeterminate' | 'Compared']>;
|
|
1010
1214
|
export declare enum CredentialOrigin_Tags {
|
|
1011
1215
|
Embedded = "Embedded",
|
|
1012
1216
|
Recovered = "Recovered"
|
|
@@ -1046,6 +1250,7 @@ export declare const CredentialOrigin: Readonly<{
|
|
|
1046
1250
|
Recovered: {
|
|
1047
1251
|
new (inner: {
|
|
1048
1252
|
discoveries: Array<RecoveryDiscovery>;
|
|
1253
|
+
fingerprintCheck: FingerprintCheck;
|
|
1049
1254
|
}): {
|
|
1050
1255
|
/**
|
|
1051
1256
|
* @private
|
|
@@ -1055,10 +1260,12 @@ export declare const CredentialOrigin: Readonly<{
|
|
|
1055
1260
|
readonly tag: CredentialOrigin_Tags.Recovered;
|
|
1056
1261
|
readonly inner: Readonly<{
|
|
1057
1262
|
discoveries: Array<RecoveryDiscovery>;
|
|
1263
|
+
fingerprintCheck: FingerprintCheck;
|
|
1058
1264
|
}>;
|
|
1059
1265
|
};
|
|
1060
1266
|
"new"(inner: {
|
|
1061
1267
|
discoveries: Array<RecoveryDiscovery>;
|
|
1268
|
+
fingerprintCheck: FingerprintCheck;
|
|
1062
1269
|
}): {
|
|
1063
1270
|
/**
|
|
1064
1271
|
* @private
|
|
@@ -1068,6 +1275,7 @@ export declare const CredentialOrigin: Readonly<{
|
|
|
1068
1275
|
readonly tag: CredentialOrigin_Tags.Recovered;
|
|
1069
1276
|
readonly inner: Readonly<{
|
|
1070
1277
|
discoveries: Array<RecoveryDiscovery>;
|
|
1278
|
+
fingerprintCheck: FingerprintCheck;
|
|
1071
1279
|
}>;
|
|
1072
1280
|
};
|
|
1073
1281
|
instanceOf(obj: any): obj is {
|
|
@@ -1079,6 +1287,7 @@ export declare const CredentialOrigin: Readonly<{
|
|
|
1079
1287
|
readonly tag: CredentialOrigin_Tags.Recovered;
|
|
1080
1288
|
readonly inner: Readonly<{
|
|
1081
1289
|
discoveries: Array<RecoveryDiscovery>;
|
|
1290
|
+
fingerprintCheck: FingerprintCheck;
|
|
1082
1291
|
}>;
|
|
1083
1292
|
};
|
|
1084
1293
|
};
|
|
@@ -1701,195 +1910,6 @@ export declare const ManifestStore: Readonly<{
|
|
|
1701
1910
|
new: (partial: Partial<ManifestStore> & Required<Omit<ManifestStore, "activeManifest" | "validationResults" | "validationState" | "validationStatus">>) => ManifestStore;
|
|
1702
1911
|
defaults: () => Partial<ManifestStore>;
|
|
1703
1912
|
}>;
|
|
1704
|
-
export declare enum FingerprintCheck_Tags {
|
|
1705
|
-
NotNeeded = "NotNeeded",
|
|
1706
|
-
NothingToCompare = "NothingToCompare",
|
|
1707
|
-
Unsupported = "Unsupported",
|
|
1708
|
-
Indeterminate = "Indeterminate",
|
|
1709
|
-
Compared = "Compared"
|
|
1710
|
-
}
|
|
1711
|
-
/**
|
|
1712
|
-
* Whether the asset's own fingerprint backs up a manifest that a watermark led to.
|
|
1713
|
-
*
|
|
1714
|
-
* C2PA 2.4 1.2.2.3: a watermark can be lifted from one asset onto another, so a mark alone does
|
|
1715
|
-
* not establish that the manifest it resolves to describes THIS asset. The mitigation the spec
|
|
1716
|
-
* gives is to compare a fingerprint computed from the asset against the one the recovered
|
|
1717
|
-
* manifest records, and `watermark-and-fingerprint` ends on exactly that comparison.
|
|
1718
|
-
*
|
|
1719
|
-
* Reported rather than enforced: a transcode legitimately shifts a fingerprint, so where the line
|
|
1720
|
-
* falls is the relying party's policy, not this SDK's. What the SDK owes them is the measurement.
|
|
1721
|
-
*/
|
|
1722
|
-
export declare const FingerprintCheck: Readonly<{
|
|
1723
|
-
instanceOf: (obj: any) => obj is FingerprintCheck;
|
|
1724
|
-
NotNeeded: {
|
|
1725
|
-
new (): {
|
|
1726
|
-
/**
|
|
1727
|
-
* @private
|
|
1728
|
-
* This field is private and should not be used, use `tag` instead.
|
|
1729
|
-
*/
|
|
1730
|
-
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1731
|
-
readonly tag: FingerprintCheck_Tags.NotNeeded;
|
|
1732
|
-
};
|
|
1733
|
-
"new"(): {
|
|
1734
|
-
/**
|
|
1735
|
-
* @private
|
|
1736
|
-
* This field is private and should not be used, use `tag` instead.
|
|
1737
|
-
*/
|
|
1738
|
-
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1739
|
-
readonly tag: FingerprintCheck_Tags.NotNeeded;
|
|
1740
|
-
};
|
|
1741
|
-
instanceOf(obj: any): obj is {
|
|
1742
|
-
/**
|
|
1743
|
-
* @private
|
|
1744
|
-
* This field is private and should not be used, use `tag` instead.
|
|
1745
|
-
*/
|
|
1746
|
-
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1747
|
-
readonly tag: FingerprintCheck_Tags.NotNeeded;
|
|
1748
|
-
};
|
|
1749
|
-
};
|
|
1750
|
-
NothingToCompare: {
|
|
1751
|
-
new (): {
|
|
1752
|
-
/**
|
|
1753
|
-
* @private
|
|
1754
|
-
* This field is private and should not be used, use `tag` instead.
|
|
1755
|
-
*/
|
|
1756
|
-
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1757
|
-
readonly tag: FingerprintCheck_Tags.NothingToCompare;
|
|
1758
|
-
};
|
|
1759
|
-
"new"(): {
|
|
1760
|
-
/**
|
|
1761
|
-
* @private
|
|
1762
|
-
* This field is private and should not be used, use `tag` instead.
|
|
1763
|
-
*/
|
|
1764
|
-
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1765
|
-
readonly tag: FingerprintCheck_Tags.NothingToCompare;
|
|
1766
|
-
};
|
|
1767
|
-
instanceOf(obj: any): obj is {
|
|
1768
|
-
/**
|
|
1769
|
-
* @private
|
|
1770
|
-
* This field is private and should not be used, use `tag` instead.
|
|
1771
|
-
*/
|
|
1772
|
-
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1773
|
-
readonly tag: FingerprintCheck_Tags.NothingToCompare;
|
|
1774
|
-
};
|
|
1775
|
-
};
|
|
1776
|
-
Unsupported: {
|
|
1777
|
-
new (inner: {
|
|
1778
|
-
algorithm: string;
|
|
1779
|
-
}): {
|
|
1780
|
-
/**
|
|
1781
|
-
* @private
|
|
1782
|
-
* This field is private and should not be used, use `tag` instead.
|
|
1783
|
-
*/
|
|
1784
|
-
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1785
|
-
readonly tag: FingerprintCheck_Tags.Unsupported;
|
|
1786
|
-
readonly inner: Readonly<{
|
|
1787
|
-
algorithm: string;
|
|
1788
|
-
}>;
|
|
1789
|
-
};
|
|
1790
|
-
"new"(inner: {
|
|
1791
|
-
algorithm: string;
|
|
1792
|
-
}): {
|
|
1793
|
-
/**
|
|
1794
|
-
* @private
|
|
1795
|
-
* This field is private and should not be used, use `tag` instead.
|
|
1796
|
-
*/
|
|
1797
|
-
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1798
|
-
readonly tag: FingerprintCheck_Tags.Unsupported;
|
|
1799
|
-
readonly inner: Readonly<{
|
|
1800
|
-
algorithm: string;
|
|
1801
|
-
}>;
|
|
1802
|
-
};
|
|
1803
|
-
instanceOf(obj: any): obj is {
|
|
1804
|
-
/**
|
|
1805
|
-
* @private
|
|
1806
|
-
* This field is private and should not be used, use `tag` instead.
|
|
1807
|
-
*/
|
|
1808
|
-
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1809
|
-
readonly tag: FingerprintCheck_Tags.Unsupported;
|
|
1810
|
-
readonly inner: Readonly<{
|
|
1811
|
-
algorithm: string;
|
|
1812
|
-
}>;
|
|
1813
|
-
};
|
|
1814
|
-
};
|
|
1815
|
-
Indeterminate: {
|
|
1816
|
-
new (): {
|
|
1817
|
-
/**
|
|
1818
|
-
* @private
|
|
1819
|
-
* This field is private and should not be used, use `tag` instead.
|
|
1820
|
-
*/
|
|
1821
|
-
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1822
|
-
readonly tag: FingerprintCheck_Tags.Indeterminate;
|
|
1823
|
-
};
|
|
1824
|
-
"new"(): {
|
|
1825
|
-
/**
|
|
1826
|
-
* @private
|
|
1827
|
-
* This field is private and should not be used, use `tag` instead.
|
|
1828
|
-
*/
|
|
1829
|
-
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1830
|
-
readonly tag: FingerprintCheck_Tags.Indeterminate;
|
|
1831
|
-
};
|
|
1832
|
-
instanceOf(obj: any): obj is {
|
|
1833
|
-
/**
|
|
1834
|
-
* @private
|
|
1835
|
-
* This field is private and should not be used, use `tag` instead.
|
|
1836
|
-
*/
|
|
1837
|
-
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1838
|
-
readonly tag: FingerprintCheck_Tags.Indeterminate;
|
|
1839
|
-
};
|
|
1840
|
-
};
|
|
1841
|
-
Compared: {
|
|
1842
|
-
new (inner: {
|
|
1843
|
-
score: SimilarityScore;
|
|
1844
|
-
}): {
|
|
1845
|
-
/**
|
|
1846
|
-
* @private
|
|
1847
|
-
* This field is private and should not be used, use `tag` instead.
|
|
1848
|
-
*/
|
|
1849
|
-
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1850
|
-
readonly tag: FingerprintCheck_Tags.Compared;
|
|
1851
|
-
readonly inner: Readonly<{
|
|
1852
|
-
score: SimilarityScore;
|
|
1853
|
-
}>;
|
|
1854
|
-
};
|
|
1855
|
-
"new"(inner: {
|
|
1856
|
-
score: SimilarityScore;
|
|
1857
|
-
}): {
|
|
1858
|
-
/**
|
|
1859
|
-
* @private
|
|
1860
|
-
* This field is private and should not be used, use `tag` instead.
|
|
1861
|
-
*/
|
|
1862
|
-
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1863
|
-
readonly tag: FingerprintCheck_Tags.Compared;
|
|
1864
|
-
readonly inner: Readonly<{
|
|
1865
|
-
score: SimilarityScore;
|
|
1866
|
-
}>;
|
|
1867
|
-
};
|
|
1868
|
-
instanceOf(obj: any): obj is {
|
|
1869
|
-
/**
|
|
1870
|
-
* @private
|
|
1871
|
-
* This field is private and should not be used, use `tag` instead.
|
|
1872
|
-
*/
|
|
1873
|
-
readonly [uniffiTypeNameSymbol]: "FingerprintCheck";
|
|
1874
|
-
readonly tag: FingerprintCheck_Tags.Compared;
|
|
1875
|
-
readonly inner: Readonly<{
|
|
1876
|
-
score: SimilarityScore;
|
|
1877
|
-
}>;
|
|
1878
|
-
};
|
|
1879
|
-
};
|
|
1880
|
-
}>;
|
|
1881
|
-
/**
|
|
1882
|
-
* Whether the asset's own fingerprint backs up a manifest that a watermark led to.
|
|
1883
|
-
*
|
|
1884
|
-
* C2PA 2.4 1.2.2.3: a watermark can be lifted from one asset onto another, so a mark alone does
|
|
1885
|
-
* not establish that the manifest it resolves to describes THIS asset. The mitigation the spec
|
|
1886
|
-
* gives is to compare a fingerprint computed from the asset against the one the recovered
|
|
1887
|
-
* manifest records, and `watermark-and-fingerprint` ends on exactly that comparison.
|
|
1888
|
-
*
|
|
1889
|
-
* Reported rather than enforced: a transcode legitimately shifts a fingerprint, so where the line
|
|
1890
|
-
* falls is the relying party's policy, not this SDK's. What the SDK owes them is the measurement.
|
|
1891
|
-
*/
|
|
1892
|
-
export type FingerprintCheck = InstanceType<typeof FingerprintCheck['NotNeeded' | 'NothingToCompare' | 'Unsupported' | 'Indeterminate' | 'Compared']>;
|
|
1893
1913
|
/**
|
|
1894
1914
|
* Whether the manifest's hard binding holds over the bytes this verify read.
|
|
1895
1915
|
*
|
|
@@ -1912,7 +1932,7 @@ export declare enum HardBinding {
|
|
|
1912
1932
|
/**
|
|
1913
1933
|
* The re-sign chain, read from the validated stores themselves: C2PA 2.4 18.16.11 copies a
|
|
1914
1934
|
* `parentOf` ingredient's manifest into its successor's store, so a link here was signed by the
|
|
1915
|
-
* successor. A
|
|
1935
|
+
* successor. A repository's ordering is a hint; this is the evidence.
|
|
1916
1936
|
*/
|
|
1917
1937
|
export type Lineage = {
|
|
1918
1938
|
/**
|
|
@@ -1935,10 +1955,9 @@ export declare const Lineage: Readonly<{
|
|
|
1935
1955
|
defaults: () => Partial<Lineage>;
|
|
1936
1956
|
}>;
|
|
1937
1957
|
/**
|
|
1938
|
-
* One `verify` result: the c2pa manifest store, where it came from, whether
|
|
1939
|
-
*
|
|
1940
|
-
*
|
|
1941
|
-
* a recovering one are one type.
|
|
1958
|
+
* One `verify` result: the c2pa manifest store, where it came from, and whether its hard
|
|
1959
|
+
* binding holds over the bytes read. The recovered origin carries the same `SoftBinding` record
|
|
1960
|
+
* `Binder.derive` returns, so a derived binding and a recovering one are one type.
|
|
1942
1961
|
*/
|
|
1943
1962
|
export type FoundCredential = {
|
|
1944
1963
|
/**
|
|
@@ -1956,10 +1975,6 @@ export type FoundCredential = {
|
|
|
1956
1975
|
* validation state and results.
|
|
1957
1976
|
*/
|
|
1958
1977
|
manifest: ManifestStore;
|
|
1959
|
-
/**
|
|
1960
|
-
* Whether the asset's own fingerprint backs up a mark that led here (C2PA 2.4 1.2.2.3).
|
|
1961
|
-
*/
|
|
1962
|
-
fingerprintCheck: FingerprintCheck;
|
|
1963
1978
|
/**
|
|
1964
1979
|
* Whether the manifest's hard binding holds over the bytes this verify read.
|
|
1965
1980
|
*/
|
|
@@ -1992,6 +2007,7 @@ export declare enum RecoveryStatus {
|
|
|
1992
2007
|
export declare enum RecoveryIssue_Tags {
|
|
1993
2008
|
Binder = "Binder",
|
|
1994
2009
|
DeprecatedAlgorithm = "DeprecatedAlgorithm",
|
|
2010
|
+
BindingUndeclared = "BindingUndeclared",
|
|
1995
2011
|
BindingQuery = "BindingQuery",
|
|
1996
2012
|
QueryRefused = "QueryRefused",
|
|
1997
2013
|
ContentForm = "ContentForm",
|
|
@@ -2004,7 +2020,7 @@ export declare enum RecoveryIssue_Tags {
|
|
|
2004
2020
|
ResourceLimit = "ResourceLimit"
|
|
2005
2021
|
}
|
|
2006
2022
|
/**
|
|
2007
|
-
* Why
|
|
2023
|
+
* Why repository recovery did not complete cleanly, or why one candidate was omitted while another
|
|
2008
2024
|
* succeeded. Kept as data so a partial recovery never loses the rest of the lookup outcome, and
|
|
2009
2025
|
* each kind carries exactly what it is about.
|
|
2010
2026
|
*/
|
|
@@ -2093,8 +2109,53 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2093
2109
|
}>;
|
|
2094
2110
|
};
|
|
2095
2111
|
};
|
|
2112
|
+
BindingUndeclared: {
|
|
2113
|
+
new (inner: {
|
|
2114
|
+
binderIndex: number;
|
|
2115
|
+
algorithm: string;
|
|
2116
|
+
}): {
|
|
2117
|
+
/**
|
|
2118
|
+
* @private
|
|
2119
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2120
|
+
*/
|
|
2121
|
+
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2122
|
+
readonly tag: RecoveryIssue_Tags.BindingUndeclared;
|
|
2123
|
+
readonly inner: Readonly<{
|
|
2124
|
+
binderIndex: number;
|
|
2125
|
+
algorithm: string;
|
|
2126
|
+
}>;
|
|
2127
|
+
};
|
|
2128
|
+
"new"(inner: {
|
|
2129
|
+
binderIndex: number;
|
|
2130
|
+
algorithm: string;
|
|
2131
|
+
}): {
|
|
2132
|
+
/**
|
|
2133
|
+
* @private
|
|
2134
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2135
|
+
*/
|
|
2136
|
+
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2137
|
+
readonly tag: RecoveryIssue_Tags.BindingUndeclared;
|
|
2138
|
+
readonly inner: Readonly<{
|
|
2139
|
+
binderIndex: number;
|
|
2140
|
+
algorithm: string;
|
|
2141
|
+
}>;
|
|
2142
|
+
};
|
|
2143
|
+
instanceOf(obj: any): obj is {
|
|
2144
|
+
/**
|
|
2145
|
+
* @private
|
|
2146
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2147
|
+
*/
|
|
2148
|
+
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2149
|
+
readonly tag: RecoveryIssue_Tags.BindingUndeclared;
|
|
2150
|
+
readonly inner: Readonly<{
|
|
2151
|
+
binderIndex: number;
|
|
2152
|
+
algorithm: string;
|
|
2153
|
+
}>;
|
|
2154
|
+
};
|
|
2155
|
+
};
|
|
2096
2156
|
BindingQuery: {
|
|
2097
2157
|
new (inner: {
|
|
2158
|
+
repository: string;
|
|
2098
2159
|
binderIndex: number;
|
|
2099
2160
|
algorithm: string;
|
|
2100
2161
|
message: string;
|
|
@@ -2106,12 +2167,14 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2106
2167
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2107
2168
|
readonly tag: RecoveryIssue_Tags.BindingQuery;
|
|
2108
2169
|
readonly inner: Readonly<{
|
|
2170
|
+
repository: string;
|
|
2109
2171
|
binderIndex: number;
|
|
2110
2172
|
algorithm: string;
|
|
2111
2173
|
message: string;
|
|
2112
2174
|
}>;
|
|
2113
2175
|
};
|
|
2114
2176
|
"new"(inner: {
|
|
2177
|
+
repository: string;
|
|
2115
2178
|
binderIndex: number;
|
|
2116
2179
|
algorithm: string;
|
|
2117
2180
|
message: string;
|
|
@@ -2123,6 +2186,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2123
2186
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2124
2187
|
readonly tag: RecoveryIssue_Tags.BindingQuery;
|
|
2125
2188
|
readonly inner: Readonly<{
|
|
2189
|
+
repository: string;
|
|
2126
2190
|
binderIndex: number;
|
|
2127
2191
|
algorithm: string;
|
|
2128
2192
|
message: string;
|
|
@@ -2136,6 +2200,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2136
2200
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2137
2201
|
readonly tag: RecoveryIssue_Tags.BindingQuery;
|
|
2138
2202
|
readonly inner: Readonly<{
|
|
2203
|
+
repository: string;
|
|
2139
2204
|
binderIndex: number;
|
|
2140
2205
|
algorithm: string;
|
|
2141
2206
|
message: string;
|
|
@@ -2144,6 +2209,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2144
2209
|
};
|
|
2145
2210
|
QueryRefused: {
|
|
2146
2211
|
new (inner: {
|
|
2212
|
+
repository: string;
|
|
2147
2213
|
algorithm: string;
|
|
2148
2214
|
message: string;
|
|
2149
2215
|
}): {
|
|
@@ -2154,11 +2220,13 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2154
2220
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2155
2221
|
readonly tag: RecoveryIssue_Tags.QueryRefused;
|
|
2156
2222
|
readonly inner: Readonly<{
|
|
2223
|
+
repository: string;
|
|
2157
2224
|
algorithm: string;
|
|
2158
2225
|
message: string;
|
|
2159
2226
|
}>;
|
|
2160
2227
|
};
|
|
2161
2228
|
"new"(inner: {
|
|
2229
|
+
repository: string;
|
|
2162
2230
|
algorithm: string;
|
|
2163
2231
|
message: string;
|
|
2164
2232
|
}): {
|
|
@@ -2169,6 +2237,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2169
2237
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2170
2238
|
readonly tag: RecoveryIssue_Tags.QueryRefused;
|
|
2171
2239
|
readonly inner: Readonly<{
|
|
2240
|
+
repository: string;
|
|
2172
2241
|
algorithm: string;
|
|
2173
2242
|
message: string;
|
|
2174
2243
|
}>;
|
|
@@ -2181,6 +2250,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2181
2250
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2182
2251
|
readonly tag: RecoveryIssue_Tags.QueryRefused;
|
|
2183
2252
|
readonly inner: Readonly<{
|
|
2253
|
+
repository: string;
|
|
2184
2254
|
algorithm: string;
|
|
2185
2255
|
message: string;
|
|
2186
2256
|
}>;
|
|
@@ -2188,6 +2258,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2188
2258
|
};
|
|
2189
2259
|
ContentForm: {
|
|
2190
2260
|
new (inner: {
|
|
2261
|
+
repository: string;
|
|
2191
2262
|
message: string;
|
|
2192
2263
|
}): {
|
|
2193
2264
|
/**
|
|
@@ -2197,10 +2268,12 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2197
2268
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2198
2269
|
readonly tag: RecoveryIssue_Tags.ContentForm;
|
|
2199
2270
|
readonly inner: Readonly<{
|
|
2271
|
+
repository: string;
|
|
2200
2272
|
message: string;
|
|
2201
2273
|
}>;
|
|
2202
2274
|
};
|
|
2203
2275
|
"new"(inner: {
|
|
2276
|
+
repository: string;
|
|
2204
2277
|
message: string;
|
|
2205
2278
|
}): {
|
|
2206
2279
|
/**
|
|
@@ -2210,6 +2283,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2210
2283
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2211
2284
|
readonly tag: RecoveryIssue_Tags.ContentForm;
|
|
2212
2285
|
readonly inner: Readonly<{
|
|
2286
|
+
repository: string;
|
|
2213
2287
|
message: string;
|
|
2214
2288
|
}>;
|
|
2215
2289
|
};
|
|
@@ -2221,12 +2295,14 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2221
2295
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2222
2296
|
readonly tag: RecoveryIssue_Tags.ContentForm;
|
|
2223
2297
|
readonly inner: Readonly<{
|
|
2298
|
+
repository: string;
|
|
2224
2299
|
message: string;
|
|
2225
2300
|
}>;
|
|
2226
2301
|
};
|
|
2227
2302
|
};
|
|
2228
2303
|
ContentQuery: {
|
|
2229
2304
|
new (inner: {
|
|
2305
|
+
repository: string;
|
|
2230
2306
|
algorithm: string;
|
|
2231
2307
|
message: string;
|
|
2232
2308
|
}): {
|
|
@@ -2237,11 +2313,13 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2237
2313
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2238
2314
|
readonly tag: RecoveryIssue_Tags.ContentQuery;
|
|
2239
2315
|
readonly inner: Readonly<{
|
|
2316
|
+
repository: string;
|
|
2240
2317
|
algorithm: string;
|
|
2241
2318
|
message: string;
|
|
2242
2319
|
}>;
|
|
2243
2320
|
};
|
|
2244
2321
|
"new"(inner: {
|
|
2322
|
+
repository: string;
|
|
2245
2323
|
algorithm: string;
|
|
2246
2324
|
message: string;
|
|
2247
2325
|
}): {
|
|
@@ -2252,6 +2330,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2252
2330
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2253
2331
|
readonly tag: RecoveryIssue_Tags.ContentQuery;
|
|
2254
2332
|
readonly inner: Readonly<{
|
|
2333
|
+
repository: string;
|
|
2255
2334
|
algorithm: string;
|
|
2256
2335
|
message: string;
|
|
2257
2336
|
}>;
|
|
@@ -2264,6 +2343,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2264
2343
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2265
2344
|
readonly tag: RecoveryIssue_Tags.ContentQuery;
|
|
2266
2345
|
readonly inner: Readonly<{
|
|
2346
|
+
repository: string;
|
|
2267
2347
|
algorithm: string;
|
|
2268
2348
|
message: string;
|
|
2269
2349
|
}>;
|
|
@@ -2271,6 +2351,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2271
2351
|
};
|
|
2272
2352
|
Capabilities: {
|
|
2273
2353
|
new (inner: {
|
|
2354
|
+
repository: string;
|
|
2274
2355
|
message: string;
|
|
2275
2356
|
}): {
|
|
2276
2357
|
/**
|
|
@@ -2280,10 +2361,12 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2280
2361
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2281
2362
|
readonly tag: RecoveryIssue_Tags.Capabilities;
|
|
2282
2363
|
readonly inner: Readonly<{
|
|
2364
|
+
repository: string;
|
|
2283
2365
|
message: string;
|
|
2284
2366
|
}>;
|
|
2285
2367
|
};
|
|
2286
2368
|
"new"(inner: {
|
|
2369
|
+
repository: string;
|
|
2287
2370
|
message: string;
|
|
2288
2371
|
}): {
|
|
2289
2372
|
/**
|
|
@@ -2293,6 +2376,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2293
2376
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2294
2377
|
readonly tag: RecoveryIssue_Tags.Capabilities;
|
|
2295
2378
|
readonly inner: Readonly<{
|
|
2379
|
+
repository: string;
|
|
2296
2380
|
message: string;
|
|
2297
2381
|
}>;
|
|
2298
2382
|
};
|
|
@@ -2304,6 +2388,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2304
2388
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2305
2389
|
readonly tag: RecoveryIssue_Tags.Capabilities;
|
|
2306
2390
|
readonly inner: Readonly<{
|
|
2391
|
+
repository: string;
|
|
2307
2392
|
message: string;
|
|
2308
2393
|
}>;
|
|
2309
2394
|
};
|
|
@@ -2349,6 +2434,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2349
2434
|
};
|
|
2350
2435
|
CandidateFetch: {
|
|
2351
2436
|
new (inner: {
|
|
2437
|
+
repository: string;
|
|
2352
2438
|
manifestId: string;
|
|
2353
2439
|
message: string;
|
|
2354
2440
|
}): {
|
|
@@ -2359,11 +2445,13 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2359
2445
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2360
2446
|
readonly tag: RecoveryIssue_Tags.CandidateFetch;
|
|
2361
2447
|
readonly inner: Readonly<{
|
|
2448
|
+
repository: string;
|
|
2362
2449
|
manifestId: string;
|
|
2363
2450
|
message: string;
|
|
2364
2451
|
}>;
|
|
2365
2452
|
};
|
|
2366
2453
|
"new"(inner: {
|
|
2454
|
+
repository: string;
|
|
2367
2455
|
manifestId: string;
|
|
2368
2456
|
message: string;
|
|
2369
2457
|
}): {
|
|
@@ -2374,6 +2462,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2374
2462
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2375
2463
|
readonly tag: RecoveryIssue_Tags.CandidateFetch;
|
|
2376
2464
|
readonly inner: Readonly<{
|
|
2465
|
+
repository: string;
|
|
2377
2466
|
manifestId: string;
|
|
2378
2467
|
message: string;
|
|
2379
2468
|
}>;
|
|
@@ -2386,6 +2475,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2386
2475
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2387
2476
|
readonly tag: RecoveryIssue_Tags.CandidateFetch;
|
|
2388
2477
|
readonly inner: Readonly<{
|
|
2478
|
+
repository: string;
|
|
2389
2479
|
manifestId: string;
|
|
2390
2480
|
message: string;
|
|
2391
2481
|
}>;
|
|
@@ -2437,6 +2527,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2437
2527
|
};
|
|
2438
2528
|
EndpointRefused: {
|
|
2439
2529
|
new (inner: {
|
|
2530
|
+
repository: string;
|
|
2440
2531
|
manifestId: string;
|
|
2441
2532
|
endpoint: string;
|
|
2442
2533
|
}): {
|
|
@@ -2447,11 +2538,13 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2447
2538
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2448
2539
|
readonly tag: RecoveryIssue_Tags.EndpointRefused;
|
|
2449
2540
|
readonly inner: Readonly<{
|
|
2541
|
+
repository: string;
|
|
2450
2542
|
manifestId: string;
|
|
2451
2543
|
endpoint: string;
|
|
2452
2544
|
}>;
|
|
2453
2545
|
};
|
|
2454
2546
|
"new"(inner: {
|
|
2547
|
+
repository: string;
|
|
2455
2548
|
manifestId: string;
|
|
2456
2549
|
endpoint: string;
|
|
2457
2550
|
}): {
|
|
@@ -2462,6 +2555,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2462
2555
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2463
2556
|
readonly tag: RecoveryIssue_Tags.EndpointRefused;
|
|
2464
2557
|
readonly inner: Readonly<{
|
|
2558
|
+
repository: string;
|
|
2465
2559
|
manifestId: string;
|
|
2466
2560
|
endpoint: string;
|
|
2467
2561
|
}>;
|
|
@@ -2474,6 +2568,7 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2474
2568
|
readonly [uniffiTypeNameSymbol]: "RecoveryIssue";
|
|
2475
2569
|
readonly tag: RecoveryIssue_Tags.EndpointRefused;
|
|
2476
2570
|
readonly inner: Readonly<{
|
|
2571
|
+
repository: string;
|
|
2477
2572
|
manifestId: string;
|
|
2478
2573
|
endpoint: string;
|
|
2479
2574
|
}>;
|
|
@@ -2520,13 +2615,13 @@ export declare const RecoveryIssue: Readonly<{
|
|
|
2520
2615
|
};
|
|
2521
2616
|
}>;
|
|
2522
2617
|
/**
|
|
2523
|
-
* Why
|
|
2618
|
+
* Why repository recovery did not complete cleanly, or why one candidate was omitted while another
|
|
2524
2619
|
* succeeded. Kept as data so a partial recovery never loses the rest of the lookup outcome, and
|
|
2525
2620
|
* each kind carries exactly what it is about.
|
|
2526
2621
|
*/
|
|
2527
|
-
export type RecoveryIssue = InstanceType<typeof RecoveryIssue['Binder' | 'DeprecatedAlgorithm' | 'BindingQuery' | 'QueryRefused' | 'ContentForm' | 'ContentQuery' | 'Capabilities' | 'ContentTooLarge' | 'CandidateFetch' | 'CandidateValidation' | 'EndpointRefused' | 'ResourceLimit']>;
|
|
2622
|
+
export type RecoveryIssue = InstanceType<typeof RecoveryIssue['Binder' | 'DeprecatedAlgorithm' | 'BindingUndeclared' | 'BindingQuery' | 'QueryRefused' | 'ContentForm' | 'ContentQuery' | 'Capabilities' | 'ContentTooLarge' | 'CandidateFetch' | 'CandidateValidation' | 'EndpointRefused' | 'ResourceLimit']>;
|
|
2528
2623
|
/**
|
|
2529
|
-
*
|
|
2624
|
+
* Repository recovery outcome and every non-fatal issue encountered on the way.
|
|
2530
2625
|
*/
|
|
2531
2626
|
export type RecoverySummary = {
|
|
2532
2627
|
status: RecoveryStatus;
|
|
@@ -2552,7 +2647,7 @@ export declare enum GoldenComparison_Tags {
|
|
|
2552
2647
|
}
|
|
2553
2648
|
/**
|
|
2554
2649
|
* Typed completion of C2PA 2.4's `watermark-golden` / `fingerprint-golden` final comparison:
|
|
2555
|
-
* the local active manifest against what the
|
|
2650
|
+
* the local active manifest against what the repository holds. Every outcome is its own variant.
|
|
2556
2651
|
*/
|
|
2557
2652
|
export declare const GoldenComparison: Readonly<{
|
|
2558
2653
|
instanceOf: (obj: any) => obj is GoldenComparison;
|
|
@@ -2819,7 +2914,7 @@ export declare const GoldenComparison: Readonly<{
|
|
|
2819
2914
|
}>;
|
|
2820
2915
|
/**
|
|
2821
2916
|
* Typed completion of C2PA 2.4's `watermark-golden` / `fingerprint-golden` final comparison:
|
|
2822
|
-
* the local active manifest against what the
|
|
2917
|
+
* the local active manifest against what the repository holds. Every outcome is its own variant.
|
|
2823
2918
|
*/
|
|
2824
2919
|
export type GoldenComparison = InstanceType<typeof GoldenComparison['NotRequested' | 'NoEmbeddedManifest' | 'NoRecoveredManifest' | 'RecoveryIncomplete' | 'Matches' | 'Differs' | 'NoneMatches' | 'Unreadable']>;
|
|
2825
2920
|
/**
|
|
@@ -2850,13 +2945,13 @@ export declare enum Verdict_Tags {
|
|
|
2850
2945
|
* and the list stays whole beside it.
|
|
2851
2946
|
*
|
|
2852
2947
|
* The embedded manifest is the verdict whenever the asset carries one that is not `Invalid`
|
|
2853
|
-
* and the golden comparison does not contradict it. When it `differs` from what the
|
|
2948
|
+
* and the golden comparison does not contradict it. When it `differs` from what the repository
|
|
2854
2949
|
* holds, or several recovered candidates leave the comparison indeterminate, the embedded and
|
|
2855
2950
|
* the recovered manifests are reported as ambiguous: C2PA 2.4's substitution use case leaves
|
|
2856
2951
|
* that trust decision to the client. Otherwise a recovered candidate is named only when
|
|
2857
2952
|
* evidence singles it out: it is the only one, or the only one no other credential in this
|
|
2858
2953
|
* report supersedes (the successor's signed `parentOf` link), or the only one of those whose
|
|
2859
|
-
* hard binding holds over these bytes. A
|
|
2954
|
+
* hard binding holds over these bytes. A repository score, a signature time or a position in the
|
|
2860
2955
|
* list is not evidence of which manifest belongs to these bytes, so candidates those alone would
|
|
2861
2956
|
* separate are reported as ambiguous.
|
|
2862
2957
|
*/
|
|
@@ -3074,13 +3169,13 @@ export declare const Verdict: Readonly<{
|
|
|
3074
3169
|
* and the list stays whole beside it.
|
|
3075
3170
|
*
|
|
3076
3171
|
* The embedded manifest is the verdict whenever the asset carries one that is not `Invalid`
|
|
3077
|
-
* and the golden comparison does not contradict it. When it `differs` from what the
|
|
3172
|
+
* and the golden comparison does not contradict it. When it `differs` from what the repository
|
|
3078
3173
|
* holds, or several recovered candidates leave the comparison indeterminate, the embedded and
|
|
3079
3174
|
* the recovered manifests are reported as ambiguous: C2PA 2.4's substitution use case leaves
|
|
3080
3175
|
* that trust decision to the client. Otherwise a recovered candidate is named only when
|
|
3081
3176
|
* evidence singles it out: it is the only one, or the only one no other credential in this
|
|
3082
3177
|
* report supersedes (the successor's signed `parentOf` link), or the only one of those whose
|
|
3083
|
-
* hard binding holds over these bytes. A
|
|
3178
|
+
* hard binding holds over these bytes. A repository score, a signature time or a position in the
|
|
3084
3179
|
* list is not evidence of which manifest belongs to these bytes, so candidates those alone would
|
|
3085
3180
|
* separate are reported as ambiguous.
|
|
3086
3181
|
*/
|
|
@@ -3103,66 +3198,146 @@ export declare const AssetVerification: Readonly<{
|
|
|
3103
3198
|
new: (partial: Partial<AssetVerification> & Required<Omit<AssetVerification, never>>) => AssetVerification;
|
|
3104
3199
|
defaults: () => Partial<AssetVerification>;
|
|
3105
3200
|
}>;
|
|
3201
|
+
export declare enum Repository_Tags {
|
|
3202
|
+
Named = "Named",
|
|
3203
|
+
Listed = "Listed"
|
|
3204
|
+
}
|
|
3106
3205
|
/**
|
|
3107
|
-
*
|
|
3206
|
+
* One C2PA manifest repository, as the Soft Binding Resolution API spec lets a client find it.
|
|
3108
3207
|
*/
|
|
3109
|
-
export
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3208
|
+
export declare const Repository: Readonly<{
|
|
3209
|
+
instanceOf: (obj: any) => obj is Repository;
|
|
3210
|
+
Named: {
|
|
3211
|
+
new (inner: {
|
|
3212
|
+
url: string;
|
|
3213
|
+
algorithms: Array<string>;
|
|
3214
|
+
}): {
|
|
3215
|
+
/**
|
|
3216
|
+
* @private
|
|
3217
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3218
|
+
*/
|
|
3219
|
+
readonly [uniffiTypeNameSymbol]: "Repository";
|
|
3220
|
+
readonly tag: Repository_Tags.Named;
|
|
3221
|
+
readonly inner: Readonly<{
|
|
3222
|
+
url: string;
|
|
3223
|
+
algorithms: Array<string>;
|
|
3224
|
+
}>;
|
|
3225
|
+
};
|
|
3226
|
+
"new"(inner: {
|
|
3227
|
+
url: string;
|
|
3228
|
+
algorithms: Array<string>;
|
|
3229
|
+
}): {
|
|
3230
|
+
/**
|
|
3231
|
+
* @private
|
|
3232
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3233
|
+
*/
|
|
3234
|
+
readonly [uniffiTypeNameSymbol]: "Repository";
|
|
3235
|
+
readonly tag: Repository_Tags.Named;
|
|
3236
|
+
readonly inner: Readonly<{
|
|
3237
|
+
url: string;
|
|
3238
|
+
algorithms: Array<string>;
|
|
3239
|
+
}>;
|
|
3240
|
+
};
|
|
3241
|
+
instanceOf(obj: any): obj is {
|
|
3242
|
+
/**
|
|
3243
|
+
* @private
|
|
3244
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3245
|
+
*/
|
|
3246
|
+
readonly [uniffiTypeNameSymbol]: "Repository";
|
|
3247
|
+
readonly tag: Repository_Tags.Named;
|
|
3248
|
+
readonly inner: Readonly<{
|
|
3249
|
+
url: string;
|
|
3250
|
+
algorithms: Array<string>;
|
|
3251
|
+
}>;
|
|
3252
|
+
};
|
|
3253
|
+
};
|
|
3254
|
+
Listed: {
|
|
3255
|
+
new (inner: {
|
|
3256
|
+
algorithm: string;
|
|
3257
|
+
}): {
|
|
3258
|
+
/**
|
|
3259
|
+
* @private
|
|
3260
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3261
|
+
*/
|
|
3262
|
+
readonly [uniffiTypeNameSymbol]: "Repository";
|
|
3263
|
+
readonly tag: Repository_Tags.Listed;
|
|
3264
|
+
readonly inner: Readonly<{
|
|
3265
|
+
algorithm: string;
|
|
3266
|
+
}>;
|
|
3267
|
+
};
|
|
3268
|
+
"new"(inner: {
|
|
3269
|
+
algorithm: string;
|
|
3270
|
+
}): {
|
|
3271
|
+
/**
|
|
3272
|
+
* @private
|
|
3273
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3274
|
+
*/
|
|
3275
|
+
readonly [uniffiTypeNameSymbol]: "Repository";
|
|
3276
|
+
readonly tag: Repository_Tags.Listed;
|
|
3277
|
+
readonly inner: Readonly<{
|
|
3278
|
+
algorithm: string;
|
|
3279
|
+
}>;
|
|
3280
|
+
};
|
|
3281
|
+
instanceOf(obj: any): obj is {
|
|
3282
|
+
/**
|
|
3283
|
+
* @private
|
|
3284
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3285
|
+
*/
|
|
3286
|
+
readonly [uniffiTypeNameSymbol]: "Repository";
|
|
3287
|
+
readonly tag: Repository_Tags.Listed;
|
|
3288
|
+
readonly inner: Readonly<{
|
|
3289
|
+
algorithm: string;
|
|
3290
|
+
}>;
|
|
3291
|
+
};
|
|
3292
|
+
};
|
|
3293
|
+
}>;
|
|
3122
3294
|
/**
|
|
3123
|
-
*
|
|
3295
|
+
* One C2PA manifest repository, as the Soft Binding Resolution API spec lets a client find it.
|
|
3124
3296
|
*/
|
|
3125
|
-
export
|
|
3126
|
-
create: (partial: Partial<RegistryOptions> & Required<Omit<RegistryOptions, "endpoints">>) => RegistryOptions;
|
|
3127
|
-
new: (partial: Partial<RegistryOptions> & Required<Omit<RegistryOptions, "endpoints">>) => RegistryOptions;
|
|
3128
|
-
defaults: () => Partial<RegistryOptions>;
|
|
3129
|
-
}>;
|
|
3297
|
+
export type Repository = InstanceType<typeof Repository['Named' | 'Listed']>;
|
|
3130
3298
|
/**
|
|
3131
3299
|
* Construction options for [`AssetVerifier::new`] (and the `AssetVerifier.create` JS
|
|
3132
|
-
* binding).
|
|
3300
|
+
* binding). Every field is stated: nothing here is chosen on the caller's behalf.
|
|
3133
3301
|
*
|
|
3134
3302
|
* One definition, all lanes: `#[binding]` derives the shapes directly here:
|
|
3135
|
-
* tsify (camelCase
|
|
3136
|
-
*
|
|
3303
|
+
* tsify (camelCase) on wasm, a `uniffi::Record` on the native `ffi` build, so there is no
|
|
3304
|
+
* per-lane DTO copy. Off both lanes it is a plain struct.
|
|
3137
3305
|
*/
|
|
3138
3306
|
export type AssetVerifierOptions = {
|
|
3139
3307
|
/**
|
|
3140
|
-
* The
|
|
3308
|
+
* The C2PA manifest repositories recovery asks, each a Soft Binding Resolution API declared
|
|
3309
|
+
* for exactly the algorithms it may be asked for. Results merge by manifest, and a match's
|
|
3310
|
+
* `endpoint` is fetched from only when it names one of these. Empty: no recovery can be
|
|
3311
|
+
* asked of this verifier.
|
|
3141
3312
|
*/
|
|
3142
|
-
|
|
3313
|
+
repositories: Array<Repository>;
|
|
3143
3314
|
/**
|
|
3144
|
-
* PEM trust anchors for the caller
|
|
3315
|
+
* PEM trust anchors for the manifest signers the caller trusts.
|
|
3145
3316
|
*/
|
|
3146
3317
|
trustAnchors: Array<string>;
|
|
3147
3318
|
/**
|
|
3148
|
-
*
|
|
3149
|
-
|
|
3319
|
+
* PEM trust anchors for the time-stamping authorities the caller trusts.
|
|
3320
|
+
*/
|
|
3321
|
+
tsaTrustAnchors: Array<string>;
|
|
3322
|
+
/**
|
|
3323
|
+
* Also trust the bundled official C2PA anchors, manifest and TSA lists, beside the
|
|
3324
|
+
* caller's. `false` trusts the caller's lists alone.
|
|
3150
3325
|
*/
|
|
3151
|
-
trustC2paAnchors
|
|
3326
|
+
trustC2paAnchors: boolean;
|
|
3152
3327
|
/**
|
|
3153
3328
|
* Issuer DIDs whose CAWG identity (ICA) credentials count as validated, matched
|
|
3154
|
-
* exactly against the credential issuer.
|
|
3155
|
-
*
|
|
3156
|
-
*
|
|
3329
|
+
* exactly against the credential issuer. Empty trusts no issuer: every identity assertion
|
|
3330
|
+
* then reports `cawg.ica.untrusted_issuer` and withholds `cawg.ica.credential_valid`,
|
|
3331
|
+
* which leaves the manifest's own validity untouched.
|
|
3157
3332
|
*/
|
|
3158
|
-
trustedIcaIssuers
|
|
3333
|
+
trustedIcaIssuers: Array<string>;
|
|
3159
3334
|
};
|
|
3160
3335
|
/**
|
|
3161
3336
|
* Generated factory for {@link AssetVerifierOptions} record objects.
|
|
3162
3337
|
*/
|
|
3163
3338
|
export declare const AssetVerifierOptions: Readonly<{
|
|
3164
|
-
create: (partial: Partial<AssetVerifierOptions> & Required<Omit<AssetVerifierOptions,
|
|
3165
|
-
new: (partial: Partial<AssetVerifierOptions> & Required<Omit<AssetVerifierOptions,
|
|
3339
|
+
create: (partial: Partial<AssetVerifierOptions> & Required<Omit<AssetVerifierOptions, never>>) => AssetVerifierOptions;
|
|
3340
|
+
new: (partial: Partial<AssetVerifierOptions> & Required<Omit<AssetVerifierOptions, never>>) => AssetVerifierOptions;
|
|
3166
3341
|
defaults: () => Partial<AssetVerifierOptions>;
|
|
3167
3342
|
}>;
|
|
3168
3343
|
/**
|
|
@@ -3178,121 +3353,106 @@ export declare enum ContentTrigger {
|
|
|
3178
3353
|
*/
|
|
3179
3354
|
Always = 1
|
|
3180
3355
|
}
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3356
|
+
/**
|
|
3357
|
+
* `matches/byContent`: the asset is uploaded to each repository, one request per algorithm that
|
|
3358
|
+
* repository is declared for.
|
|
3359
|
+
*/
|
|
3360
|
+
export type ByContent = {
|
|
3361
|
+
after: ContentTrigger;
|
|
3362
|
+
};
|
|
3363
|
+
/**
|
|
3364
|
+
* Generated factory for {@link ByContent} record objects.
|
|
3365
|
+
*/
|
|
3366
|
+
export declare const ByContent: Readonly<{
|
|
3367
|
+
create: (partial: Partial<ByContent> & Required<Omit<ByContent, never>>) => ByContent;
|
|
3368
|
+
new: (partial: Partial<ByContent> & Required<Omit<ByContent, never>>) => ByContent;
|
|
3369
|
+
defaults: () => Partial<ByContent>;
|
|
3370
|
+
}>;
|
|
3371
|
+
/**
|
|
3372
|
+
* `matches/byReference`: each repository downloads the asset from `url`, one request per
|
|
3373
|
+
* algorithm it is declared for, so the client reads no bytes for it.
|
|
3374
|
+
*/
|
|
3375
|
+
export type ByReference = {
|
|
3376
|
+
after: ContentTrigger;
|
|
3377
|
+
/**
|
|
3378
|
+
* A short-lived https URL without credentials.
|
|
3379
|
+
*/
|
|
3380
|
+
url: string;
|
|
3381
|
+
/**
|
|
3382
|
+
* The asset's size in bytes, which caps the repository's download.
|
|
3383
|
+
*/
|
|
3384
|
+
length: bigint;
|
|
3385
|
+
mediaType?: string;
|
|
3386
|
+
};
|
|
3387
|
+
/**
|
|
3388
|
+
* Generated factory for {@link ByReference} record objects.
|
|
3389
|
+
*/
|
|
3390
|
+
export declare const ByReference: Readonly<{
|
|
3391
|
+
create: (partial: Partial<ByReference> & Required<Omit<ByReference, "mediaType">>) => ByReference;
|
|
3392
|
+
new: (partial: Partial<ByReference> & Required<Omit<ByReference, "mediaType">>) => ByReference;
|
|
3393
|
+
defaults: () => Partial<ByReference>;
|
|
3394
|
+
}>;
|
|
3395
|
+
export declare enum AssetFormat_Tags {
|
|
3396
|
+
Sniff = "Sniff",
|
|
3397
|
+
Declared = "Declared"
|
|
3186
3398
|
}
|
|
3187
3399
|
/**
|
|
3188
|
-
*
|
|
3189
|
-
*
|
|
3400
|
+
* The format of the asset a call is handed. Stated, never defaulted: sniffing is a choice the
|
|
3401
|
+
* caller makes by name, not what happens when they say nothing.
|
|
3190
3402
|
*/
|
|
3191
|
-
export declare const
|
|
3192
|
-
instanceOf: (obj: any) => obj is
|
|
3193
|
-
|
|
3194
|
-
new (): {
|
|
3195
|
-
/**
|
|
3196
|
-
* @private
|
|
3197
|
-
* This field is private and should not be used, use `tag` instead.
|
|
3198
|
-
*/
|
|
3199
|
-
readonly [uniffiTypeNameSymbol]: "Detectors";
|
|
3200
|
-
readonly tag: Detectors_Tags.Fingerprint;
|
|
3201
|
-
};
|
|
3202
|
-
"new"(): {
|
|
3203
|
-
/**
|
|
3204
|
-
* @private
|
|
3205
|
-
* This field is private and should not be used, use `tag` instead.
|
|
3206
|
-
*/
|
|
3207
|
-
readonly [uniffiTypeNameSymbol]: "Detectors";
|
|
3208
|
-
readonly tag: Detectors_Tags.Fingerprint;
|
|
3209
|
-
};
|
|
3210
|
-
instanceOf(obj: any): obj is {
|
|
3211
|
-
/**
|
|
3212
|
-
* @private
|
|
3213
|
-
* This field is private and should not be used, use `tag` instead.
|
|
3214
|
-
*/
|
|
3215
|
-
readonly [uniffiTypeNameSymbol]: "Detectors";
|
|
3216
|
-
readonly tag: Detectors_Tags.Fingerprint;
|
|
3217
|
-
};
|
|
3218
|
-
};
|
|
3219
|
-
Watermark: {
|
|
3220
|
-
new (): {
|
|
3221
|
-
/**
|
|
3222
|
-
* @private
|
|
3223
|
-
* This field is private and should not be used, use `tag` instead.
|
|
3224
|
-
*/
|
|
3225
|
-
readonly [uniffiTypeNameSymbol]: "Detectors";
|
|
3226
|
-
readonly tag: Detectors_Tags.Watermark;
|
|
3227
|
-
};
|
|
3228
|
-
"new"(): {
|
|
3229
|
-
/**
|
|
3230
|
-
* @private
|
|
3231
|
-
* This field is private and should not be used, use `tag` instead.
|
|
3232
|
-
*/
|
|
3233
|
-
readonly [uniffiTypeNameSymbol]: "Detectors";
|
|
3234
|
-
readonly tag: Detectors_Tags.Watermark;
|
|
3235
|
-
};
|
|
3236
|
-
instanceOf(obj: any): obj is {
|
|
3237
|
-
/**
|
|
3238
|
-
* @private
|
|
3239
|
-
* This field is private and should not be used, use `tag` instead.
|
|
3240
|
-
*/
|
|
3241
|
-
readonly [uniffiTypeNameSymbol]: "Detectors";
|
|
3242
|
-
readonly tag: Detectors_Tags.Watermark;
|
|
3243
|
-
};
|
|
3244
|
-
};
|
|
3245
|
-
All: {
|
|
3403
|
+
export declare const AssetFormat: Readonly<{
|
|
3404
|
+
instanceOf: (obj: any) => obj is AssetFormat;
|
|
3405
|
+
Sniff: {
|
|
3246
3406
|
new (): {
|
|
3247
3407
|
/**
|
|
3248
3408
|
* @private
|
|
3249
3409
|
* This field is private and should not be used, use `tag` instead.
|
|
3250
3410
|
*/
|
|
3251
|
-
readonly [uniffiTypeNameSymbol]: "
|
|
3252
|
-
readonly tag:
|
|
3411
|
+
readonly [uniffiTypeNameSymbol]: "AssetFormat";
|
|
3412
|
+
readonly tag: AssetFormat_Tags.Sniff;
|
|
3253
3413
|
};
|
|
3254
3414
|
"new"(): {
|
|
3255
3415
|
/**
|
|
3256
3416
|
* @private
|
|
3257
3417
|
* This field is private and should not be used, use `tag` instead.
|
|
3258
3418
|
*/
|
|
3259
|
-
readonly [uniffiTypeNameSymbol]: "
|
|
3260
|
-
readonly tag:
|
|
3419
|
+
readonly [uniffiTypeNameSymbol]: "AssetFormat";
|
|
3420
|
+
readonly tag: AssetFormat_Tags.Sniff;
|
|
3261
3421
|
};
|
|
3262
3422
|
instanceOf(obj: any): obj is {
|
|
3263
3423
|
/**
|
|
3264
3424
|
* @private
|
|
3265
3425
|
* This field is private and should not be used, use `tag` instead.
|
|
3266
3426
|
*/
|
|
3267
|
-
readonly [uniffiTypeNameSymbol]: "
|
|
3268
|
-
readonly tag:
|
|
3427
|
+
readonly [uniffiTypeNameSymbol]: "AssetFormat";
|
|
3428
|
+
readonly tag: AssetFormat_Tags.Sniff;
|
|
3269
3429
|
};
|
|
3270
3430
|
};
|
|
3271
|
-
|
|
3431
|
+
Declared: {
|
|
3272
3432
|
new (inner: {
|
|
3273
|
-
|
|
3433
|
+
mediaType: string;
|
|
3274
3434
|
}): {
|
|
3275
3435
|
/**
|
|
3276
3436
|
* @private
|
|
3277
3437
|
* This field is private and should not be used, use `tag` instead.
|
|
3278
3438
|
*/
|
|
3279
|
-
readonly [uniffiTypeNameSymbol]: "
|
|
3280
|
-
readonly tag:
|
|
3439
|
+
readonly [uniffiTypeNameSymbol]: "AssetFormat";
|
|
3440
|
+
readonly tag: AssetFormat_Tags.Declared;
|
|
3281
3441
|
readonly inner: Readonly<{
|
|
3282
|
-
|
|
3442
|
+
mediaType: string;
|
|
3283
3443
|
}>;
|
|
3284
3444
|
};
|
|
3285
3445
|
"new"(inner: {
|
|
3286
|
-
|
|
3446
|
+
mediaType: string;
|
|
3287
3447
|
}): {
|
|
3288
3448
|
/**
|
|
3289
3449
|
* @private
|
|
3290
3450
|
* This field is private and should not be used, use `tag` instead.
|
|
3291
3451
|
*/
|
|
3292
|
-
readonly [uniffiTypeNameSymbol]: "
|
|
3293
|
-
readonly tag:
|
|
3452
|
+
readonly [uniffiTypeNameSymbol]: "AssetFormat";
|
|
3453
|
+
readonly tag: AssetFormat_Tags.Declared;
|
|
3294
3454
|
readonly inner: Readonly<{
|
|
3295
|
-
|
|
3455
|
+
mediaType: string;
|
|
3296
3456
|
}>;
|
|
3297
3457
|
};
|
|
3298
3458
|
instanceOf(obj: any): obj is {
|
|
@@ -3300,72 +3460,31 @@ export declare const Detectors: Readonly<{
|
|
|
3300
3460
|
* @private
|
|
3301
3461
|
* This field is private and should not be used, use `tag` instead.
|
|
3302
3462
|
*/
|
|
3303
|
-
readonly [uniffiTypeNameSymbol]: "
|
|
3304
|
-
readonly tag:
|
|
3463
|
+
readonly [uniffiTypeNameSymbol]: "AssetFormat";
|
|
3464
|
+
readonly tag: AssetFormat_Tags.Declared;
|
|
3305
3465
|
readonly inner: Readonly<{
|
|
3306
|
-
|
|
3466
|
+
mediaType: string;
|
|
3307
3467
|
}>;
|
|
3308
3468
|
};
|
|
3309
3469
|
};
|
|
3310
3470
|
}>;
|
|
3311
3471
|
/**
|
|
3312
|
-
*
|
|
3313
|
-
*
|
|
3314
|
-
*/
|
|
3315
|
-
export type Detectors = InstanceType<typeof Detectors['Fingerprint' | 'Watermark' | 'All' | 'Named']>;
|
|
3316
|
-
/**
|
|
3317
|
-
* One `matches/byContent` upload per selected detector.
|
|
3318
|
-
*/
|
|
3319
|
-
export type ByContent = {
|
|
3320
|
-
after: ContentTrigger;
|
|
3321
|
-
detectors: Detectors;
|
|
3322
|
-
};
|
|
3323
|
-
/**
|
|
3324
|
-
* Generated factory for {@link ByContent} record objects.
|
|
3325
|
-
*/
|
|
3326
|
-
export declare const ByContent: Readonly<{
|
|
3327
|
-
create: (partial: Partial<ByContent> & Required<Omit<ByContent, never>>) => ByContent;
|
|
3328
|
-
new: (partial: Partial<ByContent> & Required<Omit<ByContent, never>>) => ByContent;
|
|
3329
|
-
defaults: () => Partial<ByContent>;
|
|
3330
|
-
}>;
|
|
3331
|
-
/**
|
|
3332
|
-
* One `matches/byReference` query per selected detector. The registry downloads the asset
|
|
3333
|
-
* from `url`, so the client reads no bytes for it.
|
|
3334
|
-
*/
|
|
3335
|
-
export type ByReference = {
|
|
3336
|
-
after: ContentTrigger;
|
|
3337
|
-
detectors: Detectors;
|
|
3338
|
-
/**
|
|
3339
|
-
* A short-lived https URL without credentials.
|
|
3340
|
-
*/
|
|
3341
|
-
url: string;
|
|
3342
|
-
/**
|
|
3343
|
-
* The asset's size in bytes, which caps the registry's download.
|
|
3344
|
-
*/
|
|
3345
|
-
length: bigint;
|
|
3346
|
-
mediaType?: string;
|
|
3347
|
-
};
|
|
3348
|
-
/**
|
|
3349
|
-
* Generated factory for {@link ByReference} record objects.
|
|
3472
|
+
* The format of the asset a call is handed. Stated, never defaulted: sniffing is a choice the
|
|
3473
|
+
* caller makes by name, not what happens when they say nothing.
|
|
3350
3474
|
*/
|
|
3351
|
-
export
|
|
3352
|
-
create: (partial: Partial<ByReference> & Required<Omit<ByReference, "mediaType">>) => ByReference;
|
|
3353
|
-
new: (partial: Partial<ByReference> & Required<Omit<ByReference, "mediaType">>) => ByReference;
|
|
3354
|
-
defaults: () => Partial<ByReference>;
|
|
3355
|
-
}>;
|
|
3475
|
+
export type AssetFormat = InstanceType<typeof AssetFormat['Sniff' | 'Declared']>;
|
|
3356
3476
|
/**
|
|
3357
|
-
* Everything one [`Binder::derive`] needs beyond the asset.
|
|
3358
|
-
* from the leading bytes.
|
|
3477
|
+
* Everything one [`Binder::derive`] needs beyond the asset.
|
|
3359
3478
|
*/
|
|
3360
3479
|
export type DeriveOptions = {
|
|
3361
|
-
format
|
|
3480
|
+
format: AssetFormat;
|
|
3362
3481
|
};
|
|
3363
3482
|
/**
|
|
3364
3483
|
* Generated factory for {@link DeriveOptions} record objects.
|
|
3365
3484
|
*/
|
|
3366
3485
|
export declare const DeriveOptions: Readonly<{
|
|
3367
|
-
create: (partial: Partial<DeriveOptions> & Required<Omit<DeriveOptions,
|
|
3368
|
-
new: (partial: Partial<DeriveOptions> & Required<Omit<DeriveOptions,
|
|
3486
|
+
create: (partial: Partial<DeriveOptions> & Required<Omit<DeriveOptions, never>>) => DeriveOptions;
|
|
3487
|
+
new: (partial: Partial<DeriveOptions> & Required<Omit<DeriveOptions, never>>) => DeriveOptions;
|
|
3369
3488
|
defaults: () => Partial<DeriveOptions>;
|
|
3370
3489
|
}>;
|
|
3371
3490
|
/**
|
|
@@ -3402,7 +3521,8 @@ export declare enum ValidationCodeKind {
|
|
|
3402
3521
|
Failure = 2
|
|
3403
3522
|
}
|
|
3404
3523
|
/**
|
|
3405
|
-
* One C2PA validation status entry (spec §15.3)
|
|
3524
|
+
* One C2PA validation status entry (spec §15.3): the registered code, its kind, and the
|
|
3525
|
+
* spec's own free-text `explanation`, which is where anything finer than the code lives.
|
|
3406
3526
|
*/
|
|
3407
3527
|
export type ValidationCode = {
|
|
3408
3528
|
/**
|
|
@@ -3410,13 +3530,18 @@ export type ValidationCode = {
|
|
|
3410
3530
|
*/
|
|
3411
3531
|
code: string;
|
|
3412
3532
|
kind: ValidationCodeKind;
|
|
3533
|
+
/**
|
|
3534
|
+
* Prose for a reader, never a value to branch on: a stream failure names which of the
|
|
3535
|
+
* registered code's listed causes it hit here.
|
|
3536
|
+
*/
|
|
3537
|
+
explanation?: string;
|
|
3413
3538
|
};
|
|
3414
3539
|
/**
|
|
3415
3540
|
* Generated factory for {@link ValidationCode} record objects.
|
|
3416
3541
|
*/
|
|
3417
3542
|
export declare const ValidationCode: Readonly<{
|
|
3418
|
-
create: (partial: Partial<ValidationCode> & Required<Omit<ValidationCode,
|
|
3419
|
-
new: (partial: Partial<ValidationCode> & Required<Omit<ValidationCode,
|
|
3543
|
+
create: (partial: Partial<ValidationCode> & Required<Omit<ValidationCode, "explanation">>) => ValidationCode;
|
|
3544
|
+
new: (partial: Partial<ValidationCode> & Required<Omit<ValidationCode, "explanation">>) => ValidationCode;
|
|
3420
3545
|
defaults: () => Partial<ValidationCode>;
|
|
3421
3546
|
}>;
|
|
3422
3547
|
/**
|
|
@@ -3488,141 +3613,52 @@ export type SegmentTiming = {
|
|
|
3488
3613
|
export declare const SegmentTiming: Readonly<{
|
|
3489
3614
|
create: (partial: Partial<SegmentTiming> & Required<Omit<SegmentTiming, "eventDurationSecs" | "timescale">>) => SegmentTiming;
|
|
3490
3615
|
new: (partial: Partial<SegmentTiming> & Required<Omit<SegmentTiming, "eventDurationSecs" | "timescale">>) => SegmentTiming;
|
|
3491
|
-
defaults: () => Partial<SegmentTiming>;
|
|
3492
|
-
}>;
|
|
3493
|
-
/**
|
|
3494
|
-
* Outcome of validating a media segment against its stream's init.
|
|
3495
|
-
*/
|
|
3496
|
-
export type MediaValidation = {
|
|
3497
|
-
valid: boolean;
|
|
3498
|
-
codes: Array<ValidationCode>;
|
|
3499
|
-
keyId: ArrayBuffer;
|
|
3500
|
-
timing: SegmentTiming;
|
|
3501
|
-
manifestId: string;
|
|
3502
|
-
};
|
|
3503
|
-
/**
|
|
3504
|
-
* Generated factory for {@link MediaValidation} record objects.
|
|
3505
|
-
*/
|
|
3506
|
-
export declare const MediaValidation: Readonly<{
|
|
3507
|
-
create: (partial: Partial<MediaValidation> & Required<Omit<MediaValidation, never>>) => MediaValidation;
|
|
3508
|
-
new: (partial: Partial<MediaValidation> & Required<Omit<MediaValidation, never>>) => MediaValidation;
|
|
3509
|
-
defaults: () => Partial<MediaValidation>;
|
|
3510
|
-
}>;
|
|
3511
|
-
/**
|
|
3512
|
-
* When [`AssetVerifier::verify_asset`] queries the registry.
|
|
3513
|
-
*/
|
|
3514
|
-
export declare enum RecoveryPolicy {
|
|
3515
|
-
/**
|
|
3516
|
-
* When the asset has no embedded manifest or its active manifest is invalid. This includes
|
|
3517
|
-
* stripped assets and invalid manifests, for which C2PA 2.4 permits soft-binding discovery.
|
|
3518
|
-
* A valid embedded manifest costs no registry round trip.
|
|
3519
|
-
*/
|
|
3520
|
-
WhenMissing = 0,
|
|
3521
|
-
/**
|
|
3522
|
-
* On every verify, alongside the embedded manifest, so the two can be compared.
|
|
3523
|
-
*
|
|
3524
|
-
* C2PA 2.4's `watermark-golden` and `fingerprint-golden` flows end on exactly that
|
|
3525
|
-
* comparison, and it is the only thing that catches a manifest SUBSTITUTED under an
|
|
3526
|
-
* untouched mark (use case UC3 in the spec's list, UC2 in ours): the replacement verifies
|
|
3527
|
-
* perfectly on its own, and only disagrees with what the mark actually resolves to.
|
|
3528
|
-
*
|
|
3529
|
-
* It queries the registry on every verify, without making it load-bearing on the asset's own
|
|
3530
|
-
* credential: the flow provides information about a substitution rather than gating the local
|
|
3531
|
-
* manifest, so a registry that cannot be reached leaves [`RecoveryStatus::Incomplete`], the
|
|
3532
|
-
* reason as a [`RecoveryIssue`], and [`GoldenComparison::RecoveryIncomplete`]. A caller for whom a
|
|
3533
|
-
* cross-check that never ran must not pass for agreement branches on that status.
|
|
3534
|
-
*/
|
|
3535
|
-
Always = 1
|
|
3536
|
-
}
|
|
3537
|
-
/**
|
|
3538
|
-
* What one verify may do with the registry. Required whenever a registry is configured.
|
|
3539
|
-
*
|
|
3540
|
-
* One field per Soft Binding Resolution API operation, and an absent one is not called.
|
|
3541
|
-
* `matches/byBinding` is decided by the binders handed to the verify: each is derived and looked
|
|
3542
|
-
* up, all together, and every result is kept. The content forms run after that, each for the
|
|
3543
|
-
* detectors it names, hinted with the first fingerprint the binders derived. Results merge by
|
|
3544
|
-
* manifest; nothing is ranked or dropped.
|
|
3545
|
-
*/
|
|
3546
|
-
export type Recovery = {
|
|
3547
|
-
/**
|
|
3548
|
-
* When the registry is consulted at all.
|
|
3549
|
-
*/
|
|
3550
|
-
when: RecoveryPolicy;
|
|
3551
|
-
/**
|
|
3552
|
-
* `matches/byContent`: the bounded asset bytes travel in the request.
|
|
3553
|
-
*/
|
|
3554
|
-
byContent?: ByContent;
|
|
3555
|
-
/**
|
|
3556
|
-
* `matches/byReference`: the registry fetches the asset from the caller's URL instead, for
|
|
3557
|
-
* an asset above the upload cap.
|
|
3558
|
-
*/
|
|
3559
|
-
byReference?: ByReference;
|
|
3560
|
-
};
|
|
3561
|
-
/**
|
|
3562
|
-
* Generated factory for {@link Recovery} record objects.
|
|
3563
|
-
*/
|
|
3564
|
-
export declare const Recovery: Readonly<{
|
|
3565
|
-
create: (partial: Partial<Recovery> & Required<Omit<Recovery, "byContent" | "byReference">>) => Recovery;
|
|
3566
|
-
new: (partial: Partial<Recovery> & Required<Omit<Recovery, "byContent" | "byReference">>) => Recovery;
|
|
3567
|
-
defaults: () => Partial<Recovery>;
|
|
3616
|
+
defaults: () => Partial<SegmentTiming>;
|
|
3568
3617
|
}>;
|
|
3569
3618
|
/**
|
|
3570
|
-
*
|
|
3571
|
-
* primitives, so a plugin in its OWN UniFFI namespace declares a structurally identical
|
|
3572
|
-
* one and the two cross the boundary without sharing a Rust type.
|
|
3619
|
+
* Outcome of validating a media segment against its stream's init.
|
|
3573
3620
|
*/
|
|
3574
|
-
export type
|
|
3575
|
-
|
|
3576
|
-
|
|
3621
|
+
export type MediaValidation = {
|
|
3622
|
+
valid: boolean;
|
|
3623
|
+
codes: Array<ValidationCode>;
|
|
3624
|
+
keyId: ArrayBuffer;
|
|
3625
|
+
timing: SegmentTiming;
|
|
3626
|
+
manifestId: string;
|
|
3577
3627
|
};
|
|
3578
3628
|
/**
|
|
3579
|
-
* Generated factory for {@link
|
|
3629
|
+
* Generated factory for {@link MediaValidation} record objects.
|
|
3580
3630
|
*/
|
|
3581
|
-
export declare const
|
|
3582
|
-
create: (partial: Partial<
|
|
3583
|
-
new: (partial: Partial<
|
|
3584
|
-
defaults: () => Partial<
|
|
3631
|
+
export declare const MediaValidation: Readonly<{
|
|
3632
|
+
create: (partial: Partial<MediaValidation> & Required<Omit<MediaValidation, never>>) => MediaValidation;
|
|
3633
|
+
new: (partial: Partial<MediaValidation> & Required<Omit<MediaValidation, never>>) => MediaValidation;
|
|
3634
|
+
defaults: () => Partial<MediaValidation>;
|
|
3585
3635
|
}>;
|
|
3586
3636
|
/**
|
|
3587
|
-
*
|
|
3588
|
-
* JS binding). `trust_c2pa_anchors` defaults to `true` when omitted.
|
|
3589
|
-
*
|
|
3590
|
-
* `#[binding]` derives the wasm shape (`trustC2paAnchors` camelCase, optional) and,
|
|
3591
|
-
* with `ffi`, a `uniffi::Record` for the native `StreamVerifier.create` binding, so there
|
|
3592
|
-
* is no per-lane DTO copy. Off both lanes it is a plain struct.
|
|
3637
|
+
* When [`AssetVerifier::verify_asset`] queries the repository.
|
|
3593
3638
|
*/
|
|
3594
|
-
export
|
|
3595
|
-
/**
|
|
3596
|
-
* PEM trust anchors for the caller's own issuers.
|
|
3597
|
-
*/
|
|
3598
|
-
trustAnchors: Array<string>;
|
|
3599
|
-
/**
|
|
3600
|
-
* Also trust the bundled official C2PA anchors on top of `trust_anchors`.
|
|
3601
|
-
* Defaults to `true`; set `false` to trust only `trust_anchors`.
|
|
3602
|
-
*/
|
|
3603
|
-
trustC2paAnchors?: boolean;
|
|
3639
|
+
export declare enum RecoveryPolicy {
|
|
3604
3640
|
/**
|
|
3605
|
-
*
|
|
3606
|
-
*
|
|
3607
|
-
*
|
|
3608
|
-
* `cawg.ica.untrusted_issuer` and withholds `cawg.ica.credential_valid`.
|
|
3641
|
+
* When the asset has no embedded manifest or its active manifest is invalid. This includes
|
|
3642
|
+
* stripped assets and invalid manifests, for which C2PA 2.4 permits soft-binding discovery.
|
|
3643
|
+
* A valid embedded manifest costs no repository round trip.
|
|
3609
3644
|
*/
|
|
3610
|
-
|
|
3645
|
+
WhenMissing = 0,
|
|
3611
3646
|
/**
|
|
3612
|
-
*
|
|
3613
|
-
*
|
|
3614
|
-
*
|
|
3647
|
+
* On every verify, alongside the embedded manifest, so the two can be compared.
|
|
3648
|
+
*
|
|
3649
|
+
* C2PA 2.4's `watermark-golden` and `fingerprint-golden` flows end on exactly that
|
|
3650
|
+
* comparison, and it is the only thing that catches a manifest SUBSTITUTED under an
|
|
3651
|
+
* untouched mark (use case UC3 in the spec's list, UC2 in ours): the replacement verifies
|
|
3652
|
+
* perfectly on its own, and only disagrees with what the mark actually resolves to.
|
|
3653
|
+
*
|
|
3654
|
+
* It queries the repository on every verify, without making it load-bearing on the asset's own
|
|
3655
|
+
* credential: the flow provides information about a substitution rather than gating the local
|
|
3656
|
+
* manifest, so a repository that cannot be reached leaves [`RecoveryStatus::Incomplete`], the
|
|
3657
|
+
* reason as a [`RecoveryIssue`], and [`GoldenComparison::RecoveryIncomplete`]. A caller for whom a
|
|
3658
|
+
* cross-check that never ran must not pass for agreement branches on that status.
|
|
3615
3659
|
*/
|
|
3616
|
-
|
|
3617
|
-
}
|
|
3618
|
-
/**
|
|
3619
|
-
* Generated factory for {@link StreamVerifierOptions} record objects.
|
|
3620
|
-
*/
|
|
3621
|
-
export declare const StreamVerifierOptions: Readonly<{
|
|
3622
|
-
create: (partial: Partial<StreamVerifierOptions> & Required<Omit<StreamVerifierOptions, "segmentSkewToleranceSecs" | "trustC2paAnchors" | "trustedIcaIssuers">>) => StreamVerifierOptions;
|
|
3623
|
-
new: (partial: Partial<StreamVerifierOptions> & Required<Omit<StreamVerifierOptions, "segmentSkewToleranceSecs" | "trustC2paAnchors" | "trustedIcaIssuers">>) => StreamVerifierOptions;
|
|
3624
|
-
defaults: () => Partial<StreamVerifierOptions>;
|
|
3625
|
-
}>;
|
|
3660
|
+
Always = 1
|
|
3661
|
+
}
|
|
3626
3662
|
/**
|
|
3627
3663
|
* A canonical gRPC/Connect status code: the coarse, closed failure class.
|
|
3628
3664
|
*
|
|
@@ -4047,189 +4083,122 @@ export declare class RangeSourceImpl extends UniffiAbstractObject implements Ran
|
|
|
4047
4083
|
static instanceOf(obj_: any): obj_ is RangeSourceImpl;
|
|
4048
4084
|
}
|
|
4049
4085
|
/**
|
|
4050
|
-
* A soft-binding binder: how a recoverable binding is derived from an asset. Put these inside
|
|
4051
|
-
* issuer's manifest mode to sign and index under them, and pass them in verify options to
|
|
4086
|
+
* A soft-binding binder: how a recoverable binding is derived from an asset. Put these inside
|
|
4087
|
+
* the issuer's manifest mode to sign and index under them, and pass them in verify options to
|
|
4088
|
+
* recover. Implement it for an algorithm the SDK does not ship; the SDK's own are
|
|
4089
|
+
* [`IsccBinder`] and [`HeldBinder`].
|
|
4090
|
+
*
|
|
4091
|
+
* `derive` answers this binder's binding for `source`, or `None` when there is none.
|
|
4092
|
+
* `options.format` is how the asset's format is known. `None` and an error
|
|
4093
|
+
* mean different things: `None` is "no binding here", an error is "the question could not be
|
|
4094
|
+
* answered", so a binder that failed never reads as an unmarked asset.
|
|
4052
4095
|
*/
|
|
4053
|
-
export interface
|
|
4054
|
-
/**
|
|
4055
|
-
* This binder's binding for `source`, or `None` when there is none. `format` overrides
|
|
4056
|
-
* the format sniffed from the leading bytes.
|
|
4057
|
-
*
|
|
4058
|
-
* `None` and an error mean different things: `None` is "no binding here", an error is
|
|
4059
|
-
* "the question could not be answered", so a binder that failed never reads as an
|
|
4060
|
-
* unmarked asset.
|
|
4061
|
-
*
|
|
4062
|
-
* # Errors
|
|
4063
|
-
*
|
|
4064
|
-
* An unreadable source, or a binder that could not answer.
|
|
4065
|
-
*/
|
|
4096
|
+
export interface Binder {
|
|
4066
4097
|
derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
|
|
4067
4098
|
signal: AbortSignal;
|
|
4068
4099
|
}): Promise<SoftBinding | undefined>;
|
|
4069
4100
|
}
|
|
4070
4101
|
/**
|
|
4071
|
-
*
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
*
|
|
4076
|
-
*
|
|
4102
|
+
* A soft-binding binder: how a recoverable binding is derived from an asset. Put these inside
|
|
4103
|
+
* the issuer's manifest mode to sign and index under them, and pass them in verify options to
|
|
4104
|
+
* recover. Implement it for an algorithm the SDK does not ship; the SDK's own are
|
|
4105
|
+
* [`IsccBinder`] and [`HeldBinder`].
|
|
4106
|
+
*
|
|
4107
|
+
* `derive` answers this binder's binding for `source`, or `None` when there is none.
|
|
4108
|
+
* `options.format` is how the asset's format is known. `None` and an error
|
|
4109
|
+
* mean different things: `None` is "no binding here", an error is "the question could not be
|
|
4110
|
+
* answered", so a binder that failed never reads as an unmarked asset.
|
|
4077
4111
|
*/
|
|
4078
|
-
export declare class
|
|
4079
|
-
readonly [uniffiTypeNameSymbol] = "
|
|
4112
|
+
export declare class BinderImpl extends UniffiAbstractObject implements Binder {
|
|
4113
|
+
readonly [uniffiTypeNameSymbol] = "BinderImpl";
|
|
4080
4114
|
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
4081
4115
|
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
4082
4116
|
private constructor();
|
|
4083
|
-
/**
|
|
4084
|
-
* A caller-supplied binder for a soft-binding algorithm not built into the SDK.
|
|
4085
|
-
*/
|
|
4086
|
-
static custom(plugin: BinderPlugin): BinderLike;
|
|
4087
|
-
/**
|
|
4088
|
-
* A binding you already hold, such as an out-of-band video ISCC. Reads nothing.
|
|
4089
|
-
*/
|
|
4090
|
-
static held(binding: SoftBinding): BinderLike;
|
|
4091
|
-
/**
|
|
4092
|
-
* Local ISCC Image-Code for supported image formats.
|
|
4093
|
-
*/
|
|
4094
|
-
static iscc(): BinderLike;
|
|
4095
|
-
/**
|
|
4096
|
-
* This binder's binding for `source`, or `None` when there is none. `format` overrides
|
|
4097
|
-
* the format sniffed from the leading bytes.
|
|
4098
|
-
*
|
|
4099
|
-
* `None` and an error mean different things: `None` is "no binding here", an error is
|
|
4100
|
-
* "the question could not be answered", so a binder that failed never reads as an
|
|
4101
|
-
* unmarked asset.
|
|
4102
|
-
*
|
|
4103
|
-
* # Errors
|
|
4104
|
-
*
|
|
4105
|
-
* An unreadable source, or a binder that could not answer.
|
|
4106
|
-
*/
|
|
4107
4117
|
derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
|
|
4108
4118
|
signal: AbortSignal;
|
|
4109
4119
|
}): Promise<SoftBinding | undefined>;
|
|
4110
4120
|
uniffiDestroy(): void;
|
|
4111
|
-
static instanceOf(obj_: any): obj_ is
|
|
4121
|
+
static instanceOf(obj_: any): obj_ is BinderImpl;
|
|
4112
4122
|
}
|
|
4113
4123
|
/**
|
|
4114
|
-
*
|
|
4115
|
-
*
|
|
4116
|
-
*
|
|
4117
|
-
* Every method is given the asset as a [`RangeSource`], so a plugin never opens its own
|
|
4118
|
-
* view and the bytes it parses are the bytes the core hashes.
|
|
4124
|
+
* What one [`AssetVerifier::verify`] may do to recover a manifest: the binders this client
|
|
4125
|
+
* derives for itself, decided into `matches/byBinding`, and one field per content operation,
|
|
4126
|
+
* absent when not to be called. It needs a configured repository and at least one query.
|
|
4119
4127
|
*/
|
|
4120
|
-
export
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
/**
|
|
4127
|
-
* Recognize the format from the real asset, or `None` to decline it.
|
|
4128
|
-
*/
|
|
4129
|
-
sniff(src: RangeSource, asyncOpts_?: {
|
|
4130
|
-
signal: AbortSignal;
|
|
4131
|
-
}): Promise<string | undefined>;
|
|
4132
|
-
/**
|
|
4133
|
-
* The manifest window(s), or empty when none is present. MUST be byte-identical
|
|
4134
|
-
* regardless of slot contents (empty at sign, filled after embed, zeroed after strip).
|
|
4135
|
-
*/
|
|
4136
|
-
locate(src: RangeSource, asyncOpts_?: {
|
|
4137
|
-
signal: AbortSignal;
|
|
4138
|
-
}): Promise<Array<Region>>;
|
|
4139
|
-
}
|
|
4128
|
+
export type Recovery = {
|
|
4129
|
+
when: RecoveryPolicy;
|
|
4130
|
+
binders: Array<Binder>;
|
|
4131
|
+
byContent?: ByContent;
|
|
4132
|
+
byReference?: ByReference;
|
|
4133
|
+
};
|
|
4140
4134
|
/**
|
|
4141
|
-
*
|
|
4142
|
-
* the module docs for why a plain sequence of foreign objects cannot cross today.
|
|
4135
|
+
* Generated factory for {@link Recovery} record objects.
|
|
4143
4136
|
*/
|
|
4144
|
-
export
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
*
|
|
4150
|
-
* `Internal` when the registry lock was poisoned by a panicking plugin.
|
|
4151
|
-
*/
|
|
4152
|
-
isEmpty(): boolean;
|
|
4153
|
-
/**
|
|
4154
|
-
* How many plugins are registered.
|
|
4155
|
-
*
|
|
4156
|
-
* # Errors
|
|
4157
|
-
*
|
|
4158
|
-
* `Internal` when the registry lock was poisoned by a panicking plugin.
|
|
4159
|
-
*/
|
|
4160
|
-
len(): number;
|
|
4161
|
-
/**
|
|
4162
|
-
* Add one plugin. The first registered whose `sniff` hits owns the asset; `c2pa`
|
|
4163
|
-
* remains the built-in fallback when none does. Verifying dispatches on content, not on
|
|
4164
|
-
* a declared format: there is no trustworthy declaration at verify time.
|
|
4165
|
-
*
|
|
4166
|
-
* # Errors
|
|
4167
|
-
*
|
|
4168
|
-
* `Internal` when the registry lock was poisoned by a panicking plugin.
|
|
4169
|
-
*/
|
|
4170
|
-
register(plugin: PluginRead): void;
|
|
4171
|
-
}
|
|
4137
|
+
export declare const Recovery: Readonly<{
|
|
4138
|
+
create: (partial: Partial<Recovery> & Required<Omit<Recovery, "byContent" | "byReference">>) => Recovery;
|
|
4139
|
+
new: (partial: Partial<Recovery> & Required<Omit<Recovery, "byContent" | "byReference">>) => Recovery;
|
|
4140
|
+
defaults: () => Partial<Recovery>;
|
|
4141
|
+
}>;
|
|
4172
4142
|
/**
|
|
4173
|
-
*
|
|
4143
|
+
* A byte range holding a bare C2PA manifest store, or reserved for one. A record of
|
|
4144
|
+
* primitives, so a plugin in its OWN UniFFI namespace declares a structurally identical
|
|
4145
|
+
* one and the two cross the boundary without sharing a Rust type.
|
|
4174
4146
|
*/
|
|
4175
|
-
export type
|
|
4147
|
+
export type Region = {
|
|
4148
|
+
offset: bigint;
|
|
4149
|
+
length: bigint;
|
|
4150
|
+
};
|
|
4176
4151
|
/**
|
|
4177
|
-
*
|
|
4178
|
-
* the module docs for why a plain sequence of foreign objects cannot cross today.
|
|
4152
|
+
* Generated factory for {@link Region} record objects.
|
|
4179
4153
|
*/
|
|
4180
|
-
export declare
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4154
|
+
export declare const Region: Readonly<{
|
|
4155
|
+
create: (partial: Partial<Region> & Required<Omit<Region, never>>) => Region;
|
|
4156
|
+
new: (partial: Partial<Region> & Required<Omit<Region, never>>) => Region;
|
|
4157
|
+
defaults: () => Partial<Region>;
|
|
4158
|
+
}>;
|
|
4159
|
+
/**
|
|
4160
|
+
* Construction options for [`StreamVerifier::new`] (and the `StreamVerifier.create`
|
|
4161
|
+
* JS binding). Every field is stated: nothing here is chosen on the caller's behalf.
|
|
4162
|
+
*
|
|
4163
|
+
* `#[binding]` derives the wasm shape (`trustC2paAnchors` camelCase) and,
|
|
4164
|
+
* with `ffi`, a `uniffi::Record` for the native `StreamVerifier.create` binding, so there
|
|
4165
|
+
* is no per-lane DTO copy. Off both lanes it is a plain struct.
|
|
4166
|
+
*/
|
|
4167
|
+
export type StreamVerifierOptions = {
|
|
4185
4168
|
/**
|
|
4186
|
-
*
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
*
|
|
4169
|
+
* PEM trust anchors for the manifest signers the caller trusts.
|
|
4170
|
+
*/
|
|
4171
|
+
trustAnchors: Array<string>;
|
|
4172
|
+
/**
|
|
4173
|
+
* PEM trust anchors for the time-stamping authorities the caller trusts.
|
|
4191
4174
|
*/
|
|
4192
|
-
|
|
4175
|
+
tsaTrustAnchors: Array<string>;
|
|
4193
4176
|
/**
|
|
4194
|
-
*
|
|
4195
|
-
*
|
|
4196
|
-
* # Errors
|
|
4197
|
-
*
|
|
4198
|
-
* `Internal` when the registry lock was poisoned by a panicking plugin.
|
|
4177
|
+
* Also trust the bundled official C2PA anchors, manifest and TSA lists, beside the
|
|
4178
|
+
* caller's. `false` trusts the caller's lists alone.
|
|
4199
4179
|
*/
|
|
4200
|
-
|
|
4180
|
+
trustC2paAnchors: boolean;
|
|
4201
4181
|
/**
|
|
4202
|
-
*
|
|
4203
|
-
*
|
|
4204
|
-
*
|
|
4205
|
-
*
|
|
4206
|
-
* # Errors
|
|
4207
|
-
*
|
|
4208
|
-
* `Internal` when the registry lock was poisoned by a panicking plugin.
|
|
4182
|
+
* Issuer DIDs whose CAWG identity (ICA) credentials count as validated, matched
|
|
4183
|
+
* exactly against the credential issuer. Empty trusts no issuer: an identity assertion
|
|
4184
|
+
* on the init segment's manifest then reports `cawg.ica.untrusted_issuer` and withholds
|
|
4185
|
+
* `cawg.ica.credential_valid`.
|
|
4209
4186
|
*/
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
* `recovery` is required when the verifier has a registry and absent for embedded-only
|
|
4218
|
-
* verification. `plugins` carries caller plugins for non-c2pa formats (e.g. MXF); a built-in
|
|
4219
|
-
* C2PA media format needs none.
|
|
4220
|
-
*/
|
|
4221
|
-
export type VerifyOptions = {
|
|
4222
|
-
binders: Array<BinderLike>;
|
|
4223
|
-
recovery?: Recovery;
|
|
4224
|
-
plugins?: PluginRegistryLike;
|
|
4187
|
+
trustedIcaIssuers: Array<string>;
|
|
4188
|
+
/**
|
|
4189
|
+
* How far a segment's timestamp may sit from wall-clock before it is rejected as
|
|
4190
|
+
* skewed, in seconds: the deployment's own encoder-clock allowance, stated rather than
|
|
4191
|
+
* assumed.
|
|
4192
|
+
*/
|
|
4193
|
+
segmentSkewToleranceSecs: bigint;
|
|
4225
4194
|
};
|
|
4226
4195
|
/**
|
|
4227
|
-
* Generated factory for {@link
|
|
4196
|
+
* Generated factory for {@link StreamVerifierOptions} record objects.
|
|
4228
4197
|
*/
|
|
4229
|
-
export declare const
|
|
4230
|
-
create: (partial: Partial<
|
|
4231
|
-
new: (partial: Partial<
|
|
4232
|
-
defaults: () => Partial<
|
|
4198
|
+
export declare const StreamVerifierOptions: Readonly<{
|
|
4199
|
+
create: (partial: Partial<StreamVerifierOptions> & Required<Omit<StreamVerifierOptions, never>>) => StreamVerifierOptions;
|
|
4200
|
+
new: (partial: Partial<StreamVerifierOptions> & Required<Omit<StreamVerifierOptions, never>>) => StreamVerifierOptions;
|
|
4201
|
+
defaults: () => Partial<StreamVerifierOptions>;
|
|
4233
4202
|
}>;
|
|
4234
4203
|
export declare enum SegmentValidation_Tags {
|
|
4235
4204
|
Init = "Init",
|
|
@@ -4330,24 +4299,52 @@ export declare const SegmentValidation: Readonly<{
|
|
|
4330
4299
|
* Result of `StreamValidation.validate`.
|
|
4331
4300
|
*/
|
|
4332
4301
|
export type SegmentValidation = InstanceType<typeof SegmentValidation['Init' | 'Media' | 'Unknown']>;
|
|
4302
|
+
/**
|
|
4303
|
+
* The read surface a plugin implements. Implemented by the CALLER, in Rust
|
|
4304
|
+
* behind its own cdylib or directly in the host language, and handed to `verify`.
|
|
4305
|
+
*
|
|
4306
|
+
* Every method is given the asset as a [`RangeSource`], so a plugin never opens its own
|
|
4307
|
+
* view and the bytes it parses are the bytes the core hashes.
|
|
4308
|
+
*/
|
|
4309
|
+
export interface PluginRead {
|
|
4310
|
+
/**
|
|
4311
|
+
* The media types this plugin owns: its dispatch set, declared as data. The core
|
|
4312
|
+
* asserts a [`sniff`](Self::sniff) result is a member of this list.
|
|
4313
|
+
*/
|
|
4314
|
+
mediaTypes(): Array<string>;
|
|
4315
|
+
/**
|
|
4316
|
+
* Recognize the format from the real asset, or `None` to decline it.
|
|
4317
|
+
*/
|
|
4318
|
+
sniff(src: RangeSource, asyncOpts_?: {
|
|
4319
|
+
signal: AbortSignal;
|
|
4320
|
+
}): Promise<string | undefined>;
|
|
4321
|
+
/**
|
|
4322
|
+
* The manifest window(s), or empty when none is present. MUST be byte-identical
|
|
4323
|
+
* regardless of slot contents (empty at sign, filled after embed, zeroed after strip).
|
|
4324
|
+
*/
|
|
4325
|
+
locate(src: RangeSource, asyncOpts_?: {
|
|
4326
|
+
signal: AbortSignal;
|
|
4327
|
+
}): Promise<Array<Region>>;
|
|
4328
|
+
}
|
|
4333
4329
|
/**
|
|
4334
4330
|
* A C2PA asset verifier bound to a trust configuration. Construct once, verify many.
|
|
4335
4331
|
*/
|
|
4336
4332
|
export interface AssetVerifierLike {
|
|
4337
4333
|
/**
|
|
4338
|
-
* Verify an asset from a [`RangeSource`]
|
|
4339
|
-
*
|
|
4340
|
-
* plugins for non-c2pa formats (e.g. MXF)
|
|
4341
|
-
* built-in C2PA media format. The SDK links no plugin itself.
|
|
4342
|
-
* credentials plus typed recovery and golden-comparison
|
|
4334
|
+
* Verify an asset from a [`RangeSource`]. `recovery` is what this verify may do to recover
|
|
4335
|
+
* a manifest, or nothing: then the asset is read for what it carries and no repository is
|
|
4336
|
+
* asked. `plugins` are the caller's plugins for non-c2pa formats (e.g. MXF), in dispatch
|
|
4337
|
+
* order; an empty list is a built-in C2PA media format. The SDK links no plugin itself.
|
|
4338
|
+
* Returns embedded/recovered credentials plus typed recovery and golden-comparison
|
|
4339
|
+
* outcomes.
|
|
4343
4340
|
*
|
|
4344
4341
|
* # Errors
|
|
4345
4342
|
*
|
|
4346
|
-
* `READER_INVALID` when the source can't be read/parsed, or a
|
|
4347
|
-
* involving the asset backend,
|
|
4343
|
+
* `READER_INVALID` when the source can't be read/parsed, or a repository failure
|
|
4344
|
+
* involving the asset backend, repository, or a fetched manifest. Local binder faults,
|
|
4348
4345
|
* refused queries, and skipped oversized uploads are retained in the recovery summary.
|
|
4349
4346
|
*/
|
|
4350
|
-
verify(source: RangeSource,
|
|
4347
|
+
verify(source: RangeSource, recovery: Recovery | undefined, plugins: Array<PluginRead>, asyncOpts_?: {
|
|
4351
4348
|
signal: AbortSignal;
|
|
4352
4349
|
}): Promise<AssetVerification>;
|
|
4353
4350
|
}
|
|
@@ -4372,19 +4369,20 @@ export declare class AssetVerifier extends UniffiAbstractObject implements Asset
|
|
|
4372
4369
|
*/
|
|
4373
4370
|
static create(options: AssetVerifierOptions): AssetVerifierLike;
|
|
4374
4371
|
/**
|
|
4375
|
-
* Verify an asset from a [`RangeSource`]
|
|
4376
|
-
*
|
|
4377
|
-
* plugins for non-c2pa formats (e.g. MXF)
|
|
4378
|
-
* built-in C2PA media format. The SDK links no plugin itself.
|
|
4379
|
-
* credentials plus typed recovery and golden-comparison
|
|
4372
|
+
* Verify an asset from a [`RangeSource`]. `recovery` is what this verify may do to recover
|
|
4373
|
+
* a manifest, or nothing: then the asset is read for what it carries and no repository is
|
|
4374
|
+
* asked. `plugins` are the caller's plugins for non-c2pa formats (e.g. MXF), in dispatch
|
|
4375
|
+
* order; an empty list is a built-in C2PA media format. The SDK links no plugin itself.
|
|
4376
|
+
* Returns embedded/recovered credentials plus typed recovery and golden-comparison
|
|
4377
|
+
* outcomes.
|
|
4380
4378
|
*
|
|
4381
4379
|
* # Errors
|
|
4382
4380
|
*
|
|
4383
|
-
* `READER_INVALID` when the source can't be read/parsed, or a
|
|
4384
|
-
* involving the asset backend,
|
|
4381
|
+
* `READER_INVALID` when the source can't be read/parsed, or a repository failure
|
|
4382
|
+
* involving the asset backend, repository, or a fetched manifest. Local binder faults,
|
|
4385
4383
|
* refused queries, and skipped oversized uploads are retained in the recovery summary.
|
|
4386
4384
|
*/
|
|
4387
|
-
verify(source: RangeSource,
|
|
4385
|
+
verify(source: RangeSource, recovery: Recovery | undefined, plugins: Array<PluginRead>, asyncOpts_?: {
|
|
4388
4386
|
signal: AbortSignal;
|
|
4389
4387
|
}): Promise<AssetVerification>;
|
|
4390
4388
|
uniffiDestroy(): void;
|
|
@@ -4456,6 +4454,63 @@ export declare class FileSource extends UniffiAbstractObject implements FileSour
|
|
|
4456
4454
|
uniffiDestroy(): void;
|
|
4457
4455
|
static instanceOf(obj_: any): obj_ is FileSource;
|
|
4458
4456
|
}
|
|
4457
|
+
/**
|
|
4458
|
+
* A binding you already hold, such as an out-of-band video ISCC. Reads nothing.
|
|
4459
|
+
*/
|
|
4460
|
+
export interface HeldBinderLike {
|
|
4461
|
+
derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
|
|
4462
|
+
signal: AbortSignal;
|
|
4463
|
+
}): Promise<SoftBinding | undefined>;
|
|
4464
|
+
}
|
|
4465
|
+
/**
|
|
4466
|
+
* @deprecated Use `HeldBinderLike` instead.
|
|
4467
|
+
*/
|
|
4468
|
+
export type HeldBinderInterface = HeldBinderLike;
|
|
4469
|
+
/**
|
|
4470
|
+
* A binding you already hold, such as an out-of-band video ISCC. Reads nothing.
|
|
4471
|
+
*/
|
|
4472
|
+
export declare class HeldBinder extends UniffiAbstractObject implements HeldBinderLike {
|
|
4473
|
+
readonly [uniffiTypeNameSymbol] = "HeldBinder";
|
|
4474
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
4475
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
4476
|
+
/**
|
|
4477
|
+
* # Errors
|
|
4478
|
+
*
|
|
4479
|
+
* A binding with an empty algorithm or value.
|
|
4480
|
+
*/
|
|
4481
|
+
constructor(binding: SoftBinding);
|
|
4482
|
+
derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
|
|
4483
|
+
signal: AbortSignal;
|
|
4484
|
+
}): Promise<SoftBinding | undefined>;
|
|
4485
|
+
uniffiDestroy(): void;
|
|
4486
|
+
static instanceOf(obj_: any): obj_ is HeldBinder;
|
|
4487
|
+
}
|
|
4488
|
+
/**
|
|
4489
|
+
* Local ISCC Image-Code for supported image formats.
|
|
4490
|
+
*/
|
|
4491
|
+
export interface IsccBinderLike {
|
|
4492
|
+
derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
|
|
4493
|
+
signal: AbortSignal;
|
|
4494
|
+
}): Promise<SoftBinding | undefined>;
|
|
4495
|
+
}
|
|
4496
|
+
/**
|
|
4497
|
+
* @deprecated Use `IsccBinderLike` instead.
|
|
4498
|
+
*/
|
|
4499
|
+
export type IsccBinderInterface = IsccBinderLike;
|
|
4500
|
+
/**
|
|
4501
|
+
* Local ISCC Image-Code for supported image formats.
|
|
4502
|
+
*/
|
|
4503
|
+
export declare class IsccBinder extends UniffiAbstractObject implements IsccBinderLike {
|
|
4504
|
+
readonly [uniffiTypeNameSymbol] = "IsccBinder";
|
|
4505
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
4506
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
4507
|
+
constructor();
|
|
4508
|
+
derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
|
|
4509
|
+
signal: AbortSignal;
|
|
4510
|
+
}): Promise<SoftBinding | undefined>;
|
|
4511
|
+
uniffiDestroy(): void;
|
|
4512
|
+
static instanceOf(obj_: any): obj_ is IsccBinder;
|
|
4513
|
+
}
|
|
4459
4514
|
/**
|
|
4460
4515
|
* An in-memory [`RangeSource`], for a caller that already holds the whole asset as
|
|
4461
4516
|
* bytes and doesn't want to write a custom source. A **native** implementation of a
|
|
@@ -4671,19 +4726,6 @@ export declare class StreamVerifier extends UniffiAbstractObject implements Stre
|
|
|
4671
4726
|
uniffiDestroy(): void;
|
|
4672
4727
|
static instanceOf(obj_: any): obj_ is StreamVerifier;
|
|
4673
4728
|
}
|
|
4674
|
-
/**
|
|
4675
|
-
* A caller-supplied soft-binding implementation.
|
|
4676
|
-
*
|
|
4677
|
-
* This is the extension point for algorithms the SDK does not ship. The callback receives the
|
|
4678
|
-
* same ranged asset source and resolved media type as the built-in binders and may return no
|
|
4679
|
-
* binding when the algorithm does not apply. The returned `alg` identifies the C2PA algorithm
|
|
4680
|
-
* used by the caller's recovery plan and registry index.
|
|
4681
|
-
*/
|
|
4682
|
-
export interface BinderPlugin {
|
|
4683
|
-
derive(source: RangeSource, format: string, asyncOpts_?: {
|
|
4684
|
-
signal: AbortSignal;
|
|
4685
|
-
}): Promise<SoftBinding | undefined>;
|
|
4686
|
-
}
|
|
4687
4729
|
/**
|
|
4688
4730
|
* This should be called before anything else.
|
|
4689
4731
|
*
|
|
@@ -4712,6 +4754,13 @@ declare const _default$1: Readonly<{
|
|
|
4712
4754
|
lift(value: UniffiByteArray): AssertionMetadata;
|
|
4713
4755
|
lower(value: AssertionMetadata, alloc: RustBufferAllocator): UniffiByteArray;
|
|
4714
4756
|
};
|
|
4757
|
+
FfiConverterTypeAssetFormat: {
|
|
4758
|
+
readFromCursor(c: Cursor): AssetFormat;
|
|
4759
|
+
writeIntoCursor(value: AssetFormat, c: Cursor): void;
|
|
4760
|
+
allocationSize(value: AssetFormat): number;
|
|
4761
|
+
lift(value: UniffiByteArray): AssetFormat;
|
|
4762
|
+
lower(value: AssetFormat, alloc: RustBufferAllocator): UniffiByteArray;
|
|
4763
|
+
};
|
|
4715
4764
|
FfiConverterTypeAssetType: {
|
|
4716
4765
|
readFromCursor(c: Cursor): AssetType;
|
|
4717
4766
|
writeIntoCursor(value: AssetType, c: Cursor): void;
|
|
@@ -4734,7 +4783,7 @@ declare const _default$1: Readonly<{
|
|
|
4734
4783
|
lift(value: UniffiByteArray): AssetVerifierOptions;
|
|
4735
4784
|
lower(value: AssetVerifierOptions, alloc: RustBufferAllocator): UniffiByteArray;
|
|
4736
4785
|
};
|
|
4737
|
-
FfiConverterTypeBinder:
|
|
4786
|
+
FfiConverterTypeBinder: FfiConverterObjectWithCallbacks<Binder>;
|
|
4738
4787
|
FfiConverterTypeByContent: {
|
|
4739
4788
|
readFromCursor(c: Cursor): ByContent;
|
|
4740
4789
|
writeIntoCursor(value: ByContent, c: Cursor): void;
|
|
@@ -4805,13 +4854,6 @@ declare const _default$1: Readonly<{
|
|
|
4805
4854
|
lift(value: UniffiByteArray): DeriveOptions;
|
|
4806
4855
|
lower(value: DeriveOptions, alloc: RustBufferAllocator): UniffiByteArray;
|
|
4807
4856
|
};
|
|
4808
|
-
FfiConverterTypeDetectors: {
|
|
4809
|
-
readFromCursor(c: Cursor): Detectors;
|
|
4810
|
-
writeIntoCursor(value: Detectors, c: Cursor): void;
|
|
4811
|
-
allocationSize(value: Detectors): number;
|
|
4812
|
-
lift(value: UniffiByteArray): Detectors;
|
|
4813
|
-
lower(value: Detectors, alloc: RustBufferAllocator): UniffiByteArray;
|
|
4814
|
-
};
|
|
4815
4857
|
FfiConverterTypeEndInclusivity: {
|
|
4816
4858
|
readFromCursor(c: Cursor): EndInclusivity;
|
|
4817
4859
|
writeIntoCursor(value: EndInclusivity, c: Cursor): void;
|
|
@@ -4869,6 +4911,7 @@ declare const _default$1: Readonly<{
|
|
|
4869
4911
|
lift(value: UniffiByteArray): HashedUri;
|
|
4870
4912
|
lower(value: HashedUri, alloc: RustBufferAllocator): UniffiByteArray;
|
|
4871
4913
|
};
|
|
4914
|
+
FfiConverterTypeHeldBinder: FfiConverterObject<HeldBinderLike>;
|
|
4872
4915
|
FfiConverterTypeIngredient: {
|
|
4873
4916
|
readFromCursor(c: Cursor): Ingredient;
|
|
4874
4917
|
writeIntoCursor(value: Ingredient, c: Cursor): void;
|
|
@@ -4890,6 +4933,7 @@ declare const _default$1: Readonly<{
|
|
|
4890
4933
|
lift(value: UniffiByteArray): InitValidation;
|
|
4891
4934
|
lower(value: InitValidation, alloc: RustBufferAllocator): UniffiByteArray;
|
|
4892
4935
|
};
|
|
4936
|
+
FfiConverterTypeIsccBinder: FfiConverterObject<IsccBinderLike>;
|
|
4893
4937
|
FfiConverterTypeItem: {
|
|
4894
4938
|
readFromCursor(c: Cursor): Item;
|
|
4895
4939
|
writeIntoCursor(value: Item, c: Cursor): void;
|
|
@@ -4940,7 +4984,6 @@ declare const _default$1: Readonly<{
|
|
|
4940
4984
|
lower(value: MediaValidation, alloc: RustBufferAllocator): UniffiByteArray;
|
|
4941
4985
|
};
|
|
4942
4986
|
FfiConverterTypeMemorySource: FfiConverterObject<MemorySourceLike>;
|
|
4943
|
-
FfiConverterTypePluginRegistry: FfiConverterObject<PluginRegistryLike>;
|
|
4944
4987
|
FfiConverterTypeRange: {
|
|
4945
4988
|
readFromCursor(c: Cursor): Range;
|
|
4946
4989
|
writeIntoCursor(value: Range, c: Cursor): void;
|
|
@@ -5012,13 +5055,6 @@ declare const _default$1: Readonly<{
|
|
|
5012
5055
|
lift(value: UniffiByteArray): RegionOfInterest;
|
|
5013
5056
|
lower(value: RegionOfInterest, alloc: RustBufferAllocator): UniffiByteArray;
|
|
5014
5057
|
};
|
|
5015
|
-
FfiConverterTypeRegistryOptions: {
|
|
5016
|
-
readFromCursor(c: Cursor): RegistryOptions;
|
|
5017
|
-
writeIntoCursor(value: RegistryOptions, c: Cursor): void;
|
|
5018
|
-
allocationSize(value: RegistryOptions): number;
|
|
5019
|
-
lift(value: UniffiByteArray): RegistryOptions;
|
|
5020
|
-
lower(value: RegistryOptions, alloc: RustBufferAllocator): UniffiByteArray;
|
|
5021
|
-
};
|
|
5022
5058
|
FfiConverterTypeRelationship: {
|
|
5023
5059
|
readFromCursor(c: Cursor): Relationship;
|
|
5024
5060
|
writeIntoCursor(value: Relationship, c: Cursor): void;
|
|
@@ -5026,6 +5062,13 @@ declare const _default$1: Readonly<{
|
|
|
5026
5062
|
lift(value: UniffiByteArray): Relationship;
|
|
5027
5063
|
lower(value: Relationship, alloc: RustBufferAllocator): UniffiByteArray;
|
|
5028
5064
|
};
|
|
5065
|
+
FfiConverterTypeRepository: {
|
|
5066
|
+
readFromCursor(c: Cursor): Repository;
|
|
5067
|
+
writeIntoCursor(value: Repository, c: Cursor): void;
|
|
5068
|
+
allocationSize(value: Repository): number;
|
|
5069
|
+
lift(value: UniffiByteArray): Repository;
|
|
5070
|
+
lower(value: Repository, alloc: RustBufferAllocator): UniffiByteArray;
|
|
5071
|
+
};
|
|
5029
5072
|
FfiConverterTypeResourceRef: {
|
|
5030
5073
|
readFromCursor(c: Cursor): ResourceRef;
|
|
5031
5074
|
writeIntoCursor(value: ResourceRef, c: Cursor): void;
|
|
@@ -5226,13 +5269,6 @@ declare const _default$1: Readonly<{
|
|
|
5226
5269
|
lift(value: UniffiByteArray): VerdictRule;
|
|
5227
5270
|
lower(value: VerdictRule, alloc: RustBufferAllocator): UniffiByteArray;
|
|
5228
5271
|
};
|
|
5229
|
-
FfiConverterTypeVerifyOptions: {
|
|
5230
|
-
readFromCursor(c: Cursor): VerifyOptions;
|
|
5231
|
-
writeIntoCursor(value: VerifyOptions, c: Cursor): void;
|
|
5232
|
-
allocationSize(value: VerifyOptions): number;
|
|
5233
|
-
lift(value: UniffiByteArray): VerifyOptions;
|
|
5234
|
-
lower(value: VerifyOptions, alloc: RustBufferAllocator): UniffiByteArray;
|
|
5235
|
-
};
|
|
5236
5272
|
};
|
|
5237
5273
|
}>;
|
|
5238
5274
|
//#endregion
|