@contentauth/c2pa-node 0.1.3 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +212 -46
- package/dist/Builder.js +10 -66
- package/dist/Builder.spec.js +159 -69
- package/dist/IdentityAssertion.js +27 -42
- package/dist/IdentityAssertion.spec.js +54 -82
- package/dist/Reader.js +2 -39
- package/dist/Reader.spec.js +13 -50
- package/dist/Settings.js +203 -0
- package/dist/Settings.spec.js +314 -0
- package/dist/Signer.js +3 -41
- package/dist/Signer.spec.js +12 -45
- package/dist/Trustmark.js +2 -40
- package/dist/Trustmark.spec.js +10 -48
- package/dist/assertions.js +23 -0
- package/dist/index.js +7 -15
- package/dist/index.node +0 -0
- package/dist/types/Builder.d.ts +6 -7
- package/dist/types/IdentityAssertion.d.ts +16 -7
- package/dist/types/Reader.d.ts +3 -2
- package/dist/types/Settings.d.ts +63 -0
- package/dist/types/Settings.spec.d.ts +1 -0
- package/dist/types/Signer.d.ts +5 -5
- package/dist/types/Trustmark.d.ts +2 -2
- package/dist/types/assertions.d.ts +8 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/types.d.ts +92 -450
- package/package.json +14 -8
package/dist/Trustmark.spec.js
CHANGED
|
@@ -1,42 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Copyright 2024 Adobe. All rights reserved.
|
|
3
2
|
// This file is licensed to you under the Apache License,
|
|
4
3
|
// Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
|
5
4
|
// or the MIT license (http://opensource.org/licenses/MIT),
|
|
6
5
|
// at your option.
|
|
7
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
-
if (k2 === undefined) k2 = k;
|
|
9
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
-
}
|
|
13
|
-
Object.defineProperty(o, k2, desc);
|
|
14
|
-
}) : (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
o[k2] = m[k];
|
|
17
|
-
}));
|
|
18
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
-
}) : function(o, v) {
|
|
21
|
-
o["default"] = v;
|
|
22
|
-
});
|
|
23
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
24
|
-
var ownKeys = function(o) {
|
|
25
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
26
|
-
var ar = [];
|
|
27
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
28
|
-
return ar;
|
|
29
|
-
};
|
|
30
|
-
return ownKeys(o);
|
|
31
|
-
};
|
|
32
|
-
return function (mod) {
|
|
33
|
-
if (mod && mod.__esModule) return mod;
|
|
34
|
-
var result = {};
|
|
35
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
36
|
-
__setModuleDefault(result, mod);
|
|
37
|
-
return result;
|
|
38
|
-
};
|
|
39
|
-
})();
|
|
40
6
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
41
7
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
42
8
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -46,26 +12,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
46
12
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
47
13
|
});
|
|
48
14
|
};
|
|
49
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
|
-
};
|
|
52
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
15
|
// Unless required by applicable law or agreed to in writing,
|
|
54
16
|
// this software is distributed on an "AS IS" BASIS, WITHOUT
|
|
55
17
|
// WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or
|
|
56
18
|
// implied. See the LICENSE-MIT and LICENSE-APACHE files for the
|
|
57
19
|
// specific language governing permissions and limitations under
|
|
58
20
|
// each license.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const tempDir =
|
|
21
|
+
import { Trustmark } from "./Trustmark";
|
|
22
|
+
import path from "path";
|
|
23
|
+
import * as fs from "fs-extra";
|
|
24
|
+
import sharp from "sharp";
|
|
25
|
+
const tempDir = path.join(__dirname, "..", "tmp");
|
|
64
26
|
// Helper function to convert raw RGB pixel data to JPEG format
|
|
65
27
|
function rawRgbToJpeg(rawRgbData, width, height) {
|
|
66
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
67
29
|
// Create a sharp image from raw RGB data
|
|
68
|
-
const image = (
|
|
30
|
+
const image = sharp(rawRgbData, {
|
|
69
31
|
raw: {
|
|
70
32
|
width,
|
|
71
33
|
height,
|
|
@@ -84,14 +46,14 @@ describe("Trustmark", () => {
|
|
|
84
46
|
const trustmarkConfig = {
|
|
85
47
|
variant: "B", // Original Trustmark model
|
|
86
48
|
version: "BCH_3", // Tolerates 3 bit flips
|
|
87
|
-
modelPath:
|
|
49
|
+
modelPath: path.join(tempDir, "trustmark_models"), // Use temporary directory for model path
|
|
88
50
|
};
|
|
89
51
|
beforeAll(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
90
52
|
yield fs.ensureDir(tempDir);
|
|
91
53
|
// Use an actual test image from fixtures directory
|
|
92
54
|
testImage = yield fs.readFile("./tests/fixtures/A.jpg");
|
|
93
55
|
// Get image dimensions for converting raw pixel data
|
|
94
|
-
const imageInfo = yield (
|
|
56
|
+
const imageInfo = yield sharp(testImage).metadata();
|
|
95
57
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
96
58
|
testImageWidth = imageInfo.width;
|
|
97
59
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -100,7 +62,7 @@ describe("Trustmark", () => {
|
|
|
100
62
|
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
101
63
|
// Note: In a real test environment, you would need a valid model file
|
|
102
64
|
// For now, we'll mock the trustmark creation or handle the case where model doesn't exist
|
|
103
|
-
trustmark = yield
|
|
65
|
+
trustmark = yield Trustmark.newTrustmark(trustmarkConfig);
|
|
104
66
|
}));
|
|
105
67
|
describe("newTrustmark", () => {
|
|
106
68
|
it("should create a new trustmark instance with valid config", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -114,7 +76,7 @@ describe("Trustmark", () => {
|
|
|
114
76
|
variant: "X", // Invalid variant
|
|
115
77
|
version: "BCH_3", // Valid version
|
|
116
78
|
};
|
|
117
|
-
yield expect(
|
|
79
|
+
yield expect(Trustmark.newTrustmark(invalidConfig)).rejects.toThrow("Watermark configuration error: invalid variant");
|
|
118
80
|
}));
|
|
119
81
|
});
|
|
120
82
|
describe("encode", () => {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright 2025 Adobe. All rights reserved.
|
|
2
|
+
// This file is licensed to you under the Apache License,
|
|
3
|
+
// Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
|
4
|
+
// or the MIT license (http://opensource.org/licenses/MIT),
|
|
5
|
+
// at your option.
|
|
6
|
+
// Unless required by applicable law or agreed to in writing,
|
|
7
|
+
// this software is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
// WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or
|
|
9
|
+
// implied. See the LICENSE-MIT and LICENSE-APACHE files for the
|
|
10
|
+
// specific language governing permissions and limitations under
|
|
11
|
+
// each license.
|
|
12
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
13
|
+
export function isActionsAssertion(obj) {
|
|
14
|
+
return (typeof obj === "object" &&
|
|
15
|
+
obj !== null &&
|
|
16
|
+
"label" in obj &&
|
|
17
|
+
"data" in obj &&
|
|
18
|
+
typeof obj.label === "string" &&
|
|
19
|
+
(obj.label === "c2pa.actions" || obj.label === "c2pa.actions.v2") &&
|
|
20
|
+
typeof obj.data === "object" &&
|
|
21
|
+
obj.data !== null &&
|
|
22
|
+
Array.isArray(obj.data.actions));
|
|
23
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Copyright 2025 Adobe. All rights reserved.
|
|
3
2
|
// This file is licensed to you under the Apache License,
|
|
4
3
|
// Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
|
5
4
|
// or the MIT license (http://opensource.org/licenses/MIT),
|
|
6
5
|
// at your option.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Object.defineProperty(exports, "LocalSigner", { enumerable: true, get: function () { return Signer_1.LocalSigner; } });
|
|
15
|
-
Object.defineProperty(exports, "CallbackSigner", { enumerable: true, get: function () { return Signer_1.CallbackSigner; } });
|
|
16
|
-
var IdentityAssertion_1 = require("./IdentityAssertion");
|
|
17
|
-
Object.defineProperty(exports, "IdentityAssertionBuilder", { enumerable: true, get: function () { return IdentityAssertion_1.IdentityAssertionBuilder; } });
|
|
18
|
-
Object.defineProperty(exports, "IdentityAssertionSigner", { enumerable: true, get: function () { return IdentityAssertion_1.IdentityAssertionSigner; } });
|
|
19
|
-
var Trustmark_1 = require("./Trustmark");
|
|
20
|
-
Object.defineProperty(exports, "Trustmark", { enumerable: true, get: function () { return Trustmark_1.Trustmark; } });
|
|
6
|
+
export { Builder } from "./Builder";
|
|
7
|
+
export { Reader } from "./Reader";
|
|
8
|
+
export { LocalSigner, CallbackSigner } from "./Signer";
|
|
9
|
+
export { IdentityAssertionBuilder, IdentityAssertionSigner, CallbackCredentialHolder, } from "./IdentityAssertion";
|
|
10
|
+
export { Trustmark } from "./Trustmark";
|
|
11
|
+
export { isActionsAssertion } from "./assertions";
|
|
12
|
+
export * from "./Settings";
|
package/dist/index.node
CHANGED
|
Binary file
|
package/dist/types/Builder.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
1
|
+
import type { BuilderInterface, CallbackSignerInterface, ClaimVersion, DestinationAsset, IdentityAssertionSignerInterface, JsCallbackSignerConfig, LocalSignerInterface, ManifestAssertionKind, SourceAsset } from "./types";
|
|
2
|
+
import type { Manifest } from "@contentauth/c2pa-types";
|
|
3
3
|
export declare class Builder implements BuilderInterface {
|
|
4
4
|
private builder;
|
|
5
5
|
private constructor();
|
|
6
6
|
static new(): Builder;
|
|
7
|
-
static withJson(json:
|
|
7
|
+
static withJson(json: Manifest): Builder;
|
|
8
8
|
setNoEmbed(noEmbed?: boolean): void;
|
|
9
9
|
setRemoteUrl(remoteUrl: string): void;
|
|
10
|
-
addAssertion(label: string, assertion:
|
|
10
|
+
addAssertion(label: string, assertion: unknown, assertionKind?: ManifestAssertionKind): void;
|
|
11
11
|
addResource(uri: string, resource: SourceAsset): Promise<void>;
|
|
12
12
|
addIngredient(ingredientJson: string, ingredient: SourceAsset): Promise<void>;
|
|
13
13
|
toArchive(asset: DestinationAsset): Promise<void>;
|
|
@@ -15,8 +15,7 @@ export declare class Builder implements BuilderInterface {
|
|
|
15
15
|
sign(signer: LocalSignerInterface, input: SourceAsset, output: DestinationAsset): Buffer;
|
|
16
16
|
signFile(signer: LocalSignerInterface, filePath: string, output: DestinationAsset): Buffer;
|
|
17
17
|
signConfigAsync(callback: (data: Buffer) => Promise<Buffer>, signerConfig: JsCallbackSignerConfig, input: SourceAsset, output: DestinationAsset): Promise<Buffer>;
|
|
18
|
-
signAsync(signer: CallbackSignerInterface, input: SourceAsset, output: DestinationAsset): Promise<Buffer>;
|
|
19
|
-
|
|
20
|
-
getManifestDefinition(): ManifestDefinition;
|
|
18
|
+
signAsync(signer: CallbackSignerInterface | IdentityAssertionSignerInterface, input: SourceAsset, output: DestinationAsset): Promise<Buffer>;
|
|
19
|
+
getManifestDefinition(): Manifest;
|
|
21
20
|
updateManifestProperty(property: string, value: ClaimVersion): void;
|
|
22
21
|
}
|
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CallbackCredentialHolderInterface, IdentityAssertionBuilderInterface, IdentityAssertionSignerInterface, NeonCallbackCredentialHolderHandle, NeonIdentityAssertionSignerHandle, NeonIdentityAssertionBuilderHandle, SignerPayload, NeonCallbackSignerHandle } from "./types";
|
|
2
2
|
export declare class IdentityAssertionBuilder implements IdentityAssertionBuilderInterface {
|
|
3
3
|
private _builder;
|
|
4
|
-
|
|
5
|
-
static identityBuilderForCredentialHolder(credentialHolder:
|
|
4
|
+
constructor(_builder: NeonIdentityAssertionBuilderHandle);
|
|
5
|
+
static identityBuilderForCredentialHolder(credentialHolder: CallbackCredentialHolderInterface): Promise<IdentityAssertionBuilder>;
|
|
6
6
|
addReferencedAssertions(referencedAssertions: string[]): void;
|
|
7
7
|
addRoles(roles: string[]): void;
|
|
8
|
-
builder():
|
|
8
|
+
builder(): NeonIdentityAssertionBuilderHandle;
|
|
9
9
|
}
|
|
10
10
|
export declare class IdentityAssertionSigner implements IdentityAssertionSignerInterface {
|
|
11
11
|
private _signer;
|
|
12
|
-
|
|
13
|
-
static new(signer:
|
|
12
|
+
constructor(_signer: NeonIdentityAssertionSignerHandle);
|
|
13
|
+
static new(signer: NeonCallbackSignerHandle): IdentityAssertionSigner;
|
|
14
14
|
addIdentityAssertion(identityAssertionBuilder: IdentityAssertionBuilder): void;
|
|
15
|
-
signer():
|
|
15
|
+
signer(): NeonIdentityAssertionSignerHandle;
|
|
16
|
+
}
|
|
17
|
+
export declare class CallbackCredentialHolder implements CallbackCredentialHolderInterface {
|
|
18
|
+
private callbackCredentialHolder;
|
|
19
|
+
constructor(callbackCredentialHolder: NeonCallbackCredentialHolderHandle);
|
|
20
|
+
signer(): NeonCallbackCredentialHolderHandle;
|
|
21
|
+
static newCallbackCredentialHolder(reserveSize: number, sigType: string, callback: (signerPayload: SignerPayload) => Promise<Buffer>): CallbackCredentialHolder;
|
|
22
|
+
sign(payload: SignerPayload): Promise<Buffer>;
|
|
23
|
+
reserveSize(): number;
|
|
24
|
+
sigType(): string;
|
|
16
25
|
}
|
package/dist/types/Reader.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { DestinationAsset,
|
|
1
|
+
import type { DestinationAsset, ReaderInterface, SourceAsset, NeonReaderHandle } from "./types";
|
|
2
|
+
import type { Manifest, ManifestStore } from "@contentauth/c2pa-types";
|
|
2
3
|
export declare class Reader implements ReaderInterface {
|
|
3
4
|
private reader;
|
|
4
|
-
|
|
5
|
+
constructor(reader: NeonReaderHandle);
|
|
5
6
|
json(): ManifestStore;
|
|
6
7
|
remoteUrl(): string;
|
|
7
8
|
isEmbedded(): boolean;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { TrustConfig, VerifyConfig } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Load settings from a JSON string and apply them globally.
|
|
4
|
+
* @param json The JSON string containing the settings configuration
|
|
5
|
+
*/
|
|
6
|
+
export declare function loadC2paSettings(json: string): void;
|
|
7
|
+
/**
|
|
8
|
+
* Load settings from a TOML string and apply them globally.
|
|
9
|
+
* @param toml The TOML string containing the settings configuration
|
|
10
|
+
*/
|
|
11
|
+
export declare function loadC2paSettingsToml(toml: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* Load settings from a TOML or JSON file path and apply them globally.
|
|
14
|
+
* The file format is determined by the file extension (.toml for TOML, otherwise JSON).
|
|
15
|
+
* @param filePath The path to the settings file
|
|
16
|
+
*/
|
|
17
|
+
export declare function loadSettingsFromFile(filePath: string): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Load settings from a URL and apply them globally.
|
|
20
|
+
* The format is determined by the content-type header or file extension (.toml for TOML, otherwise JSON).
|
|
21
|
+
* @param url The URL to fetch the settings from
|
|
22
|
+
*/
|
|
23
|
+
export declare function loadSettingsFromUrl(url: string): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Get the current settings as a JSON string.
|
|
26
|
+
* @returns The JSON representation of the current settings
|
|
27
|
+
*/
|
|
28
|
+
export declare function getSettingsJson(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Load trust configuration into the main trust settings.
|
|
31
|
+
* @param trustConfig The trust configuration object
|
|
32
|
+
*/
|
|
33
|
+
export declare function loadTrustConfig(trustConfig: TrustConfig): void;
|
|
34
|
+
/**
|
|
35
|
+
* Load trust configuration into the CAWG trust settings.
|
|
36
|
+
* @param trustConfig The trust configuration object
|
|
37
|
+
*/
|
|
38
|
+
export declare function loadCawgTrustConfig(trustConfig: TrustConfig): void;
|
|
39
|
+
/**
|
|
40
|
+
* Get the current trust configuration.
|
|
41
|
+
* @returns The current trust configuration object
|
|
42
|
+
*/
|
|
43
|
+
export declare function getTrustConfig(): TrustConfig;
|
|
44
|
+
/**
|
|
45
|
+
* Get the current CAWG trust configuration.
|
|
46
|
+
* @returns The current CAWG trust configuration object
|
|
47
|
+
*/
|
|
48
|
+
export declare function getCawgTrustConfig(): TrustConfig;
|
|
49
|
+
/**
|
|
50
|
+
* Load verify configuration into the verify settings.
|
|
51
|
+
* @param verifyConfig The verify configuration object
|
|
52
|
+
*/
|
|
53
|
+
export declare function loadVerifyConfig(verifyConfig: VerifyConfig): void;
|
|
54
|
+
/**
|
|
55
|
+
* Patch the verify configuration with any subset of fields.
|
|
56
|
+
* @param patch Partial verify config fields to update
|
|
57
|
+
*/
|
|
58
|
+
export declare function patchVerifyConfig(patch: Partial<VerifyConfig>): void;
|
|
59
|
+
/**
|
|
60
|
+
* Get the current verify configuration.
|
|
61
|
+
* @returns The current verify configuration object
|
|
62
|
+
*/
|
|
63
|
+
export declare function getVerifyConfig(): VerifyConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/Signer.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CallbackSignerInterface, JsCallbackSignerConfig, NeonCallbackSignerHandle, NeonLocalSignerHandle, LocalSignerInterface, SigningAlg } from "./types";
|
|
2
2
|
export declare class LocalSigner implements LocalSignerInterface {
|
|
3
3
|
private localSigner;
|
|
4
|
-
|
|
4
|
+
constructor(localSigner: NeonLocalSignerHandle);
|
|
5
5
|
static newSigner(certificate: Buffer, privateKey: Buffer, algorithm: SigningAlg, tsaUrl?: string): LocalSigner;
|
|
6
6
|
sign(data: Buffer): Buffer;
|
|
7
7
|
alg(): SigningAlg;
|
|
8
8
|
certs(): Array<Buffer>;
|
|
9
9
|
reserveSize(): number;
|
|
10
10
|
timeAuthorityUrl(): string | undefined;
|
|
11
|
-
signer():
|
|
11
|
+
signer(): NeonLocalSignerHandle;
|
|
12
12
|
}
|
|
13
13
|
export declare class CallbackSigner implements CallbackSignerInterface {
|
|
14
14
|
private callbackSigner;
|
|
15
|
-
|
|
16
|
-
signer():
|
|
15
|
+
constructor(callbackSigner: NeonCallbackSignerHandle);
|
|
16
|
+
signer(): NeonCallbackSignerHandle;
|
|
17
17
|
static newSigner(config: JsCallbackSignerConfig, callback: (data: Buffer) => Promise<Buffer>): CallbackSigner;
|
|
18
18
|
sign(data: Buffer): Promise<Buffer>;
|
|
19
19
|
alg(): SigningAlg;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { TrustmarkInterface
|
|
1
|
+
import type { TrustmarkInterface, TrustmarkConfig, NeonTrustmarkHandle } from "./types";
|
|
2
2
|
export declare class Trustmark implements TrustmarkInterface {
|
|
3
3
|
private trustmark;
|
|
4
|
-
|
|
4
|
+
constructor(trustmark: NeonTrustmarkHandle);
|
|
5
5
|
static newTrustmark(config: TrustmarkConfig): Promise<Trustmark>;
|
|
6
6
|
encode(image: Buffer, strength: number, watermark?: string): Promise<Buffer>;
|
|
7
7
|
decode(image: Buffer): Promise<string>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,5 +2,7 @@ export type * from "./types";
|
|
|
2
2
|
export { Builder } from "./Builder";
|
|
3
3
|
export { Reader } from "./Reader";
|
|
4
4
|
export { LocalSigner, CallbackSigner } from "./Signer";
|
|
5
|
-
export { IdentityAssertionBuilder, IdentityAssertionSigner, } from "./IdentityAssertion";
|
|
5
|
+
export { IdentityAssertionBuilder, IdentityAssertionSigner, CallbackCredentialHolder, } from "./IdentityAssertion";
|
|
6
6
|
export { Trustmark } from "./Trustmark";
|
|
7
|
+
export { isActionsAssertion } from "./assertions";
|
|
8
|
+
export * from "./Settings";
|