@denodeio/seshat 0.0.35 → 0.0.37
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/build/cjs/dist/mjs/src/validate.d.ts +2 -2
- package/build/cjs/index.d.ts +3 -2
- package/build/cjs/index.js +2 -1
- package/build/cjs/index.js.map +1 -1
- package/build/mjs/dist/mjs/src/validate.d.ts +2 -2
- package/build/mjs/index.d.ts +3 -2
- package/build/mjs/index.js +2 -1
- package/build/mjs/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import jwt from "jsonwebtoken";
|
|
2
1
|
import { Key, Keychain } from "./types";
|
|
3
2
|
type JwsSignature = {
|
|
4
3
|
protected: string;
|
|
@@ -23,7 +22,8 @@ type JwtPayload<T> = {
|
|
|
23
22
|
};
|
|
24
23
|
export declare const validateJws: <T>(key: Key, input: JwsPayload) => JwtPayload<T> | undefined;
|
|
25
24
|
export declare const validateJwsMultisig: (keychain: Keychain, input: JwsPayload) => {
|
|
26
|
-
|
|
25
|
+
isVerified: boolean;
|
|
26
|
+
payload: any;
|
|
27
27
|
verified: string[];
|
|
28
28
|
unverified: string[];
|
|
29
29
|
};
|
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Secret, PublicKey } from 'jsonwebtoken';
|
|
2
2
|
|
|
3
3
|
declare const managementSigner: (options: any) => (req: any, res: any, next: any) => void;
|
|
4
4
|
type OptionsInput = {
|
|
@@ -52,7 +52,8 @@ type JwtPayload<T> = {
|
|
|
52
52
|
};
|
|
53
53
|
declare const validateJws: <T>(key: Key, input: JwsPayload) => JwtPayload<T> | undefined;
|
|
54
54
|
declare const validateJwsMultisig: (keychain: Keychain, input: JwsPayload) => {
|
|
55
|
-
|
|
55
|
+
isVerified: boolean;
|
|
56
|
+
payload: any;
|
|
56
57
|
verified: string[];
|
|
57
58
|
unverified: string[];
|
|
58
59
|
};
|
package/build/cjs/index.js
CHANGED
|
@@ -6672,7 +6672,7 @@ var utils = {};
|
|
|
6672
6672
|
const validateJwsMultisig = (keychain, input) => {
|
|
6673
6673
|
const verified = [];
|
|
6674
6674
|
const unverified = [];
|
|
6675
|
-
const payload =
|
|
6675
|
+
const payload = JSON.parse(Buffer.from(input.payload, "base64").toString());
|
|
6676
6676
|
for (const signature of input.signatures) {
|
|
6677
6677
|
const key = keychain.get(signature.header.kid);
|
|
6678
6678
|
if (key) {
|
|
@@ -6684,6 +6684,7 @@ var utils = {};
|
|
|
6684
6684
|
}
|
|
6685
6685
|
}
|
|
6686
6686
|
return {
|
|
6687
|
+
isVerified: verified.length > 0,
|
|
6687
6688
|
payload,
|
|
6688
6689
|
verified,
|
|
6689
6690
|
unverified
|