Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • VAnchor

Implements

Index

Constructors

Properties

contract: Contracts.VAnchor
denomination?: string
depositHistory: Record<number, string>
largeCircuitZkComponents: ZkComponents
latestSyncedBlock: number
signer: Signer
smallCircuitZkComponents: ZkComponents
token?: string

Methods

  • bridgedTransact(inputs: Utxo[], outputs: Utxo[], fee: BigNumberish, recipient: string, relayer: string, merkleProofsForInputs: any[]): Promise<ContractReceipt>
  • bridgedTransactWrap(tokenAddress: string, inputs: Utxo[], outputs: Utxo[], fee: BigNumberish, recipient: string, relayer: string, merkleProofsForInputs: any[]): Promise<any>
  • bridgedWithdraw(deposit: IAnchorDeposit, merkleProof: any, recipient: string, relayer: string, fee: string, refund: string, refreshCommitment: string): Promise<Event>
  • bridgedWithdrawAndUnwrap(deposit: IAnchorDeposit, merkleProof: any, recipient: string, relayer: string, fee: string, refund: string, refreshCommitment: string, tokenAddress: string): Promise<Event>
  • checkKnownRoot(): Promise<void>
  • createResourceId(): Promise<string>
  • createWitness(data: any, small: boolean): Promise<any>
  • generateWitnessInput(roots: RootInfo[], chainId: BigNumberish, inputs: Utxo[], outputs: Utxo[], extAmount: BigNumberish, fee: BigNumberish, recipient: string, relayer: string, externalMerkleProofs: any[]): Promise<IWitnessInput>
  • getAddress(): string
  • getClassAndContractRoots(): Promise<BigNumberish[]>
  • getGasBenchmark(): Promise<{ gasValues: number[]; maxGas: any; meanGas: number; medianGas: number; minGas: any }>
  • getHandler(): Promise<string>
  • getHandlerProposalData(newHandler: string): Promise<string>
  • getMaxDepositLimitProposalData(_maximumDepositAmount: string): Promise<string>
  • getMinWithdrawalLimitProposalData(_minimalWithdrawalAmount: string): Promise<string>
  • getProofTimeBenchmark(): Promise<{ maxTime: any; meanTime: number; medianTime: number; minTime: any; proofTimeBenchmark: any[] }>
  • getProposalData(resourceID: string, leafIndex?: number): Promise<string>
  • populateRootInfosForProof(): Promise<RootInfo[]>
  • proveAndVerify(wtns: any, small: boolean): Promise<string>
  • registerAndTransact(owner: string, publicKey: string, inputs: Utxo[], outputs: Utxo[], fee: BigNumberish, recipient: string, relayer: string, merkleProofsForInputs: any[]): Promise<ContractReceipt>
  • Parameters

    • owner: string
    • publicKey: string
    • inputs: Utxo[]
    • outputs: Utxo[]
    • fee: BigNumberish
    • recipient: string
    • relayer: string
    • merkleProofsForInputs: any[]

    Returns Promise<ContractReceipt>

  • setHandler(handlerAddress: string): Promise<void>
  • setSigner(newSigner: Signer): Promise<boolean>
  • setVerifier(verifierAddress: string): Promise<void>
  • setWithLeaves(leaves: string[], syncedBlock?: number): Promise<Boolean>
  • Given a list of leaves and a latest synced block, update internal tree state The function will create a new tree, and check on chain root before updating its member variable If the passed leaves match on chain data, update this instance and return true else return false

    Parameters

    • leaves: string[]
    • Optional syncedBlock: number

    Returns Promise<Boolean>

  • setupTransaction(inputs: Utxo[], outputs: Utxo[], extAmount: BigNumberish, fee: BigNumberish, recipient: string, relayer: string, merkleProofsForInputs: any[]): Promise<{ extData: IExtData; publicInputs: IVariableAnchorPublicInputs }>
  • setupWithdraw(deposit: IAnchorDepositInfo, index: number, recipient: string, relayer: string, fee: bigint, refreshCommitment: string | number): void
  • transact(inputs: Utxo[], outputs: Utxo[], fee: BigNumberish, recipient: string, relayer: string): Promise<ContractReceipt>
  • transactWrap(tokenAddress: string, inputs: Utxo[], outputs: Utxo[], fee: BigNumberish, recipient: string, relayer: string): Promise<ContractReceipt>
  • update(blockNumber?: number): Promise<void>
  • withdraw(deposit: IAnchorDepositInfo, index: number, recipient: string, relayer: string, fee: bigint, refreshCommitment: string | number): Promise<Event>
  • wrapAndDeposit(tokenAddress: string, wrappingFee: number, destinationChainId?: number): Promise<IAnchorDeposit>
  • convertToExtDataStruct(args: any[]): IExtData
  • createRootsBytes(rootArray: string[]): string
  • createVAnchor(verifier: string, levels: BigNumberish, hasher: string, handler: string, token: string, maxEdges: number, smallCircuitZkComponents: ZkComponents, largeCircuitZkComponents: ZkComponents, signer: Signer): Promise<Anchors.VAnchor>
  • generateWithdrawProofCallData(proof: any, publicSignals: any): Promise<string>
  • groth16ExportSolidityCallData(proof: any, pub: any): Promise<any>
  • hexStringToByte(str: string): Uint8Array

Generated using TypeDoc