UNPKG

@exromany/lido-csm-sdk

Version:

[![GitHub license](https://img.shields.io/github/license/lidofinance/lido-csm-sdk?color=limegreen)](https://github.com/lidofinance/lido-csm-sdk/blob/main/LICENSE.txt) [![Version npm](https://img.shields.io/npm/v/@lidofinance/lido-csm-sdk?label=version)](h

1,409 lines 54.7 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VerifierAbi = void 0; exports.VerifierAbi = [ { type: 'constructor', inputs: [ { name: 'withdrawalAddress', type: 'address', internalType: 'address' }, { name: 'module', type: 'address', internalType: 'address' }, { name: 'slotsPerEpoch', type: 'uint64', internalType: 'uint64' }, { name: 'slotsPerHistoricalRoot', type: 'uint64', internalType: 'uint64' }, { name: 'gindices', type: 'tuple', internalType: 'struct IVerifier.GIndices', components: [ { name: 'gIFirstWithdrawalPrev', type: 'bytes32', internalType: 'GIndex' }, { name: 'gIFirstWithdrawalCurr', type: 'bytes32', internalType: 'GIndex' }, { name: 'gIFirstValidatorPrev', type: 'bytes32', internalType: 'GIndex' }, { name: 'gIFirstValidatorCurr', type: 'bytes32', internalType: 'GIndex' }, { name: 'gIFirstHistoricalSummaryPrev', type: 'bytes32', internalType: 'GIndex' }, { name: 'gIFirstHistoricalSummaryCurr', type: 'bytes32', internalType: 'GIndex' }, { name: 'gIFirstBlockRootInSummaryPrev', type: 'bytes32', internalType: 'GIndex' }, { name: 'gIFirstBlockRootInSummaryCurr', type: 'bytes32', internalType: 'GIndex' }, { name: 'gIFirstBalanceNodePrev', type: 'bytes32', internalType: 'GIndex' }, { name: 'gIFirstBalanceNodeCurr', type: 'bytes32', internalType: 'GIndex' }, { name: 'gIFirstPendingConsolidationPrev', type: 'bytes32', internalType: 'GIndex' }, { name: 'gIFirstPendingConsolidationCurr', type: 'bytes32', internalType: 'GIndex' } ] }, { name: 'firstSupportedSlot', type: 'uint64', internalType: 'Slot' }, { name: 'pivotSlot', type: 'uint64', internalType: 'Slot' }, { name: 'capellaSlot', type: 'uint64', internalType: 'Slot' }, { name: 'admin', type: 'address', internalType: 'address' } ], stateMutability: 'nonpayable' }, { type: 'function', name: 'BEACON_ROOTS', inputs: [], outputs: [ { name: '', type: 'address', internalType: 'address' } ], stateMutability: 'view' }, { type: 'function', name: 'CAPELLA_SLOT', inputs: [], outputs: [ { name: '', type: 'uint64', internalType: 'Slot' } ], stateMutability: 'view' }, { type: 'function', name: 'DEFAULT_ADMIN_ROLE', inputs: [], outputs: [ { name: '', type: 'bytes32', internalType: 'bytes32' } ], stateMutability: 'view' }, { type: 'function', name: 'FIRST_SUPPORTED_SLOT', inputs: [], outputs: [ { name: '', type: 'uint64', internalType: 'Slot' } ], stateMutability: 'view' }, { type: 'function', name: 'GI_FIRST_BALANCES_NODE_CURR', inputs: [], outputs: [ { name: '', type: 'bytes32', internalType: 'GIndex' } ], stateMutability: 'view' }, { type: 'function', name: 'GI_FIRST_BALANCES_NODE_PREV', inputs: [], outputs: [ { name: '', type: 'bytes32', internalType: 'GIndex' } ], stateMutability: 'view' }, { type: 'function', name: 'GI_FIRST_BLOCK_ROOT_IN_SUMMARY_CURR', inputs: [], outputs: [ { name: '', type: 'bytes32', internalType: 'GIndex' } ], stateMutability: 'view' }, { type: 'function', name: 'GI_FIRST_BLOCK_ROOT_IN_SUMMARY_PREV', inputs: [], outputs: [ { name: '', type: 'bytes32', internalType: 'GIndex' } ], stateMutability: 'view' }, { type: 'function', name: 'GI_FIRST_HISTORICAL_SUMMARY_CURR', inputs: [], outputs: [ { name: '', type: 'bytes32', internalType: 'GIndex' } ], stateMutability: 'view' }, { type: 'function', name: 'GI_FIRST_HISTORICAL_SUMMARY_PREV', inputs: [], outputs: [ { name: '', type: 'bytes32', internalType: 'GIndex' } ], stateMutability: 'view' }, { type: 'function', name: 'GI_FIRST_PENDING_CONSOLIDATION_CURR', inputs: [], outputs: [ { name: '', type: 'bytes32', internalType: 'GIndex' } ], stateMutability: 'view' }, { type: 'function', name: 'GI_FIRST_PENDING_CONSOLIDATION_PREV', inputs: [], outputs: [ { name: '', type: 'bytes32', internalType: 'GIndex' } ], stateMutability: 'view' }, { type: 'function', name: 'GI_FIRST_VALIDATOR_CURR', inputs: [], outputs: [ { name: '', type: 'bytes32', internalType: 'GIndex' } ], stateMutability: 'view' }, { type: 'function', name: 'GI_FIRST_VALIDATOR_PREV', inputs: [], outputs: [ { name: '', type: 'bytes32', internalType: 'GIndex' } ], stateMutability: 'view' }, { type: 'function', name: 'GI_FIRST_WITHDRAWAL_CURR', inputs: [], outputs: [ { name: '', type: 'bytes32', internalType: 'GIndex' } ], stateMutability: 'view' }, { type: 'function', name: 'GI_FIRST_WITHDRAWAL_PREV', inputs: [], outputs: [ { name: '', type: 'bytes32', internalType: 'GIndex' } ], stateMutability: 'view' }, { type: 'function', name: 'MODULE', inputs: [], outputs: [ { name: '', type: 'address', internalType: 'contract IBaseModule' } ], stateMutability: 'view' }, { type: 'function', name: 'PAUSE_INFINITELY', inputs: [], outputs: [ { name: '', type: 'uint256', internalType: 'uint256' } ], stateMutability: 'view' }, { type: 'function', name: 'PAUSE_ROLE', inputs: [], outputs: [ { name: '', type: 'bytes32', internalType: 'bytes32' } ], stateMutability: 'view' }, { type: 'function', name: 'PIVOT_SLOT', inputs: [], outputs: [ { name: '', type: 'uint64', internalType: 'Slot' } ], stateMutability: 'view' }, { type: 'function', name: 'RESUME_ROLE', inputs: [], outputs: [ { name: '', type: 'bytes32', internalType: 'bytes32' } ], stateMutability: 'view' }, { type: 'function', name: 'SLOTS_PER_EPOCH', inputs: [], outputs: [ { name: '', type: 'uint64', internalType: 'uint64' } ], stateMutability: 'view' }, { type: 'function', name: 'SLOTS_PER_HISTORICAL_ROOT', inputs: [], outputs: [ { name: '', type: 'uint64', internalType: 'uint64' } ], stateMutability: 'view' }, { type: 'function', name: 'WITHDRAWAL_ADDRESS', inputs: [], outputs: [ { name: '', type: 'address', internalType: 'address' } ], stateMutability: 'view' }, { type: 'function', name: 'getResumeSinceTimestamp', inputs: [], outputs: [ { name: '', type: 'uint256', internalType: 'uint256' } ], stateMutability: 'view' }, { type: 'function', name: 'getRoleAdmin', inputs: [ { name: 'role', type: 'bytes32', internalType: 'bytes32' } ], outputs: [ { name: '', type: 'bytes32', internalType: 'bytes32' } ], stateMutability: 'view' }, { type: 'function', name: 'getRoleMember', inputs: [ { name: 'role', type: 'bytes32', internalType: 'bytes32' }, { name: 'index', type: 'uint256', internalType: 'uint256' } ], outputs: [ { name: '', type: 'address', internalType: 'address' } ], stateMutability: 'view' }, { type: 'function', name: 'getRoleMemberCount', inputs: [ { name: 'role', type: 'bytes32', internalType: 'bytes32' } ], outputs: [ { name: '', type: 'uint256', internalType: 'uint256' } ], stateMutability: 'view' }, { type: 'function', name: 'grantRole', inputs: [ { name: 'role', type: 'bytes32', internalType: 'bytes32' }, { name: 'account', type: 'address', internalType: 'address' } ], outputs: [], stateMutability: 'nonpayable' }, { type: 'function', name: 'hasRole', inputs: [ { name: 'role', type: 'bytes32', internalType: 'bytes32' }, { name: 'account', type: 'address', internalType: 'address' } ], outputs: [ { name: '', type: 'bool', internalType: 'bool' } ], stateMutability: 'view' }, { type: 'function', name: 'isPaused', inputs: [], outputs: [ { name: '', type: 'bool', internalType: 'bool' } ], stateMutability: 'view' }, { type: 'function', name: 'pauseFor', inputs: [ { name: 'duration', type: 'uint256', internalType: 'uint256' } ], outputs: [], stateMutability: 'nonpayable' }, { type: 'function', name: 'processConsolidation', inputs: [ { name: 'data', type: 'tuple', internalType: 'struct IVerifier.ProcessConsolidationInput', components: [ { name: 'consolidation', type: 'tuple', internalType: 'struct IVerifier.PendingConsolidationWitness', components: [ { name: 'object', type: 'tuple', internalType: 'struct PendingConsolidation', components: [ { name: 'sourceIndex', type: 'uint64', internalType: 'uint64' }, { name: 'targetIndex', type: 'uint64', internalType: 'uint64' } ] }, { name: 'offset', type: 'uint64', internalType: 'uint64' }, { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' } ] }, { name: 'validator', type: 'tuple', internalType: 'struct IVerifier.ValidatorWitness', components: [ { name: 'index', type: 'uint64', internalType: 'uint64' }, { name: 'nodeOperatorId', type: 'uint32', internalType: 'uint32' }, { name: 'keyIndex', type: 'uint32', internalType: 'uint32' }, { name: 'object', type: 'tuple', internalType: 'struct Validator', components: [ { name: 'pubkey', type: 'bytes', internalType: 'bytes' }, { name: 'withdrawalCredentials', type: 'bytes32', internalType: 'bytes32' }, { name: 'effectiveBalance', type: 'uint64', internalType: 'uint64' }, { name: 'slashed', type: 'bool', internalType: 'bool' }, { name: 'activationEligibilityEpoch', type: 'uint64', internalType: 'uint64' }, { name: 'activationEpoch', type: 'uint64', internalType: 'uint64' }, { name: 'exitEpoch', type: 'uint64', internalType: 'uint64' }, { name: 'withdrawableEpoch', type: 'uint64', internalType: 'uint64' } ] }, { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' } ] }, { name: 'balance', type: 'tuple', internalType: 'struct IVerifier.BalanceWitness', components: [ { name: 'node', type: 'bytes32', internalType: 'bytes32' }, { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' } ] }, { name: 'recentBlock', type: 'tuple', internalType: 'struct IVerifier.RecentHeaderWitness', components: [ { name: 'header', type: 'tuple', internalType: 'struct BeaconBlockHeader', components: [ { name: 'slot', type: 'uint64', internalType: 'Slot' }, { name: 'proposerIndex', type: 'uint64', internalType: 'uint64' }, { name: 'parentRoot', type: 'bytes32', internalType: 'bytes32' }, { name: 'stateRoot', type: 'bytes32', internalType: 'bytes32' }, { name: 'bodyRoot', type: 'bytes32', internalType: 'bytes32' } ] }, { name: 'rootsTimestamp', type: 'uint64', internalType: 'uint64' } ] }, { name: 'consolidationBlock', type: 'tuple', internalType: 'struct IVerifier.HistoricalHeaderWitness', components: [ { name: 'header', type: 'tuple', internalType: 'struct BeaconBlockHeader', components: [ { name: 'slot', type: 'uint64', internalType: 'Slot' }, { name: 'proposerIndex', type: 'uint64', internalType: 'uint64' }, { name: 'parentRoot', type: 'bytes32', internalType: 'bytes32' }, { name: 'stateRoot', type: 'bytes32', internalType: 'bytes32' }, { name: 'bodyRoot', type: 'bytes32', internalType: 'bytes32' } ] }, { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' } ] } ] } ], outputs: [], stateMutability: 'nonpayable' }, { type: 'function', name: 'processHistoricalWithdrawalProof', inputs: [ { name: 'data', type: 'tuple', internalType: 'struct IVerifier.ProcessHistoricalWithdrawalInput', components: [ { name: 'withdrawal', type: 'tuple', internalType: 'struct IVerifier.WithdrawalWitness', components: [ { name: 'offset', type: 'uint8', internalType: 'uint8' }, { name: 'object', type: 'tuple', internalType: 'struct Withdrawal', components: [ { name: 'index', type: 'uint64', internalType: 'uint64' }, { name: 'validatorIndex', type: 'uint64', internalType: 'uint64' }, { name: 'withdrawalAddress', type: 'address', internalType: 'address' }, { name: 'amount', type: 'uint64', internalType: 'uint64' } ] }, { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' } ] }, { name: 'validator', type: 'tuple', internalType: 'struct IVerifier.ValidatorWitness', components: [ { name: 'index', type: 'uint64', internalType: 'uint64' }, { name: 'nodeOperatorId', type: 'uint32', internalType: 'uint32' }, { name: 'keyIndex', type: 'uint32', internalType: 'uint32' }, { name: 'object', type: 'tuple', internalType: 'struct Validator', components: [ { name: 'pubkey', type: 'bytes', internalType: 'bytes' }, { name: 'withdrawalCredentials', type: 'bytes32', internalType: 'bytes32' }, { name: 'effectiveBalance', type: 'uint64', internalType: 'uint64' }, { name: 'slashed', type: 'bool', internalType: 'bool' }, { name: 'activationEligibilityEpoch', type: 'uint64', internalType: 'uint64' }, { name: 'activationEpoch', type: 'uint64', internalType: 'uint64' }, { name: 'exitEpoch', type: 'uint64', internalType: 'uint64' }, { name: 'withdrawableEpoch', type: 'uint64', internalType: 'uint64' } ] }, { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' } ] }, { name: 'recentBlock', type: 'tuple', internalType: 'struct IVerifier.RecentHeaderWitness', components: [ { name: 'header', type: 'tuple', internalType: 'struct BeaconBlockHeader', components: [ { name: 'slot', type: 'uint64', internalType: 'Slot' }, { name: 'proposerIndex', type: 'uint64', internalType: 'uint64' }, { name: 'parentRoot', type: 'bytes32', internalType: 'bytes32' }, { name: 'stateRoot', type: 'bytes32', internalType: 'bytes32' }, { name: 'bodyRoot', type: 'bytes32', internalType: 'bytes32' } ] }, { name: 'rootsTimestamp', type: 'uint64', internalType: 'uint64' } ] }, { name: 'withdrawalBlock', type: 'tuple', internalType: 'struct IVerifier.HistoricalHeaderWitness', components: [ { name: 'header', type: 'tuple', internalType: 'struct BeaconBlockHeader', components: [ { name: 'slot', type: 'uint64', internalType: 'Slot' }, { name: 'proposerIndex', type: 'uint64', internalType: 'uint64' }, { name: 'parentRoot', type: 'bytes32', internalType: 'bytes32' }, { name: 'stateRoot', type: 'bytes32', internalType: 'bytes32' }, { name: 'bodyRoot', type: 'bytes32', internalType: 'bytes32' } ] }, { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' } ] } ] } ], outputs: [], stateMutability: 'nonpayable' }, { type: 'function', name: 'processSlashedProof', inputs: [ { name: 'data', type: 'tuple', internalType: 'struct IVerifier.ProcessSlashedInput', components: [ { name: 'validator', type: 'tuple', internalType: 'struct IVerifier.ValidatorWitness', components: [ { name: 'index', type: 'uint64', internalType: 'uint64' }, { name: 'nodeOperatorId', type: 'uint32', internalType: 'uint32' }, { name: 'keyIndex', type: 'uint32', internalType: 'uint32' }, { name: 'object', type: 'tuple', internalType: 'struct Validator', components: [ { name: 'pubkey', type: 'bytes', internalType: 'bytes' }, { name: 'withdrawalCredentials', type: 'bytes32', internalType: 'bytes32' }, { name: 'effectiveBalance', type: 'uint64', internalType: 'uint64' }, { name: 'slashed', type: 'bool', internalType: 'bool' }, { name: 'activationEligibilityEpoch', type: 'uint64', internalType: 'uint64' }, { name: 'activationEpoch', type: 'uint64', internalType: 'uint64' }, { name: 'exitEpoch', type: 'uint64', internalType: 'uint64' }, { name: 'withdrawableEpoch', type: 'uint64', internalType: 'uint64' } ] }, { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' } ] }, { name: 'recentBlock', type: 'tuple', internalType: 'struct IVerifier.RecentHeaderWitness', components: [ { name: 'header', type: 'tuple', internalType: 'struct BeaconBlockHeader', components: [ { name: 'slot', type: 'uint64', internalType: 'Slot' }, { name: 'proposerIndex', type: 'uint64', internalType: 'uint64' }, { name: 'parentRoot', type: 'bytes32', internalType: 'bytes32' }, { name: 'stateRoot', type: 'bytes32', internalType: 'bytes32' }, { name: 'bodyRoot', type: 'bytes32', internalType: 'bytes32' } ] }, { name: 'rootsTimestamp', type: 'uint64', internalType: 'uint64' } ] } ] } ], outputs: [], stateMutability: 'nonpayable' }, { type: 'function', name: 'processWithdrawalProof', inputs: [ { name: 'data', type: 'tuple', internalType: 'struct IVerifier.ProcessWithdrawalInput', components: [ { name: 'withdrawal', type: 'tuple', internalType: 'struct IVerifier.WithdrawalWitness', components: [ { name: 'offset', type: 'uint8', internalType: 'uint8' }, { name: 'object', type: 'tuple', internalType: 'struct Withdrawal', components: [ { name: 'index', type: 'uint64', internalType: 'uint64' }, { name: 'validatorIndex', type: 'uint64', internalType: 'uint64' }, { name: 'withdrawalAddress', type: 'address', internalType: 'address' }, { name: 'amount', type: 'uint64', internalType: 'uint64' } ] }, { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' } ] }, { name: 'validator', type: 'tuple', internalType: 'struct IVerifier.ValidatorWitness', components: [ { name: 'index', type: 'uint64', internalType: 'uint64' }, { name: 'nodeOperatorId', type: 'uint32', internalType: 'uint32' }, { name: 'keyIndex', type: 'uint32', internalType: 'uint32' }, { name: 'object', type: 'tuple', internalType: 'struct Validator', components: [ { name: 'pubkey', type: 'bytes', internalType: 'bytes' }, { name: 'withdrawalCredentials', type: 'bytes32', internalType: 'bytes32' }, { name: 'effectiveBalance', type: 'uint64', internalType: 'uint64' }, { name: 'slashed', type: 'bool', internalType: 'bool' }, { name: 'activationEligibilityEpoch', type: 'uint64', internalType: 'uint64' }, { name: 'activationEpoch', type: 'uint64', internalType: 'uint64' }, { name: 'exitEpoch', type: 'uint64', internalType: 'uint64' }, { name: 'withdrawableEpoch', type: 'uint64', internalType: 'uint64' } ] }, { name: 'proof', type: 'bytes32[]', internalType: 'bytes32[]' } ] }, { name: 'withdrawalBlock', type: 'tuple', internalType: 'struct IVerifier.RecentHeaderWitness', components: [ { name: 'header', type: 'tuple', internalType: 'struct BeaconBlockHeader', components: [ { name: 'slot', type: 'uint64', internalType: 'Slot' }, { name: 'proposerIndex', type: 'uint64', internalType: 'uint64' }, { name: 'parentRoot', type: 'bytes32', internalType: 'bytes32' }, { name: 'stateRoot', type: 'bytes32', internalType: 'bytes32' }, { name: 'bodyRoot', type: 'bytes32', internalType: 'bytes32' } ] }, { name: 'rootsTimestamp', type: 'uint64', internalType: 'uint64' } ] } ] } ], outputs: [], stateMutability: 'nonpayable' }, { type: 'function', name: 'renounceRole', inputs: [ { name: 'role', type: 'bytes32', internalType: 'bytes32' }, { name: 'callerConfirmation', type: 'address', internalType: 'address' } ], outputs: [], stateMutability: 'nonpayable' }, { type: 'function', name: 'resume', inputs: [], outputs: [], stateMutability: 'nonpayable' }, { type: 'function', name: 'revokeRole', inputs: [ { name: 'role', type: 'bytes32', internalType: 'bytes32' }, { name: 'account', type: 'address', internalType: 'address' } ], outputs: [], stateMutability: 'nonpayable' }, { type: 'function', name: 'supportsInterface', inputs: [ { name: 'interfaceId', type: 'bytes4', internalType: 'bytes4' } ], outputs: [ { name: '', type: 'bool', internalType: 'bool' } ], stateMutability: 'view' }, { type: 'event', name: 'Paused', inputs: [ { name: 'duration', type: 'uint256', indexed: false, internalType: 'uint256' } ], anonymous: false }, { type: 'event', name: '