CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-bitcoinjs-lib

Client-side Bitcoin JavaScript library for node.js and browsers with comprehensive Bitcoin protocol support

Overall
score

99%

Overview
Eval results
Files

rubric.jsonevals/scenario-5/

{
  "context": "This criteria evaluates how well the engineer uses bitcoinjs-lib's PSBT functionality to parse PSBTs, calculate transaction fees, and validate fee rates. The focus is on proper usage of PSBT parsing methods, fee calculation functions, and understanding of PSBT transaction properties.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "PSBT parsing",
      "description": "Uses Psbt.fromBase64() to parse the Base64-encoded PSBT string into a PSBT object",
      "max_score": 25
    },
    {
      "name": "Fee calculation",
      "description": "Uses the getFee() method on the PSBT object to calculate the absolute transaction fee in satoshis",
      "max_score": 25
    },
    {
      "name": "Fee rate calculation",
      "description": "Uses the getFeeRate() method on the PSBT object to calculate the fee rate in satoshis per virtual byte",
      "max_score": 25
    },
    {
      "name": "Fee validation logic",
      "description": "Correctly compares the calculated fee rate against the maximum threshold to determine validity",
      "max_score": 15
    },
    {
      "name": "Error handling",
      "description": "Properly handles errors from PSBT parsing (e.g., invalid Base64 format) and fee calculation (e.g., missing UTXO data) by catching and re-throwing or allowing exceptions to propagate",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-bitcoinjs-lib

tile.json