|
| 1 | +# Bitcoin Kernel Go Wrapper - TODO |
| 2 | + |
| 3 | +This document lists the remaining C API functions and data structures from `bitcoinkernel.h` that haven't been wrapped yet in the Go kernel package. |
| 4 | + |
| 5 | +## Current Status |
| 6 | + |
| 7 | +✅ **Implemented:** |
| 8 | +- Chain parameters and context management |
| 9 | +- Block and block index operations |
| 10 | +- Chainstate manager functionality |
| 11 | +- Basic logging support |
| 12 | + |
| 13 | +❌ **Missing:** |
| 14 | +- Transaction processing pipeline |
| 15 | +- Script validation system |
| 16 | +- Block undo data handling |
| 17 | +- Complete callback system integration |
| 18 | + |
| 19 | +## Missing Data Structures |
| 20 | + |
| 21 | +### Core Transaction Types |
| 22 | +- **`kernel_Transaction`** - Transaction handling |
| 23 | +- **`kernel_ScriptPubkey`** - Script public key operations |
| 24 | +- **`kernel_TransactionOutput`** - Transaction output operations |
| 25 | +- **`kernel_BlockPointer`** - Non-owned block pointers (from callbacks) |
| 26 | +- **`kernel_BlockUndo`** - Block undo data operations |
| 27 | +- **`kernel_ByteArray`** - Helper for serialized data |
| 28 | + |
| 29 | +## Missing Functions by Category |
| 30 | + |
| 31 | +### Transaction Operations |
| 32 | +- [ ] `kernel_transaction_create()` - Create transaction from serialized data |
| 33 | +- [ ] `kernel_transaction_destroy()` - Cleanup transaction |
| 34 | + |
| 35 | +### Script Operations |
| 36 | +- [ ] `kernel_script_pubkey_create()` - Create script pubkey |
| 37 | +- [ ] `kernel_script_pubkey_destroy()` - Cleanup script pubkey |
| 38 | +- [ ] `kernel_copy_script_pubkey_data()` - Get serialized script data |
| 39 | +- [ ] `kernel_verify_script()` - **Script verification (IMPORTANT!)** |
| 40 | + |
| 41 | +### Transaction Output Operations |
| 42 | +- [ ] `kernel_transaction_output_create()` - Create transaction output |
| 43 | +- [ ] `kernel_transaction_output_destroy()` - Cleanup transaction output |
| 44 | +- [ ] `kernel_copy_script_pubkey_from_output()` - Extract script from output |
| 45 | +- [ ] `kernel_get_transaction_output_amount()` - Get output amount |
| 46 | + |
| 47 | +### Block Operations (Additional) |
| 48 | +- [ ] `kernel_block_pointer_get_hash()` - Get hash from block pointer |
| 49 | +- [ ] `kernel_copy_block_pointer_data()` - Copy data from block pointer |
| 50 | + |
| 51 | +### Block Undo Operations |
| 52 | +- [ ] `kernel_read_block_undo_from_disk()` - Read undo data from disk |
| 53 | +- [ ] `kernel_block_undo_size()` - Get number of transactions in undo data |
| 54 | +- [ ] `kernel_get_transaction_undo_size()` - Get output count per transaction |
| 55 | +- [ ] `kernel_get_undo_output_height_by_index()` - Get output block height |
| 56 | +- [ ] `kernel_get_undo_output_by_index()` - Get specific undo output |
| 57 | +- [ ] `kernel_block_undo_destroy()` - Cleanup undo data |
| 58 | + |
| 59 | +### Utility Operations |
| 60 | +- [ ] `kernel_byte_array_destroy()` - Cleanup byte arrays |
| 61 | + |
| 62 | +### Callback Support |
| 63 | +- [ ] **Notification callbacks** - Full integration of kernel notification system |
| 64 | +- [ ] **Validation interface callbacks** - Block validation event handling |
0 commit comments