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-2/

{
  "context": "This criteria evaluates the engineer's ability to use bitcoinjs-lib's P2PKH payment type functionality to generate addresses, validate them, and extract output scripts. The focus is on correct usage of the library's payment interface, network configuration, and address handling capabilities.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "P2PKH Payment Creation",
      "description": "Uses the `payments.p2pkh()` function from bitcoinjs-lib to create P2PKH payment objects from public keys. Should pass the public key in the `pubkey` parameter.",
      "max_score": 25
    },
    {
      "name": "Network Configuration",
      "description": "Correctly applies network configuration using `networks.bitcoin`, `networks.testnet`, or `networks.regtest` from bitcoinjs-lib. The network parameter should be passed to the payment creation function.",
      "max_score": 20
    },
    {
      "name": "Address Extraction",
      "description": "Correctly extracts the address from the payment object using the `.address` property returned by `payments.p2pkh()`.",
      "max_score": 15
    },
    {
      "name": "Output Script Handling",
      "description": "Correctly extracts and returns the output script using the `.output` property from the P2PKH payment object, which returns a Buffer.",
      "max_score": 15
    },
    {
      "name": "Address Decoding",
      "description": "Uses `address.fromBase58Check()` or similar bitcoinjs-lib address decoding functions to validate and decode P2PKH addresses for validation purposes.",
      "max_score": 15
    },
    {
      "name": "Payment Type Validation",
      "description": "Validates that an address corresponds to a P2PKH payment type, potentially by creating a payment object from the address and checking if it matches P2PKH characteristics or by checking the decoded address version.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-bitcoinjs-lib

tile.json