Expose scoring parameters in JS bindings#37
Conversation
There was a problem hiding this comment.
💡 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".
| pub mnemonic: String, | ||
| pub lsp_node_id: String, | ||
| pub lsp_address: String, | ||
| pub scoring_params: Option<ScoringParams>, |
There was a problem hiding this comment.
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 👍 / 👎.
9925a42 to
5809150
Compare
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.
5809150 to
0c2e626
Compare
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: