Client-side Bitcoin JavaScript library for node.js and browsers with comprehensive Bitcoin protocol support
Overall
score
99%
{
"context": "This criteria evaluates proficiency in using bitcoinjs-lib for Taproot key-path spending, including creating P2TR payment objects, generating Schnorr signatures, and building complete Taproot transactions. The focus is exclusively on correct usage of bitcoinjs-lib's Taproot-specific APIs.",
"type": "weighted_checklist",
"checklist": [
{
"name": "P2TR payment creation",
"description": "Uses bitcoinjs-lib's payments.p2tr() function to create a Taproot payment object from an x-only internal public key, correctly handling the network parameter.",
"max_score": 15
},
{
"name": "Bech32m address encoding",
"description": "The P2TR payment object correctly generates a Bech32m-encoded Taproot address using the address property from payments.p2tr().",
"max_score": 10
},
{
"name": "Witness program extraction",
"description": "Correctly extracts and uses the witness program (output script) from the P2TR payment object for transaction outputs.",
"max_score": 10
},
{
"name": "Transaction construction",
"description": "Uses bitcoinjs-lib's Transaction class to properly construct a transaction with addInput() and addOutput() methods, setting appropriate transaction fields.",
"max_score": 15
},
{
"name": "Taproot sighash computation",
"description": "Uses Transaction.hashForWitnessV1() method to compute the signature hash for Taproot inputs, passing the correct input index, prevOutScripts, values array, and hash type.",
"max_score": 20
},
{
"name": "Schnorr signature generation",
"description": "Generates a valid Schnorr signature using the computed sighash, utilizing an ECC library's signSchnorr() method with the private key.",
"max_score": 15
},
{
"name": "Witness data structure",
"description": "Correctly sets the witness field on the transaction input using setWitness() or direct witness array assignment, with the Schnorr signature as the only witness element.",
"max_score": 10
},
{
"name": "Input value handling",
"description": "Properly tracks and uses previous output values (in satoshis) when computing Taproot signature hashes, as required for witness v1 signing.",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-bitcoinjs-libdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10