import { DB, Deposit as DepositSql, Config, Proposal } from '@zkopru/database'; import { Grove, GrovePatch } from '@zkopru/tree'; import AsyncLock from 'async-lock'; import { Bytes32, Uint256 } from 'soltypes'; import { Fp } from '@zkopru/babyjubjub'; import { TokenRegistry, ZkTx } from '@zkopru/transaction'; import { Block, Header, MassDeposit } from '../block'; import { BootstrapData } from '../node/bootstrap'; import { SNARKVerifier, VerifyingKey } from '../snark/snark-verifier'; export interface Patch { block: Bytes32; header: Header; prevHeader: Header; massDeposits?: Bytes32[]; treePatch: GrovePatch; nullifiers?: Uint256[]; } export interface PendingMassDeposits { massDeposits: MassDeposit[]; leaves: Fp[]; totalFee: Fp; calldataSize: number; } export declare class L2Chain { config: Config; snarkVerifier: SNARKVerifier; lock: AsyncLock; grove: Grove; tokenRegistry: TokenRegistry; db: DB; constructor(db: DB, grove: Grove, config: Config, vks: { [txType: string]: VerifyingKey; }); latestBlock(): Promise; getBlockByNumber(blockNum: number): Promise; getBlock(hash: Bytes32): Promise; getProposalByNumber(proposalNum: number, includeBlock?: boolean): Promise; getProposalByCanonicalNumber(canonicalNum: number, includeBlock?: boolean): Promise; getProposal(hash: Bytes32, includeBlock?: boolean): Promise; getTxByHash(hash: string | Bytes32): Promise; getDeposits(...massDeposits: MassDeposit[]): Promise; getPendingMassDeposits(): Promise; getOldestUnprocessedBlock(): Promise; isUncleBlock(parentBlock: Bytes32, proposalNum: number): Promise; isValidTx(zkTx: ZkTx): Promise; applyBootstrap(block: Block, bootstrapData: BootstrapData): Promise; getGrovePatch(block: Block): Promise; getTokenRegistry(): Promise; } //# sourceMappingURL=layer2.d.ts.map