Skip to content

Expose scoring parameters in JS bindings#37

Merged
amackillop merged 1 commit into
mainfrom
austin_add-ability-to-set-scoring-params
Apr 28, 2026
Merged

Expose scoring parameters in JS bindings#37
amackillop merged 1 commit into
mainfrom
austin_add-ability-to-set-scoring-params

Conversation

@amackillop
Copy link
Copy Markdown
Contributor

@amackillop amackillop commented Apr 24, 2026

The ldk-node revision we now depend on supports configuring ProbabilisticScorer parameters. Pass them through the NAPI layer so JS consumers can tune routing behavior.

All fields from ProbabilisticScoringFeeParameters and ProbabilisticScoringDecayParameters are available as optional overrides in MdkNodeOptions. Unset fields keep their LDK defaults. Manual node penalties use a Record<string, number> with hex node IDs as keys.

TODO:

  • Change ldk-node dependency back to original branch post upstream merge

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1f09269160

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib.rs Outdated
pub mnemonic: String,
pub lsp_node_id: String,
pub lsp_address: String,
pub scoring_params: Option<ScoringParams>,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update TS bindings for new scoring_params option

MdkNodeOptions now accepts scoring_params in Rust, but the committed index.d.ts still defines MdkNodeOptions without scoringParams (and none of the nested scoring fields). In TypeScript projects, passing the new option now fails type-checking, so the new routing-tuning API is effectively unusable without any casts. Regenerate and commit the NAPI declaration files alongside this API change so JS/TS bindings stay consistent.

Useful? React with 👍 / 👎.

@amackillop amackillop force-pushed the austin_add-ability-to-set-scoring-params branch 5 times, most recently from 9925a42 to 5809150 Compare April 25, 2026 03:03
The ldk-node revision we now depend on supports configuring
ProbabilisticScorer parameters. Pass them through the NAPI layer so JS
consumers can tune routing behavior.

All fields from ProbabilisticScoringFeeParameters and
ProbabilisticScoringDecayParameters are available as optional overrides
in MdkNodeOptions. Unset fields keep their LDK defaults. Manual node
penalties use a Record<string, number> with hex node IDs as keys.
@amackillop amackillop force-pushed the austin_add-ability-to-set-scoring-params branch from 5809150 to 0c2e626 Compare April 25, 2026 03:11
@amackillop amackillop merged commit fa70af5 into main Apr 28, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants