diff --git a/Cargo.toml b/Cargo.toml index 82ddd0dfc..c13514db2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ package.version = "0.0.87" package.homepage = "https://bitcoinresearchkit.org" package.repository = "https://github.com/bitcoinresearchkit/brk" package.readme = "README.md" +package.rust-version = "1.89" [profile.release] lto = "fat" diff --git a/crates/brk/Cargo.toml b/crates/brk/Cargo.toml index c9766a324..cda677ddf 100644 --- a/crates/brk/Cargo.toml +++ b/crates/brk/Cargo.toml @@ -7,6 +7,7 @@ homepage.workspace = true repository.workspace = true edition.workspace = true version.workspace = true +rust-version.workspace = true build = "build.rs" [features] diff --git a/crates/brk_bundler/Cargo.toml b/crates/brk_bundler/Cargo.toml index b77822a8f..b6fa1b716 100644 --- a/crates/brk_bundler/Cargo.toml +++ b/crates/brk_bundler/Cargo.toml @@ -6,6 +6,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true build = "build.rs" [dependencies] diff --git a/crates/brk_cli/Cargo.toml b/crates/brk_cli/Cargo.toml index 16aaf75ef..58126903d 100644 --- a/crates/brk_cli/Cargo.toml +++ b/crates/brk_cli/Cargo.toml @@ -6,6 +6,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true build = "build.rs" [dependencies] diff --git a/crates/brk_computer/Cargo.toml b/crates/brk_computer/Cargo.toml index eb9d2f168..90a34d99f 100644 --- a/crates/brk_computer/Cargo.toml +++ b/crates/brk_computer/Cargo.toml @@ -6,6 +6,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true build = "build.rs" [dependencies] diff --git a/crates/brk_error/Cargo.toml b/crates/brk_error/Cargo.toml index 5e0b4d690..fc9cc5153 100644 --- a/crates/brk_error/Cargo.toml +++ b/crates/brk_error/Cargo.toml @@ -6,6 +6,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true build = "build.rs" [dependencies] diff --git a/crates/brk_fetcher/Cargo.toml b/crates/brk_fetcher/Cargo.toml index 15c09a62e..5df516679 100644 --- a/crates/brk_fetcher/Cargo.toml +++ b/crates/brk_fetcher/Cargo.toml @@ -6,6 +6,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true build = "build.rs" [dependencies] diff --git a/crates/brk_indexer/Cargo.toml b/crates/brk_indexer/Cargo.toml index ef0c020e4..c12102675 100644 --- a/crates/brk_indexer/Cargo.toml +++ b/crates/brk_indexer/Cargo.toml @@ -6,6 +6,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true build = "build.rs" [dependencies] diff --git a/crates/brk_interface/Cargo.toml b/crates/brk_interface/Cargo.toml index 3ad8d4dc2..a2f843e34 100644 --- a/crates/brk_interface/Cargo.toml +++ b/crates/brk_interface/Cargo.toml @@ -6,6 +6,7 @@ edition.workspace = true version.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true build = "build.rs" [dependencies] diff --git a/crates/brk_logger/Cargo.toml b/crates/brk_logger/Cargo.toml index 27159b385..3153b5900 100644 --- a/crates/brk_logger/Cargo.toml +++ b/crates/brk_logger/Cargo.toml @@ -6,6 +6,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true build = "build.rs" [dependencies] diff --git a/crates/brk_mcp/Cargo.toml b/crates/brk_mcp/Cargo.toml index 49d7e13cb..446e98a75 100644 --- a/crates/brk_mcp/Cargo.toml +++ b/crates/brk_mcp/Cargo.toml @@ -6,6 +6,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true build = "build.rs" [dependencies] diff --git a/crates/brk_parser/Cargo.toml b/crates/brk_parser/Cargo.toml index c90986249..274a0de89 100644 --- a/crates/brk_parser/Cargo.toml +++ b/crates/brk_parser/Cargo.toml @@ -8,6 +8,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true build = "build.rs" [dependencies] diff --git a/crates/brk_server/Cargo.toml b/crates/brk_server/Cargo.toml index 0102d80d3..9a1628858 100644 --- a/crates/brk_server/Cargo.toml +++ b/crates/brk_server/Cargo.toml @@ -6,6 +6,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true build = "build.rs" [dependencies] diff --git a/crates/brk_store/Cargo.toml b/crates/brk_store/Cargo.toml index 79f0a0eb3..1b42a5d07 100644 --- a/crates/brk_store/Cargo.toml +++ b/crates/brk_store/Cargo.toml @@ -8,6 +8,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true build = "build.rs" [dependencies] diff --git a/crates/brk_structs/Cargo.toml b/crates/brk_structs/Cargo.toml index 4437e42e7..bbb96e93b 100644 --- a/crates/brk_structs/Cargo.toml +++ b/crates/brk_structs/Cargo.toml @@ -6,6 +6,7 @@ edition.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true +rust-version.workspace = true build = "build.rs" [dependencies] diff --git a/websites/default/scripts/options.js b/websites/default/scripts/options.js index 2236c50bb..9ba53690d 100644 --- a/websites/default/scripts/options.js +++ b/websites/default/scripts/options.js @@ -2109,29 +2109,38 @@ function createPartialOptions({ env, colors, vecIdToIndexes }) { { name: "sopr", title: `Spent Output Profit Ratio ${title}`, - bottom: list.flatMap(({ color, name, key }) => [ - /** @satisfies {FetchedBaselineSeriesBlueprint} */ ({ - type: "Baseline", - key: `${fixKey(key)}spent_output_profit_ratio`, - title: "sopr", - options: { - createPriceLine: { - value: 1, + bottom: list.flatMap(({ color, name, key }) => { + const soprKey = `${fixKey(key)}spent_output_profit_ratio`; + const asoprKey = `${fixKey(key)}adjusted_spent_output_profit_ratio`; + + return [ + /** @satisfies {FetchedBaselineSeriesBlueprint} */ ({ + type: "Baseline", + key: soprKey, + title: "sopr", + options: { + createPriceLine: { + value: 1, + }, }, - }, - }), - /** @satisfies {FetchedBaselineSeriesBlueprint} */ ({ - type: "Baseline", - key: `${fixKey(key)}adjusted_spent_output_profit_ratio`, - title: "asopr", - colors: [colors.yellow, colors.pink], - options: { - createPriceLine: { - value: 1, - }, - }, - }), - ]), + }), + ...(asoprKey in vecIdToIndexes + ? [ + /** @satisfies {FetchedBaselineSeriesBlueprint} */ ({ + type: "Baseline", + key: asoprKey, + title: "asopr", + colors: [colors.yellow, colors.pink], + options: { + createPriceLine: { + value: 1, + }, + }, + }), + ] + : []), + ]; + }), }, ] : [ @@ -2333,25 +2342,41 @@ function createPartialOptions({ env, colors, vecIdToIndexes }) { }), ]), }, - { - name: "Adjusted", - title: `Adjusted Spent Output Profit Ratio ${title}`, - bottom: list.flatMap(({ color, name, key }) => [ - /** @satisfies {FetchedBaselineSeriesBlueprint} */ ({ - type: "Baseline", + ...(() => { + const reducedList = list + .map(({ color, name, key }) => ({ + color, + name, key: `${fixKey( key, )}adjusted_spent_output_profit_ratio`, - title: name, - color, - options: { - createPriceLine: { - value: 1, + })) + .filter(({ key }) => key in vecIdToIndexes); + + return reducedList.length + ? [ + { + name: "Adjusted", + title: `Adjusted Spent Output Profit Ratio ${title}`, + bottom: reducedList.flatMap( + ({ color, name, key }) => [ + /** @satisfies {FetchedBaselineSeriesBlueprint} */ ({ + type: "Baseline", + key, + title: name, + color, + options: { + createPriceLine: { + value: 1, + }, + }, + }), + ], + ), }, - }, - }), - ]), - }, + ] + : []; + })(), ], }, ]),