@entros/pulse-sdk 1.0.0 → 1.0.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 IAM Protocol
3
+ Copyright (c) 2026 Entros Protocol
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -38,8 +38,8 @@ import { PulseSDK } from '@entros/pulse-sdk';
38
38
  const pulse = new PulseSDK({
39
39
  cluster: 'devnet',
40
40
  relayerUrl: 'https://api.entros.io/relay',
41
- wasmUrl: '/circuits/iam_hamming.wasm',
42
- zkeyUrl: '/circuits/iam_hamming_final.zkey',
41
+ wasmUrl: '/circuits/entros_hamming.wasm',
42
+ zkeyUrl: '/circuits/entros_hamming_final.zkey',
43
43
  });
44
44
 
45
45
  const result = await pulse.verify(touchElement);
package/dist/index.d.mts CHANGED
@@ -402,8 +402,8 @@ declare function prepareCircuitInput(current: TBH, previous: TBH, threshold?: nu
402
402
  * Generate a Groth16 proof for the Hamming distance circuit.
403
403
  *
404
404
  * @param input - Circuit input (fingerprints, salts, commitments, threshold)
405
- * @param wasmPath - Path or URL to iam_hamming.wasm
406
- * @param zkeyPath - Path or URL to iam_hamming_final.zkey
405
+ * @param wasmPath - Path or URL to entros_hamming.wasm
406
+ * @param zkeyPath - Path or URL to entros_hamming_final.zkey
407
407
  */
408
408
  declare function generateProof(input: CircuitInput, wasmPath: string, zkeyPath: string): Promise<ProofResult>;
409
409
  /**
@@ -562,8 +562,13 @@ declare function storeVerificationData(data: StoredVerificationData): Promise<vo
562
562
  declare function loadVerificationData(): Promise<StoredVerificationData | null>;
563
563
 
564
564
  /**
565
- * Generate a random phonetically-balanced phrase for the voice challenge.
566
- * Each phrase is 5-6 syllable pairs, forming nonsensical but speakable words.
565
+ * FALLBACK challenge-phrase generator. Used only when the executor's
566
+ * `/challenge` endpoint is unreachable; the authoritative phrase comes from
567
+ * the server (5 real words drawn from a curated English-word dictionary). On
568
+ * this fallback path, validation skips server-side phrase content binding —
569
+ * Tier 1 acoustic + Tier 2 cross-modal still run.
570
+ *
571
+ * Output is 5-6 syllable pairs, forming nonsensical but speakable words.
567
572
  * Uses crypto.getRandomValues for unpredictable challenge generation.
568
573
  */
569
574
  declare function generatePhrase(wordCount?: number): string;
@@ -610,11 +615,12 @@ declare function generateLissajousSequence(count?: number): {
610
615
  /**
611
616
  * Fetch the server-issued challenge from the executor.
612
617
  *
613
- * The executor's `/challenge` endpoint returns a fresh nonce + nonsense phrase
614
- * bound to the wallet for a short TTL (default 60s). The phrase is shown to
615
- * the user as the voice challenge and is looked up server-side at
616
- * `/validate-features` to run phoneme-distance matching against the submitted
617
- * audio (master-list #89, phrase content binding via STT).
618
+ * The executor's `/challenge` endpoint returns a fresh nonce + 5-word phrase
619
+ * bound to the wallet for a short TTL (default 60s). The phrase is drawn from
620
+ * a curated English-word dictionary (source of truth at
621
+ * `iam-validation/src/word_dict.rs`); shown to the user as the voice challenge
622
+ * and looked up server-side at `/validate-features` to verify the audio
623
+ * matches the issued phrase (master-list #89, phrase content binding).
618
624
  *
619
625
  * Server-issued phrases are the only safe design for content binding: if the
620
626
  * client generated the phrase and sent it to the server alongside the audio,
@@ -628,7 +634,7 @@ declare function generateLissajousSequence(count?: number): {
628
634
  interface ChallengeResponse {
629
635
  /** 32-byte nonce used for on-chain `create_challenge` and the `/attest` handshake. */
630
636
  nonce: Uint8Array;
631
- /** Nonsense phrase (5 space-separated words of 2-3 syllables each) the user must speak aloud. */
637
+ /** Server-issued 5-word challenge phrase (drawn from a curated English-word dictionary) the user must speak aloud. */
632
638
  phrase: string;
633
639
  /** Nonce TTL in seconds (default 60). */
634
640
  expiresIn: number;
package/dist/index.d.ts CHANGED
@@ -402,8 +402,8 @@ declare function prepareCircuitInput(current: TBH, previous: TBH, threshold?: nu
402
402
  * Generate a Groth16 proof for the Hamming distance circuit.
403
403
  *
404
404
  * @param input - Circuit input (fingerprints, salts, commitments, threshold)
405
- * @param wasmPath - Path or URL to iam_hamming.wasm
406
- * @param zkeyPath - Path or URL to iam_hamming_final.zkey
405
+ * @param wasmPath - Path or URL to entros_hamming.wasm
406
+ * @param zkeyPath - Path or URL to entros_hamming_final.zkey
407
407
  */
408
408
  declare function generateProof(input: CircuitInput, wasmPath: string, zkeyPath: string): Promise<ProofResult>;
409
409
  /**
@@ -562,8 +562,13 @@ declare function storeVerificationData(data: StoredVerificationData): Promise<vo
562
562
  declare function loadVerificationData(): Promise<StoredVerificationData | null>;
563
563
 
564
564
  /**
565
- * Generate a random phonetically-balanced phrase for the voice challenge.
566
- * Each phrase is 5-6 syllable pairs, forming nonsensical but speakable words.
565
+ * FALLBACK challenge-phrase generator. Used only when the executor's
566
+ * `/challenge` endpoint is unreachable; the authoritative phrase comes from
567
+ * the server (5 real words drawn from a curated English-word dictionary). On
568
+ * this fallback path, validation skips server-side phrase content binding —
569
+ * Tier 1 acoustic + Tier 2 cross-modal still run.
570
+ *
571
+ * Output is 5-6 syllable pairs, forming nonsensical but speakable words.
567
572
  * Uses crypto.getRandomValues for unpredictable challenge generation.
568
573
  */
569
574
  declare function generatePhrase(wordCount?: number): string;
@@ -610,11 +615,12 @@ declare function generateLissajousSequence(count?: number): {
610
615
  /**
611
616
  * Fetch the server-issued challenge from the executor.
612
617
  *
613
- * The executor's `/challenge` endpoint returns a fresh nonce + nonsense phrase
614
- * bound to the wallet for a short TTL (default 60s). The phrase is shown to
615
- * the user as the voice challenge and is looked up server-side at
616
- * `/validate-features` to run phoneme-distance matching against the submitted
617
- * audio (master-list #89, phrase content binding via STT).
618
+ * The executor's `/challenge` endpoint returns a fresh nonce + 5-word phrase
619
+ * bound to the wallet for a short TTL (default 60s). The phrase is drawn from
620
+ * a curated English-word dictionary (source of truth at
621
+ * `iam-validation/src/word_dict.rs`); shown to the user as the voice challenge
622
+ * and looked up server-side at `/validate-features` to verify the audio
623
+ * matches the issued phrase (master-list #89, phrase content binding).
618
624
  *
619
625
  * Server-issued phrases are the only safe design for content binding: if the
620
626
  * client generated the phrase and sent it to the server alongside the audio,
@@ -628,7 +634,7 @@ declare function generateLissajousSequence(count?: number): {
628
634
  interface ChallengeResponse {
629
635
  /** 32-byte nonce used for on-chain `create_challenge` and the `/attest` handshake. */
630
636
  nonce: Uint8Array;
631
- /** Nonsense phrase (5 space-separated words of 2-3 syllables each) the user must speak aloud. */
637
+ /** Server-issued 5-word challenge phrase (drawn from a curated English-word dictionary) the user must speak aloud. */
632
638
  phrase: string;
633
639
  /** Nonce TTL in seconds (default 60). */
634
640
  expiresIn: number;
package/dist/index.js CHANGED
@@ -2115,7 +2115,7 @@ async function processSensorData(sensorData, config, wallet, connection, onProgr
2115
2115
  success: false,
2116
2116
  commitment: tbh.commitmentBytes,
2117
2117
  isFirstVerification: false,
2118
- error: "Re-verification requires wasmUrl and zkeyUrl in PulseConfig. Host the iam_hamming.wasm and iam_hamming_final.zkey circuit artifacts at public URLs."
2118
+ error: "Re-verification requires wasmUrl and zkeyUrl in PulseConfig. Host the entros_hamming.wasm and entros_hamming_final.zkey circuit artifacts at public URLs."
2119
2119
  };
2120
2120
  }
2121
2121
  try {