@d20dao/vrf-sdk 0.3.4 → 0.4.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/AGENTS.md +25 -15
- package/API.md +342 -209
- package/BUILD-MANIFEST.json +18 -16
- package/CHANGELOG.md +44 -0
- package/PROTOCOL-PROVENANCE.json +9 -8
- package/README.md +129 -108
- package/abi/EpochEntropy.json +372 -26
- package/dist/abi.d.ts +292 -24
- package/dist/abi.js +1 -1
- package/dist/epoch.d.ts +42 -78
- package/dist/epoch.js +121 -27
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -1
- package/dist/sources.js +2 -0
- package/dist/templates.d.ts +22 -0
- package/dist/templates.js +220 -0
- package/examples/DiceConsumer.sol +37 -29
- package/examples/LootDropConsumer.sol +60 -0
- package/examples/RaffleConsumer.sol +71 -0
- package/package.json +2 -1
- package/contracts/examples/MiningRandomnessConsumer.sol +0 -59
package/dist/abi.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Generated from canonical protocol sources with solc 0.8.28+commit.7893614a.Emscripten.clang.
|
|
2
2
|
export const coordinatorAbi = [{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [{ "internalType": "address", "name": "target", "type": "address" }], "name": "AddressEmptyCode", "type": "error" }, { "inputs": [], "name": "AlreadyDelivered", "type": "error" }, { "inputs": [], "name": "AlreadyFulfilled", "type": "error" }, { "inputs": [], "name": "BlockHashUnavailable", "type": "error" }, { "inputs": [], "name": "ContractConsumerRequired", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "implementation", "type": "address" }], "name": "ERC1967InvalidImplementation", "type": "error" }, { "inputs": [], "name": "ERC1967NonPayable", "type": "error" }, { "inputs": [], "name": "EpochUnavailable", "type": "error" }, { "inputs": [], "name": "EvidencePacketTooLarge", "type": "error" }, { "inputs": [], "name": "FailedCall", "type": "error" }, { "inputs": [], "name": "FeeOverflow", "type": "error" }, { "inputs": [{ "internalType": "uint256", "name": "expected", "type": "uint256" }, { "internalType": "uint256", "name": "actual", "type": "uint256" }], "name": "IncorrectFee", "type": "error" }, { "inputs": [], "name": "InsufficientCallbackGas", "type": "error" }, { "inputs": [], "name": "InvalidBatch", "type": "error" }, { "inputs": [], "name": "InvalidCallbackGas", "type": "error" }, { "inputs": [], "name": "InvalidConfig", "type": "error" }, { "inputs": [], "name": "InvalidInitialization", "type": "error" }, { "inputs": [], "name": "InvalidMapping", "type": "error" }, { "inputs": [], "name": "InvalidPublicKey", "type": "error" }, { "inputs": [], "name": "InvalidRefundAddress", "type": "error" }, { "inputs": [], "name": "InvalidScan", "type": "error" }, { "inputs": [], "name": "NoKeeperCredit", "type": "error" }, { "inputs": [], "name": "NoRefundCredit", "type": "error" }, { "inputs": [], "name": "NotFulfilled", "type": "error" }, { "inputs": [], "name": "NotInitializing", "type": "error" }, { "inputs": [], "name": "NotReady", "type": "error" }, { "inputs": [], "name": "NotRefunded", "type": "error" }, { "inputs": [], "name": "OnlyFeeRecipient", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], "name": "OwnableInvalidOwner", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], "name": "OwnableUnauthorizedAccount", "type": "error" }, { "inputs": [], "name": "ReentrancyGuardReentrantCall", "type": "error" }, { "inputs": [], "name": "RefundCallbackAlreadyDelivered", "type": "error" }, { "inputs": [], "name": "RefundNotAvailable", "type": "error" }, { "inputs": [], "name": "RenounceDisabled", "type": "error" }, { "inputs": [], "name": "RequestExpired", "type": "error" }, { "inputs": [], "name": "RequestRefunded", "type": "error" }, { "inputs": [], "name": "TransferFailed", "type": "error" }, { "inputs": [], "name": "UUPSUnauthorizedCallContext", "type": "error" }, { "inputs": [{ "internalType": "bytes32", "name": "slot", "type": "bytes32" }], "name": "UUPSUnsupportedProxiableUUID", "type": "error" }, { "inputs": [], "name": "UnknownRequest", "type": "error" }, { "inputs": [], "name": "WrongPublicKey", "type": "error" }, { "inputs": [], "name": "WrongSeed", "type": "error" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": false, "internalType": "uint64", "name": "targetBlock", "type": "uint64" }, { "indexed": false, "internalType": "bytes32", "name": "blockHash", "type": "bytes32" }], "name": "BlockHashStored", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": false, "internalType": "bool", "name": "success", "type": "bool" }, { "indexed": false, "internalType": "uint32", "name": "gasLimit", "type": "uint32" }], "name": "CallbackAttempted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "refundAddress", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }], "name": "FeeOverpaymentCredited", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "previousRecipient", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newRecipient", "type": "address" }], "name": "FeeRecipientChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "recipient", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }], "name": "FeesWithdrawn", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": true, "internalType": "bytes32", "name": "transcriptHash", "type": "bytes32" }, { "indexed": false, "internalType": "bytes", "name": "packet", "type": "bytes" }], "name": "FulfillmentEvidence", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": false, "internalType": "uint8", "name": "reason", "type": "uint8" }], "name": "FulfillmentSkipped", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint64", "name": "version", "type": "uint64" }], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "keeper", "type": "address" }, { "indexed": true, "internalType": "address", "name": "recipient", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }], "name": "KeeperCreditWithdrawn", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint16", "name": "previousBps", "type": "uint16" }, { "indexed": false, "internalType": "uint16", "name": "newBps", "type": "uint16" }], "name": "KeeperFeeBpsChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "keeper", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "bool", "name": "paid", "type": "bool" }], "name": "KeeperFeePaid", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": true, "internalType": "bytes32", "name": "mappingHash", "type": "bytes32" }, { "components": [{ "internalType": "enum RandomnessMapping.Operation", "name": "operation", "type": "uint8" }, { "internalType": "uint256", "name": "lower", "type": "uint256" }, { "internalType": "uint256", "name": "upper", "type": "uint256" }, { "internalType": "uint32", "name": "count", "type": "uint32" }, { "internalType": "uint32", "name": "population", "type": "uint32" }], "indexed": false, "internalType": "struct RandomnessMapping.Spec", "name": "spec", "type": "tuple" }], "name": "MappingRequested", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }], "name": "OwnershipTransferStarted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "minFee", "type": "uint256" }, { "indexed": false, "internalType": "uint16", "name": "feeMultiplier", "type": "uint16" }, { "indexed": false, "internalType": "uint32", "name": "fulfillGasOverhead", "type": "uint32" }], "name": "PricingChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": true, "internalType": "bytes32", "name": "keyHash", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "seed", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "proofHash", "type": "bytes32" }], "name": "ProofVerified", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "randomness", "type": "bytes32" }, { "indexed": true, "internalType": "address", "name": "submitter", "type": "address" }], "name": "RandomnessFulfilled", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "consumer", "type": "address" }, { "indexed": true, "internalType": "bytes32", "name": "keyHash", "type": "bytes32" }, { "indexed": false, "internalType": "bytes32", "name": "clientSeed", "type": "bytes32" }, { "indexed": false, "internalType": "uint64", "name": "requestBlock", "type": "uint64" }, { "indexed": false, "internalType": "uint32", "name": "callbackGasLimit", "type": "uint32" }, { "indexed": false, "internalType": "uint256", "name": "feePaid", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "refundAddress", "type": "address" }, { "indexed": false, "internalType": "uint64", "name": "deadline", "type": "uint64" }], "name": "RandomnessRequested", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint16", "name": "previousBps", "type": "uint16" }, { "indexed": false, "internalType": "uint16", "name": "newBps", "type": "uint16" }], "name": "RefundBpsChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "consumer", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "success", "type": "bool" }, { "indexed": false, "internalType": "uint32", "name": "gasLimit", "type": "uint32" }], "name": "RefundCallbackAttempted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "recipient", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }], "name": "RefundCreditWithdrawn", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "refundAddress", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "bool", "name": "paid", "type": "bool" }], "name": "RequestRefundedTo", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": true, "internalType": "uint256", "name": "serveIndex", "type": "uint256" }], "name": "RequestServed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "implementation", "type": "address" }], "name": "Upgraded", "type": "event" }, { "inputs": [], "name": "CONFIG_DOMAIN", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_CALLBACK_GAS", "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_EVIDENCE_PACKET_BYTES", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_FEE_MULTIPLIER", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_FULFILL_BATCH", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_FULFILL_GAS_OVERHEAD", "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_MIN_FEE", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MIN_CALLBACK_GAS", "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MIN_FULFILL_GAS_OVERHEAD", "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MIN_REFUND_BPS", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "REFUND_CALLBACK_GAS", "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "RESPONSE_TIMEOUT", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "SEED_DOMAIN", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "TRANSCRIPT_DOMAIN", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "UPGRADE_INTERFACE_VERSION", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "confirmationBlocks", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "earnedFees", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "epochRegistry", "outputs": [{ "internalType": "contract EpochEntropy", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "feeMultiplier", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "feeRecipient", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "fulfillGasOverhead", "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "components": [{ "internalType": "uint256[2]", "name": "pk", "type": "uint256[2]" }, { "internalType": "uint256[2]", "name": "gamma", "type": "uint256[2]" }, { "internalType": "uint256", "name": "c", "type": "uint256" }, { "internalType": "uint256", "name": "s", "type": "uint256" }, { "internalType": "uint256", "name": "seed", "type": "uint256" }, { "internalType": "address", "name": "uWitness", "type": "address" }, { "internalType": "uint256[2]", "name": "cGammaWitness", "type": "uint256[2]" }, { "internalType": "uint256[2]", "name": "sHashWitness", "type": "uint256[2]" }, { "internalType": "uint256", "name": "zInv", "type": "uint256" }], "internalType": "struct VRF.Proof", "name": "proof", "type": "tuple" }], "name": "fulfillRandomness", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }, { "components": [{ "internalType": "uint256[2]", "name": "pk", "type": "uint256[2]" }, { "internalType": "uint256[2]", "name": "gamma", "type": "uint256[2]" }, { "internalType": "uint256", "name": "c", "type": "uint256" }, { "internalType": "uint256", "name": "s", "type": "uint256" }, { "internalType": "uint256", "name": "seed", "type": "uint256" }, { "internalType": "address", "name": "uWitness", "type": "address" }, { "internalType": "uint256[2]", "name": "cGammaWitness", "type": "uint256[2]" }, { "internalType": "uint256[2]", "name": "sHashWitness", "type": "uint256[2]" }, { "internalType": "uint256", "name": "zInv", "type": "uint256" }], "internalType": "struct VRF.Proof[]", "name": "proofs", "type": "tuple[]" }], "name": "fulfillRandomnessBatch", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }], "name": "getMappedResult", "outputs": [{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }], "name": "getMapping", "outputs": [{ "components": [{ "internalType": "enum RandomnessMapping.Operation", "name": "operation", "type": "uint8" }, { "internalType": "uint256", "name": "lower", "type": "uint256" }, { "internalType": "uint256", "name": "upper", "type": "uint256" }, { "internalType": "uint32", "name": "count", "type": "uint32" }, { "internalType": "uint32", "name": "population", "type": "uint32" }], "internalType": "struct RandomnessMapping.Spec", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "fromId", "type": "uint256" }, { "internalType": "uint256", "name": "limit", "type": "uint256" }], "name": "getPendingRequestIds", "outputs": [{ "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }, { "internalType": "uint256", "name": "nextCursor", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }], "name": "getProofContext", "outputs": [{ "internalType": "uint256", "name": "seed", "type": "uint256" }, { "internalType": "uint64", "name": "deadline", "type": "uint64" }, { "internalType": "bool", "name": "fulfilled", "type": "bool" }, { "internalType": "bool", "name": "refunded", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }], "name": "getRequest", "outputs": [{ "components": [{ "internalType": "address", "name": "consumer", "type": "address" }, { "internalType": "uint32", "name": "callbackGasLimit", "type": "uint32" }, { "internalType": "uint64", "name": "requestBlock", "type": "uint64" }, { "internalType": "uint64", "name": "targetBlock", "type": "uint64" }, { "internalType": "uint64", "name": "deadline", "type": "uint64" }, { "internalType": "address", "name": "refundAddress", "type": "address" }, { "internalType": "bytes32", "name": "clientSeed", "type": "bytes32" }, { "internalType": "bytes32", "name": "mappingHash", "type": "bytes32" }, { "internalType": "bytes32", "name": "blockHash", "type": "bytes32" }, { "internalType": "bytes32", "name": "randomness", "type": "bytes32" }, { "internalType": "bytes32", "name": "proofHash", "type": "bytes32" }, { "internalType": "bytes32", "name": "transcriptHash", "type": "bytes32" }, { "internalType": "bool", "name": "fulfilled", "type": "bool" }, { "internalType": "bool", "name": "delivered", "type": "bool" }, { "internalType": "bool", "name": "refunded", "type": "bool" }, { "internalType": "uint64", "name": "epochId", "type": "uint64" }, { "internalType": "bytes32", "name": "epochHash", "type": "bytes32" }], "internalType": "struct D20VRFCoordinator.Request", "name": "result", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "initialFeeRecipient", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "initialMinFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256[2]", "name": "publicKey", "type": "uint256[2]" }, { "internalType": "address", "name": "initialOwner", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "fee", "type": "uint256" }, { "internalType": "uint16", "name": "confirmations", "type": "uint16" }, { "internalType": "contract EpochEntropy", "name": "registry", "type": "address" }, { "internalType": "uint16", "name": "keeperBps", "type": "uint16" }], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "keeperCredits", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "keeperFeeBps", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "keyHash", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastServedIndex", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastServedRequestId", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "randomness", "type": "bytes32" }, { "components": [{ "internalType": "enum RandomnessMapping.Operation", "name": "operation", "type": "uint8" }, { "internalType": "uint256", "name": "lower", "type": "uint256" }, { "internalType": "uint256", "name": "upper", "type": "uint256" }, { "internalType": "uint32", "name": "count", "type": "uint32" }, { "internalType": "uint32", "name": "population", "type": "uint32" }], "internalType": "struct RandomnessMapping.Spec", "name": "spec", "type": "tuple" }], "name": "mapRandomness", "outputs": [{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "minFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "nextRequestId", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pendingOwner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pricing", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint16", "name": "", "type": "uint16" }, { "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "protocolConfigurationHash", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "proxiableUUID", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "publicKeyX", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "publicKeyY", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint32", "name": "callbackGasLimit", "type": "uint32" }], "name": "quoteFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint32", "name": "callbackGasLimit", "type": "uint32" }, { "internalType": "uint256", "name": "baseFee", "type": "uint256" }], "name": "quoteFeeAt", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "refundBps", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "refundCallbackDelivered", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "refundCredits", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }], "name": "refundRequest", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }], "name": "requestFeePaid", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "clientSeed", "type": "bytes32" }, { "internalType": "uint32", "name": "callbackGasLimit", "type": "uint32" }, { "internalType": "address", "name": "_refundAddress", "type": "address" }, { "components": [{ "internalType": "enum RandomnessMapping.Operation", "name": "operation", "type": "uint8" }, { "internalType": "uint256", "name": "lower", "type": "uint256" }, { "internalType": "uint256", "name": "upper", "type": "uint256" }, { "internalType": "uint32", "name": "count", "type": "uint32" }, { "internalType": "uint32", "name": "population", "type": "uint32" }], "internalType": "struct RandomnessMapping.Spec", "name": "spec", "type": "tuple" }], "name": "requestMappedRandomness", "outputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }], "stateMutability": "payable", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "clientSeed", "type": "bytes32" }, { "internalType": "uint32", "name": "callbackGasLimit", "type": "uint32" }, { "internalType": "address", "name": "_refundAddress", "type": "address" }], "name": "requestRandomness", "outputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }], "stateMutability": "payable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }], "name": "requestRefundBps", "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }], "name": "requestSeed", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "internalType": "uint32", "name": "gasLimit", "type": "uint32" }], "name": "retryCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "internalType": "uint32", "name": "gasLimit", "type": "uint32" }], "name": "retryRefundCallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "servedRequestAt", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "next", "type": "address" }], "name": "setFeeRecipient", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint16", "name": "next", "type": "uint16" }], "name": "setKeeperFeeBps", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "nextMinFee", "type": "uint256" }, { "internalType": "uint16", "name": "multiplier", "type": "uint16" }, { "internalType": "uint32", "name": "overhead", "type": "uint32" }], "name": "setPricing", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint16", "name": "next", "type": "uint16" }], "name": "setRefundBps", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }], "name": "storeBlockHash", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "totalKeeperCredits", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalRefundCredits", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newImplementation", "type": "address" }, { "internalType": "bytes", "name": "data", "type": "bytes" }], "name": "upgradeToAndCall", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "components": [{ "internalType": "uint256[2]", "name": "pk", "type": "uint256[2]" }, { "internalType": "uint256[2]", "name": "gamma", "type": "uint256[2]" }, { "internalType": "uint256", "name": "c", "type": "uint256" }, { "internalType": "uint256", "name": "s", "type": "uint256" }, { "internalType": "uint256", "name": "seed", "type": "uint256" }, { "internalType": "address", "name": "uWitness", "type": "address" }, { "internalType": "uint256[2]", "name": "cGammaWitness", "type": "uint256[2]" }, { "internalType": "uint256[2]", "name": "sHashWitness", "type": "uint256[2]" }, { "internalType": "uint256", "name": "zInv", "type": "uint256" }], "internalType": "struct VRF.Proof", "name": "proof", "type": "tuple" }], "name": "verifyRequestProof", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address payable", "name": "recipient", "type": "address" }], "name": "withdrawFees", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address payable", "name": "recipient", "type": "address" }], "name": "withdrawKeeperCredit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address payable", "name": "recipient", "type": "address" }], "name": "withdrawRefundCredit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }];
|
|
3
|
-
export const epochEntropyAbi = [{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [{ "internalType": "address", "name": "target", "type": "address" }], "name": "AddressEmptyCode", "type": "error" }, { "inputs": [], "name": "AlreadyCommitted", "type": "error" }, { "inputs": [], "name": "AnchorUnavailable", "type": "error" }, { "inputs": [], "name": "ECDSAInvalidSignature", "type": "error" }, { "inputs": [{ "internalType": "uint256", "name": "length", "type": "uint256" }], "name": "ECDSAInvalidSignatureLength", "type": "error" }, { "inputs": [{ "internalType": "bytes32", "name": "s", "type": "bytes32" }], "name": "ECDSAInvalidSignatureS", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "implementation", "type": "address" }], "name": "ERC1967InvalidImplementation", "type": "error" }, { "inputs": [], "name": "ERC1967NonPayable", "type": "error" }, { "inputs": [], "name": "FailedCall", "type": "error" }, { "inputs": [], "name": "FallbackNotOpen", "type": "error" }, { "inputs": [], "name": "InvalidConfig", "type": "error" }, { "inputs": [], "name": "InvalidData", "type": "error" }, { "inputs": [], "name": "InvalidEpoch", "type": "error" }, { "inputs": [], "name": "InvalidFallback", "type": "error" }, { "inputs": [], "name": "InvalidInitialization", "type": "error" }, { "inputs": [], "name": "InvalidSigner", "type": "error" }, { "inputs": [], "name": "InvalidTime", "type": "error" }, { "inputs": [], "name": "NotInitializing", "type": "error" }, { "inputs": [], "name": "OnlyCommitter", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], "name": "OwnableInvalidOwner", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], "name": "OwnableUnauthorizedAccount", "type": "error" }, { "inputs": [], "name": "PacketTooLarge", "type": "error" }, { "inputs": [], "name": "PreparationClosed", "type": "error" }, { "inputs": [], "name": "RenounceDisabled", "type": "error" }, { "inputs": [], "name": "UUPSUnauthorizedCallContext", "type": "error" }, { "inputs": [{ "internalType": "bytes32", "name": "slot", "type": "bytes32" }], "name": "UUPSUnsupportedProxiableUUID", "type": "error" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint64", "name": "fromEpoch", "type": "uint64" }, { "indexed": true, "internalType": "bytes32", "name": "catalogHash", "type": "bytes32" }, { "indexed": false, "internalType": "address[4]", "name": "signers", "type": "address[4]" }], "name": "CatalogScheduled", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "previousCommitter", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newCommitter", "type": "address" }], "name": "CommitterChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint64", "name": "epochId", "type": "uint64" }, { "indexed": true, "internalType": "bytes32", "name": "epochHash", "type": "bytes32" }, { "indexed": false, "internalType": "bytes", "name": "packet", "type": "bytes" }], "name": "EpochCommitted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint64", "name": "version", "type": "uint64" }], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }], "name": "OwnershipTransferStarted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "implementation", "type": "address" }], "name": "Upgraded", "type": "event" }, { "inputs": [], "name": "EPOCH_DOMAIN", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "EPOCH_LENGTH", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "FALLBACK_DELAY_BLOCKS", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_ATTESTATION_AGE", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_FALLBACK_ATTEMPT", "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_PACKET_BYTES", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "RECIPE_DOMAIN", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "SELECT_DOMAIN", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "UPGRADE_INTERFACE_VERSION", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "anuSigner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "btcTradeSigner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "catalogHash", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }], "name": "catalogHashAt", "outputs": [{ "internalType": "bytes32", "name": "hash", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }], "name": "checkpointEpoch", "outputs": [{ "internalType": "bytes32", "name": "anchor", "type": "bytes32" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }, { "components": [{ "internalType": "uint256", "name": "timestamp", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" }, { "internalType": "bytes", "name": "signature", "type": "bytes" }], "internalType": "struct EpochEntropy.Attestation", "name": "a", "type": "tuple" }], "name": "commitEpoch", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }, { "internalType": "uint8", "name": "attempt", "type": "uint8" }, { "components": [{ "internalType": "uint256", "name": "timestamp", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" }, { "internalType": "bytes", "name": "signature", "type": "bytes" }], "internalType": "struct EpochEntropy.Attestation", "name": "a", "type": "tuple" }], "name": "commitEpochFallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "committer", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "name": "epochAnchors", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "number", "type": "uint256" }], "name": "epochForBlock", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }], "name": "epochStart", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ethTradeSigner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }, { "internalType": "uint8", "name": "attempt", "type": "uint8" }], "name": "fallbackOpensAt", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "firstEpochStart", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }], "name": "getEpoch", "outputs": [{ "components": [{ "internalType": "bytes32", "name": "epochHash", "type": "bytes32" }, { "internalType": "bytes32", "name": "catalogHash", "type": "bytes32" }, { "internalType": "bytes32", "name": "anchorHash", "type": "bytes32" }, { "internalType": "uint8", "name": "source", "type": "uint8" }, { "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "internalType": "bytes32", "name": "dataHash", "type": "bytes32" }, { "internalType": "bytes32", "name": "attestationHash", "type": "bytes32" }, { "internalType": "uint256", "name": "signedAt", "type": "uint256" }, { "internalType": "uint64", "name": "committedBlock", "type": "uint64" }], "internalType": "struct EpochEntropy.Epoch", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }, { "internalType": "uint8", "name": "attempt", "type": "uint8" }], "name": "getEpochFallbackSelection", "outputs": [{ "components": [{ "internalType": "uint8", "name": "source", "type": "uint8" }, { "internalType": "address", "name": "airnode", "type": "address" }, { "internalType": "bytes32", "name": "selector", "type": "bytes32" }, { "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "internalType": "string", "name": "canonicalRequest", "type": "string" }], "internalType": "struct EpochEntropy.Selection", "name": "s", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }], "name": "getEpochSelection", "outputs": [{ "components": [{ "internalType": "uint8", "name": "source", "type": "uint8" }, { "internalType": "address", "name": "airnode", "type": "address" }, { "internalType": "bytes32", "name": "selector", "type": "bytes32" }, { "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "internalType": "string", "name": "canonicalRequest", "type": "string" }], "internalType": "struct EpochEntropy.Selection", "name": "s", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "hyperliquidSigner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address[4]", "name": "signers", "type": "address[4]" }, { "internalType": "address", "name": "initialOwner", "type": "address" }, { "internalType": "address", "name": "initialCommitter", "type": "address" }], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "number", "type": "uint256" }], "name": "nextEpochToPrepare", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pendingOwner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "proxiableUUID", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address[4]", "name": "signers", "type": "address[4]" }, { "internalType": "uint64", "name": "fromEpoch", "type": "uint64" }], "name": "scheduleCatalog", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "next", "type": "address" }], "name": "setCommitter", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }], "name": "signersAt", "outputs": [{ "internalType": "address[4]", "name": "signers", "type": "address[4]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newImplementation", "type": "address" }, { "internalType": "bytes", "name": "data", "type": "bytes" }], "name": "upgradeToAndCall", "outputs": [], "stateMutability": "payable", "type": "function" }];
|
|
3
|
+
export const epochEntropyAbi = [{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [{ "internalType": "address", "name": "target", "type": "address" }], "name": "AddressEmptyCode", "type": "error" }, { "inputs": [], "name": "AlreadyCommitted", "type": "error" }, { "inputs": [], "name": "AnchorUnavailable", "type": "error" }, { "inputs": [], "name": "ECDSAInvalidSignature", "type": "error" }, { "inputs": [{ "internalType": "uint256", "name": "length", "type": "uint256" }], "name": "ECDSAInvalidSignatureLength", "type": "error" }, { "inputs": [{ "internalType": "bytes32", "name": "s", "type": "bytes32" }], "name": "ECDSAInvalidSignatureS", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "implementation", "type": "address" }], "name": "ERC1967InvalidImplementation", "type": "error" }, { "inputs": [], "name": "ERC1967NonPayable", "type": "error" }, { "inputs": [], "name": "FailedCall", "type": "error" }, { "inputs": [], "name": "FallbackNotOpen", "type": "error" }, { "inputs": [], "name": "InvalidConfig", "type": "error" }, { "inputs": [], "name": "InvalidData", "type": "error" }, { "inputs": [], "name": "InvalidEpoch", "type": "error" }, { "inputs": [], "name": "InvalidFallback", "type": "error" }, { "inputs": [], "name": "InvalidInitialization", "type": "error" }, { "inputs": [], "name": "InvalidRecipe", "type": "error" }, { "inputs": [], "name": "InvalidSigner", "type": "error" }, { "inputs": [], "name": "InvalidTemplate", "type": "error" }, { "inputs": [], "name": "InvalidTime", "type": "error" }, { "inputs": [], "name": "NotInitializing", "type": "error" }, { "inputs": [], "name": "OnlyCommitter", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], "name": "OwnableInvalidOwner", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], "name": "OwnableUnauthorizedAccount", "type": "error" }, { "inputs": [], "name": "PacketTooLarge", "type": "error" }, { "inputs": [], "name": "PreparationClosed", "type": "error" }, { "inputs": [], "name": "RenounceDisabled", "type": "error" }, { "inputs": [], "name": "UUPSUnauthorizedCallContext", "type": "error" }, { "inputs": [{ "internalType": "bytes32", "name": "slot", "type": "bytes32" }], "name": "UUPSUnsupportedProxiableUUID", "type": "error" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "allowed", "type": "bool" }], "name": "BackupCommitterSet", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint64", "name": "fromEpoch", "type": "uint64" }, { "indexed": true, "internalType": "bytes32", "name": "catalogHash", "type": "bytes32" }, { "indexed": false, "internalType": "uint8[]", "name": "recipes", "type": "uint8[]" }, { "indexed": false, "internalType": "address[]", "name": "signers", "type": "address[]" }], "name": "CatalogScheduled", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "previousCommitter", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newCommitter", "type": "address" }], "name": "CommitterChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint64", "name": "epochId", "type": "uint64" }, { "indexed": true, "internalType": "bytes32", "name": "epochHash", "type": "bytes32" }, { "indexed": false, "internalType": "bytes", "name": "packet", "type": "bytes" }], "name": "EpochCommitted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint64", "name": "version", "type": "uint64" }], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }], "name": "OwnershipTransferStarted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint8", "name": "recipe", "type": "uint8" }, { "indexed": true, "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "indexed": false, "internalType": "string", "name": "canonicalRequest", "type": "string" }, { "indexed": false, "internalType": "bytes", "name": "template", "type": "bytes" }, { "indexed": false, "internalType": "string", "name": "body", "type": "string" }], "name": "RecipeRegistered", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "implementation", "type": "address" }], "name": "Upgraded", "type": "event" }, { "inputs": [], "name": "EPOCH_DOMAIN", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "EPOCH_LENGTH", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "FALLBACK_DELAY_BLOCKS", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_ATTESTATION_AGE", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_BACKUP_COMMITTERS", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_BODY_BYTES", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_DATA_BYTES", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_PACKET_BYTES", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_RECIPES", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_REQUEST_BYTES", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_SOURCES", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_TEMPLATE_BYTES", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "RECIPE_DOMAIN", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "SELECT_DOMAIN", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "UPGRADE_INTERFACE_VERSION", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "backupCommitterCount", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "btcTradeSigner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }], "name": "catalogAt", "outputs": [{ "internalType": "bytes32", "name": "hash", "type": "bytes32" }, { "internalType": "uint8[]", "name": "recipes", "type": "uint8[]" }, { "internalType": "address[]", "name": "signers", "type": "address[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "catalogHash", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }], "name": "checkpointEpoch", "outputs": [{ "internalType": "bytes32", "name": "anchor", "type": "bytes32" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }, { "components": [{ "internalType": "uint256", "name": "timestamp", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" }, { "internalType": "bytes", "name": "signature", "type": "bytes" }], "internalType": "struct EpochEntropy.Attestation", "name": "a", "type": "tuple" }], "name": "commitEpoch", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }, { "internalType": "uint8", "name": "attempt", "type": "uint8" }, { "components": [{ "internalType": "uint256", "name": "timestamp", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" }, { "internalType": "bytes", "name": "signature", "type": "bytes" }], "internalType": "struct EpochEntropy.Attestation", "name": "a", "type": "tuple" }], "name": "commitEpochFallback", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "committer", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "name": "epochAnchors", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "number", "type": "uint256" }], "name": "epochForBlock", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }], "name": "epochStart", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ethTradeSigner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "ethereumBlockSigner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }, { "internalType": "uint8", "name": "attempt", "type": "uint8" }], "name": "fallbackOpensAt", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "firstEpochStart", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }], "name": "getEpoch", "outputs": [{ "components": [{ "internalType": "bytes32", "name": "epochHash", "type": "bytes32" }, { "internalType": "bytes32", "name": "catalogHash", "type": "bytes32" }, { "internalType": "bytes32", "name": "anchorHash", "type": "bytes32" }, { "internalType": "uint8", "name": "source", "type": "uint8" }, { "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "internalType": "bytes32", "name": "dataHash", "type": "bytes32" }, { "internalType": "bytes32", "name": "attestationHash", "type": "bytes32" }, { "internalType": "uint256", "name": "signedAt", "type": "uint256" }, { "internalType": "uint64", "name": "committedBlock", "type": "uint64" }], "internalType": "struct EpochEntropy.Epoch", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }, { "internalType": "uint8", "name": "attempt", "type": "uint8" }], "name": "getEpochFallbackSelection", "outputs": [{ "components": [{ "internalType": "uint8", "name": "source", "type": "uint8" }, { "internalType": "uint8", "name": "recipe", "type": "uint8" }, { "internalType": "address", "name": "airnode", "type": "address" }, { "internalType": "bytes32", "name": "selector", "type": "bytes32" }, { "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "internalType": "string", "name": "canonicalRequest", "type": "string" }], "internalType": "struct EpochEntropy.Selection", "name": "s", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }], "name": "getEpochSelection", "outputs": [{ "components": [{ "internalType": "uint8", "name": "source", "type": "uint8" }, { "internalType": "uint8", "name": "recipe", "type": "uint8" }, { "internalType": "address", "name": "airnode", "type": "address" }, { "internalType": "bytes32", "name": "selector", "type": "bytes32" }, { "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "internalType": "string", "name": "canonicalRequest", "type": "string" }], "internalType": "struct EpochEntropy.Selection", "name": "s", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint8", "name": "recipe", "type": "uint8" }], "name": "getRecipe", "outputs": [{ "internalType": "bytes32", "name": "queryHash", "type": "bytes32" }, { "internalType": "string", "name": "canonicalRequest", "type": "string" }, { "internalType": "bytes", "name": "template", "type": "bytes" }, { "internalType": "string", "name": "body", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "hyperliquidSigner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address[4]", "name": "signers", "type": "address[4]" }, { "internalType": "address", "name": "initialOwner", "type": "address" }, { "internalType": "address", "name": "initialCommitter", "type": "address" }], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "initializeRecipeRegistry", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], "name": "isAuthorizedCommitter", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], "name": "isBackupCommitter", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "number", "type": "uint256" }], "name": "nextEpochToPrepare", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pendingOwner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "proxiableUUID", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "recipeCount", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint8", "name": "recipe", "type": "uint8" }], "name": "recipeRequest", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "string", "name": "canonicalRequest", "type": "string" }, { "internalType": "bytes", "name": "template", "type": "bytes" }, { "internalType": "string", "name": "body", "type": "string" }], "name": "registerRecipe", "outputs": [{ "internalType": "uint8", "name": "recipe", "type": "uint8" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint8[]", "name": "recipes", "type": "uint8[]" }, { "internalType": "address[]", "name": "signers", "type": "address[]" }, { "internalType": "uint64", "name": "fromEpoch", "type": "uint64" }], "name": "scheduleCatalog", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "account", "type": "address" }, { "internalType": "bool", "name": "allowed", "type": "bool" }], "name": "setBackupCommitter", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "next", "type": "address" }], "name": "setCommitter", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "epochId", "type": "uint64" }], "name": "sourceCountAt", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newImplementation", "type": "address" }, { "internalType": "bytes", "name": "data", "type": "bytes" }], "name": "upgradeToAndCall", "outputs": [], "stateMutability": "payable", "type": "function" }];
|
package/dist/epoch.d.ts
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ContractRunner } from "ethers";
|
|
2
|
+
import { type ApiAttestation, type ApiRequest } from "./sources.js";
|
|
2
3
|
import { type VRFProof, type RequestContext } from "./verification.js";
|
|
3
4
|
import type { XY } from "./verification.js";
|
|
4
5
|
export declare const EPOCH_LENGTH = 200n;
|
|
5
6
|
export declare const MAX_ATTESTATION_AGE = 240n;
|
|
6
7
|
export declare const EPOCH_RECIPE_DOMAIN: string;
|
|
7
|
-
export
|
|
8
|
+
export declare const MAX_EPOCH_SOURCES = 10, FALLBACK_DELAY_BLOCKS = 20n;
|
|
9
|
+
export type EpochSigners = readonly string[];
|
|
8
10
|
export interface EpochCatalog {
|
|
9
11
|
signers: EpochSigners;
|
|
12
|
+
recipes?: readonly number[];
|
|
10
13
|
registry: string;
|
|
11
14
|
chainId: bigint;
|
|
12
15
|
firstEpochStart: bigint;
|
|
16
|
+
recipeBook?: EpochRecipeBook;
|
|
13
17
|
}
|
|
14
18
|
export interface EpochRecord {
|
|
15
19
|
epochHash: string;
|
|
@@ -32,55 +36,49 @@ export interface EpochProtocolConfiguration {
|
|
|
32
36
|
catalogHash: string;
|
|
33
37
|
firstEpochStart: bigint;
|
|
34
38
|
}
|
|
35
|
-
export declare
|
|
39
|
+
export declare const MAX_EPOCH_RECIPES = 256, MAX_RECIPE_REQUEST_BYTES = 1024, MAX_RECIPE_BODY_BYTES = 2048;
|
|
40
|
+
export interface EpochRecipe {
|
|
41
|
+
canonicalRequest: string;
|
|
42
|
+
template: string;
|
|
43
|
+
body: string;
|
|
44
|
+
}
|
|
45
|
+
export type EpochRecipeBook = {
|
|
46
|
+
readonly [recipe: number]: EpochRecipe | undefined;
|
|
47
|
+
};
|
|
48
|
+
export type EpochProvider = "hyperliquid" | "drpc" | "tickerlayer" | "nodary";
|
|
49
|
+
export interface BuiltinEpochRecipe extends EpochRecipe {
|
|
50
|
+
id: number;
|
|
51
|
+
provider: EpochProvider;
|
|
52
|
+
description: string;
|
|
53
|
+
request: ApiRequest;
|
|
54
|
+
}
|
|
55
|
+
export declare const BUILTIN_EPOCH_RECIPES: readonly BuiltinEpochRecipe[];
|
|
56
|
+
export declare const INITIAL_EPOCH_RECIPES: readonly number[];
|
|
57
|
+
export declare function validateEpochRecipe(recipe: EpochRecipe): void;
|
|
58
|
+
export declare function canonicalRequestOfBody(body: string): string;
|
|
59
|
+
export declare function readEpochRecipes(runner: ContractRunner, registry: string, ids: Iterable<number>): Promise<Record<number, EpochRecipe>>;
|
|
60
|
+
export declare function validateEpochData(template: string, data: string): void;
|
|
61
|
+
export declare function epochCatalogRecipes(catalog: Pick<EpochCatalog, "signers" | "recipes">): readonly number[];
|
|
62
|
+
export declare function epochRecipe(catalog: Pick<EpochCatalog, "recipeBook">, recipe: number): EpochRecipe;
|
|
63
|
+
export declare function epochCatalogHash(signers: EpochSigners, recipes?: readonly number[]): string;
|
|
64
|
+
export declare function resolveEpochCatalog(base: Omit<EpochCatalog, "signers" | "recipes">, view: {
|
|
65
|
+
hash: string;
|
|
66
|
+
recipes: readonly (number | bigint)[];
|
|
67
|
+
signers: readonly string[];
|
|
68
|
+
}): EpochCatalog;
|
|
36
69
|
export declare function epochStart(firstEpochStart: bigint, epochId: bigint): bigint;
|
|
37
70
|
export declare function epochForBlock(firstEpochStart: bigint, block: bigint): bigint;
|
|
38
|
-
export declare const FALLBACK_DELAY_BLOCKS = 20n, MAX_FALLBACK_ATTEMPT = 3;
|
|
39
71
|
export declare function fallbackOpensAt(firstEpochStart: bigint, epochId: bigint, attempt: number): bigint;
|
|
40
72
|
export declare function selectEpoch(catalog: EpochCatalog, epochId: bigint, anchorHash: string, attempt?: number): {
|
|
41
73
|
source: number;
|
|
74
|
+
recipe: number;
|
|
42
75
|
attempt: number;
|
|
43
76
|
airnode: string;
|
|
44
77
|
selector: string;
|
|
45
78
|
canonicalRequest: string;
|
|
46
79
|
queryHash: string;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
parameters: {
|
|
50
|
-
dex: string;
|
|
51
|
-
type?: undefined;
|
|
52
|
-
length?: undefined;
|
|
53
|
-
size?: undefined;
|
|
54
|
-
assetClass?: undefined;
|
|
55
|
-
symbol?: undefined;
|
|
56
|
-
};
|
|
57
|
-
responseProjection: {
|
|
58
|
-
symbol: string;
|
|
59
|
-
value: string;
|
|
60
|
-
};
|
|
61
|
-
} | {
|
|
62
|
-
operation: string;
|
|
63
|
-
parameters: {
|
|
64
|
-
type: string;
|
|
65
|
-
length: number;
|
|
66
|
-
size: number;
|
|
67
|
-
dex?: undefined;
|
|
68
|
-
assetClass?: undefined;
|
|
69
|
-
symbol?: undefined;
|
|
70
|
-
};
|
|
71
|
-
responseProjection?: undefined;
|
|
72
|
-
} | {
|
|
73
|
-
operation: string;
|
|
74
|
-
parameters: {
|
|
75
|
-
assetClass: string;
|
|
76
|
-
symbol: string;
|
|
77
|
-
dex?: undefined;
|
|
78
|
-
type?: undefined;
|
|
79
|
-
length?: undefined;
|
|
80
|
-
size?: undefined;
|
|
81
|
-
};
|
|
82
|
-
responseProjection?: undefined;
|
|
83
|
-
};
|
|
80
|
+
template: string;
|
|
81
|
+
body: string;
|
|
84
82
|
};
|
|
85
83
|
export declare function verifyEpochAttestation(selected: ReturnType<typeof selectEpoch>, a: ApiAttestation, commitTimestamp: bigint): {
|
|
86
84
|
dataHash: string;
|
|
@@ -106,48 +104,14 @@ export declare function replayEpochCommitment(input: {
|
|
|
106
104
|
epochHash: string;
|
|
107
105
|
selected: {
|
|
108
106
|
source: number;
|
|
107
|
+
recipe: number;
|
|
109
108
|
attempt: number;
|
|
110
109
|
airnode: string;
|
|
111
110
|
selector: string;
|
|
112
111
|
canonicalRequest: string;
|
|
113
112
|
queryHash: string;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
parameters: {
|
|
117
|
-
dex: string;
|
|
118
|
-
type?: undefined;
|
|
119
|
-
length?: undefined;
|
|
120
|
-
size?: undefined;
|
|
121
|
-
assetClass?: undefined;
|
|
122
|
-
symbol?: undefined;
|
|
123
|
-
};
|
|
124
|
-
responseProjection: {
|
|
125
|
-
symbol: string;
|
|
126
|
-
value: string;
|
|
127
|
-
};
|
|
128
|
-
} | {
|
|
129
|
-
operation: string;
|
|
130
|
-
parameters: {
|
|
131
|
-
type: string;
|
|
132
|
-
length: number;
|
|
133
|
-
size: number;
|
|
134
|
-
dex?: undefined;
|
|
135
|
-
assetClass?: undefined;
|
|
136
|
-
symbol?: undefined;
|
|
137
|
-
};
|
|
138
|
-
responseProjection?: undefined;
|
|
139
|
-
} | {
|
|
140
|
-
operation: string;
|
|
141
|
-
parameters: {
|
|
142
|
-
assetClass: string;
|
|
143
|
-
symbol: string;
|
|
144
|
-
dex?: undefined;
|
|
145
|
-
type?: undefined;
|
|
146
|
-
length?: undefined;
|
|
147
|
-
size?: undefined;
|
|
148
|
-
};
|
|
149
|
-
responseProjection?: undefined;
|
|
150
|
-
};
|
|
113
|
+
template: string;
|
|
114
|
+
body: string;
|
|
151
115
|
};
|
|
152
116
|
};
|
|
153
117
|
export declare function epochProtocolConfigurationHash(c: EpochProtocolConfiguration): string;
|