Expand description
btctax-forms — fill the OFFICIAL IRS fillable PDFs (Form 8949 + Schedule D) from btctax’s
already-computed tax data. Offline, deterministic, and geometry-verified: every fill is read
back from its own serialized bytes and each value’s widget /Rect is checked against a
map-independent column/row band re-derived from the PDF itself. A mis-mapped cell fails closed.
§Sub-project 1 (TY2025)
- Form 8949 — Bitcoin under Box I (short-term) / Box L (long-term), the 1099-DA revision (NOT Box C/F, which read “other than digital asset transactions”). 11 rows per part per page.
- Schedule D — lines 3 & 7 (ST), 10 & 15 (LT), 16 (total), QOF = No. Lines 17-22 are scoped out (the caller prints a notice).
- These are static XFA-hybrid PDFs: the fill removes the
/AcroForm/XFAlayer (else Acrobat shows blank), sets/NeedAppearances, and pins determinism (drops/Infodates + the trailer/ID).
The tax data is REUSED verbatim from the projection (btctax_core::form_8949 /
btctax_core::schedule_d) — this crate never recomputes gains.
Structs§
- Form1040
Fill - The result of a Form 1040 cap-gains fill: the bytes + what was actually written (drives the CLI’s partial-scope + loss notices).
- Form1040
Inputs - The btctax-evidenced signals that drive the two Form 1040 cells.
- Form1040
Map - The Form 1040 capital-gains field map for one tax year: the capital-gain amount cell (line 7a in 2025 / line 7 in 2024 / line 13 in 2017) + the Digital-Asset question (absent in 2017).
- Form8283
Map - The Form 8283 (Rev. 12-2025) field map for one tax year.
- Form8949
Map - The full Form 8949 field map for one tax year.
- ScheduleD
Map - The Schedule D field map for one tax year.
- Schedule
SeMap - The Schedule SE (Form 1040) field map for one tax year — the filled §1401 line chain.
Enums§
- Forms
Error - Anything that can go wrong filling an official IRS PDF.
Constants§
- SE_
FLOOR - The §1401 net-earnings STOP floor: Schedule SE is not owed when line 4c (
base) is below $400. - SUPPORTED_
YEARS - The tax years this build bundles forms + maps for. Each fill dispatches to the year’s committed
map + bundled PDF via the
Map::for_yearconstructors; an unlisted year fails closed withFormsError::UnsupportedYear.
Functions§
- fill_
form_ 8283 - Fill Form 8283 (Noncash Charitable Contributions, Rev. 12-2025) for
yearfrom the projected donation rows +DonationDetails. ReturnsOk(None)when there are no donations in the year. Fills the donee/appraiser IDENTITY + per-row property data (and, for Section B, checks the “k Digital assets” property-type box); leaves BLANK every OTHER party’s declaration/signature (a LOUD partial-scope notice is the caller’s). More rows than a section holds (4 in Section A / 3 in Section B) overflow onto additional form copies via [overflow::merge_copies]. - fill_
form_ 8949 - Fill Form 8949 (Part I + Part II) for
yearfrom the projection rows and return the PDF bytes. Bitcoin is filed under Box I/L. Parts with > 11 rows paginate: ⌈rows/11⌉ page copies per part, each with its own totals; the copies are merged with per-copy field renaming so no two share a value. Every copy is geometry-verified before merge. - fill_
form_ 1040_ capgains - Fill the capital-gains cells of Form 1040 for
year: line 7a (only when Schedule D is ACTIVE and line 16 ≥ 0; active-and-zero → “-0-”) and the Digital-Asset Yes/No question (YES iff there is btctax-evidenced qualifying activity). ReturnsOk(None)— skip the whole 1040 — when there is no reportable activity (the DA answer would be blank and there is no 7a value). 7b checkboxes are left untouched; a NET LOSS leaves 7a blank (the §1211 line-21 cap is the filer’s). A partial-scope notice enumerating exactly what was filled is the caller’s. - fill_
schedule_ d - Fill Schedule D for
yearfrom the part totals and return the PDF bytes. - fill_
schedule_ se - Fill Schedule SE (Form 1040) for
yearfrom the computed §1401SeTaxResult, the filer’s Form W-2 Social Security wages (line 8a), and the year’s Social Security wage base (line 7). ReturnsOk(None)when net SE earnings are below the $400 floor (no SE tax owed — the form is not written). Line 12 = SS + regular Medicare only (the 0.9% Additional Medicare Tax is a Form 8959 item, not on Schedule SE); whense.addl > 0the caller prints a Form 8959 advisory. - rows_
possibly_ broker_ reported - [I5] How many rows might belong on a SEPARATE 1099-DA-reported Form 8949 (Box G/H/J/K) — i.e. disposals on an exchange that may have issued broker basis reporting. SP1 files EVERY Bitcoin row under Box I/L and says so; a non-zero count is a loud advisory, not a refusal.
- stamp_
draft_ watermark - Stamp a diagonal
DRAFT — ESTIMATE, NOT FOR FILINGwatermark on every page of a filled form. Applied by the CLI when the ledger is pseudo-reconciled (an estimate). The overlay carries its own embedded standard font resource, orthogonal to/NeedAppearances.