
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
A Ruby client for the https://nft-maker.io/pro API.
It aims to support all API methods. The intuitive query methods allow to easily call the API endpoints.
Add this line to your application's Gemfile:
gem 'nftmaker_api'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install nftmaker_api
The configuration options can be set by using the configure
block
NftmakerApi.configure do |config|
config.api_key = ENV.fetch('NFT_MAKER_PRO_API_KEY')
end
Alternatively, you can configure the settings by passing a hash of options to an instance like so
client = NftmakerApi.new api_key: "xyz",
http_adapter: :typheous
The following is the list of available configuration options
api_key # The API key provided by nft-maker.io
http_adapter # The http client used for performing requests. Default :net_http
host # The API endpoint. Default: https://api.nft-maker.io
To start using the gem, you first create a new client instance
client = NftmakerApi.new
and then you call the methods for the API endpoints.
List all projects
client.projects.list
Show metrics for a project
client.project(1634).metrics
List all NFTs for a project
client.project(1634).nfts.list # all
client.project(1634).nfts.sold # only sold
client.project(1634).nfts.free # only free
client.project(1634).nfts.reserved # only reserved
Create a new project
client.projects.create(name: "Foo", policy_expires: true, policy_locks_at: Time.now.advance(months: 6), address_expires_in: 10)
Reserve NFT(s) from a project
client.project(1634).reservations.create(nft_count: 1, lovelace: 10_000000) # Reserve a random NFT
client.project(1634).reservations.create(nft_id: 123, nft_count: 1, lovelace: 10_000000) # Reserve a specific NFT
Check / Cancel a reservation
client.project(1634).reservation("addr1...").check
client.project(1634).reservation("addr1...").cancel
Responses are wrapped into a NftmakerApi::Response
object. The main reason is to allow direct access to the parsed JSON response body.
Sidenote: The JSON body is parsed using Oj which is a C implementation, hence much faster than JSON from Ruby's Standard Library.
client.projects.list.to_h
# => [{"id"=>123, "projectname" => "Foo", ...}, ...]
Access the original faraday response object
client.projects.list.original_response
Check if the request was successful or returned an error
client.projects.list.success?
client.projects.list.error?
Response errors are always NftmakerApi::Error
objects.
client.projects.list.error
Show error message including status code, status phrase and the actual error message from the API
client.projects.list.error.full_message
Show status code
client.projects.list.error.status
Show error message returned from the API
client.projects.list.error.reason
Bug reports and pull requests are welcome on GitHub at https://github.com/lacepool/nftmaker_api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that nftmaker_api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.