@crisp-e3/sdk 0.7.1 → 0.8.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/dist/index.d.ts CHANGED
@@ -157,6 +157,8 @@ declare const getRoundTokenDetails: (serverUrl: string, e3Id: number) => Promise
157
157
  declare const getPreviousCiphertext: (serverUrl: string, e3Id: number, address: string) => Promise<Uint8Array | undefined>;
158
158
 
159
159
  declare const MERKLE_TREE_MAX_DEPTH = 20;
160
+ declare const MAX_MSG_NON_ZERO_COEFFS = 100;
161
+ declare const MAX_VOTE_OPTIONS = 10;
160
162
  /**
161
163
  * Message used by users to prove ownership of their Ethereum account
162
164
  * This message is signed by the user's private key to authenticate their identity
@@ -204,7 +206,8 @@ declare const getZeroVote: (numChoices: number) => number[];
204
206
  *
205
207
  * Encodes vote choices (numbers per option) into polynomial coefficient arrays
206
208
  * suitable for BFV homomorphic encryption. Each choice is represented as a
207
- * segment of binary digits, padded to fit the polynomial degree. Supports
209
+ * segment of binary digits within the first MAX_MSG_NON_ZERO_COEFFS coeffs, then
210
+ * zero-padded to the BFV polynomial degree. Supports
208
211
  * encoding, encryption, decryption, and tally decoding.
209
212
  */
210
213
 
@@ -301,4 +304,4 @@ declare class CrispSDK {
301
304
  generateVoteProof(voteProofInputs: VoteProofRequest): Promise<ProofData>;
302
305
  }
303
306
 
304
- export { CreditMode, CrispSDK, MERKLE_TREE_MAX_DEPTH, type MaskVoteProofInputs, type ProofData, type RoundDetails, type RoundDetailsResponse, SIGNATURE_MESSAGE, SIGNATURE_MESSAGE_HASH, type TokenDetails, type Vote, type VoteProofInputs, decodeTally, destroyBBApi, encodeSolidityProof, encryptVote, generateBFVKeys, generateMaskVoteProof, generateMerkleProof, generateMerkleTree, generateVoteProof, getAddressFromSignature, getBalanceAt, getMaxVoteValue, getPreviousCiphertext, getRoundDetails, getRoundTokenDetails, getTotalSupplyAt, getTreeData, getZeroVote, hashLeaf, validateVote, verifyProof };
307
+ export { CreditMode, CrispSDK, MAX_MSG_NON_ZERO_COEFFS, MAX_VOTE_OPTIONS, MERKLE_TREE_MAX_DEPTH, type MaskVoteProofInputs, type ProofData, type RoundDetails, type RoundDetailsResponse, SIGNATURE_MESSAGE, SIGNATURE_MESSAGE_HASH, type TokenDetails, type Vote, type VoteProofInputs, decodeTally, destroyBBApi, encodeSolidityProof, encryptVote, generateBFVKeys, generateMaskVoteProof, generateMerkleProof, generateMerkleTree, generateVoteProof, getAddressFromSignature, getBalanceAt, getMaxVoteValue, getPreviousCiphertext, getRoundDetails, getRoundTokenDetails, getTotalSupplyAt, getTreeData, getZeroVote, hashLeaf, validateVote, verifyProof };