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

99

1.45x
Quality

Pending

Does it follow best practices?

Impact

99%

1.45x

Average score across 10 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

criteria.jsonevals/scenario-8/

{
  "context": "This criteria evaluates the engineer's ability to use bitcoinjs-lib for parsing Bitcoin transactions and working with SegWit witness data. The focus is on using the Transaction class to access witness data, calculate transaction weights, and distinguish between SegWit and legacy transactions.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Transaction parsing",
      "description": "Uses Transaction.fromHex() or Transaction.fromBuffer() to correctly parse the transaction from hexadecimal input",
      "max_score": 20
    },
    {
      "name": "Witness data detection",
      "description": "Checks for witness data presence using transaction.hasWitnesses() method or by examining the transaction.ins array for witness field to determine if transaction is SegWit",
      "max_score": 25
    },
    {
      "name": "Weight calculation",
      "description": "Uses transaction.weight() method to get the transaction weight in weight units, or correctly implements weight calculation based on witness data presence",
      "max_score": 20
    },
    {
      "name": "Virtual size calculation",
      "description": "Uses transaction.virtualSize() method to calculate vsize, or correctly derives it from the weight value",
      "max_score": 15
    },
    {
      "name": "Transaction ID retrieval",
      "description": "Uses transaction.getId() method to obtain the transaction ID (txid)",
      "max_score": 10
    },
    {
      "name": "Error handling",
      "description": "Properly handles invalid transaction hex input by catching parsing errors and throwing appropriate error messages",
      "max_score": 10
    }
  ]
}

tile.json