UNPKG

@holographxyz/sdk

Version:

Holograph SDK for interacting with the Holograph Protocol.

1,785 lines (1,775 loc) 188 kB
import { Address as Address$1, ExtractAbiFunctionNames } from 'abitype'; import { Address, Hex, Abi, PublicClient, Transaction, TransactionReceipt, PrivateKeyAccount, HDOptions, HDAccount, JsonRpcAccount, WalletClient, PublicActions, EstimateContractGasParameters, WriteContractParameters, SimulateContractParameters, Transport, Chain } from 'viem'; import { Account } from 'viem/accounts'; import { Environment } from '@holographxyz/environment'; import { Network, NetworkKey } from '@holographxyz/networks'; import * as z from 'zod'; declare const _default$2: [{ inputs: []; stateMutability: "nonpayable"; type: "constructor"; }, { stateMutability: "payable"; type: "fallback"; }, { inputs: []; name: "admin"; outputs: [{ internalType: "address"; name: ""; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "address"; name: "target"; type: "address"; }, { internalType: "bytes"; name: "data"; type: "bytes"; }]; name: "adminCall"; outputs: []; stateMutability: "payable"; type: "function"; }, { inputs: [{ internalType: "uint256"; name: ""; type: "uint256"; }, { internalType: "uint32"; name: "fromChain"; type: "uint32"; }, { internalType: "address"; name: "holographableContract"; type: "address"; }, { internalType: "address"; name: "hToken"; type: "address"; }, { internalType: "address"; name: "hTokenRecipient"; type: "address"; }, { internalType: "uint256"; name: "hTokenValue"; type: "uint256"; }, { internalType: "bool"; name: "doNotRevert"; type: "bool"; }, { internalType: "bytes"; name: "bridgeInPayload"; type: "bytes"; }]; name: "bridgeInRequest"; outputs: []; stateMutability: "payable"; type: "function"; }, { inputs: [{ internalType: "uint32"; name: "toChain"; type: "uint32"; }, { internalType: "address"; name: "holographableContract"; type: "address"; }, { internalType: "uint256"; name: "gasLimit"; type: "uint256"; }, { internalType: "uint256"; name: "gasPrice"; type: "uint256"; }, { internalType: "bytes"; name: "bridgeOutPayload"; type: "bytes"; }]; name: "bridgeOutRequest"; outputs: []; stateMutability: "payable"; type: "function"; }, { inputs: []; name: "getAdmin"; outputs: [{ internalType: "address"; name: "adminAddress"; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "uint32"; name: "toChain"; type: "uint32"; }, { internalType: "address"; name: "holographableContract"; type: "address"; }, { internalType: "uint256"; name: "gasLimit"; type: "uint256"; }, { internalType: "uint256"; name: "gasPrice"; type: "uint256"; }, { internalType: "bytes"; name: "bridgeOutPayload"; type: "bytes"; }]; name: "getBridgeOutRequestPayload"; outputs: [{ internalType: "bytes"; name: "samplePayload"; type: "bytes"; }]; stateMutability: "nonpayable"; type: "function"; }, { inputs: []; name: "getFactory"; outputs: [{ internalType: "address"; name: "factory"; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: []; name: "getHolograph"; outputs: [{ internalType: "address"; name: "holograph"; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: []; name: "getJobNonce"; outputs: [{ internalType: "uint256"; name: "jobNonce"; type: "uint256"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "uint32"; name: ""; type: "uint32"; }, { internalType: "uint256"; name: ""; type: "uint256"; }, { internalType: "uint256"; name: ""; type: "uint256"; }, { internalType: "bytes"; name: ""; type: "bytes"; }]; name: "getMessageFee"; outputs: [{ internalType: "uint256"; name: ""; type: "uint256"; }, { internalType: "uint256"; name: ""; type: "uint256"; }, { internalType: "uint256"; name: ""; type: "uint256"; }]; stateMutability: "view"; type: "function"; }, { inputs: []; name: "getOperator"; outputs: [{ internalType: "address"; name: "operator"; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: []; name: "getRegistry"; outputs: [{ internalType: "address"; name: "registry"; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "bytes"; name: "initPayload"; type: "bytes"; }]; name: "init"; outputs: [{ internalType: "bytes4"; name: ""; type: "bytes4"; }]; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "sender"; type: "address"; }, { internalType: "uint32"; name: "toChain"; type: "uint32"; }, { internalType: "address"; name: "holographableContract"; type: "address"; }, { internalType: "bytes"; name: "bridgeOutPayload"; type: "bytes"; }]; name: "revertedBridgeOutRequest"; outputs: [{ internalType: "string"; name: "revertReason"; type: "string"; }]; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "adminAddress"; type: "address"; }]; name: "setAdmin"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "factory"; type: "address"; }]; name: "setFactory"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "holograph"; type: "address"; }]; name: "setHolograph"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "operator"; type: "address"; }]; name: "setOperator"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "registry"; type: "address"; }]; name: "setRegistry"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { stateMutability: "payable"; type: "receive"; }]; declare const _default$1: [{ inputs: []; stateMutability: "nonpayable"; type: "constructor"; }, { anonymous: false; inputs: [{ indexed: true; internalType: "address"; name: "contractAddress"; type: "address"; }, { indexed: true; internalType: "bytes32"; name: "hash"; type: "bytes32"; }]; name: "BridgeableContractDeployed"; type: "event"; }, { stateMutability: "payable"; type: "fallback"; }, { inputs: []; name: "admin"; outputs: [{ internalType: "address"; name: ""; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "address"; name: "target"; type: "address"; }, { internalType: "bytes"; name: "data"; type: "bytes"; }]; name: "adminCall"; outputs: []; stateMutability: "payable"; type: "function"; }, { inputs: [{ internalType: "uint32"; name: ""; type: "uint32"; }, { internalType: "bytes"; name: "payload"; type: "bytes"; }]; name: "bridgeIn"; outputs: [{ internalType: "bytes4"; name: ""; type: "bytes4"; }]; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "uint32"; name: ""; type: "uint32"; }, { internalType: "address"; name: ""; type: "address"; }, { internalType: "bytes"; name: "payload"; type: "bytes"; }]; name: "bridgeOut"; outputs: [{ internalType: "bytes4"; name: "selector"; type: "bytes4"; }, { internalType: "bytes"; name: "data"; type: "bytes"; }]; stateMutability: "pure"; type: "function"; }, { inputs: [{ components: [{ internalType: "bytes32"; name: "contractType"; type: "bytes32"; }, { internalType: "uint32"; name: "chainType"; type: "uint32"; }, { internalType: "bytes32"; name: "salt"; type: "bytes32"; }, { internalType: "bytes"; name: "byteCode"; type: "bytes"; }, { internalType: "bytes"; name: "initCode"; type: "bytes"; }]; internalType: "struct DeploymentConfig"; name: "config"; type: "tuple"; }, { components: [{ internalType: "bytes32"; name: "r"; type: "bytes32"; }, { internalType: "bytes32"; name: "s"; type: "bytes32"; }, { internalType: "uint8"; name: "v"; type: "uint8"; }]; internalType: "struct Verification"; name: "signature"; type: "tuple"; }, { internalType: "address"; name: "signer"; type: "address"; }]; name: "deployHolographableContract"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ components: [{ internalType: "bytes32"; name: "contractType"; type: "bytes32"; }, { internalType: "uint32"; name: "chainType"; type: "uint32"; }, { internalType: "bytes32"; name: "salt"; type: "bytes32"; }, { internalType: "bytes"; name: "byteCode"; type: "bytes"; }, { internalType: "bytes"; name: "initCode"; type: "bytes"; }]; internalType: "struct DeploymentConfig"; name: "config"; type: "tuple"; }, { components: [{ internalType: "bytes32"; name: "r"; type: "bytes32"; }, { internalType: "bytes32"; name: "s"; type: "bytes32"; }, { internalType: "uint8"; name: "v"; type: "uint8"; }]; internalType: "struct Verification"; name: "signature"; type: "tuple"; }, { internalType: "address"; name: "signer"; type: "address"; }, { internalType: "bool"; name: "deployOnCurrentChain"; type: "bool"; }, { components: [{ internalType: "uint256"; name: "value"; type: "uint256"; }, { internalType: "uint256"; name: "gasLimit"; type: "uint256"; }, { internalType: "uint256"; name: "gasPrice"; type: "uint256"; }, { internalType: "uint32"; name: "toChain"; type: "uint32"; }]; internalType: "struct BridgeSettings[]"; name: "bridgeSettings"; type: "tuple[]"; }]; name: "deployHolographableContractMultiChain"; outputs: []; stateMutability: "payable"; type: "function"; }, { inputs: []; name: "getAdmin"; outputs: [{ internalType: "address"; name: "adminAddress"; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: []; name: "getHolograph"; outputs: [{ internalType: "address"; name: "holograph"; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: []; name: "getRegistry"; outputs: [{ internalType: "address"; name: "registry"; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "bytes"; name: "initPayload"; type: "bytes"; }]; name: "init"; outputs: [{ internalType: "bytes4"; name: ""; type: "bytes4"; }]; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "adminAddress"; type: "address"; }]; name: "setAdmin"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "holograph"; type: "address"; }]; name: "setHolograph"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "registry"; type: "address"; }]; name: "setRegistry"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { stateMutability: "payable"; type: "receive"; }]; declare const _default: [{ inputs: []; stateMutability: "nonpayable"; type: "constructor"; }, { anonymous: false; inputs: [{ indexed: false; internalType: "bytes32"; name: "jobHash"; type: "bytes32"; }, { indexed: false; internalType: "bytes"; name: "payload"; type: "bytes"; }]; name: "AvailableOperatorJob"; type: "event"; }, { anonymous: false; inputs: [{ indexed: false; internalType: "bytes32"; name: "messageHash"; type: "bytes32"; }]; name: "CrossChainMessageSent"; type: "event"; }, { anonymous: false; inputs: [{ indexed: false; internalType: "bytes32"; name: "jobHash"; type: "bytes32"; }]; name: "FailedOperatorJob"; type: "event"; }, { anonymous: false; inputs: [{ indexed: false; internalType: "bytes32"; name: "jobHash"; type: "bytes32"; }, { indexed: false; internalType: "address"; name: "operator"; type: "address"; }]; name: "FinishedOperatorJob"; type: "event"; }, { stateMutability: "payable"; type: "fallback"; }, { inputs: []; name: "admin"; outputs: [{ internalType: "address"; name: ""; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "address"; name: "target"; type: "address"; }, { internalType: "bytes"; name: "data"; type: "bytes"; }]; name: "adminCall"; outputs: []; stateMutability: "payable"; type: "function"; }, { inputs: [{ internalType: "bytes32"; name: "jobHash"; type: "bytes32"; }]; stateMutability: "view"; type: "function"; name: "operatorJobExists"; outputs: [{ internalType: "bool"; name: ""; type: "bool"; }]; }, { inputs: [{ internalType: "bytes32"; name: "jobHash"; type: "bytes32"; }]; stateMutability: "view"; type: "function"; name: "failedJobExists"; outputs: [{ internalType: "bool"; name: ""; type: "bool"; }]; }, { inputs: [{ internalType: "address"; name: "operator"; type: "address"; }, { internalType: "uint256"; name: "amount"; type: "uint256"; }, { internalType: "uint256"; name: "pod"; type: "uint256"; }]; name: "bondUtilityToken"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "bytes"; name: "bridgeInRequestPayload"; type: "bytes"; }]; name: "crossChainMessage"; outputs: []; stateMutability: "payable"; type: "function"; }, { inputs: [{ internalType: "bytes"; name: "bridgeInRequestPayload"; type: "bytes"; }]; name: "executeJob"; outputs: []; stateMutability: "payable"; type: "function"; }, { inputs: []; name: "getAdmin"; outputs: [{ internalType: "address"; name: "adminAddress"; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "address"; name: "operator"; type: "address"; }]; name: "getBondedAmount"; outputs: [{ internalType: "uint256"; name: "amount"; type: "uint256"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "address"; name: "operator"; type: "address"; }]; name: "getBondedPod"; outputs: [{ internalType: "uint256"; name: "pod"; type: "uint256"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "address"; name: "operator"; type: "address"; }]; name: "getBondedPodIndex"; outputs: [{ internalType: "uint256"; name: "index"; type: "uint256"; }]; stateMutability: "view"; type: "function"; }, { inputs: []; name: "getBridge"; outputs: [{ internalType: "address"; name: "bridge"; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: []; name: "getHolograph"; outputs: [{ internalType: "address"; name: "holograph"; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: []; name: "getInterfaces"; outputs: [{ internalType: "address"; name: "interfaces"; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "bytes32"; name: "jobHash"; type: "bytes32"; }]; name: "getJobDetails"; outputs: [{ components: [{ internalType: "uint8"; name: "pod"; type: "uint8"; }, { internalType: "uint16"; name: "blockTimes"; type: "uint16"; }, { internalType: "address"; name: "operator"; type: "address"; }, { internalType: "uint40"; name: "startBlock"; type: "uint40"; }, { internalType: "uint64"; name: "startTimestamp"; type: "uint64"; }, { internalType: "uint16[5]"; name: "fallbackOperators"; type: "uint16[5]"; }]; internalType: "struct OperatorJob"; name: ""; type: "tuple"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "uint32"; name: ""; type: "uint32"; }, { internalType: "uint256"; name: ""; type: "uint256"; }, { internalType: "uint256"; name: ""; type: "uint256"; }, { internalType: "bytes"; name: ""; type: "bytes"; }]; name: "getMessageFee"; outputs: [{ internalType: "uint256"; name: ""; type: "uint256"; }, { internalType: "uint256"; name: ""; type: "uint256"; }, { internalType: "uint256"; name: ""; type: "uint256"; }]; stateMutability: "view"; type: "function"; }, { inputs: []; name: "getMessagingModule"; outputs: [{ internalType: "address"; name: "messagingModule"; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: []; name: "getMinGasPrice"; outputs: [{ internalType: "uint256"; name: "minGasPrice"; type: "uint256"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "uint256"; name: "pod"; type: "uint256"; }]; name: "getPodBondAmounts"; outputs: [{ internalType: "uint256"; name: "base"; type: "uint256"; }, { internalType: "uint256"; name: "current"; type: "uint256"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "uint256"; name: "pod"; type: "uint256"; }, { internalType: "uint256"; name: "index"; type: "uint256"; }, { internalType: "uint256"; name: "length"; type: "uint256"; }]; name: "getPodOperators"; outputs: [{ internalType: "address[]"; name: "operators"; type: "address[]"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "uint256"; name: "pod"; type: "uint256"; }]; name: "getPodOperators"; outputs: [{ internalType: "address[]"; name: "operators"; type: "address[]"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "uint256"; name: "pod"; type: "uint256"; }]; name: "getPodOperatorsLength"; outputs: [{ internalType: "uint256"; name: ""; type: "uint256"; }]; stateMutability: "view"; type: "function"; }, { inputs: []; name: "getRegistry"; outputs: [{ internalType: "address"; name: "registry"; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: []; name: "getTotalPods"; outputs: [{ internalType: "uint256"; name: "totalPods"; type: "uint256"; }]; stateMutability: "view"; type: "function"; }, { inputs: []; name: "getUtilityToken"; outputs: [{ internalType: "address"; name: "utilityToken"; type: "address"; }]; stateMutability: "view"; type: "function"; }, { inputs: [{ internalType: "bytes"; name: "initPayload"; type: "bytes"; }]; name: "init"; outputs: [{ internalType: "bytes4"; name: ""; type: "bytes4"; }]; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "bytes"; name: "bridgeInRequestPayload"; type: "bytes"; }]; name: "jobEstimator"; outputs: [{ internalType: "uint256"; name: ""; type: "uint256"; }]; stateMutability: "payable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "msgSender"; type: "address"; }, { internalType: "bytes"; name: "payload"; type: "bytes"; }]; name: "nonRevertingBridgeCall"; outputs: []; stateMutability: "payable"; type: "function"; }, { inputs: [{ internalType: "bytes"; name: "bridgeInRequestPayload"; type: "bytes"; }]; name: "recoverJob"; outputs: []; stateMutability: "payable"; type: "function"; }, { inputs: [{ internalType: "uint256"; name: "gasLimit"; type: "uint256"; }, { internalType: "uint256"; name: "gasPrice"; type: "uint256"; }, { internalType: "uint32"; name: "toChain"; type: "uint32"; }, { internalType: "address"; name: "msgSender"; type: "address"; }, { internalType: "uint256"; name: "nonce"; type: "uint256"; }, { internalType: "address"; name: "holographableContract"; type: "address"; }, { internalType: "bytes"; name: "bridgeOutPayload"; type: "bytes"; }]; name: "send"; outputs: []; stateMutability: "payable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "adminAddress"; type: "address"; }]; name: "setAdmin"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "bridge"; type: "address"; }]; name: "setBridge"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "holograph"; type: "address"; }]; name: "setHolograph"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "interfaces"; type: "address"; }]; name: "setInterfaces"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "messagingModule"; type: "address"; }]; name: "setMessagingModule"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "uint256"; name: "minGasPrice"; type: "uint256"; }]; name: "setMinGasPrice"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "registry"; type: "address"; }]; name: "setRegistry"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "utilityToken"; type: "address"; }]; name: "setUtilityToken"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "operator"; type: "address"; }, { internalType: "uint256"; name: "amount"; type: "uint256"; }]; name: "topupUtilityToken"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { inputs: [{ internalType: "address"; name: "operator"; type: "address"; }, { internalType: "address"; name: "recipient"; type: "address"; }]; name: "unbondUtilityToken"; outputs: []; stateMutability: "nonpayable"; type: "function"; }, { stateMutability: "payable"; type: "receive"; }]; declare const openEditionSalesConfigSchema: z.ZodObject<{ publicSalePrice: z.ZodNumber; maxSalePurchasePerAddress: z.ZodNumber; publicSaleStart: z.ZodString; publicSaleEnd: z.ZodString; presaleStart: z.ZodOptional<z.ZodString>; presaleEnd: z.ZodOptional<z.ZodString>; presaleMerkleRoot: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { publicSalePrice: number; publicSaleStart: string; publicSaleEnd: string; presaleMerkleRoot: string; maxSalePurchasePerAddress: number; presaleStart?: string | undefined; presaleEnd?: string | undefined; }, { publicSalePrice: number; publicSaleStart: string; publicSaleEnd: string; maxSalePurchasePerAddress: number; presaleStart?: string | undefined; presaleEnd?: string | undefined; presaleMerkleRoot?: string | undefined; }>; declare const contractInfoSchema: z.ZodObject<{ name: z.ZodString; description: z.ZodOptional<z.ZodString>; symbol: z.ZodEffects<z.ZodString, string, string>; royaltiesPercentage: z.ZodDefault<z.ZodNumber>; salt: z.ZodEffects<z.ZodDefault<z.ZodString>, `0x${string}`, string | undefined>; }, "strip", z.ZodTypeAny, { symbol: string; name: string; salt: `0x${string}`; royaltiesPercentage: number; description?: string | undefined; }, { symbol: string; name: string; description?: string | undefined; royaltiesPercentage?: number | undefined; salt?: string | undefined; }>; declare const nftInfoSchema: z.ZodObject<{ ipfsUrl: z.ZodString; ipfsImageCid: z.ZodString; }, "strip", z.ZodTypeAny, { ipfsUrl: string; ipfsImageCid: string; }, { ipfsUrl: string; ipfsImageCid: string; }>; declare const holographOpenEditionERC721InitCodeV2ParamsSchema: z.ZodObject<{ contractType: z.ZodString; registryAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>; initialOwner: z.ZodEffects<z.ZodString, `0x${string}`, string>; fundsRecipient: z.ZodEffects<z.ZodString, `0x${string}`, string>; numOfEditions: z.ZodNumber; royaltiesPercentage: z.ZodDefault<z.ZodNumber>; salesConfigArray: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBigInt]>, "many">; metadataRendererAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>; metadataRendererInitCode: z.ZodString; }, "strip", z.ZodTypeAny, { fundsRecipient: `0x${string}`; contractType: string; royaltiesPercentage: number; registryAddress: `0x${string}`; initialOwner: `0x${string}`; numOfEditions: number; salesConfigArray: (string | number | bigint)[]; metadataRendererAddress: `0x${string}`; metadataRendererInitCode: string; }, { fundsRecipient: string; contractType: string; registryAddress: string; initialOwner: string; numOfEditions: number; salesConfigArray: (string | number | bigint)[]; metadataRendererAddress: string; metadataRendererInitCode: string; royaltiesPercentage?: number | undefined; }>; declare const holographOpenEditionERC721InitCodeV1ParamsSchema: z.ZodObject<{ fundsRecipient: z.ZodEffects<z.ZodString, `0x${string}`, string>; contractType: z.ZodString; royaltiesPercentage: z.ZodDefault<z.ZodNumber>; registryAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>; initialOwner: z.ZodEffects<z.ZodString, `0x${string}`, string>; numOfEditions: z.ZodNumber; salesConfigArray: z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBigInt]>, "many">; metadataRendererAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>; metadataRendererInitCode: z.ZodString; erc721TransferHelper: z.ZodEffects<z.ZodString, `0x${string}`, string>; marketFilterAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>; enableOpenSeaRoyaltyRegistry: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { fundsRecipient: `0x${string}`; erc721TransferHelper: `0x${string}`; marketFilterAddress: `0x${string}`; contractType: string; royaltiesPercentage: number; registryAddress: `0x${string}`; initialOwner: `0x${string}`; numOfEditions: number; salesConfigArray: (string | number | bigint)[]; metadataRendererAddress: `0x${string}`; metadataRendererInitCode: string; enableOpenSeaRoyaltyRegistry: boolean; }, { fundsRecipient: string; erc721TransferHelper: string; marketFilterAddress: string; contractType: string; registryAddress: string; initialOwner: string; numOfEditions: number; salesConfigArray: (string | number | bigint)[]; metadataRendererAddress: string; metadataRendererInitCode: string; royaltiesPercentage?: number | undefined; enableOpenSeaRoyaltyRegistry?: boolean | undefined; }>; declare const holographERC721InitCodeParamsSchema: z.ZodObject<{ contractName: z.ZodString; contractSymbol: z.ZodEffects<z.ZodString, string, string>; royaltiesPercentage: z.ZodDefault<z.ZodNumber>; eventConfig: z.ZodString; skipInit: z.ZodDefault<z.ZodBoolean>; holographOpenEditionERC721InitCode: z.ZodString; }, "strip", z.ZodTypeAny, { contractName: string; contractSymbol: string; royaltiesPercentage: number; eventConfig: string; skipInit: boolean; holographOpenEditionERC721InitCode: string; }, { contractName: string; contractSymbol: string; eventConfig: string; holographOpenEditionERC721InitCode: string; royaltiesPercentage?: number | undefined; skipInit?: boolean | undefined; }>; declare const openEditionContractInfo: z.ZodObject<{ symbol: z.ZodEffects<z.ZodString, string, string>; name: z.ZodString; description: z.ZodOptional<z.ZodString>; salt: z.ZodEffects<z.ZodDefault<z.ZodString>, `0x${string}`, string | undefined>; royaltiesPercentage: z.ZodDefault<z.ZodNumber>; ipfsUrl: z.ZodString; ipfsImageCid: z.ZodString; publicSalePrice: z.ZodNumber; maxSalePurchasePerAddress: z.ZodNumber; publicSaleStart: z.ZodString; publicSaleEnd: z.ZodString; presaleStart: z.ZodOptional<z.ZodString>; presaleEnd: z.ZodOptional<z.ZodString>; presaleMerkleRoot: z.ZodDefault<z.ZodOptional<z.ZodString>>; }, "strip", z.ZodTypeAny, { symbol: string; name: string; publicSalePrice: number; publicSaleStart: string; publicSaleEnd: string; presaleMerkleRoot: string; maxSalePurchasePerAddress: number; salt: `0x${string}`; royaltiesPercentage: number; ipfsUrl: string; ipfsImageCid: string; description?: string | undefined; presaleStart?: string | undefined; presaleEnd?: string | undefined; }, { symbol: string; name: string; publicSalePrice: number; publicSaleStart: string; publicSaleEnd: string; maxSalePurchasePerAddress: number; ipfsUrl: string; ipfsImageCid: string; description?: string | undefined; salt?: string | undefined; royaltiesPercentage?: number | undefined; presaleStart?: string | undefined; presaleEnd?: string | undefined; presaleMerkleRoot?: string | undefined; }>; type CreateHolographERC721Contract = { contractInfo: { name: string; symbol: string; royaltiesPercentage?: number; salt?: string; }; primaryChainId: number; }; type HydrateHolographERC721Contract = { contractInfo: { name: string; symbol: string; royaltiesPercentage?: number; salt?: string; }; chainId: number; address: Address; txHash?: Hex; }; type ContractInfo = z.infer<typeof contractInfoSchema>; type OpenEditionContractInfo = z.input<typeof openEditionContractInfo>; type NFTInfo = z.infer<typeof nftInfoSchema>; type OpenEditionSalesConfig = z.input<typeof openEditionSalesConfigSchema>; type CreateHolographOpenEditionERC721Contract = { contractInfo: { name: string; symbol: string; description?: string; royaltiesPercentage?: number; salt?: string; }; nftInfo: { ipfsUrl: string; ipfsImageCid: string; }; primaryChainId: number; salesConfig: OpenEditionSalesConfig; }; type HydrateHolographOpenEditionERC721Contract = { contractInfo: { name: string; symbol: string; description?: string; royaltiesPercentage?: number; salt?: string; }; nftInfo: { ipfsUrl: string; ipfsImageCid: string; }; salesConfig: OpenEditionSalesConfig; chainId: number; address: Address; txHash?: Hex; }; type HolographERC721InitCodeParams = z.infer<typeof holographERC721InitCodeParamsSchema>; type HolographOpenEditionERC721InitCodeV1Params = z.infer<typeof holographOpenEditionERC721InitCodeV1ParamsSchema>; type HolographOpenEditionERC721InitCodeV2Params = z.infer<typeof holographOpenEditionERC721InitCodeV2ParamsSchema>; declare class HolographERC721Contract { private _isHydrated; private _contractInfo; primaryChainId: number; account?: Address; chainIds?: number[]; contractAddress?: Address; erc721ConfigHash?: Hex; predictedContractAddress?: Address; signature?: Signature; txHash?: string; private readonly factory; private readonly registry; constructor({ contractInfo, primaryChainId }: CreateHolographERC721Contract); static hydrate({ contractInfo, chainId, address, txHash }: HydrateHolographERC721Contract): HolographERC721Contract; get name(): string; get symbol(): string; get royaltiesPercentage(): number; get salt(): `0x${string}`; getContractInfo(): ContractInfo; get isHydrated(): boolean; setName(name: string): void; setSymbol(symbol: string): void; setRoyaltiesPercentage(royalties: number): void; setSalt(salt: Hex): void; createERC721DeploymentConfig(account: Address, chainId?: number): Promise<DeploymentConfig>; /** * @param holographWallet - The HolographWallet instance to sign the deploy. * @param chainId - The chainId to sign the deploy. It's optional and defaults to the primaryChainId. * @returns - The signature data with the config and signature to deploy the contract. */ signDeploy(holographWallet: HolographWallet, chainId?: number): Promise<SignDeploy>; /** * @param signatureData - The signature data returned from signDeploy function. * @returns - A transaction hash. */ deploy(signatureData: SignDeploy, options?: WriteContractOptions): Promise<{ contractAddress: Address; txHash: Hex; }>; private _getFactoryAddress; private _getRegistryAddress; private _getPredictedContractAddress; private _generateInitCode; private _getContractPayload; private _estimateGasForDeployingContract; } declare class HolographOpenEditionERC721ContractV1 { protected _isHydrated: boolean; protected _contractInfo: ContractInfo; nftInfo: NFTInfo; salesConfig: OpenEditionSalesConfig; primaryChainId: number; account?: Address; chainIds?: number[]; contractAddress?: Address; erc721ConfigHash?: Hex; signature?: Signature; txHash?: string; private factory; private registry; constructor({ contractInfo, nftInfo, primaryChainId, salesConfig }: CreateHolographOpenEditionERC721Contract); static hydrate({ contractInfo, nftInfo, salesConfig, chainId, address, txHash, }: HydrateHolographOpenEditionERC721Contract): HolographOpenEditionERC721ContractV1; get name(): string; get description(): string | undefined; get symbol(): string; get royaltiesPercentage(): number; get salt(): `0x${string}`; get publicSalePrice(): number; get maxSalePurchasePerAddress(): number; get publicSaleStart(): string; get publicSaleEnd(): string; get presaleStart(): string | undefined; get presaleEnd(): string | undefined; get presaleMerkleRoot(): string | undefined; get nftIpfsUrl(): string; get nftIpfsImageCid(): string; get isHydrated(): boolean; getContractInfo(): OpenEditionContractInfo; setName(name: string): void; setDescription(description: string): void; setSymbol(symbol: string): void; setRoyaltiesPercentage(royalties: number): void; setSalt(salt: Hex): void; setPublicSalePrice(publicSalePrice: number): void; setMaxSalePurchasePerAddress(maxSalePurchasePerAddress: number): void; setPublicSaleStart(publicSaleStart: string): void; setPublicSaleEnd(publicSaleEnd: string): void; setPresaleStart(presaleStart: string): void; setPresaleEnd(presaleEnd: string): void; setPresaleMerkleRoot(presaleMerkleRoot: string): void; setIpfsUrl(nftIpfsUrl: string): void; setIpfsImageCid(nftIpfsImageCid: string): void; /** * @param holographWallet - The HolographWallet instance to sign the deploy. * @param chainId - The chainId to sign the deploy. It's optional and defaults to the primaryChainId. * @returns - The signature data with the config and signature to deploy the contract contract. */ signDeploy(holographWallet: HolographWallet, chainId?: number): Promise<SignDeploy>; /** * @param signatureData - The signature data returned from signDeploy function. * @returns - A transaction hash. */ deploy(signatureData: SignDeploy, options?: WriteContractOptions): Promise<{ contractAddress: Address; txHash: Hex; }>; protected _getRegistryAddress(chainId?: number): Promise<`0x${string}`>; protected _getMetadataRendererAddress(chainId?: number): `0x${string}`; protected _getOpenEditionContractType(): `0x${string}`; protected _getEventConfig(): `0x${string}`; protected _generateMetadataRendererInitCode(description: string, imageURI: string, animationURI?: string): `0x${string}`; protected _generateHolographOpenEditionERC721InitCode(data: HolographOpenEditionERC721InitCodeV1Params): `0x${string}`; protected _generateHolographERC721InitCode(data: HolographERC721InitCodeParams): `0x${string}`; protected _getInitialPayload(chainId?: number): Promise<{ openEditionContractType: `0x${string}`; metadataRendererAddress: `0x${string}`; metadataRendererInitCode: `0x${string}`; registryAddress: `0x${string}`; salesConfigArray: (string | number | bigint)[]; }>; protected _getOpenEditionInitCode({ account, metadataRendererAddress, metadataRendererInitCode, registryAddress, salesConfigArray, }: GetOpenEditionInitCodeParams): Hex; protected _getContractPayload(account: Address, chainId?: number): Promise<{ byteCode: `0x${string}`; chainType: string; configHash: `0x${string}`; configHashBytes: Uint8Array; contractType: `0x${string}`; initCode: `0x${string}`; salt: `0x${string}`; }>; protected _estimateGasForDeployingContract(data: SignDeploy, chainId?: number): Promise<GasFee>; } declare class HolographOpenEditionERC721ContractV2 extends HolographOpenEditionERC721ContractV1 { constructor({ contractInfo, nftInfo, primaryChainId, salesConfig }: CreateHolographOpenEditionERC721Contract); static hydrate({ contractInfo, nftInfo, salesConfig, chainId, address, txHash, }: HydrateHolographOpenEditionERC721Contract): HolographOpenEditionERC721ContractV2; protected _getMetadataRendererAddress(chainId?: number): `0x${string}`; protected _getOpenEditionContractType(): `0x${string}`; protected _getEventConfig(): `0x${string}`; protected _generateHolographOpenEditionERC721InitCode(data: HolographOpenEditionERC721InitCodeV2Params): `0x${string}`; protected _getOpenEditionInitCode({ account, metadataRendererAddress, metadataRendererInitCode, registryAddress, salesConfigArray, }: GetOpenEditionInitCodeParams): Hex; } declare class Config { private holographConfig; private static _instance?; private readonly _logger; private readonly _environment; private readonly _networks; private readonly _networksRpc; private readonly _accounts?; private readonly _provider?; private constructor(); static getInstance(holographConfig?: HolographConfig): Config; private setNetworks; get accounts(): AccountsConfig | undefined; get environment(): Environment; get networks(): Network[]; get networksRpc(): NetworkRpc; get provider(): unknown; } type HolographByNetworksResponse = { [chainId: number]: any; }; /** * @group Contracts * HolographBaseContract * * @remarks * * Base contract class for * */ declare class HolographBaseContract { protected _logger: HolographLogger; protected readonly _abi: Abi; private readonly _contractName; protected readonly _config: Config; /** The list of networks in which the contract was instantiated. */ readonly networks: Network[]; /** The record of addresses per chainId. */ protected readonly _addresses: Record<number, Address>; protected readonly _providers: Providers; protected _walletManager?: HolographWalletManager; constructor(_logger: HolographLogger, _abi: Abi, _contractName: string); protected validateWallet: (wallet?: HolographWallet | { account: HolographWallet | string; }) => HolographWallet; protected _simulateContract<TAbi extends Abi>({ chainId, address, functionName, args, options, transportType, }: SimulateContractArgs<TAbi>): Promise<any>; protected _estimateContractGas<TAbi extends Abi>({ chainId, address, functionName, wallet, args, options, }: EstimateContractGasArgs<TAbi>): Promise<bigint>; protected _writeContract<TAbi extends Abi>({ chainId, address, functionName, wallet, args, options, }: WriteContractArgs<TAbi>): Promise<`0x${string}`>; protected _readContract<TAbi extends Abi>({ chainId, address, functionName, args }: ReadContractArgs<TAbi>): Promise<unknown>; protected _callContractFunction<TAbi extends Abi>({ chainId, address, functionName, wallet, args, options, }: CallContractFunctionArgs<TAbi>): Promise<any>; /** * @readonly * Get the Viem client for a certain network. * @param chainId The chain id of the network to get the result from. * @returns The Viem client object. */ getClientByChainId(chainId: number): Promise<ViemPublicClient>; /** * @readonly * Get the current gas price for a certain network. * @param chainId The chain id of the network to get the result from. * @returns The gas price in wei. */ getGasPrice: (chainId: number) => Promise<bigint>; } /** * @group Contracts * HolographBridge * * @remarks * * Bridge any holographable contracts and assets across blockchains. * The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets. * */ declare class BridgeContract$1 extends HolographBaseContract { constructor(parentLogger?: HolographLogger); /** * @readonly * Gets the HolographBridge contract address according to environment and chainId module. * @param chainId The chain id of the network to get the result from. * @returns The HolographBridge contract address in the provided network. */ getAddress(chainId: number): Promise<Address>; private _getContractFunction; estimateContractFunctionGas({ chainId, functionName, wallet, args, options, }: EstimateContractFunctionGasArgs<typeof _default$2>): Promise<bigint>; simulateContractFunction({ chainId, functionName, args, options, }: SimulateContractFunctionArgs<typeof _default$2>): Promise<any>; /** * @readonly * Gets the Holograph Protocol contract. * Used for storing a reference to all the primary modules and variables of the protocol. * @param chainId The chain id of the network to get the result from. * @returns The Holograph Protocol contract address in the provided network. */ getHolograph(chainId: number): Promise<Address>; /** * @readonly * Gets the Holograph Protocol contract. * Used for storing a reference to all the primary modules and variables of the protocol. * @param chainIds The list of network chainIds to get the results from, if nothing is provided the default are the networks defined in the config. * @returns The Holograph Protocol contract address per network. */ getHolographByNetworks(chainIds?: number[]): Promise<HolographByNetworksResponse>; /** * @readonly * Gets the address of the Holograph Factory module. * Used for deploying holographable smart contracts. * @param chainId The chain id of the network to get the result from. * @returns The HolographFactory contract address in the provided network. */ getFactory(chainId: number): Promise<Address>; /** * @readonly * Gets the address of the Holograph Factory module. * Used for deploying holographable smart contracts. * @param chainIds The list of network chainIds to get the results from, if nothing is provided the default are the networks defined in the config. * @returns The HolographFactory contract address per network. */ getFactoryByNetworks(chainIds?: number[]): Promise<HolographByNetworksResponse>; /** * @readonly * Gets the latest job nonce. * You can use the job nonce as a way to calculate total amount of bridge requests that have been made. * @param chainId The chain id of the network to get the result from. * @returns The job nonce in the provided network. */ getJobNonce(chainId: number): Promise<bigint>; /** * @readonly * Gets the latest job nonce. * You can use the job nonce as a way to calculate total amount of bridge requests that have been made. * @param chainIds The list of network chainIds to get the results from, if nothing is provided the default are the networks defined in the config. * @returns The job nonce per network. */ getJobNonceByNetworks(chainIds?: number[]): Promise<HolographByNetworksResponse>; /** * @readonly * Gets the address of the Holograph Operator module. * All cross-chain Holograph Bridge bridges are handled by the Holograph Operator module. * @param chainId The chain id of the network to get the result from. * @returns The HolographOperator contract address in the provided network. */ getOperator(chainId: number): Promise<Address>; /** * @readonly * Gets the address of the Holograph Operator module. * All cross-chain Holo