@trylimbo/sdk-issuer 0.2.24 → 0.2.25-canary.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -181,13 +181,12 @@ declare const pointerLiteralSymbol: unique symbol;
181
181
  */
182
182
  declare const uniffiTypeNameSymbol: unique symbol;
183
183
  declare namespace trylimbo_issuer_d_exports {
184
- export { Action, ActionDetail, ActionKind, ActionKind_Tags, Action_Tags, Assertion, AssetDelivery, AssetDelivery_Tags, AssetFormat, AssetFormat_Tags, AssetIssuer, AssetIssuerInterface, AssetIssuerLike, AssetManifestSpec, AssetMarker, AssetMarkerInterface, AssetMarkerLike, AssetOrigin, AssetOrigin_Tags, Binder, BinderImpl, Code, Component, ComponentEvent, ComponentEvent_Tags, ConnectOptions, CreatedOrigin, CustomAction, DeriveOptions, EmbedOptions, FieldViolation, FileSink, FileSinkInterface, FileSinkLike, FileSource, FileSourceInterface, FileSourceLike, HeldBinder, HeldBinderInterface, HeldBinderLike, Identity, Ingredient, IngredientSource, IngredientSource_Tags, InitOptions, InitOutcome, IsccBinder, IsccBinderInterface, IsccBinderLike, JsonObject, JsonValue, MarkOptions, MarkOutcome, MemorySink, MemorySinkInterface, MemorySinkLike, MemorySource, MemorySourceInterface, MemorySourceLike, OpenedOrigin, Origin, Origin_Tags, PluginAuthor, RangeSink, RangeSinkImpl, RangeSource, RangeSourceImpl, Region, RotationPolicy, SdkError, SdkError_Tags, SegmentKind, SegmentOutcome, SignOptions, SignOutcome, SignOutput, SignOutput_Tags, SignerClient, SignerClientInterface, SignerClientLike, SigningVault, SoftBinding, StandardAction, StreamDelivery, StreamDelivery_Tags, StreamIssuer, StreamIssuerInterface, StreamIssuerLike, StreamManifestSpec, StreamSession, StreamSessionInterface, StreamSessionLike, StreamStart, Thumbnail, Timestamp, Url, VaultPublicKey, classifySegment, _default$1 as default, embed };
184
+ export { Action, ActionDetail, ActionKind, ActionKind_Tags, Action_Tags, Assertion, AssetDelivery, AssetDelivery_Tags, AssetIssuer, AssetIssuerInterface, AssetIssuerLike, AssetManifestSpec, AssetMarker, AssetMarkerInterface, AssetMarkerLike, AssetOrigin, AssetOrigin_Tags, Block, ByteRange, Code, Component, ComponentEvent, ComponentEvent_Tags, Compute, ComputeImpl, ComputeRequest, ConnectOptions, CreatedOrigin, CustomAction, EmbedOptions, FieldViolation, FileSink, FileSinkInterface, FileSinkLike, FileSource, FileSourceInterface, FileSourceLike, Identity, Ingredient, IngredientKind, IngredientKind_Tags, InitOptions, InitOutcome, JsonObject, JsonValue, MarkOptions, MarkOutcome, MemorySink, MemorySinkInterface, MemorySinkLike, MemorySource, MemorySourceInterface, MemorySourceLike, MintRequest, OpenedOrigin, PluginAuthor, RangeSink, RangeSinkImpl, RangeSource, RangeSourceImpl, RotationPolicy, Scope, SdkError, SdkError_Tags, SegmentKind, SegmentOutcome, SessionKey, SignOptions, SignOutcome, SignOutput, SignOutput_Tags, SignerClient, SignerClientInterface, SignerClientLike, SigningVault, SoftBinding, SoftBindingSource, SoftBindingSource_Tags, SoftwareAgent, StandardAction, StreamDelivery, StreamIssuer, StreamIssuerInterface, StreamIssuerLike, StreamManifestSpec, StreamOrigin, StreamOrigin_Tags, StreamSession, StreamSessionInterface, StreamSessionLike, StreamStart, Thumbnail, Timespan, Url, classifySegment, computeSoftBinding, _default$1 as default, embed };
185
185
  }
186
186
  /**
187
- * Classify a fragmented-MP4 segment from a [`RangeSource`] as init/media/unknown: the
188
- * SDK-owned box parse (`moov` vs `moof`) a streaming consumer uses to route each segment
189
- * to [`StreamIssuer::init`](stream::StreamIssuer::init) vs
190
- * [`StreamSession::sign`](stream::StreamSession::sign) without hand-parsing ISOBMFF itself.
187
+ * Classify a fragmented-MP4 segment as init, media or unknown (`moov` vs `moof`), so a streaming
188
+ * consumer routes each segment to `StreamIssuer.init` or `StreamSession.sign` without parsing
189
+ * ISOBMFF itself.
191
190
  *
192
191
  * Async because it reads, and reading is the caller's storage: the two windows below may each
193
192
  * be a round trip. It stays off the island, uniquely among the read-path entry points, because
@@ -202,22 +201,22 @@ export declare function classifySegment(source: RangeSource, asyncOpts_?: {
202
201
  signal: AbortSignal;
203
202
  }): Promise<SegmentKind>;
204
203
  /**
205
- * Embed a signed manifest into an asset, writing the composed result back through
206
- * `sink`. `plugins` are the caller's plugins for non-c2pa formats (e.g. MXF), in dispatch
207
- * order, resolved the same way [`AssetIssuer::sign`](asset::AssetIssuer::sign) resolves
208
- * them, per [the `plugins` contract](crate::asset#the-plugins-contract): the write lands on a
209
- * bounded region for a plugin match, on the whole (small) asset otherwise; an empty list is
210
- * a c2pa-native embed. `format` overrides the sniffed format. Pure local byte-wrangling: no
211
- * signer round-trip.
204
+ * The values this SDK computes for `alg` over an asset, `[]` when it finds none. `format` is
205
+ * the asset's media type; omitted, the bytes name it.
212
206
  *
213
- * # Why the body is offloaded rather than run inline
207
+ * # Errors
214
208
  *
215
- * UniFFI polls a future on the thread that called it and never spawns, so an `async fn` whose
216
- * body never suspends completes in its first poll, on the caller's thread, blocking it exactly
217
- * as a sync export would: measured at 88ms for a 10MB asset on Node, during which nothing else
218
- * in the process runs. It is also the read path's hard requirement, not just a courtesy: the
219
- * splice reads through `sink`, and the caller's thread is the one that has to answer those
220
- * reads. See [`task`](shared::task).
209
+ * An algorithm this SDK computes no value of, a `format` that is no media type or that the bytes
210
+ * contradict, an unreadable source, or no trustworthy answer.
211
+ */
212
+ export declare function computeSoftBinding(alg: string, source: RangeSource, format?: string | undefined, asyncOpts_?: {
213
+ signal: AbortSignal;
214
+ }): Promise<Array<Block>>;
215
+ /**
216
+ * Embed `sidecar`, the signed manifest a sign returned, into the asset `sink` holds, writing the
217
+ * composed result back through `sink`.
218
+ * `plugins` resolve a non-c2pa format (e.g. MXF) as `AssetIssuer.sign` resolves them; none is a
219
+ * c2pa-native embed. No signer round trip.
221
220
  *
222
221
  * # Errors
223
222
  *
@@ -225,31 +224,37 @@ export declare function classifySegment(source: RangeSource, asyncOpts_?: {
225
224
  * authoring/`locate` disagrees after the write, or the c2pa handler can't
226
225
  * parse/splice the asset.
227
226
  */
228
- export declare function embed(sink: RangeSink, manifest: ArrayBuffer, options: EmbedOptions, plugins: Array<PluginAuthor>, asyncOpts_?: {
227
+ export declare function embed(sink: RangeSink, sidecar: ArrayBuffer, options: EmbedOptions, plugins?: Array<PluginAuthor>, asyncOpts_?: {
229
228
  signal: AbortSignal;
230
229
  }): Promise<void>;
231
230
  /**
232
- * Typealias from the type name used in the UDL file to the builtin type. This
233
- * is needed because the UDL type name is used in function/method signatures.
231
+ * The tool that performed an action (a C2PA `generator-info-map`).
234
232
  */
235
- export type Timestamp = string;
233
+ export type SoftwareAgent = {
234
+ name: string;
235
+ };
236
+ /**
237
+ * Generated factory for {@link SoftwareAgent} record objects.
238
+ */
239
+ export declare const SoftwareAgent: Readonly<{
240
+ create: (partial: Partial<SoftwareAgent> & Required<Omit<SoftwareAgent, never>>) => SoftwareAgent;
241
+ new: (partial: Partial<SoftwareAgent> & Required<Omit<SoftwareAgent, never>>) => SoftwareAgent;
242
+ defaults: () => Partial<SoftwareAgent>;
243
+ }>;
236
244
  /**
237
245
  * Typealias from the type name used in the UDL file to the builtin type. This
238
246
  * is needed because the UDL type name is used in function/method signatures.
239
247
  */
240
248
  export type Url = string;
241
249
  /**
242
- * Optional facts folded into a derived or workflow action.
250
+ * Facts recorded on an action.
243
251
  */
244
252
  export type ActionDetail = {
245
- /**
246
- * When the action happened.
247
- */
248
- when?: Timestamp;
249
- softwareAgent?: string;
253
+ when?: Date;
254
+ softwareAgent?: SoftwareAgent;
250
255
  description?: string;
251
256
  /**
252
- * The URI its term is published at, e.g.
257
+ * The URI of an IPTC or C2PA term, e.g.
253
258
  * `http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture`.
254
259
  */
255
260
  sourceType?: Url;
@@ -287,30 +292,28 @@ export declare const Assertion: Readonly<{
287
292
  defaults: () => Partial<Assertion>;
288
293
  }>;
289
294
  /**
290
- * The asset is an original; the signer derives `c2pa.created`.
295
+ * The asset is an original; the signer derives `c2pa.created` from these facts.
291
296
  */
292
297
  export type CreatedOrigin = {
293
298
  /**
294
- * The URI its term is published at, e.g.
299
+ * The URI of an IPTC or C2PA term, e.g.
295
300
  * `http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture`.
296
301
  */
297
302
  sourceType: Url;
298
- detail?: ActionDetail;
303
+ when?: Date;
304
+ softwareAgent?: SoftwareAgent;
305
+ description?: string;
299
306
  };
300
307
  /**
301
308
  * Generated factory for {@link CreatedOrigin} record objects.
302
309
  */
303
310
  export declare const CreatedOrigin: Readonly<{
304
- create: (partial: Partial<CreatedOrigin> & Required<Omit<CreatedOrigin, "detail">>) => CreatedOrigin;
305
- new: (partial: Partial<CreatedOrigin> & Required<Omit<CreatedOrigin, "detail">>) => CreatedOrigin;
311
+ create: (partial: Partial<CreatedOrigin> & Required<Omit<CreatedOrigin, "description" | "softwareAgent" | "when">>) => CreatedOrigin;
312
+ new: (partial: Partial<CreatedOrigin> & Required<Omit<CreatedOrigin, "description" | "softwareAgent" | "when">>) => CreatedOrigin;
306
313
  defaults: () => Partial<CreatedOrigin>;
307
314
  }>;
308
315
  /**
309
316
  * A canonical gRPC/Connect status code: the coarse, closed failure class.
310
- *
311
- * The wasm lane projects this as a camelCase string like every other tagged value
312
- * there, so a consumer narrows on `err.code === "resourceExhausted"`; the native lane
313
- * projects an enum.
314
317
  */
315
318
  export declare enum Code {
316
319
  Canceled = 0,
@@ -335,7 +338,9 @@ export declare enum Code {
335
338
  */
336
339
  export type FieldViolation = {
337
340
  /**
338
- * A dotted proto path to the offending field (`""` for a message-level rule).
341
+ * The offending field: rooted at the call's argument when an SDK refuses it
342
+ * (`options.soft_bindings[1].alg`), at the request when a service does
343
+ * (`provenance.actions[0].label`).
339
344
  */
340
345
  field: string;
341
346
  /**
@@ -343,7 +348,7 @@ export type FieldViolation = {
343
348
  */
344
349
  description: string;
345
350
  /**
346
- * The constraint id that failed (a protovalidate/CEL rule id), stable across releases.
351
+ * The rule that failed, such as `string.min_len` or `alg.unlisted`: the stable branch key.
347
352
  */
348
353
  reason: string;
349
354
  };
@@ -754,122 +759,56 @@ export declare class RangeSourceImpl extends UniffiAbstractObject implements Ran
754
759
  uniffiDestroy(): void;
755
760
  static instanceOf(obj_: any): obj_ is RangeSourceImpl;
756
761
  }
757
- export declare enum AssetFormat_Tags {
758
- Sniff = "Sniff",
759
- Declared = "Declared"
760
- }
761
- /**
762
- * The format of the asset a call is handed. Stated, never defaulted: sniffing is a choice the
763
- * caller makes by name, not what happens when they say nothing.
764
- */
765
- export declare const AssetFormat: Readonly<{
766
- instanceOf: (obj: any) => obj is AssetFormat;
767
- Sniff: {
768
- new (): {
769
- /**
770
- * @private
771
- * This field is private and should not be used, use `tag` instead.
772
- */
773
- readonly [uniffiTypeNameSymbol]: "AssetFormat";
774
- readonly tag: AssetFormat_Tags.Sniff;
775
- };
776
- "new"(): {
777
- /**
778
- * @private
779
- * This field is private and should not be used, use `tag` instead.
780
- */
781
- readonly [uniffiTypeNameSymbol]: "AssetFormat";
782
- readonly tag: AssetFormat_Tags.Sniff;
783
- };
784
- instanceOf(obj: any): obj is {
785
- /**
786
- * @private
787
- * This field is private and should not be used, use `tag` instead.
788
- */
789
- readonly [uniffiTypeNameSymbol]: "AssetFormat";
790
- readonly tag: AssetFormat_Tags.Sniff;
791
- };
792
- };
793
- Declared: {
794
- new (inner: {
795
- mediaType: string;
796
- }): {
797
- /**
798
- * @private
799
- * This field is private and should not be used, use `tag` instead.
800
- */
801
- readonly [uniffiTypeNameSymbol]: "AssetFormat";
802
- readonly tag: AssetFormat_Tags.Declared;
803
- readonly inner: Readonly<{
804
- mediaType: string;
805
- }>;
806
- };
807
- "new"(inner: {
808
- mediaType: string;
809
- }): {
810
- /**
811
- * @private
812
- * This field is private and should not be used, use `tag` instead.
813
- */
814
- readonly [uniffiTypeNameSymbol]: "AssetFormat";
815
- readonly tag: AssetFormat_Tags.Declared;
816
- readonly inner: Readonly<{
817
- mediaType: string;
818
- }>;
819
- };
820
- instanceOf(obj: any): obj is {
821
- /**
822
- * @private
823
- * This field is private and should not be used, use `tag` instead.
824
- */
825
- readonly [uniffiTypeNameSymbol]: "AssetFormat";
826
- readonly tag: AssetFormat_Tags.Declared;
827
- readonly inner: Readonly<{
828
- mediaType: string;
829
- }>;
830
- };
831
- };
832
- }>;
833
- /**
834
- * The format of the asset a call is handed. Stated, never defaulted: sniffing is a choice the
835
- * caller makes by name, not what happens when they say nothing.
836
- */
837
- export type AssetFormat = InstanceType<typeof AssetFormat['Sniff' | 'Declared']>;
838
- export declare enum IngredientSource_Tags {
762
+ export declare enum IngredientKind_Tags {
839
763
  Asset = "Asset",
840
764
  Descriptor = "Descriptor"
841
765
  }
842
- export declare const IngredientSource: Readonly<{
843
- instanceOf: (obj: any) => obj is IngredientSource;
766
+ /**
767
+ * What an ingredient is: an asset whose manifest is read, or a description.
768
+ */
769
+ export declare const IngredientKind: Readonly<{
770
+ instanceOf: (obj: any) => obj is IngredientKind;
844
771
  Asset: {
845
772
  new (inner: {
846
773
  source: RangeSource;
847
- format: AssetFormat;
774
+ format?: string;
775
+ discoveredBy: Array<string>;
848
776
  }): {
849
777
  /**
850
778
  * @private
851
779
  * This field is private and should not be used, use `tag` instead.
852
780
  */
853
- readonly [uniffiTypeNameSymbol]: "IngredientSource";
854
- readonly tag: IngredientSource_Tags.Asset;
781
+ readonly [uniffiTypeNameSymbol]: "IngredientKind";
782
+ readonly tag: IngredientKind_Tags.Asset;
855
783
  readonly inner: Readonly<{
856
784
  source: RangeSource;
857
- format: AssetFormat;
785
+ format?: string;
786
+ discoveredBy: Array<string>;
858
787
  }>;
859
788
  };
860
- "new"(inner: {
789
+ new: (partial: Parameters<(partial: Partial<{
861
790
  source: RangeSource;
862
- format: AssetFormat;
863
- }): {
791
+ format?: string;
792
+ discoveredBy: Array<string>;
793
+ }> & Required<Omit<{
794
+ source: RangeSource;
795
+ format?: string;
796
+ discoveredBy: Array<string>;
797
+ }, "discoveredBy" | "format">>) => {
798
+ source: RangeSource;
799
+ format?: string;
800
+ discoveredBy: Array<string>;
801
+ }>[0]) => {
864
802
  /**
865
803
  * @private
866
804
  * This field is private and should not be used, use `tag` instead.
867
805
  */
868
- readonly [uniffiTypeNameSymbol]: "IngredientSource";
869
- readonly tag: IngredientSource_Tags.Asset;
806
+ readonly [uniffiTypeNameSymbol]: "IngredientKind";
807
+ readonly tag: IngredientKind_Tags.Asset;
870
808
  readonly inner: Readonly<{
871
809
  source: RangeSource;
872
- format: AssetFormat;
810
+ format?: string;
811
+ discoveredBy: Array<string>;
873
812
  }>;
874
813
  };
875
814
  instanceOf(obj: any): obj is {
@@ -877,43 +816,40 @@ export declare const IngredientSource: Readonly<{
877
816
  * @private
878
817
  * This field is private and should not be used, use `tag` instead.
879
818
  */
880
- readonly [uniffiTypeNameSymbol]: "IngredientSource";
881
- readonly tag: IngredientSource_Tags.Asset;
819
+ readonly [uniffiTypeNameSymbol]: "IngredientKind";
820
+ readonly tag: IngredientKind_Tags.Asset;
882
821
  readonly inner: Readonly<{
883
822
  source: RangeSource;
884
- format: AssetFormat;
823
+ format?: string;
824
+ discoveredBy: Array<string>;
885
825
  }>;
886
826
  };
887
827
  };
888
828
  Descriptor: {
889
829
  new (inner: {
890
- format?: string;
830
+ format: string;
891
831
  }): {
892
832
  /**
893
833
  * @private
894
834
  * This field is private and should not be used, use `tag` instead.
895
835
  */
896
- readonly [uniffiTypeNameSymbol]: "IngredientSource";
897
- readonly tag: IngredientSource_Tags.Descriptor;
836
+ readonly [uniffiTypeNameSymbol]: "IngredientKind";
837
+ readonly tag: IngredientKind_Tags.Descriptor;
898
838
  readonly inner: Readonly<{
899
- format?: string;
839
+ format: string;
900
840
  }>;
901
841
  };
902
- new: (partial: Parameters<(partial: Partial<{
903
- format?: string;
904
- }> & Required<Omit<{
905
- format?: string;
906
- }, "format">>) => {
907
- format?: string;
908
- }>[0]) => {
842
+ "new"(inner: {
843
+ format: string;
844
+ }): {
909
845
  /**
910
846
  * @private
911
847
  * This field is private and should not be used, use `tag` instead.
912
848
  */
913
- readonly [uniffiTypeNameSymbol]: "IngredientSource";
914
- readonly tag: IngredientSource_Tags.Descriptor;
849
+ readonly [uniffiTypeNameSymbol]: "IngredientKind";
850
+ readonly tag: IngredientKind_Tags.Descriptor;
915
851
  readonly inner: Readonly<{
916
- format?: string;
852
+ format: string;
917
853
  }>;
918
854
  };
919
855
  instanceOf(obj: any): obj is {
@@ -921,15 +857,18 @@ export declare const IngredientSource: Readonly<{
921
857
  * @private
922
858
  * This field is private and should not be used, use `tag` instead.
923
859
  */
924
- readonly [uniffiTypeNameSymbol]: "IngredientSource";
925
- readonly tag: IngredientSource_Tags.Descriptor;
860
+ readonly [uniffiTypeNameSymbol]: "IngredientKind";
861
+ readonly tag: IngredientKind_Tags.Descriptor;
926
862
  readonly inner: Readonly<{
927
- format?: string;
863
+ format: string;
928
864
  }>;
929
865
  };
930
866
  };
931
867
  }>;
932
- export type IngredientSource = InstanceType<typeof IngredientSource['Asset' | 'Descriptor']>;
868
+ /**
869
+ * What an ingredient is: an asset whose manifest is read, or a description.
870
+ */
871
+ export type IngredientKind = InstanceType<typeof IngredientKind['Asset' | 'Descriptor']>;
933
872
  /**
934
873
  * A pre-rendered thumbnail, attached to the manifest as its `c2pa.thumbnail.claim` resource or
935
874
  * to an ingredient as its `c2pa.thumbnail.ingredient`. The split-signer has no asset bytes to
@@ -939,24 +878,23 @@ export type IngredientSource = InstanceType<typeof IngredientSource['Asset' | 'D
939
878
  export type Thumbnail = {
940
879
  data: ArrayBuffer;
941
880
  /**
942
- * MIME type. `image/jpeg` and `image/png` are the interop-safe choices: consumer
943
- * verifiers like Adobe inspect may not render other previews.
881
+ * Its media type, judged against `data` as an asset's is; `None` reads it from `data`.
882
+ * `image/jpeg` and `image/png` are the ones consumer verifiers render.
944
883
  */
945
- format: string;
884
+ format?: string;
946
885
  };
947
886
  /**
948
887
  * Generated factory for {@link Thumbnail} record objects.
949
888
  */
950
889
  export declare const Thumbnail: Readonly<{
951
- create: (partial: Partial<Thumbnail> & Required<Omit<Thumbnail, never>>) => Thumbnail;
952
- new: (partial: Partial<Thumbnail> & Required<Omit<Thumbnail, never>>) => Thumbnail;
890
+ create: (partial: Partial<Thumbnail> & Required<Omit<Thumbnail, "format">>) => Thumbnail;
891
+ new: (partial: Partial<Thumbnail> & Required<Omit<Thumbnail, "format">>) => Thumbnail;
953
892
  defaults: () => Partial<Thumbnail>;
954
893
  }>;
955
894
  export type Ingredient = {
956
- source: IngredientSource;
895
+ kind: IngredientKind;
957
896
  title?: string;
958
897
  thumbnail?: Thumbnail;
959
- discoveredBy: Array<string>;
960
898
  };
961
899
  /**
962
900
  * Generated factory for {@link Ingredient} record objects.
@@ -1094,15 +1032,15 @@ export type AssetOrigin = InstanceType<typeof AssetOrigin['Created' | 'Opened' |
1094
1032
  */
1095
1033
  export type JsonObject = string;
1096
1034
  /**
1097
- * An entity-namespaced action (reverse-DNS `label`; the signer rejects
1098
- * `c2pa.*`/`cawg.*`). `params` merges into the action's `parameters`.
1035
+ * An entity-namespaced action: a reverse-DNS `label` outside `c2pa.` and `cawg.`, which are
1036
+ * refused in any case. A C2PA action is a [`StandardAction`].
1099
1037
  */
1100
1038
  export type CustomAction = {
1101
1039
  label: string;
1102
- params: JsonObject;
1040
+ parameters: JsonObject;
1103
1041
  detail?: ActionDetail;
1104
1042
  /**
1105
- * `Component.id`s this action acted on.
1043
+ * The `components` keys this action acted on.
1106
1044
  */
1107
1045
  componentIds: Array<string>;
1108
1046
  };
@@ -1110,13 +1048,62 @@ export type CustomAction = {
1110
1048
  * Generated factory for {@link CustomAction} record objects.
1111
1049
  */
1112
1050
  export declare const CustomAction: Readonly<{
1113
- create: (partial: Partial<CustomAction> & Required<Omit<CustomAction, "detail">>) => CustomAction;
1114
- new: (partial: Partial<CustomAction> & Required<Omit<CustomAction, "detail">>) => CustomAction;
1051
+ create: (partial: Partial<CustomAction> & Required<Omit<CustomAction, "componentIds" | "detail">>) => CustomAction;
1052
+ new: (partial: Partial<CustomAction> & Required<Omit<CustomAction, "componentIds" | "detail">>) => CustomAction;
1115
1053
  defaults: () => Partial<CustomAction>;
1116
1054
  }>;
1055
+ /**
1056
+ * A `soft-binding-timespan-map`: where the range starts in the media and how long it lasts, in
1057
+ * whole milliseconds.
1058
+ */
1059
+ export type Timespan = {
1060
+ start: number;
1061
+ duration: number;
1062
+ };
1063
+ /**
1064
+ * Generated factory for {@link Timespan} record objects.
1065
+ */
1066
+ export declare const Timespan: Readonly<{
1067
+ create: (partial: Partial<Timespan> & Required<Omit<Timespan, never>>) => Timespan;
1068
+ new: (partial: Partial<Timespan> & Required<Omit<Timespan, never>>) => Timespan;
1069
+ defaults: () => Partial<Timespan>;
1070
+ }>;
1071
+ /**
1072
+ * A `soft-binding-scope-map`: where in the content a value applies. Empty is the whole content.
1073
+ */
1074
+ export type Scope = {
1075
+ timespan?: Timespan;
1076
+ };
1077
+ /**
1078
+ * Generated factory for {@link Scope} record objects.
1079
+ */
1080
+ export declare const Scope: Readonly<{
1081
+ create: (partial: Partial<Scope> & Required<Omit<Scope, "timespan">>) => Scope;
1082
+ new: (partial: Partial<Scope> & Required<Omit<Scope, "timespan">>) => Scope;
1083
+ defaults: () => Partial<Scope>;
1084
+ }>;
1085
+ /**
1086
+ * A `soft-binding-block-map`.
1087
+ */
1088
+ export type Block = {
1089
+ value: ArrayBuffer;
1090
+ scope: Scope;
1091
+ };
1092
+ /**
1093
+ * Generated factory for {@link Block} record objects.
1094
+ */
1095
+ export declare const Block: Readonly<{
1096
+ create: (partial: Partial<Block> & Required<Omit<Block, "scope">>) => Block;
1097
+ new: (partial: Partial<Block> & Required<Omit<Block, "scope">>) => Block;
1098
+ defaults: () => Partial<Block>;
1099
+ }>;
1100
+ /**
1101
+ * One `c2pa.soft-binding` assertion (C2PA 2.4 18.10.3): a listed algorithm and its values, one
1102
+ * per block.
1103
+ */
1117
1104
  export type SoftBinding = {
1118
1105
  alg: string;
1119
- value: string;
1106
+ blocks: Array<Block>;
1120
1107
  };
1121
1108
  /**
1122
1109
  * Generated factory for {@link SoftBinding} record objects.
@@ -1149,13 +1136,12 @@ export declare enum ActionKind_Tags {
1149
1136
  ResizedProportional = "ResizedProportional",
1150
1137
  Transcoded = "Transcoded",
1151
1138
  Trimmed = "Trimmed",
1152
- Unknown = "Unknown",
1153
1139
  WatermarkedBound = "WatermarkedBound",
1154
1140
  WatermarkedUnbound = "WatermarkedUnbound"
1155
1141
  }
1156
1142
  /**
1157
- * The C2PA 2.3 workflow actions; see the core [`provenance::ActionKind`] for what each is.
1158
- * Mirrored for the one variant that carries a binding, which crosses as the two-string record.
1143
+ * The C2PA 2.4 workflow actions; see the core [`provenance::ActionKind`] for what each is.
1144
+ * Mirrored for the one variant that carries a binding, which crosses as the FFI record.
1159
1145
  */
1160
1146
  export declare const ActionKind: Readonly<{
1161
1147
  instanceOf: (obj: any) => obj is ActionKind;
@@ -1731,32 +1717,6 @@ export declare const ActionKind: Readonly<{
1731
1717
  readonly tag: ActionKind_Tags.Trimmed;
1732
1718
  };
1733
1719
  };
1734
- Unknown: {
1735
- new (): {
1736
- /**
1737
- * @private
1738
- * This field is private and should not be used, use `tag` instead.
1739
- */
1740
- readonly [uniffiTypeNameSymbol]: "ActionKind";
1741
- readonly tag: ActionKind_Tags.Unknown;
1742
- };
1743
- "new"(): {
1744
- /**
1745
- * @private
1746
- * This field is private and should not be used, use `tag` instead.
1747
- */
1748
- readonly [uniffiTypeNameSymbol]: "ActionKind";
1749
- readonly tag: ActionKind_Tags.Unknown;
1750
- };
1751
- instanceOf(obj: any): obj is {
1752
- /**
1753
- * @private
1754
- * This field is private and should not be used, use `tag` instead.
1755
- */
1756
- readonly [uniffiTypeNameSymbol]: "ActionKind";
1757
- readonly tag: ActionKind_Tags.Unknown;
1758
- };
1759
- };
1760
1720
  WatermarkedBound: {
1761
1721
  new (inner: {
1762
1722
  binding: SoftBinding;
@@ -1824,12 +1784,13 @@ export declare const ActionKind: Readonly<{
1824
1784
  };
1825
1785
  }>;
1826
1786
  /**
1827
- * The C2PA 2.3 workflow actions; see the core [`provenance::ActionKind`] for what each is.
1828
- * Mirrored for the one variant that carries a binding, which crosses as the two-string record.
1787
+ * The C2PA 2.4 workflow actions; see the core [`provenance::ActionKind`] for what each is.
1788
+ * Mirrored for the one variant that carries a binding, which crosses as the FFI record.
1829
1789
  */
1830
- export type ActionKind = InstanceType<typeof ActionKind['AddedText' | 'AdjustedColor' | 'ChangedSpeed' | 'Converted' | 'Cropped' | 'Deleted' | 'Drawing' | 'Dubbed' | 'Edited' | 'EditedMetadata' | 'Enhanced' | 'Filtered' | 'Mastered' | 'Mixed' | 'Orientation' | 'Published' | 'Remixed' | 'Repackaged' | 'Resized' | 'ResizedProportional' | 'Transcoded' | 'Trimmed' | 'Unknown' | 'WatermarkedBound' | 'WatermarkedUnbound']>;
1790
+ export type ActionKind = InstanceType<typeof ActionKind['AddedText' | 'AdjustedColor' | 'ChangedSpeed' | 'Converted' | 'Cropped' | 'Deleted' | 'Drawing' | 'Dubbed' | 'Edited' | 'EditedMetadata' | 'Enhanced' | 'Filtered' | 'Mastered' | 'Mixed' | 'Orientation' | 'Published' | 'Remixed' | 'Repackaged' | 'Resized' | 'ResizedProportional' | 'Transcoded' | 'Trimmed' | 'WatermarkedBound' | 'WatermarkedUnbound']>;
1831
1791
  export type StandardAction = {
1832
1792
  kind: ActionKind;
1793
+ parameters: JsonObject;
1833
1794
  detail?: ActionDetail;
1834
1795
  componentIds: Array<string>;
1835
1796
  };
@@ -1837,8 +1798,8 @@ export type StandardAction = {
1837
1798
  * Generated factory for {@link StandardAction} record objects.
1838
1799
  */
1839
1800
  export declare const StandardAction: Readonly<{
1840
- create: (partial: Partial<StandardAction> & Required<Omit<StandardAction, "detail">>) => StandardAction;
1841
- new: (partial: Partial<StandardAction> & Required<Omit<StandardAction, "detail">>) => StandardAction;
1801
+ create: (partial: Partial<StandardAction> & Required<Omit<StandardAction, "componentIds" | "detail" | "parameters">>) => StandardAction;
1802
+ new: (partial: Partial<StandardAction> & Required<Omit<StandardAction, "componentIds" | "detail" | "parameters">>) => StandardAction;
1842
1803
  defaults: () => Partial<StandardAction>;
1843
1804
  }>;
1844
1805
  export declare enum Action_Tags {
@@ -1908,8 +1869,7 @@ export declare const Action: Readonly<{
1908
1869
  }>;
1909
1870
  export type Action = InstanceType<typeof Action['Custom' | 'Standard']>;
1910
1871
  /**
1911
- * Pass `None` to skip the CAWG identity signing path entirely. Each entry of `identities` is
1912
- * one CAWG `VerifiedIdentity` object.
1872
+ * A CAWG identity assertion: each of `identities` is one CAWG `verifiedIdentities` entry.
1913
1873
  */
1914
1874
  export type Identity = {
1915
1875
  roles: Array<string>;
@@ -1919,8 +1879,8 @@ export type Identity = {
1919
1879
  * Generated factory for {@link Identity} record objects.
1920
1880
  */
1921
1881
  export declare const Identity: Readonly<{
1922
- create: (partial: Partial<Identity> & Required<Omit<Identity, never>>) => Identity;
1923
- new: (partial: Partial<Identity> & Required<Omit<Identity, never>>) => Identity;
1882
+ create: (partial: Partial<Identity> & Required<Omit<Identity, "roles">>) => Identity;
1883
+ new: (partial: Partial<Identity> & Required<Omit<Identity, "roles">>) => Identity;
1924
1884
  defaults: () => Partial<Identity>;
1925
1885
  }>;
1926
1886
  export declare enum ComponentEvent_Tags {
@@ -1982,6 +1942,7 @@ export declare const ComponentEvent: Readonly<{
1982
1942
  };
1983
1943
  Removed: {
1984
1944
  new (inner: {
1945
+ label: string;
1985
1946
  detail?: ActionDetail;
1986
1947
  }): {
1987
1948
  /**
@@ -1991,14 +1952,18 @@ export declare const ComponentEvent: Readonly<{
1991
1952
  readonly [uniffiTypeNameSymbol]: "ComponentEvent";
1992
1953
  readonly tag: ComponentEvent_Tags.Removed;
1993
1954
  readonly inner: Readonly<{
1955
+ label: string;
1994
1956
  detail?: ActionDetail;
1995
1957
  }>;
1996
1958
  };
1997
1959
  new: (partial: Parameters<(partial: Partial<{
1960
+ label: string;
1998
1961
  detail?: ActionDetail;
1999
1962
  }> & Required<Omit<{
1963
+ label: string;
2000
1964
  detail?: ActionDetail;
2001
1965
  }, "detail">>) => {
1966
+ label: string;
2002
1967
  detail?: ActionDetail;
2003
1968
  }>[0]) => {
2004
1969
  /**
@@ -2008,6 +1973,7 @@ export declare const ComponentEvent: Readonly<{
2008
1973
  readonly [uniffiTypeNameSymbol]: "ComponentEvent";
2009
1974
  readonly tag: ComponentEvent_Tags.Removed;
2010
1975
  readonly inner: Readonly<{
1976
+ label: string;
2011
1977
  detail?: ActionDetail;
2012
1978
  }>;
2013
1979
  };
@@ -2019,6 +1985,7 @@ export declare const ComponentEvent: Readonly<{
2019
1985
  readonly [uniffiTypeNameSymbol]: "ComponentEvent";
2020
1986
  readonly tag: ComponentEvent_Tags.Removed;
2021
1987
  readonly inner: Readonly<{
1988
+ label: string;
2022
1989
  detail?: ActionDetail;
2023
1990
  }>;
2024
1991
  };
@@ -2058,8 +2025,10 @@ export declare const ComponentEvent: Readonly<{
2058
2025
  * to be folded into and the variant has none.
2059
2026
  */
2060
2027
  export type ComponentEvent = InstanceType<typeof ComponentEvent['Placed' | 'Removed' | 'InputTo']>;
2028
+ /**
2029
+ * An ingredient other than the parent; see the core [`provenance::Component`].
2030
+ */
2061
2031
  export type Component = {
2062
- id: string;
2063
2032
  asset: Ingredient;
2064
2033
  event: ComponentEvent;
2065
2034
  };
@@ -2074,160 +2043,201 @@ export declare const Component: Readonly<{
2074
2043
  export type AssetManifestSpec = {
2075
2044
  title?: string;
2076
2045
  origin: AssetOrigin;
2046
+ /**
2047
+ * Every action performed on the asset; the manifest states the list is complete (C2PA
2048
+ * `allActionsIncluded`).
2049
+ */
2077
2050
  actions: Array<Action>;
2078
2051
  identity?: Identity;
2079
2052
  assertions: Array<Assertion>;
2080
- components: Array<Component>;
2053
+ /**
2054
+ * Keyed by the handle actions name them by.
2055
+ */
2056
+ components: Map<string, Component>;
2081
2057
  };
2082
2058
  /**
2083
2059
  * Generated factory for {@link AssetManifestSpec} record objects.
2084
2060
  */
2085
2061
  export declare const AssetManifestSpec: Readonly<{
2086
- create: (partial: Partial<AssetManifestSpec> & Required<Omit<AssetManifestSpec, "identity" | "title">>) => AssetManifestSpec;
2087
- new: (partial: Partial<AssetManifestSpec> & Required<Omit<AssetManifestSpec, "identity" | "title">>) => AssetManifestSpec;
2062
+ create: (partial: Partial<AssetManifestSpec> & Required<Omit<AssetManifestSpec, "actions" | "assertions" | "components" | "identity" | "title">>) => AssetManifestSpec;
2063
+ new: (partial: Partial<AssetManifestSpec> & Required<Omit<AssetManifestSpec, "actions" | "assertions" | "components" | "identity" | "title">>) => AssetManifestSpec;
2088
2064
  defaults: () => Partial<AssetManifestSpec>;
2089
2065
  }>;
2090
2066
  /**
2091
- * Transport tunables and per-request metadata for the signer connection.
2092
- *
2093
- * `headers`, when present, are attached to every RPC (e.g.
2094
- * `Authorization: Bearer …`, or routing/tenant metadata) and are
2095
- * lower-cased on the wire; omit them to connect with no extra metadata.
2096
- *
2097
- * # Both deadlines are required
2098
- *
2099
- * They were optional, and omitting them left a call with no deadline at all: a signer that
2100
- * accepted the connection and then stopped answering held the caller's thread for ever, with no
2101
- * cancellation path, because the SDK runs each call on a thread of its own and nothing was
2102
- * watching the clock. There is no figure the SDK could pick on a caller's behalf that is right
2103
- * for both a local signer and one across a region, so it asks.
2104
- *
2105
- * Neither bounds the hash: that runs client side, between the two legs of the signing protocol,
2106
- * and is not an RPC. These bound the network alone.
2067
+ * A byte range holding a bare C2PA manifest store, or reserved for one. A record of
2068
+ * primitives, so a plugin in its OWN UniFFI namespace declares a structurally identical
2069
+ * one and the two cross the boundary without sharing a Rust type.
2070
+ */
2071
+ export type ByteRange = {
2072
+ offset: bigint;
2073
+ length: bigint;
2074
+ };
2075
+ /**
2076
+ * Generated factory for {@link ByteRange} record objects.
2077
+ */
2078
+ export declare const ByteRange: Readonly<{
2079
+ create: (partial: Partial<ByteRange> & Required<Omit<ByteRange, never>>) => ByteRange;
2080
+ new: (partial: Partial<ByteRange> & Required<Omit<ByteRange, never>>) => ByteRange;
2081
+ defaults: () => Partial<ByteRange>;
2082
+ }>;
2083
+ /**
2084
+ * What one [`Compute::compute`] is asked: the asset and its media type.
2085
+ */
2086
+ export type ComputeRequest = {
2087
+ source: RangeSource;
2088
+ format: string;
2089
+ };
2090
+ /**
2091
+ * Generated factory for {@link ComputeRequest} record objects.
2092
+ */
2093
+ export declare const ComputeRequest: Readonly<{
2094
+ create: (partial: Partial<ComputeRequest> & Required<Omit<ComputeRequest, never>>) => ComputeRequest;
2095
+ new: (partial: Partial<ComputeRequest> & Required<Omit<ComputeRequest, never>>) => ComputeRequest;
2096
+ defaults: () => Partial<ComputeRequest>;
2097
+ }>;
2098
+ /**
2099
+ * The signer connection. Neither deadline bounds the hash, which runs client side between the
2100
+ * two RPCs.
2107
2101
  */
2108
2102
  export type ConnectOptions = {
2109
- headers?: Map<string, string>;
2110
2103
  /**
2111
- * Per-RPC deadline. Bounds one leg of the signing protocol, not the whole sign.
2104
+ * Sent on every request, names lower-cased; two names that differ only by case are refused.
2105
+ */
2106
+ headers: Map<string, string>;
2107
+ /**
2108
+ * Bounds one signer RPC, or how long a mark may wait for the next byte; the service's own
2109
+ * limit bounds a whole mark. Default 30 s.
2112
2110
  */
2113
- rpcTimeoutMs: number;
2111
+ rpcTimeout?: number;
2114
2112
  /**
2115
- * Bounds the initial connection setup, so an unreachable signer fails fast rather than
2116
- * waiting out the OS SYN timeout.
2113
+ * Bounds opening the connection. Default 5 s.
2117
2114
  */
2118
- connectTimeoutMs: number;
2115
+ connectTimeout?: number;
2119
2116
  };
2120
2117
  /**
2121
2118
  * Generated factory for {@link ConnectOptions} record objects.
2122
2119
  */
2123
2120
  export declare const ConnectOptions: Readonly<{
2124
- create: (partial: Partial<ConnectOptions> & Required<Omit<ConnectOptions, "headers">>) => ConnectOptions;
2125
- new: (partial: Partial<ConnectOptions> & Required<Omit<ConnectOptions, "headers">>) => ConnectOptions;
2121
+ create: (partial: Partial<ConnectOptions> & Required<Omit<ConnectOptions, "connectTimeout" | "headers" | "rpcTimeout">>) => ConnectOptions;
2122
+ new: (partial: Partial<ConnectOptions> & Required<Omit<ConnectOptions, "connectTimeout" | "headers" | "rpcTimeout">>) => ConnectOptions;
2126
2123
  defaults: () => Partial<ConnectOptions>;
2127
2124
  }>;
2128
2125
  /**
2129
- * Everything one [`Binder::derive`] needs beyond the asset.
2126
+ * What one [`embed`] is told beyond the sink, the sidecar and the plugins.
2130
2127
  */
2131
- export type DeriveOptions = {
2132
- format: AssetFormat;
2128
+ export type EmbedOptions = {
2129
+ /**
2130
+ * The asset's media type; `None` reads it from the sink's leading bytes.
2131
+ */
2132
+ format?: string;
2133
2133
  };
2134
2134
  /**
2135
- * Generated factory for {@link DeriveOptions} record objects.
2135
+ * Generated factory for {@link EmbedOptions} record objects.
2136
2136
  */
2137
- export declare const DeriveOptions: Readonly<{
2138
- create: (partial: Partial<DeriveOptions> & Required<Omit<DeriveOptions, never>>) => DeriveOptions;
2139
- new: (partial: Partial<DeriveOptions> & Required<Omit<DeriveOptions, never>>) => DeriveOptions;
2140
- defaults: () => Partial<DeriveOptions>;
2137
+ export declare const EmbedOptions: Readonly<{
2138
+ create: (partial: Partial<EmbedOptions> & Required<Omit<EmbedOptions, "format">>) => EmbedOptions;
2139
+ new: (partial: Partial<EmbedOptions> & Required<Omit<EmbedOptions, "format">>) => EmbedOptions;
2140
+ defaults: () => Partial<EmbedOptions>;
2141
2141
  }>;
2142
2142
  /**
2143
- * Everything one [`embed`] needs beyond the sink, the manifest and the plugins: how the
2144
- * asset's format is known, stated or sniffed from the sink's leading bytes.
2143
+ * Where a stream's init manifest lives. The init segment always carries it, so there is no
2144
+ * remote-only delivery, and the segment comes back as bytes, so there is no output to name.
2145
2145
  */
2146
- export type EmbedOptions = {
2147
- format: AssetFormat;
2146
+ export declare enum StreamDelivery {
2147
+ Embedded = 0,
2148
+ EmbeddedAndRemote = 1
2149
+ }
2150
+ /**
2151
+ * How long a session key signs, and when to rotate it.
2152
+ */
2153
+ export type RotationPolicy = {
2154
+ /**
2155
+ * From the key's creation, in whole seconds (C2PA `validityPeriod`); the verifier refuses
2156
+ * a segment signed after it.
2157
+ */
2158
+ validityPeriod: number;
2159
+ /**
2160
+ * The share of `validity_period`, 1 to 100, after which `rotation_due` is set.
2161
+ */
2162
+ refreshPercent: number;
2148
2163
  };
2149
2164
  /**
2150
- * Generated factory for {@link EmbedOptions} record objects.
2165
+ * Generated factory for {@link RotationPolicy} record objects.
2151
2166
  */
2152
- export declare const EmbedOptions: Readonly<{
2153
- create: (partial: Partial<EmbedOptions> & Required<Omit<EmbedOptions, never>>) => EmbedOptions;
2154
- new: (partial: Partial<EmbedOptions> & Required<Omit<EmbedOptions, never>>) => EmbedOptions;
2155
- defaults: () => Partial<EmbedOptions>;
2167
+ export declare const RotationPolicy: Readonly<{
2168
+ create: (partial: Partial<RotationPolicy> & Required<Omit<RotationPolicy, never>>) => RotationPolicy;
2169
+ new: (partial: Partial<RotationPolicy> & Required<Omit<RotationPolicy, never>>) => RotationPolicy;
2170
+ defaults: () => Partial<RotationPolicy>;
2156
2171
  }>;
2157
2172
  /**
2158
- * A soft-binding binder: how a recoverable binding is derived from an asset. Put these inside
2159
- * the issuer's manifest mode to sign and index under them, and pass them in verify options to
2160
- * recover. Implement it for an algorithm the SDK does not ship; the SDK's own are
2161
- * [`IsccBinder`] and [`HeldBinder`].
2162
- *
2163
- * `derive` answers this binder's binding for `source`, or `None` when there is none.
2164
- * `options.format` is how the asset's format is known. `None` and an error
2165
- * mean different things: `None` is "no binding here", an error is "the question could not be
2166
- * answered", so a binder that failed never reads as an unmarked asset.
2173
+ * Computes one soft-binding algorithm's values from an asset (a fingerprint calculated, a
2174
+ * watermark detected). `[]` is "no value here"; an error is "no trustworthy answer", so a failed
2175
+ * engine never reads as an unmarked asset.
2167
2176
  */
2168
- export interface Binder {
2169
- derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
2177
+ export interface Compute {
2178
+ /**
2179
+ * The C2PA soft-binding algorithm list label, e.g. `io.iscc.v0`.
2180
+ */
2181
+ alg(): string;
2182
+ compute(request: ComputeRequest, asyncOpts_?: {
2170
2183
  signal: AbortSignal;
2171
- }): Promise<SoftBinding | undefined>;
2184
+ }): Promise<Array<Block>>;
2172
2185
  }
2173
2186
  /**
2174
- * A soft-binding binder: how a recoverable binding is derived from an asset. Put these inside
2175
- * the issuer's manifest mode to sign and index under them, and pass them in verify options to
2176
- * recover. Implement it for an algorithm the SDK does not ship; the SDK's own are
2177
- * [`IsccBinder`] and [`HeldBinder`].
2178
- *
2179
- * `derive` answers this binder's binding for `source`, or `None` when there is none.
2180
- * `options.format` is how the asset's format is known. `None` and an error
2181
- * mean different things: `None` is "no binding here", an error is "the question could not be
2182
- * answered", so a binder that failed never reads as an unmarked asset.
2187
+ * Computes one soft-binding algorithm's values from an asset (a fingerprint calculated, a
2188
+ * watermark detected). `[]` is "no value here"; an error is "no trustworthy answer", so a failed
2189
+ * engine never reads as an unmarked asset.
2183
2190
  */
2184
- export declare class BinderImpl extends UniffiAbstractObject implements Binder {
2185
- readonly [uniffiTypeNameSymbol] = "BinderImpl";
2191
+ export declare class ComputeImpl extends UniffiAbstractObject implements Compute {
2192
+ readonly [uniffiTypeNameSymbol] = "ComputeImpl";
2186
2193
  readonly [destructorGuardSymbol]: UniffiGcObject;
2187
2194
  readonly [pointerLiteralSymbol]: UniffiHandle;
2188
2195
  private constructor();
2189
- derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
2196
+ /**
2197
+ * The C2PA soft-binding algorithm list label, e.g. `io.iscc.v0`.
2198
+ */
2199
+ alg(): string;
2200
+ compute(request: ComputeRequest, asyncOpts_?: {
2190
2201
  signal: AbortSignal;
2191
- }): Promise<SoftBinding | undefined>;
2202
+ }): Promise<Array<Block>>;
2192
2203
  uniffiDestroy(): void;
2193
- static instanceOf(obj_: any): obj_ is BinderImpl;
2204
+ static instanceOf(obj_: any): obj_ is ComputeImpl;
2194
2205
  }
2195
- export declare enum StreamDelivery_Tags {
2196
- Embedded = "Embedded",
2197
- Remote = "Remote",
2198
- Both = "Both"
2206
+ export declare enum SoftBindingSource_Tags {
2207
+ Builtin = "Builtin",
2208
+ Held = "Held",
2209
+ Custom = "Custom"
2199
2210
  }
2200
2211
  /**
2201
- * How a live stream's init manifest is delivered and which binders it declares. A stream
2202
- * returns its signed init segment as bytes, so there is no output to name.
2212
+ * Where one assertion's values come from.
2203
2213
  */
2204
- export declare const StreamDelivery: Readonly<{
2205
- instanceOf: (obj: any) => obj is StreamDelivery;
2206
- Embedded: {
2214
+ export declare const SoftBindingSource: Readonly<{
2215
+ instanceOf: (obj: any) => obj is SoftBindingSource;
2216
+ Builtin: {
2207
2217
  new (inner: {
2208
- binders: Array<Binder>;
2218
+ alg: string;
2209
2219
  }): {
2210
2220
  /**
2211
2221
  * @private
2212
2222
  * This field is private and should not be used, use `tag` instead.
2213
2223
  */
2214
- readonly [uniffiTypeNameSymbol]: "StreamDelivery";
2215
- readonly tag: StreamDelivery_Tags.Embedded;
2224
+ readonly [uniffiTypeNameSymbol]: "SoftBindingSource";
2225
+ readonly tag: SoftBindingSource_Tags.Builtin;
2216
2226
  readonly inner: Readonly<{
2217
- binders: Array<Binder>;
2227
+ alg: string;
2218
2228
  }>;
2219
2229
  };
2220
2230
  "new"(inner: {
2221
- binders: Array<Binder>;
2231
+ alg: string;
2222
2232
  }): {
2223
2233
  /**
2224
2234
  * @private
2225
2235
  * This field is private and should not be used, use `tag` instead.
2226
2236
  */
2227
- readonly [uniffiTypeNameSymbol]: "StreamDelivery";
2228
- readonly tag: StreamDelivery_Tags.Embedded;
2237
+ readonly [uniffiTypeNameSymbol]: "SoftBindingSource";
2238
+ readonly tag: SoftBindingSource_Tags.Builtin;
2229
2239
  readonly inner: Readonly<{
2230
- binders: Array<Binder>;
2240
+ alg: string;
2231
2241
  }>;
2232
2242
  };
2233
2243
  instanceOf(obj: any): obj is {
@@ -2235,38 +2245,38 @@ export declare const StreamDelivery: Readonly<{
2235
2245
  * @private
2236
2246
  * This field is private and should not be used, use `tag` instead.
2237
2247
  */
2238
- readonly [uniffiTypeNameSymbol]: "StreamDelivery";
2239
- readonly tag: StreamDelivery_Tags.Embedded;
2248
+ readonly [uniffiTypeNameSymbol]: "SoftBindingSource";
2249
+ readonly tag: SoftBindingSource_Tags.Builtin;
2240
2250
  readonly inner: Readonly<{
2241
- binders: Array<Binder>;
2251
+ alg: string;
2242
2252
  }>;
2243
2253
  };
2244
2254
  };
2245
- Remote: {
2255
+ Held: {
2246
2256
  new (inner: {
2247
- binders: Array<Binder>;
2257
+ binding: SoftBinding;
2248
2258
  }): {
2249
2259
  /**
2250
2260
  * @private
2251
2261
  * This field is private and should not be used, use `tag` instead.
2252
2262
  */
2253
- readonly [uniffiTypeNameSymbol]: "StreamDelivery";
2254
- readonly tag: StreamDelivery_Tags.Remote;
2263
+ readonly [uniffiTypeNameSymbol]: "SoftBindingSource";
2264
+ readonly tag: SoftBindingSource_Tags.Held;
2255
2265
  readonly inner: Readonly<{
2256
- binders: Array<Binder>;
2266
+ binding: SoftBinding;
2257
2267
  }>;
2258
2268
  };
2259
2269
  "new"(inner: {
2260
- binders: Array<Binder>;
2270
+ binding: SoftBinding;
2261
2271
  }): {
2262
2272
  /**
2263
2273
  * @private
2264
2274
  * This field is private and should not be used, use `tag` instead.
2265
2275
  */
2266
- readonly [uniffiTypeNameSymbol]: "StreamDelivery";
2267
- readonly tag: StreamDelivery_Tags.Remote;
2276
+ readonly [uniffiTypeNameSymbol]: "SoftBindingSource";
2277
+ readonly tag: SoftBindingSource_Tags.Held;
2268
2278
  readonly inner: Readonly<{
2269
- binders: Array<Binder>;
2279
+ binding: SoftBinding;
2270
2280
  }>;
2271
2281
  };
2272
2282
  instanceOf(obj: any): obj is {
@@ -2274,38 +2284,38 @@ export declare const StreamDelivery: Readonly<{
2274
2284
  * @private
2275
2285
  * This field is private and should not be used, use `tag` instead.
2276
2286
  */
2277
- readonly [uniffiTypeNameSymbol]: "StreamDelivery";
2278
- readonly tag: StreamDelivery_Tags.Remote;
2287
+ readonly [uniffiTypeNameSymbol]: "SoftBindingSource";
2288
+ readonly tag: SoftBindingSource_Tags.Held;
2279
2289
  readonly inner: Readonly<{
2280
- binders: Array<Binder>;
2290
+ binding: SoftBinding;
2281
2291
  }>;
2282
2292
  };
2283
2293
  };
2284
- Both: {
2294
+ Custom: {
2285
2295
  new (inner: {
2286
- binders: Array<Binder>;
2296
+ compute: Compute;
2287
2297
  }): {
2288
2298
  /**
2289
2299
  * @private
2290
2300
  * This field is private and should not be used, use `tag` instead.
2291
2301
  */
2292
- readonly [uniffiTypeNameSymbol]: "StreamDelivery";
2293
- readonly tag: StreamDelivery_Tags.Both;
2302
+ readonly [uniffiTypeNameSymbol]: "SoftBindingSource";
2303
+ readonly tag: SoftBindingSource_Tags.Custom;
2294
2304
  readonly inner: Readonly<{
2295
- binders: Array<Binder>;
2305
+ compute: Compute;
2296
2306
  }>;
2297
2307
  };
2298
2308
  "new"(inner: {
2299
- binders: Array<Binder>;
2309
+ compute: Compute;
2300
2310
  }): {
2301
2311
  /**
2302
2312
  * @private
2303
2313
  * This field is private and should not be used, use `tag` instead.
2304
2314
  */
2305
- readonly [uniffiTypeNameSymbol]: "StreamDelivery";
2306
- readonly tag: StreamDelivery_Tags.Both;
2315
+ readonly [uniffiTypeNameSymbol]: "SoftBindingSource";
2316
+ readonly tag: SoftBindingSource_Tags.Custom;
2307
2317
  readonly inner: Readonly<{
2308
- binders: Array<Binder>;
2318
+ compute: Compute;
2309
2319
  }>;
2310
2320
  };
2311
2321
  instanceOf(obj: any): obj is {
@@ -2313,63 +2323,42 @@ export declare const StreamDelivery: Readonly<{
2313
2323
  * @private
2314
2324
  * This field is private and should not be used, use `tag` instead.
2315
2325
  */
2316
- readonly [uniffiTypeNameSymbol]: "StreamDelivery";
2317
- readonly tag: StreamDelivery_Tags.Both;
2326
+ readonly [uniffiTypeNameSymbol]: "SoftBindingSource";
2327
+ readonly tag: SoftBindingSource_Tags.Custom;
2318
2328
  readonly inner: Readonly<{
2319
- binders: Array<Binder>;
2329
+ compute: Compute;
2320
2330
  }>;
2321
2331
  };
2322
2332
  };
2323
2333
  }>;
2324
2334
  /**
2325
- * How a live stream's init manifest is delivered and which binders it declares. A stream
2326
- * returns its signed init segment as bytes, so there is no output to name.
2335
+ * Where one assertion's values come from.
2327
2336
  */
2328
- export type StreamDelivery = InstanceType<typeof StreamDelivery['Embedded' | 'Remote' | 'Both']>;
2337
+ export type SoftBindingSource = InstanceType<typeof SoftBindingSource['Builtin' | 'Held' | 'Custom']>;
2329
2338
  /**
2330
- * `validity_period_secs` is the session-key validity window in seconds
2331
- * after `created_at`; the verifier rejects segments signed past this
2332
- * (plus skew tolerance).
2333
- *
2334
- * `refresh_percent` is 0..=100; once this percentage of
2335
- * `validity_period_secs` elapses, `sign` returns `rotation_due: true`
2336
- * so the consumer can rotate before verifier-side expiry.
2337
- */
2338
- export type RotationPolicy = {
2339
- validityPeriodSecs: number;
2340
- refreshPercent: number;
2341
- };
2342
- /**
2343
- * Generated factory for {@link RotationPolicy} record objects.
2344
- */
2345
- export declare const RotationPolicy: Readonly<{
2346
- create: (partial: Partial<RotationPolicy> & Required<Omit<RotationPolicy, never>>) => RotationPolicy;
2347
- new: (partial: Partial<RotationPolicy> & Required<Omit<RotationPolicy, never>>) => RotationPolicy;
2348
- defaults: () => Partial<RotationPolicy>;
2349
- }>;
2350
- /**
2351
- * Options for a stream's `init` and `rotate`: where the init manifest lives and the binders
2352
- * run over the init segment for it, and the session-key validity window.
2339
+ * Options for a stream's `init` and `rotate`: where the init manifest lives, the session-key
2340
+ * validity window, and the soft bindings declared for the init segment.
2353
2341
  */
2354
2342
  export type InitOptions = {
2355
2343
  delivery: StreamDelivery;
2356
2344
  rotationPolicy: RotationPolicy;
2345
+ softBindings: Array<SoftBindingSource>;
2357
2346
  };
2358
2347
  /**
2359
2348
  * Generated factory for {@link InitOptions} record objects.
2360
2349
  */
2361
2350
  export declare const InitOptions: Readonly<{
2362
- create: (partial: Partial<InitOptions> & Required<Omit<InitOptions, never>>) => InitOptions;
2363
- new: (partial: Partial<InitOptions> & Required<Omit<InitOptions, never>>) => InitOptions;
2351
+ create: (partial: Partial<InitOptions> & Required<Omit<InitOptions, "softBindings">>) => InitOptions;
2352
+ new: (partial: Partial<InitOptions> & Required<Omit<InitOptions, "softBindings">>) => InitOptions;
2364
2353
  defaults: () => Partial<InitOptions>;
2365
2354
  }>;
2366
2355
  /**
2367
- * Result of [`StreamIssuer::init`](super::StreamIssuer::init). `valid_until_epoch_secs` is the
2368
- * UNIX-epoch second at which the session key's validity elapses.
2356
+ * Result of [`StreamIssuer::init`](super::StreamIssuer::init): the signed init segment, and when
2357
+ * its session key stops signing.
2369
2358
  */
2370
2359
  export type InitOutcome = {
2371
- signedInitBytes: ArrayBuffer;
2372
- validUntilEpochSecs: bigint;
2360
+ bytes: ArrayBuffer;
2361
+ validUntil: Date;
2373
2362
  };
2374
2363
  /**
2375
2364
  * Generated factory for {@link InitOutcome} record objects.
@@ -2380,52 +2369,39 @@ export declare const InitOutcome: Readonly<{
2380
2369
  defaults: () => Partial<InitOutcome>;
2381
2370
  }>;
2382
2371
  /**
2383
- * Everything one [`AssetMarker::mark`] needs beyond the asset, every field stated.
2372
+ * What one [`AssetMarker::mark`] is told beyond the asset.
2384
2373
  */
2385
2374
  export type MarkOptions = {
2386
2375
  /**
2387
- * How the asset's format is known.
2376
+ * The asset's media type; `None` reads it from the leading bytes.
2388
2377
  */
2389
- format: AssetFormat;
2378
+ format?: string;
2390
2379
  /**
2391
- * Filename recorded with the mark, and the multipart part name.
2380
+ * The watermarks to insert, as algorithm list labels; `[]` inserts every one the
2381
+ * deployment offers, in its order.
2392
2382
  */
2393
- fileName: string;
2394
- /**
2395
- * Whether the signposting layer is applied beside the marks that resolve back to the
2396
- * manifest; `false` applies only those.
2397
- */
2398
- signpost: boolean;
2383
+ algorithms: Array<string>;
2399
2384
  };
2400
2385
  /**
2401
2386
  * Generated factory for {@link MarkOptions} record objects.
2402
2387
  */
2403
2388
  export declare const MarkOptions: Readonly<{
2404
- create: (partial: Partial<MarkOptions> & Required<Omit<MarkOptions, never>>) => MarkOptions;
2405
- new: (partial: Partial<MarkOptions> & Required<Omit<MarkOptions, never>>) => MarkOptions;
2389
+ create: (partial: Partial<MarkOptions> & Required<Omit<MarkOptions, "algorithms" | "format">>) => MarkOptions;
2390
+ new: (partial: Partial<MarkOptions> & Required<Omit<MarkOptions, "algorithms" | "format">>) => MarkOptions;
2406
2391
  defaults: () => Partial<MarkOptions>;
2407
2392
  }>;
2408
2393
  /**
2409
- * Result of [`AssetMarker::mark`](super::AssetMarker::mark): the marked asset and the provenance
2410
- * its marking created. The neutral core is [`marker::MarkOutcome`]; this differs only in carrying the
2411
- * asset as [`Bytes`].
2394
+ * Result of [`AssetMarker::mark`](super::AssetMarker::mark), whose marked asset went into its
2395
+ * sink.
2412
2396
  */
2413
2397
  export type MarkOutcome = {
2414
2398
  /**
2415
- * The marked asset. Sign these bytes, not the ones handed in.
2416
- */
2417
- bytes: ArrayBuffer;
2418
- /**
2419
- * The marked asset's media type, which a marker may change by re-encoding.
2399
+ * The marked asset's media type, which a watermark service may change by re-encoding.
2420
2400
  */
2421
2401
  format: string;
2422
2402
  /**
2423
- * The name the marking service recorded.
2424
- */
2425
- fileName: string;
2426
- /**
2427
- * One `c2pa.watermarked.bound` or `.unbound` per mark, in the order applied, a bound one
2428
- * carrying the binding it resolves through. Append to the manifest's `actions`.
2403
+ * One `c2pa.watermarked.bound` or `.unbound` per mark, in the order inserted. Append them to
2404
+ * the manifest's `actions`.
2429
2405
  */
2430
2406
  actions: Array<Action>;
2431
2407
  };
@@ -2438,32 +2414,28 @@ export declare const MarkOutcome: Readonly<{
2438
2414
  defaults: () => Partial<MarkOutcome>;
2439
2415
  }>;
2440
2416
  /**
2441
- * A byte range holding a bare C2PA manifest store, or reserved for one. A record of
2442
- * primitives, so a plugin in its OWN UniFFI namespace declares a structurally identical
2443
- * one and the two cross the boundary without sharing a Rust type.
2417
+ * What a [`SigningVault::mint`] is asked: how long the key will be signed under, so the vault can
2418
+ * give it that lifetime and expire it itself; a key no `forget` reaches then dies where it is held.
2444
2419
  */
2445
- export type Region = {
2446
- offset: bigint;
2447
- length: bigint;
2420
+ export type MintRequest = {
2421
+ validityPeriod: number;
2448
2422
  };
2449
2423
  /**
2450
- * Generated factory for {@link Region} record objects.
2424
+ * Generated factory for {@link MintRequest} record objects.
2451
2425
  */
2452
- export declare const Region: Readonly<{
2453
- create: (partial: Partial<Region> & Required<Omit<Region, never>>) => Region;
2454
- new: (partial: Partial<Region> & Required<Omit<Region, never>>) => Region;
2455
- defaults: () => Partial<Region>;
2426
+ export declare const MintRequest: Readonly<{
2427
+ create: (partial: Partial<MintRequest> & Required<Omit<MintRequest, never>>) => MintRequest;
2428
+ new: (partial: Partial<MintRequest> & Required<Omit<MintRequest, never>>) => MintRequest;
2429
+ defaults: () => Partial<MintRequest>;
2456
2430
  }>;
2457
2431
  /**
2458
- * Result of [`StreamSession::sign`](super::StreamSession::sign). `rotation_due` flips once
2459
- * `policy.refresh_percent`% of validity has elapsed; `valid_until_epoch_secs` is repeated
2460
- * per segment so callers can schedule rotation precisely instead of reacting only to the
2461
- * flag.
2432
+ * Result of [`StreamSession::sign`](super::StreamSession::sign). `valid_until` repeats per
2433
+ * segment so a caller can schedule the rotation rather than only react to `rotation_due`.
2462
2434
  */
2463
2435
  export type SegmentOutcome = {
2464
2436
  bytes: ArrayBuffer;
2465
2437
  rotationDue: boolean;
2466
- validUntilEpochSecs: bigint;
2438
+ validUntil: Date;
2467
2439
  };
2468
2440
  /**
2469
2441
  * Generated factory for {@link SegmentOutcome} record objects.
@@ -2473,6 +2445,23 @@ export declare const SegmentOutcome: Readonly<{
2473
2445
  new: (partial: Partial<SegmentOutcome> & Required<Omit<SegmentOutcome, never>>) => SegmentOutcome;
2474
2446
  defaults: () => Partial<SegmentOutcome>;
2475
2447
  }>;
2448
+ /**
2449
+ * A minted session key's public half. `kid` is the vault's handle for it (typically SHA-256 of
2450
+ * the public key); `public_key` is the uncompressed SEC1 point (65 bytes from `0x04` for ES256),
2451
+ * which the SDK wraps as a `COSE_Key` (C2PA 2.4 19.4.4).
2452
+ */
2453
+ export type SessionKey = {
2454
+ kid: ArrayBuffer;
2455
+ publicKey: ArrayBuffer;
2456
+ };
2457
+ /**
2458
+ * Generated factory for {@link SessionKey} record objects.
2459
+ */
2460
+ export declare const SessionKey: Readonly<{
2461
+ create: (partial: Partial<SessionKey> & Required<Omit<SessionKey, never>>) => SessionKey;
2462
+ new: (partial: Partial<SessionKey> & Required<Omit<SessionKey, never>>) => SessionKey;
2463
+ defaults: () => Partial<SessionKey>;
2464
+ }>;
2476
2465
  /**
2477
2466
  * A ranged read+write backend for embedding. All four methods are first-class (UniFFI
2478
2467
  * has no trait inheritance for foreign callbacks, so the read half is duplicated from
@@ -2534,10 +2523,9 @@ export declare enum SignOutput_Tags {
2534
2523
  Asset = "Asset"
2535
2524
  }
2536
2525
  /**
2537
- * What a `sign` hands back beyond the sidecar it always returns: the sidecar alone, or the
2538
- * signed asset written through `into` in the same call. See the core
2539
- * [`SignOutput`](crate::manifest::spec::SignOutput) for what pointing `into` at the asset's own
2540
- * storage means.
2526
+ * What a `sign` hands back beyond the sidecar it always returns: the sidecar alone, or the whole
2527
+ * signed asset written into `into` in the same call, replacing what it held. See the core
2528
+ * [`SignOutput`](core::SignOutput) for what pointing `into` at the asset's own storage means.
2541
2529
  */
2542
2530
  export declare const SignOutput: Readonly<{
2543
2531
  instanceOf: (obj: any) => obj is SignOutput;
@@ -2608,30 +2596,27 @@ export declare const SignOutput: Readonly<{
2608
2596
  };
2609
2597
  }>;
2610
2598
  /**
2611
- * What a `sign` hands back beyond the sidecar it always returns: the sidecar alone, or the
2612
- * signed asset written through `into` in the same call. See the core
2613
- * [`SignOutput`](crate::manifest::spec::SignOutput) for what pointing `into` at the asset's own
2614
- * storage means.
2599
+ * What a `sign` hands back beyond the sidecar it always returns: the sidecar alone, or the whole
2600
+ * signed asset written into `into` in the same call, replacing what it held. See the core
2601
+ * [`SignOutput`](core::SignOutput) for what pointing `into` at the asset's own storage means.
2615
2602
  */
2616
2603
  export type SignOutput = InstanceType<typeof SignOutput['Sidecar' | 'Asset']>;
2617
2604
  export declare enum AssetDelivery_Tags {
2618
2605
  Embedded = "Embedded",
2619
2606
  Remote = "Remote",
2620
- Both = "Both"
2607
+ EmbeddedAndRemote = "EmbeddedAndRemote"
2621
2608
  }
2622
2609
  /**
2623
- * How a static asset's manifest is delivered, which binders it declares, and what comes back.
2610
+ * Where a static asset's manifest lives and, when it is in the asset, what comes back.
2624
2611
  *
2625
- * Embedded manifests may still need bindings, for example to describe a bound watermark, but
2626
- * are not indexed. Remote needs at least one resolved binding, from a binder or a bound
2627
- * watermark action, and never touches the asset, so it names no output; both is recoverable
2628
- * through its embedded manifest and permits an empty strategy list.
2612
+ * Embedded manifests are not indexed, so a watermark on one is refused: it could never lead back
2613
+ * to the manifest. Remote needs a soft binding the deployment resolves and never touches the
2614
+ * asset, so it names no output.
2629
2615
  */
2630
2616
  export declare const AssetDelivery: Readonly<{
2631
2617
  instanceOf: (obj: any) => obj is AssetDelivery;
2632
2618
  Embedded: {
2633
2619
  new (inner: {
2634
- binders: Array<Binder>;
2635
2620
  output: SignOutput;
2636
2621
  }): {
2637
2622
  /**
@@ -2641,12 +2626,10 @@ export declare const AssetDelivery: Readonly<{
2641
2626
  readonly [uniffiTypeNameSymbol]: "AssetDelivery";
2642
2627
  readonly tag: AssetDelivery_Tags.Embedded;
2643
2628
  readonly inner: Readonly<{
2644
- binders: Array<Binder>;
2645
2629
  output: SignOutput;
2646
2630
  }>;
2647
2631
  };
2648
2632
  "new"(inner: {
2649
- binders: Array<Binder>;
2650
2633
  output: SignOutput;
2651
2634
  }): {
2652
2635
  /**
@@ -2656,7 +2639,6 @@ export declare const AssetDelivery: Readonly<{
2656
2639
  readonly [uniffiTypeNameSymbol]: "AssetDelivery";
2657
2640
  readonly tag: AssetDelivery_Tags.Embedded;
2658
2641
  readonly inner: Readonly<{
2659
- binders: Array<Binder>;
2660
2642
  output: SignOutput;
2661
2643
  }>;
2662
2644
  };
@@ -2668,37 +2650,26 @@ export declare const AssetDelivery: Readonly<{
2668
2650
  readonly [uniffiTypeNameSymbol]: "AssetDelivery";
2669
2651
  readonly tag: AssetDelivery_Tags.Embedded;
2670
2652
  readonly inner: Readonly<{
2671
- binders: Array<Binder>;
2672
2653
  output: SignOutput;
2673
2654
  }>;
2674
2655
  };
2675
2656
  };
2676
2657
  Remote: {
2677
- new (inner: {
2678
- binders: Array<Binder>;
2679
- }): {
2658
+ new (): {
2680
2659
  /**
2681
2660
  * @private
2682
2661
  * This field is private and should not be used, use `tag` instead.
2683
2662
  */
2684
2663
  readonly [uniffiTypeNameSymbol]: "AssetDelivery";
2685
2664
  readonly tag: AssetDelivery_Tags.Remote;
2686
- readonly inner: Readonly<{
2687
- binders: Array<Binder>;
2688
- }>;
2689
2665
  };
2690
- "new"(inner: {
2691
- binders: Array<Binder>;
2692
- }): {
2666
+ "new"(): {
2693
2667
  /**
2694
2668
  * @private
2695
2669
  * This field is private and should not be used, use `tag` instead.
2696
2670
  */
2697
2671
  readonly [uniffiTypeNameSymbol]: "AssetDelivery";
2698
2672
  readonly tag: AssetDelivery_Tags.Remote;
2699
- readonly inner: Readonly<{
2700
- binders: Array<Binder>;
2701
- }>;
2702
2673
  };
2703
2674
  instanceOf(obj: any): obj is {
2704
2675
  /**
@@ -2707,14 +2678,10 @@ export declare const AssetDelivery: Readonly<{
2707
2678
  */
2708
2679
  readonly [uniffiTypeNameSymbol]: "AssetDelivery";
2709
2680
  readonly tag: AssetDelivery_Tags.Remote;
2710
- readonly inner: Readonly<{
2711
- binders: Array<Binder>;
2712
- }>;
2713
2681
  };
2714
2682
  };
2715
- Both: {
2683
+ EmbeddedAndRemote: {
2716
2684
  new (inner: {
2717
- binders: Array<Binder>;
2718
2685
  output: SignOutput;
2719
2686
  }): {
2720
2687
  /**
@@ -2722,14 +2689,12 @@ export declare const AssetDelivery: Readonly<{
2722
2689
  * This field is private and should not be used, use `tag` instead.
2723
2690
  */
2724
2691
  readonly [uniffiTypeNameSymbol]: "AssetDelivery";
2725
- readonly tag: AssetDelivery_Tags.Both;
2692
+ readonly tag: AssetDelivery_Tags.EmbeddedAndRemote;
2726
2693
  readonly inner: Readonly<{
2727
- binders: Array<Binder>;
2728
2694
  output: SignOutput;
2729
2695
  }>;
2730
2696
  };
2731
2697
  "new"(inner: {
2732
- binders: Array<Binder>;
2733
2698
  output: SignOutput;
2734
2699
  }): {
2735
2700
  /**
@@ -2737,9 +2702,8 @@ export declare const AssetDelivery: Readonly<{
2737
2702
  * This field is private and should not be used, use `tag` instead.
2738
2703
  */
2739
2704
  readonly [uniffiTypeNameSymbol]: "AssetDelivery";
2740
- readonly tag: AssetDelivery_Tags.Both;
2705
+ readonly tag: AssetDelivery_Tags.EmbeddedAndRemote;
2741
2706
  readonly inner: Readonly<{
2742
- binders: Array<Binder>;
2743
2707
  output: SignOutput;
2744
2708
  }>;
2745
2709
  };
@@ -2749,48 +2713,51 @@ export declare const AssetDelivery: Readonly<{
2749
2713
  * This field is private and should not be used, use `tag` instead.
2750
2714
  */
2751
2715
  readonly [uniffiTypeNameSymbol]: "AssetDelivery";
2752
- readonly tag: AssetDelivery_Tags.Both;
2716
+ readonly tag: AssetDelivery_Tags.EmbeddedAndRemote;
2753
2717
  readonly inner: Readonly<{
2754
- binders: Array<Binder>;
2755
2718
  output: SignOutput;
2756
2719
  }>;
2757
2720
  };
2758
2721
  };
2759
2722
  }>;
2760
2723
  /**
2761
- * How a static asset's manifest is delivered, which binders it declares, and what comes back.
2724
+ * Where a static asset's manifest lives and, when it is in the asset, what comes back.
2762
2725
  *
2763
- * Embedded manifests may still need bindings, for example to describe a bound watermark, but
2764
- * are not indexed. Remote needs at least one resolved binding, from a binder or a bound
2765
- * watermark action, and never touches the asset, so it names no output; both is recoverable
2766
- * through its embedded manifest and permits an empty strategy list.
2726
+ * Embedded manifests are not indexed, so a watermark on one is refused: it could never lead back
2727
+ * to the manifest. Remote needs a soft binding the deployment resolves and never touches the
2728
+ * asset, so it names no output.
2767
2729
  */
2768
- export type AssetDelivery = InstanceType<typeof AssetDelivery['Embedded' | 'Remote' | 'Both']>;
2730
+ export type AssetDelivery = InstanceType<typeof AssetDelivery['Embedded' | 'Remote' | 'EmbeddedAndRemote']>;
2769
2731
  /**
2770
- * Options for `sign`. The delivery owns where the manifest lives, its binders and what comes
2771
- * back; the format is how the asset's is known, stated or sniffed; the thumbnail is the claim
2772
- * thumbnail the caller rendered, since the split-signer never sees the asset.
2732
+ * What one `sign` is told beyond the asset, its manifest and the plugins.
2773
2733
  */
2774
2734
  export type SignOptions = {
2775
2735
  delivery: AssetDelivery;
2776
- format: AssetFormat;
2736
+ /**
2737
+ * The asset's media type; `None` reads it from the leading bytes.
2738
+ */
2739
+ format?: string;
2740
+ /**
2741
+ * The claim thumbnail, rendered by the caller: the split signer never sees the asset.
2742
+ */
2777
2743
  thumbnail?: Thumbnail;
2744
+ softBindings: Array<SoftBindingSource>;
2778
2745
  };
2779
2746
  /**
2780
2747
  * Generated factory for {@link SignOptions} record objects.
2781
2748
  */
2782
2749
  export declare const SignOptions: Readonly<{
2783
- create: (partial: Partial<SignOptions> & Required<Omit<SignOptions, "thumbnail">>) => SignOptions;
2784
- new: (partial: Partial<SignOptions> & Required<Omit<SignOptions, "thumbnail">>) => SignOptions;
2750
+ create: (partial: Partial<SignOptions> & Required<Omit<SignOptions, "format" | "softBindings" | "thumbnail">>) => SignOptions;
2751
+ new: (partial: Partial<SignOptions> & Required<Omit<SignOptions, "format" | "softBindings" | "thumbnail">>) => SignOptions;
2785
2752
  defaults: () => Partial<SignOptions>;
2786
2753
  }>;
2787
2754
  /**
2788
2755
  * Result of [`AssetIssuer::sign`](super::AssetIssuer::sign): the sidecar to embed plus its active
2789
- * C2PA manifest id. Remote and both modes persist that id; embedded mode does not.
2756
+ * C2PA manifest id. `Remote` and `EmbeddedAndRemote` persist that id; `Embedded` does not.
2790
2757
  */
2791
2758
  export type SignOutcome = {
2792
2759
  /**
2793
- * The manifest sidecar to embed into the asset (see [`embed`](crate::ffi::embed)).
2760
+ * The manifest sidecar to embed into the asset (see `embed`).
2794
2761
  */
2795
2762
  sidecar: ArrayBuffer;
2796
2763
  /**
@@ -2806,23 +2773,23 @@ export declare const SignOutcome: Readonly<{
2806
2773
  new: (partial: Partial<SignOutcome> & Required<Omit<SignOutcome, never>>) => SignOutcome;
2807
2774
  defaults: () => Partial<SignOutcome>;
2808
2775
  }>;
2809
- export declare enum Origin_Tags {
2776
+ export declare enum StreamOrigin_Tags {
2810
2777
  Created = "Created",
2811
2778
  Opened = "Opened"
2812
2779
  }
2813
2780
  /**
2814
- * An origin a live stream states; see the core [`provenance::Origin`].
2781
+ * An origin a stream states; see the core [`provenance::StreamOrigin`].
2815
2782
  */
2816
- export declare const Origin: Readonly<{
2817
- instanceOf: (obj: any) => obj is Origin;
2783
+ export declare const StreamOrigin: Readonly<{
2784
+ instanceOf: (obj: any) => obj is StreamOrigin;
2818
2785
  Created: {
2819
2786
  new (v0: CreatedOrigin): {
2820
2787
  /**
2821
2788
  * @private
2822
2789
  * This field is private and should not be used, use `tag` instead.
2823
2790
  */
2824
- readonly [uniffiTypeNameSymbol]: "Origin";
2825
- readonly tag: Origin_Tags.Created;
2791
+ readonly [uniffiTypeNameSymbol]: "StreamOrigin";
2792
+ readonly tag: StreamOrigin_Tags.Created;
2826
2793
  readonly inner: Readonly<[CreatedOrigin]>;
2827
2794
  };
2828
2795
  "new"(v0: CreatedOrigin): {
@@ -2830,8 +2797,8 @@ export declare const Origin: Readonly<{
2830
2797
  * @private
2831
2798
  * This field is private and should not be used, use `tag` instead.
2832
2799
  */
2833
- readonly [uniffiTypeNameSymbol]: "Origin";
2834
- readonly tag: Origin_Tags.Created;
2800
+ readonly [uniffiTypeNameSymbol]: "StreamOrigin";
2801
+ readonly tag: StreamOrigin_Tags.Created;
2835
2802
  readonly inner: Readonly<[CreatedOrigin]>;
2836
2803
  };
2837
2804
  instanceOf(obj: any): obj is {
@@ -2839,8 +2806,8 @@ export declare const Origin: Readonly<{
2839
2806
  * @private
2840
2807
  * This field is private and should not be used, use `tag` instead.
2841
2808
  */
2842
- readonly [uniffiTypeNameSymbol]: "Origin";
2843
- readonly tag: Origin_Tags.Created;
2809
+ readonly [uniffiTypeNameSymbol]: "StreamOrigin";
2810
+ readonly tag: StreamOrigin_Tags.Created;
2844
2811
  readonly inner: Readonly<[CreatedOrigin]>;
2845
2812
  };
2846
2813
  };
@@ -2850,8 +2817,8 @@ export declare const Origin: Readonly<{
2850
2817
  * @private
2851
2818
  * This field is private and should not be used, use `tag` instead.
2852
2819
  */
2853
- readonly [uniffiTypeNameSymbol]: "Origin";
2854
- readonly tag: Origin_Tags.Opened;
2820
+ readonly [uniffiTypeNameSymbol]: "StreamOrigin";
2821
+ readonly tag: StreamOrigin_Tags.Opened;
2855
2822
  readonly inner: Readonly<[OpenedOrigin]>;
2856
2823
  };
2857
2824
  "new"(v0: OpenedOrigin): {
@@ -2859,8 +2826,8 @@ export declare const Origin: Readonly<{
2859
2826
  * @private
2860
2827
  * This field is private and should not be used, use `tag` instead.
2861
2828
  */
2862
- readonly [uniffiTypeNameSymbol]: "Origin";
2863
- readonly tag: Origin_Tags.Opened;
2829
+ readonly [uniffiTypeNameSymbol]: "StreamOrigin";
2830
+ readonly tag: StreamOrigin_Tags.Opened;
2864
2831
  readonly inner: Readonly<[OpenedOrigin]>;
2865
2832
  };
2866
2833
  instanceOf(obj: any): obj is {
@@ -2868,62 +2835,73 @@ export declare const Origin: Readonly<{
2868
2835
  * @private
2869
2836
  * This field is private and should not be used, use `tag` instead.
2870
2837
  */
2871
- readonly [uniffiTypeNameSymbol]: "Origin";
2872
- readonly tag: Origin_Tags.Opened;
2838
+ readonly [uniffiTypeNameSymbol]: "StreamOrigin";
2839
+ readonly tag: StreamOrigin_Tags.Opened;
2873
2840
  readonly inner: Readonly<[OpenedOrigin]>;
2874
2841
  };
2875
2842
  };
2876
2843
  }>;
2877
2844
  /**
2878
- * An origin a live stream states; see the core [`provenance::Origin`].
2845
+ * An origin a stream states; see the core [`provenance::StreamOrigin`].
2879
2846
  */
2880
- export type Origin = InstanceType<typeof Origin['Created' | 'Opened']>;
2847
+ export type StreamOrigin = InstanceType<typeof StreamOrigin['Created' | 'Opened']>;
2881
2848
  /**
2882
- * The manifest a live stream's init segment is signed with: the asset spec's twin whose origin
2883
- * is an [`Origin`], since an init segment has no store the SDK opens as the parent.
2849
+ * The manifest a stream's init segment is signed with: the asset spec's twin whose origin is a
2850
+ * [`StreamOrigin`], since an init segment has no store the SDK opens as the parent.
2884
2851
  */
2885
2852
  export type StreamManifestSpec = {
2886
2853
  title?: string;
2887
- origin: Origin;
2854
+ origin: StreamOrigin;
2855
+ /**
2856
+ * Every action performed on the asset; the manifest states the list is complete (C2PA
2857
+ * `allActionsIncluded`).
2858
+ */
2888
2859
  actions: Array<Action>;
2889
2860
  identity?: Identity;
2890
2861
  assertions: Array<Assertion>;
2891
- components: Array<Component>;
2862
+ /**
2863
+ * Keyed by the handle actions name them by.
2864
+ */
2865
+ components: Map<string, Component>;
2892
2866
  };
2893
2867
  /**
2894
2868
  * Generated factory for {@link StreamManifestSpec} record objects.
2895
2869
  */
2896
2870
  export declare const StreamManifestSpec: Readonly<{
2897
- create: (partial: Partial<StreamManifestSpec> & Required<Omit<StreamManifestSpec, "identity" | "title">>) => StreamManifestSpec;
2898
- new: (partial: Partial<StreamManifestSpec> & Required<Omit<StreamManifestSpec, "identity" | "title">>) => StreamManifestSpec;
2871
+ create: (partial: Partial<StreamManifestSpec> & Required<Omit<StreamManifestSpec, "actions" | "assertions" | "components" | "identity" | "title">>) => StreamManifestSpec;
2872
+ new: (partial: Partial<StreamManifestSpec> & Required<Omit<StreamManifestSpec, "actions" | "assertions" | "components" | "identity" | "title">>) => StreamManifestSpec;
2899
2873
  defaults: () => Partial<StreamManifestSpec>;
2900
2874
  }>;
2901
2875
  /**
2902
- * One live stream, from `init` to `stop`.
2876
+ * One stream, from `init` to `stop` or `rotate`.
2903
2877
  *
2904
- * Carries the whole per-stream state, so it cannot be mistyped, reused after `stop`, or
2905
- * confused with another stream's: every call after `init` goes through the handle that started
2906
- * it, and nothing about the stream ever appears in a caller's argument list again.
2878
+ * Carries the whole per-stream state, so it cannot be mistyped or confused with another
2879
+ * stream's: every call after `init` goes through the handle that started it, and nothing about
2880
+ * the stream ever appears in a caller's argument list again. Once `stop` or a `rotate` succeeds
2881
+ * it refuses every call.
2907
2882
  */
2908
2883
  export interface StreamSessionLike {
2909
2884
  /**
2910
2885
  * Sign one media (moof) segment from a [`RangeSource`]. Does not touch the signer channel;
2911
2886
  * works through a signer outage. `rotation_due` flips when the key validity threshold
2912
- * passes; re-`init` on the issuer to rotate.
2887
+ * passes; then call `StreamIssuer.rotate` with this session.
2913
2888
  *
2914
2889
  * # Errors
2915
2890
  *
2916
- * Fails on a vault error, or a segment that isn't a BMFF media segment.
2891
+ * Fails on a vault error, a segment that isn't a BMFF media segment, or with
2892
+ * `FAILED_PRECONDITION` (`SESSION_ENDED`) after `stop` or a `rotate`.
2917
2893
  */
2918
- sign(body: RangeSource, asyncOpts_?: {
2894
+ sign(source: RangeSource, asyncOpts_?: {
2919
2895
  signal: AbortSignal;
2920
2896
  }): Promise<SegmentOutcome>;
2921
2897
  /**
2922
- * End the stream: forget its session key, so nothing can sign under it again.
2898
+ * End the stream: forget its session key, so nothing can sign under it again. Idempotent:
2899
+ * stopping an ended session succeeds. A failed stop can be retried.
2923
2900
  *
2924
2901
  * # Errors
2925
2902
  *
2926
- * Fails on a vault error.
2903
+ * Fails on a vault error, or with `FAILED_PRECONDITION` (`SESSION_ENDED`) with another
2904
+ * `stop` or `rotate` in flight.
2927
2905
  */
2928
2906
  stop(asyncOpts_?: {
2929
2907
  signal: AbortSignal;
@@ -2934,11 +2912,12 @@ export interface StreamSessionLike {
2934
2912
  */
2935
2913
  export type StreamSessionInterface = StreamSessionLike;
2936
2914
  /**
2937
- * One live stream, from `init` to `stop`.
2915
+ * One stream, from `init` to `stop` or `rotate`.
2938
2916
  *
2939
- * Carries the whole per-stream state, so it cannot be mistyped, reused after `stop`, or
2940
- * confused with another stream's: every call after `init` goes through the handle that started
2941
- * it, and nothing about the stream ever appears in a caller's argument list again.
2917
+ * Carries the whole per-stream state, so it cannot be mistyped or confused with another
2918
+ * stream's: every call after `init` goes through the handle that started it, and nothing about
2919
+ * the stream ever appears in a caller's argument list again. Once `stop` or a `rotate` succeeds
2920
+ * it refuses every call.
2942
2921
  */
2943
2922
  export declare class StreamSession extends UniffiAbstractObject implements StreamSessionLike {
2944
2923
  readonly [uniffiTypeNameSymbol] = "StreamSession";
@@ -2948,21 +2927,24 @@ export declare class StreamSession extends UniffiAbstractObject implements Strea
2948
2927
  /**
2949
2928
  * Sign one media (moof) segment from a [`RangeSource`]. Does not touch the signer channel;
2950
2929
  * works through a signer outage. `rotation_due` flips when the key validity threshold
2951
- * passes; re-`init` on the issuer to rotate.
2930
+ * passes; then call `StreamIssuer.rotate` with this session.
2952
2931
  *
2953
2932
  * # Errors
2954
2933
  *
2955
- * Fails on a vault error, or a segment that isn't a BMFF media segment.
2934
+ * Fails on a vault error, a segment that isn't a BMFF media segment, or with
2935
+ * `FAILED_PRECONDITION` (`SESSION_ENDED`) after `stop` or a `rotate`.
2956
2936
  */
2957
- sign(body: RangeSource, asyncOpts_?: {
2937
+ sign(source: RangeSource, asyncOpts_?: {
2958
2938
  signal: AbortSignal;
2959
2939
  }): Promise<SegmentOutcome>;
2960
2940
  /**
2961
- * End the stream: forget its session key, so nothing can sign under it again.
2941
+ * End the stream: forget its session key, so nothing can sign under it again. Idempotent:
2942
+ * stopping an ended session succeeds. A failed stop can be retried.
2962
2943
  *
2963
2944
  * # Errors
2964
2945
  *
2965
- * Fails on a vault error.
2946
+ * Fails on a vault error, or with `FAILED_PRECONDITION` (`SESSION_ENDED`) with another
2947
+ * `stop` or `rotate` in flight.
2966
2948
  */
2967
2949
  stop(asyncOpts_?: {
2968
2950
  signal: AbortSignal;
@@ -2993,25 +2975,8 @@ export declare const StreamStart: Readonly<{
2993
2975
  defaults: () => Partial<StreamStart>;
2994
2976
  }>;
2995
2977
  /**
2996
- * `kid` is the vault-derived handle (typically SHA-256 of SEC1 public).
2997
- * `public_key_sec1` is uncompressed SEC1 (65 bytes starting with `0x04`
2998
- * for ES256); the SDK rewraps as `COSE_Key` for §19.4.4.
2999
- */
3000
- export type VaultPublicKey = {
3001
- kid: ArrayBuffer;
3002
- publicKeySec1: ArrayBuffer;
3003
- };
3004
- /**
3005
- * Generated factory for {@link VaultPublicKey} record objects.
3006
- */
3007
- export declare const VaultPublicKey: Readonly<{
3008
- create: (partial: Partial<VaultPublicKey> & Required<Omit<VaultPublicKey, never>>) => VaultPublicKey;
3009
- new: (partial: Partial<VaultPublicKey> & Required<Omit<VaultPublicKey, never>>) => VaultPublicKey;
3010
- defaults: () => Partial<VaultPublicKey>;
3011
- }>;
3012
- /**
3013
- * Whether a fragmented-MP4 segment is the init (moov) or a media (moof) segment: which
3014
- * [`StreamIssuer`](stream::StreamIssuer) entrypoint (`init` vs `sign`) a segment belongs to.
2978
+ * Whether a fragmented-MP4 segment is the init (moov) or a media (moof) segment: whether it goes
2979
+ * to `StreamIssuer.init` or `StreamSession.sign`.
3015
2980
  */
3016
2981
  export declare enum SegmentKind {
3017
2982
  Init = 0,
@@ -3034,25 +2999,25 @@ export interface PluginAuthor {
3034
2999
  * Implement it correctly anyway, since the verify side dispatches on it and whatever
3035
3000
  * signs a format is eventually verified by it.
3036
3001
  */
3037
- sniff(src: RangeSource, asyncOpts_?: {
3002
+ sniff(source: RangeSource, asyncOpts_?: {
3038
3003
  signal: AbortSignal;
3039
3004
  }): Promise<string | undefined>;
3040
3005
  /**
3041
3006
  * The manifest window(s), or empty when none is present. MUST be byte-identical
3042
3007
  * regardless of slot contents; the sign driver enforces that with a round-trip.
3043
3008
  */
3044
- locate(src: RangeSource, asyncOpts_?: {
3009
+ locate(source: RangeSource, asyncOpts_?: {
3045
3010
  signal: AbortSignal;
3046
- }): Promise<Array<Region>>;
3011
+ }): Promise<Array<ByteRange>>;
3047
3012
  /**
3048
3013
  * Reserve `reserve` bytes of manifest slot by writing container structure through
3049
- * `dst`, and return exactly where it landed. The core excludes those regions from the
3050
- * content hash and writes the signed manifest into them, so the plugin never embeds
3051
- * and never re-locates.
3014
+ * `sink`, and return exactly where it landed. The core excludes those regions from the
3015
+ * content hash and writes the signed manifest into them, then checks that `locate`
3016
+ * still reports the same regions.
3052
3017
  */
3053
- reserveSlot(dst: RangeSink, reserve: bigint, asyncOpts_?: {
3018
+ reserveSlot(sink: RangeSink, reserve: bigint, asyncOpts_?: {
3054
3019
  signal: AbortSignal;
3055
- }): Promise<Array<Region>>;
3020
+ }): Promise<Array<ByteRange>>;
3056
3021
  }
3057
3022
  /**
3058
3023
  * A C2PA asset signer bound to a [`SignerClient`](super::client::SignerClient).
@@ -3060,16 +3025,14 @@ export interface PluginAuthor {
3060
3025
  */
3061
3026
  export interface AssetIssuerLike {
3062
3027
  /**
3063
- * Sign an asset from a [`RangeSource`], returning the sidecar plus the registry
3064
- * `manifest_id`. `options.delivery` selects where the manifest lives, its binders and,
3065
- * through its output, the sink the signed asset is written through. `options.format` is
3066
- * how the asset's format is known. `plugins` resolves a non-c2pa format (e.g. MXF); see the
3067
- * module docs for the dispatch.
3028
+ * Sign an asset from a [`RangeSource`], returning the sidecar and the active manifest's id.
3029
+ * `options.delivery` says where the manifest lives and, through its output, where the signed
3030
+ * asset is written. `plugins` resolves a non-c2pa format (e.g. MXF); see the module docs.
3068
3031
  *
3069
3032
  * # Errors
3070
3033
  *
3071
- * Fails on RPC failure, a hashing error, an authoring error, a protocol violation,
3072
- * or when the format can't be inferred and none was given.
3034
+ * A format that is no media type, that the bytes contradict or that neither names; an RPC,
3035
+ * hashing, authoring or protocol failure.
3073
3036
  */
3074
3037
  sign(source: RangeSource, manifest: AssetManifestSpec, options: SignOptions, plugins: Array<PluginAuthor>, asyncOpts_?: {
3075
3038
  signal: AbortSignal;
@@ -3093,41 +3056,40 @@ export declare class AssetIssuer extends UniffiAbstractObject implements AssetIs
3093
3056
  */
3094
3057
  static create(client: SignerClientLike): AssetIssuerLike;
3095
3058
  /**
3096
- * Sign an asset from a [`RangeSource`], returning the sidecar plus the registry
3097
- * `manifest_id`. `options.delivery` selects where the manifest lives, its binders and,
3098
- * through its output, the sink the signed asset is written through. `options.format` is
3099
- * how the asset's format is known. `plugins` resolves a non-c2pa format (e.g. MXF); see the
3100
- * module docs for the dispatch.
3059
+ * Sign an asset from a [`RangeSource`], returning the sidecar and the active manifest's id.
3060
+ * `options.delivery` says where the manifest lives and, through its output, where the signed
3061
+ * asset is written. `plugins` resolves a non-c2pa format (e.g. MXF); see the module docs.
3101
3062
  *
3102
3063
  * # Errors
3103
3064
  *
3104
- * Fails on RPC failure, a hashing error, an authoring error, a protocol violation,
3105
- * or when the format can't be inferred and none was given.
3065
+ * A format that is no media type, that the bytes contradict or that neither names; an RPC,
3066
+ * hashing, authoring or protocol failure.
3106
3067
  */
3107
- sign(source: RangeSource, manifest: AssetManifestSpec, options: SignOptions, plugins: Array<PluginAuthor>, asyncOpts_?: {
3068
+ sign(source: RangeSource, manifest: AssetManifestSpec, options: SignOptions, plugins?: Array<PluginAuthor>, asyncOpts_?: {
3108
3069
  signal: AbortSignal;
3109
3070
  }): Promise<SignOutcome>;
3110
3071
  uniffiDestroy(): void;
3111
3072
  static instanceOf(obj_: any): obj_ is AssetIssuer;
3112
3073
  }
3113
3074
  /**
3114
- * Applies invisible watermarks through the deployment's marking service.
3075
+ * Inserts invisible watermarks through the deployment's marking route.
3115
3076
  *
3116
3077
  * Separate from [`AssetIssuer`] because marking is a content edit, not a signing step: it
3117
- * changes pixels, it happens before signing, and it returns the provenance facts it created
3118
- * rather than leaving anything downstream to infer them.
3078
+ * happens before signing, and it returns the actions it owes the manifest.
3119
3079
  */
3120
3080
  export interface AssetMarkerLike {
3121
3081
  /**
3122
- * Mark an image from a [`RangeSource`] and return it with the actions the marking created,
3123
- * each bound one carrying its binding.
3082
+ * Mark an asset from a [`RangeSource`], writing the marked asset into `into` in place of
3083
+ * what it held, and return one `c2pa.watermarked.*` action per mark, in the order inserted.
3084
+ * Sign what `into` holds.
3124
3085
  *
3125
3086
  * # Errors
3126
3087
  *
3127
- * Fails when the format can't be resolved, the asset is above the upload ceiling, the HTTP
3128
- * request fails, or the service response is malformed.
3088
+ * An unlisted algorithm, a format that is no media type or that the bytes contradict, an
3089
+ * asset above the upload ceiling, a source or sink that fails, or a marking route that
3090
+ * refused or answered out of contract.
3129
3091
  */
3130
- mark(source: RangeSource, options: MarkOptions, asyncOpts_?: {
3092
+ mark(source: RangeSource, into: RangeSink, options: MarkOptions, asyncOpts_?: {
3131
3093
  signal: AbortSignal;
3132
3094
  }): Promise<MarkOutcome>;
3133
3095
  }
@@ -3136,11 +3098,10 @@ export interface AssetMarkerLike {
3136
3098
  */
3137
3099
  export type AssetMarkerInterface = AssetMarkerLike;
3138
3100
  /**
3139
- * Applies invisible watermarks through the deployment's marking service.
3101
+ * Inserts invisible watermarks through the deployment's marking route.
3140
3102
  *
3141
3103
  * Separate from [`AssetIssuer`] because marking is a content edit, not a signing step: it
3142
- * changes pixels, it happens before signing, and it returns the provenance facts it created
3143
- * rather than leaving anything downstream to infer them.
3104
+ * happens before signing, and it returns the actions it owes the manifest.
3144
3105
  */
3145
3106
  export declare class AssetMarker extends UniffiAbstractObject implements AssetMarkerLike {
3146
3107
  readonly [uniffiTypeNameSymbol] = "AssetMarker";
@@ -3152,15 +3113,17 @@ export declare class AssetMarker extends UniffiAbstractObject implements AssetMa
3152
3113
  */
3153
3114
  static create(client: SignerClientLike): AssetMarkerLike;
3154
3115
  /**
3155
- * Mark an image from a [`RangeSource`] and return it with the actions the marking created,
3156
- * each bound one carrying its binding.
3116
+ * Mark an asset from a [`RangeSource`], writing the marked asset into `into` in place of
3117
+ * what it held, and return one `c2pa.watermarked.*` action per mark, in the order inserted.
3118
+ * Sign what `into` holds.
3157
3119
  *
3158
3120
  * # Errors
3159
3121
  *
3160
- * Fails when the format can't be resolved, the asset is above the upload ceiling, the HTTP
3161
- * request fails, or the service response is malformed.
3122
+ * An unlisted algorithm, a format that is no media type or that the bytes contradict, an
3123
+ * asset above the upload ceiling, a source or sink that fails, or a marking route that
3124
+ * refused or answered out of contract.
3162
3125
  */
3163
- mark(source: RangeSource, options: MarkOptions, asyncOpts_?: {
3126
+ mark(source: RangeSource, into: RangeSink, options: MarkOptions, asyncOpts_?: {
3164
3127
  signal: AbortSignal;
3165
3128
  }): Promise<MarkOutcome>;
3166
3129
  uniffiDestroy(): void;
@@ -3178,10 +3141,6 @@ export declare class AssetMarker extends UniffiAbstractObject implements AssetMa
3178
3141
  * That is what makes [`MemorySink`]'s ceiling stop applying: there is no byte array to count in an
3179
3142
  * `i32` and nothing resident, so a multi-GB master is signed at the disk's speed rather than the
3180
3143
  * host thread's, and `bytes()` is not something anyone has to call.
3181
- *
3182
- * No lock. A positioned write to a file is one `pwrite`, which the OS already makes atomic per
3183
- * call, and [`RangeWriter`] takes a shared borrow precisely so a backend like this pays nothing
3184
- * for being shared.
3185
3144
  */
3186
3145
  export interface FileSinkLike {
3187
3146
  length(asyncOpts_?: {
@@ -3213,10 +3172,6 @@ export type FileSinkInterface = FileSinkLike;
3213
3172
  * That is what makes [`MemorySink`]'s ceiling stop applying: there is no byte array to count in an
3214
3173
  * `i32` and nothing resident, so a multi-GB master is signed at the disk's speed rather than the
3215
3174
  * host thread's, and `bytes()` is not something anyone has to call.
3216
- *
3217
- * No lock. A positioned write to a file is one `pwrite`, which the OS already makes atomic per
3218
- * call, and [`RangeWriter`] takes a shared borrow precisely so a backend like this pays nothing
3219
- * for being shared.
3220
3175
  */
3221
3176
  export declare class FileSink extends UniffiAbstractObject implements FileSinkLike {
3222
3177
  readonly [uniffiTypeNameSymbol] = "FileSink";
@@ -3224,8 +3179,8 @@ export declare class FileSink extends UniffiAbstractObject implements FileSinkLi
3224
3179
  readonly [pointerLiteralSymbol]: UniffiHandle;
3225
3180
  private constructor();
3226
3181
  /**
3227
- * Create `path`, or truncate it if it is already there. What `embed` wants: it composes a
3228
- * whole asset, so the sink starts empty and grows.
3182
+ * Create `path`, or truncate it if it is already there. What a `sign` output wants: the
3183
+ * signed asset is written into it whole.
3229
3184
  *
3230
3185
  * # Errors
3231
3186
  *
@@ -3233,9 +3188,9 @@ export declare class FileSink extends UniffiAbstractObject implements FileSinkLi
3233
3188
  */
3234
3189
  static create(path: string): FileSinkLike;
3235
3190
  /**
3236
- * Open an existing `path` for reading and writing, keeping what is in it. What a fixed-slot
3237
- * patch wants: the asset is already there and only its reserved range changes, so truncating
3238
- * it would destroy the very thing being signed.
3191
+ * Open an existing `path` for reading and writing, keeping what is in it. What `embed` wants:
3192
+ * the asset is already there and the manifest is written into it, so truncating it would
3193
+ * destroy the very thing being signed.
3239
3194
  *
3240
3195
  * # Errors
3241
3196
  *
@@ -3324,70 +3279,8 @@ export declare class FileSource extends UniffiAbstractObject implements FileSour
3324
3279
  static instanceOf(obj_: any): obj_ is FileSource;
3325
3280
  }
3326
3281
  /**
3327
- * A binding you already hold, such as an out-of-band video ISCC. Reads nothing.
3328
- */
3329
- export interface HeldBinderLike {
3330
- derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
3331
- signal: AbortSignal;
3332
- }): Promise<SoftBinding | undefined>;
3333
- }
3334
- /**
3335
- * @deprecated Use `HeldBinderLike` instead.
3336
- */
3337
- export type HeldBinderInterface = HeldBinderLike;
3338
- /**
3339
- * A binding you already hold, such as an out-of-band video ISCC. Reads nothing.
3340
- */
3341
- export declare class HeldBinder extends UniffiAbstractObject implements HeldBinderLike {
3342
- readonly [uniffiTypeNameSymbol] = "HeldBinder";
3343
- readonly [destructorGuardSymbol]: UniffiGcObject;
3344
- readonly [pointerLiteralSymbol]: UniffiHandle;
3345
- /**
3346
- * # Errors
3347
- *
3348
- * A binding with an empty algorithm or value.
3349
- */
3350
- constructor(binding: SoftBinding);
3351
- derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
3352
- signal: AbortSignal;
3353
- }): Promise<SoftBinding | undefined>;
3354
- uniffiDestroy(): void;
3355
- static instanceOf(obj_: any): obj_ is HeldBinder;
3356
- }
3357
- /**
3358
- * Local ISCC Image-Code for supported image formats.
3359
- */
3360
- export interface IsccBinderLike {
3361
- derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
3362
- signal: AbortSignal;
3363
- }): Promise<SoftBinding | undefined>;
3364
- }
3365
- /**
3366
- * @deprecated Use `IsccBinderLike` instead.
3367
- */
3368
- export type IsccBinderInterface = IsccBinderLike;
3369
- /**
3370
- * Local ISCC Image-Code for supported image formats.
3371
- */
3372
- export declare class IsccBinder extends UniffiAbstractObject implements IsccBinderLike {
3373
- readonly [uniffiTypeNameSymbol] = "IsccBinder";
3374
- readonly [destructorGuardSymbol]: UniffiGcObject;
3375
- readonly [pointerLiteralSymbol]: UniffiHandle;
3376
- constructor();
3377
- derive(source: RangeSource, options: DeriveOptions, asyncOpts_?: {
3378
- signal: AbortSignal;
3379
- }): Promise<SoftBinding | undefined>;
3380
- uniffiDestroy(): void;
3381
- static instanceOf(obj_: any): obj_ is IsccBinder;
3382
- }
3383
- /**
3384
- * An in-memory [`RangeSink`], for a caller that wants `embed`'s composed result back
3385
- * without writing a custom sink. A **native** implementation of a `with_foreign`
3386
- * interface (`#[uniffi::export]` on the trait impl, not the foreign callback path), so
3387
- * a Python caller writes no subclass: `sink = MemorySink(data)`, pass it to `embed`,
3388
- * then read `sink.bytes()` back. `&self`-only methods need interior mutability, so the
3389
- * buffer is `Mutex`-guarded (contention is a non-issue: the SDK calls it from one task
3390
- * at a time per sink).
3282
+ * An in-memory [`RangeSink`] for a caller that wants `embed`'s composed result back:
3283
+ * `sink = MemorySink(data)`, pass it to `embed`, then read `sink.bytes()`.
3391
3284
  *
3392
3285
  * # Size ceiling
3393
3286
  *
@@ -3399,9 +3292,14 @@ export declare class IsccBinder extends UniffiAbstractObject implements IsccBind
3399
3292
  * [`RangeSink`] over a file (or any store that seeks) for anything approaching that: the SDK
3400
3293
  * writes ranges straight through it and never holds the asset.
3401
3294
  *
3402
- * Construction and `bytes()` each copy the whole asset, on the calling thread: together with a
3403
- * `MemorySource` over the same asset that is about 12ms for 10 MB and 1.2s for 500 MB. A ranged
3404
- * sink pays none of it.
3295
+ * Construction and `bytes()` each move the whole asset across the boundary once, on the calling
3296
+ * thread. A ranged sink pays neither.
3297
+ *
3298
+ * # Capacity
3299
+ *
3300
+ * The buffer never grows past its capacity: [`MemorySink::new`] allows 2 GiB, and
3301
+ * [`MemorySink::with_capacity`] names another. A write or `set_length` that would exceed it fails
3302
+ * `ResourceExhausted` without allocating.
3405
3303
  */
3406
3304
  export interface MemorySinkLike {
3407
3305
  /**
@@ -3431,13 +3329,8 @@ export interface MemorySinkLike {
3431
3329
  */
3432
3330
  export type MemorySinkInterface = MemorySinkLike;
3433
3331
  /**
3434
- * An in-memory [`RangeSink`], for a caller that wants `embed`'s composed result back
3435
- * without writing a custom sink. A **native** implementation of a `with_foreign`
3436
- * interface (`#[uniffi::export]` on the trait impl, not the foreign callback path), so
3437
- * a Python caller writes no subclass: `sink = MemorySink(data)`, pass it to `embed`,
3438
- * then read `sink.bytes()` back. `&self`-only methods need interior mutability, so the
3439
- * buffer is `Mutex`-guarded (contention is a non-issue: the SDK calls it from one task
3440
- * at a time per sink).
3332
+ * An in-memory [`RangeSink`] for a caller that wants `embed`'s composed result back:
3333
+ * `sink = MemorySink(data)`, pass it to `embed`, then read `sink.bytes()`.
3441
3334
  *
3442
3335
  * # Size ceiling
3443
3336
  *
@@ -3449,9 +3342,14 @@ export type MemorySinkInterface = MemorySinkLike;
3449
3342
  * [`RangeSink`] over a file (or any store that seeks) for anything approaching that: the SDK
3450
3343
  * writes ranges straight through it and never holds the asset.
3451
3344
  *
3452
- * Construction and `bytes()` each copy the whole asset, on the calling thread: together with a
3453
- * `MemorySource` over the same asset that is about 12ms for 10 MB and 1.2s for 500 MB. A ranged
3454
- * sink pays none of it.
3345
+ * Construction and `bytes()` each move the whole asset across the boundary once, on the calling
3346
+ * thread. A ranged sink pays neither.
3347
+ *
3348
+ * # Capacity
3349
+ *
3350
+ * The buffer never grows past its capacity: [`MemorySink::new`] allows 2 GiB, and
3351
+ * [`MemorySink::with_capacity`] names another. A write or `set_length` that would exceed it fails
3352
+ * `ResourceExhausted` without allocating.
3455
3353
  */
3456
3354
  export declare class MemorySink extends UniffiAbstractObject implements MemorySinkLike {
3457
3355
  readonly [uniffiTypeNameSymbol] = "MemorySink";
@@ -3463,6 +3361,15 @@ export declare class MemorySink extends UniffiAbstractObject implements MemorySi
3463
3361
  * The buffer is at or above the 2 GiB a byte array can be counted in.
3464
3362
  */
3465
3363
  constructor(data: ArrayBuffer);
3364
+ /**
3365
+ * A sink that refuses to grow past `capacity` bytes.
3366
+ *
3367
+ * # Errors
3368
+ *
3369
+ * The buffer is already larger than `capacity`, or at or above the 2 GiB a byte array can
3370
+ * be counted in.
3371
+ */
3372
+ static withCapacity(data: ArrayBuffer, capacity: bigint): MemorySinkLike;
3466
3373
  /**
3467
3374
  * The buffer's current contents, e.g. after passing this sink through `embed`. A copy.
3468
3375
  *
@@ -3488,11 +3395,8 @@ export declare class MemorySink extends UniffiAbstractObject implements MemorySi
3488
3395
  static instanceOf(obj_: any): obj_ is MemorySink;
3489
3396
  }
3490
3397
  /**
3491
- * An in-memory [`RangeSource`], for a caller that already holds the whole asset as
3492
- * bytes and doesn't want to write a custom source. A **native** implementation of a
3493
- * `with_foreign` interface (`#[uniffi::export]` on the trait impl, not the foreign
3494
- * callback path), so the generated binding is a plain constructible object and a Python
3495
- * caller writes no subclass at all: `MemorySource(data)`.
3398
+ * An in-memory [`RangeSource`] for a caller that already holds the whole asset as bytes:
3399
+ * `MemorySource(data)`, no subclass.
3496
3400
  *
3497
3401
  * # Size ceiling
3498
3402
  *
@@ -3502,9 +3406,10 @@ export declare class MemorySink extends UniffiAbstractObject implements MemorySi
3502
3406
  * [`RangeSource`] over a file handle for anything approaching that: the SDK only ever asks for
3503
3407
  * bounded ranges, so nothing else has to hold the asset.
3504
3408
  *
3505
- * Construction copies the whole asset across the boundary, on the calling thread: about 5ms for
3506
- * 10 MB, 315ms for 500 MB. That is the one part of a sign or verify the SDK cannot move off your
3507
- * thread, and neither a ranged source nor [`FileSource`] pays it.
3409
+ * Construction moves the whole asset across the boundary once, on the calling thread; the SDK
3410
+ * then holds what arrived and answers every read as a window into it. That crossing is the one
3411
+ * part of a sign or verify the SDK cannot move off your thread, and neither a ranged source nor
3412
+ * [`FileSource`] pays it.
3508
3413
  */
3509
3414
  export interface MemorySourceLike {
3510
3415
  length(asyncOpts_?: {
@@ -3519,11 +3424,8 @@ export interface MemorySourceLike {
3519
3424
  */
3520
3425
  export type MemorySourceInterface = MemorySourceLike;
3521
3426
  /**
3522
- * An in-memory [`RangeSource`], for a caller that already holds the whole asset as
3523
- * bytes and doesn't want to write a custom source. A **native** implementation of a
3524
- * `with_foreign` interface (`#[uniffi::export]` on the trait impl, not the foreign
3525
- * callback path), so the generated binding is a plain constructible object and a Python
3526
- * caller writes no subclass at all: `MemorySource(data)`.
3427
+ * An in-memory [`RangeSource`] for a caller that already holds the whole asset as bytes:
3428
+ * `MemorySource(data)`, no subclass.
3527
3429
  *
3528
3430
  * # Size ceiling
3529
3431
  *
@@ -3533,9 +3435,10 @@ export type MemorySourceInterface = MemorySourceLike;
3533
3435
  * [`RangeSource`] over a file handle for anything approaching that: the SDK only ever asks for
3534
3436
  * bounded ranges, so nothing else has to hold the asset.
3535
3437
  *
3536
- * Construction copies the whole asset across the boundary, on the calling thread: about 5ms for
3537
- * 10 MB, 315ms for 500 MB. That is the one part of a sign or verify the SDK cannot move off your
3538
- * thread, and neither a ranged source nor [`FileSource`] pays it.
3438
+ * Construction moves the whole asset across the boundary once, on the calling thread; the SDK
3439
+ * then holds what arrived and answers every read as a window into it. That crossing is the one
3440
+ * part of a sign or verify the SDK cannot move off your thread, and neither a ranged source nor
3441
+ * [`FileSource`] pays it.
3539
3442
  */
3540
3443
  export declare class MemorySource extends UniffiAbstractObject implements MemorySourceLike {
3541
3444
  readonly [uniffiTypeNameSymbol] = "MemorySource";
@@ -3583,36 +3486,36 @@ export declare class SignerClient extends UniffiAbstractObject implements Signer
3583
3486
  * `options` is malformed. The channel connects lazily, so an unreachable Signer
3584
3487
  * surfaces on the first sign RPC instead.
3585
3488
  */
3586
- static connect(endpoint: string, options: ConnectOptions, asyncOpts_?: {
3489
+ static connect(endpoint: string, options?: ConnectOptions, asyncOpts_?: {
3587
3490
  signal: AbortSignal;
3588
3491
  }): Promise<SignerClientLike>;
3589
3492
  uniffiDestroy(): void;
3590
3493
  static instanceOf(obj_: any): obj_ is SignerClient;
3591
3494
  }
3592
3495
  /**
3593
- * A live-stream signer bound to a [`SignerClient`](super::client::SignerClient) and a
3496
+ * A stream signer bound to a [`SignerClient`](super::client::SignerClient) and a
3594
3497
  * [`SigningVault`]. Construct once with [`create`](Self::create), then `init` a session and
3595
3498
  * sign every segment through the [`StreamSession`] it returns.
3596
3499
  */
3597
3500
  export interface StreamIssuerLike {
3598
3501
  /**
3599
- * Open the stream at `stream_id`: mint its first session key under
3600
- * `options.rotation_policy`, sign the init (moov) segment under `options.delivery`, and
3601
- * hand back a [`StreamSession`] to sign through.
3502
+ * Open the stream `id`: mint its first session key under `options.rotation_policy`, sign the
3503
+ * init (moov) segment `source` under `options.delivery`, and hand back a [`StreamSession`]
3504
+ * to sign through.
3602
3505
  *
3603
3506
  * On `rotation_due`, call [`StreamIssuer::rotate`], not this.
3604
3507
  *
3605
3508
  * # Errors
3606
3509
  *
3607
- * Fails on signer RPC failure, a vault error, or an `init_body` that isn't a BMFF init
3608
- * segment.
3510
+ * Fails on signer RPC failure, a vault error, or a `source` that isn't a BMFF init segment.
3609
3511
  */
3610
- init(streamId: string, initBody: RangeSource, manifest: StreamManifestSpec, options: InitOptions, asyncOpts_?: {
3512
+ init(id: string, source: RangeSource, manifest: StreamManifestSpec, options: InitOptions, asyncOpts_?: {
3611
3513
  signal: AbortSignal;
3612
3514
  }): Promise<StreamStart>;
3613
3515
  /**
3614
3516
  * Succeed `session` on the stream it already names, signing a fresh init (moov) segment
3615
- * under a new key and forgetting the outgoing one.
3517
+ * under a new key and forgetting the outgoing one. Once this succeeds, `session` refuses to
3518
+ * sign; until then it keeps signing, so a failed rotation can be retried.
3616
3519
  *
3617
3520
  * The stream id comes from `session`, so a rotation cannot be pointed at the wrong stream,
3618
3521
  * and the retired key cannot be left behind: it would still sign for the rest of its
@@ -3620,9 +3523,10 @@ export interface StreamIssuerLike {
3620
3523
  *
3621
3524
  * # Errors
3622
3525
  *
3623
- * As [`StreamIssuer::init`].
3526
+ * As [`StreamIssuer::init`], plus `FAILED_PRECONDITION` (`SESSION_ENDED`) for a session
3527
+ * already stopped or rotated, or with a `stop` or `rotate` in flight.
3624
3528
  */
3625
- rotate(session: StreamSessionLike, initBody: RangeSource, manifest: StreamManifestSpec, options: InitOptions, asyncOpts_?: {
3529
+ rotate(session: StreamSessionLike, source: RangeSource, manifest: StreamManifestSpec, options: InitOptions, asyncOpts_?: {
3626
3530
  signal: AbortSignal;
3627
3531
  }): Promise<StreamStart>;
3628
3532
  }
@@ -3631,7 +3535,7 @@ export interface StreamIssuerLike {
3631
3535
  */
3632
3536
  export type StreamIssuerInterface = StreamIssuerLike;
3633
3537
  /**
3634
- * A live-stream signer bound to a [`SignerClient`](super::client::SignerClient) and a
3538
+ * A stream signer bound to a [`SignerClient`](super::client::SignerClient) and a
3635
3539
  * [`SigningVault`]. Construct once with [`create`](Self::create), then `init` a session and
3636
3540
  * sign every segment through the [`StreamSession`] it returns.
3637
3541
  */
@@ -3645,23 +3549,23 @@ export declare class StreamIssuer extends UniffiAbstractObject implements Stream
3645
3549
  */
3646
3550
  static create(client: SignerClientLike, vault: SigningVault): StreamIssuerLike;
3647
3551
  /**
3648
- * Open the stream at `stream_id`: mint its first session key under
3649
- * `options.rotation_policy`, sign the init (moov) segment under `options.delivery`, and
3650
- * hand back a [`StreamSession`] to sign through.
3552
+ * Open the stream `id`: mint its first session key under `options.rotation_policy`, sign the
3553
+ * init (moov) segment `source` under `options.delivery`, and hand back a [`StreamSession`]
3554
+ * to sign through.
3651
3555
  *
3652
3556
  * On `rotation_due`, call [`StreamIssuer::rotate`], not this.
3653
3557
  *
3654
3558
  * # Errors
3655
3559
  *
3656
- * Fails on signer RPC failure, a vault error, or an `init_body` that isn't a BMFF init
3657
- * segment.
3560
+ * Fails on signer RPC failure, a vault error, or a `source` that isn't a BMFF init segment.
3658
3561
  */
3659
- init(streamId: string, initBody: RangeSource, manifest: StreamManifestSpec, options: InitOptions, asyncOpts_?: {
3562
+ init(id: string, source: RangeSource, manifest: StreamManifestSpec, options: InitOptions, asyncOpts_?: {
3660
3563
  signal: AbortSignal;
3661
3564
  }): Promise<StreamStart>;
3662
3565
  /**
3663
3566
  * Succeed `session` on the stream it already names, signing a fresh init (moov) segment
3664
- * under a new key and forgetting the outgoing one.
3567
+ * under a new key and forgetting the outgoing one. Once this succeeds, `session` refuses to
3568
+ * sign; until then it keeps signing, so a failed rotation can be retried.
3665
3569
  *
3666
3570
  * The stream id comes from `session`, so a rotation cannot be pointed at the wrong stream,
3667
3571
  * and the retired key cannot be left behind: it would still sign for the rest of its
@@ -3669,24 +3573,26 @@ export declare class StreamIssuer extends UniffiAbstractObject implements Stream
3669
3573
  *
3670
3574
  * # Errors
3671
3575
  *
3672
- * As [`StreamIssuer::init`].
3576
+ * As [`StreamIssuer::init`], plus `FAILED_PRECONDITION` (`SESSION_ENDED`) for a session
3577
+ * already stopped or rotated, or with a `stop` or `rotate` in flight.
3673
3578
  */
3674
- rotate(session: StreamSessionLike, initBody: RangeSource, manifest: StreamManifestSpec, options: InitOptions, asyncOpts_?: {
3579
+ rotate(session: StreamSessionLike, source: RangeSource, manifest: StreamManifestSpec, options: InitOptions, asyncOpts_?: {
3675
3580
  signal: AbortSignal;
3676
3581
  }): Promise<StreamStart>;
3677
3582
  uniffiDestroy(): void;
3678
3583
  static instanceOf(obj_: any): obj_ is StreamIssuer;
3679
3584
  }
3680
3585
  /**
3681
- * A per-session ECDSA key store, implemented by the host. `mint` returns a fresh public key
3682
- * that will be signed under for `validity_period_secs`, so give it that lifetime and let the
3683
- * store expire it; `sign` produces the raw ECDSA signature over `payload` (the SDK frames it
3684
- * into COSE); `forget` drops a retired key. Every method may raise to abort.
3586
+ * A per-session ECDSA key store, implemented by the host. `mint` returns a fresh key that will be
3587
+ * signed under for the request's `validity_period`, so give it that lifetime and let the store
3588
+ * expire it; a new input to minting arrives as a field of `MintRequest`. `sign` produces the raw
3589
+ * ECDSA signature over `payload` with the key `kid` names (the SDK frames it into COSE);
3590
+ * `forget` drops a retired key. Every method may raise to abort.
3685
3591
  */
3686
3592
  export interface SigningVault {
3687
- mint(validityPeriodSecs: bigint, asyncOpts_?: {
3593
+ mint(request: MintRequest, asyncOpts_?: {
3688
3594
  signal: AbortSignal;
3689
- }): Promise<VaultPublicKey>;
3595
+ }): Promise<SessionKey>;
3690
3596
  sign(kid: ArrayBuffer, payload: ArrayBuffer, asyncOpts_?: {
3691
3597
  signal: AbortSignal;
3692
3598
  }): Promise<ArrayBuffer>;
@@ -3743,13 +3649,6 @@ declare const _default$1: Readonly<{
3743
3649
  lift(value: UniffiByteArray): AssetDelivery;
3744
3650
  lower(value: AssetDelivery, alloc: RustBufferAllocator): UniffiByteArray;
3745
3651
  };
3746
- FfiConverterTypeAssetFormat: {
3747
- readFromCursor(c: Cursor): AssetFormat;
3748
- writeIntoCursor(value: AssetFormat, c: Cursor): void;
3749
- allocationSize(value: AssetFormat): number;
3750
- lift(value: UniffiByteArray): AssetFormat;
3751
- lower(value: AssetFormat, alloc: RustBufferAllocator): UniffiByteArray;
3752
- };
3753
3652
  FfiConverterTypeAssetIssuer: FfiConverterObject<AssetIssuerLike>;
3754
3653
  FfiConverterTypeAssetManifestSpec: {
3755
3654
  readFromCursor(c: Cursor): AssetManifestSpec;
@@ -3766,7 +3665,20 @@ declare const _default$1: Readonly<{
3766
3665
  lift(value: UniffiByteArray): AssetOrigin;
3767
3666
  lower(value: AssetOrigin, alloc: RustBufferAllocator): UniffiByteArray;
3768
3667
  };
3769
- FfiConverterTypeBinder: FfiConverterObjectWithCallbacks<Binder>;
3668
+ FfiConverterTypeBlock: {
3669
+ readFromCursor(c: Cursor): Block;
3670
+ writeIntoCursor(value: Block, c: Cursor): void;
3671
+ allocationSize(value: Block): number;
3672
+ lift(value: UniffiByteArray): Block;
3673
+ lower(value: Block, alloc: RustBufferAllocator): UniffiByteArray;
3674
+ };
3675
+ FfiConverterTypeByteRange: {
3676
+ readFromCursor(c: Cursor): ByteRange;
3677
+ writeIntoCursor(value: ByteRange, c: Cursor): void;
3678
+ allocationSize(value: ByteRange): number;
3679
+ lift(value: UniffiByteArray): ByteRange;
3680
+ lower(value: ByteRange, alloc: RustBufferAllocator): UniffiByteArray;
3681
+ };
3770
3682
  FfiConverterTypeCode: {
3771
3683
  readFromCursor(c: Cursor): Code;
3772
3684
  writeIntoCursor(value: Code, c: Cursor): void;
@@ -3788,6 +3700,14 @@ declare const _default$1: Readonly<{
3788
3700
  lift(value: UniffiByteArray): ComponentEvent;
3789
3701
  lower(value: ComponentEvent, alloc: RustBufferAllocator): UniffiByteArray;
3790
3702
  };
3703
+ FfiConverterTypeCompute: FfiConverterObjectWithCallbacks<Compute>;
3704
+ FfiConverterTypeComputeRequest: {
3705
+ readFromCursor(c: Cursor): ComputeRequest;
3706
+ writeIntoCursor(value: ComputeRequest, c: Cursor): void;
3707
+ allocationSize(value: ComputeRequest): number;
3708
+ lift(value: UniffiByteArray): ComputeRequest;
3709
+ lower(value: ComputeRequest, alloc: RustBufferAllocator): UniffiByteArray;
3710
+ };
3791
3711
  FfiConverterTypeConnectOptions: {
3792
3712
  readFromCursor(c: Cursor): ConnectOptions;
3793
3713
  writeIntoCursor(value: ConnectOptions, c: Cursor): void;
@@ -3809,13 +3729,6 @@ declare const _default$1: Readonly<{
3809
3729
  lift(value: UniffiByteArray): CustomAction;
3810
3730
  lower(value: CustomAction, alloc: RustBufferAllocator): UniffiByteArray;
3811
3731
  };
3812
- FfiConverterTypeDeriveOptions: {
3813
- readFromCursor(c: Cursor): DeriveOptions;
3814
- writeIntoCursor(value: DeriveOptions, c: Cursor): void;
3815
- allocationSize(value: DeriveOptions): number;
3816
- lift(value: UniffiByteArray): DeriveOptions;
3817
- lower(value: DeriveOptions, alloc: RustBufferAllocator): UniffiByteArray;
3818
- };
3819
3732
  FfiConverterTypeEmbedOptions: {
3820
3733
  readFromCursor(c: Cursor): EmbedOptions;
3821
3734
  writeIntoCursor(value: EmbedOptions, c: Cursor): void;
@@ -3832,7 +3745,6 @@ declare const _default$1: Readonly<{
3832
3745
  };
3833
3746
  FfiConverterTypeFileSink: FfiConverterObject<FileSinkLike>;
3834
3747
  FfiConverterTypeFileSource: FfiConverterObject<FileSourceLike>;
3835
- FfiConverterTypeHeldBinder: FfiConverterObject<HeldBinderLike>;
3836
3748
  FfiConverterTypeIdentity: {
3837
3749
  readFromCursor(c: Cursor): Identity;
3838
3750
  writeIntoCursor(value: Identity, c: Cursor): void;
@@ -3847,12 +3759,12 @@ declare const _default$1: Readonly<{
3847
3759
  lift(value: UniffiByteArray): Ingredient;
3848
3760
  lower(value: Ingredient, alloc: RustBufferAllocator): UniffiByteArray;
3849
3761
  };
3850
- FfiConverterTypeIngredientSource: {
3851
- readFromCursor(c: Cursor): IngredientSource;
3852
- writeIntoCursor(value: IngredientSource, c: Cursor): void;
3853
- allocationSize(value: IngredientSource): number;
3854
- lift(value: UniffiByteArray): IngredientSource;
3855
- lower(value: IngredientSource, alloc: RustBufferAllocator): UniffiByteArray;
3762
+ FfiConverterTypeIngredientKind: {
3763
+ readFromCursor(c: Cursor): IngredientKind;
3764
+ writeIntoCursor(value: IngredientKind, c: Cursor): void;
3765
+ allocationSize(value: IngredientKind): number;
3766
+ lift(value: UniffiByteArray): IngredientKind;
3767
+ lower(value: IngredientKind, alloc: RustBufferAllocator): UniffiByteArray;
3856
3768
  };
3857
3769
  FfiConverterTypeInitOptions: {
3858
3770
  readFromCursor(c: Cursor): InitOptions;
@@ -3868,7 +3780,6 @@ declare const _default$1: Readonly<{
3868
3780
  lift(value: UniffiByteArray): InitOutcome;
3869
3781
  lower(value: InitOutcome, alloc: RustBufferAllocator): UniffiByteArray;
3870
3782
  };
3871
- FfiConverterTypeIsccBinder: FfiConverterObject<IsccBinderLike>;
3872
3783
  FfiConverterTypeJsonObject: FfiConverter<UniffiByteArray, string>;
3873
3784
  FfiConverterTypeJsonValue: FfiConverter<UniffiByteArray, string>;
3874
3785
  FfiConverterTypeMarkOptions: {
@@ -3887,6 +3798,13 @@ declare const _default$1: Readonly<{
3887
3798
  };
3888
3799
  FfiConverterTypeMemorySink: FfiConverterObject<MemorySinkLike>;
3889
3800
  FfiConverterTypeMemorySource: FfiConverterObject<MemorySourceLike>;
3801
+ FfiConverterTypeMintRequest: {
3802
+ readFromCursor(c: Cursor): MintRequest;
3803
+ writeIntoCursor(value: MintRequest, c: Cursor): void;
3804
+ allocationSize(value: MintRequest): number;
3805
+ lift(value: UniffiByteArray): MintRequest;
3806
+ lower(value: MintRequest, alloc: RustBufferAllocator): UniffiByteArray;
3807
+ };
3890
3808
  FfiConverterTypeOpenedOrigin: {
3891
3809
  readFromCursor(c: Cursor): OpenedOrigin;
3892
3810
  writeIntoCursor(value: OpenedOrigin, c: Cursor): void;
@@ -3894,22 +3812,8 @@ declare const _default$1: Readonly<{
3894
3812
  lift(value: UniffiByteArray): OpenedOrigin;
3895
3813
  lower(value: OpenedOrigin, alloc: RustBufferAllocator): UniffiByteArray;
3896
3814
  };
3897
- FfiConverterTypeOrigin: {
3898
- readFromCursor(c: Cursor): Origin;
3899
- writeIntoCursor(value: Origin, c: Cursor): void;
3900
- allocationSize(value: Origin): number;
3901
- lift(value: UniffiByteArray): Origin;
3902
- lower(value: Origin, alloc: RustBufferAllocator): UniffiByteArray;
3903
- };
3904
3815
  FfiConverterTypeRangeSink: FfiConverterObjectWithCallbacks<RangeSink>;
3905
3816
  FfiConverterTypeRangeSource: FfiConverterObjectWithCallbacks<RangeSource>;
3906
- FfiConverterTypeRegion: {
3907
- readFromCursor(c: Cursor): Region;
3908
- writeIntoCursor(value: Region, c: Cursor): void;
3909
- allocationSize(value: Region): number;
3910
- lift(value: UniffiByteArray): Region;
3911
- lower(value: Region, alloc: RustBufferAllocator): UniffiByteArray;
3912
- };
3913
3817
  FfiConverterTypeRotationPolicy: {
3914
3818
  readFromCursor(c: Cursor): RotationPolicy;
3915
3819
  writeIntoCursor(value: RotationPolicy, c: Cursor): void;
@@ -3917,6 +3821,13 @@ declare const _default$1: Readonly<{
3917
3821
  lift(value: UniffiByteArray): RotationPolicy;
3918
3822
  lower(value: RotationPolicy, alloc: RustBufferAllocator): UniffiByteArray;
3919
3823
  };
3824
+ FfiConverterTypeScope: {
3825
+ readFromCursor(c: Cursor): Scope;
3826
+ writeIntoCursor(value: Scope, c: Cursor): void;
3827
+ allocationSize(value: Scope): number;
3828
+ lift(value: UniffiByteArray): Scope;
3829
+ lower(value: Scope, alloc: RustBufferAllocator): UniffiByteArray;
3830
+ };
3920
3831
  FfiConverterTypeSdkError: {
3921
3832
  readFromCursor(c: Cursor): SdkError;
3922
3833
  writeIntoCursor(value: SdkError, c: Cursor): void;
@@ -3938,6 +3849,13 @@ declare const _default$1: Readonly<{
3938
3849
  lift(value: UniffiByteArray): SegmentOutcome;
3939
3850
  lower(value: SegmentOutcome, alloc: RustBufferAllocator): UniffiByteArray;
3940
3851
  };
3852
+ FfiConverterTypeSessionKey: {
3853
+ readFromCursor(c: Cursor): SessionKey;
3854
+ writeIntoCursor(value: SessionKey, c: Cursor): void;
3855
+ allocationSize(value: SessionKey): number;
3856
+ lift(value: UniffiByteArray): SessionKey;
3857
+ lower(value: SessionKey, alloc: RustBufferAllocator): UniffiByteArray;
3858
+ };
3941
3859
  FfiConverterTypeSignOptions: {
3942
3860
  readFromCursor(c: Cursor): SignOptions;
3943
3861
  writeIntoCursor(value: SignOptions, c: Cursor): void;
@@ -3967,6 +3885,20 @@ declare const _default$1: Readonly<{
3967
3885
  lift(value: UniffiByteArray): SoftBinding;
3968
3886
  lower(value: SoftBinding, alloc: RustBufferAllocator): UniffiByteArray;
3969
3887
  };
3888
+ FfiConverterTypeSoftBindingSource: {
3889
+ readFromCursor(c: Cursor): SoftBindingSource;
3890
+ writeIntoCursor(value: SoftBindingSource, c: Cursor): void;
3891
+ allocationSize(value: SoftBindingSource): number;
3892
+ lift(value: UniffiByteArray): SoftBindingSource;
3893
+ lower(value: SoftBindingSource, alloc: RustBufferAllocator): UniffiByteArray;
3894
+ };
3895
+ FfiConverterTypeSoftwareAgent: {
3896
+ readFromCursor(c: Cursor): SoftwareAgent;
3897
+ writeIntoCursor(value: SoftwareAgent, c: Cursor): void;
3898
+ allocationSize(value: SoftwareAgent): number;
3899
+ lift(value: UniffiByteArray): SoftwareAgent;
3900
+ lower(value: SoftwareAgent, alloc: RustBufferAllocator): UniffiByteArray;
3901
+ };
3970
3902
  FfiConverterTypeStandardAction: {
3971
3903
  readFromCursor(c: Cursor): StandardAction;
3972
3904
  writeIntoCursor(value: StandardAction, c: Cursor): void;
@@ -3989,6 +3921,13 @@ declare const _default$1: Readonly<{
3989
3921
  lift(value: UniffiByteArray): StreamManifestSpec;
3990
3922
  lower(value: StreamManifestSpec, alloc: RustBufferAllocator): UniffiByteArray;
3991
3923
  };
3924
+ FfiConverterTypeStreamOrigin: {
3925
+ readFromCursor(c: Cursor): StreamOrigin;
3926
+ writeIntoCursor(value: StreamOrigin, c: Cursor): void;
3927
+ allocationSize(value: StreamOrigin): number;
3928
+ lift(value: UniffiByteArray): StreamOrigin;
3929
+ lower(value: StreamOrigin, alloc: RustBufferAllocator): UniffiByteArray;
3930
+ };
3992
3931
  FfiConverterTypeStreamSession: FfiConverterObject<StreamSessionLike>;
3993
3932
  FfiConverterTypeStreamStart: {
3994
3933
  readFromCursor(c: Cursor): StreamStart;
@@ -4004,15 +3943,14 @@ declare const _default$1: Readonly<{
4004
3943
  lift(value: UniffiByteArray): Thumbnail;
4005
3944
  lower(value: Thumbnail, alloc: RustBufferAllocator): UniffiByteArray;
4006
3945
  };
4007
- FfiConverterTypeTimestamp: FfiConverter<UniffiByteArray, string>;
4008
- FfiConverterTypeUrl: FfiConverter<UniffiByteArray, string>;
4009
- FfiConverterTypeVaultPublicKey: {
4010
- readFromCursor(c: Cursor): VaultPublicKey;
4011
- writeIntoCursor(value: VaultPublicKey, c: Cursor): void;
4012
- allocationSize(value: VaultPublicKey): number;
4013
- lift(value: UniffiByteArray): VaultPublicKey;
4014
- lower(value: VaultPublicKey, alloc: RustBufferAllocator): UniffiByteArray;
3946
+ FfiConverterTypeTimespan: {
3947
+ readFromCursor(c: Cursor): Timespan;
3948
+ writeIntoCursor(value: Timespan, c: Cursor): void;
3949
+ allocationSize(value: Timespan): number;
3950
+ lift(value: UniffiByteArray): Timespan;
3951
+ lower(value: Timespan, alloc: RustBufferAllocator): UniffiByteArray;
4015
3952
  };
3953
+ FfiConverterTypeUrl: FfiConverter<UniffiByteArray, string>;
4016
3954
  };
4017
3955
  }>;
4018
3956
  //#endregion