Module: NftChecker

Defined in:
lib/nft_checker.rb,
lib/nft_checker/errors.rb,
lib/nft_checker/version.rb,
lib/nft_checker/open_sea.rb

Overview

NftChecker is a tool for verifying NFT ownership

Use the ‘init` method to generate a checker for a given NFT source Currently supported sources:

  • OpenSea

Checkers all support the following methods:

  • verify_owner(nft_metadata, owner_address): boolean

  • list_nfts(collection_metadata, owner_address): [<NFT ID>,…]

Defined Under Namespace

Classes: Error, OpenSea, Throttled

Constant Summary collapse

VERSION =
"0.3.0"

Class Method Summary collapse

Class Method Details

.init(source, options = {}) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/nft_checker.rb', line 19

def self.init(source, options = {})
  case source.to_s
  when /\Aopen\w?sea(.io)?\z/i
    OpenSea.new(testnet: options[:testnet])
  else
    raise "Unknown source: #{source}"
  end
end