diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index 667cfaed..b5fa8be9 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -4,12 +4,7 @@ You are an expert in Cosmos blockchain, specializing in CometBFT, Cosmos SDK, Co
## Architecture Overview
-This is a **CosmWasm smart contract ecosystem** for the AXONE protocol, comprising four specialized contracts in a layered architecture:
-
-- **`axone-objectarium`**: Immutable object storage (foundation layer)
-- **`axone-cognitarium`**: RDF/semantic triple storage with SPARQL querying
-- **`axone-law-stone`**: Prolog-based governance rules (depends on objectarium for persistence)
-- **`axone-dataverse`**: Protocol orchestrator (depends on cognitarium + law-stone)
+This is a **CosmWasm smart contract ecosystem** for the AXONE protocol, comprising four specialized contracts in a layered architecture.
**Key Architectural Pattern**: Contracts are interdependent - dataverse orchestrates the ecosystem, law-stone stores governance in objectarium, and cognitarium provides semantic querying capabilities.
diff --git a/.releaserc.cjs b/.releaserc.cjs
index 60c8d5f6..c513b14c 100644
--- a/.releaserc.cjs
+++ b/.releaserc.cjs
@@ -65,8 +65,8 @@ module.exports = {
{
file: "Cargo.toml",
hasChanged: true,
- numMatches: 7,
- numReplacements: 7,
+ numMatches: 1,
+ numReplacements: 1,
},
],
},
@@ -85,19 +85,8 @@ module.exports = {
{
successComment: false,
assets: [
- { path: "./artifacts/axone_objectarium.wasm" },
- { path: "./artifacts/axone_law_stone.wasm" },
- { path: "./artifacts/axone_cognitarium.wasm" },
- { path: "./artifacts/axone_dataverse.wasm" },
+ { path: "./artifacts/axone_dummy.wasm" },
{ path: "./artifacts/checksums.txt" },
- {
- path: "./contracts/axone-objectarium/schema/axone-objectarium.json",
- },
- { path: "./contracts/axone-law-stone/schema/axone-law-stone.json" },
- {
- path: "./contracts/axone-cognitarium/schema/axone-cognitarium.json",
- },
- { path: "./contracts/axone-dataverse/schema/axone-dataverse.json" },
],
},
],
diff --git a/.size-limit.json b/.size-limit.json
index 091797b2..75cde0a9 100644
--- a/.size-limit.json
+++ b/.size-limit.json
@@ -1,24 +1,6 @@
[
{
- "path": "target/wasm32-unknown-unknown/release/axone_objectarium.wasm",
- "running": false,
- "brotli": false,
- "gzip": false
- },
- {
- "path": "target/wasm32-unknown-unknown/release/axone_law_stone.wasm",
- "running": false,
- "brotli": false,
- "gzip": false
- },
- {
- "path": "target/wasm32-unknown-unknown/release/axone_cognitarium.wasm",
- "running": false,
- "brotli": false,
- "gzip": false
- },
- {
- "path": "target/wasm32-unknown-unknown/release/axone_dataverse.wasm",
+ "path": "target/wasm32-unknown-unknown/release/axone_dummy.wasm",
"running": false,
"brotli": false,
"gzip": false
diff --git a/Cargo.lock b/Cargo.lock
index 2f789ce9..83d14dab 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -14,76 +14,12 @@ dependencies = [
"zerocopy 0.7.35",
]
-[[package]]
-name = "aho-corasick"
-version = "1.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
-dependencies = [
- "memchr",
-]
-
[[package]]
name = "allocator-api2"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"
-[[package]]
-name = "anstream"
-version = "0.6.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b"
-dependencies = [
- "anstyle",
- "anstyle-parse",
- "anstyle-query",
- "anstyle-wincon",
- "colorchoice",
- "is_terminal_polyfill",
- "utf8parse",
-]
-
-[[package]]
-name = "anstyle"
-version = "1.0.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b"
-
-[[package]]
-name = "anstyle-parse"
-version = "0.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4"
-dependencies = [
- "utf8parse",
-]
-
-[[package]]
-name = "anstyle-query"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5"
-dependencies = [
- "windows-sys 0.52.0",
-]
-
-[[package]]
-name = "anstyle-wincon"
-version = "3.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19"
-dependencies = [
- "anstyle",
- "windows-sys 0.52.0",
-]
-
-[[package]]
-name = "anyhow"
-version = "1.0.93"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775"
-
[[package]]
name = "ark-bls12-381"
version = "0.4.0"
@@ -108,7 +44,7 @@ dependencies = [
"ark-std",
"derivative",
"hashbrown 0.13.2",
- "itertools 0.10.5",
+ "itertools",
"num-traits",
"rayon",
"zeroize",
@@ -126,7 +62,7 @@ dependencies = [
"ark-std",
"derivative",
"digest",
- "itertools 0.10.5",
+ "itertools",
"num-bigint",
"num-traits",
"paste",
@@ -205,18 +141,6 @@ dependencies = [
"rayon",
]
-[[package]]
-name = "arrayref"
-version = "0.3.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545"
-
-[[package]]
-name = "arrayvec"
-version = "0.7.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
-
[[package]]
name = "autocfg"
version = "1.3.0"
@@ -224,161 +148,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
[[package]]
-name = "axone-cognitarium"
-version = "8.0.0"
-dependencies = [
- "axone-rdf",
- "base64",
- "blake3",
- "cosmwasm-schema",
- "cosmwasm-std",
- "cucumber",
- "cw-storage-plus",
- "cw-utils",
- "cw2",
- "derive_builder",
- "either",
- "futures",
- "rio_api",
- "rio_turtle",
- "rio_xml",
- "schemars",
- "serde",
- "serde_yaml",
- "testing",
- "thiserror 2.0.17",
-]
-
-[[package]]
-name = "axone-cognitarium-client"
-version = "8.0.0"
-dependencies = [
- "axone-cognitarium",
- "cosmwasm-std",
- "serde",
-]
-
-[[package]]
-name = "axone-dataverse"
-version = "8.0.0"
-dependencies = [
- "axone-cognitarium",
- "axone-cognitarium-client",
- "axone-rdf",
- "base64",
- "bech32",
- "cosmwasm-schema",
- "cosmwasm-std",
- "cw-storage-plus",
- "cw-utils",
- "cw2",
- "itertools 0.14.0",
- "multibase",
- "rio_api",
- "ripemd",
- "serde",
- "sha2",
- "testing",
- "thiserror 2.0.17",
- "unsigned-varint",
-]
-
-[[package]]
-name = "axone-law-stone"
-version = "8.0.0"
-dependencies = [
- "axone-logic-bindings",
- "axone-objectarium",
- "axone-objectarium-client",
- "axone-wasm",
- "cosmwasm-schema",
- "cosmwasm-std",
- "cw-storage-plus",
- "cw-utils",
- "cw2",
- "itertools 0.14.0",
- "serde",
- "testing",
- "thiserror 2.0.17",
- "url",
-]
-
-[[package]]
-name = "axone-logic-bindings"
-version = "8.0.0"
-dependencies = [
- "cosmwasm-std",
- "schemars",
- "serde",
- "thiserror 2.0.17",
-]
-
-[[package]]
-name = "axone-objectarium"
+name = "axone-dummy"
version = "8.0.0"
dependencies = [
- "base16ct",
- "base64",
- "bin-it",
- "bs58",
+ "axone-dummy-lib",
"cosmwasm-schema",
"cosmwasm-std",
- "cw-ownable",
- "cw-storage-plus",
- "cw-utils",
- "cw2",
- "derive_builder",
- "enum-iterator",
- "lzma-rs",
- "md-5",
- "schemars",
- "serde",
- "sha2",
- "snap",
- "testing",
- "thiserror 2.0.17",
-]
-
-[[package]]
-name = "axone-objectarium-client"
-version = "8.0.0"
-dependencies = [
- "axone-objectarium",
- "axone-wasm",
- "cosmwasm-std",
- "serde",
-]
-
-[[package]]
-name = "axone-rdf"
-version = "8.0.0"
-dependencies = [
- "base16ct",
- "cosmwasm-std",
- "itertools 0.14.0",
- "rio_api",
- "rio_turtle",
- "rio_xml",
- "sha2",
- "thiserror 2.0.17",
]
[[package]]
-name = "axone-wasm"
+name = "axone-dummy-lib"
version = "8.0.0"
-dependencies = [
- "form_urlencoded",
- "serde",
- "serde-json-wasm",
- "thiserror 2.0.17",
- "url",
-]
-
-[[package]]
-name = "base-x"
-version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270"
[[package]]
name = "base16ct"
@@ -386,16 +166,6 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
-[[package]]
-name = "base256emoji"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5e9430d9a245a77c92176e649af6e275f20839a48389859d1661e9a128d077c"
-dependencies = [
- "const-str",
- "match-lookup",
-]
-
[[package]]
name = "base64"
version = "0.22.1"
@@ -408,31 +178,6 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d"
-[[package]]
-name = "bin-it"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efdc68b7631892303d28c13375b6a8a12508f6bbb9c8743518dad7b840d5610c"
-
-[[package]]
-name = "bitflags"
-version = "2.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1"
-
-[[package]]
-name = "blake3"
-version = "1.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0"
-dependencies = [
- "arrayref",
- "arrayvec",
- "cc",
- "cfg-if",
- "constant_time_eq",
-]
-
[[package]]
name = "block-buffer"
version = "0.10.3"
@@ -448,130 +193,24 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e31ea183f6ee62ac8b8a8cf7feddd766317adfb13ff469de57ce033efd6a790"
-[[package]]
-name = "bs58"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4"
-dependencies = [
- "tinyvec",
-]
-
-[[package]]
-name = "bstr"
-version = "1.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706"
-dependencies = [
- "memchr",
- "serde",
-]
-
-[[package]]
-name = "bytecount"
-version = "0.6.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce"
-
[[package]]
name = "byteorder"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
-[[package]]
-name = "cc"
-version = "1.1.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48"
-dependencies = [
- "shlex",
-]
-
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
-[[package]]
-name = "clap"
-version = "4.5.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0"
-dependencies = [
- "clap_builder",
- "clap_derive",
-]
-
-[[package]]
-name = "clap_builder"
-version = "4.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4"
-dependencies = [
- "anstream",
- "anstyle",
- "clap_lex",
- "strsim",
- "terminal_size",
-]
-
-[[package]]
-name = "clap_derive"
-version = "4.5.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64"
-dependencies = [
- "heck 0.5.0",
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "clap_lex"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce"
-
-[[package]]
-name = "colorchoice"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422"
-
-[[package]]
-name = "console"
-version = "0.15.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb"
-dependencies = [
- "encode_unicode",
- "lazy_static",
- "libc",
- "unicode-width",
- "windows-sys 0.52.0",
-]
-
[[package]]
name = "const-oid"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f"
-[[package]]
-name = "const-str"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f421161cb492475f1661ddc9815a745a1c894592070661180fdec3d4872e9c3"
-
-[[package]]
-name = "constant_time_eq"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6"
-
[[package]]
name = "cosmwasm-core"
version = "2.2.2"
@@ -599,7 +238,7 @@ dependencies = [
"rand_core",
"rayon",
"sha2",
- "thiserror 1.0.69",
+ "thiserror",
]
[[package]]
@@ -623,7 +262,7 @@ dependencies = [
"schemars",
"serde",
"serde_json",
- "thiserror 1.0.69",
+ "thiserror",
]
[[package]]
@@ -649,7 +288,7 @@ dependencies = [
"cosmwasm-core",
"cosmwasm-crypto",
"cosmwasm-derive",
- "derive_more 1.0.0-beta.6",
+ "derive_more",
"hex",
"rand_core",
"rmp-serde",
@@ -658,7 +297,7 @@ dependencies = [
"serde-json-wasm",
"sha2",
"static_assertions",
- "thiserror 1.0.69",
+ "thiserror",
]
[[package]]
@@ -670,21 +309,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "crc"
-version = "3.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe"
-dependencies = [
- "crc-catalog",
-]
-
-[[package]]
-name = "crc-catalog"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484"
-
[[package]]
name = "crossbeam-deque"
version = "0.8.5"
@@ -732,65 +356,6 @@ dependencies = [
"typenum",
]
-[[package]]
-name = "cucumber"
-version = "0.21.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6cd12917efc3a8b069a4975ef3cb2f2d835d42d04b3814d90838488f9dd9bf69"
-dependencies = [
- "anyhow",
- "clap",
- "console",
- "cucumber-codegen",
- "cucumber-expressions",
- "derive_more 0.99.17",
- "drain_filter_polyfill",
- "either",
- "futures",
- "gherkin",
- "globwalk",
- "humantime",
- "inventory",
- "itertools 0.13.0",
- "lazy-regex",
- "linked-hash-map",
- "once_cell",
- "pin-project",
- "regex",
- "sealed",
- "smart-default",
-]
-
-[[package]]
-name = "cucumber-codegen"
-version = "0.21.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e19cd9e8e7cfd79fbf844eb6a7334117973c01f6bad35571262b00891e60f1c"
-dependencies = [
- "cucumber-expressions",
- "inflections",
- "itertools 0.13.0",
- "proc-macro2",
- "quote",
- "regex",
- "syn 2.0.87",
- "synthez",
-]
-
-[[package]]
-name = "cucumber-expressions"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d794fed319eea24246fb5f57632f7ae38d61195817b7eb659455aa5bdd7c1810"
-dependencies = [
- "derive_more 0.99.17",
- "either",
- "nom",
- "nom_locate",
- "regex",
- "regex-syntax 0.7.5",
-]
-
[[package]]
name = "curve25519-dalek"
version = "4.1.3"
@@ -819,34 +384,20 @@ dependencies = [
]
[[package]]
-name = "cw-address-like"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73553ee4dad5b1678977ff603e72c3fdd41518ca2b0bd9b245b21e4c72eafa9e"
-dependencies = [
- "cosmwasm-std",
-]
-
-[[package]]
-name = "cw-ownable"
-version = "2.1.0"
+name = "der"
+version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed2f8ee96ac5342c795a0610410998fc075a95af8c796b6d16479cdffd2471f1"
+checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c"
dependencies = [
- "cosmwasm-schema",
- "cosmwasm-std",
- "cw-address-like",
- "cw-ownable-derive",
- "cw-storage-plus",
- "cw-utils",
- "thiserror 1.0.69",
+ "const-oid",
+ "zeroize",
]
[[package]]
-name = "cw-ownable-derive"
-version = "0.6.0"
+name = "derivative"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e69178d27793063dd13812777709cf7d7860ba35a598094d4bd89e1b30c9341"
+checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
dependencies = [
"proc-macro2",
"quote",
@@ -854,194 +405,31 @@ dependencies = [
]
[[package]]
-name = "cw-storage-plus"
-version = "2.0.0"
+name = "derive_more"
+version = "1.0.0-beta.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f13360e9007f51998d42b1bc6b7fa0141f74feae61ed5fd1e5b0a89eec7b5de1"
+checksum = "f7abbfc297053be59290e3152f8cbcd52c8642e0728b69ee187d991d4c1af08d"
dependencies = [
- "cosmwasm-std",
- "schemars",
- "serde",
+ "derive_more-impl",
]
[[package]]
-name = "cw-utils"
-version = "2.0.0"
+name = "derive_more-impl"
+version = "1.0.0-beta.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07dfee7f12f802431a856984a32bce1cb7da1e6c006b5409e3981035ce562dec"
+checksum = "2bba3e9872d7c58ce7ef0fcf1844fcc3e23ef2a58377b50df35dd98e42a5726e"
dependencies = [
- "cosmwasm-schema",
- "cosmwasm-std",
- "schemars",
- "serde",
- "thiserror 1.0.69",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+ "unicode-xid",
]
[[package]]
-name = "cw2"
-version = "2.0.0"
+name = "digest"
+version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b04852cd38f044c0751259d5f78255d07590d136b8a86d4e09efdd7666bd6d27"
-dependencies = [
- "cosmwasm-schema",
- "cosmwasm-std",
- "cw-storage-plus",
- "schemars",
- "semver",
- "serde",
- "thiserror 1.0.69",
-]
-
-[[package]]
-name = "darling"
-version = "0.20.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
-dependencies = [
- "darling_core",
- "darling_macro",
-]
-
-[[package]]
-name = "darling_core"
-version = "0.20.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5"
-dependencies = [
- "fnv",
- "ident_case",
- "proc-macro2",
- "quote",
- "strsim",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "darling_macro"
-version = "0.20.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
-dependencies = [
- "darling_core",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "data-encoding"
-version = "2.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"
-
-[[package]]
-name = "data-encoding-macro"
-version = "0.1.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e"
-dependencies = [
- "data-encoding",
- "data-encoding-macro-internal",
-]
-
-[[package]]
-name = "data-encoding-macro-internal"
-version = "0.1.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3"
-dependencies = [
- "data-encoding",
- "syn 1.0.107",
-]
-
-[[package]]
-name = "der"
-version = "0.7.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c"
-dependencies = [
- "const-oid",
- "zeroize",
-]
-
-[[package]]
-name = "derivative"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 1.0.107",
-]
-
-[[package]]
-name = "derive_builder"
-version = "0.20.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947"
-dependencies = [
- "derive_builder_macro",
-]
-
-[[package]]
-name = "derive_builder_core"
-version = "0.20.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8"
-dependencies = [
- "darling",
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "derive_builder_macro"
-version = "0.20.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c"
-dependencies = [
- "derive_builder_core",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "derive_more"
-version = "0.99.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 1.0.107",
-]
-
-[[package]]
-name = "derive_more"
-version = "1.0.0-beta.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7abbfc297053be59290e3152f8cbcd52c8642e0728b69ee187d991d4c1af08d"
-dependencies = [
- "derive_more-impl",
-]
-
-[[package]]
-name = "derive_more-impl"
-version = "1.0.0-beta.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bba3e9872d7c58ce7ef0fcf1844fcc3e23ef2a58377b50df35dd98e42a5726e"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
- "unicode-xid",
-]
-
-[[package]]
-name = "digest"
-version = "0.10.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer",
"const-oid",
@@ -1049,23 +437,6 @@ dependencies = [
"subtle",
]
-[[package]]
-name = "displaydoc"
-version = "0.2.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "drain_filter_polyfill"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "669a445ee724c5c69b1b06fe0b63e70a1c84bc9bb7d9696cd4f4e3ec45050408"
-
[[package]]
name = "dyn-clone"
version = "1.0.9"
@@ -1133,48 +504,6 @@ dependencies = [
"zeroize",
]
-[[package]]
-name = "encode_unicode"
-version = "0.3.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
-
-[[package]]
-name = "enum-iterator"
-version = "2.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c280b9e6b3ae19e152d8e31cf47f18389781e119d4013a2a2bb0180e5facc635"
-dependencies = [
- "enum-iterator-derive",
-]
-
-[[package]]
-name = "enum-iterator-derive"
-version = "1.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "equivalent"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
-
-[[package]]
-name = "errno"
-version = "0.3.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
-dependencies = [
- "libc",
- "windows-sys 0.52.0",
-]
-
[[package]]
name = "ff"
version = "0.13.0"
@@ -1191,110 +520,6 @@ version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
-[[package]]
-name = "fnv"
-version = "1.0.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
-
-[[package]]
-name = "form_urlencoded"
-version = "1.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
-dependencies = [
- "percent-encoding",
-]
-
-[[package]]
-name = "futures"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
-dependencies = [
- "futures-channel",
- "futures-core",
- "futures-executor",
- "futures-io",
- "futures-sink",
- "futures-task",
- "futures-util",
-]
-
-[[package]]
-name = "futures-channel"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
-dependencies = [
- "futures-core",
- "futures-sink",
-]
-
-[[package]]
-name = "futures-core"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
-
-[[package]]
-name = "futures-executor"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
-dependencies = [
- "futures-core",
- "futures-task",
- "futures-util",
-]
-
-[[package]]
-name = "futures-io"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
-
-[[package]]
-name = "futures-macro"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "futures-sink"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
-
-[[package]]
-name = "futures-task"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
-
-[[package]]
-name = "futures-util"
-version = "0.3.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
-dependencies = [
- "futures-channel",
- "futures-core",
- "futures-io",
- "futures-macro",
- "futures-sink",
- "futures-task",
- "memchr",
- "pin-project-lite",
- "pin-utils",
- "slab",
-]
-
[[package]]
name = "generic-array"
version = "0.14.6"
@@ -1317,47 +542,6 @@ dependencies = [
"wasi",
]
-[[package]]
-name = "gherkin"
-version = "0.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20b79820c0df536d1f3a089a2fa958f61cb96ce9e0f3f8f507f5a31179567755"
-dependencies = [
- "heck 0.4.1",
- "peg",
- "quote",
- "serde",
- "serde_json",
- "syn 2.0.87",
- "textwrap",
- "thiserror 1.0.69",
- "typed-builder",
-]
-
-[[package]]
-name = "globset"
-version = "0.4.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1"
-dependencies = [
- "aho-corasick",
- "bstr",
- "log",
- "regex-automata",
- "regex-syntax 0.8.3",
-]
-
-[[package]]
-name = "globwalk"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757"
-dependencies = [
- "bitflags",
- "ignore",
- "walkdir",
-]
-
[[package]]
name = "group"
version = "0.13.0"
@@ -1388,18 +572,6 @@ dependencies = [
"allocator-api2",
]
-[[package]]
-name = "heck"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
-
-[[package]]
-name = "heck"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
-
[[package]]
name = "hex"
version = "0.4.3"
@@ -1416,380 +588,44 @@ dependencies = [
]
[[package]]
-name = "humantime"
-version = "2.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
-
-[[package]]
-name = "icu_collections"
-version = "1.5.0"
+name = "itertools"
+version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
dependencies = [
- "displaydoc",
- "yoke",
- "zerofrom",
- "zerovec",
+ "either",
]
[[package]]
-name = "icu_locid"
-version = "1.5.0"
+name = "itoa"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637"
-dependencies = [
- "displaydoc",
- "litemap",
- "tinystr",
- "writeable",
- "zerovec",
-]
+checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754"
[[package]]
-name = "icu_locid_transform"
-version = "1.5.0"
+name = "k256"
+version = "0.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e"
+checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b"
dependencies = [
- "displaydoc",
- "icu_locid",
- "icu_locid_transform_data",
- "icu_provider",
- "tinystr",
- "zerovec",
+ "cfg-if",
+ "ecdsa",
+ "elliptic-curve",
+ "sha2",
]
[[package]]
-name = "icu_locid_transform_data"
-version = "1.5.0"
+name = "libc"
+version = "0.2.152"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e"
+checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7"
[[package]]
-name = "icu_normalizer"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f"
-dependencies = [
- "displaydoc",
- "icu_collections",
- "icu_normalizer_data",
- "icu_properties",
- "icu_provider",
- "smallvec",
- "utf16_iter",
- "utf8_iter",
- "write16",
- "zerovec",
-]
-
-[[package]]
-name = "icu_normalizer_data"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516"
-
-[[package]]
-name = "icu_properties"
-version = "1.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5"
-dependencies = [
- "displaydoc",
- "icu_collections",
- "icu_locid_transform",
- "icu_properties_data",
- "icu_provider",
- "tinystr",
- "zerovec",
-]
-
-[[package]]
-name = "icu_properties_data"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569"
-
-[[package]]
-name = "icu_provider"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9"
-dependencies = [
- "displaydoc",
- "icu_locid",
- "icu_provider_macros",
- "stable_deref_trait",
- "tinystr",
- "writeable",
- "yoke",
- "zerofrom",
- "zerovec",
-]
-
-[[package]]
-name = "icu_provider_macros"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "ident_case"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
-
-[[package]]
-name = "idna"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
-dependencies = [
- "idna_adapter",
- "smallvec",
- "utf8_iter",
-]
-
-[[package]]
-name = "idna_adapter"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71"
-dependencies = [
- "icu_normalizer",
- "icu_properties",
-]
-
-[[package]]
-name = "ignore"
-version = "0.4.22"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1"
-dependencies = [
- "crossbeam-deque",
- "globset",
- "log",
- "memchr",
- "regex-automata",
- "same-file",
- "walkdir",
- "winapi-util",
-]
-
-[[package]]
-name = "indexmap"
-version = "2.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"
-dependencies = [
- "equivalent",
- "hashbrown 0.14.5",
-]
-
-[[package]]
-name = "inflections"
-version = "1.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a257582fdcde896fd96463bf2d40eefea0580021c0712a0e2b028b60b47a837a"
-
-[[package]]
-name = "inventory"
-version = "0.3.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767"
-
-[[package]]
-name = "is_terminal_polyfill"
-version = "1.70.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800"
-
-[[package]]
-name = "itertools"
-version = "0.10.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
-dependencies = [
- "either",
-]
-
-[[package]]
-name = "itertools"
-version = "0.13.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
-dependencies = [
- "either",
-]
-
-[[package]]
-name = "itertools"
-version = "0.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285"
-dependencies = [
- "either",
-]
-
-[[package]]
-name = "itoa"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754"
-
-[[package]]
-name = "k256"
-version = "0.13.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b"
-dependencies = [
- "cfg-if",
- "ecdsa",
- "elliptic-curve",
- "sha2",
-]
-
-[[package]]
-name = "lazy-regex"
-version = "3.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d12be4595afdf58bd19e4a9f4e24187da2a66700786ff660a418e9059937a4c"
-dependencies = [
- "lazy-regex-proc_macros",
- "once_cell",
- "regex",
-]
-
-[[package]]
-name = "lazy-regex-proc_macros"
-version = "3.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44bcd58e6c97a7fcbaffcdc95728b393b8d98933bfadad49ed4097845b57ef0b"
-dependencies = [
- "proc-macro2",
- "quote",
- "regex",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "lazy_static"
-version = "1.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
-
-[[package]]
-name = "libc"
-version = "0.2.152"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7"
-
-[[package]]
-name = "linked-hash-map"
-version = "0.5.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
-
-[[package]]
-name = "linux-raw-sys"
-version = "0.4.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
-
-[[package]]
-name = "litemap"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704"
-
-[[package]]
-name = "log"
-version = "0.4.21"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
-
-[[package]]
-name = "lzma-rs"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e"
-dependencies = [
- "byteorder",
- "crc",
-]
-
-[[package]]
-name = "match-lookup"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1265724d8cb29dbbc2b0f06fffb8bf1a8c0cf73a78eede9ba73a4a66c52a981e"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 1.0.107",
-]
-
-[[package]]
-name = "md-5"
-version = "0.10.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"
-dependencies = [
- "cfg-if",
- "digest",
-]
-
-[[package]]
-name = "memchr"
-version = "2.7.2"
+name = "memchr"
+version = "2.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d"
-[[package]]
-name = "minimal-lexical"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
-
-[[package]]
-name = "multibase"
-version = "0.9.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8694bb4835f452b0e3bb06dbebb1d6fc5385b6ca1caf2e55fd165c042390ec77"
-dependencies = [
- "base-x",
- "base256emoji",
- "data-encoding",
- "data-encoding-macro",
-]
-
-[[package]]
-name = "nom"
-version = "7.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
-dependencies = [
- "memchr",
- "minimal-lexical",
-]
-
-[[package]]
-name = "nom_locate"
-version = "4.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e3c83c053b0713da60c5b8de47fe8e494fe3ece5267b2f23090a07a053ba8f3"
-dependencies = [
- "bytecount",
- "memchr",
- "nom",
-]
-
[[package]]
name = "num-bigint"
version = "0.4.6"
@@ -1824,18 +660,6 @@ version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
-[[package]]
-name = "oxilangtag"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d91edf4fbb970279443471345a4e8c491bf05bb283b3e6c88e4e606fd8c181b"
-
-[[package]]
-name = "oxiri"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb175ec8981211357b7b379869c2f8d555881c55ea62311428ec0de46d89bd5c"
-
[[package]]
name = "p256"
version = "0.13.2"
@@ -1854,71 +678,6 @@ version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
-[[package]]
-name = "peg"
-version = "0.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f76678828272f177ac33b7e2ac2e3e73cc6c1cd1e3e387928aa69562fa51367"
-dependencies = [
- "peg-macros",
- "peg-runtime",
-]
-
-[[package]]
-name = "peg-macros"
-version = "0.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "636d60acf97633e48d266d7415a9355d4389cea327a193f87df395d88cd2b14d"
-dependencies = [
- "peg-runtime",
- "proc-macro2",
- "quote",
-]
-
-[[package]]
-name = "peg-runtime"
-version = "0.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9555b1514d2d99d78150d3c799d4c357a3e2c2a8062cd108e93a06d9057629c5"
-
-[[package]]
-name = "percent-encoding"
-version = "2.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
-
-[[package]]
-name = "pin-project"
-version = "1.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3"
-dependencies = [
- "pin-project-internal",
-]
-
-[[package]]
-name = "pin-project-internal"
-version = "1.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "pin-project-lite"
-version = "0.2.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02"
-
-[[package]]
-name = "pin-utils"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
-
[[package]]
name = "ppv-lite86"
version = "0.2.18"
@@ -1941,895 +700,325 @@ dependencies = [
name = "proc-macro2"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
-dependencies = [
- "unicode-ident",
-]
-
-[[package]]
-name = "quick-xml"
-version = "0.36.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96a05e2e8efddfa51a84ca47cec303fac86c8541b686d37cac5efc0e094417bc"
-dependencies = [
- "memchr",
-]
-
-[[package]]
-name = "quote"
-version = "1.0.35"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
-dependencies = [
- "proc-macro2",
-]
-
-[[package]]
-name = "rand"
-version = "0.8.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
-dependencies = [
- "rand_chacha",
- "rand_core",
-]
-
-[[package]]
-name = "rand_chacha"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
-dependencies = [
- "ppv-lite86",
- "rand_core",
-]
-
-[[package]]
-name = "rand_core"
-version = "0.6.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
-dependencies = [
- "getrandom",
-]
-
-[[package]]
-name = "rayon"
-version = "1.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
-dependencies = [
- "either",
- "rayon-core",
-]
-
-[[package]]
-name = "rayon-core"
-version = "1.12.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
-dependencies = [
- "crossbeam-deque",
- "crossbeam-utils",
-]
-
-[[package]]
-name = "regex"
-version = "1.10.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-automata",
- "regex-syntax 0.8.3",
-]
-
-[[package]]
-name = "regex-automata"
-version = "0.4.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-syntax 0.8.3",
-]
-
-[[package]]
-name = "regex-syntax"
-version = "0.7.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da"
-
-[[package]]
-name = "regex-syntax"
-version = "0.8.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56"
-
-[[package]]
-name = "rfc6979"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2"
-dependencies = [
- "hmac",
- "subtle",
-]
-
-[[package]]
-name = "rio_api"
-version = "0.8.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61d0c76ddf8b00cbb4d2c5932d067d49245c2f1f651809bde3cf265033ddb1af"
-
-[[package]]
-name = "rio_turtle"
-version = "0.8.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6f351b77353c7c896f0cd5ced2a25a7e95b5360cb68d1d7c16682ee096d7f40"
-dependencies = [
- "oxilangtag",
- "oxiri",
- "rio_api",
-]
-
-[[package]]
-name = "rio_xml"
-version = "0.8.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abd3384ae785ed3b0159607adc08adef580a28e277fbfa375c42d162e9da93b1"
-dependencies = [
- "oxilangtag",
- "oxiri",
- "quick-xml",
- "rio_api",
-]
-
-[[package]]
-name = "ripemd"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f"
-dependencies = [
- "digest",
-]
-
-[[package]]
-name = "rmp"
-version = "0.8.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4"
-dependencies = [
- "byteorder",
- "num-traits",
- "paste",
-]
-
-[[package]]
-name = "rmp-serde"
-version = "1.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db"
-dependencies = [
- "byteorder",
- "rmp",
- "serde",
-]
-
-[[package]]
-name = "rustc_version"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
-dependencies = [
- "semver",
-]
-
-[[package]]
-name = "rustix"
-version = "0.38.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949"
-dependencies = [
- "bitflags",
- "errno",
- "libc",
- "linux-raw-sys",
- "windows-sys 0.52.0",
-]
-
-[[package]]
-name = "ryu"
-version = "1.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
-
-[[package]]
-name = "same-file"
-version = "1.0.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
-dependencies = [
- "winapi-util",
-]
-
-[[package]]
-name = "schemars"
-version = "0.8.22"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615"
-dependencies = [
- "dyn-clone",
- "schemars_derive",
- "serde",
- "serde_json",
-]
-
-[[package]]
-name = "schemars_derive"
-version = "0.8.22"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d"
-dependencies = [
- "proc-macro2",
- "quote",
- "serde_derive_internals",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "sealed"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4a8caec23b7800fb97971a1c6ae365b6239aaeddfb934d6265f8505e795699d"
-dependencies = [
- "heck 0.4.1",
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "sec1"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48518a2b5775ba8ca5b46596aae011caa431e6ce7e4a67ead66d92f08884220e"
-dependencies = [
- "base16ct",
- "der",
- "generic-array",
- "subtle",
- "zeroize",
-]
-
-[[package]]
-name = "semver"
-version = "1.0.23"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
-
-[[package]]
-name = "serde"
-version = "1.0.228"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
-dependencies = [
- "serde_core",
- "serde_derive",
-]
-
-[[package]]
-name = "serde-json-wasm"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f05da0d153dd4595bdffd5099dc0e9ce425b205ee648eb93437ff7302af8c9a5"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "serde_core"
-version = "1.0.228"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
-dependencies = [
- "serde_derive",
-]
-
-[[package]]
-name = "serde_derive"
-version = "1.0.228"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "serde_derive_internals"
-version = "0.29.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "serde_json"
-version = "1.0.133"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
-dependencies = [
- "itoa",
- "memchr",
- "ryu",
- "serde",
-]
-
-[[package]]
-name = "serde_yaml"
-version = "0.9.34+deprecated"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
-dependencies = [
- "indexmap",
- "itoa",
- "ryu",
- "serde",
- "unsafe-libyaml",
-]
-
-[[package]]
-name = "sha2"
-version = "0.10.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
-dependencies = [
- "cfg-if",
- "cpufeatures",
- "digest",
-]
-
-[[package]]
-name = "shlex"
-version = "1.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
-
-[[package]]
-name = "signature"
-version = "2.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500"
-dependencies = [
- "digest",
- "rand_core",
-]
-
-[[package]]
-name = "slab"
-version = "0.4.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
-dependencies = [
- "autocfg",
-]
-
-[[package]]
-name = "smallvec"
-version = "1.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
-
-[[package]]
-name = "smart-default"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0eb01866308440fc64d6c44d9e86c5cc17adfe33c4d6eed55da9145044d0ffc1"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "smawk"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c"
-
-[[package]]
-name = "snap"
-version = "1.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b"
-
-[[package]]
-name = "stable_deref_trait"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
-
-[[package]]
-name = "static_assertions"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
-
-[[package]]
-name = "strsim"
-version = "0.11.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
-
-[[package]]
-name = "subtle"
-version = "2.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
-
-[[package]]
-name = "syn"
-version = "1.0.107"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
-dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
-]
-
-[[package]]
-name = "syn"
-version = "2.0.87"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
-dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
-]
-
-[[package]]
-name = "synstructure"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "synthez"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3d2c2202510a1e186e63e596d9318c91a8cbe85cd1a56a7be0c333e5f59ec8d"
-dependencies = [
- "syn 2.0.87",
- "synthez-codegen",
- "synthez-core",
-]
-
-[[package]]
-name = "synthez-codegen"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f724aa6d44b7162f3158a57bccd871a77b39a4aef737e01bcdff41f4772c7746"
-dependencies = [
- "syn 2.0.87",
- "synthez-core",
-]
-
-[[package]]
-name = "synthez-core"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78bfa6ec52465e2425fd43ce5bbbe0f0b623964f7c63feb6b10980e816c654ea"
-dependencies = [
- "proc-macro2",
- "quote",
- "sealed",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "terminal_size"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7"
-dependencies = [
- "rustix",
- "windows-sys 0.48.0",
-]
-
-[[package]]
-name = "testing"
-version = "5.0.0"
-dependencies = [
- "cosmwasm-std",
-]
-
-[[package]]
-name = "textwrap"
-version = "0.16.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9"
-dependencies = [
- "smawk",
- "unicode-linebreak",
- "unicode-width",
-]
-
-[[package]]
-name = "thiserror"
-version = "1.0.69"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
-dependencies = [
- "thiserror-impl 1.0.69",
-]
-
-[[package]]
-name = "thiserror"
-version = "2.0.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8"
-dependencies = [
- "thiserror-impl 2.0.17",
-]
-
-[[package]]
-name = "thiserror-impl"
-version = "1.0.69"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "thiserror-impl"
-version = "2.0.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "tinystr"
-version = "0.7.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
-dependencies = [
- "displaydoc",
- "zerovec",
-]
-
-[[package]]
-name = "tinyvec"
-version = "1.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
-dependencies = [
- "tinyvec_macros",
-]
-
-[[package]]
-name = "tinyvec_macros"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
-
-[[package]]
-name = "typed-builder"
-version = "0.15.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fe83c85a85875e8c4cb9ce4a890f05b23d38cd0d47647db7895d3d2a79566d2"
-dependencies = [
- "typed-builder-macro",
-]
-
-[[package]]
-name = "typed-builder-macro"
-version = "0.15.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "29a3151c41d0b13e3d011f98adc24434560ef06673a155a6c7f66b9879eecce2"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
-
-[[package]]
-name = "typenum"
-version = "1.15.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
-
-[[package]]
-name = "unicode-ident"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd"
-
-[[package]]
-name = "unicode-linebreak"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f"
+checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
+dependencies = [
+ "unicode-ident",
+]
[[package]]
-name = "unicode-width"
-version = "0.1.12"
+name = "quote"
+version = "1.0.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6"
+checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
+dependencies = [
+ "proc-macro2",
+]
[[package]]
-name = "unicode-xid"
-version = "0.2.4"
+name = "rand"
+version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "rand_chacha",
+ "rand_core",
+]
[[package]]
-name = "unsafe-libyaml"
-version = "0.2.11"
+name = "rand_chacha"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core",
+]
[[package]]
-name = "unsigned-varint"
-version = "0.8.0"
+name = "rand_core"
+version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom",
+]
[[package]]
-name = "url"
-version = "2.5.7"
+name = "rayon"
+version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b"
+checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
dependencies = [
- "form_urlencoded",
- "idna",
- "percent-encoding",
- "serde",
+ "either",
+ "rayon-core",
]
[[package]]
-name = "utf16_iter"
-version = "1.0.5"
+name = "rayon-core"
+version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246"
+checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
+dependencies = [
+ "crossbeam-deque",
+ "crossbeam-utils",
+]
[[package]]
-name = "utf8_iter"
-version = "1.0.4"
+name = "rfc6979"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
+checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2"
+dependencies = [
+ "hmac",
+ "subtle",
+]
[[package]]
-name = "utf8parse"
-version = "0.2.1"
+name = "rmp"
+version = "0.8.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
+checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4"
+dependencies = [
+ "byteorder",
+ "num-traits",
+ "paste",
+]
[[package]]
-name = "version_check"
-version = "0.9.4"
+name = "rmp-serde"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db"
+dependencies = [
+ "byteorder",
+ "rmp",
+ "serde",
+]
[[package]]
-name = "walkdir"
-version = "2.5.0"
+name = "rustc_version"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
+checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
- "same-file",
- "winapi-util",
+ "semver",
]
[[package]]
-name = "wasi"
-version = "0.11.0+wasi-snapshot-preview1"
+name = "ryu"
+version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
[[package]]
-name = "winapi-util"
-version = "0.1.8"
+name = "schemars"
+version = "0.8.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b"
+checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615"
dependencies = [
- "windows-sys 0.52.0",
+ "dyn-clone",
+ "schemars_derive",
+ "serde",
+ "serde_json",
]
[[package]]
-name = "windows-sys"
-version = "0.48.0"
+name = "schemars_derive"
+version = "0.8.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d"
dependencies = [
- "windows-targets 0.48.5",
+ "proc-macro2",
+ "quote",
+ "serde_derive_internals",
+ "syn 2.0.87",
]
[[package]]
-name = "windows-sys"
-version = "0.52.0"
+name = "sec1"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
+checksum = "48518a2b5775ba8ca5b46596aae011caa431e6ce7e4a67ead66d92f08884220e"
dependencies = [
- "windows-targets 0.52.5",
+ "base16ct",
+ "der",
+ "generic-array",
+ "subtle",
+ "zeroize",
]
[[package]]
-name = "windows-targets"
-version = "0.48.5"
+name = "semver"
+version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
-dependencies = [
- "windows_aarch64_gnullvm 0.48.5",
- "windows_aarch64_msvc 0.48.5",
- "windows_i686_gnu 0.48.5",
- "windows_i686_msvc 0.48.5",
- "windows_x86_64_gnu 0.48.5",
- "windows_x86_64_gnullvm 0.48.5",
- "windows_x86_64_msvc 0.48.5",
-]
+checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
[[package]]
-name = "windows-targets"
-version = "0.52.5"
+name = "serde"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb"
+checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [
- "windows_aarch64_gnullvm 0.52.5",
- "windows_aarch64_msvc 0.52.5",
- "windows_i686_gnu 0.52.5",
- "windows_i686_gnullvm",
- "windows_i686_msvc 0.52.5",
- "windows_x86_64_gnu 0.52.5",
- "windows_x86_64_gnullvm 0.52.5",
- "windows_x86_64_msvc 0.52.5",
+ "serde_core",
+ "serde_derive",
]
[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.48.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
-
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.52.5"
+name = "serde-json-wasm"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"
+checksum = "f05da0d153dd4595bdffd5099dc0e9ce425b205ee648eb93437ff7302af8c9a5"
+dependencies = [
+ "serde",
+]
[[package]]
-name = "windows_aarch64_msvc"
-version = "0.48.5"
+name = "serde_core"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
+dependencies = [
+ "serde_derive",
+]
[[package]]
-name = "windows_aarch64_msvc"
-version = "0.52.5"
+name = "serde_derive"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"
+checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
[[package]]
-name = "windows_i686_gnu"
-version = "0.48.5"
+name = "serde_derive_internals"
+version = "0.29.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
[[package]]
-name = "windows_i686_gnu"
-version = "0.52.5"
+name = "serde_json"
+version = "1.0.133"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670"
+checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
+dependencies = [
+ "itoa",
+ "memchr",
+ "ryu",
+ "serde",
+]
[[package]]
-name = "windows_i686_gnullvm"
-version = "0.52.5"
+name = "sha2"
+version = "0.10.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9"
+checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
[[package]]
-name = "windows_i686_msvc"
-version = "0.48.5"
+name = "signature"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500"
+dependencies = [
+ "digest",
+ "rand_core",
+]
[[package]]
-name = "windows_i686_msvc"
-version = "0.52.5"
+name = "static_assertions"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
-name = "windows_x86_64_gnu"
-version = "0.48.5"
+name = "subtle"
+version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
[[package]]
-name = "windows_x86_64_gnu"
-version = "0.52.5"
+name = "syn"
+version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"
+checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.48.5"
+name = "syn"
+version = "2.0.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.52.5"
+name = "thiserror"
+version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl",
+]
[[package]]
-name = "windows_x86_64_msvc"
-version = "0.48.5"
+name = "thiserror-impl"
+version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
[[package]]
-name = "windows_x86_64_msvc"
-version = "0.52.5"
+name = "typenum"
+version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
+checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
[[package]]
-name = "write16"
-version = "1.0.0"
+name = "unicode-ident"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936"
+checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd"
[[package]]
-name = "writeable"
-version = "0.5.5"
+name = "unicode-xid"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
+checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
[[package]]
-name = "yoke"
-version = "0.7.4"
+name = "version_check"
+version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5"
-dependencies = [
- "serde",
- "stable_deref_trait",
- "yoke-derive",
- "zerofrom",
-]
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
-name = "yoke-derive"
-version = "0.7.4"
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
- "synstructure",
-]
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "zerocopy"
@@ -2872,27 +1061,6 @@ dependencies = [
"syn 2.0.87",
]
-[[package]]
-name = "zerofrom"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55"
-dependencies = [
- "zerofrom-derive",
-]
-
-[[package]]
-name = "zerofrom-derive"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
- "synstructure",
-]
-
[[package]]
name = "zeroize"
version = "1.7.0"
@@ -2912,25 +1080,3 @@ dependencies = [
"quote",
"syn 2.0.87",
]
-
-[[package]]
-name = "zerovec"
-version = "0.10.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079"
-dependencies = [
- "yoke",
- "zerofrom",
- "zerovec-derive",
-]
-
-[[package]]
-name = "zerovec-derive"
-version = "0.10.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.87",
-]
diff --git a/Cargo.toml b/Cargo.toml
index 0d1cbd47..3d3a1523 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,32 +24,6 @@ panic = 'abort'
rpath = false
[workspace.dependencies]
-axone-cognitarium = { path = "./contracts/axone-cognitarium", version = "8.0.0", features = [
- "library",
-] }
-axone-cognitarium-client = { path = "./packages/axone-cognitarium-client", version = "8.0.0" }
-axone-logic-bindings = { path = "./packages/axone-logic-bindings", version = "8.0.0" }
-axone-objectarium = { path = "./contracts/axone-objectarium", version = "8.0.0", features = [
- "library",
-] }
-axone-objectarium-client = { path = "./packages/axone-objectarium-client", version = "8.0.0" }
-axone-rdf = { path = "./packages/axone-rdf", version = "8.0.0" }
-axone-wasm = { path = "./packages/axone-wasm", version = "8.0.0" }
cosmwasm-schema = "2.2.2"
cosmwasm-std = { version = "2.2.2", features = ["cosmwasm_2_2"] }
-cosmwasm-storage = "1.5.2"
-cw-multi-test = "2.2.0"
-cw-storage-plus = "2.0.0"
-cw-utils = "2.0.0"
-cw2 = "2.0.0"
-iref = "3.1.3"
-langtag = "0.3.4"
-rdf-types = "0.18.2"
-rio_api = "0.8.5"
-rio_turtle = "0.8.5"
-rio_xml = "0.8.5"
-schemars = "0.8.22"
serde = { version = "1.0.228", default-features = false, features = ["derive"] }
-serde-json-wasm = "1.0.1"
-testing = { path = "packages/testing" }
-thiserror = { version = "2.0.17" }
diff --git a/README.md b/README.md
index 9c3b6bb0..3b8beafb 100644
--- a/README.md
+++ b/README.md
@@ -12,163 +12,20 @@
[](https://github.com/semantic-release/semantic-release)
[](https://opensource.org/licenses/BSD-3-Clause)
+## 🚧⚠️ **Repo under reconstruction** ⚠️🚧
+
+### Hey there! We're rebuilding the smart contract stack from the ground up
+
+*Old code has been archived, and a new foundation is on its way.*
+
+Looking for the previous implementation?
+👉 Check the [**last release**](https://github.com/axone-protocol/contracts/releases/v8.0.0).
+
## ✨ Smart Contracts
This repository hosts Smart Contracts that are deployed on the [AXONE network](http://axone.xyz). But they are compatible with any
[Cosmos blockchains](https://cosmos.network/) that uses the [CosmWasm](https://cosmwasm.com/) framework.
-### 🗄️ Storage oriented Smart Contracts
-
-> The class of Smart Contracts which act as reliable repositories, offering secure, efficient, and auditable storage
-> and retrieval of various data types on the blockchain.
-
-
-
-
-
-### ⚖️ Sovereignty oriented Smart Contracts
-
-> The class of Smart Contracts designed to prioritize the sovereignty of the involved parties by allowing them to define and enforce their own rules and regulations.
-
-
-
-### 🌐 Resource Management oriented Smart Contracts
-
-> The class of Smart Contracts designed to manage and orchestrate the lifecycle of various resources in the Dataverse.
-
-
-
## 🥚 Maturity
The maturity of each contract is indicated by the following emojis.
diff --git a/contracts/axone-cognitarium/Cargo.toml b/contracts/axone-cognitarium/Cargo.toml
deleted file mode 100644
index 73e75c77..00000000
--- a/contracts/axone-cognitarium/Cargo.toml
+++ /dev/null
@@ -1,55 +0,0 @@
-[package]
-authors = { workspace = true }
-description = "A CosmWasm Smart Contract which enables the storage and querying of Semantic data using RDF, which represents information as semantic triples."
-edition = { workspace = true }
-homepage = { workspace = true }
-keywords = { workspace = true }
-license = { workspace = true }
-name = "axone-cognitarium"
-repository = { workspace = true }
-rust-version = { workspace = true }
-version = { workspace = true }
-
-exclude = [
- # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication.
- "contract.wasm",
- "hash.txt",
-]
-
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
-
-[lib]
-crate-type = ["cdylib", "rlib"]
-
-[dependencies]
-axone-rdf.workspace = true
-blake3 = "1.8.2"
-cosmwasm-schema.workspace = true
-cosmwasm-std.workspace = true
-cw-storage-plus.workspace = true
-cw-utils.workspace = true
-cw2.workspace = true
-derive_builder = "0.20.2"
-either = "1.15.0"
-rio_api.workspace = true
-rio_turtle.workspace = true
-rio_xml.workspace = true
-schemars.workspace = true
-serde.workspace = true
-thiserror.workspace = true
-
-[dev-dependencies]
-base64 = "0.22.1"
-cucumber = "0.21.1"
-futures = "0.3.31"
-serde_yaml = "0.9.34"
-testing.workspace = true
-
-[features]
-# use library feature to disable all instantiate/execute/query exports
-library = []
-
-[[test]]
-harness = false
-name = "cucumber"
-path = "tests/e2e/main.rs"
diff --git a/contracts/axone-cognitarium/README.md b/contracts/axone-cognitarium/README.md
deleted file mode 100644
index 47e9c008..00000000
--- a/contracts/axone-cognitarium/README.md
+++ /dev/null
@@ -1,377 +0,0 @@
-# Cognitarium
-
-A [CosmWasm](https://cosmwasm.com/) Smart Contract which enables the storage and querying of Semantic data using [RDF (Resource Description Framework)](https://en.wikipedia.org/wiki/Resource_Description_Framework), which represents information as semantic triples.
-
-## Purpose
-
-The Smart Contract operates as a [semantic database](https://en.wikipedia.org/wiki/Triplestore), adept at storing and fetching [RDF triples](https://en.wikipedia.org/wiki/Semantic_triple) via semantic queries. It can be deployed on any blockchain within the [Cosmos blockchains](https://cosmos.network/) network, utilizing the [CosmWasm](https://cosmwasm.com/) framework.
-
-The key features of the contract include:
-
-**Insertion of RDF Triples:**
-This functionality enables the insertion of new data in the form of [RDF triples](https://en.wikipedia.org/wiki/Semantic_triple) onto the blockchain, ensuring secure and tamper-proof storage. The Smart Contract supports inserting these triples in various serialization formats including [RDF/XML](https://en.wikipedia.org/wiki/RDF/XML), [Turtle](https://www.w3.org/TR/turtle/), [N-Triples](https://www.w3.org/TR/n-triples/) and [N-Quads](https://www.w3.org/TR/n-quads/).
-
-**Removal of RDF Triples:**
-This functionality enables the selective deletion of RDF triples from the on-chain store. Users can specify patterns or criteria that identify the triples to be removed, ensuring precise and targeted removal of data.
-
-**Querying of RDF Triples:**
-The Smart Contract provides powerful on-chain querying capabilities, allowing users to retrieve specific RDF triples stored on the blockchain. This is done using a variation of [SPARQL](https://www.w3.org/TR/sparql11-query/), a specialized query language designed for retrieving and manipulating data stored in RDF format. Users can specify their search criteria in the query, and the Smart Contract will return the matching RDF triples, directly accessing the on-chain data. This feature supports various serialization formats for the output, such as Turtle, N-Triples, N-Quads, and RDF/XML, offering flexibility in how the retrieved data is presented and used.
-
-**Policies of the Store:**
-The Smart Contract includes a straightforward yet effective policies functionality to manage the capacity and usage of the on-chain storage effectively. These policies ensure efficient operation and prevent misuse or overuse of the Smart Contract. For instance:
-
-- Maximum Triples: Caps the total number of RDF triples the store can hold, preventing database overload.
-- Storage Size Limit: Sets an upper bound on the store's data size in bytes, managing blockchain resource use.
-- Query Size Limit: Restricts the size or complexity of queries to maintain fast and reliable data retrieval.
-- Insert Data Limit: Limits the size of data (in bytes) that can be added in a single transaction, ensuring smooth and efficient data insertion.
-
-## Rationale
-
-The data preserved in the blockchain holds significant value due to its derivation from a distributed consensus, rendering it a reliable source for decision-making, applicable to both on-chain and off-chain scenarios.
-
-To effectively utilize this data, it's essential to adopt representation models that cater to diverse requirements. The Smart Contract Cognitarium provides such a model, facilitating the depiction of intricate and evolving semantic connections within a highly interconnected dataset. This approach transforms the data into a Knowledge Graph, enabling an accurate portrayal of existing facts and fostering the generation of new insights.
-
-## Play
-
-### Model your data with RDF
-
-[RDF](https://www.w3.org/RDF/) encodes information in triple structures. The basic structure of an RDF triple is `subject-predicate-object`, much like a simple sentence in the English language.
-
-1. **Subject**: The subject is the entity or resource the statement is about. It's typically a URI ([Uniform Resource Identifier](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier)) which uniquely identifies a resource.
-2. **Predicate**: The predicate (also called a property) is a specific aspect, characteristic, attribute, or relation that describes the subject. It's also typically a URI.
-3. **Object**: The object is the value of the attribute defined by the predicate for the subject. It can be a URI or a literal (such as a string or a number) and may also include additional information such as a language tag or a datatype.
-
-In RDF, **prefixes** are used as a shorthand notation for long URIs to make the data more readable and less verbose. They're similar to namespaces in programming languages. For instance, instead of writing `http://www.w3.org/2001/XMLSchema#integer`, you could declare a prefix `xsd` to represent the `http://www.w3.org/2001/XMLSchema#` URI and then use `xsd:integer`.
-
-[Turtle (Terse RDF Triple Language)](https://www.w3.org/TR/turtle/) is a syntax that allows RDF to be completely written in a compact and natural text form, with abbreviations for common usage patterns and datatypes.
-
-Here's an RDF triple written in Turtle format (`.ttl` file):
-
-```turtle
-@prefix ex: .
-@prefix xsd: .
-
-ex:Alice ex:hasAge "30"^^xsd:integer .
-```
-
-In this example:
-
-- **`ex:Alice`** is the subject (using `ex` as a prefix for the `http://example.com/stuff/1.0/` URI).
-- **`ex:hasAge`** is the predicate.
-- **`"30"^^xsd:integer`** is the object, a literal of datatype integer (using **`xsd`** as a prefix for the XML Schema Datatype namespace).
-
-In the Turtle syntax, the semicolon (**`;`**) is used as a shorthand to reduce verbosity when multiple predicates and objects have the same subject. It allows you to write multiple predicates and objects for the same subject without having to repeat the subject.
-The comma (**`,`**) is used as a shorthand for reducing verbosity when the same subject and predicate have multiple objects.
-
-Suppose we want to express that Alice is 30 years old person, and her email is `alice@example.com`:
-
-```turtle
-@prefix ex: .
-@prefix xsd: .
-
-ex:Alice a ;
- ex:hasAge "30"^^xsd:integer ;
- ex:hasEmail "alice@example.com" .
-```
-
-:::tip
-The lowercase "a" is a special abbreviation for the RDF type property, which states that a resource is an instance of a particular class. This is essentially equivalent to **``**, and it's used to indicate the type of a resource.
-:::
-
-The same RDF triple can be expressed in RDF/XML format (`.rdf.xml` file):
-
-```xml
-
-
-
- 30
- alice@example.com
-
-
-```
-
-### Instantiate the Smart Contract
-
-Let's initiate a new instance of Smart Contract and input some RDF triples into it. The `axone-cognitarium` can be set up in the following manner. Please consult the schema for additional details regarding configuration settings.
-
-```bash
-axoned tx wasm instantiate $CODE_ID \
- --from $ADDR \
- --label "my-rdf-storage" \
- --admin $ADMIN_ADDR \
- --gas 1000000 \
- '{}'
-```
-
-:::tip
-You can provide some limitation parameters to restrict usage for both execute and query messages. For instance, you can set a maximum number of triples that can be stored in the smart contract, or a maximum size of data that can be inserted in a single transaction.
-
-The default values are:
-
-```json
-{
- "limits": {
- "max_byte_size": "340282366920938463463374607431768211455",
- "max_insert_data_byte_size": "340282366920938463463374607431768211455",
- "max_insert_data_triple_count": "340282366920938463463374607431768211455",
- "max_query_limit": 30,
- "max_query_variable_count": 30,
- "max_triple_byte_size": "340282366920938463463374607431768211455",
- "max_triple_count": "340282366920938463463374607431768211455"
- }
-}
-```
-
-:::
-
-### Insert RDF triples
-
-To insert RDF triples, you need to send an `InsertData` message through the `cognitarium` smart contract you've already instantiated. For this operation, your inputs should include the data of the triples, encoded in [base64](https://en.wikipedia.org/wiki/Base64), as well as the format. The format options available are:
-
-- `turtle` (default)
-- `rdf_xml`
-- `n_triples`
-- `n_quads`
-
-Let's consider the following example of data in Turtle format, contained within a file named `data.ttl`. It describes a small network of people and their relationships, such as name, title, and whom they know.
-
-```turtle
-@prefix : .
-@prefix foaf: .
-@prefix schema: .
-
-:alice a foaf:Person ;
- foaf:name "Alice" ;
- foaf:knows :bob ;
- schema:email "alice@example.org" .
-
-:bob a foaf:Person ;
- foaf:name "Bob" ;
- foaf:knows :alice, :carol ;
- schema:jobTitle "Software Developer" .
-
-:carol a foaf:Person ;
- foaf:name "Carol" ;
- schema:jobTitle "Data Scientist" ;
- foaf:knows :bob .
-```
-
-You can insert this data into the `cognitarium` smart contract with the following command:
-
-```bash
-axoned tx wasm execute $CONTRACT_ADDR \
- --from axone1cu9wzlcyyxpek20jaqfwzu3llzjgx34cqf94yj \
- --gas 10000000 \
- "{\"insert_data\":{\"format\": \"turtle\", \"data\": \"$(cat data.ttl | base64 | tr -d '\n\r')\"}}"
-```
-
-With the transaction hash we can query the number of triples inserted:
-
-```bash
-axoned query tx $TX_HASH -ojson |
- jq -r '.events[] | select(.type == "wasm") | .attributes[] | select(.key == "triple_count") | .value'
-```
-
-### Query RDF triples
-
-Now that we've populated the axone-cognitarium with several triples, let's explore how to retrieve this data. We can utilize the Select query message for this purpose. If you're familiar with [SPARQL](https://www.w3.org/TR/rdf-sparql-query/), you'll find the process quite intuitive.
-
-A `select` query on a `cognitarium` instance enables you to fetch and filter the data. The `select.query` JSON should contain the following:
-
-- `prefixes` array: to declare a `prefix` and its related `namespace`
-- `limit`: the number of elements to return
-- `where`: filters and variable declarations
-- `select` array: all `variable` names you declared in `where` you want to get
-
-`where` should be an array of elements specifying triple filterings. You have to specify `subject`, `predicate` and `object` as a `variable`, or, alternatively, a `prefixed` or `full` `named_node`.
-
-`object` can also be a `simple` `literal`.
-
-The following query will select all the triples `subject`, `predicate` and `object` from the store:
-
-```json
-{
- "select": {
- "query": {
- "prefixes": [],
- "select": [
- {
- "variable": "subject"
- },
- {
- "variable": "predicate"
- },
- {
- "variable": "object"
- }
- ],
- "where": [
- {
- "simple": {
- "triple_pattern": {
- "subject": {
- "variable": "subject"
- },
- "predicate": {
- "variable": "predicate"
- },
- "object": {
- "variable": "object"
- }
- }
- }
- }
- ],
- "limit": null
- }
- }
-}
-```
-
-It's semantically equivalent to the following SPARQL query:
-
-```sparql
-SELECT ?subject ?predicate ?object
-WHERE {
- ?subject ?predicate ?object
-}
-```
-
-This query can be executed on the cognitarium smart contract using the command below:
-
-```bash
-axoned query wasm contract-state smart $CONTRACT_ADDR \
- '{"select":{"query":{"prefixes":[],"select":[{"variable":"subject"},{"variable":"predicate"},{"variable":"object"}],"where":[{"simple":{"triple_pattern":{"subject":{"variable":"subject"},"predicate":{"variable":"predicate"},"object":{"variable":"object"}}}}],"limit":null}}}'
-```
-
-Now, let's try something more interesting. Let's retrieve the names of people and their job titles, but only for those who know at least one other person in the network. This query introduces filtering based on relationships.
-
-Here's the query:
-
-```json
-{
- "select": {
- "query": {
- "prefixes": [
- { "foaf": "http://xmlns.com/foaf/0.1/" },
- { "schema": "http://schema.org/" }
- ],
- "select": [
- {
- "variable": "personName"
- },
- {
- "variable": "jobTitle"
- }
- ],
- "where": [
- {
- "simple": {
- "triple_pattern": {
- "subject": {
- "variable": "person"
- },
- "predicate": {
- "node": {
- "named_node": {
- "full": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
- }
- }
- },
- "object": {
- "node": {
- "named_node": {
- "prefixed": "foaf:Person"
- }
- }
- }
- }
- }
- },
- {
- "simple": {
- "triple_pattern": {
- "subject": {
- "variable": "person"
- },
- "predicate": {
- "node": {
- "named_node": {
- "prefixed": "foaf:Name"
- }
- }
- },
- "object": {
- "variable": "personName"
- }
- }
- }
- },
- {
- "simple": {
- "triple_pattern": {
- "subject": {
- "variable": "person"
- },
- "predicate": {
- "node": {
- "named_node": {
- "prefixed": "schema:jobTitle"
- }
- }
- },
- "object": {
- "variable": "jobTitle"
- }
- }
- }
- },
- {
- "simple": {
- "triple_pattern": {
- "subject": {
- "variable": "person"
- },
- "predicate": {
- "node": {
- "named_node": {
- "prefixed": "foaf:knows"
- }
- }
- },
- "object": {
- "variable": "knownPerson"
- }
- }
- }
- }
- ],
- "limit": null
- }
- }
-}
-```
-
-It's semantically equivalent to the following SPARQL query:
-
-```sparql
-PREFIX foaf:
-PREFIX schema:
-
-SELECT ?personName ?jobTitle
-WHERE {
- ?person a foaf:Person .
- ?person foaf:name ?personName .
- ?person schema:jobTitle ?jobTitle .
- ?person foaf:knows ?knownPerson .
-}
-```
-
-This query can be executed on the cognitarium smart contract using the command below:
-
-```bash
-axoned query wasm contract-state smart $CONTRACT_ADDR \
- '{"select":{"query":{"prefixes":[{"foaf":"http://xmlns.com/foaf/0.1/"},{"schema":"http://schema.org/"}],"select":[{"variable":"personName"},{"variable":"jobTitle"}],"where":[{"simple":{"triple_pattern":{"subject":{"variable":"person"},"predicate":{"node":{"named_node":{"full":"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}}},"object":{"node":{"named_node":{"prefixed":"foaf:Person"}}}}}},{"simple":{"triple_pattern":{"subject":{"variable":"person"},"predicate":{"node":{"named_node":{"prefixed":"foaf:Name"}}},"object":{"variable":"personName"}}}},{"simple":{"triple_pattern":{"subject":{"variable":"person"},"predicate":{"node":{"named_node":{"prefixed":"schema:jobTitle"}}},"object":{"variable":"jobTitle"}}}},{"simple":{"triple_pattern":{"subject":{"variable":"person"},"predicate":{"node":{"named_node":{"prefixed":"foaf:knows"}}},"object":{"variable":"knownPerson"}}}}],"limit":null}}}'
-```
diff --git a/contracts/axone-cognitarium/examples/prolog-query/README.md b/contracts/axone-cognitarium/examples/prolog-query/README.md
deleted file mode 100644
index 9972c1ef..00000000
--- a/contracts/axone-cognitarium/examples/prolog-query/README.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# Prolog query
-
-In this example we'll see how to query the `axone-cognitarium` from Prolog programs executed by the AXONE logic module.
-
-We'll use for that purpose the [query.pl](query.pl) sample program, multiple predicates are defined in it, we'll explore them step by step.
-
-The query we'll make will be performed against a `axone-cognitarium` instance filled with the provided [sample data](../sample-data.rdf.xml), see the [basic example](../basic) to insert them.
-
-## Forge the CosmWasm query
-
-As seen in a [axone-law-stone example](../../../axone-law-stone/examples/multiple-sources), interaction with smart contracts from Prolog is based on the
-interpreter virtual filesystem that'll handle dedicated cosmwasm URIs.
-
-It's worth to mention that to query cosmwasm smart contracts and getting the raw response we'll need to set in the related URI the param `base64Decode` to `false`.
-
-The `cosmwasm_query` predicate will help to create the cosmwasm URI, for example:
-
-```bash
-axoned query logic ask \
- --program-file query.pl \
- "cosmwasm_query(cognitarium, '${CONTRACT_ADDR}', json([key-value]), false, URI)."
-```
-
-## Call the smart contract
-
-By calling the `cosmwasm_call` predicate with a cosmwasm URI we'll be able to get the JSON response, let's try it with a simple `axone-cognitarium` `Store` query which returns usage information about the triple store:
-
-```bash
-axoned query logic ask \
- --program-file query.pl \
- "cosmwasm_query(cognitarium, '${CONTRACT_ADDR}', 'store', false, URI), cosmwasm_call(URI, Response)."
-```
-
-## Select query
-
-Through the `cognitarium_dataset_tags`, we can query the tags present in metadata describing a specific dataset, for example:
-
-```bash
-axoned query logic ask \
- --program-file query.pl \
- "cognitarium_dataset_tags('${CONTRACT_ADDR}', 'https://ontology.axone.space/dataverse/dataset/0ea1fc7a-dd97-4adc-a10e-169c6597bcde', Tags)."
-```
-
-## Exploiting the response
-
-Using the `cognitarium_dataset_has_tag` predicate we show how to define rules based on the contract response, here on the present of a certain tag:
-
-```bash
-axoned query logic ask \
- --program-file query.pl \
- "cognitarium_dataset_has_tag('${CONTRACT_ADDR}', 'https://ontology.axone.space/dataverse/dataset/0ea1fc7a-dd97-4adc-a10e-169c6597bcde', 'AwesomeData')."
-```
diff --git a/contracts/axone-cognitarium/examples/prolog-query/query.pl b/contracts/axone-cognitarium/examples/prolog-query/query.pl
deleted file mode 100644
index e41d3321..00000000
--- a/contracts/axone-cognitarium/examples/prolog-query/query.pl
+++ /dev/null
@@ -1,110 +0,0 @@
-fold_left(Goal, [H|T], Result) :-
- fold_left(Goal, T, H, Result).
-
-fold_left(Goal, [H|T], Acc, Result) :-
- call(Goal, Acc, H, NewAcc),
- fold_left(Goal, T, NewAcc, Result).
-
-fold_left(_Goal, [], Result, Result).
-
-% Concatenate all the elements in the list using the atom_concat predicate.
-atoms_concat(List, Result) :-
- fold_left(atom_concat, List, Result).
-
-% Forge a cosmwasm URI that can be handled by the logic module. Take care of the query json serialization & url encoding.
-cosmwasm_query(ContractName, ContractAddr, Query, DecodeBase64, URI) :-
- json_prolog(RawQuery, Query),
- uri_encoded(query, RawQuery, EncodedQuery),
- atoms_concat([
- 'cosmwasm:',
- ContractName,
- ':',
- ContractAddr,
- '?query=',
- EncodedQuery,
- '&base64Decode=',
- DecodeBase64
- ], URI).
-
-% Execute the cosmwasm query by opening the URI stream relying on the logic module interpreter virtual filesystem.
-% It then consumes the stream unifying it with its string reprensation, close the stream and make the json conversion of
-% the contract response.
-cosmwasm_call(URI, Response) :-
- open(URI, 'read', Stream),
- read_string(Stream, _, Raw),
- close(Stream),
- json_prolog(Raw, Response).
-
-% Represents the cognitarium Select query input.
-cognitarium_select(Prefixes, Select, Where, Limit, Query) :-
- Query = json([
- select-json([
- query-json([
- prefixes-Prefixes,
- select-Select,
- where-Where,
- limit-Limit
- ])
- ])
- ]).
-
-% Extract the bindings field of a cognitarium Select query response.
-cognitarium_select_bindings(SelectResponse, Bindings) :-
- SelectResponse = json([head-_,results-json([bindings-Bindings])]).
-
-% Extract the tag variable value from a single Select response binding.
-cognitarium_extract_binding_tag(Binding, Tag) :-
- Binding = json([tag-json([datatype- @(null),type-literal,value-Tag,'xml:lang'- @(null)])]).
-
-% Given a cognitarium address and a dataset identifier, resolves the tags contained in any metadata of the type GeneralMetadata.
-cognitarium_dataset_tags(CognitariumAddr, DatasetDID, Tags) :-
- cognitarium_select(
- [
- json([prefix-'rdf', namespace-'http://www.w3.org/1999/02/22-rdf-syntax-ns#']),
- json([prefix-'core', namespace-'https://ontology.axone.space/core/']),
- json([prefix-'meta', namespace-'https://ontology.axone.space/metadata/dataset/'])
- ],
- [
- json([variable-'tag'])
- ],
- [
- json([
- simple-json([
- triple_pattern-json([
- subject-json([variable-'meta']),
- predicate-json([node-json([named_node-json([prefixed-'core:describes'])])]),
- object-json([node-json([named_node-json([full-DatasetDID])])])
- ])
- ])
- ]),
- json([
- simple-json([
- triple_pattern-json([
- subject-json([variable-'meta']),
- predicate-json([node-json([named_node-json([prefixed-'rdf:type'])])]),
- object-json([node-json([named_node-json([prefixed-'meta:GeneralMetadata'])])])
- ])
- ])
- ]),
- json([
- simple-json([
- triple_pattern-json([
- subject-json([variable-'meta']),
- predicate-json([node-json([named_node-json([prefixed-'core:hasTag'])])]),
- object-json([variable-'tag'])
- ])
- ])
- ])
- ],
- @(null),
- Query
- ),
- cosmwasm_query(cognitarium, CognitariumAddr, Query, false, URI),
- cosmwasm_call(URI, Response),
- cognitarium_select_bindings(Response, Bindings),
- maplist(cognitarium_extract_binding_tag, Bindings, Tags).
-
-% True if a given dataset identifier has the given tag through a GeneralMetadata in the provided cognitarium address.
-cognitarium_dataset_has_tag(CognitariumAddr, DatasetDID, Tag) :-
- cognitarium_dataset_tags(CognitariumAddr, DatasetDID, Tags),
- member(Tag, Tags).
diff --git a/contracts/axone-cognitarium/examples/sample-data.rdf.xml b/contracts/axone-cognitarium/examples/sample-data.rdf.xml
deleted file mode 100644
index 5d3b1565..00000000
--- a/contracts/axone-cognitarium/examples/sample-data.rdf.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- A test Data Space.
- Un Data Space de test.
- AXONE
-
- AXONE
- Test
-
- Data Space de test
- Test Data Space
-
-
-
-
-
-
-
-
-
-
-
- AXONE
-
-
-
- Tutorial
- AwesomeData
- Dataset de test
- test Dataset
- Me
-
- A test Dataset.
- Un Dataset de test.
-
-
-
-
-
-
- 2023-03-28T00:00:00+00:00
-
- 2023-03-28T00:00:00+00:00
-
-
-
-
-
-
-
-
-
-
-
-
- AXONE
-
-
-
- Tutorial
- NotAwesomeData
- Dataset de tuto pas bo
- ugly tutorial Dataset
- Me
-
- An ugly tutorial Dataset.
- Un Dataset de tuto pas bo.
-
-
-
-
-
-
- 2023-03-28T00:00:00+00:00
-
- 2023-03-28T00:00:00+00:00
-
-
-
diff --git a/contracts/axone-cognitarium/src/bin/schema.rs b/contracts/axone-cognitarium/src/bin/schema.rs
deleted file mode 100644
index cf832288..00000000
--- a/contracts/axone-cognitarium/src/bin/schema.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-use cosmwasm_schema::write_api;
-
-use axone_cognitarium::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};
-
-fn main() {
- write_api! {
- instantiate: InstantiateMsg,
- execute: ExecuteMsg,
- query: QueryMsg,
- }
-}
diff --git a/contracts/axone-cognitarium/src/contract.rs b/contracts/axone-cognitarium/src/contract.rs
deleted file mode 100644
index 57ba3323..00000000
--- a/contracts/axone-cognitarium/src/contract.rs
+++ /dev/null
@@ -1,2412 +0,0 @@
-#[cfg(not(feature = "library"))]
-use cosmwasm_std::entry_point;
-use cosmwasm_std::{
- to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult,
-};
-use cw2::set_contract_version;
-use cw_utils::nonpayable;
-
-use crate::error::ContractError;
-use crate::msg::{DataFormat, ExecuteMsg, InstantiateMsg, QueryMsg};
-use crate::state::{Store, BLANK_NODE_IDENTIFIER_COUNTER, NAMESPACE_KEY_INCREMENT, STORE};
-
-// version info for migration info
-const CONTRACT_NAME: &str = concat!("crates.io:", env!("CARGO_PKG_NAME"));
-const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");
-
-#[cfg_attr(not(feature = "library"), entry_point)]
-pub fn instantiate(
- deps: DepsMut<'_>,
- _env: Env,
- info: MessageInfo,
- msg: InstantiateMsg,
-) -> Result {
- nonpayable(&info)?;
- set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?;
-
- STORE.save(deps.storage, &Store::new(info.sender, msg.limits.into()))?;
- NAMESPACE_KEY_INCREMENT.save(deps.storage, &0u128)?;
- BLANK_NODE_IDENTIFIER_COUNTER.save(deps.storage, &0u128)?;
-
- Ok(Response::default())
-}
-
-#[cfg_attr(not(feature = "library"), entry_point)]
-pub fn execute(
- deps: DepsMut<'_>,
- _env: Env,
- info: MessageInfo,
- msg: ExecuteMsg,
-) -> Result {
- nonpayable(&info)?;
- match msg {
- ExecuteMsg::InsertData { format, data } => {
- execute::insert(deps, info, format.unwrap_or_default(), data)
- }
- ExecuteMsg::DeleteData {
- prefixes,
- delete,
- r#where,
- } => execute::delete(deps, info, prefixes, delete, r#where),
- }
-}
-
-pub mod execute {
- use super::*;
- use crate::msg::DataFormat;
- use crate::parser::{Prefix, TripleDeleteTemplate, WhereClause};
- use crate::querier::{PlanBuilder, QueryEngine, QueryPlan, ResolvedVariables};
- use crate::rdf::PrefixMap;
- use crate::state::{HasCachedNamespaces, Triple};
- use crate::storer::StoreEngine;
- use axone_rdf::serde::TripleReader;
- use either::{Left, Right};
- use std::io::BufReader;
-
- pub fn verify_owner(deps: &DepsMut<'_>, info: &MessageInfo) -> Result<(), ContractError> {
- if STORE.load(deps.storage)?.owner != info.sender {
- Err(ContractError::Unauthorized)
- } else {
- Ok(())
- }
- }
-
- pub fn insert(
- deps: DepsMut<'_>,
- info: MessageInfo,
- format: DataFormat,
- data: Binary,
- ) -> Result {
- verify_owner(&deps, &info)?;
-
- let buf = BufReader::new(data.as_slice());
- let mut reader = TripleReader::new(&(&format).into(), buf);
- let mut storer = StoreEngine::new(deps.storage)?;
- let count = storer.store_all(&mut reader)?;
-
- Ok(Response::new()
- .add_attribute("action", "insert")
- .add_attribute("triple_count", count))
- }
-
- pub fn delete(
- deps: DepsMut<'_>,
- info: MessageInfo,
- prefixes: Vec,
- delete: Vec,
- r#where: Option,
- ) -> Result {
- verify_owner(&deps, &info)?;
-
- let delete = if delete.is_empty() {
- Left(match r#where {
- Some(WhereClause::Bgp { ref patterns }) => patterns
- .iter()
- .map(|p| (p.subject.clone(), p.predicate.clone(), p.object.clone()))
- .collect(),
- _ => Err(StdError::generic_err("Missing triple templates to delete"))?,
- })
- } else {
- Right(
- delete
- .into_iter()
- .map(|t| (t.subject, t.predicate, t.object))
- .collect(),
- )
- };
-
- let prefix_map = ::from(prefixes).into_inner();
- let mut plan_builder = PlanBuilder::new(deps.storage, &prefix_map, None);
- let plan = match r#where {
- Some(ref w) => plan_builder.build_plan(w)?,
- None => QueryPlan::empty_plan(),
- };
-
- let query_engine = QueryEngine::new(deps.storage, plan_builder.cached_namespaces());
- let delete_templates = query_engine.make_triple_templates(&plan, &prefix_map, delete)?;
-
- let triples = if r#where.is_none() {
- let empty_vars = ResolvedVariables::with_capacity(0);
- delete_templates
- .into_iter()
- .filter_map(|tpl| match tpl.resolve(&empty_vars) {
- Ok(Some(v)) => Some(Ok(v)),
- Ok(None) => None,
- Err(e) => Some(Err(e)),
- })
- .collect::>>()?
- } else {
- query_engine
- .construct_triples(plan, delete_templates)
- .collect::>>()?
- };
-
- let mut store = StoreEngine::new(deps.storage)?;
- let count = store.delete_all(&triples)?;
-
- Ok(Response::new()
- .add_attribute("action", "delete")
- .add_attribute("triple_count", count))
- }
-}
-
-#[cfg_attr(not(feature = "library"), entry_point)]
-pub fn query(deps: Deps<'_>, _env: Env, msg: QueryMsg) -> StdResult {
- match msg {
- QueryMsg::Store {} => to_json_binary(&query::store(deps)?),
- QueryMsg::Select { query } => to_json_binary(&query::select(deps, query)?),
- QueryMsg::Describe { query, format } => {
- to_json_binary(&query::describe(deps, query, format.unwrap_or_default())?)
- }
- QueryMsg::Construct { query, format } => to_json_binary(&query::construct(
- deps,
- query,
- format.unwrap_or(DataFormat::default()),
- )?),
- }
-}
-
-pub mod query {
- use super::*;
- use crate::msg::{ConstructResponse, DescribeResponse, SelectResponse, StoreResponse};
- use crate::parser::{ConstructQuery, DescribeQuery, SelectQuery, WhereClause};
- use crate::parser::{
- Node, TripleConstructTemplate, TriplePattern, VarOrNamedNode, VarOrNode, VarOrNodeOrLiteral,
- };
- use crate::querier::{PlanBuilder, QueryEngine};
- use crate::rdf::PrefixMap;
- use crate::state::HasCachedNamespaces;
- use axone_rdf::normalize::IdentifierIssuer;
-
- pub fn store(deps: Deps<'_>) -> StdResult {
- STORE.load(deps.storage).map(Into::into)
- }
-
- pub fn select(deps: Deps<'_>, query: SelectQuery) -> StdResult {
- let store = STORE.load(deps.storage)?;
-
- if query.select.len() > store.limits.max_query_variable_count as usize {
- Err(StdError::generic_err(
- "Maximum query variable count exceeded",
- ))?;
- }
-
- let count = query.limit.unwrap_or(store.limits.max_query_limit);
- if count > store.limits.max_query_limit {
- Err(StdError::generic_err("Maximum query limit exceeded"))?;
- }
-
- let prefix_map = PrefixMap::from(query.prefixes).into_inner();
- let mut plan_builder =
- PlanBuilder::new(deps.storage, &prefix_map, None).with_limit(count as usize);
- let plan = plan_builder.build_plan(&query.r#where)?;
-
- QueryEngine::new(deps.storage, plan_builder.cached_namespaces())
- .select(plan, query.select)
- .and_then(|res| util::map_select_solutions(deps, res, plan_builder.cached_namespaces()))
- }
-
- pub fn describe(
- deps: Deps<'_>,
- query: DescribeQuery,
- format: DataFormat,
- ) -> StdResult {
- let (p, o) = ("_2p".to_owned(), "_3o".to_owned());
-
- let (construct, r#where) = match &query.resource {
- VarOrNamedNode::Variable(var) => {
- let select = TriplePattern {
- subject: VarOrNode::Variable(var.clone()),
- predicate: VarOrNamedNode::Variable(format!("{var}{p}")),
- object: VarOrNodeOrLiteral::Variable(format!("{var}{o}")),
- };
-
- let r#where = match query.r#where {
- Some(c) => WhereClause::LateralJoin {
- left: Box::new(c),
- right: Box::new(WhereClause::Bgp {
- patterns: vec![select.clone()],
- }),
- },
- None => WhereClause::Bgp {
- patterns: vec![select.clone()],
- },
- };
-
- (vec![select], r#where)
- }
- VarOrNamedNode::NamedNode(iri) => {
- let select = TriplePattern {
- subject: VarOrNode::Node(Node::NamedNode(iri.clone())),
- predicate: VarOrNamedNode::Variable(p),
- object: VarOrNodeOrLiteral::Variable(o),
- };
-
- (
- vec![select.clone()],
- WhereClause::Bgp {
- patterns: vec![select],
- },
- )
- }
- };
-
- let out = util::construct_atoms(
- deps.storage,
- &format,
- query.prefixes,
- construct
- .into_iter()
- .map(|t| (t.subject, t.predicate, t.object))
- .collect(),
- r#where,
- )?;
-
- Ok(DescribeResponse {
- format,
- data: Binary::from(out),
- })
- }
-
- pub fn construct(
- deps: Deps<'_>,
- query: ConstructQuery,
- format: DataFormat,
- ) -> StdResult {
- let ConstructQuery {
- construct,
- prefixes,
- r#where,
- } = query;
-
- let construct = if construct.is_empty() {
- match &r#where {
- WhereClause::Bgp { patterns } => patterns
- .iter()
- .map(|p| TripleConstructTemplate {
- subject: p.subject.clone(),
- predicate: p.predicate.clone(),
- object: p.object.clone(),
- })
- .collect(),
- _ => Err(StdError::generic_err("missing triples to construct"))?,
- }
- } else {
- construct
- };
-
- let mut id_issuer = IdentifierIssuer::new("a", 0u128);
- let construct: Vec<_> = construct
- .into_iter()
- .map(|t| TripleConstructTemplate {
- subject: match t.subject {
- VarOrNode::Node(Node::BlankNode(n)) => {
- VarOrNode::Node(Node::BlankNode(id_issuer.get_str_or_issue(n).to_string()))
- }
- _ => t.subject,
- },
- predicate: t.predicate,
- object: match t.object {
- VarOrNodeOrLiteral::Node(Node::BlankNode(n)) => VarOrNodeOrLiteral::Node(
- Node::BlankNode(id_issuer.get_str_or_issue(n).to_string()),
- ),
- _ => t.object,
- },
- })
- .collect();
-
- let out = util::construct_atoms(
- deps.storage,
- &format,
- prefixes,
- construct
- .into_iter()
- .map(|t| (t.subject, t.predicate, t.object))
- .collect(),
- r#where,
- )?;
-
- Ok(ConstructResponse {
- format,
- data: Binary::from(out),
- })
- }
-}
-
-pub mod util {
- use super::*;
- use crate::msg::{Head, Results, SelectResponse};
- use crate::parser::{
- Prefix, Value, VarOrNamedNode, VarOrNode, VarOrNodeOrLiteral, WhereClause,
- };
- use crate::querier::{PlanBuilder, QueryEngine, SelectResults};
- use crate::rdf::{Atom, PrefixMap};
- use crate::state::{HasCachedNamespaces, Namespace, NamespaceResolver};
- use axone_rdf::normalize::IdentifierIssuer;
- use axone_rdf::serde::TripleWriter;
- use cosmwasm_std::Storage;
- use std::collections::BTreeMap;
-
- pub fn map_select_solutions(
- deps: Deps<'_>,
- res: SelectResults<'_>,
- ns_cache: Vec,
- ) -> StdResult {
- let mut ns_solver = NamespaceResolver::new(deps.storage, ns_cache);
- let mut id_issuer = IdentifierIssuer::new("b", 0u128);
-
- let mut bindings: Vec> = vec![];
- for solution in res.solutions {
- let vars = solution?;
- let resolved = vars
- .into_iter()
- .map(|(name, var)| -> StdResult<(String, Value)> {
- Ok((name, var.as_value(&mut ns_solver, &mut id_issuer)?))
- })
- .collect::>>()?;
- bindings.push(resolved);
- }
-
- Ok(SelectResponse {
- head: Head { vars: res.head },
- results: Results { bindings },
- })
- }
-
- pub fn construct_atoms(
- storage: &dyn Storage,
- format: &DataFormat,
- prefixes: Vec,
- construct: Vec<(VarOrNode, VarOrNamedNode, VarOrNodeOrLiteral)>,
- r#where: WhereClause,
- ) -> StdResult> {
- let store = STORE.load(storage)?;
-
- let prefix_map = ::from(prefixes).into_inner();
- let mut plan_builder = PlanBuilder::new(storage, &prefix_map, None)
- .with_limit(store.limits.max_query_limit as usize);
- let plan = plan_builder.build_plan(&r#where)?;
-
- let atoms = QueryEngine::new(storage, plan_builder.cached_namespaces())
- .construct_atoms(plan, &prefix_map, construct)?
- .collect::>>()?;
-
- let out: Vec = Vec::default();
- let mut writer = TripleWriter::new(&format.into(), out);
-
- for atom in &atoms {
- let triple = atom.into();
-
- writer.write(&triple).map_err(|e| {
- StdError::serialize_err(
- "triple",
- format!("Error writing triple {}: {}", &triple, e),
- )
- })?;
- }
- writer
- .finish()
- .map_err(|e| StdError::serialize_err("triple", format!("Error writing triple: {e}")))
- }
-}
-
-#[cfg(test)]
-mod tests {
- use super::*;
- use crate::error::StoreError;
- use crate::msg::ExecuteMsg::{DeleteData, InsertData};
- use crate::msg::{
- ConstructResponse, DescribeResponse, Head, Results, SelectResponse, StoreLimitsInput,
- StoreLimitsInputBuilder, StoreResponse,
- };
- use crate::parser::Node::{BlankNode, NamedNode};
- use crate::parser::IRI::{Full, Prefixed};
- use crate::parser::{ConstructQuery, DescribeQuery, Prefix, SelectQuery, Value, WhereClause};
- use crate::parser::{
- Literal, SelectItem, TriplePattern, VarOrNamedNode, VarOrNamedNodeOrLiteral, VarOrNode,
- VarOrNodeOrLiteral,
- };
- use crate::state::{
- namespaces, triples, Namespace, Node, Object, StoreLimits, StoreStat, Subject, Triple,
- };
- use crate::{msg, parser, state};
- use cosmwasm_std::testing::{message_info, mock_dependencies, mock_env};
- use cosmwasm_std::{coins, from_json, Addr, Attribute, Order, Uint128};
- use cw_utils::PaymentError;
- use cw_utils::PaymentError::NonPayable;
- use std::collections::BTreeMap;
- use std::fs::File;
- use std::io::Read;
- use std::path::Path;
- use std::{env, u128};
- use testing::addr::{addr, OWNER, SENDER};
-
- #[test]
- fn proper_initialization() {
- let mut deps = mock_dependencies();
-
- let msg = InstantiateMsg {
- limits: StoreLimitsInput {
- max_triple_count: Uint128::from(1u128),
- max_byte_size: Uint128::from(2u128),
- max_triple_byte_size: Uint128::from(3u128),
- max_query_limit: 4,
- max_query_variable_count: 5,
- max_insert_data_byte_size: Uint128::from(6u128),
- max_insert_data_triple_count: Uint128::from(7u128),
- },
- };
-
- let info = message_info(&addr(OWNER), &[]);
- let res = instantiate(deps.as_mut(), mock_env(), info.clone(), msg).unwrap();
- assert_eq!(0, res.messages.len());
-
- let store = STORE.load(&deps.storage).unwrap();
- assert_eq!(store.owner, info.sender);
- assert_eq!(
- store.limits,
- state::StoreLimits {
- max_triple_count: Uint128::from(1u128),
- max_byte_size: Uint128::from(2u128),
- max_triple_byte_size: Uint128::from(3u128),
- max_query_limit: 4,
- max_query_variable_count: 5,
- max_insert_data_byte_size: Uint128::from(6u128),
- max_insert_data_triple_count: Uint128::from(7u128),
- }
- );
- assert_eq!(
- store.stat,
- StoreStat {
- triple_count: Uint128::zero(),
- namespace_count: Uint128::zero(),
- byte_size: Uint128::zero(),
- }
- );
-
- assert_eq!(NAMESPACE_KEY_INCREMENT.load(&deps.storage).unwrap(), 0u128);
- assert_eq!(
- BLANK_NODE_IDENTIFIER_COUNTER.load(&deps.storage).unwrap(),
- 0u128
- );
- }
-
- #[test]
- fn funds_initialization() {
- let mut deps = mock_dependencies();
- let env = mock_env();
- let info = message_info(&addr(SENDER), &coins(10, "uaxone"));
-
- let msg = InstantiateMsg::default();
-
- let result = instantiate(deps.as_mut(), env, info, msg);
- assert!(result.is_err());
- assert_eq!(result.unwrap_err(), ContractError::Payment(NonPayable {}));
- }
-
- #[test]
- fn execute_fail_with_funds() {
- let mut deps = mock_dependencies();
- let env = mock_env();
- let info = message_info(&addr("sender"), &coins(10, "uaxone"));
-
- let messages = vec![
- InsertData {
- format: Some(DataFormat::RDFXml),
- data: Binary::from("data".as_bytes()),
- },
- DeleteData {
- prefixes: vec![],
- delete: vec![],
- r#where: None,
- },
- ];
-
- for msg in messages {
- let result = execute(deps.as_mut(), env.clone(), info.clone(), msg);
- assert!(result.is_err());
- assert_eq!(
- result.unwrap_err(),
- ContractError::Payment(PaymentError::NonPayable {})
- );
- }
- }
-
- #[test]
- fn proper_insert() {
- let cases = vec![
- InsertData {
- format: Some(DataFormat::RDFXml),
- data: read_test_data("sample.rdf.xml"),
- },
- InsertData {
- format: Some(DataFormat::Turtle),
- data: read_test_data("sample.ttl"),
- },
- InsertData {
- format: Some(DataFormat::NTriples),
- data: read_test_data("sample.nt"),
- },
- InsertData {
- format: Some(DataFormat::NQuads),
- data: read_test_data("sample.nq"),
- },
- InsertData {
- format: None,
- data: read_test_data("sample.ttl"),
- },
- ];
-
- for case in cases {
- let mut deps = mock_dependencies();
-
- let info = message_info(&addr(OWNER), &[]);
- instantiate(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InstantiateMsg::default(),
- )
- .unwrap();
-
- let res = execute(deps.as_mut(), mock_env(), info.clone(), case);
-
- assert!(res.is_ok());
- assert_eq!(
- res.unwrap().attributes,
- vec![
- Attribute::new("action", "insert"),
- Attribute::new("triple_count", "40"),
- ]
- );
-
- assert_eq!(
- triples()
- .range_raw(&deps.storage, None, None, Order::Ascending)
- .count(),
- 40
- );
- assert_eq!(
- STORE.load(&deps.storage).unwrap().stat,
- StoreStat {
- triple_count: 40u128.into(),
- namespace_count: 17u128.into(),
- byte_size: 7190u128.into(),
- },
- );
- assert_eq!(NAMESPACE_KEY_INCREMENT.load(&deps.storage).unwrap(), 17u128);
- assert_eq!(
- namespaces()
- .load(
- &deps.storage,
- "https://ontology.axone.space/dataverse/dataspace/".to_string(),
- )
- .unwrap(),
- Namespace {
- value: "https://ontology.axone.space/dataverse/dataspace/".to_string(),
- key: 0u128,
- counter: 5u128,
- }
- );
- assert_eq!(
- triples()
- .load(
- &deps.storage,
- (
- Object::Named(Node {
- namespace: 4u128,
- value: "0x04d1f1b8f8a7a28f9a5a254c326a963a22f5a5b5d5f5e5d5c5b5a5958575655"
- .to_string(),
- }).as_hash()
- .as_bytes(),
- Node {
- namespace: 3u128,
- value: "hasRegistrar".to_string(),
- }
- .key(),
- Subject::Named(Node {
- namespace: 0u128,
- value: "97ff7e16-c08d-47be-8475-211016c82e33".to_string(),
- })
- .key()
- ),
- )
- .unwrap(),
- Triple {
- object: Object::Named(Node {
- namespace: 4u128,
- value: "0x04d1f1b8f8a7a28f9a5a254c326a963a22f5a5b5d5f5e5d5c5b5a5958575655"
- .to_string(),
- }),
- predicate: Node {
- namespace: 3u128,
- value: "hasRegistrar".to_string(),
- },
- subject: Subject::Named(Node {
- namespace: 0u128,
- value: "97ff7e16-c08d-47be-8475-211016c82e33".to_string(),
- }),
- }
- )
- }
- }
-
- #[test]
- fn proper_insert_blank_nodes() {
- let mut deps = mock_dependencies();
-
- let info = message_info(&addr(OWNER), &[]);
- instantiate(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InstantiateMsg::default(),
- )
- .unwrap();
-
- let insert_msg = InsertData {
- format: None,
- data: read_test_data("blank-nodes.ttl"),
- };
-
- let res = execute(deps.as_mut(), mock_env(), info.clone(), insert_msg.clone());
- assert!(res.is_ok());
- assert_eq!(
- BLANK_NODE_IDENTIFIER_COUNTER.load(&deps.storage).unwrap(),
- 2u128
- );
-
- // we insert the same data again to check the creation of new blank nodes
- let res = execute(deps.as_mut(), mock_env(), info.clone(), insert_msg);
- assert!(res.is_ok());
- assert_eq!(
- BLANK_NODE_IDENTIFIER_COUNTER.load(&deps.storage).unwrap(),
- 4u128
- );
- }
-
- #[test]
- fn insert_existing_triples() {
- let mut deps = mock_dependencies();
-
- let info = message_info(&addr(OWNER), &[]);
- instantiate(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InstantiateMsg::default(),
- )
- .unwrap();
-
- execute(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InsertData {
- format: Some(DataFormat::RDFXml),
- data: read_test_data("sample.rdf.xml"),
- },
- )
- .unwrap();
-
- let res = execute(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InsertData {
- format: Some(DataFormat::RDFXml),
- data: read_test_data("sample.rdf.xml"),
- },
- );
-
- assert!(res.is_ok());
- assert_eq!(
- res.unwrap().attributes,
- vec![
- Attribute::new("action", "insert"),
- Attribute::new("triple_count", "0"),
- ]
- );
-
- assert_eq!(
- triples()
- .range_raw(&deps.storage, None, None, Order::Ascending)
- .count(),
- 40
- );
- assert_eq!(
- STORE.load(&deps.storage).unwrap().stat,
- StoreStat {
- triple_count: 40u128.into(),
- namespace_count: 17u128.into(),
- byte_size: 7190u128.into(),
- },
- );
- assert_eq!(NAMESPACE_KEY_INCREMENT.load(&deps.storage).unwrap(), 17u128);
- }
-
- #[test]
- fn insert_unauthorized() {
- let mut deps = mock_dependencies();
- instantiate(
- deps.as_mut(),
- mock_env(),
- message_info(&addr(OWNER), &[]),
- InstantiateMsg::default(),
- )
- .unwrap();
-
- let res = execute(
- deps.as_mut(),
- mock_env(),
- message_info(&addr("not-owner"), &[]),
- InsertData {
- format: Some(DataFormat::RDFXml),
- data: read_test_data("sample.rdf.xml"),
- },
- );
- assert!(res.is_err());
- assert_eq!(res.err().unwrap(), ContractError::Unauthorized);
- }
-
- #[test]
- fn insert_limits() {
- let cases = vec![
- (
- StoreLimitsInputBuilder::default()
- .max_triple_count(30u128)
- .build()
- .unwrap(),
- Some(ContractError::from(StoreError::TripleCount(30u128.into()))),
- ),
- (
- StoreLimitsInputBuilder::default()
- .max_triple_count(40u128)
- .build()
- .unwrap(),
- None,
- ),
- (
- StoreLimitsInputBuilder::default()
- .max_byte_size(50u128)
- .build()
- .unwrap(),
- Some(ContractError::from(StoreError::ByteSize(50u128.into()))),
- ),
- (
- StoreLimitsInputBuilder::default()
- .max_byte_size(50000u128)
- .build()
- .unwrap(),
- None,
- ),
- (
- StoreLimitsInputBuilder::default()
- .max_insert_data_byte_size(500u128)
- .build()
- .unwrap(),
- Some(ContractError::from(StoreError::InsertDataByteSize(
- 500u128.into(),
- ))),
- ),
- (
- StoreLimitsInputBuilder::default()
- .max_insert_data_byte_size(50000u128)
- .build()
- .unwrap(),
- None,
- ),
- (
- StoreLimitsInputBuilder::default()
- .max_triple_byte_size(150u128)
- .build()
- .unwrap(),
- Some(ContractError::from(StoreError::TripleByteSize(
- 177u128.into(),
- 150u128.into(),
- ))),
- ),
- (
- StoreLimitsInputBuilder::default()
- .max_triple_byte_size(400u128)
- .build()
- .unwrap(),
- None,
- ),
- (
- StoreLimitsInputBuilder::default()
- .max_insert_data_triple_count(30u128)
- .build()
- .unwrap(),
- Some(ContractError::from(StoreError::InsertDataTripleCount(
- 30u128.into(),
- ))),
- ),
- (
- StoreLimitsInputBuilder::default()
- .max_insert_data_triple_count(40u128)
- .build()
- .unwrap(),
- None,
- ),
- ];
-
- let exec_msg = InsertData {
- format: Some(DataFormat::RDFXml),
- data: read_test_data("sample.rdf.xml"),
- };
- for case in cases {
- let mut deps = mock_dependencies();
-
- let info = message_info(&addr(OWNER), &[]);
- instantiate(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InstantiateMsg { limits: case.0 },
- )
- .unwrap();
-
- let res = execute(deps.as_mut(), mock_env(), info.clone(), exec_msg.clone());
-
- if let Some(err) = case.1 {
- assert!(res.is_err());
- assert_eq!(res.err().unwrap(), err);
- } else {
- assert!(res.is_ok());
- }
- }
- }
-
- #[test]
- fn proper_delete() {
- let id = "https://ontology.axone.space/dataverse/dataspace/metadata/dcf48417-01c5-4b43-9bc7-49e54c028473";
- let cases = vec![
- (
- DeleteData {
- prefixes: vec![],
- delete: vec![parser::TripleDeleteTemplate {
- subject: VarOrNamedNode::NamedNode(Full(
- "https://ontology.axone.space/dataverse/dataspace/metadata/unknown"
- .to_string(),
- )),
- predicate: VarOrNamedNode::NamedNode(Full(
- "https://ontology.axone.space/core/hasTopic".to_string(),
- )),
- object: VarOrNamedNodeOrLiteral::NamedNode(Full(
- "https://ontology.axone.space/thesaurus/topic/Test".to_string(),
- )),
- }],
- r#where: WhereClause::Bgp {
- patterns: vec![TriplePattern {
- subject: VarOrNode::Node(NamedNode(Full(
- "https://ontology.axone.space/dataverse/dataspace/metadata/unknown"
- .to_string(),
- ))),
- predicate: VarOrNamedNode::NamedNode(Full(
- "https://ontology.axone.space/core/hasTopic".to_string(),
- )),
- object: VarOrNodeOrLiteral::Node(NamedNode(Full(
- "https://ontology.axone.space/thesaurus/topic/Test".to_string(),
- ))),
- }],
- }
- .into(),
- },
- 0,
- 0,
- Uint128::from(7190u128),
- ),
- (
- DeleteData {
- prefixes: vec![],
- delete: vec![parser::TripleDeleteTemplate {
- subject: VarOrNamedNode::NamedNode(Full(id.to_string())),
- predicate: VarOrNamedNode::NamedNode(Full(
- "https://ontology.axone.space/core/hasTopic".to_string(),
- )),
- object: VarOrNamedNodeOrLiteral::NamedNode(Full(
- "https://ontology.axone.space/thesaurus/topic/Test".to_string(),
- )),
- }],
- r#where: WhereClause::Bgp {
- patterns: vec![TriplePattern {
- subject: VarOrNode::Node(NamedNode(Full(id.to_string()))),
- predicate: VarOrNamedNode::NamedNode(Full(
- "https://ontology.axone.space/core/hasTopic".to_string(),
- )),
- object: VarOrNodeOrLiteral::Node(NamedNode(Full(
- "https://ontology.axone.space/thesaurus/topic/Test".to_string(),
- ))),
- }],
- }
- .into(),
- },
- 1,
- 0,
- Uint128::from(7005u128),
- ),
- (
- DeleteData {
- prefixes: vec![
- Prefix {
- prefix: "core".to_string(),
- namespace: "https://ontology.axone.space/core/".to_string(),
- },
- Prefix {
- prefix: "thesaurus".to_string(),
- namespace: "https://ontology.axone.space/thesaurus/topic/".to_string(),
- },
- ],
- delete: vec![parser::TripleDeleteTemplate {
- subject: VarOrNamedNode::NamedNode(Full(id.to_string())),
- predicate: VarOrNamedNode::NamedNode(Prefixed("core:hasTopic".to_string())),
- object: VarOrNamedNodeOrLiteral::NamedNode(Prefixed(
- "thesaurus:Test".to_string(),
- )),
- }],
- r#where: WhereClause::Bgp {
- patterns: vec![TriplePattern {
- subject: VarOrNode::Node(NamedNode(Full(id.to_string()))),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "core:hasTopic".to_string(),
- )),
- object: VarOrNodeOrLiteral::Node(NamedNode(Prefixed(
- "thesaurus:Test".to_string(),
- ))),
- }],
- }
- .into(),
- },
- 1,
- 0,
- Uint128::from(7005u128),
- ),
- (
- DeleteData {
- prefixes: vec![
- Prefix {
- prefix: "core".to_string(),
- namespace: "https://ontology.axone.space/core/".to_string(),
- },
- Prefix {
- prefix: "thesaurus".to_string(),
- namespace: "https://ontology.axone.space/thesaurus/topic/".to_string(),
- },
- ],
- delete: vec![parser::TripleDeleteTemplate {
- subject: VarOrNamedNode::NamedNode(Full(id.to_string())),
- predicate: VarOrNamedNode::NamedNode(Prefixed("core:hasTopic".to_string())),
- object: VarOrNamedNodeOrLiteral::Variable("o".to_string()),
- }],
- r#where: WhereClause::Bgp {
- patterns: vec![TriplePattern {
- subject: VarOrNode::Node(NamedNode(Full(id.to_string()))),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "core:hasTopic".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("o".to_string()),
- }],
- }
- .into(),
- },
- 1,
- 0,
- Uint128::from(7005u128),
- ),
- (
- DeleteData {
- prefixes: vec![],
- delete: vec![parser::TripleDeleteTemplate {
- subject: VarOrNamedNode::NamedNode(Full(id.to_string())),
- predicate: VarOrNamedNode::Variable("p".to_string()),
- object: VarOrNamedNodeOrLiteral::Variable("o".to_string()),
- }],
- r#where: WhereClause::Bgp {
- patterns: vec![TriplePattern {
- subject: VarOrNode::Node(NamedNode(Full(id.to_string()))),
- predicate: VarOrNamedNode::Variable("p".to_string()),
- object: VarOrNodeOrLiteral::Variable("o".to_string()),
- }],
- }
- .into(),
- },
- 11,
- 2,
- Uint128::from(5334u128),
- ),
- (
- DeleteData {
- prefixes: vec![],
- delete: vec![],
- r#where: WhereClause::Bgp {
- patterns: vec![TriplePattern {
- subject: VarOrNode::Node(NamedNode(Full(id.to_string()))),
- predicate: VarOrNamedNode::Variable("p".to_string()),
- object: VarOrNodeOrLiteral::Variable("o".to_string()),
- }],
- }
- .into(),
- },
- 11,
- 2,
- Uint128::from(5334u128),
- ),
- (
- DeleteData {
- prefixes: vec![],
- delete: vec![],
- r#where: WhereClause::Bgp {
- patterns: vec![TriplePattern {
- subject: VarOrNode::Variable("s".to_string()),
- predicate: VarOrNamedNode::Variable("p".to_string()),
- object: VarOrNodeOrLiteral::Variable("0".to_string()),
- }],
- }
- .into(),
- },
- 40,
- 17,
- Uint128::from(0u128),
- ),
- (
- DeleteData {
- prefixes: vec![
- Prefix {
- prefix: "core".to_string(),
- namespace: "https://ontology.axone.space/core/".to_string(),
- },
- Prefix {
- prefix: "thesaurus".to_string(),
- namespace: "https://ontology.axone.space/thesaurus/topic/".to_string(),
- },
- ],
- delete: vec![parser::TripleDeleteTemplate {
- subject: VarOrNamedNode::NamedNode(Full(id.to_string())),
- predicate: VarOrNamedNode::NamedNode(Prefixed("core:hasTopic".to_string())),
- object: VarOrNamedNodeOrLiteral::NamedNode(Prefixed(
- "thesaurus:Test".to_string(),
- )),
- }],
- r#where: None,
- },
- 1,
- 0,
- Uint128::from(7005u128),
- ),
- ];
-
- for case in cases {
- let mut deps = mock_dependencies();
-
- let info = message_info(&addr(OWNER), &[]);
- instantiate(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InstantiateMsg::default(),
- )
- .unwrap();
-
- execute(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InsertData {
- format: Some(DataFormat::RDFXml),
- data: read_test_data("sample.rdf.xml"),
- },
- )
- .unwrap();
-
- let res = execute(deps.as_mut(), mock_env(), info, case.0);
-
- assert!(res.is_ok());
- assert_eq!(
- res.unwrap().attributes,
- vec![
- Attribute::new("action", "delete"),
- Attribute::new("triple_count", case.1.to_string()),
- ]
- );
-
- assert_eq!(
- STORE.load(&deps.storage).unwrap().stat,
- StoreStat {
- triple_count: (40u128 - u128::try_from(case.1).unwrap()).into(),
- namespace_count: (17u128 - u128::try_from(case.2).unwrap()).into(),
- byte_size: case.3,
- },
- );
- assert_eq!(
- triples()
- .range_raw(&deps.storage, None, None, Order::Ascending)
- .count(),
- 40 - case.1
- );
- assert_eq!(
- namespaces()
- .range_raw(&deps.storage, None, None, Order::Ascending)
- .count(),
- 17 - case.2
- );
- }
- }
-
- #[test]
- fn invalid_delete() {
- struct TC {
- command: ExecuteMsg,
- expected: ContractError,
- }
- let cases = vec![
- TC {
- command: DeleteData {
- prefixes: vec![],
- delete: vec![parser::TripleDeleteTemplate {
- subject: VarOrNamedNode::NamedNode(Prefixed("foo:bar".to_string())),
- predicate: VarOrNamedNode::NamedNode(Full(
- "https://ontology.axone.space/core/hasTopic".to_string(),
- )),
- object: VarOrNamedNodeOrLiteral::NamedNode(Full(
- "https://ontology.axone.space/thesaurus/topic/Test".to_string(),
- )),
- }],
- r#where: WhereClause::Bgp {
- patterns: vec![TriplePattern {
- subject: VarOrNode::Node(NamedNode(Prefixed("foo:bar".to_string()))),
- predicate: VarOrNamedNode::NamedNode(Full(
- "https://ontology.axone.space/core/hasTopic".to_string(),
- )),
- object: VarOrNodeOrLiteral::Node(NamedNode(Full(
- "https://ontology.axone.space/thesaurus/topic/Test".to_string(),
- ))),
- }],
- }
- .into(),
- },
- expected: StdError::generic_err("Prefix not found: foo").into(),
- },
- TC {
- command: DeleteData {
- prefixes: vec![],
- delete: vec![parser::TripleDeleteTemplate {
- subject: VarOrNamedNode::NamedNode(Full(
- "https://ontology.axone.space/thesaurus/topic/Test".to_string(),
- )),
- predicate: VarOrNamedNode::Variable("z".to_string()),
- object: VarOrNamedNodeOrLiteral::Variable("o".to_string()),
- }],
- r#where: WhereClause::Bgp {
- patterns: vec![TriplePattern {
- subject: VarOrNode::Node(NamedNode(Full(
- "https://ontology.axone.space/thesaurus/topic/Test".to_string(),
- ))),
- predicate: VarOrNamedNode::Variable("p".to_string()),
- object: VarOrNodeOrLiteral::Variable("o".to_string()),
- }],
- }
- .into(),
- },
- expected: StdError::generic_err("Selected variable not found in query").into(),
- },
- ];
-
- for case in cases {
- let mut deps = mock_dependencies();
-
- let info = message_info(&addr(OWNER), &[]);
- instantiate(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InstantiateMsg::default(),
- )
- .unwrap();
-
- execute(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InsertData {
- format: Some(DataFormat::RDFXml),
- data: read_test_data("sample.rdf.xml"),
- },
- )
- .unwrap();
-
- let res = execute(deps.as_mut(), mock_env(), info, case.command);
-
- assert!(res.is_err());
- assert_eq!(res.unwrap_err(), case.expected);
- }
- }
-
- #[test]
- fn proper_store() {
- let mut deps = mock_dependencies();
- STORE
- .save(
- deps.as_mut().storage,
- &Store {
- owner: Addr::unchecked(OWNER),
- limits: StoreLimits {
- max_triple_count: 1u128.into(),
- max_byte_size: 2u128.into(),
- max_triple_byte_size: 3u128.into(),
- max_query_limit: 4u32,
- max_query_variable_count: 5u32,
- max_insert_data_byte_size: 6u128.into(),
- max_insert_data_triple_count: 7u128.into(),
- },
- stat: StoreStat {
- triple_count: 1u128.into(),
- namespace_count: 2u128.into(),
- byte_size: 3u128.into(),
- },
- },
- )
- .unwrap();
-
- let res = query(deps.as_ref(), mock_env(), QueryMsg::Store {});
- assert!(res.is_ok());
- assert_eq!(
- from_json::(&res.unwrap()).unwrap(),
- StoreResponse {
- owner: OWNER.to_string(),
- limits: msg::StoreLimits {
- max_triple_count: 1u128.into(),
- max_byte_size: 2u128.into(),
- max_triple_byte_size: 3u128.into(),
- max_query_limit: 4u32,
- max_query_variable_count: 5u32,
- max_insert_data_byte_size: 6u128.into(),
- max_insert_data_triple_count: 7u128.into(),
- },
- stat: msg::StoreStat {
- triple_count: 1u128.into(),
- namespace_count: 2u128.into(),
- byte_size: 3u128.into(),
- },
- }
- );
- }
-
- fn read_test_data(file: &str) -> Binary {
- let mut bytes: Vec = Vec::new();
-
- File::open(
- Path::new(&env::var("CARGO_MANIFEST_DIR").unwrap())
- .join("testdata")
- .join(file),
- )
- .unwrap()
- .read_to_end(&mut bytes)
- .unwrap();
-
- Binary::from(bytes)
- }
-
- #[test]
- fn proper_select() {
- let cases = vec![
- (
- SelectQuery {
- prefixes: vec![],
- select: vec![
- SelectItem::Variable("a".to_string()),
- SelectItem::Variable("b".to_string()),
- ],
- r#where: WhereClause::Bgp{patterns:vec![TriplePattern {
- subject: VarOrNode::Variable("a".to_string()),
- predicate: VarOrNamedNode::NamedNode(Full(
- "https://ontology.axone.space/core/hasDescription".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("b".to_string()),
- },
- ]},
- limit: None,
- },
- SelectResponse {
- head: Head {
- vars: vec!["a".to_string(), "b".to_string()],
- },
- results: Results {
- bindings: vec![
- BTreeMap::from([
- (
- "a".to_string(),
- Value::URI {
- value: Full("https://ontology.axone.space/dataverse/dataspace/metadata/dcf48417-01c5-4b43-9bc7-49e54c028473".to_string())
- }
- ),
- (
- "b".to_string(),
- Value::Literal {
- value: "A test Data Space.".to_string(),
- lang: Some("en".to_string()),
- datatype: None,
- }
- )
- ]),
- BTreeMap::from([
- (
- "a".to_string(),
- Value::URI {
- value: Full("https://ontology.axone.space/dataverse/dataset/metadata/d1615703-4ee1-4e2f-997e-15aecf1eea4e".to_string())
- }
- ),
- (
- "b".to_string(),
- Value::Literal {
- value: "Un Dataset de test.".to_string(),
- lang: Some("fr".to_string()),
- datatype: None,
- }
- )
- ]),
- BTreeMap::from([
- (
- "a".to_string(),
- Value::URI {
- value: Full("https://ontology.axone.space/dataverse/dataset/metadata/d1615703-4ee1-4e2f-997e-15aecf1eea4e".to_string())
- }
- ),
- (
- "b".to_string(),
- Value::Literal {
- value: "A test Dataset.".to_string(),
- lang: Some("en".to_string()),
- datatype: None,
- }
- )
- ]),
- BTreeMap::from([
- (
- "a".to_string(),
- Value::URI {
- value: Full("https://ontology.axone.space/dataverse/dataspace/metadata/dcf48417-01c5-4b43-9bc7-49e54c028473".to_string())
- }
- ),
- (
- "b".to_string(),
- Value::Literal {
- value: "Un Data Space de test.".to_string(),
- lang: Some("fr".to_string()),
- datatype: None,
- }
- )
- ]),
- ],
- },
- },
- ),
- (
- SelectQuery {
- prefixes: vec![Prefix { prefix: "core".to_string(), namespace: "https://ontology.axone.space/core/".to_string() }],
- select: vec![
- SelectItem::Variable("a".to_string()),
- ],
- r#where: WhereClause::Bgp{patterns:vec![TriplePattern {
- subject: VarOrNode::Variable("a".to_string()),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "core:hasDescription".to_string(),
- )),
- object: VarOrNodeOrLiteral::Literal(Literal::LanguageTaggedString { value: "A test Dataset.".to_string(), language: "en".to_string() }),
- },
- ]},
- limit: None,
- },
- SelectResponse {
- head: Head {
- vars: vec!["a".to_string()],
- },
- results: Results {
- bindings: vec![
- BTreeMap::from([
- (
- "a".to_string(),
- Value::URI {
- value: Full("https://ontology.axone.space/dataverse/dataset/metadata/d1615703-4ee1-4e2f-997e-15aecf1eea4e".to_string())
- }
- ),
- ])
- ],
- },
- },
- ),
- (
- SelectQuery {
- prefixes: vec![],
- select: vec![
- SelectItem::Variable("a".to_string()),
- ],
- r#where: WhereClause::Bgp{patterns:vec![TriplePattern {
- subject: VarOrNode::Node(NamedNode(Full("https://ontology.axone.space/dataverse/dataset/metadata/d1615703-4ee1-4e2f-997e-15aecf1eea4e".to_string()))),
- predicate: VarOrNamedNode::Variable("a".to_string()),
- object: VarOrNodeOrLiteral::Literal(Literal::LanguageTaggedString { value: "A test Dataset.".to_string(), language: "en".to_string() }),
- },
- ]},
- limit: None,
- },
- SelectResponse {
- head: Head {
- vars: vec!["a".to_string()],
- },
- results: Results {
- bindings: vec![
- BTreeMap::from([
- (
- "a".to_string(),
- Value::URI {
- value: Full("https://ontology.axone.space/core/hasDescription".to_string())
- }
- ),
- ])
- ],
- },
- },
- ),
- ];
-
- let mut deps = mock_dependencies();
-
- let info = message_info(&addr(OWNER), &[]);
- instantiate(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InstantiateMsg::default(),
- )
- .unwrap();
-
- execute(
- deps.as_mut(),
- mock_env(),
- info,
- InsertData {
- format: Some(DataFormat::RDFXml),
- data: read_test_data("sample.rdf.xml"),
- },
- )
- .unwrap();
-
- for (q, expected) in cases {
- let res = query(deps.as_ref(), mock_env(), QueryMsg::Select { query: q });
- assert!(res.is_ok());
-
- let result = from_json::(&res.unwrap()).unwrap();
- assert_eq!(result, expected);
- }
- }
-
- #[test]
- fn proper_select_blank_nodes() {
- let cases = vec![
- (
- SelectQuery {
- prefixes: vec![Prefix { prefix: "core".to_string(), namespace: "https://ontology.axone.space/core/".to_string() }],
- select: vec![SelectItem::Variable("a".to_string()), SelectItem::Variable("b".to_string())],
- r#where: WhereClause::Bgp{patterns:vec![
- TriplePattern {
- subject: VarOrNode::Variable("a".to_string()),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "core:hasTemporalCoverage".to_string(),
- )),
- object: VarOrNodeOrLiteral::Node(BlankNode("a".to_string())),
- },
- TriplePattern {
- subject: VarOrNode::Node(BlankNode("a".to_string())),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "core:hasStartDate".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("b".to_string()),
- },
- ]},
- limit: None,
- },
- SelectResponse {
- head: Head { vars: vec!["a".to_string(), "b".to_string()] },
- results: Results {
- bindings: vec![
- BTreeMap::from([
- (
- "a".to_string(),
- Value::URI {
- value: Full("https://ontology.axone.space/dataverse/dataset/metadata/80b1f84e-86dc-4730-b54f-701ad9b1888a".to_string())
- }
- ),
- (
- "b".to_string(),
- Value::Literal {
- value: "2022-01-01T00:00:00+00:00".to_string(),
- lang: None,
- datatype: Some(Full("http://www.w3.org/2001/XMLSchema#dateTime".to_string())),
- }
- )
- ])
- ],
- },
- },
- ),
- (
- SelectQuery {
- prefixes: vec![Prefix { prefix: "core".to_string(), namespace: "https://ontology.axone.space/core/".to_string() }],
- select: vec![SelectItem::Variable("a".to_string()), SelectItem::Variable("b".to_string())],
- r#where: WhereClause::Bgp{patterns:vec![
- TriplePattern {
- subject: VarOrNode::Variable("a".to_string()),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "core:hasTemporalCoverage".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("blank".to_string()),
- },
- TriplePattern {
- subject: VarOrNode::Variable("blank".to_string()),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "core:hasStartDate".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("b".to_string()),
- }
- ]},
- limit: None,
- },
- SelectResponse {
- head: Head { vars: vec!["a".to_string(), "b".to_string()] },
- results: Results {
- bindings: vec![
- BTreeMap::from([
- (
- "a".to_string(),
- Value::URI {
- value: Full("https://ontology.axone.space/dataverse/dataset/metadata/80b1f84e-86dc-4730-b54f-701ad9b1888a".to_string())
- }
- ),
- (
- "b".to_string(),
- Value::Literal {
- value: "2022-01-01T00:00:00+00:00".to_string(),
- lang: None,
- datatype: Some(Full("http://www.w3.org/2001/XMLSchema#dateTime".to_string())),
- }
- )
- ])
- ],
- },
- },
- ),
- (
- SelectQuery {
- prefixes: vec![Prefix { prefix: "core".to_string(), namespace: "https://ontology.axone.space/core/".to_string() }],
- select: vec![SelectItem::Variable("a".to_string()), SelectItem::Variable("b".to_string())],
- r#where: WhereClause::Bgp{patterns:vec![
- TriplePattern {
- subject: VarOrNode::Variable("a".to_string()),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "core:hasTemporalCoverage".to_string(),
- )),
- object: VarOrNodeOrLiteral::Node(BlankNode("blank1".to_string())),
- },
- TriplePattern {
- subject: VarOrNode::Node(BlankNode("blank2".to_string())),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "core:hasInformation".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("b".to_string()),
- },
- ]},
- limit: None,
- },
- SelectResponse {
- head: Head { vars: vec!["a".to_string(), "b".to_string()] },
- results: Results {
- bindings: vec![
- BTreeMap::from([
- (
- "a".to_string(),
- Value::URI {
- value: Full("https://ontology.axone.space/dataverse/dataset/metadata/80b1f84e-86dc-4730-b54f-701ad9b1888a".to_string())
- }
- ),
- (
- "b".to_string(),
- Value::Literal {
- value: "this is a dataset".to_string(),
- lang: None,
- datatype: None,
- }
- )
- ])
- ],
- },
- },
- ),
- (
- SelectQuery {
- prefixes: vec![Prefix { prefix: "core".to_string(), namespace: "https://ontology.axone.space/core/".to_string() }],
- select: vec![SelectItem::Variable("a".to_string()), SelectItem::Variable("b".to_string())],
- r#where: WhereClause::Bgp{patterns:vec![
- TriplePattern {
- subject: VarOrNode::Variable("a".to_string()),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "core:hasTemporalCoverage".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("b".to_string()),
- },
- ]},
- limit: None,
- },
- SelectResponse {
- head: Head { vars: vec!["a".to_string(), "b".to_string()] },
- results: Results {
- bindings: vec![
- BTreeMap::from([
- (
- "a".to_string(),
- Value::URI {
- value: Full("https://ontology.axone.space/dataverse/dataset/metadata/80b1f84e-86dc-4730-b54f-701ad9b1888a".to_string())
- }
- ),
- (
- "b".to_string(),
- Value::BlankNode {
- value: "b0".to_string(),
- }
- )
- ])
- ],
- },
- },
- ),
- ];
-
- let mut deps = mock_dependencies();
-
- let info = message_info(&addr(OWNER), &[]);
- instantiate(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InstantiateMsg::default(),
- )
- .unwrap();
-
- execute(
- deps.as_mut(),
- mock_env(),
- info,
- InsertData {
- format: Some(DataFormat::Turtle),
- data: read_test_data("blank-nodes.ttl"),
- },
- )
- .unwrap();
-
- for (q, expected) in cases {
- let res = query(deps.as_ref(), mock_env(), QueryMsg::Select { query: q });
- assert!(res.is_ok());
-
- let result = from_json::(&res.unwrap()).unwrap();
- assert_eq!(result, expected);
- }
- }
-
- #[test]
- fn invalid_select() {
- let cases = vec![
- (
- SelectQuery {
- prefixes: vec![],
- select: vec![
- SelectItem::Variable("a".to_string()),
- SelectItem::Variable("b".to_string()),
- ],
- r#where: WhereClause::Bgp { patterns: vec![] },
- limit: None,
- },
- Err(StdError::generic_err(
- "Maximum query variable count exceeded",
- )),
- ),
- (
- SelectQuery {
- prefixes: vec![],
- select: vec![],
- r#where: WhereClause::Bgp { patterns: vec![] },
- limit: Some(8000),
- },
- Err(StdError::generic_err("Maximum query limit exceeded")),
- ),
- (
- SelectQuery {
- prefixes: vec![Prefix {
- prefix: "core".to_string(),
- namespace: "https://ontology.axone.space/core/".to_string(),
- }],
- select: vec![SelectItem::Variable("a".to_string())],
- r#where: WhereClause::Bgp {
- patterns: vec![TriplePattern {
- subject: VarOrNode::Variable("a".to_string()),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "invalid:hasDescription".to_string(),
- )),
- object: VarOrNodeOrLiteral::Literal(Literal::LanguageTaggedString {
- value: "A test Dataset.".to_string(),
- language: "en".to_string(),
- }),
- }],
- },
- limit: None,
- },
- Err(StdError::generic_err("Prefix not found: invalid")),
- ),
- (
- SelectQuery {
- prefixes: vec![],
- select: vec![SelectItem::Variable("u".to_string())],
- r#where: WhereClause::Bgp {
- patterns: vec![TriplePattern {
- subject: VarOrNode::Variable("a".to_string()),
- predicate: VarOrNamedNode::NamedNode(Full(
- "https://ontology.axone.space/core/hasDescription".to_string(),
- )),
- object: VarOrNodeOrLiteral::Literal(Literal::LanguageTaggedString {
- value: "A test Dataset.".to_string(),
- language: "en".to_string(),
- }),
- }],
- },
- limit: None,
- },
- Err(StdError::generic_err(
- "Selected variable not found in query",
- )),
- ),
- ];
-
- let mut deps = mock_dependencies();
-
- let info = message_info(&addr(OWNER), &[]);
- instantiate(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InstantiateMsg {
- limits: StoreLimitsInput {
- max_query_variable_count: 1,
- ..Default::default()
- },
- },
- )
- .unwrap();
-
- execute(
- deps.as_mut(),
- mock_env(),
- info,
- InsertData {
- format: Some(DataFormat::RDFXml),
- data: read_test_data("sample.rdf.xml"),
- },
- )
- .unwrap();
-
- for (q, expected) in cases {
- let res = query(deps.as_ref(), mock_env(), QueryMsg::Select { query: q });
- assert_eq!(res, expected);
- }
- }
-
- #[test]
- fn formats_describe() {
- let cases = vec![
- (
- QueryMsg::Describe {
- query: DescribeQuery {
- prefixes: vec![],
- resource: VarOrNamedNode::NamedNode(Full("https://ontology.axone.space/dataverse/dataspace/metadata/dcf48417-01c5-4b43-9bc7-49e54c028473".to_string())),
- r#where: None,
- },
- format: Some(DataFormat::Turtle),
- },
- DescribeResponse {
- format: DataFormat::Turtle,
- data: Binary::from(
- " , ;
-\t \"Test\" , \"AXONE\" ;
-\t \"Data Space de test\"@fr , \"Test Data Space\"@en ;
-\t ;
-\t ;
-\t \"AXONE\" ;
-\t \"A test Data Space.\"@en , \"Un Data Space de test.\"@fr .
-\
- ".to_string().as_bytes().to_vec()),
- }
- ),
- (
- QueryMsg::Describe {
- query: DescribeQuery {
- prefixes: vec![],
- resource: VarOrNamedNode::NamedNode(Full("https://ontology.axone.space/dataverse/dataspace/metadata/dcf48417-01c5-4b43-9bc7-49e54c028473".to_string())),
- r#where: None,
- },
- format: Some(DataFormat::RDFXml),
- },
- DescribeResponse {
- format: DataFormat::RDFXml,
- data: Binary::from(
- "\
-\
-\
-\
-TestAXONE\
-Data Space de test\
-Test Data Space\
-\
-\
-AXONE\
-A test Data Space.\
-Un Data Space de test.\
-\
-\
- ".to_string().as_bytes().to_vec()),
- }
- ),
- (
- QueryMsg::Describe {
- query: DescribeQuery {
- prefixes: vec![],
- resource: VarOrNamedNode::NamedNode(Full("https://ontology.axone.space/dataverse/dataspace/metadata/dcf48417-01c5-4b43-9bc7-49e54c028473".to_string())),
- r#where: WhereClause::Bgp { patterns: vec![
- TriplePattern {
- subject: VarOrNode::Variable("a".to_string()),
- predicate: VarOrNamedNode::NamedNode(Full(
- "https://ontology.axone.space/core/hasDescription".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("b".to_string()),
- },
- ]}.into(),
- },
- format: Some(DataFormat::NTriples),
- },
- DescribeResponse {
- format: DataFormat::NTriples,
- data: Binary::from(
- " .
- .
- \"Test\" .
- \"AXONE\" .
- \"Data Space de test\"@fr .
- \"Test Data Space\"@en .
- .
- .
- \"AXONE\" .
- \"A test Data Space.\"@en .
- \"Un Data Space de test.\"@fr .
-\
- ".to_string().as_bytes().to_vec()),
- }
- ),
- (
- QueryMsg::Describe {
- query: DescribeQuery {
- prefixes: vec![],
- resource: VarOrNamedNode::NamedNode(Full("https://ontology.axone.space/dataverse/dataspace/metadata/dcf48417-01c5-4b43-9bc7-49e54c028473".to_string())),
- r#where: None,
- },
- format: Some(DataFormat::NQuads),
- },
- DescribeResponse {
- format: DataFormat::NQuads,
- data: Binary::from(
- " .
- .
- \"Test\" .
- \"AXONE\" .
- \"Data Space de test\"@fr .
- \"Test Data Space\"@en .
- .
- .
- \"AXONE\" .
- \"A test Data Space.\"@en .
- \"Un Data Space de test.\"@fr .
-\
- ".to_string().as_bytes().to_vec()),
- }
- ),
- ];
-
- let mut deps = mock_dependencies();
-
- let info = message_info(&addr(OWNER), &[]);
- instantiate(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InstantiateMsg::default(),
- )
- .unwrap();
-
- execute(
- deps.as_mut(),
- mock_env(),
- info,
- InsertData {
- format: Some(DataFormat::RDFXml),
- data: read_test_data("sample.rdf.xml"),
- },
- )
- .unwrap();
-
- for (q, expected) in cases {
- let res = query(deps.as_ref(), mock_env(), q);
-
- assert!(res.is_ok());
-
- let result = from_json::(&res.unwrap()).unwrap();
-
- assert_eq!(result.format, expected.format);
- assert_eq!(
- String::from_utf8_lossy(&result.data),
- String::from_utf8_lossy(&expected.data)
- );
- }
- }
-
- #[test]
- fn prefixes_describe() {
- let cases = vec![
- (
- QueryMsg::Describe {
- query: DescribeQuery {
- prefixes: vec![
- Prefix {
- prefix: "metadata".to_string(),
- namespace: "https://ontology.axone.space/dataverse/dataspace/metadata/".to_string(),
- },
- ],
- resource: VarOrNamedNode::NamedNode(Prefixed("metadata:dcf48417-01c5-4b43-9bc7-49e54c028473".to_string())),
- r#where: None,
- },
- format: Some(DataFormat::Turtle),
- },
- DescribeResponse {
- format: DataFormat::Turtle,
- data: Binary::from(
- " , ;
-\t \"Test\" , \"AXONE\" ;
-\t \"Data Space de test\"@fr , \"Test Data Space\"@en ;
-\t ;
-\t ;
-\t \"AXONE\" ;
-\t \"A test Data Space.\"@en , \"Un Data Space de test.\"@fr .
-\
- ".to_string().as_bytes().to_vec()),
- }
- ),
- ];
-
- let mut deps = mock_dependencies();
-
- let info = message_info(&addr(OWNER), &[]);
- instantiate(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InstantiateMsg::default(),
- )
- .unwrap();
-
- execute(
- deps.as_mut(),
- mock_env(),
- info,
- InsertData {
- format: Some(DataFormat::RDFXml),
- data: read_test_data("sample.rdf.xml"),
- },
- )
- .unwrap();
-
- for (q, expected) in cases {
- let res = query(deps.as_ref(), mock_env(), q);
-
- assert!(res.is_ok());
-
- let result = from_json::(&res.unwrap()).unwrap();
-
- assert_eq!(result.format, expected.format);
- assert_eq!(
- String::from_utf8_lossy(&result.data),
- String::from_utf8_lossy(&expected.data)
- );
- }
- }
-
- #[test]
- fn variable_describe() {
- let cases = vec![
- (
- QueryMsg::Describe {
- query: DescribeQuery {
- prefixes: vec![Prefix { prefix: "core".to_string(), namespace: "https://ontology.axone.space/core/".to_string() }],
- resource: VarOrNamedNode::Variable("a".to_string()),
- r#where: WhereClause::Bgp {patterns: vec![
- TriplePattern {
- subject: VarOrNode::Variable("a".to_string()),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "core:hasDescription".to_string(),
- )),
- object: VarOrNodeOrLiteral::Literal(Literal::LanguageTaggedString { value: "A test Dataset.".to_string(), language: "en".to_string() }),
- },
- ]}.into(),
- },
- format: Some(DataFormat::Turtle),
- },
- DescribeResponse {
- format: DataFormat::Turtle,
- data: Binary::from(
- " , ;\n\t \"test\" ;\n\t \"test Dataset\"@en , \"Dataset de test\"@fr ;\n\t ;\n\t ;\n\t ;\n\t \"Me\" ;\n\t ;\n\t \"AXONE\" ;\n\t \"Un Dataset de test.\"@fr , \"A test Dataset.\"@en .\n".to_string().as_bytes().to_vec()),
- }
- ),
- ];
-
- let mut deps = mock_dependencies();
-
- let info = message_info(&addr(OWNER), &[]);
- instantiate(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InstantiateMsg::default(),
- )
- .unwrap();
-
- execute(
- deps.as_mut(),
- mock_env(),
- info,
- InsertData {
- format: Some(DataFormat::RDFXml),
- data: read_test_data("sample.rdf.xml"),
- },
- )
- .unwrap();
-
- for (q, expected) in cases {
- let res = query(deps.as_ref(), mock_env(), q);
-
- assert!(res.is_ok());
-
- let result = from_json::(&res.unwrap()).unwrap();
-
- assert_eq!(result.format, expected.format);
- assert_eq!(
- String::from_utf8_lossy(&result.data),
- String::from_utf8_lossy(&expected.data)
- );
- }
- }
-
- #[test]
- fn variable_multiple_resources_describe() {
- let cases = vec![
- (
- QueryMsg::Describe {
- query: DescribeQuery {
- prefixes: vec![Prefix { prefix: "core".to_string(), namespace: "https://ontology.axone.space/core/".to_string() }],
- resource: VarOrNamedNode::Variable("a".to_string()),
- r#where: WhereClause::Bgp {patterns: vec![
- TriplePattern {
- subject: VarOrNode::Variable("a".to_string()),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "core:hasPublisher".to_string(),
- )),
- object: VarOrNodeOrLiteral::Literal(Literal::Simple("AXONE".to_string())),
- },
- ]}.into(),
- },
- format: Some(DataFormat::Turtle),
- },
- DescribeResponse {
- format: DataFormat::Turtle,
- data: Binary::from(
- " , ;\n\t \"Test\" , \"AXONE\" ;\n\t \"Data Space de test\"@fr , \"Test Data Space\"@en ;\n\t ;\n\t ;\n\t \"AXONE\" ;\n\t \"A test Data Space.\"@en , \"Un Data Space de test.\"@fr .\n , ;\n\t \"test\" ;\n\t \"test Dataset\"@en , \"Dataset de test\"@fr ;\n\t ;\n\t ;\n\t ;\n\t \"Me\" ;\n\t ;\n\t \"AXONE\" ;\n\t \"Un Dataset de test.\"@fr , \"A test Dataset.\"@en .\n".to_string().as_bytes().to_vec()),
- }
- ),
- ];
-
- let mut deps = mock_dependencies();
-
- let info = message_info(&addr(OWNER), &[]);
- instantiate(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InstantiateMsg::default(),
- )
- .unwrap();
-
- execute(
- deps.as_mut(),
- mock_env(),
- info,
- InsertData {
- format: Some(DataFormat::RDFXml),
- data: read_test_data("sample.rdf.xml"),
- },
- )
- .unwrap();
-
- for (q, expected) in cases {
- let res = query(deps.as_ref(), mock_env(), q);
-
- assert!(res.is_ok());
-
- let result = from_json::(&res.unwrap()).unwrap();
-
- assert_eq!(result.format, expected.format);
- assert_eq!(
- String::from_utf8_lossy(&result.data),
- String::from_utf8_lossy(&expected.data)
- );
- }
- }
-
- #[test]
- fn blanknode_describe() {
- let cases = vec![
- (
- QueryMsg::Describe {
- query: DescribeQuery {
- prefixes: vec![
- Prefix { prefix: "core".to_string(), namespace: "https://ontology.axone.space/core/".to_string() },
- Prefix { prefix: "metadata-dataset".to_string(), namespace: "https://ontology.axone.space/dataverse/dataset/metadata/".to_string() },
- ],
- resource: VarOrNamedNode::Variable("x".to_string()),
- r#where: WhereClause::Bgp {patterns: vec![
- TriplePattern {
- subject: VarOrNode::Node(NamedNode(Prefixed("metadata-dataset:80b1f84e-86dc-4730-b54f-701ad9b1888a".to_string()))),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "core:hasTemporalCoverage".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("x".to_string()),
- },
- ]}.into(),
- },
- format: Some(DataFormat::Turtle),
- },
- DescribeResponse {
- format: DataFormat::Turtle,
- data: Binary::from(
- " , ;\n\t \"2022-01-01T00:00:00+00:00\"^^ .\n".to_string().as_bytes().to_vec()),
- }
- ),
- ];
-
- let mut deps = mock_dependencies();
-
- let info = message_info(&addr(OWNER), &[]);
- instantiate(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InstantiateMsg::default(),
- )
- .unwrap();
-
- execute(
- deps.as_mut(),
- mock_env(),
- info,
- InsertData {
- format: Some(DataFormat::Turtle),
- data: read_test_data("blank-nodes.ttl"),
- },
- )
- .unwrap();
-
- for (q, expected) in cases {
- let res = query(deps.as_ref(), mock_env(), q);
-
- assert!(res.is_ok());
-
- let result = from_json::(&res.unwrap()).unwrap();
-
- assert_eq!(result.format, expected.format);
- assert_eq!(
- String::from_utf8_lossy(&result.data),
- String::from_utf8_lossy(&expected.data)
- );
- }
- }
-
- #[test]
- fn proper_construct() {
- let id = "https://ontology.axone.space/dataverse/dataspace/metadata/dcf48417-01c5-4b43-9bc7-49e54c028473";
- let cases = vec![
- (
- InsertData {
- format: Some(DataFormat::RDFXml),
- data: read_test_data("sample.rdf.xml"),
- },
- QueryMsg::Construct {
- query: ConstructQuery {
- prefixes: vec![],
- construct: vec![],
- r#where: WhereClause::Bgp{patterns:vec![TriplePattern {
- subject: VarOrNode::Node(NamedNode(Full(id.to_string()))),
- predicate: VarOrNamedNode::NamedNode(Full(
- "https://ontology.axone.space/core/hasTag".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("o".to_string()),
- }]},
- },
- format: None,
- },
- ConstructResponse {
- format: DataFormat::Turtle,
- data: Binary::from(
- " \"Test\" , \"AXONE\" .\n".to_string().as_bytes().to_vec()),
- },
- ),
- (
- InsertData {
- format: Some(DataFormat::RDFXml),
- data: read_test_data("sample.rdf.xml"),
- },
- QueryMsg::Construct {
- query: ConstructQuery {
- prefixes: vec![
- Prefix { prefix: "my-ns".to_string(), namespace: "https://my-ns.org/".to_string() },
- Prefix { prefix: "metadata-dataset".to_string(), namespace: "https://ontology.axone.space/dataverse/dataset/metadata/".to_string() },
- ],
- construct: vec![
- parser::TripleConstructTemplate {
- subject: VarOrNode::Node(NamedNode(Prefixed("my-ns:instance-1".to_string()))),
- predicate: VarOrNamedNode::NamedNode(Full(
- "https://my-ns/predicate/tag".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("o".to_string()),
- }
- ],
- r#where: WhereClause::Bgp{patterns:vec![TriplePattern {
- subject: VarOrNode::Node(NamedNode(Full(id.to_string()))),
- predicate: VarOrNamedNode::NamedNode(Full(
- "https://ontology.axone.space/core/hasTag".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("o".to_string()),
- }]},
- },
- format: Some(DataFormat::NTriples),
- },
- ConstructResponse {
- format: DataFormat::NTriples,
- data: Binary::from(
- " \"Test\" .\n \"AXONE\" .\n".to_string().as_bytes().to_vec()),
- },
- ),
- (
- InsertData {
- format: Some(DataFormat::Turtle),
- data: read_test_data("blank-nodes.ttl"),
- },
- QueryMsg::Construct {
- query: ConstructQuery {
- prefixes: vec![
- Prefix { prefix: "core".to_string(), namespace: "https://ontology.axone.space/core/".to_string() },
- Prefix { prefix: "metadata-dataset".to_string(), namespace: "https://ontology.axone.space/dataverse/dataset/metadata/".to_string() },
- ],
- construct: vec![
- parser::TripleConstructTemplate {
- subject: VarOrNode::Node(BlankNode("my-metadata".to_string())),
- predicate: VarOrNamedNode::NamedNode(Full(
- "https://my-ns/predicate/tcov".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("tcov".to_string()),
- },
- parser::TripleConstructTemplate {
- subject: VarOrNode::Node(BlankNode("my-metadata".to_string())),
- predicate: VarOrNamedNode::NamedNode(Full(
- "https://my-ns/predicate/info".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("info".to_string()),
- },
- parser::TripleConstructTemplate {
- subject: VarOrNode::Variable("tcov".to_string()),
- predicate: VarOrNamedNode::Variable("tcov_p".to_string()),
- object: VarOrNodeOrLiteral::Variable("tcov_o".to_string()),
- },
- parser::TripleConstructTemplate {
- subject: VarOrNode::Variable("info".to_string()),
- predicate: VarOrNamedNode::Variable("info_p".to_string()),
- object: VarOrNodeOrLiteral::Variable("info_o".to_string()),
- }
- ],
- r#where: WhereClause::Bgp {patterns:vec![
- TriplePattern {
- subject: VarOrNode::Node(NamedNode(Prefixed("metadata-dataset:80b1f84e-86dc-4730-b54f-701ad9b1888a".to_string()))),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "core:hasTemporalCoverage".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("tcov".to_string()),
- },
- TriplePattern {
- subject: VarOrNode::Node(NamedNode(Prefixed("metadata-dataset:80b1f84e-86dc-4730-b54f-701ad9b1888a".to_string()))),
- predicate: VarOrNamedNode::NamedNode(Prefixed(
- "core:hasInformations".to_string(),
- )),
- object: VarOrNodeOrLiteral::Variable("info".to_string()),
- },
- TriplePattern {
- subject: VarOrNode::Variable("tcov".to_string()),
- predicate: VarOrNamedNode::Variable("tcov_p".to_string()),
- object: VarOrNodeOrLiteral::Variable("tcov_o".to_string()),
- },
- TriplePattern {
- subject: VarOrNode::Variable("info".to_string()),
- predicate: VarOrNamedNode::Variable("info_p".to_string()),
- object: VarOrNodeOrLiteral::Variable("info_o".to_string()),
- }
- ]},
- },
- format: Some(DataFormat::NTriples),
- },
- ConstructResponse {
- format: DataFormat::NTriples,
- data: Binary::from(
- " .\n .\n .\n \"this is a dataset\" .\n .\n .\n .\n \"this is a dataset\" .\n .\n .\n \"2022-01-01T00:00:00+00:00\"^^ .\n \"this is a dataset\" .\n".to_string().as_bytes().to_vec()),
- },
- ),
- ];
-
- for (data, q, expected) in cases {
- let mut deps = mock_dependencies();
-
- let info = message_info(&addr(OWNER), &[]);
- instantiate(
- deps.as_mut(),
- mock_env(),
- info.clone(),
- InstantiateMsg {
- limits: StoreLimitsInput::default(),
- },
- )
- .unwrap();
-
- execute(deps.as_mut(), mock_env(), info.clone(), data).unwrap();
-
- let res = query(deps.as_ref(), mock_env(), q);
-
- assert!(res.is_ok());
-
- let result = from_json::(&res.unwrap()).unwrap();
-
- assert_eq!(result.format, expected.format);
- assert_eq!(
- String::from_utf8_lossy(&result.data),
- String::from_utf8_lossy(&expected.data)
- );
- }
- }
-}
diff --git a/contracts/axone-cognitarium/src/error.rs b/contracts/axone-cognitarium/src/error.rs
deleted file mode 100644
index 16b302a3..00000000
--- a/contracts/axone-cognitarium/src/error.rs
+++ /dev/null
@@ -1,77 +0,0 @@
-use cosmwasm_std::{StdError, Uint128};
-use cw_utils::PaymentError;
-use rio_turtle::TurtleError;
-use rio_xml::RdfXmlError;
-use thiserror::Error;
-
-#[derive(Debug, Error, PartialEq)]
-pub enum ContractError {
- #[error("{0}")]
- Std(#[from] StdError),
-
- #[error("{0}")]
- ParseRDF(#[from] RDFParseError),
-
- #[error("{0}")]
- FormatRDF(String),
-
- #[error("{0}")]
- Store(#[from] StoreError),
-
- #[error("Only the owner can perform this operation.")]
- Unauthorized,
-
- #[error("{0}")]
- Payment(#[from] PaymentError),
-}
-
-impl From for ContractError {
- fn from(value: RdfXmlError) -> Self {
- RDFParseError::from(value).into()
- }
-}
-
-impl From for ContractError {
- fn from(value: TurtleError) -> Self {
- RDFParseError::from(value).into()
- }
-}
-
-#[derive(Debug, Eq, Error, PartialEq)]
-pub enum StoreError {
- #[error("Maximum triples number exceeded: {0}")]
- TripleCount(Uint128),
-
- #[error("Maximum byte size exceeded: {0}")]
- ByteSize(Uint128),
-
- #[error("Maximum triple byte size exceeded: {0} / {1}")]
- TripleByteSize(Uint128, Uint128),
-
- #[error("Maximum insert byte size exceeded: {0}")]
- InsertDataByteSize(Uint128),
-
- #[error("Maximum insert triple count exceeded: {0}")]
- InsertDataTripleCount(Uint128),
-}
-
-#[derive(Debug, Eq, Error, PartialEq)]
-pub enum RDFParseError {
- #[error("Error parsing XML RDF: {0}")]
- Xml(String),
-
- #[error("Error parsing Turtle RDF: {0}")]
- Turtle(String),
-}
-
-impl From for RDFParseError {
- fn from(value: RdfXmlError) -> Self {
- RDFParseError::Xml(value.to_string())
- }
-}
-
-impl From for RDFParseError {
- fn from(value: TurtleError) -> Self {
- RDFParseError::Xml(value.to_string())
- }
-}
diff --git a/contracts/axone-cognitarium/src/lib.rs b/contracts/axone-cognitarium/src/lib.rs
deleted file mode 100644
index 14419671..00000000
--- a/contracts/axone-cognitarium/src/lib.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-pub mod contract;
-mod error;
-pub mod msg;
-pub mod parser;
-mod querier;
-mod rdf;
-pub mod state;
-mod storer;
-
-pub use crate::error::ContractError;
diff --git a/contracts/axone-cognitarium/src/msg.rs b/contracts/axone-cognitarium/src/msg.rs
deleted file mode 100644
index 354be5e3..00000000
--- a/contracts/axone-cognitarium/src/msg.rs
+++ /dev/null
@@ -1,392 +0,0 @@
-use crate::parser::{
- ConstructQuery, DescribeQuery, Prefix, SelectQuery, TripleDeleteTemplate, Value, WhereClause,
-};
-use cosmwasm_schema::{cw_serde, QueryResponses};
-use cosmwasm_std::{Binary, Uint128};
-use derive_builder::Builder;
-use std::collections::BTreeMap;
-
-/// Instantiate message
-#[cw_serde]
-#[derive(Default)]
-pub struct InstantiateMsg {
- /// Limitations regarding store usage.
- #[serde(default)]
- pub limits: StoreLimitsInput,
-}
-
-/// Execute messages
-#[cw_serde]
-pub enum ExecuteMsg {
- /// # InsertData
- /// Insert the data as RDF triples in the store.
- /// For already existing triples it acts as no-op.
- ///
- /// Only the smart contract owner (i.e. the address who instantiated it) is authorized to perform
- /// this action.
- InsertData {
- /// The data format in which the triples are serialized.
- /// If not provided, the default format is [Turtle](https://www.w3.org/TR/turtle/) format.
- format: Option,
- /// The data to insert.
- /// The data must be serialized in the format specified by the `format` field. And the data
- /// are subject to the limitations defined by the `limits` specified at contract instantiation.
- data: Binary,
- },
-
- /// # DeleteData
- /// Delete the data (RDF triples) from the store matching the patterns defined by the provided
- /// query. For non-existing triples it acts as no-op.
- ///
- /// Example:
- /// ```json
- /// {
- /// "prefixes": [
- /// { "prefix": "foaf", "namespace": "http://xmlns.com/foaf/0.1/" }
- /// ],
- /// "delete": [
- /// {
- /// "subject": { "variable": "s" },
- /// "predicate": { "variable": "p" },
- /// "object": { "variable": "o" }
- /// }
- /// ],
- /// "where": [
- /// { "simple": { "triplePattern": {
- /// "subject": { "variable": "s" },
- /// "predicate": { "namedNode": {"prefixed": "foaf:givenName"} },
- /// "object": { "literal": { "simple": "Myrddin" } }
- /// } } },
- /// { "simple": { "triplePattern": {
- /// "subject": { "variable": "s" },
- /// "predicate": { "variable": "p" },
- /// "object": { "variable": "o" }
- /// } } }
- /// ]
- /// ```
- ///
- /// Only the smart contract owner (i.e. the address who instantiated it) is authorized to perform
- /// this action.
- DeleteData {
- /// The prefixes used in the operation.
- prefixes: Vec,
- /// Specifies the specific triple templates to delete.
- /// If nothing is provided and the `where` clause is a single Bgp, the patterns are used for
- /// deletion.
- delete: Vec,
- /// Defines the patterns that data (RDF triples) should match in order for it to be
- /// considered for deletion, if any.
- r#where: Option,
- },
-}
-
-/// # SelectQuery
-/// Query messages
-#[cw_serde]
-#[derive(QueryResponses)]
-pub enum QueryMsg {
- /// # Store
- ///
- /// Returns information about the triple store.
- #[returns(StoreResponse)]
- Store {},
-
- /// # Select
- ///
- /// Returns the resources matching the criteria defined by the provided query.
- ///
- #[returns(SelectResponse)]
- Select {
- /// The query to execute.
- query: SelectQuery,
- },
-
- /// # Describe
- ///
- /// Returns a description of the resource identified by the provided IRI as a set of RDF triples
- /// serialized in the provided format.
- #[returns(DescribeResponse)]
- Describe {
- /// The query to execute.
- query: DescribeQuery,
- /// The format in which the triples are serialized.
- /// If not provided, the default format is [Turtle](https://www.w3.org/TR/turtle/) format.
- format: Option,
- },
-
- /// # Construct
- ///
- /// Returns the resources matching the criteria defined by the provided query as a set of RDF
- /// triples serialized in the provided format.
- #[returns(ConstructResponse)]
- Construct {
- /// The query to execute.
- query: ConstructQuery,
- /// The format in which the triples are serialized.
- /// If not provided, the default format is [Turtle](https://www.w3.org/TR/turtle/) format.
- format: Option,
- },
-}
-
-/// # DataFormat
-/// Represents the format in which the data are serialized, for example when returned by a query or
-/// when inserted in the store.
-#[cw_serde]
-#[derive(Default)]
-pub enum DataFormat {
- /// # RDF XML
- /// Output in [RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/) format.
- #[serde(rename = "rdf_xml")]
- RDFXml,
- /// # Turtle
- /// Output in [Turtle](https://www.w3.org/TR/turtle/) format.
- #[serde(rename = "turtle")]
- #[default]
- Turtle,
- /// # N-Triples
- /// Output in [N-Triples](https://www.w3.org/TR/n-triples/) format.
- #[serde(rename = "n_triples")]
- NTriples,
- /// # N-Quads
- /// Output in [N-Quads](https://www.w3.org/TR/n-quads/) format.
- #[serde(rename = "n_quads")]
- NQuads,
-}
-
-impl From<&DataFormat> for axone_rdf::serde::DataFormat {
- fn from(value: &DataFormat) -> Self {
- match value {
- DataFormat::RDFXml => Self::RDFXml,
- DataFormat::Turtle => Self::Turtle,
- DataFormat::NTriples => Self::NTriples,
- DataFormat::NQuads => Self::NQuads,
- }
- }
-}
-
-/// # StoreLimitsInput
-/// Contains requested limitations regarding store usages.
-#[cw_serde]
-#[derive(Builder)]
-#[builder(default, setter(into, strip_option))]
-pub struct StoreLimitsInput {
- /// The maximum number of triples the store can contain.
- /// Default to [Uint128::MAX] if not set, which can be considered as no limit.
- #[serde(default = "StoreLimitsInput::default_max_triple_count")]
- pub max_triple_count: Uint128,
- /// The maximum number of bytes the store can contain.
- /// The size of a triple is counted as the sum of the size of its subject, predicate and object,
- /// including the size of data types and language tags if any.
- /// Default to [Uint128::MAX] if not set, which can be considered as no limit.
- #[serde(default = "StoreLimitsInput::default_max_byte_size")]
- pub max_byte_size: Uint128,
- /// The maximum number of bytes the store can contain for a single triple.
- /// The size of a triple is counted as the sum of the size of its subject, predicate and object,
- /// including the size of data types and language tags if any. The limit is used to prevent
- /// storing very large triples, especially literals.
- /// Default to [Uint128::MAX] if not set, which can be considered as no limit.
- #[serde(default = "StoreLimitsInput::default_max_triple_byte_size")]
- pub max_triple_byte_size: Uint128,
- /// The maximum limit of a query, i.e. the maximum number of triples returned by a select query.
- /// Default to 30 if not set.
- #[serde(default = "StoreLimitsInput::default_max_query_limit")]
- pub max_query_limit: u32,
- /// The maximum number of variables a query can select.
- /// Default to 30 if not set.
- #[serde(default = "StoreLimitsInput::default_max_query_variable_count")]
- pub max_query_variable_count: u32,
- /// The maximum number of bytes an insert data query can contain.
- /// Default to [Uint128::MAX] if not set, which can be considered as no limit.
- #[serde(default = "StoreLimitsInput::default_max_insert_data_byte_size")]
- pub max_insert_data_byte_size: Uint128,
- /// The maximum number of triples an insert data query can contain (after parsing).
- /// Default to [Uint128::MAX] if not set, which can be considered as no limit.
- #[serde(default = "StoreLimitsInput::default_max_insert_data_triple_count")]
- pub max_insert_data_triple_count: Uint128,
-}
-
-impl StoreLimitsInput {
- const fn default_max_query_limit() -> u32 {
- 30
- }
- const fn default_max_query_variable_count() -> u32 {
- 30
- }
- const fn default_max_triple_count() -> Uint128 {
- Uint128::MAX
- }
- const fn default_max_byte_size() -> Uint128 {
- Uint128::MAX
- }
- const fn default_max_triple_byte_size() -> Uint128 {
- Uint128::MAX
- }
- const fn default_max_insert_data_byte_size() -> Uint128 {
- Uint128::MAX
- }
- const fn default_max_insert_data_triple_count() -> Uint128 {
- Uint128::MAX
- }
-}
-
-impl Default for StoreLimitsInput {
- fn default() -> Self {
- Self {
- max_triple_count: Self::default_max_triple_count(),
- max_byte_size: Self::default_max_byte_size(),
- max_triple_byte_size: Self::default_max_triple_byte_size(),
- max_query_limit: Self::default_max_query_limit(),
- max_query_variable_count: Self::default_max_query_variable_count(),
- max_insert_data_byte_size: Self::default_max_insert_data_byte_size(),
- max_insert_data_triple_count: Self::default_max_insert_data_triple_count(),
- }
- }
-}
-
-/// # StoreResponse
-///
-/// Contains information related to triple store.
-#[cw_serde]
-pub struct StoreResponse {
- /// The store owner.
- pub owner: String,
-
- /// The store limits.
- pub limits: StoreLimits,
-
- /// The store current usage.
- pub stat: StoreStat,
-}
-
-/// # StoreLimits
-/// Contains limitations regarding store usages.
-#[cw_serde]
-#[derive(Builder, Default)]
-#[builder(default, setter(into, strip_option))]
-pub struct StoreLimits {
- /// The maximum number of triples the store can contain.
- pub max_triple_count: Uint128,
-
- /// The maximum number of bytes the store can contain.
- /// The size of a triple is counted as the sum of the size of its subject, predicate and object,
- /// including the size of data types and language tags if any.
- pub max_byte_size: Uint128,
-
- /// The maximum number of bytes the store can contain for a single triple.
- /// The size of a triple is counted as the sum of the size of its subject, predicate and object,
- /// including the size of data types and language tags if any. The limit is used to prevent
- /// storing very large triples, especially literals.
- pub max_triple_byte_size: Uint128,
-
- /// The maximum limit of a query, i.e. the maximum number of triples returned by a select query.
- pub max_query_limit: u32,
-
- /// The maximum number of variables a query can select.
- pub max_query_variable_count: u32,
-
- /// The maximum number of bytes an insert data query can contain.
- pub max_insert_data_byte_size: Uint128,
-
- /// The maximum number of triples an insert data query can contain (after parsing).
- pub max_insert_data_triple_count: Uint128,
-}
-
-/// # StoreStat
-///
-/// Contains usage information about the triple store.
-#[cw_serde]
-pub struct StoreStat {
- /// The total number of triple present in the store.
- pub triple_count: Uint128,
-
- /// The total number of IRI namespace present in the store.
- pub namespace_count: Uint128,
-
- /// The total triple size in the store, in bytes.
- pub byte_size: Uint128,
-}
-
-/// # SelectResponse
-/// Represents the response of a [QueryMsg::Select] query.
-#[cw_serde]
-pub struct SelectResponse {
- /// The head of the response, i.e. the set of variables mentioned in the results.
- pub head: Head,
- /// The results of the select query.
- pub results: Results,
-}
-
-/// # DescribeResponse
-/// Represents the response of a [QueryMsg::Describe] query.
-#[cw_serde]
-pub struct DescribeResponse {
- /// The format of the data.
- pub format: DataFormat,
- /// The data serialized in the specified format.
- pub data: Binary,
-}
-
-/// # ConstructResponse
-/// Represents the response of a [QueryMsg::Construct] query.
-#[cw_serde]
-pub struct ConstructResponse {
- /// The format of the data.
- pub format: DataFormat,
- /// The data serialized in the specified format.
- pub data: Binary,
-}
-
-/// # Head
-/// Represents the head of a [SelectResponse].
-#[cw_serde]
-pub struct Head {
- /// The variables selected in the query.
- pub vars: Vec,
-}
-
-/// # Results
-/// Represents the results of a [SelectResponse].
-#[cw_serde]
-pub struct Results {
- /// The bindings of the results.
- pub bindings: Vec>,
-}
-
-#[cfg(test)]
-mod tests {
- use crate::msg::{InstantiateMsg, StoreLimitsInput};
- use cosmwasm_std::Uint128;
- use schemars::_serde_json;
-
- #[test]
- fn store_limit_default_deserialization() {
- let json = r#"
- {}
- "#;
-
- let input: StoreLimitsInput = _serde_json::from_str(json).unwrap();
- assert_eq!(input.max_query_limit, 30);
- assert_eq!(input.max_query_variable_count, 30);
- assert_eq!(input.max_byte_size, Uint128::MAX);
- assert_eq!(input.max_triple_count, Uint128::MAX);
- assert_eq!(input.max_triple_byte_size, Uint128::MAX);
- assert_eq!(input.max_insert_data_byte_size, Uint128::MAX);
- assert_eq!(input.max_insert_data_triple_count, Uint128::MAX);
- }
-
- #[test]
- fn instantiate_default_deserialization() {
- let json = r#"
- {}
- "#;
- let msg: InstantiateMsg = _serde_json::from_str(json).unwrap();
-
- assert_eq!(msg.limits.max_query_limit, 30);
- assert_eq!(msg.limits.max_query_variable_count, 30);
- assert_eq!(msg.limits.max_byte_size, Uint128::MAX);
- assert_eq!(msg.limits.max_triple_count, Uint128::MAX);
- assert_eq!(msg.limits.max_triple_byte_size, Uint128::MAX);
- assert_eq!(msg.limits.max_insert_data_byte_size, Uint128::MAX);
- assert_eq!(msg.limits.max_insert_data_triple_count, Uint128::MAX);
- }
-}
diff --git a/contracts/axone-cognitarium/src/parser/ast.rs b/contracts/axone-cognitarium/src/parser/ast.rs
deleted file mode 100644
index dd6f4033..00000000
--- a/contracts/axone-cognitarium/src/parser/ast.rs
+++ /dev/null
@@ -1,295 +0,0 @@
-use cosmwasm_schema::cw_serde;
-
-/// # IRI
-/// Represents an IRI.
-#[cw_serde]
-pub enum IRI {
- /// # Prefixed
- /// An IRI prefixed with a prefix.
- /// The prefixed IRI is expanded to a full IRI using the prefix definition specified in the query.
- /// For example, the prefixed IRI `rdf:type` is expanded to `http://www.w3.org/1999/02/22-rdf-syntax-ns#type`.
- Prefixed(String),
- /// # Full
- /// A full IRI.
- Full(String),
-}
-
-/// # Value
-#[cw_serde]
-#[serde(tag = "type")]
-pub enum Value {
- /// # URI
- /// Represents an IRI.
- #[serde(rename = "uri")]
- URI {
- /// The value of the IRI.
- value: IRI,
- },
- /// # Literal
- /// Represents a literal S with optional language tag L or datatype IRI D.
- Literal {
- /// The value of the literal.
- value: String,
- /// The language tag of the literal.
- #[serde(rename = "xml:lang")]
- lang: Option,
- /// The datatype of the literal.
- datatype: Option,
- },
- /// # BlankNode
- /// Represents a blank node.
- BlankNode {
- /// The identifier of the blank node.
- value: String,
- },
-}
-
-/// # SelectQuery
-/// Represents a SELECT query over the triple store, allowing to select variables to return
-/// and to filter the results.
-#[cw_serde]
-pub struct SelectQuery {
- /// The prefixes used in the query.
- pub prefixes: Vec,
- /// The items to select.
- /// Note: the number of items to select cannot exceed the maximum query variable count defined
- /// in the store limitations.
- pub select: Vec,
- /// The WHERE clause.
- /// If `None`, there is no WHERE clause, i.e. all triples are returned without filtering.
- pub r#where: WhereClause,
- /// The maximum number of results to return.
- /// If `None`, there is no limit.
- /// Note: the value of the limit cannot exceed the maximum query limit defined in the store
- /// limitations.
- pub limit: Option,
-}
-
-/// # DescribeQuery
-/// Represents a DESCRIBE query over the triple store, allowing to retrieve a description of a resource
-/// as a set of triples serialized in a specific format.
-#[cw_serde]
-pub struct DescribeQuery {
- /// The prefixes used in the query.
- pub prefixes: Vec,
- /// The resource to describe given as a variable or a node.
- pub resource: VarOrNamedNode,
- /// The WHERE clause.
- /// This clause is used to specify the resource identifier to describe using variable bindings.
- pub r#where: Option,
-}
-
-/// # ConstructQuery
-/// Represents a CONSTRUCT query over the triple store, allowing to retrieve a set of triples
-/// serialized in a specific format.
-#[cw_serde]
-pub struct ConstructQuery {
- /// The prefixes used in the query.
- pub prefixes: Vec,
- /// The triples to construct.
- /// If nothing is provided and the `where` clause is a single Bgp, the patterns are used for
- /// construction.
- pub construct: Vec,
- /// The WHERE clause.
- /// This clause is used to specify the triples to construct using variable bindings.
- pub r#where: WhereClause,
-}
-
-/// # Prefix
-/// Represents a prefix, i.e. a shortcut for a namespace used in a query.
-#[cw_serde]
-pub struct Prefix {
- /// The prefix.
- pub prefix: String,
- /// The namespace associated with the prefix.
- pub namespace: String,
-}
-
-/// # SelectItem
-/// Represents an item to select in a [SelectQuery].
-#[cw_serde]
-pub enum SelectItem {
- /// # Variable
- /// Represents a variable.
- Variable(String),
-}
-
-/// # WhereClause
-/// Represents a WHERE clause, i.e. a set of conditions to filter the results.
-#[cw_serde]
-pub enum WhereClause {
- /// # Bgp
- /// Represents a basic graph pattern expressed as a set of triple patterns.
- Bgp { patterns: Vec },
-
- /// # LateralJoin
- /// Evaluates right for all result row of left
- LateralJoin { left: Box, right: Box },
-
- /// # Filter
- /// Filters the inner clause matching the expression.
- /// The solutions coming from the inner clause that do not match the expression are discarded.
- /// The variables provided in the inner clause are available in the filter expression.
- Filter { expr: Expression, inner: Box },
-}
-
-/// # Expression
-/// Represents a logical combination of operations whose evaluation results in a term.
-#[cw_serde]
-pub enum Expression {
- /// A named node constant.
- NamedNode(IRI),
- /// A literal constant.
- Literal(Literal),
- /// A variable that must be bound for evaluation.
- Variable(String),
- /// Logical conjunction of expressions.
- /// All expressions must evaluate to true for the conjunction to be true.
- /// If the conjunction is empty, it is considered true.
- And(Vec),
- /// Logical disjunction of expressions.
- /// At least one expression must evaluate to true for the disjunction to be true.
- /// If the disjunction is empty, it is considered false.
- Or(Vec),
- /// Equality comparison.
- Equal(Box, Box),
- /// Greater than comparison.
- Greater(Box, Box),
- /// Greater or equal comparison.
- GreaterOrEqual(Box, Box),
- /// Less than comparison.
- Less(Box, Box),
- /// Less or equal comparison.
- LessOrEqual(Box, Box),
- /// Negation of an expression.
- Not(Box),
-}
-
-/// # TripleDeleteTemplate
-/// Represents a triple template to be deleted.
-#[cw_serde]
-pub struct TripleDeleteTemplate {
- /// The subject of the triple pattern.
- pub subject: VarOrNamedNode,
- /// The predicate of the triple pattern.
- pub predicate: VarOrNamedNode,
- /// The object of the triple pattern.
- pub object: VarOrNamedNodeOrLiteral,
-}
-
-/// # TripleConstructTemplate
-/// Represents a triple template to be forged for a construct query.
-#[cw_serde]
-pub struct TripleConstructTemplate {
- /// The subject of the triple pattern.
- pub subject: VarOrNode,
- /// The predicate of the triple pattern.
- pub predicate: VarOrNamedNode,
- /// The object of the triple pattern.
- pub object: VarOrNodeOrLiteral,
-}
-
-/// # TriplePattern
-/// Represents a triple pattern in a [SimpleWhereCondition].
-#[cw_serde]
-pub struct TriplePattern {
- /// The subject of the triple pattern.
- pub subject: VarOrNode,
- /// The predicate of the triple pattern.
- pub predicate: VarOrNamedNode,
- /// The object of the triple pattern.
- pub object: VarOrNodeOrLiteral,
-}
-
-/// # VarOrNode
-/// Represents either a variable or a node.
-#[cw_serde]
-pub enum VarOrNode {
- /// # Variable
- /// A variable.
- Variable(String),
- /// # Node
- /// A node, i.e. an IRI or a blank node.
- Node(Node),
-}
-
-/// # VarOrNamedNode
-/// Represents either a variable or a named node (IRI).
-#[cw_serde]
-pub enum VarOrNamedNode {
- /// # Variable
- /// A variable.
- Variable(String),
- /// # NamedNode
- /// An RDF [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri).
- NamedNode(IRI),
-}
-
-/// # VarOrNodeOrLiteral
-/// Represents either a variable, a node or a literal.
-#[cw_serde]
-pub enum VarOrNodeOrLiteral {
- /// # Variable
- /// A variable.
- Variable(String),
- /// # Node
- /// A node, i.e. an IRI or a blank node.
- Node(Node),
- /// # Literal
- /// An RDF [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal), i.e. a simple literal,
- /// a language-tagged string or a typed value.
- Literal(Literal),
-}
-
-/// # VarOrNamedNodeOrLiteral
-/// Represents either a variable, a named node or a literal.
-#[cw_serde]
-pub enum VarOrNamedNodeOrLiteral {
- /// # Variable
- /// A variable.
- Variable(String),
- /// # NamedNode
- /// An RDF [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri).
- NamedNode(IRI),
- /// # Literal
- /// An RDF [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal), i.e. a simple literal,
- /// a language-tagged string or a typed value.
- Literal(Literal),
-}
-
-/// # Literal
-/// An RDF [literal](https://www.w3.org/TR/rdf11-concepts/#dfn-literal).
-#[cw_serde]
-pub enum Literal {
- /// # Simple
- /// A [simple literal](https://www.w3.org/TR/rdf11-concepts/#dfn-simple-literal) without datatype or language form.
- Simple(String),
- /// # LanguageTaggedString
- /// A [language-tagged string](https://www.w3.org/TR/rdf11-concepts/#dfn-language-tagged-string)
- LanguageTaggedString {
- /// The [lexical form](https://www.w3.org/TR/rdf11-concepts/#dfn-lexical-form).
- value: String,
- /// The [language tag](https://www.w3.org/TR/rdf11-concepts/#dfn-language-tag).
- language: String,
- },
- /// # TypedValue
- /// A value with a datatype.
- TypedValue {
- /// The [lexical form](https://www.w3.org/TR/rdf11-concepts/#dfn-lexical-form).
- value: String,
- /// The [datatype IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-datatype-iri).
- datatype: IRI,
- },
-}
-
-/// # Node
-/// Represents either an IRI (named node) or a blank node.
-#[cw_serde]
-pub enum Node {
- /// # NamedNode
- /// An RDF [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri).
- NamedNode(IRI),
- /// # BlankNode
- /// An RDF [blank node](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node).
- BlankNode(String),
-}
diff --git a/contracts/axone-cognitarium/src/parser/mod.rs b/contracts/axone-cognitarium/src/parser/mod.rs
deleted file mode 100644
index f47153fd..00000000
--- a/contracts/axone-cognitarium/src/parser/mod.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-mod ast;
-
-pub use crate::parser::ast::*;
diff --git a/contracts/axone-cognitarium/src/querier/engine.rs b/contracts/axone-cognitarium/src/querier/engine.rs
deleted file mode 100644
index 37e17680..00000000
--- a/contracts/axone-cognitarium/src/querier/engine.rs
+++ /dev/null
@@ -1,1836 +0,0 @@
-use crate::parser::{
- Node, SelectItem, VarOrNamedNode, VarOrNamedNodeOrLiteral, VarOrNode, VarOrNodeOrLiteral,
-};
-use crate::querier::expression::Expression;
-use crate::querier::mapper::{iri_as_node, literal_as_object};
-use crate::querier::plan::{PatternValue, QueryNode, QueryPlan};
-use crate::querier::variable::{ResolvedVariable, ResolvedVariables};
-use crate::rdf::Atom;
-use crate::state::{
- triples, Namespace, NamespaceResolver, NamespaceSolver, Object, Predicate, Subject, Triple,
-};
-use crate::{rdf, state};
-use axone_rdf::normalize::IdentifierIssuer;
-use cosmwasm_std::{Order, StdError, StdResult, Storage};
-use either::{Either, Left, Right};
-use std::collections::{BTreeMap, HashMap, VecDeque};
-use std::iter;
-use std::rc::Rc;
-
-pub struct QueryEngine<'a> {
- storage: &'a dyn Storage,
- ns_cache: Vec,
-}
-
-pub struct SelectResults<'a> {
- pub head: Vec,
- pub solutions: SolutionsIterator<'a>,
-}
-
-impl<'a> QueryEngine<'a> {
- pub fn new(storage: &'a dyn Storage, ns_cache: Vec) -> Self {
- Self { storage, ns_cache }
- }
-
- pub fn select(
- &'a self,
- plan: QueryPlan,
- selection: Vec,
- ) -> StdResult> {
- let bindings = selection
- .iter()
- .map(|item| match item {
- SelectItem::Variable(v) => v,
- })
- .map(|name| -> StdResult<(String, usize)> {
- match plan.get_var_index(name) {
- Some(index) => Ok((name.clone(), index)),
- None => Err(StdError::generic_err(
- "Selected variable not found in query",
- )),
- }
- })
- .collect::>>()?;
-
- Ok(SelectResults {
- head: bindings.keys().cloned().collect(),
- solutions: SolutionsIterator::new(self.eval_plan(plan), bindings),
- })
- }
-
- pub fn construct_atoms(
- &'a self,
- plan: QueryPlan,
- prefixes: &HashMap,
- templates: Vec<(VarOrNode, VarOrNamedNode, VarOrNodeOrLiteral)>,
- ) -> StdResult> {
- let templates = templates
- .into_iter()
- .map(|t| AtomTemplate::try_new(&plan, prefixes, t))
- .collect::>>()?;
-
- Ok(ResolvedAtomIterator::new(
- self.storage,
- self.ns_cache.clone(),
- IdentifierIssuer::new("b", 0u128),
- self.eval_plan(plan),
- templates,
- ))
- }
-
- pub fn construct_triples(
- &'a self,
- plan: QueryPlan,
- templates: Vec,
- ) -> ResolvedTripleIterator<'a> {
- ResolvedTripleIterator::new(self.eval_plan(plan), templates)
- }
-
- pub fn make_triple_templates(
- &'a self,
- plan: &QueryPlan,
- prefixes: &HashMap