@reallyme/crypto 0.1.8 → 0.2.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/LICENSE +201 -0
- package/README.md +43 -3
- package/dist/aead.d.ts +4 -0
- package/dist/aead.js +32 -15
- package/dist/aesKw.d.ts +3 -0
- package/dist/aesKw.js +10 -0
- package/dist/argon2id.d.ts +2 -0
- package/dist/argon2id.js +6 -0
- package/dist/cryptoFacade.d.ts +36 -0
- package/dist/cryptoFacade.js +71 -23
- package/dist/errors.d.ts +1 -1
- package/dist/hpke.d.ts +4 -0
- package/dist/hpke.js +20 -0
- package/dist/index.d.ts +5 -6
- package/dist/index.js +4 -4
- package/dist/jwaConcatKdf.js +8 -4
- package/dist/jwk.js +67 -72
- package/dist/memory.d.ts +8 -0
- package/dist/memory.js +13 -0
- package/dist/mlDsa.d.ts +5 -0
- package/dist/mlDsa.js +23 -0
- package/dist/mlKem.d.ts +6 -0
- package/dist/mlKem.js +29 -0
- package/dist/p256Ecdh.js +5 -1
- package/dist/p384Ecdh.js +5 -1
- package/dist/p521Ecdh.js +5 -1
- package/dist/proto/generated/reallyme/crypto/v1/crypto_pb.d.ts +1392 -72
- package/dist/proto/generated/reallyme/crypto/v1/crypto_pb.js +490 -17
- package/dist/proto.d.ts +113 -5
- package/dist/proto.js +706 -3
- package/dist/rsa.d.ts +2 -0
- package/dist/rsa.js +18 -15
- package/dist/slhDsa.d.ts +5 -0
- package/dist/slhDsa.js +21 -0
- package/dist/validateBytes.d.ts +1 -0
- package/dist/validateBytes.js +6 -0
- package/dist/wasm/reallyme_crypto_wasm.js +1 -246
- package/dist/wasm/reallyme_crypto_wasm_bg.wasm +0 -0
- package/dist/wasmModuleTypes.d.ts +2 -11
- package/dist/wasmProvider.d.ts +1 -16
- package/dist/wasmProvider.js +10 -25
- package/dist/xWing.d.ts +6 -0
- package/dist/xWing.js +34 -2
- package/package.json +7 -2
- package/dist/codecs.d.ts +0 -35
- package/dist/codecs.js +0 -216
- package/dist/proto/generated/reallyme/codec/v1/codec_pb.d.ts +0 -253
- package/dist/proto/generated/reallyme/codec/v1/codec_pb.js +0 -160
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reallyme/crypto",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "ReallyMe crypto SDK for TypeScript/JavaScript with an explicit, pinned provider set.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -25,19 +25,24 @@
|
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
27
|
"dist",
|
|
28
|
+
"LICENSE",
|
|
28
29
|
"README.md"
|
|
29
30
|
],
|
|
30
31
|
"scripts": {
|
|
31
32
|
"build": "node scripts/clean-dist.mjs && npm run build:wasm && tsc",
|
|
32
33
|
"build:ts": "tsc",
|
|
33
34
|
"build:wasm": "node scripts/build-wasm.mjs",
|
|
35
|
+
"pack:check": "node scripts/check-pack.mjs",
|
|
36
|
+
"prepack": "npm run build",
|
|
37
|
+
"prepublishOnly": "npm test && npm run pack:check",
|
|
34
38
|
"typecheck": "tsc --noEmit",
|
|
35
39
|
"test": "npm run build && node --test \"test/*.test.mjs\""
|
|
36
40
|
},
|
|
37
41
|
"dependencies": {
|
|
38
42
|
"@bufbuild/protobuf": "2.12.1",
|
|
39
43
|
"@noble/curves": "2.2.0",
|
|
40
|
-
"@noble/hashes": "2.2.0"
|
|
44
|
+
"@noble/hashes": "2.2.0",
|
|
45
|
+
"@reallyme/codec": "0.1.21"
|
|
41
46
|
},
|
|
42
47
|
"devDependencies": {
|
|
43
48
|
"typescript": "5.8.3"
|
package/dist/codecs.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export type ReallyMeMulticodecTag = "encryption" | "hash" | "key" | "multihash" | "multikey";
|
|
2
|
-
export type ReallyMeKeyMaterialKind = "not-key" | "public-key" | "private-key" | "symmetric-key";
|
|
3
|
-
export type ReallyMeMulticodecMetadata = Readonly<{
|
|
4
|
-
name: string;
|
|
5
|
-
alg: string;
|
|
6
|
-
tag: ReallyMeMulticodecTag;
|
|
7
|
-
keyMaterial: ReallyMeKeyMaterialKind;
|
|
8
|
-
prefix: Uint8Array;
|
|
9
|
-
expectedKeyLength?: number;
|
|
10
|
-
}>;
|
|
11
|
-
export type ReallyMeParsedMultikey = Readonly<{
|
|
12
|
-
codecName: string;
|
|
13
|
-
algorithmName: string;
|
|
14
|
-
publicKey: Uint8Array;
|
|
15
|
-
expectedPublicKeyLength?: number;
|
|
16
|
-
}>;
|
|
17
|
-
export type ReallyMeDagCborCidVerification = Readonly<{
|
|
18
|
-
valid: boolean;
|
|
19
|
-
expectedCid: string;
|
|
20
|
-
actualCid: string;
|
|
21
|
-
}>;
|
|
22
|
-
export declare const ReallyMeCodecs: {
|
|
23
|
-
readonly base64urlEncode: (bytes: Uint8Array) => string;
|
|
24
|
-
readonly base64urlDecode: (encoded: string) => Uint8Array;
|
|
25
|
-
readonly base64urlDecodeBytes: (encoded: Uint8Array) => Uint8Array;
|
|
26
|
-
readonly multibaseBase64urlEncode: (bytes: Uint8Array) => string;
|
|
27
|
-
readonly multibaseBase58btcEncode: (bytes: Uint8Array) => string;
|
|
28
|
-
readonly multibaseDecode: (encoded: string) => Uint8Array;
|
|
29
|
-
readonly multicodecPrefixForName: (codecName: string) => ReallyMeMulticodecMetadata;
|
|
30
|
-
readonly multicodecLookupPrefix: (bytes: Uint8Array) => ReallyMeMulticodecMetadata;
|
|
31
|
-
readonly multikeyEncode: (codecName: string, publicKey: Uint8Array) => string;
|
|
32
|
-
readonly multikeyParse: (multikey: string) => ReallyMeParsedMultikey;
|
|
33
|
-
readonly dagCborComputeCid: (bytes: Uint8Array) => string;
|
|
34
|
-
readonly dagCborVerifyCid: (cid: string, bytes: Uint8Array) => ReallyMeDagCborCidVerification;
|
|
35
|
-
};
|
package/dist/codecs.js
DELETED
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
// SPDX-FileCopyrightText: Copyright © 2026 ReallyMe LLC. All rights reserved
|
|
2
|
-
//
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import { ReallyMeCryptoError } from "./errors.js";
|
|
5
|
-
import { requireReallyMeWasmProvider } from "./wasmProvider.js";
|
|
6
|
-
const validTags = new Set([
|
|
7
|
-
"encryption",
|
|
8
|
-
"hash",
|
|
9
|
-
"key",
|
|
10
|
-
"multihash",
|
|
11
|
-
"multikey",
|
|
12
|
-
]);
|
|
13
|
-
const validKeyMaterialKinds = new Set([
|
|
14
|
-
"not-key",
|
|
15
|
-
"public-key",
|
|
16
|
-
"private-key",
|
|
17
|
-
"symmetric-key",
|
|
18
|
-
]);
|
|
19
|
-
const ensureStringInput = (value) => {
|
|
20
|
-
if (typeof value !== "string" || value.length === 0) {
|
|
21
|
-
throw new ReallyMeCryptoError("invalid-input");
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
const ensureBytesInput = (value) => {
|
|
25
|
-
if (!(value instanceof Uint8Array)) {
|
|
26
|
-
throw new ReallyMeCryptoError("invalid-input");
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
const requireObjectOutput = (value) => {
|
|
30
|
-
if (typeof value !== "object" || value === null) {
|
|
31
|
-
throw new ReallyMeCryptoError("provider-failure");
|
|
32
|
-
}
|
|
33
|
-
return value;
|
|
34
|
-
};
|
|
35
|
-
const readStringOutput = (value) => {
|
|
36
|
-
if (typeof value !== "string") {
|
|
37
|
-
throw new ReallyMeCryptoError("provider-failure");
|
|
38
|
-
}
|
|
39
|
-
return value;
|
|
40
|
-
};
|
|
41
|
-
const readBytesOutput = (value) => {
|
|
42
|
-
if (!(value instanceof Uint8Array)) {
|
|
43
|
-
throw new ReallyMeCryptoError("provider-failure");
|
|
44
|
-
}
|
|
45
|
-
return value;
|
|
46
|
-
};
|
|
47
|
-
const readStringProperty = (object, propertyName) => {
|
|
48
|
-
const property = Reflect.get(object, propertyName);
|
|
49
|
-
if (typeof property !== "string" || property.length === 0) {
|
|
50
|
-
throw new ReallyMeCryptoError("provider-failure");
|
|
51
|
-
}
|
|
52
|
-
return property;
|
|
53
|
-
};
|
|
54
|
-
const readBooleanProperty = (object, propertyName) => {
|
|
55
|
-
const property = Reflect.get(object, propertyName);
|
|
56
|
-
if (typeof property !== "boolean") {
|
|
57
|
-
throw new ReallyMeCryptoError("provider-failure");
|
|
58
|
-
}
|
|
59
|
-
return property;
|
|
60
|
-
};
|
|
61
|
-
const readBytesProperty = (object, propertyName) => {
|
|
62
|
-
const property = Reflect.get(object, propertyName);
|
|
63
|
-
if (!(property instanceof Uint8Array)) {
|
|
64
|
-
throw new ReallyMeCryptoError("provider-failure");
|
|
65
|
-
}
|
|
66
|
-
return property;
|
|
67
|
-
};
|
|
68
|
-
const readOptionalLengthProperty = (object, propertyName) => {
|
|
69
|
-
const property = Reflect.get(object, propertyName);
|
|
70
|
-
if (property === undefined) {
|
|
71
|
-
return undefined;
|
|
72
|
-
}
|
|
73
|
-
if (typeof property !== "number" || !Number.isSafeInteger(property) || property < 0) {
|
|
74
|
-
throw new ReallyMeCryptoError("provider-failure");
|
|
75
|
-
}
|
|
76
|
-
return property;
|
|
77
|
-
};
|
|
78
|
-
const readTagProperty = (object) => {
|
|
79
|
-
const tag = readStringProperty(object, "tag");
|
|
80
|
-
if (!validTags.has(tag)) {
|
|
81
|
-
throw new ReallyMeCryptoError("provider-failure");
|
|
82
|
-
}
|
|
83
|
-
switch (tag) {
|
|
84
|
-
case "encryption":
|
|
85
|
-
case "hash":
|
|
86
|
-
case "key":
|
|
87
|
-
case "multihash":
|
|
88
|
-
case "multikey":
|
|
89
|
-
return tag;
|
|
90
|
-
default:
|
|
91
|
-
throw new ReallyMeCryptoError("provider-failure");
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
const readKeyMaterialProperty = (object) => {
|
|
95
|
-
const keyMaterial = readStringProperty(object, "keyMaterial");
|
|
96
|
-
if (!validKeyMaterialKinds.has(keyMaterial)) {
|
|
97
|
-
throw new ReallyMeCryptoError("provider-failure");
|
|
98
|
-
}
|
|
99
|
-
switch (keyMaterial) {
|
|
100
|
-
case "not-key":
|
|
101
|
-
case "public-key":
|
|
102
|
-
case "private-key":
|
|
103
|
-
case "symmetric-key":
|
|
104
|
-
return keyMaterial;
|
|
105
|
-
default:
|
|
106
|
-
throw new ReallyMeCryptoError("provider-failure");
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
const readMulticodecMetadata = (value) => {
|
|
110
|
-
const object = requireObjectOutput(value);
|
|
111
|
-
const expectedKeyLength = readOptionalLengthProperty(object, "expectedKeyLength");
|
|
112
|
-
if (expectedKeyLength === undefined) {
|
|
113
|
-
return {
|
|
114
|
-
name: readStringProperty(object, "name"),
|
|
115
|
-
alg: readStringProperty(object, "alg"),
|
|
116
|
-
tag: readTagProperty(object),
|
|
117
|
-
keyMaterial: readKeyMaterialProperty(object),
|
|
118
|
-
prefix: readBytesProperty(object, "prefix"),
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
return {
|
|
122
|
-
name: readStringProperty(object, "name"),
|
|
123
|
-
alg: readStringProperty(object, "alg"),
|
|
124
|
-
tag: readTagProperty(object),
|
|
125
|
-
keyMaterial: readKeyMaterialProperty(object),
|
|
126
|
-
prefix: readBytesProperty(object, "prefix"),
|
|
127
|
-
expectedKeyLength,
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
const readParsedMultikey = (value) => {
|
|
131
|
-
const object = requireObjectOutput(value);
|
|
132
|
-
const expectedPublicKeyLength = readOptionalLengthProperty(object, "expectedPublicKeyLength");
|
|
133
|
-
if (expectedPublicKeyLength === undefined) {
|
|
134
|
-
return {
|
|
135
|
-
codecName: readStringProperty(object, "codecName"),
|
|
136
|
-
algorithmName: readStringProperty(object, "algorithmName"),
|
|
137
|
-
publicKey: readBytesProperty(object, "publicKey"),
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
return {
|
|
141
|
-
codecName: readStringProperty(object, "codecName"),
|
|
142
|
-
algorithmName: readStringProperty(object, "algorithmName"),
|
|
143
|
-
publicKey: readBytesProperty(object, "publicKey"),
|
|
144
|
-
expectedPublicKeyLength,
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
const readCidVerification = (value) => {
|
|
148
|
-
const object = requireObjectOutput(value);
|
|
149
|
-
return {
|
|
150
|
-
valid: readBooleanProperty(object, "valid"),
|
|
151
|
-
expectedCid: readStringProperty(object, "expectedCid"),
|
|
152
|
-
actualCid: readStringProperty(object, "actualCid"),
|
|
153
|
-
};
|
|
154
|
-
};
|
|
155
|
-
const asciiBytesToString = (bytes) => {
|
|
156
|
-
let value = "";
|
|
157
|
-
for (const byte of bytes) {
|
|
158
|
-
if (byte > 0x7f) {
|
|
159
|
-
throw new ReallyMeCryptoError("invalid-input");
|
|
160
|
-
}
|
|
161
|
-
value += String.fromCharCode(byte);
|
|
162
|
-
}
|
|
163
|
-
return value;
|
|
164
|
-
};
|
|
165
|
-
export const ReallyMeCodecs = {
|
|
166
|
-
base64urlEncode(bytes) {
|
|
167
|
-
ensureBytesInput(bytes);
|
|
168
|
-
return readStringOutput(requireReallyMeWasmProvider().base64urlEncode(bytes));
|
|
169
|
-
},
|
|
170
|
-
base64urlDecode(encoded) {
|
|
171
|
-
ensureStringInput(encoded);
|
|
172
|
-
return readBytesOutput(requireReallyMeWasmProvider().base64urlDecode(encoded));
|
|
173
|
-
},
|
|
174
|
-
base64urlDecodeBytes(encoded) {
|
|
175
|
-
ensureBytesInput(encoded);
|
|
176
|
-
return readBytesOutput(requireReallyMeWasmProvider().base64urlDecode(asciiBytesToString(encoded)));
|
|
177
|
-
},
|
|
178
|
-
multibaseBase64urlEncode(bytes) {
|
|
179
|
-
ensureBytesInput(bytes);
|
|
180
|
-
return readStringOutput(requireReallyMeWasmProvider().multibaseBase64urlEncode(bytes));
|
|
181
|
-
},
|
|
182
|
-
multibaseBase58btcEncode(bytes) {
|
|
183
|
-
ensureBytesInput(bytes);
|
|
184
|
-
return readStringOutput(requireReallyMeWasmProvider().multibaseBase58btcEncode(bytes));
|
|
185
|
-
},
|
|
186
|
-
multibaseDecode(encoded) {
|
|
187
|
-
ensureStringInput(encoded);
|
|
188
|
-
return readBytesOutput(requireReallyMeWasmProvider().multibaseDecode(encoded));
|
|
189
|
-
},
|
|
190
|
-
multicodecPrefixForName(codecName) {
|
|
191
|
-
ensureStringInput(codecName);
|
|
192
|
-
return readMulticodecMetadata(requireReallyMeWasmProvider().multicodecPrefixForName(codecName));
|
|
193
|
-
},
|
|
194
|
-
multicodecLookupPrefix(bytes) {
|
|
195
|
-
ensureBytesInput(bytes);
|
|
196
|
-
return readMulticodecMetadata(requireReallyMeWasmProvider().multicodecLookupPrefix(bytes));
|
|
197
|
-
},
|
|
198
|
-
multikeyEncode(codecName, publicKey) {
|
|
199
|
-
ensureStringInput(codecName);
|
|
200
|
-
ensureBytesInput(publicKey);
|
|
201
|
-
return readStringOutput(requireReallyMeWasmProvider().multikeyEncode(codecName, publicKey));
|
|
202
|
-
},
|
|
203
|
-
multikeyParse(multikey) {
|
|
204
|
-
ensureStringInput(multikey);
|
|
205
|
-
return readParsedMultikey(requireReallyMeWasmProvider().multikeyParse(multikey));
|
|
206
|
-
},
|
|
207
|
-
dagCborComputeCid(bytes) {
|
|
208
|
-
ensureBytesInput(bytes);
|
|
209
|
-
return readStringOutput(requireReallyMeWasmProvider().dagCborComputeCid(bytes));
|
|
210
|
-
},
|
|
211
|
-
dagCborVerifyCid(cid, bytes) {
|
|
212
|
-
ensureStringInput(cid);
|
|
213
|
-
ensureBytesInput(bytes);
|
|
214
|
-
return readCidVerification(requireReallyMeWasmProvider().dagCborVerifyCid(cid, bytes));
|
|
215
|
-
},
|
|
216
|
-
};
|
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
-
import type { Message } from "@bufbuild/protobuf";
|
|
3
|
-
/**
|
|
4
|
-
* Describes the file reallyme/codec/v1/codec.proto.
|
|
5
|
-
*/
|
|
6
|
-
export declare const file_reallyme_codec_v1_codec: GenFile;
|
|
7
|
-
/**
|
|
8
|
-
* CodecError is the public, non-PII error envelope for codec boundary failures.
|
|
9
|
-
* The oneof keeps base encoding, PEM, multiformat, and canonicalization
|
|
10
|
-
* failures distinct while the shared CodecErrorReason enum provides stable
|
|
11
|
-
* cross-language reason codes.
|
|
12
|
-
*
|
|
13
|
-
* @generated from message reallyme.codec.v1.CodecError
|
|
14
|
-
*/
|
|
15
|
-
export type CodecError = Message<"reallyme.codec.v1.CodecError"> & {
|
|
16
|
-
/**
|
|
17
|
-
* @generated from oneof reallyme.codec.v1.CodecError.error
|
|
18
|
-
*/
|
|
19
|
-
error: {
|
|
20
|
-
/**
|
|
21
|
-
* @generated from field: reallyme.codec.v1.CodecBaseEncodingError base_encoding = 1;
|
|
22
|
-
*/
|
|
23
|
-
value: CodecBaseEncodingError;
|
|
24
|
-
case: "baseEncoding";
|
|
25
|
-
} | {
|
|
26
|
-
/**
|
|
27
|
-
* @generated from field: reallyme.codec.v1.CodecPemError pem = 2;
|
|
28
|
-
*/
|
|
29
|
-
value: CodecPemError;
|
|
30
|
-
case: "pem";
|
|
31
|
-
} | {
|
|
32
|
-
/**
|
|
33
|
-
* @generated from field: reallyme.codec.v1.CodecMultiformatError multiformat = 3;
|
|
34
|
-
*/
|
|
35
|
-
value: CodecMultiformatError;
|
|
36
|
-
case: "multiformat";
|
|
37
|
-
} | {
|
|
38
|
-
/**
|
|
39
|
-
* @generated from field: reallyme.codec.v1.CodecCanonicalizationError canonicalization = 4;
|
|
40
|
-
*/
|
|
41
|
-
value: CodecCanonicalizationError;
|
|
42
|
-
case: "canonicalization";
|
|
43
|
-
} | {
|
|
44
|
-
case: undefined;
|
|
45
|
-
value?: undefined;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Describes the message reallyme.codec.v1.CodecError.
|
|
50
|
-
* Use `create(CodecErrorSchema)` to create a new message.
|
|
51
|
-
*/
|
|
52
|
-
export declare const CodecErrorSchema: GenMessage<CodecError>;
|
|
53
|
-
/**
|
|
54
|
-
* CodecBaseEncodingError describes base64, base64url, hex, and generic byte
|
|
55
|
-
* encoding failures.
|
|
56
|
-
*
|
|
57
|
-
* @generated from message reallyme.codec.v1.CodecBaseEncodingError
|
|
58
|
-
*/
|
|
59
|
-
export type CodecBaseEncodingError = Message<"reallyme.codec.v1.CodecBaseEncodingError"> & {
|
|
60
|
-
/**
|
|
61
|
-
* Reason must be one of the CODEC_ERROR_REASON_BASE_* values.
|
|
62
|
-
*
|
|
63
|
-
* @generated from field: reallyme.codec.v1.CodecErrorReason reason = 1;
|
|
64
|
-
*/
|
|
65
|
-
reason: CodecErrorReason;
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Describes the message reallyme.codec.v1.CodecBaseEncodingError.
|
|
69
|
-
* Use `create(CodecBaseEncodingErrorSchema)` to create a new message.
|
|
70
|
-
*/
|
|
71
|
-
export declare const CodecBaseEncodingErrorSchema: GenMessage<CodecBaseEncodingError>;
|
|
72
|
-
/**
|
|
73
|
-
* CodecPemError describes RFC 7468-style PEM armor boundary and body failures.
|
|
74
|
-
*
|
|
75
|
-
* @generated from message reallyme.codec.v1.CodecPemError
|
|
76
|
-
*/
|
|
77
|
-
export type CodecPemError = Message<"reallyme.codec.v1.CodecPemError"> & {
|
|
78
|
-
/**
|
|
79
|
-
* Reason must be one of the CODEC_ERROR_REASON_PEM_* values.
|
|
80
|
-
*
|
|
81
|
-
* @generated from field: reallyme.codec.v1.CodecErrorReason reason = 1;
|
|
82
|
-
*/
|
|
83
|
-
reason: CodecErrorReason;
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Describes the message reallyme.codec.v1.CodecPemError.
|
|
87
|
-
* Use `create(CodecPemErrorSchema)` to create a new message.
|
|
88
|
-
*/
|
|
89
|
-
export declare const CodecPemErrorSchema: GenMessage<CodecPemError>;
|
|
90
|
-
/**
|
|
91
|
-
* CodecMultiformatError describes multibase, multicodec, and multikey
|
|
92
|
-
* envelope failures.
|
|
93
|
-
*
|
|
94
|
-
* @generated from message reallyme.codec.v1.CodecMultiformatError
|
|
95
|
-
*/
|
|
96
|
-
export type CodecMultiformatError = Message<"reallyme.codec.v1.CodecMultiformatError"> & {
|
|
97
|
-
/**
|
|
98
|
-
* Reason must be one of the CODEC_ERROR_REASON_MULTIFORMAT_* values.
|
|
99
|
-
*
|
|
100
|
-
* @generated from field: reallyme.codec.v1.CodecErrorReason reason = 1;
|
|
101
|
-
*/
|
|
102
|
-
reason: CodecErrorReason;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Describes the message reallyme.codec.v1.CodecMultiformatError.
|
|
106
|
-
* Use `create(CodecMultiformatErrorSchema)` to create a new message.
|
|
107
|
-
*/
|
|
108
|
-
export declare const CodecMultiformatErrorSchema: GenMessage<CodecMultiformatError>;
|
|
109
|
-
/**
|
|
110
|
-
* CodecCanonicalizationError describes CBOR, DAG-CBOR, JCS, and JSON
|
|
111
|
-
* canonicalization failures.
|
|
112
|
-
*
|
|
113
|
-
* @generated from message reallyme.codec.v1.CodecCanonicalizationError
|
|
114
|
-
*/
|
|
115
|
-
export type CodecCanonicalizationError = Message<"reallyme.codec.v1.CodecCanonicalizationError"> & {
|
|
116
|
-
/**
|
|
117
|
-
* Reason must be one of the CODEC_ERROR_REASON_CANONICAL_* values.
|
|
118
|
-
*
|
|
119
|
-
* @generated from field: reallyme.codec.v1.CodecErrorReason reason = 1;
|
|
120
|
-
*/
|
|
121
|
-
reason: CodecErrorReason;
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* Describes the message reallyme.codec.v1.CodecCanonicalizationError.
|
|
125
|
-
* Use `create(CodecCanonicalizationErrorSchema)` to create a new message.
|
|
126
|
-
*/
|
|
127
|
-
export declare const CodecCanonicalizationErrorSchema: GenMessage<CodecCanonicalizationError>;
|
|
128
|
-
/**
|
|
129
|
-
* CodecErrorReason is the component-owned reason-code enum for reallyme/codec.
|
|
130
|
-
* Values are stable public boundary codes; local parser errors must map into
|
|
131
|
-
* one of these before crossing RPC, SDK, FFI, storage, audit, or telemetry
|
|
132
|
-
* boundaries. Numeric ranges are intentionally split by codec subpart:
|
|
133
|
-
* 100-199: base encodings
|
|
134
|
-
* 200-299: PEM armor
|
|
135
|
-
* 300-399: multiformats and key envelopes
|
|
136
|
-
* 400-499: CBOR/JCS/JSON canonicalization
|
|
137
|
-
*
|
|
138
|
-
* @generated from enum reallyme.codec.v1.CodecErrorReason
|
|
139
|
-
*/
|
|
140
|
-
export declare enum CodecErrorReason {
|
|
141
|
-
/**
|
|
142
|
-
* @generated from enum value: CODEC_ERROR_REASON_UNSPECIFIED = 0;
|
|
143
|
-
*/
|
|
144
|
-
UNSPECIFIED = 0,
|
|
145
|
-
/**
|
|
146
|
-
* Base encodings and generic byte-envelope limits.
|
|
147
|
-
*
|
|
148
|
-
* @generated from enum value: CODEC_ERROR_REASON_BASE_UNSUPPORTED_CODEC = 100;
|
|
149
|
-
*/
|
|
150
|
-
BASE_UNSUPPORTED_CODEC = 100,
|
|
151
|
-
/**
|
|
152
|
-
* @generated from enum value: CODEC_ERROR_REASON_BASE_INVALID_ENCODING = 101;
|
|
153
|
-
*/
|
|
154
|
-
BASE_INVALID_ENCODING = 101,
|
|
155
|
-
/**
|
|
156
|
-
* @generated from enum value: CODEC_ERROR_REASON_BASE_INVALID_LENGTH = 102;
|
|
157
|
-
*/
|
|
158
|
-
BASE_INVALID_LENGTH = 102,
|
|
159
|
-
/**
|
|
160
|
-
* @generated from enum value: CODEC_ERROR_REASON_BASE_INPUT_TOO_LARGE = 103;
|
|
161
|
-
*/
|
|
162
|
-
BASE_INPUT_TOO_LARGE = 103,
|
|
163
|
-
/**
|
|
164
|
-
* @generated from enum value: CODEC_ERROR_REASON_BASE_OUTPUT_TOO_LARGE = 104;
|
|
165
|
-
*/
|
|
166
|
-
BASE_OUTPUT_TOO_LARGE = 104,
|
|
167
|
-
/**
|
|
168
|
-
* @generated from enum value: CODEC_ERROR_REASON_BASE_INVALID_BASE64 = 110;
|
|
169
|
-
*/
|
|
170
|
-
BASE_INVALID_BASE64 = 110,
|
|
171
|
-
/**
|
|
172
|
-
* @generated from enum value: CODEC_ERROR_REASON_BASE_INVALID_BASE64URL = 111;
|
|
173
|
-
*/
|
|
174
|
-
BASE_INVALID_BASE64URL = 111,
|
|
175
|
-
/**
|
|
176
|
-
* @generated from enum value: CODEC_ERROR_REASON_BASE_NON_CANONICAL_BASE64URL = 112;
|
|
177
|
-
*/
|
|
178
|
-
BASE_NON_CANONICAL_BASE64URL = 112,
|
|
179
|
-
/**
|
|
180
|
-
* @generated from enum value: CODEC_ERROR_REASON_BASE_INVALID_HEX = 120;
|
|
181
|
-
*/
|
|
182
|
-
BASE_INVALID_HEX = 120,
|
|
183
|
-
/**
|
|
184
|
-
* @generated from enum value: CODEC_ERROR_REASON_BASE_NON_CANONICAL_HEX = 121;
|
|
185
|
-
*/
|
|
186
|
-
BASE_NON_CANONICAL_HEX = 121,
|
|
187
|
-
/**
|
|
188
|
-
* PEM armor.
|
|
189
|
-
*
|
|
190
|
-
* @generated from enum value: CODEC_ERROR_REASON_PEM_INVALID_BOUNDARY = 200;
|
|
191
|
-
*/
|
|
192
|
-
PEM_INVALID_BOUNDARY = 200,
|
|
193
|
-
/**
|
|
194
|
-
* @generated from enum value: CODEC_ERROR_REASON_PEM_LABEL_MISMATCH = 201;
|
|
195
|
-
*/
|
|
196
|
-
PEM_LABEL_MISMATCH = 201,
|
|
197
|
-
/**
|
|
198
|
-
* @generated from enum value: CODEC_ERROR_REASON_PEM_UNSUPPORTED_LABEL = 202;
|
|
199
|
-
*/
|
|
200
|
-
PEM_UNSUPPORTED_LABEL = 202,
|
|
201
|
-
/**
|
|
202
|
-
* @generated from enum value: CODEC_ERROR_REASON_PEM_INVALID_BODY = 203;
|
|
203
|
-
*/
|
|
204
|
-
PEM_INVALID_BODY = 203,
|
|
205
|
-
/**
|
|
206
|
-
* @generated from enum value: CODEC_ERROR_REASON_PEM_DER_TOO_LARGE = 204;
|
|
207
|
-
*/
|
|
208
|
-
PEM_DER_TOO_LARGE = 204,
|
|
209
|
-
/**
|
|
210
|
-
* Multiformats and key envelopes.
|
|
211
|
-
*
|
|
212
|
-
* @generated from enum value: CODEC_ERROR_REASON_MULTIFORMAT_INVALID_MULTIBASE_PREFIX = 300;
|
|
213
|
-
*/
|
|
214
|
-
MULTIFORMAT_INVALID_MULTIBASE_PREFIX = 300,
|
|
215
|
-
/**
|
|
216
|
-
* @generated from enum value: CODEC_ERROR_REASON_MULTIFORMAT_INVALID_MULTICODEC_PREFIX = 301;
|
|
217
|
-
*/
|
|
218
|
-
MULTIFORMAT_INVALID_MULTICODEC_PREFIX = 301,
|
|
219
|
-
/**
|
|
220
|
-
* @generated from enum value: CODEC_ERROR_REASON_MULTIFORMAT_UNKNOWN_MULTICODEC = 302;
|
|
221
|
-
*/
|
|
222
|
-
MULTIFORMAT_UNKNOWN_MULTICODEC = 302,
|
|
223
|
-
/**
|
|
224
|
-
* @generated from enum value: CODEC_ERROR_REASON_MULTIFORMAT_INVALID_MULTIKEY = 303;
|
|
225
|
-
*/
|
|
226
|
-
MULTIFORMAT_INVALID_MULTIKEY = 303,
|
|
227
|
-
/**
|
|
228
|
-
* CBOR, DAG-CBOR, JCS, and JSON canonicalization.
|
|
229
|
-
*
|
|
230
|
-
* @generated from enum value: CODEC_ERROR_REASON_CANONICAL_INVALID_CBOR = 400;
|
|
231
|
-
*/
|
|
232
|
-
CANONICAL_INVALID_CBOR = 400,
|
|
233
|
-
/**
|
|
234
|
-
* @generated from enum value: CODEC_ERROR_REASON_CANONICAL_NON_CANONICAL_CBOR = 401;
|
|
235
|
-
*/
|
|
236
|
-
CANONICAL_NON_CANONICAL_CBOR = 401,
|
|
237
|
-
/**
|
|
238
|
-
* @generated from enum value: CODEC_ERROR_REASON_CANONICAL_INVALID_JSON = 402;
|
|
239
|
-
*/
|
|
240
|
-
CANONICAL_INVALID_JSON = 402,
|
|
241
|
-
/**
|
|
242
|
-
* @generated from enum value: CODEC_ERROR_REASON_CANONICAL_NON_CANONICAL_JSON = 403;
|
|
243
|
-
*/
|
|
244
|
-
CANONICAL_NON_CANONICAL_JSON = 403,
|
|
245
|
-
/**
|
|
246
|
-
* @generated from enum value: CODEC_ERROR_REASON_CANONICAL_INTERNAL = 404;
|
|
247
|
-
*/
|
|
248
|
-
CANONICAL_INTERNAL = 404
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Describes the enum reallyme.codec.v1.CodecErrorReason.
|
|
252
|
-
*/
|
|
253
|
-
export declare const CodecErrorReasonSchema: GenEnum<CodecErrorReason>;
|