hyli-noir 0.2.3 → 0.2.4
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/dist/check_jwt.d.ts +15 -12
- package/dist/hyli-noir.cjs.js +1 -1
- package/dist/hyli-noir.cjs.js.map +1 -1
- package/dist/hyli-noir.es.js +22 -18
- package/dist/hyli-noir.es.js.map +1 -1
- package/package.json +2 -2
package/dist/check_jwt.d.ts
CHANGED
|
@@ -43,15 +43,6 @@ export declare const extract_jwt_claims: (jwt: string) => {
|
|
|
43
43
|
nonce: string;
|
|
44
44
|
kid: string;
|
|
45
45
|
};
|
|
46
|
-
/**
|
|
47
|
-
* Builds a blob representing a JWT, used for proof generation in the circuit.
|
|
48
|
-
*
|
|
49
|
-
* @param {Uint8Array} mail_hash - The hashed email value.
|
|
50
|
-
* @param {string} nonce - The nonce value from the JWT.
|
|
51
|
-
* @param {string} pubkey - The public key (base64url encoded).
|
|
52
|
-
* @returns {Blob} A structured Blob object containing the JWT data.
|
|
53
|
-
*/
|
|
54
|
-
export declare const build_blob: (mail_hash: Uint8Array, nonce: string, pubkey: string) => Blob;
|
|
55
46
|
/**
|
|
56
47
|
* Registers the Noir contract with the node if it is not already registered.
|
|
57
48
|
* The contract is identified by its name "check_secret".
|
|
@@ -60,7 +51,7 @@ export declare const build_blob: (mail_hash: Uint8Array, nonce: string, pubkey:
|
|
|
60
51
|
* @param node - The NodeApiHttpClient instance to interact with the NodeApiHttpClient
|
|
61
52
|
* @returns A Promise that resolves when the contract is registered
|
|
62
53
|
*/
|
|
63
|
-
export declare const
|
|
54
|
+
export declare const register_contract: (node: NodeApiHttpClient, circuit?: CompiledCircuit) => Promise<undefined | number[]>;
|
|
64
55
|
/**
|
|
65
56
|
* Computes the Poseidon2 hash of a string.
|
|
66
57
|
*
|
|
@@ -73,6 +64,18 @@ export declare const build_blob_from_jwt: <T extends {
|
|
|
73
64
|
} & JsonWebKey>(jwt: string, keys: T[]) => Promise<{
|
|
74
65
|
blob: Blob;
|
|
75
66
|
nonce: number;
|
|
76
|
-
mail_hash:
|
|
77
|
-
pubkey:
|
|
67
|
+
mail_hash: number[];
|
|
68
|
+
pubkey: string;
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
* Builds a blob representing a JWT, used for proof generation in the circuit.
|
|
72
|
+
*
|
|
73
|
+
* @param {Uint8Array} email - The hashed email value.
|
|
74
|
+
* @param {string} nonce - The nonce value from the JWT.
|
|
75
|
+
* @param {string} pubkey - The public key (base64url encoded).
|
|
76
|
+
* @returns {Blob} A structured Blob object containing the JWT data.
|
|
77
|
+
*/
|
|
78
|
+
export declare const build_stored_hash: (email: string, nonce: number, pubkey: string) => Promise<{
|
|
79
|
+
mail_hash: number[];
|
|
80
|
+
stored_hash: number[];
|
|
78
81
|
}>;
|