@peac/protocol 0.12.0-preview.2 → 0.12.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 +25 -13
- package/dist/index.cjs +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +7 -4
- package/dist/index.mjs.map +1 -1
- package/dist/issue.d.ts +36 -12
- package/dist/issue.d.ts.map +1 -1
- package/dist/verify-local.cjs +1 -1
- package/dist/verify-local.cjs.map +1 -1
- package/dist/verify-local.d.ts +1 -1
- package/dist/verify-local.mjs +1 -1
- package/dist/verify-local.mjs.map +1 -1
- package/dist/verify.d.ts +11 -4
- package/dist/verify.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -34,7 +34,7 @@ var IssueError = class extends Error {
|
|
|
34
34
|
this.peacError = peacError;
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
async function
|
|
37
|
+
async function issueWire01(options) {
|
|
38
38
|
if (!options.iss.startsWith("https://")) {
|
|
39
39
|
throw new Error("Issuer URL must start with https://");
|
|
40
40
|
}
|
|
@@ -175,9 +175,12 @@ async function issue(options) {
|
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
177
|
async function issueJws(options) {
|
|
178
|
-
const result = await
|
|
178
|
+
const result = await issueWire01(options);
|
|
179
179
|
return result.jws;
|
|
180
180
|
}
|
|
181
|
+
async function issue(options) {
|
|
182
|
+
return issueWire02(options);
|
|
183
|
+
}
|
|
181
184
|
async function issueWire02(options) {
|
|
182
185
|
if (!isCanonicalIss(options.iss)) {
|
|
183
186
|
throw new IssueError({
|
|
@@ -1549,7 +1552,7 @@ async function verifyLocal(jws, publicKey, options = {}) {
|
|
|
1549
1552
|
return {
|
|
1550
1553
|
valid: false,
|
|
1551
1554
|
code: "E_UNSUPPORTED_WIRE_VERSION",
|
|
1552
|
-
message: "Wire 0.1 receipts are not supported. Re-issue as Wire 0.2 using
|
|
1555
|
+
message: "Wire 0.1 receipts are not supported. Re-issue as Wire 0.2 using issue()."
|
|
1553
1556
|
};
|
|
1554
1557
|
} catch (err) {
|
|
1555
1558
|
if (isCryptoError(err)) {
|
|
@@ -2933,6 +2936,6 @@ async function verifyAndFetchPointer(pointerHeader, fetchOptions) {
|
|
|
2933
2936
|
});
|
|
2934
2937
|
}
|
|
2935
2938
|
|
|
2936
|
-
export { CHECK_IDS, DEFAULT_NETWORK_SECURITY, DEFAULT_VERIFIER_LIMITS, IssueError, NON_DETERMINISTIC_ARTIFACT_KEYS, VerificationReportBuilder, buildFailureReport, buildSuccessReport, checkPolicyBinding, clearJWKSCache, clearKidThumbprints, computePolicyDigestJcs, computeReceiptDigest, createDefaultPolicy, createDigest, createEmptyReport, createReportBuilder, fetchDiscovery, fetchIssuerConfig, fetchJWKSSafe, fetchPointerSafe, fetchPointerWithDigest, fetchPolicyManifest, getJWKSCacheSize, getKidThumbprintSize, getPurposeHeader, getReceiptHeader, getSSRFCapabilities, isAttestationResult, isBlockedIP, isCommerceResult, isWire02Result, issue, issueJws, issueWire02, parseBodyProfile, parseDiscovery, parseHeaderProfile, parseIssuerConfig, parsePointerProfile, parsePolicyManifest, parseTransportProfile, reasonCodeToErrorCode, reasonCodeToSeverity, resetSSRFCapabilitiesCache, resolveJWKS, setPurposeAppliedHeader, setPurposeReasonHeader, setReceiptHeader, setVaryHeader, setVaryPurposeHeader, ssrfErrorToReasonCode, ssrfSafeFetch, verifyAndFetchPointer, verifyLocal, verifyReceipt, verifyReceiptCore };
|
|
2939
|
+
export { CHECK_IDS, DEFAULT_NETWORK_SECURITY, DEFAULT_VERIFIER_LIMITS, IssueError, NON_DETERMINISTIC_ARTIFACT_KEYS, VerificationReportBuilder, buildFailureReport, buildSuccessReport, checkPolicyBinding, clearJWKSCache, clearKidThumbprints, computePolicyDigestJcs, computeReceiptDigest, createDefaultPolicy, createDigest, createEmptyReport, createReportBuilder, fetchDiscovery, fetchIssuerConfig, fetchJWKSSafe, fetchPointerSafe, fetchPointerWithDigest, fetchPolicyManifest, getJWKSCacheSize, getKidThumbprintSize, getPurposeHeader, getReceiptHeader, getSSRFCapabilities, isAttestationResult, isBlockedIP, isCommerceResult, isWire02Result, issue, issueJws, issueWire01, issueWire02, parseBodyProfile, parseDiscovery, parseHeaderProfile, parseIssuerConfig, parsePointerProfile, parsePolicyManifest, parseTransportProfile, reasonCodeToErrorCode, reasonCodeToSeverity, resetSSRFCapabilitiesCache, resolveJWKS, setPurposeAppliedHeader, setPurposeReasonHeader, setReceiptHeader, setVaryHeader, setVaryPurposeHeader, ssrfErrorToReasonCode, ssrfSafeFetch, verifyAndFetchPointer, verifyLocal, verifyReceipt, verifyReceiptCore };
|
|
2937
2940
|
//# sourceMappingURL=index.mjs.map
|
|
2938
2941
|
//# sourceMappingURL=index.mjs.map
|