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/akbarfa49/nftlabs-sdk-go
This repository allows you to interact with NFTLabs Ethereum protocols.
The Go SDK allows you to query and transact with any NFTLabs contract deployed through the NFTLabs Console
The SDK is up of modules:
You can use the NFTLabs SDK to interact with all these modules in a straightforward and easy to use interface.
Interacting with the modules is easy:
package examples
import (
"github.com/ethereum/go-ethereum/ethclient"
"github.com/nftlabs/nftlabs-sdk-go/pkg/nftlabs"
"log"
"math/big"
)
func main() {
nftContractAddress := ""
chainRpcUrl := "https://rpc-mumbai.maticvigil.com" // change this
client, err := ethclient.Dial(chainRpcUrl)
if err != nil {
log.Fatal(err)
}
sdk, err := nftlabs.NewSdk(client, &nftlabs.SdkOptions{PrivateKey: "// TODO"})
if err != nil {
log.Fatal(err)
}
// You can get Pack/Marketplace/Collection/Currency contracts the same way
nftModule, err := sdk.GetNftModule(nftContractAddress)
if err != nil {
log.Fatal(err)
}
}
Checkout the sdk usage examples here and our CLI example here
The easiest way to play with the SDK is through the CLI
You can pull the CLI like this:
$ go install github.com/nftlabs/nftlabs-sdk-go/cmd/nftlabs
$ nftlabs
CLI for the nftlabs-protocols go SDK
Usage:
nftlabs [command]
Available Commands:
collection Interact with a collection contract
currency Interact with a currency contract
help Help about any command
marketplace Interact with a marketplace contract
nft Interact with an nft contract
pack Interact with a pack contract
Flags:
-u, --chainRpcUrl string chain url where all rpc requests will be sent (default "https://rpc-mumbai.maticvigil.com")
-h, --help help for nftlabs
-k, --privateKey string private key used to sign transactions
Use "nftlabs [command] --help" for more information about a command.
Change your chain by setting the
-u
or--chainRpcUrl
flag
Some examples (you can run right now):
$ SAMPLE_NFT_CONTRACT=0xf25C389016B7Ddb1191D4de02e495633Fe34d453
$ nftlabs nft -a $NFT_ADDRESS getAll
Deploy a Currency through
the NFTLabs console dashboard in order to
be able to mint your tokens. When you have a
currency address, pass it to the cli with the -a
(shorthand for --address
)
You need to set a signing key when executing this method in order to sign the transaction
Mint 42 of the currency:
// -k sets the signing key
$ nftlabs -k $PKEY currency -a $CURRENCY_ADDRESS mint 42
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.