asimov-near-module 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7d49c00c509956e971cba5e6632d34734f6f0728c9e1ad89a94842d784624c82
4
+ data.tar.gz: 5bd9451bdb4a365eb0acff22e79058e48b79b25bcca62caceb11de5654566f89
5
+ SHA512:
6
+ metadata.gz: 8dff6dceac9b0f80d0ca19e983e5a759272453b2dc42d29be9b6db93002a47221234b7d8890829ceaeb86d4eec8e26f4ca99a434d60e27bc336ab98948f5f724
7
+ data.tar.gz: aecea5307e2b9e021930492e2ffc365195b168194394aca06934afb44f64da631508b19ba5f09673b0145eced0df994274142ae88c452284979d6b7fc8f5f714
data/AUTHORS ADDED
@@ -0,0 +1 @@
1
+ * Arto Bendiken <arto@asimov.so>
data/CHANGES.md ADDED
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## 0.0.1 - 2025-05-29
9
+ ### Added
10
+ - Import structured data from NEAR Protocol blocks and transactions
11
+ - Support both the mainnet and testnet environments
12
+ - Collect the raw JSON data via the edge-cached neardata.xyz API
data/README.md ADDED
@@ -0,0 +1,96 @@
1
+ # ASIMOV NEAR Module
2
+
3
+ [![License](https://img.shields.io/badge/license-Public%20Domain-blue.svg)](https://unlicense.org)
4
+ [![Package on Crates.io](https://img.shields.io/crates/v/asimov-near-module.svg)](https://crates.io/crates/asimov-near-module)
5
+ [![Package on PyPI](https://img.shields.io/pypi/v/asimov-near-module.svg)](https://pypi.org/project/asimov-near-module)
6
+ [![Package on RubyGems](https://img.shields.io/gem/v/asimov-near-module.svg)](https://rubygems.org/gems/asimov-near-module)
7
+ [![Package on NPM](https://img.shields.io/npm/v/asimov-near-module.svg)](https://npmjs.com/package/asimov-near-module)
8
+
9
+ [ASIMOV] module for data import from the [NEAR Protocol] blockchain network.
10
+
11
+ ## ✨ Features
12
+
13
+ - Imports structured data from [NEAR Protocol] blocks and transactions.
14
+ - Supports both the [mainnet] and [testnet] environments.
15
+ - Collects the raw JSON data via the edge-cached [neardata.xyz] API.
16
+ - Constructs a semantic knowledge graph based on the [KNOW] ontology.
17
+ - Supports plain JSON output as well as [RDF] output in the form of [JSON-LD].
18
+ - Distributed as a standalone static binary with zero runtime dependencies.
19
+
20
+ ## 🛠️ Prerequisites
21
+
22
+ - [Rust] 1.85+ (2024 edition) if building from source code
23
+
24
+ ## ⬇️ Installation
25
+
26
+ ### Installation from PyPI
27
+
28
+ ```bash
29
+ pip install -U asimov-near-module
30
+ ```
31
+
32
+ ### Installation from RubyGems
33
+
34
+ ```bash
35
+ gem install asimov-near-module
36
+ ```
37
+
38
+ ### Installation from NPM
39
+
40
+ ```bash
41
+ npm install -g asimov-near-module
42
+ ```
43
+
44
+ ### Installation from Source Code
45
+
46
+ ```bash
47
+ cargo install asimov-near-module
48
+ ```
49
+
50
+ ## 👉 Examples
51
+
52
+ ### Fetching Testnet Blocks
53
+
54
+ ```bash
55
+ asimov-near-fetcher near://testnet/100000000
56
+ ```
57
+
58
+ ### Fetching Mainnet Blocks
59
+
60
+ ```bash
61
+ asimov-near-fetcher near://mainnet/100000000
62
+ ```
63
+
64
+ ## 📚 Reference
65
+
66
+ ### Installed Binaries
67
+
68
+ - `asimov-near-fetcher`: collects JSON data from the [neardata.xyz] API
69
+ - `asimov-near-importer`: collects and transforms JSON into JSON-LD (TBD)
70
+
71
+ ## 👨‍💻 Development
72
+
73
+ ```bash
74
+ git clone https://github.com/asimov-modules/asimov-near-module.git
75
+ ```
76
+
77
+ ---
78
+
79
+ [![Share on X](https://img.shields.io/badge/share%20on-x-03A9F4?logo=x)](https://x.com/intent/post?url=https://github.com/asimov-modules/asimov-near-module&text=asimov-near-module)
80
+ [![Share on Reddit](https://img.shields.io/badge/share%20on-reddit-red?logo=reddit)](https://reddit.com/submit?url=https://github.com/asimov-modules/asimov-near-module&title=asimov-near-module)
81
+ [![Share on Hacker News](https://img.shields.io/badge/share%20on-hn-orange?logo=ycombinator)](https://news.ycombinator.com/submitlink?u=https://github.com/asimov-modules/asimov-near-module&t=asimov-near-module)
82
+ [![Share on Facebook](https://img.shields.io/badge/share%20on-fb-1976D2?logo=facebook)](https://www.facebook.com/sharer/sharer.php?u=https://github.com/asimov-modules/asimov-near-module)
83
+ [![Share on LinkedIn](https://img.shields.io/badge/share%20on-linkedin-3949AB?logo=linkedin)](https://www.linkedin.com/sharing/share-offsite/?url=https://github.com/asimov-modules/asimov-near-module)
84
+
85
+ [ASIMOV]: https://github.com/asimov-platform
86
+ [JSON-LD]: https://json-ld.org
87
+ [KNOW]: https://github.com/know-ontology
88
+ [NEAR Protocol]: https://near.org
89
+ [NPM]: https:/npmjs.org
90
+ [Python]: https://python.org
91
+ [RDF]: https://www.w3.org/TR/rdf12-concepts/
92
+ [Ruby]: https://ruby-lang.org
93
+ [Rust]: https://rust-lang.org
94
+ [mainnet]: https://docs.near.org/protocol/network/networks#mainnet
95
+ [neardata.xyz]: https://neardata.xyz
96
+ [testnet]: https://docs.near.org/protocol/network/networks#testnet
data/UNLICENSE ADDED
@@ -0,0 +1,24 @@
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For more information, please refer to <https://unlicense.org/>
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative "../lib/asimov-near-module"
3
+ argv0 = ::ASIMOV_Near_Module::Fetcher.path or abort("asimov-near-fetcher not found")
4
+ if ::Gem.win_platform?
5
+ ::Kernel.exit(::Kernel.system(argv0, *ARGV) ? 0 : $?.exitstatus)
6
+ else
7
+ ::Kernel.exec(argv0, *ARGV)
8
+ end
@@ -0,0 +1,38 @@
1
+ # This is free and unencumbered software released into the public domain.
2
+
3
+ module ASIMOV_Near_Module; end
4
+
5
+ class ASIMOV_Near_Module::Fetcher
6
+ def self.path
7
+ self.which("asimov-near-fetcher")
8
+ end
9
+
10
+ def self.execute(...)
11
+ self.new(...).execute
12
+ end
13
+
14
+ def initialize(*args, env: {})
15
+ @argv0 = self.class.path.freeze
16
+ @args = args.map(&:to_s).freeze
17
+ @env = env.to_h.freeze
18
+ end
19
+
20
+ def execute(*args)
21
+ ::Kernel.system(@env, @argv0, *(@args + args.map(&:to_s))) ? 0 : $?.exitstatus
22
+ end
23
+
24
+ protected
25
+
26
+ def self.which(command)
27
+ gem_bindir = ::Gem.bindir
28
+ exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
29
+ ENV['PATH'].split(::File::PATH_SEPARATOR).each do |dir|
30
+ next if dir == gem_bindir # avoid infinite recursion
31
+ exts.each do |ext|
32
+ exe = ::File.join(dir, "#{command}#{ext}")
33
+ return exe if ::File.executable?(exe) && !::File.directory?(exe)
34
+ end
35
+ end
36
+ nil # not found
37
+ end
38
+ end
@@ -0,0 +1,7 @@
1
+ # This is free and unencumbered software released into the public domain.
2
+
3
+ module ASIMOV_Near_Module
4
+ VERSION = "0.0.1".freeze
5
+ end
6
+
7
+ require_relative 'asimov-near-module/fetcher'
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: asimov-near-module
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - ASIMOV Protocol
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 2025-05-29 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: ASIMOV module for data import from the NEAR Protocol blockchain network.
13
+ email: support@asimov.so
14
+ executables:
15
+ - asimov-near-fetcher
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - AUTHORS
20
+ - CHANGES.md
21
+ - README.md
22
+ - UNLICENSE
23
+ - VERSION
24
+ - bin/asimov-near-fetcher
25
+ - lib/asimov-near-module.rb
26
+ - lib/asimov-near-module/fetcher.rb
27
+ homepage: https://github.com/asimov-modules
28
+ licenses:
29
+ - Unlicense
30
+ metadata:
31
+ homepage_uri: https://github.com/asimov-modules
32
+ source_code_uri: https://github.com/asimov-modules/asimov-near-module
33
+ changelog_uri: https://github.com/asimov-modules/asimov-near-module/blob/master/CHANGES.md
34
+ bug_tracker_uri: https://github.com/asimov-modules/asimov-near-module/issues
35
+ documentation_uri: https://github.com/asimov-modules/asimov-near-module/blob/master/README.md
36
+ rdoc_options: []
37
+ require_paths:
38
+ - lib
39
+ required_ruby_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '3.0'
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ requirements: []
50
+ rubygems_version: 3.6.9
51
+ specification_version: 4
52
+ summary: ASIMOV module for data import from the NEAR Protocol blockchain network.
53
+ test_files: []