Client-side Bitcoin JavaScript library for node.js and browsers with comprehensive Bitcoin protocol support
99
Pending
Does it follow best practices?
Impact
99%
1.45xAverage score across 10 eval scenarios
Pending
The risk profile of this skill
{
"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
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10