PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/gnoswap/gov/staker

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
staker
Namespace
gnoswap / gov
Files
24 (README)(gnomod.toml)
Exported functions
57
Module
gno.land/r/gnoswap/gov/staker
gno
0.9

Files (24)

  • README.mdmarkdown
  • gnomod.tomltoml
  • counter.gnogno
  • delegation_manager.gnogno
  • delegation_withdraw.gnogno
  • delegation.gnogno
  • doc.gnogno
  • emission_reward_manager.gnogno
  • emission_reward_state.gnogno
  • errors.gnogno
  • getter_utils.gnogno
  • getters.gnogno
  • launchpad_project_deposits.gnogno
  • protocol_fee_reward_manager.gnogno
  • protocol_fee_reward_state.gnogno
  • protocol_fee_token_accumulator.gnogno
  • proxy.gnogno
  • render.gnogno
  • state.gnogno
  • store.gnogno
  • tree.gnogno
  • types.gnogno
  • upgrade.gnogno
  • util.gnogno
  • getters.gnogno
    1package staker23import (4	u256 "gno.land/p/gnoswap/uint256/v1"5	rotree "gno.land/p/nt/bptree/rotree/v0"6)78

    Functions

    • CleanStakerDelegationSnapshotByAdmin(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, threshold int64, target string)

    • CollectEmissionReward(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string})

    • CollectEmissionRewardFromLaunchPad(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, to string)

    • CollectProtocolFeeReward(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, tokenPath string)

    • CollectProtocolFeeRewardFromLaunchPad(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, to string, tokenPath string)

    • CollectReward(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string})

    • CollectRewardFromLaunchPad(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, to string)

    • CollectUndelegatedGns(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}) int64

    • Delegate(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, to string, amount int64, referrer string) int64

    • ExistsDelegation(delegationID int64) bool

    • GetClaimableRewardByAddress(addr string) (int64, map[string]int64, interface {Error func() string})

    • GetClaimableRewardByLaunchpad(addr string) (int64, map[string]int64, interface {Error func() string})

    • GetClaimableRewardByRewardID(rewardID string) (int64, map[string]int64, interface {Error func() string})

    • GetCollectableWithdrawAmount(delegationID int64) int64

    • GetDelegations() *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree

    • GetDelegationWithdrawCount(delegationID int64) int

    • GetDelegationWithdraws(delegationID int64, offset int, count int) ([]gno.land/r/gnoswap/gov/staker.DelegationWithdraw, interface {Error func() string})

    • GetDelegatorDelegations(delegator string) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree

    • GetEmissionAccumulatedTimestamp() int64

    • GetEmissionAccumulatedX128PerStake() *gno.land/p/gnoswap/uint256/v1.Uint

    • GetEmissionDistributedAmount() int64

    • GetImplementationPackagePath() string

    • GetLaunchpadProjectDeposit(projectAddr string) (int64, bool)

    • GetProtocolFeeAccumulatedTimestamp() int64

    • GetProtocolFeeAccumulatedX128PerStake(tokenPath string) *gno.land/p/gnoswap/uint256/v1.Uint

    • GetProtocolFeeAmount(tokenPath string) int64

    • GetTotalDelegated() int64

    • GetTotalDelegationAmountAtSnapshot(snapshotTime int64) (int64, bool)

    • GetTotalLockedAmount() int64

    • GetTotalxGnsSupply() int64

    • GetUnDelegationLockupPeriod() int64

    • GetUserDelegationAmountAtSnapshot(userAddr string, snapshotTime int64) (int64, bool)

    • GetUserDelegationIDs(delegator string, delegatee string) []int64

    • HasDelegationSnapshotsKey() bool

    • NewCounter() *gno.land/r/gnoswap/gov/staker.Counter

    • NewDelegation(id int64, delegateFrom string, delegateTo string, delegateAmount int64, createdHeight int64, createdAt int64) *gno.land/r/gnoswap/gov/staker.Delegation

    • NewDelegationManager() *gno.land/r/gnoswap/gov/staker.DelegationManager

    • NewDelegationTree() *gno.land/p/nt/bptree/v0.BPTree

    • NewDelegationWithdraw(delegationID int64, unDelegateAmount int64, createdHeight int64, createdAt int64, unDelegationLockupPeriod int64) struct{delegationID int64; unDelegateAmount int64; unDelegatedHeight int64; unDelegatedAt int64; collectedAmount int64; collectableTime int64; collectedAt int64; collected bool}

    • NewDelegationWithdrawWithoutLockup(delegationID int64, unDelegateAmount int64, createdHeight int64, createdAt int64) struct{delegationID int64; unDelegateAmount int64; unDelegatedHeight int64; unDelegatedAt int64; collectedAmount int64; collectableTime int64; collectedAt int64; collected bool}

    • NewEmissionRewardManager() *gno.land/r/gnoswap/gov/staker.EmissionRewardManager

    • NewEmissionRewardState(accumulatedRewardX128PerStake *gno.land/p/gnoswap/uint256/v1.Uint) *gno.land/r/gnoswap/gov/staker.EmissionRewardState

    • NewGovStakerStore(kvStore interface {AddAuthorizedCaller func(int, .uverse.realm, .uverse.address, gno.land/p/gnoswap/store/v1.Permission) .uverse.error; Delete func(int, .uverse.realm, string) .uverse.error; Get func(string) (interface {}, .uverse.error); GetAddress func(string) (.uverse.address, .uverse.error); GetAllKeys func() ([]string, .uverse.error); GetAuthorizedCallers func() (map[.uverse.address]gno.land/p/gnoswap/store/v1.Permission, .uverse.error); GetBPTree func(string) (*gno.land/p/nt/bptree/v0.BPTree, .uverse.error); GetBool func(string) (bool, .uverse.error); GetDomainAddress func() .uverse.address; GetInt64 func(string) (int64, .uverse.error); GetString func(string) (string, .uverse.error); GetUint64 func(string) (uint64, .uverse.error); Has func(string) bool; IsWriteAuthorized func(.uverse.address) bool; RemoveAuthorizedCaller func(int, .uverse.realm, .uverse.address) .uverse.error; Set func(int, .uverse.realm, string, interface {}) .uverse.error; UpdateAuthorizedCaller func(int, .uverse.realm, .uverse.address, gno.land/p/gnoswap/store/v1.Permission) .uverse.error}) interface {GetAllDelegations func() *gno.land/p/nt/bptree/v0.BPTree; GetDelegation func(int64) (*gno.land/r/gnoswap/gov/staker.Delegation, bool); GetDelegationCounter func() *gno.land/r/gnoswap/gov/staker.Counter; GetDelegationManager func() *gno.land/r/gnoswap/gov/staker.DelegationManager; GetEmissionRewardManager func() *gno.land/r/gnoswap/gov/staker.EmissionRewardManager; GetLaunchpadProjectDeposits func() *gno.land/r/gnoswap/gov/staker.LaunchpadProjectDeposits; GetProtocolFeeRewardManager func() *gno.land/r/gnoswap/gov/staker.ProtocolFeeRewardManager; GetTotalDelegatedAmount func() int64; GetTotalDelegationHistory func() *gno.land/r/gnoswap/gov/staker.UintTree; GetTotalLockedAmount func() int64; GetUnDelegationLockupPeriod func() int64; GetUserDelegationHistory func() *gno.land/p/nt/bptree/v0.BPTree; HasDelegation func(int64) bool; HasDelegationCounterStoreKey func() bool; HasDelegationManagerStoreKey func() bool; HasDelegationsStoreKey func() bool; HasEmissionRewardManagerStoreKey func() bool; HasLaunchpadProjectDepositsStoreKey func() bool; HasProtocolFeeRewardManagerStoreKey func() bool; HasTotalDelegatedAmountStoreKey func() bool; HasTotalDelegationHistoryStoreKey func() bool; HasTotalLockedAmountStoreKey func() bool; HasUnDelegationLockupPeriodStoreKey func() bool; HasUserDelegationHistoryStoreKey func() bool; RemoveDelegation func(int, .uverse.realm, int64) .uverse.error; SetDelegation func(int, .uverse.realm, int64, *gno.land/r/gnoswap/gov/staker.Delegation) .uverse.error; SetDelegationCounter func(int, .uverse.realm, *gno.land/r/gnoswap/gov/staker.Counter) .uverse.error; SetDelegationManager func(int, .uverse.realm, *gno.land/r/gnoswap/gov/staker.DelegationManager) .uverse.error; SetDelegations func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetEmissionRewardManager func(int, .uverse.realm, *gno.land/r/gnoswap/gov/staker.EmissionRewardManager) .uverse.error; SetLaunchpadProjectDeposits func(int, .uverse.realm, *gno.land/r/gnoswap/gov/staker.LaunchpadProjectDeposits) .uverse.error; SetProtocolFeeRewardManager func(int, .uverse.realm, *gno.land/r/gnoswap/gov/staker.ProtocolFeeRewardManager) .uverse.error; SetTotalDelegatedAmount func(int, .uverse.realm, int64) .uverse.error; SetTotalDelegationHistory func(int, .uverse.realm, *gno.land/r/gnoswap/gov/staker.UintTree) .uverse.error; SetTotalLockedAmount func(int, .uverse.realm, int64) .uverse.error; SetUnDelegationLockupPeriod func(int, .uverse.realm, int64) .uverse.error; SetUserDelegationHistory func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error}

    • NewLaunchpadProjectDeposits() *gno.land/r/gnoswap/gov/staker.LaunchpadProjectDeposits

    • NewProtocolFeeRewardManager() *gno.land/r/gnoswap/gov/staker.ProtocolFeeRewardManager

    • NewProtocolFeeRewardState() *gno.land/r/gnoswap/gov/staker.ProtocolFeeRewardState

    • NewProtocolFeeTokenAccumulator() *gno.land/r/gnoswap/gov/staker.ProtocolFeeTokenAccumulator

    • NewProtocolFeeTokenRewardState(eventCursor int64, segmentStakedAmount int64, segmentStartX128 *gno.land/p/gnoswap/uint256/v1.Uint) *gno.land/r/gnoswap/gov/staker.ProtocolFeeTokenRewardState

    • NewUintTree() *gno.land/r/gnoswap/gov/staker.UintTree

    • NewUserDelegationTree() *gno.land/p/nt/bptree/v0.BPTree

    • Redelegate(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, delegatee string, newDelegatee string, amount int64) int64

    • RegisterInitializer(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, initializer func(int, .uverse.realm, gno.land/r/gnoswap/gov/staker.IGovStakerStore) gno.land/r/gnoswap/gov/staker.IGovStaker)

    • Render(path string) string

    • SetAmountByProjectWallet(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, addr string, amount int64, add bool)

    • SetUnDelegationLockupPeriodByAdmin(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, period int64)

    • Undelegate(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, from string, amount int64) int64

    • UpgradeImpl(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, packagePath string)

    Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

    Rendered

    RenderedRawgnoweb ↗

    vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.

    // GetTotalxGnsSupply returns total xGNS supply, including launchpad-held xGNS.
    9// Returns:
    10// - int64: total xGNS supply, including xGNS held by launchpad projects.
    11func GetTotalxGnsSupply() int64 {
    12 return getImplementation().GetTotalxGnsSupply()
    13}
    14
    15// GetTotalDelegated returns the total amount of GNS delegated.
    16// Returns:
    17// - int64: total GNS amount delegated across all delegators.
    18func GetTotalDelegated() int64 {
    19 return getImplementation().GetTotalDelegated()
    20}
    21
    22// GetTotalLockedAmount returns the total amount of GNS locked in undelegation.
    23// Returns:
    24// - int64: total GNS amount currently locked in undelegation withdrawals.
    25func GetTotalLockedAmount() int64 {
    26 return getImplementation().GetTotalLockedAmount()
    27}
    28
    29// GetUnDelegationLockupPeriod returns the undelegation lockup period in seconds.
    30// Returns:
    31// - int64: configured undelegation lockup duration in seconds.
    32func GetUnDelegationLockupPeriod() int64 {
    33 return getImplementation().GetUnDelegationLockupPeriod()
    34}
    35
    36// GetDelegations returns a read-only view of every delegation, keyed by the
    37// decimal string form of the delegation ID. Callers paginate it themselves
    38// through IterateByOffset. Reading an entry yields a clone, so the view cannot
    39// mutate realm state.
    40// Returns:
    41// - *rotree.ReadOnlyTree: read-only delegation view keyed by decimal delegation ID; entry reads return clones.
    42func GetDelegations() *rotree.ReadOnlyTree {
    43 return getImplementation().GetDelegations()
    44}
    45
    46// ExistsDelegation checks if a delegation exists.
    47// Parameters:
    48// - delegationID: Numeric identifier of the delegation to look up.
    49//
    50// Returns:
    51// - bool: true when a delegation with delegationID exists, false otherwise.
    52func ExistsDelegation(delegationID int64) bool {
    53 return getImplementation().ExistsDelegation(delegationID)
    54}
    55
    56// GetDelegatorDelegations returns a read-only view of a delegator's delegations,
    57// keyed by delegatee address with that pair's delegation IDs as the value.
    58// Reading an entry yields a copy of the ID slice, so the view cannot mutate
    59// realm state. nil is returned when the delegator has no delegations.
    60// Parameters:
    61// - delegator: Address whose delegations should be listed.
    62//
    63// Returns:
    64// - *rotree.ReadOnlyTree: read-only view keyed by delegatee address, or nil when delegator has no delegations.
    65func GetDelegatorDelegations(delegator address) *rotree.ReadOnlyTree {
    66 return getImplementation().GetDelegatorDelegations(delegator)
    67}
    68
    69// GetUserDelegationIDs returns a list of delegation IDs for a specific delegator-delegatee pair.
    70// Parameters:
    71// - delegator: Address that supplied the delegation.
    72// - delegatee: Address receiving that delegation.
    73//
    74// Returns:
    75// - []int64: delegation IDs for the delegator-delegatee pair; the returned slice is independent of realm state.
    76func GetUserDelegationIDs(delegator address, delegatee address) []int64 {
    77 return cloneInt64Slice(getImplementation().GetUserDelegationIDs(delegator, delegatee))
    78}
    79
    80// HasDelegationSnapshotsKey returns true if delegation history exists.
    81// Returns:
    82// - bool: true when delegation history has been initialized in storage.
    83func HasDelegationSnapshotsKey() bool {
    84 return getImplementation().HasDelegationSnapshotsKey()
    85}
    86
    87// GetTotalDelegationAmountAtSnapshot returns total delegation at a Unix
    88// timestamp, using the latest history entry at or before that timestamp.
    89// The lookup is timestamp-based rather than a block-height snapshot.
    90// Parameters:
    91// - snapshotTime: Unix timestamp at or before which to select the latest aggregate delegation history entry.
    92//
    93// Returns:
    94// - int64: aggregate delegated amount recorded at or before snapshotTime.
    95// - bool: true when a qualifying history entry exists; false when no entry is available.
    96func GetTotalDelegationAmountAtSnapshot(snapshotTime int64) (int64, bool) {
    97 return getImplementation().GetTotalDelegationAmountAtSnapshot(snapshotTime)
    98}
    99
    100// GetUserDelegationAmountAtSnapshot returns one user's delegation at a Unix
    101// timestamp, using that user's latest history entry at or before the timestamp.
    102// The bool is false when no qualifying history entry exists.
    103// Parameters:
    104// - userAddr: Delegator address whose historical delegation is queried.
    105// - snapshotTime: Unix timestamp at or before which to select the user's latest history entry.
    106//
    107// Returns:
    108// - int64: user's delegated amount recorded at or before snapshotTime.
    109// - bool: true when a qualifying user-history entry exists; false otherwise.
    110func GetUserDelegationAmountAtSnapshot(userAddr address, snapshotTime int64) (int64, bool) {
    111 return getImplementation().GetUserDelegationAmountAtSnapshot(userAddr, snapshotTime)
    112}
    113
    114// GetClaimableRewardByAddress returns claimable rewards for an address.
    115//
    116// Parameters:
    117// - addr: Address whose emission and protocol-fee rewards are queried.
    118//
    119// Returns:
    120// - int64: emission reward amount available to addr.
    121// - map[string]int64: protocol-fee reward amounts keyed by token path.
    122// - error: nil on success; non-nil when reward state cannot be resolved for addr.
    123func GetClaimableRewardByAddress(addr address) (int64, map[string]int64, error) {
    124 emissionReward, protocolFees, err := getImplementation().GetClaimableRewardByAddress(addr)
    125 if err != nil {
    126 return 0, nil, err
    127 }
    128 return emissionReward, cloneStringInt64Map(protocolFees), nil
    129}
    130
    131// GetClaimableRewardByLaunchpad returns claimable launchpad rewards for an address.
    132//
    133// Parameters:
    134// - addr: Address whose launchpad and protocol-fee rewards are queried.
    135//
    136// Returns:
    137// - int64: emission reward amount available to addr.
    138// - map[string]int64: protocol-fee reward amounts keyed by token path.
    139// - error: nil on success; non-nil when reward state cannot be resolved for addr.
    140func GetClaimableRewardByLaunchpad(addr address) (int64, map[string]int64, error) {
    141 emissionReward, protocolFees, err := getImplementation().GetClaimableRewardByLaunchpad(addr)
    142 if err != nil {
    143 return 0, nil, err
    144 }
    145 return emissionReward, cloneStringInt64Map(protocolFees), nil
    146}
    147
    148// GetClaimableRewardByRewardID returns claimable reward details by reward ID.
    149//
    150// Parameters:
    151// - rewardID: Reward-state identifier whose claimable rewards are queried.
    152//
    153// Returns:
    154// - int64: emission reward amount associated with rewardID.
    155// - map[string]int64: protocol-fee reward amounts keyed by token path.
    156// - error: nil on success; non-nil when rewardID cannot be resolved.
    157func GetClaimableRewardByRewardID(rewardID string) (int64, map[string]int64, error) {
    158 emissionReward, protocolFees, err := getImplementation().GetClaimableRewardByRewardID(rewardID)
    159 if err != nil {
    160 return 0, nil, err
    161 }
    162 return emissionReward, cloneStringInt64Map(protocolFees), nil
    163}
    164
    165// GetLaunchpadProjectDeposit returns the deposit amount for a launchpad project.
    166// Parameters:
    167// - projectAddr: Launchpad project address whose deposited amount is queried.
    168//
    169// Returns:
    170// - int64: recorded launchpad project deposit amount.
    171// - bool: true when a deposit record exists for projectAddr; false otherwise.
    172func GetLaunchpadProjectDeposit(projectAddr string) (int64, bool) {
    173 return getImplementation().GetLaunchpadProjectDeposit(projectAddr)
    174}
    175
    176// GetDelegationWithdrawCount returns the total number of delegation withdraws for a specific delegation.
    177// Parameters:
    178// - delegationID: Identifier of the delegation whose withdrawals are counted.
    179//
    180// Returns:
    181// - int: number of withdrawal records associated with delegationID.
    182func GetDelegationWithdrawCount(delegationID int64) int {
    183 return getImplementation().GetDelegationWithdrawCount(delegationID)
    184}
    185
    186// GetDelegationWithdraws returns a paginated list of delegation withdraws for a specific delegation.
    187// Parameters:
    188// - delegationID: Identifier of the delegation whose withdrawals are requested.
    189// - offset: Number of matching withdrawal records to skip before collecting results.
    190// - count: Maximum number of withdrawal records to return.
    191//
    192// Returns:
    193// - []DelegationWithdraw: requested page of withdrawal records, copied before returning.
    194// - error: nil on success; non-nil when the requested delegation or page cannot be read.
    195func GetDelegationWithdraws(delegationID int64, offset, count int) ([]DelegationWithdraw, error) {
    196 withdraws, err := getImplementation().GetDelegationWithdraws(delegationID, offset, count)
    197 if err != nil {
    198 return nil, err
    199 }
    200 return cloneDelegationWithdraws(withdraws), nil
    201}
    202
    203// GetCollectableWithdrawAmount returns the collectable withdraw amount for a specific delegation.
    204// Parameters:
    205// - delegationID: Identifier of the delegation whose collectable amount is queried.
    206//
    207// Returns:
    208// - int64: amount currently available to collect from delegationID.
    209func GetCollectableWithdrawAmount(delegationID int64) int64 {
    210 return getImplementation().GetCollectableWithdrawAmount(delegationID)
    211}
    212
    213// GetProtocolFeeAccumulatedX128PerStake returns the accumulated protocol fee per stake (Q128) for a token path.
    214// Parameters:
    215// - tokenPath: Registered token path whose protocol-fee accumulator is queried.
    216//
    217// Returns:
    218// - *u256.Uint: accumulated protocol-fee amount per unit stake in Q128 fixed-point form.
    219func GetProtocolFeeAccumulatedX128PerStake(tokenPath string) *u256.Uint {
    220 return getImplementation().GetProtocolFeeAccumulatedX128PerStake(tokenPath).Clone()
    221}
    222
    223// GetProtocolFeeAmount returns the protocol fee amounts for a token path.
    224// Parameters:
    225// - tokenPath: Registered token path whose protocol fees are queried.
    226//
    227// Returns:
    228// - int64: accumulated protocol-fee amount for tokenPath in token base units.
    229func GetProtocolFeeAmount(tokenPath string) int64 {
    230 return getImplementation().GetProtocolFeeAmount(tokenPath)
    231}
    232
    233// GetProtocolFeeAccumulatedTimestamp returns the accumulated timestamp for protocol fee rewards.
    234// Returns:
    235// - int64: Unix timestamp at which protocol-fee accumulation was last updated.
    236func GetProtocolFeeAccumulatedTimestamp() int64 {
    237 return getImplementation().GetProtocolFeeAccumulatedTimestamp()
    238}
    239
    240// GetEmissionAccumulatedX128PerStake returns the accumulated emission per stake (Q128).
    241// Returns:
    242// - *u256.Uint: accumulated emission reward per unit stake in Q128 fixed-point form.
    243func GetEmissionAccumulatedX128PerStake() *u256.Uint {
    244 return getImplementation().GetEmissionAccumulatedX128PerStake().Clone()
    245}
    246
    247// GetEmissionDistributedAmount returns the total distributed emission amount.
    248// Returns:
    249// - int64: total emission amount distributed to stakers.
    250func GetEmissionDistributedAmount() int64 {
    251 return getImplementation().GetEmissionDistributedAmount()
    252}
    253
    254// GetEmissionAccumulatedTimestamp returns the accumulated timestamp for emission rewards.
    255// Returns:
    256// - int64: Unix timestamp at which emission accumulation was last updated.
    257func GetEmissionAccumulatedTimestamp() int64 {
    258 return getImplementation().GetEmissionAccumulatedTimestamp()
    259}
    260