
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
github.com/Dan6erbond/algogovernance
Advanced tools
algogovernanceA Golang API wrapper for Algorand's Governance API and CLI tool.
Add the Go package:
$ go get github.com/Dan6erbond/algogovernance
Install the CLI tool:
$ go install github.com/Dan6erbond/algogovernance
Algorand's Governance API is a RESTful API that doesn't require keys or tokens to access, which is why all its methods are available under the pkg/client module.
Fetching the current period and its governors:
package main
import (
"github.com/Dan6erbond/algogovernance/pkg/client"
)
func main() {
activePeriod, _ := client.GetActivePeriod()
governors, _ := client.GetPeriodGovernors(activePeriod.Slug, "", "", "", "cursor", "", "", "")
for governors.HasNext() {
governors, _ = governors.GetNext()
}
}
algogovernance also comes with helpers to estimate rewards for a given governor and governance period. Those are found in the pkg/rewards module.
Getting the estimated rewards for the current period:
package main
import (
algoRewards "github.com/Dan6erbond/algogovernance/pkg/rewards"
)
func main() {
address := "3RYOY2LTPC6GLT3ZYE4LUFGGAEMY7GRENZQO7RFNGK2LGCV77QNASK6C6Y"
rewards, _ := algoRewards.GetRewardsForCurrentPeriod(address)
}
The CLI tool is built with Cobra and uses Viper configuration for governor wallet addresses. It supports the following commands:
cfg: View the current configuration.currentPeriod: Get an overview of the current period and expected governance rewards.rewards: Get the expected rewards for a given period, defaults to the current active period.The documentation is available at pkg.go.dev: algogovernance command - github.com/Dan6erbond/algogovernance - pkg.go.dev
This package is licensed under the MIT license.
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.