Module: Ethscribe
- Defined in:
- lib/ethscribe.rb,
lib/ethscribe.rb,
lib/ethscribe/api.rb,
lib/ethscribe/version.rb
Defined Under Namespace
Classes: Api, Configuration
Constant Summary
collapse
- API =
add more convenience alias - why? why not?
Api
- MAJOR =
todo: namespace inside version or something - why? why not??
1
- MINOR =
0
- PATCH =
0
- VERSION =
[MAJOR,MINOR,PATCH].join('.')
Class Method Summary
collapse
Class Method Details
.banner ⇒ Object
12
13
14
|
# File 'lib/ethscribe/version.rb', line 12
def self.banner
"ethscribe/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}] in >#{root}<"
end
|
.chain ⇒ Object
60
|
# File 'lib/ethscribe.rb', line 60
def self.chain() config.chain; end
|
.chain=(value) ⇒ Object
61
|
# File 'lib/ethscribe.rb', line 61
def self.chain=(value) config.chain = value; end
|
.client ⇒ Object
add some convenience shortcut helpers (no config. required) - why? why not?
59
|
# File 'lib/ethscribe.rb', line 59
def self.client() config.client; end
|
.config ⇒ Object
56
|
# File 'lib/ethscribe.rb', line 56
def self.config() @config ||= Configuration.new; end
|
lets you use
Ordinals.configure do |config|
config.chain = :btc
end
55
|
# File 'lib/ethscribe.rb', line 55
def self.configure() yield( config ); end
|
.goerli? ⇒ Boolean
65
|
# File 'lib/ethscribe.rb', line 65
def self.goerli?() config.chain == 'goerli'; end
|
.inscribe(id_or_num) ⇒ Object
72
|
# File 'lib/ethscribe.rb', line 72
def self.inscribe( id_or_num ) client.ethscription( id_or_num ); end
|
.inscribes(**kwargs) ⇒ Object
more convenience shortcuts
71
|
# File 'lib/ethscribe.rb', line 71
def self.inscribes( **kwargs ) client.ethscriptions( **kwargs ); end
|
.mainnet? ⇒ Boolean
64
|
# File 'lib/ethscribe.rb', line 64
def self.mainnet?() config.chain == 'mainnet'; end
|
.root ⇒ Object
16
17
18
|
# File 'lib/ethscribe/version.rb', line 16
def self.root
File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )
end
|
.version ⇒ Object
8
9
10
|
# File 'lib/ethscribe/version.rb', line 8
def self.version
VERSION
end
|