Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bumi/openalias-ruby
Lookup and parse OpenAlias data in Ruby
https://github.com/bumi/openalias-ruby
bitcoin cryptocurrency dns dns-record monero openalias ruby
Last synced: about 1 month ago
JSON representation
Lookup and parse OpenAlias data in Ruby
- Host: GitHub
- URL: https://github.com/bumi/openalias-ruby
- Owner: bumi
- License: mit
- Created: 2018-11-01T01:11:41.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-03T17:44:29.000Z (about 6 years ago)
- Last Synced: 2024-04-26T11:43:47.090Z (9 months ago)
- Topics: bitcoin, cryptocurrency, dns, dns-record, monero, openalias, ruby
- Language: Ruby
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# OpenAlias ruby
This ruby gem allows you to lookup and read [OpenAlias](https://openalias.org) data with ruby.
OpenAlias ([openalias.org](https://openalias.org)) is an open standard for simpler addresses for any crypto currencies. [Read more here](https://openalias.org)
At its most basic, OpenAlias is a TXT DNS record on a FQDN (fully qualified domain name).
By combining this with DNS-related technologies [it has] created an aliasing standard that is extensible for developers,
intuitive and familiar for users, and can interoperate with both centralised and decentralised domain systems.It is using the [OpenAlias rust implementation](https://github.com/nabijaczleweli/openalias.rs/) - and is simply a ruby wrapper with a native rust extension.
Maybe this is a bad idea, but I had a few minutes and wanted to try it. It works perfectly (but gem install takes a while to compile the extension)
At some point it would probably be awesome to rewrite the whole thing in pure ruby - which is likely very easy.## Installation
(You need `rustc` installed to build the native rust extension)
Add this line to your application's Gemfile:
```ruby
gem 'openalias'
```Or install it yourself as:
$ gem install openalias
## Usage
```ruby
Openalias.addresses('[email protected]') # or Openalias.lookup('[email protected]')
=> [#]Openalias.addresses('donate.getmonero.org')
=> [#, #]Openalias.addresses('donate.getmonero.org').find(&:xmr?)
=> #Openalias.addresses('donate.getmonero.org')[0].recipient_name
=> "Monero Development"```
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/bumi/openalias-ruby.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).