Versions in this module Expand all Collapse all v0 v0.4.3 Jul 29, 2024 Changes in this version type OperatorFromApi + func MustGetOperatorDetail(network string, id uint64) (*OperatorFromApi, error) v0.4.2 Oct 13, 2023 Changes in this version + func BatchGetOperatorsOnChain(multicaller *multicall.Caller, ssvNetworkViewsContractAddress common.Address, ...) (map[uint64]*OperatorInfoOnChain, error) + type OperatorFromApi struct + AddressWhitelist string + DeclaredFee string + Description string + DkgAddress string + Eth1NodeClient string + Eth2NodeClient string + Fee string + ID int + IDStr string + IsActive int + IsDeleted bool + IsValid bool + LinkedinURL string + Location string + Logo string + MevRelays string + Name string + Network string + OwnerAddress string + Performance struct{ ... } + PreviousFee string + PublicKey string + SetupProvider string + Status string + TwitterURL string + Type string + ValidatorsCount int + Version string + WebsiteURL string + func GetAllSsvOperatorsFromApi(network string) ([]OperatorFromApi, error) + func GetOperatorFromApi(network string, id uint64) (*OperatorFromApi, error) + type OperatorInfoOnChain struct + Fee *big.Int + IsActive bool + IsPrivete bool + Owner common.Address + ValidatorCount uint32 + WhiteList common.Address + type RspError struct + Code int + Message struct{ ... } + type RspSsvOperator struct + Error RspError + type RspSsvOperators struct + Error RspError + Operators []OperatorFromApi + Pagination struct{ ... } v0.4.1 Sep 8, 2023 v0.4.0 Sep 7, 2023 v0.3.1 Aug 24, 2023 v0.3.0 Aug 24, 2023 v0.2.3 Aug 18, 2023 v0.2.2 Aug 16, 2023 v0.2.1 Aug 15, 2023 v0.2.0 Aug 15, 2023 Changes in this version + func EventTopics(a abi.ABI, names ...string) ([]common.Hash, error) + func UnpackEvent(a abi.ABI, v interface{}, name string, data []byte, topics []common.Hash) error + type SsvValidator struct + Cluster string + Error struct{ ... } + IsDeleted bool + IsOperatorsValid bool + IsPublicKeyValid bool + IsSharesValid bool + IsValid bool + Network string + Operators []struct{ ... } + OwnerAddress string + PublicKey string + Status string + ValidatorInfo struct{ ... } + Version string + func GetValidator(network, pubkey string) (*SsvValidator, error) v0.1.0 Aug 2, 2023 Changes in this version + const CodeAddressNotExist + const CodeInternalErr + const CodeParamErr + const CodeParamParseErr + const CodePriceEmptyErr + const CodeStakerUnstakingPlanExist + const CodeSymbolErr + const CodeValidatorNotExist + const DefaultPageSize + const DevRewardV1EndEpoch + const DevTheMergeBlockNumber + const DevTheMergeEpoch + const DropRate10 + const DropRate4 + const DropRate7 + const EjectorUptimeInterval + const FeePool + const MaxDistributeWaitEpoch + const MaxDistributeWaitSeconds + const MaxPageSize + const MaxPartialWithdrawalAmount + const MetaTypeEth1BlockSyncer + const MetaTypeEth2BlockSyncer + const MetaTypeEth2NodeBalanceCollector + const MetaTypeEth2ValidatorBalanceSyncer + const MetaTypeEth2ValidatorInfoSyncer + const MetaTypeV1ValidatorSyncer + const MinValidatorWithdrawabilityDelay + const NodeClaimTypeClaimDeposit + const NodeClaimTypeClaimReward + const NodeClaimTypeClaimTotal + const NodeClaimTypeNone + const NodeDepositAmount0 + const NodeDepositAmount12 + const NodeDepositAmount4 + const NodeDepositAmount8 + const NodeTypeCommon + const NodeTypeLight + const NodeTypeSuper + const NodeTypeTrust + const OfficialSlashAmount + const RetryInterval + const RetryLimit + const RewardEpochInterval + const RewardV1EndEpoch + const SlashStartEpoch + const SlashTypeAttesterMiss + const SlashTypeAttesterSlash + const SlashTypeFeeRecipient + const SlashTypeNotExitSlash + const SlashTypeProposerMiss + const SlashTypeProposerSlash + const SlashTypeSyncMiss + const StakerWithdrawalClaimableTimestamp + const StandardEffectiveBalance + const StandardSuperNodeFakeDepositBalance + const SuperNodeFeePool + const SymbolAtom + const SymbolDot + const SymbolEth + const SymbolFis + const SymbolKsm + const TheMergeBlockNumber + const TheMergeEpoch + const TheMergeSlot + const ValidatorEverSlashedFalse + const ValidatorEverSlashedTrue + const ValidatorStatusActive + const ValidatorStatusActiveSlash + const ValidatorStatusDeposited + const ValidatorStatusDistributed + const ValidatorStatusDistributedSlash + const ValidatorStatusExited + const ValidatorStatusExitedSlash + const ValidatorStatusOffBoard + const ValidatorStatusOffBoardCanWithdraw + const ValidatorStatusOffBoardWithdrawed + const ValidatorStatusStaked + const ValidatorStatusUnInitial + const ValidatorStatusWaiting + const ValidatorStatusWithdrawDone + const ValidatorStatusWithdrawDoneSlash + const ValidatorStatusWithdrawMatch + const ValidatorStatusWithdrawUnmatch + const ValidatorStatusWithdrawable + const ValidatorStatusWithdrawableSlash + var CacheIsDev bool + var CacheREthTotalApy float64 + var CacheRewardV1EndEpoch uint64 + var CacheRunClientStartTimestamp uint64 + var CacheSlashStartEpoch uint64 + var CacheUnstakingStartTimestamp uint64 + var CacheValidatorAverageApr float64 + var GweiDeci = decimal.NewFromInt(1e9) + var NodeFeeV1Deci = decimal.NewFromFloat(0.1) + var OldRethSupply = new(big.Int).SetString("25642334000000000000", 10) + var OneWeekSeconds = 7 * 24 * 60 * 60 + var Percent5Deci = decimal.NewFromFloat(0.05) + var Percent90Deci = decimal.NewFromFloat(0.9) + var PlatformFeeV1Deci = decimal.NewFromFloat(0.1) + var ShutdownRequestChannel = make(chan struct{}) + func AddOneDay(day string) (string, error) + func AddPrefix(value string) string + func AppendToFile(filePath, content string) error + func Bytes1(val uint64) []byte + func Bytes16(x uint64) []byte + func Bytes2(val uint64) []byte + func Bytes32(x uint64) []byte + func Bytes4(x uint64) []byte + func Bytes64(x uint64) []byte + func Bytes8(x uint64) []byte + func ContractStorageKey(name string) [32]byte + func DistributeFeeProposalNodeKey(sender common.Address, ...) [32]byte + func DistributeSuperNodeFeeProposalNodeKey(sender common.Address, ...) [32]byte + func DistributeWithdrawalsProposalNodeKey(sender common.Address, ...) [32]byte + func EndSlotOfEpoch(config beacon.Eth2Config, epoch uint64) uint64 + func EpochAtTimestamp(config beacon.Eth2Config, time uint64) uint64 + func Err(c *gin.Context, status, msg string) + func FloatToStr(f float64) string + func FromHexString(data string) ([]byte, error) + func GetContractAddress(storage *storage.Storage, name string) (common.Address, error) + func GetDropRate(startDayStr, nowDayStr string) (string, error) + func GetDropRateFromTimestamp(startDay, stamp string) (string, error) + func GetGaspriceFromBeacon() (base uint64, err error) + func GetGaspriceFromEthgasstation() (base, priority uint64, err error) + func GetNewDayUtc8Seconds() int64 + func GetNodeManagedEth(nodeDeposit, balance uint64, status uint8) uint64 + func GetNowUTC8Date() string + func GetPriceFromCoinGecko(url string) (map[string]float64, error) + func GetPriceFromCoinMarket(url string) (map[string]float64, error) + func GetSwapHash(swapType, sender string, created int64) string + func GetUserNodePlatformRewardV1(nodeDepositAmount uint64, rewardDeci decimal.Decimal) (decimal.Decimal, decimal.Decimal, decimal.Decimal) + func GetUserNodePlatformRewardV2(nodeDepositAmount uint64, rewardDeci decimal.Decimal) (decimal.Decimal, decimal.Decimal, decimal.Decimal) + func GetUserValPlatformDepositAndRewardV1(validatorBalance, nodeDepositAmount uint64, ...) (uint64, uint64, uint64, uint64, uint64) + func GetValidatorTotalReward(balance, totalWithdrawal, totalFee uint64) uint64 + func GetYesterdayUTC8Date() string + func IsImageExt(extName string) bool + func NodeSubmissionKey(sender common.Address, _block *big.Int, _totalEth *big.Int, ...) [32]byte + func Ok(c *gin.Context, msg string, data interface{}) + func PriceSymbolValid(symbol string) bool + func ReadLastLine(filePath string) (string, error) + func RemovePrefix(value string) string + func ReserveEthForWithdrawProposalId(cycle *big.Int) [32]byte + func SafeGo(x func()) + func SafeGoWithRestart(x func()) + func ShutdownListener() context.Context + func Stack(skip int) []byte + func StafiDistributorProposalNodeKey(sender common.Address, proposalId [32]byte) [32]byte + func StafiWithdrawProposalNodeKey(sender common.Address, proposalId [32]byte) [32]byte + func StartSlotOfEpoch(config beacon.Eth2Config, epoch uint64) uint64 + func StartTimestampOfEpoch(config beacon.Eth2Config, epoch uint64) uint64 + func StrToFloat(str string) float64 + func StrToInt64(str string) (int64, error) + func SubOneDay(day string) (string, error) + func SymbolValid(symbol string) bool + func TimestampOfSlot(config beacon.Eth2Config, slot uint64) uint64 + func ToBytes16(val []byte) [16]byte + func ToBytes32(val []byte) [32]byte + func ToBytes48(val []byte) [48]byte + func ToBytes64(val []byte) [64]byte + func ToBytes8(val []byte) [8]byte + func ToBytes96(val []byte) [96]byte + func ToUpperList(list []string) []string + func Uuid() string + func VerifyProof(leafNode NodeHash, proof []NodeHash, root NodeHash) bool + func WaitTxOkCommon(client *ethclient.Client, txHash common.Hash) (err error) + func XOR(data []byte) []byte + type CoinGeckeoPrice struct + Usd float64 + type MerkleTree struct + func NewMerkleTree(nodeHashList NodeHashList) *MerkleTree + func (m *MerkleTree) GetLayers() [][]*Node + func (m *MerkleTree) GetProof(leafNodeHash NodeHash) ([]NodeHash, error) + func (m *MerkleTree) GetRootHash() (hash NodeHash, err error) + type Node struct + Hash NodeHash + Parent *Node + func (n *Node) String() string + type NodeHash []byte + func ConbinedHash(b0, b1 NodeHash) NodeHash + func GetNodeHash(index *big.Int, account common.Address, rewardAmount, depositAmount *big.Int) NodeHash + func NodeHashFromHexString(hexStr string) (NodeHash, error) + func (nodeHash *NodeHash) String() string + type NodeHashList []NodeHash + func (nodeHashList NodeHashList) Len() int + func (nodeHashList NodeHashList) Less(i, j int) bool + func (nodeHashList NodeHashList) Swap(i, j int) + type OperatorDetail struct + DeclaredFee string + Description string + Error struct{ ... } + Eth1NodeClient string + Eth2NodeClient string + Fee string + ID uint64 + IDStr string + IsActive int + IsDeleted bool + IsValid bool + LinkedinURL string + Location string + Logo string + Name string + Network string + OwnerAddress string + Performance struct{ ... } + PreviousFee string + PublicKey string + SetupProvider string + Status string + TwitterURL string + Type string + ValidatorsCount int + Version string + WebsiteURL string + func GetOperatorDetail(network string, id uint64) (*OperatorDetail, error) + type ResGasPrice struct + BaseFee int + BlockNumber int + BlockTime float64 + GasPrice struct{ ... } + NextBaseFee int + PriorityFee struct{ ... } + type ResGasPriceFromBeacon struct + Code int + Data struct{ ... } + type Rsp struct + Data interface{} + Message string + Status string + type RspCoinGecko map[string]CoinGeckeoPrice + type RspCoinMarket struct + Data map[string]TokenInfo + Status struct{ ... } + type SsvOperators struct + Error struct{ ... } + Operators []struct{ ... } + Pagination struct{ ... } + func GetOperators(network string) (*SsvOperators, error) + type TokenInfo struct + CirculatingSupply float64 + CmcRank int + DateAdded time.Time + ID int + IsActive int + IsFiat int + IsMarketCapIncludedInCalc int + LastUpdated time.Time + MaxSupply interface{} + Name string + NumMarketPairs int + Platform interface{} + Quote struct{ ... } + Slug string + Symbol string + Tags []string + TotalSupply float64