@pacspace-io/check 0.5.6 → 0.6.0
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/CHANGELOG.md +16 -0
- package/README.md +34 -0
- package/dist/cli.d.ts +5 -1
- package/dist/cli.js +1993 -121
- package/dist/index.js +196 -19
- package/dist/inputs.txt +11 -0
- package/dist/open-io.d.ts +38 -0
- package/dist/open.d.ts +16 -15
- package/dist/records-crypto-types/records/flag-threads-v1.d.ts +53 -0
- package/dist/records-crypto-types/records/labels.d.ts +37 -0
- package/dist/records-crypto-types/records/link-handle-v1.d.ts +16 -0
- package/dist/records-crypto-types/records/reader-crypto-v1.d.ts +198 -0
- package/dist/records-crypto-types/records/reader-link-v1.d.ts +164 -0
- package/dist/records-crypto-types/records/shared-record-ack-v2.d.ts +72 -0
- package/dist/records-crypto-types/records/trail-index-v1.d.ts +89 -0
- package/dist/records-crypto-types/records/trail-rule.d.ts +54 -0
- package/dist/records-crypto-types/records-crypto/asymmetric/ack-flag-notes-v1.d.ts +57 -0
- package/dist/records-crypto-types/records-crypto/asymmetric/flag-notes-v1.d.ts +55 -0
- package/dist/records-crypto-types/records-crypto/asymmetric/index.d.ts +3 -0
- package/dist/records-crypto-types/records-crypto/asymmetric/reader-wraps-v1.d.ts +83 -0
- package/dist/records-crypto-types/records-crypto/disclosure-envelope-v1.d.ts +1 -1
- package/dist/records-crypto-types/records-crypto/index.d.ts +1 -1
- package/dist/records-crypto-types/records-crypto/records-encryption-v1.d.ts +1 -0
- package/dist/records-crypto.js +547 -66
- package/dist/shared-record-link.d.ts +121 -0
- package/dist/shared-record-words.d.ts +97 -0
- package/package.json +1 -1
|
@@ -1 +1,4 @@
|
|
|
1
1
|
export { RECORDS_ASYMMETRIC_LABELS_V1, KEY_WRAP_SUITE_V1, KEY_WRAP_SUITES_V1, WORKSPACE_SEED_BYTES_V1, WORKSPACE_PUBLIC_KEY_BYTES_V1, KEY_WRAP_ENC_BYTES_V1, KEY_WRAP_CT_BYTES_V1, SEED_WRAP_CT_BYTES_V1, MLDSA65_SEED_BYTES_V1, HOLDER_KEY_CODE_DIGITS_V1, RecordsAsymmetricError, WorkspaceSeedV1, MldsaSigningKeyV1, exportWorkspaceSeedBytesV1, publicKeyIdV1, holderKeyCodeV1, workspaceSeedFromBytesV1, generateWorkspaceSeedV1, sealSeedWrapV1, readSeedWrapShapeV1, openSeedWrapV1, keyWrapInfoV1, wrapRecordsKeyV1, wrapRecordKeyV1, wrapDisclosureKeyV1, readKeyWrapShapeV1, unwrapRecordsKeyV1, unwrapRecordKeyV1, unwrapDisclosureKeyV1, KEY_WRAP_OWNER_V2, keyWrapInfoV2, wrapRecordsKeyV2, wrapRecordKeyV2, wrapDisclosureKeyV2, readKeyWrapShapeV2, unwrapRecordsKeyV2, unwrapRecordKeyV2, unwrapDisclosureKeyV2, ROTATION_CHALLENGE_ID_V1, ROTATION_CHALLENGE_ENC_BYTES_V1, rotationChallengeV1, rotationProofV1, rotationProofHashV1, mldsaSigningKeyFromSeedV1, generateMldsaSigningKeyV1, exportMldsaSeedBytesV1, signMldsa65V1, verifyMldsa65V1, type KeyWrapPurposeV1, type KeyWrapBindingV1, type KeyWrapV1, type KeyWrapBindingV2, type KeyWrapV2, type RotationBindingV1, type SeedWrapV1, type RecordsAsymmetricCodeV1, } from './records-asymmetric-v1';
|
|
2
|
+
export { makeDeviceKeysV1, devicePublicV1, wrapLinkKeyV1, unwrapLinkKeyV1, wrapAnswerKeyV1, unwrapAnswerKeyV1, wrapNoteKeyV1, unwrapNoteKeyV1, signApprovalV1, signDeviceMessageV1, verifyDeviceMessageV1, type DeviceKeysV1, } from './reader-wraps-v1';
|
|
3
|
+
export { sealAckFlagNotesV1, openAckFlagNoteV1, openAckNoteV1, type AckFlagNoteDeviceV1, type AckFlagNoteKeysV1 } from './ack-flag-notes-v1';
|
|
4
|
+
export { sealFlagNoteV1, openFlagNoteV1, sealFlagDraftsV1, openFlagDraftsV1, type FlagNoteDeviceV1, type SealedFlagNoteV1, } from './flag-notes-v1';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type NoteNameV1 } from '../../records/reader-crypto-v1';
|
|
2
|
+
import type { SigningPublicKeyJwkV1 } from '../../records/signed-acknowledgment-v1';
|
|
3
|
+
import { MldsaSigningKeyV1, WorkspaceSeedV1, type KeyWrapV1 } from './records-asymmetric-v1';
|
|
4
|
+
export interface DeviceKeysV1 {
|
|
5
|
+
xwing: WorkspaceSeedV1;
|
|
6
|
+
mldsa: MldsaSigningKeyV1;
|
|
7
|
+
p256Jwk: SigningPublicKeyJwkV1;
|
|
8
|
+
deviceId: string;
|
|
9
|
+
code: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function makeDeviceKeysV1(input: {
|
|
12
|
+
xwingSeed: Uint8Array;
|
|
13
|
+
mldsaSeed: Uint8Array;
|
|
14
|
+
p256Jwk: SigningPublicKeyJwkV1;
|
|
15
|
+
}): Promise<DeviceKeysV1>;
|
|
16
|
+
export declare function devicePublicV1(keys: DeviceKeysV1): {
|
|
17
|
+
xwingPublicKey: string;
|
|
18
|
+
p256Jwk: SigningPublicKeyJwkV1;
|
|
19
|
+
mldsaPublicKey: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function wrapLinkKeyV1(publicKey: Uint8Array, linkKey: Uint8Array, handle: string, epoch: number): Promise<KeyWrapV1>;
|
|
22
|
+
export declare function unwrapLinkKeyV1(input: {
|
|
23
|
+
seed: WorkspaceSeedV1;
|
|
24
|
+
wrap: unknown;
|
|
25
|
+
handle: string;
|
|
26
|
+
epoch: number;
|
|
27
|
+
}): Promise<{
|
|
28
|
+
ok: false;
|
|
29
|
+
code: "KEY_WRAP_MALFORMED" | "KEY_WRAP_SUITE" | "KEY_WRAP_WRONG_HOLDER" | "KEY_WRAP_AUTH_FAILED" | "KEY_WRAP_BINDING_INVALID";
|
|
30
|
+
} | {
|
|
31
|
+
ok: true;
|
|
32
|
+
disclosureKey: Uint8Array;
|
|
33
|
+
}>;
|
|
34
|
+
export declare function wrapAnswerKeyV1(publicKey: Uint8Array, answerKey: Uint8Array, handle: string, requestRef: string): Promise<KeyWrapV1>;
|
|
35
|
+
export declare function unwrapAnswerKeyV1(input: {
|
|
36
|
+
seed: WorkspaceSeedV1;
|
|
37
|
+
wrap: unknown;
|
|
38
|
+
handle: string;
|
|
39
|
+
requestRef: string;
|
|
40
|
+
}): Promise<{
|
|
41
|
+
ok: false;
|
|
42
|
+
code: "KEY_WRAP_MALFORMED" | "KEY_WRAP_SUITE" | "KEY_WRAP_WRONG_HOLDER" | "KEY_WRAP_AUTH_FAILED" | "KEY_WRAP_BINDING_INVALID";
|
|
43
|
+
} | {
|
|
44
|
+
ok: true;
|
|
45
|
+
disclosureKey: Uint8Array;
|
|
46
|
+
}>;
|
|
47
|
+
export declare function wrapNoteKeyV1(publicKey: Uint8Array, noteKey: Uint8Array, name: NoteNameV1): Promise<KeyWrapV1>;
|
|
48
|
+
export declare function unwrapNoteKeyV1(input: {
|
|
49
|
+
seed: WorkspaceSeedV1;
|
|
50
|
+
wrap: unknown;
|
|
51
|
+
name: NoteNameV1;
|
|
52
|
+
}): Promise<{
|
|
53
|
+
ok: false;
|
|
54
|
+
code: "KEY_WRAP_MALFORMED" | "KEY_WRAP_SUITE" | "KEY_WRAP_WRONG_HOLDER" | "KEY_WRAP_AUTH_FAILED" | "KEY_WRAP_BINDING_INVALID";
|
|
55
|
+
} | {
|
|
56
|
+
ok: true;
|
|
57
|
+
disclosureKey: Uint8Array;
|
|
58
|
+
}>;
|
|
59
|
+
export declare function signApprovalV1(input: {
|
|
60
|
+
p256PrivateKey: CryptoKey;
|
|
61
|
+
mldsa: MldsaSigningKeyV1;
|
|
62
|
+
handle: string;
|
|
63
|
+
epoch: number;
|
|
64
|
+
newDeviceId: string;
|
|
65
|
+
}): Promise<{
|
|
66
|
+
signature: string;
|
|
67
|
+
mldsaSignature: string;
|
|
68
|
+
}>;
|
|
69
|
+
export declare function signDeviceMessageV1(input: {
|
|
70
|
+
p256PrivateKey: CryptoKey;
|
|
71
|
+
mldsa: MldsaSigningKeyV1;
|
|
72
|
+
message: string;
|
|
73
|
+
}): Promise<{
|
|
74
|
+
signature: string;
|
|
75
|
+
mldsaSignature: string;
|
|
76
|
+
}>;
|
|
77
|
+
export declare function verifyDeviceMessageV1(input: {
|
|
78
|
+
p256Jwk: SigningPublicKeyJwkV1;
|
|
79
|
+
mldsaPublicKey: Uint8Array;
|
|
80
|
+
message: string;
|
|
81
|
+
signature: unknown;
|
|
82
|
+
mldsaSignature: unknown;
|
|
83
|
+
}): Promise<boolean>;
|
|
@@ -8,6 +8,6 @@ export * from './record-hash-v3';
|
|
|
8
8
|
export * from './record-disclosure-v1';
|
|
9
9
|
export * from './disclosure-envelope-v1';
|
|
10
10
|
export * from './wrap-shapes-v1';
|
|
11
|
-
export { RECORDS_ENCRYPTION_LABELS_V1, RECORDS_ENCRYPTION_PAD_BLOCK_V1, RECORD_ENTRY_PLAINTEXT_MAX_BYTES_V1, RECORD_ENTRY_CIPHERTEXT_MAX_BYTES_V1, RECORD_ENTRY_CIPHERTEXT_MAX_CHARS_V1, RECORD_ENTRY_BODY_MAX_BYTES_V1, RECORDS_KEYRING_MAX_BYTES_V1, RECORDS_KEYRING_SCHEMA_V1, WORKSPACE_SECRET_BYTES_V1, RecordsEncryptionError, RecordsIdKeyV1, RecordsKeyV1, RecordsWrapKeyV1, RecordKeyV1, RecordsContentTagKeyV2, RECORDS_CONTENT_TAG_LABELS_V2, RecordsKeyringV1, exportKeyBytesV1, generateWorkspaceSecretV1, deriveRecordsIdKeyV1, deriveRecordsKeysV1, importWorkspaceSecretKeyV1, deriveRecordsIdKeyFromBaseV1, deriveRecordsKeysFromBaseV1, recordKeyOfV1, recordKeyFromBytesV1, recordsKeyFromBytesV1, wireRecordIdV1, wireReferenceIdV1, contentTagV1, contentTagV2, recordEntryPlaintextV1, padRecordEntryV1, sealRecordEntryV1, readRecordEnvelopeShapeV1, openRecordEntryEnvelopeV1, encryptedWriteBodyBytesV1, checkEncryptedWriteSizeV1, entryRefsMatchV1, localRecordsKeyProviderV1, serializeRecordsKeyringFileV1, parseRecordsKeyringFileV1, type RecordsEncryptionCodeV1, type RecordsRefusalV1, type RecordEntryEnvelopeV1, type OpenRecordEntryResultV1, type RecordsKeyProviderV1, type RecordsBaseKeyProviderV1, } from './records-encryption-v1';
|
|
11
|
+
export { RECORDS_ENCRYPTION_LABELS_V1, RECORDS_ENCRYPTION_PAD_BLOCK_V1, RECORD_ENTRY_PLAINTEXT_MAX_BYTES_V1, RECORD_ENTRY_CIPHERTEXT_MAX_BYTES_V1, RECORD_ENTRY_CIPHERTEXT_MAX_CHARS_V1, RECORD_ENTRY_BODY_MAX_BYTES_V1, RECORDS_KEYRING_MAX_BYTES_V1, RECORDS_KEYRING_SCHEMA_V1, WORKSPACE_SECRET_BYTES_V1, RecordsEncryptionError, RecordsIdKeyV1, RecordsKeyV1, RecordsWrapKeyV1, RecordKeyV1, RecordsContentTagKeyV2, RECORDS_CONTENT_TAG_LABELS_V2, RecordsKeyringV1, exportKeyBytesV1, generateWorkspaceSecretV1, deriveRecordsIdKeyV1, deriveRecordsKeysV1, importWorkspaceSecretKeyV1, deriveRecordsIdKeyFromBaseV1, deriveRecordsKeysFromBaseV1, recordKeyOfV1, recordKeyFromBytesV1, recordsKeyFromBytesV1, wireRecordIdV1, wireReferenceIdV1, blindedLabelV1, contentTagV1, contentTagV2, recordEntryPlaintextV1, padRecordEntryV1, sealRecordEntryV1, readRecordEnvelopeShapeV1, openRecordEntryEnvelopeV1, encryptedWriteBodyBytesV1, checkEncryptedWriteSizeV1, entryRefsMatchV1, localRecordsKeyProviderV1, serializeRecordsKeyringFileV1, parseRecordsKeyringFileV1, type RecordsEncryptionCodeV1, type RecordsRefusalV1, type RecordEntryEnvelopeV1, type OpenRecordEntryResultV1, type RecordsKeyProviderV1, type RecordsBaseKeyProviderV1, } from './records-encryption-v1';
|
|
12
12
|
export declare function blindedDigest(source: PayloadByteSource, value: Uint8Array): Promise<PayloadRefV1>;
|
|
13
13
|
export declare function newBlindingValue(): Promise<Uint8Array>;
|
|
@@ -82,6 +82,7 @@ export declare function recordsKeyFromBytesV1(bytes: Uint8Array, version: number
|
|
|
82
82
|
export declare function recordKeyFromBytesV1(bytes: Uint8Array, recordsKeyId?: string | null): Promise<RecordKeyV1>;
|
|
83
83
|
export declare function wireRecordIdV1(idKey: RecordsIdKeyV1, recordType: string, entityId: string): Promise<string>;
|
|
84
84
|
export declare function wireReferenceIdV1(idKey: RecordsIdKeyV1, referenceId: string): Promise<string>;
|
|
85
|
+
export declare function blindedLabelV1(idKey: RecordsIdKeyV1, name: string, value: string): Promise<string>;
|
|
85
86
|
export declare function contentTagV1(idKey: RecordsIdKeyV1, input: {
|
|
86
87
|
recordType: string;
|
|
87
88
|
wireRecordId: string;
|