"use strict";
/**
 * GrimSwap ZK SDK
 *
 * SDK for generating ZK proofs for private swaps on GrimSwap.
 *
 * @example
 * ```typescript
 * import {
 *   createDepositNote,
 *   MerkleTree,
 *   generateProofForRelayer,
 * } from '@grimswap/circuits-sdk';
 *
 * // 1. Create deposit note
 * const note = await createDepositNote(parseEther("1"));
 *
 * // 2. Get commitment for on-chain deposit
 * const commitment = formatCommitmentForContract(note.commitment);
 * // Submit commitment to GrimPool.deposit(commitment)
 *
 * // 3. After deposit confirmed, build Merkle proof
 * const tree = new MerkleTree();
 * await tree.initialize();
 * // Insert all commitments from contract events
 * for (const c of commitments) {
 *   await tree.insert(c);
 * }
 * const merkleProof = tree.getProof(note.leafIndex);
 *
 * // 4. Generate ZK proof
 * const { proof, publicSignals } = await generateProofForRelayer(
 *   note,
 *   merkleProof,
 *   {
 *     recipient: stealthAddress,
 *     relayer: relayerAddress,
 *     relayerFee: 10, // 0.1%
 *     expectedAmountOut: expectedOutput,
 *   }
 * );
 *
 * // 5. Submit to relayer
 * await fetch('/relay', {
 *   method: 'POST',
 *   body: JSON.stringify({ proof, publicSignals, swapParams }),
 * });
 * ```
 *
 * @packageDocumentation
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.GRIM_SWAP_ROUTER_ABI = exports.GRIM_SWAP_ZK_ABI = exports.GRIM_POOL_ABI = exports.ANNOUNCER_ABI = exports.STEALTH_REGISTRY_ABI = exports.META_ADDRESS_LENGTH = exports.STEALTH_SCHEME_ID = exports.getChainConfig = exports.SUPPORTED_CHAINS = exports.UNICHAIN_MAINNET_ADDRESSES = exports.UNICHAIN_SEPOLIA_ADDRESSES = exports.UNICHAIN_MAINNET = exports.UNICHAIN_SEPOLIA = exports.executePrivateSwap = exports.getDepositCount = exports.fetchDepositEvents = exports.fetchDeposits = exports.checkRelayerHealth = exports.getRelayerInfo = exports.submitToRelayer = exports.watchAnnouncements = exports.scanAnnouncements = exports.createMetaAddress = exports.parseMetaAddress = exports.deriveStealthPrivateKey = exports.checkStealthAddress = exports.generateStealthAddress = exports.generateStealthKeys = exports.computeExpectedPublicSignals = exports.generateProofForRelayer = exports.verifyProofLocally = exports.encodeProofAsHookData = exports.formatProofForContract = exports.generateProofFromBuffers = exports.generateProof = exports.formatProofForCircuit = exports.buildMerkleTree = exports.verifyMerkleProof = exports.ZERO_VALUE = exports.MERKLE_TREE_HEIGHT = exports.MerkleTree = exports.formatCommitmentForContract = exports.deserializeNote = exports.serializeNote = exports.reconstructDepositNote = exports.createDepositNote = exports.computeNullifierHash = exports.computeCommitment = exports.poseidonHash = exports.initPoseidon = void 0;
exports.buildPoseidon = exports.RELAYER_DEFAULT_URL = exports.GROTH16_VERIFIER_ABI = void 0;
// Commitment functions
var commitment_1 = require("./commitment");
Object.defineProperty(exports, "initPoseidon", { enumerable: true, get: function () { return commitment_1.initPoseidon; } });
Object.defineProperty(exports, "poseidonHash", { enumerable: true, get: function () { return commitment_1.poseidonHash; } });
Object.defineProperty(exports, "computeCommitment", { enumerable: true, get: function () { return commitment_1.computeCommitment; } });
Object.defineProperty(exports, "computeNullifierHash", { enumerable: true, get: function () { return commitment_1.computeNullifierHash; } });
Object.defineProperty(exports, "createDepositNote", { enumerable: true, get: function () { return commitment_1.createDepositNote; } });
Object.defineProperty(exports, "reconstructDepositNote", { enumerable: true, get: function () { return commitment_1.reconstructDepositNote; } });
Object.defineProperty(exports, "serializeNote", { enumerable: true, get: function () { return commitment_1.serializeNote; } });
Object.defineProperty(exports, "deserializeNote", { enumerable: true, get: function () { return commitment_1.deserializeNote; } });
Object.defineProperty(exports, "formatCommitmentForContract", { enumerable: true, get: function () { return commitment_1.formatCommitmentForContract; } });
// Merkle tree
var merkle_1 = require("./merkle");
Object.defineProperty(exports, "MerkleTree", { enumerable: true, get: function () { return merkle_1.MerkleTree; } });
Object.defineProperty(exports, "MERKLE_TREE_HEIGHT", { enumerable: true, get: function () { return merkle_1.MERKLE_TREE_HEIGHT; } });
Object.defineProperty(exports, "ZERO_VALUE", { enumerable: true, get: function () { return merkle_1.ZERO_VALUE; } });
Object.defineProperty(exports, "verifyMerkleProof", { enumerable: true, get: function () { return merkle_1.verifyMerkleProof; } });
Object.defineProperty(exports, "buildMerkleTree", { enumerable: true, get: function () { return merkle_1.buildMerkleTree; } });
Object.defineProperty(exports, "formatProofForCircuit", { enumerable: true, get: function () { return merkle_1.formatProofForCircuit; } });
// Proof generation
var proof_1 = require("./proof");
Object.defineProperty(exports, "generateProof", { enumerable: true, get: function () { return proof_1.generateProof; } });
Object.defineProperty(exports, "generateProofFromBuffers", { enumerable: true, get: function () { return proof_1.generateProofFromBuffers; } });
Object.defineProperty(exports, "formatProofForContract", { enumerable: true, get: function () { return proof_1.formatProofForContract; } });
Object.defineProperty(exports, "encodeProofAsHookData", { enumerable: true, get: function () { return proof_1.encodeProofAsHookData; } });
Object.defineProperty(exports, "verifyProofLocally", { enumerable: true, get: function () { return proof_1.verifyProofLocally; } });
Object.defineProperty(exports, "generateProofForRelayer", { enumerable: true, get: function () { return proof_1.generateProofForRelayer; } });
Object.defineProperty(exports, "computeExpectedPublicSignals", { enumerable: true, get: function () { return proof_1.computeExpectedPublicSignals; } });
// Stealth addresses (ERC-5564)
var stealthAddress_1 = require("./stealthAddress");
Object.defineProperty(exports, "generateStealthKeys", { enumerable: true, get: function () { return stealthAddress_1.generateStealthKeys; } });
Object.defineProperty(exports, "generateStealthAddress", { enumerable: true, get: function () { return stealthAddress_1.generateStealthAddress; } });
Object.defineProperty(exports, "checkStealthAddress", { enumerable: true, get: function () { return stealthAddress_1.checkStealthAddress; } });
Object.defineProperty(exports, "deriveStealthPrivateKey", { enumerable: true, get: function () { return stealthAddress_1.deriveStealthPrivateKey; } });
Object.defineProperty(exports, "parseMetaAddress", { enumerable: true, get: function () { return stealthAddress_1.parseMetaAddress; } });
Object.defineProperty(exports, "createMetaAddress", { enumerable: true, get: function () { return stealthAddress_1.createMetaAddress; } });
// Announcement scanner
var scanner_1 = require("./scanner");
Object.defineProperty(exports, "scanAnnouncements", { enumerable: true, get: function () { return scanner_1.scanAnnouncements; } });
Object.defineProperty(exports, "watchAnnouncements", { enumerable: true, get: function () { return scanner_1.watchAnnouncements; } });
// Relayer client
var relayer_1 = require("./relayer");
Object.defineProperty(exports, "submitToRelayer", { enumerable: true, get: function () { return relayer_1.submitToRelayer; } });
Object.defineProperty(exports, "getRelayerInfo", { enumerable: true, get: function () { return relayer_1.getRelayerInfo; } });
Object.defineProperty(exports, "checkRelayerHealth", { enumerable: true, get: function () { return relayer_1.checkRelayerHealth; } });
// Deposit reader
var deposits_1 = require("./deposits");
Object.defineProperty(exports, "fetchDeposits", { enumerable: true, get: function () { return deposits_1.fetchDeposits; } });
Object.defineProperty(exports, "fetchDepositEvents", { enumerable: true, get: function () { return deposits_1.fetchDepositEvents; } });
Object.defineProperty(exports, "getDepositCount", { enumerable: true, get: function () { return deposits_1.getDepositCount; } });
// High-level private swap
var privateSwap_1 = require("./privateSwap");
Object.defineProperty(exports, "executePrivateSwap", { enumerable: true, get: function () { return privateSwap_1.executePrivateSwap; } });
// Chain configuration & constants
var constants_1 = require("./constants");
Object.defineProperty(exports, "UNICHAIN_SEPOLIA", { enumerable: true, get: function () { return constants_1.UNICHAIN_SEPOLIA; } });
Object.defineProperty(exports, "UNICHAIN_MAINNET", { enumerable: true, get: function () { return constants_1.UNICHAIN_MAINNET; } });
Object.defineProperty(exports, "UNICHAIN_SEPOLIA_ADDRESSES", { enumerable: true, get: function () { return constants_1.UNICHAIN_SEPOLIA_ADDRESSES; } });
Object.defineProperty(exports, "UNICHAIN_MAINNET_ADDRESSES", { enumerable: true, get: function () { return constants_1.UNICHAIN_MAINNET_ADDRESSES; } });
Object.defineProperty(exports, "SUPPORTED_CHAINS", { enumerable: true, get: function () { return constants_1.SUPPORTED_CHAINS; } });
Object.defineProperty(exports, "getChainConfig", { enumerable: true, get: function () { return constants_1.getChainConfig; } });
Object.defineProperty(exports, "STEALTH_SCHEME_ID", { enumerable: true, get: function () { return constants_1.STEALTH_SCHEME_ID; } });
Object.defineProperty(exports, "META_ADDRESS_LENGTH", { enumerable: true, get: function () { return constants_1.META_ADDRESS_LENGTH; } });
Object.defineProperty(exports, "STEALTH_REGISTRY_ABI", { enumerable: true, get: function () { return constants_1.STEALTH_REGISTRY_ABI; } });
Object.defineProperty(exports, "ANNOUNCER_ABI", { enumerable: true, get: function () { return constants_1.ANNOUNCER_ABI; } });
Object.defineProperty(exports, "GRIM_POOL_ABI", { enumerable: true, get: function () { return constants_1.GRIM_POOL_ABI; } });
Object.defineProperty(exports, "GRIM_SWAP_ZK_ABI", { enumerable: true, get: function () { return constants_1.GRIM_SWAP_ZK_ABI; } });
Object.defineProperty(exports, "GRIM_SWAP_ROUTER_ABI", { enumerable: true, get: function () { return constants_1.GRIM_SWAP_ROUTER_ABI; } });
Object.defineProperty(exports, "GROTH16_VERIFIER_ABI", { enumerable: true, get: function () { return constants_1.GROTH16_VERIFIER_ABI; } });
Object.defineProperty(exports, "RELAYER_DEFAULT_URL", { enumerable: true, get: function () { return constants_1.RELAYER_DEFAULT_URL; } });
// Re-export commonly used utilities
var circomlibjs_1 = require("circomlibjs");
Object.defineProperty(exports, "buildPoseidon", { enumerable: true, get: function () { return circomlibjs_1.buildPoseidon; } });
//# sourceMappingURL=index.js.map