Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/sobmart/go-rest-api
This repository contains the open source Go client for MessageBird's REST API. Documentation can be found at: https://developers.messagebird.com.
The easiest way to use the MessageBird API in your Go project is to install it using go get:
$ go get github.com/messagebird/go-rest-api
Here is a quick example on how to get started. Assuming the go get installation worked, you can import the messagebird package like this:
import "github.com/messagebird/go-rest-api"
Then, create an instance of messagebird.Client:
client := messagebird.New("test_gshuPaZoeEG6ovbc8M79w0QyM")
Now you can query the API for information or send data. For example, if we want to request our balance information you'd do something like this:
// Request the balance information, returned as a Balance object.
balance, err := client.Balance()
if err != nil {
// messagebird.ErrResponse means custom JSON errors.
if err == messagebird.ErrResponse {
for _, mbError := range balance.Errors {
fmt.Printf("Error: %#v\n", mbError)
}
}
return
}
fmt.Println(" payment :", balance.Payment)
fmt.Println(" type :", balance.Type)
fmt.Println(" amount :", balance.Amount)
This will give you something like:
$ go run example.go
payment : prepaid
type : credits
amount : 9
Please see the other examples for a complete overview of all the available API calls.
Complete documentation, instructions, and examples are available at: https://developers.messagebird.com.
The MessageBird REST Client for Go is licensed under The BSD 2-Clause License. Copyright (c) 2014, 2015, MessageBird
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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.