Commit f968557
Align JSON schemas and TypeScript types with TAIP-4, TAIP-14, and TAIP-16 specifications
## Schema Updates
### Invoice Schema (TAIP-16) - Complete Rewrite
- Rewrite invoice.json to match TAIP-16 specification exactly
- Add required fields: id, issueDate, currencyCode, lineItems, total
- Update line items structure with id, unitCode, lineTotal, taxCategory
- Add UBL-compliant tax structures: taxTotal, taxSubtotal, taxCategory
- Add business fields: orderReference, additionalDocumentReference, paymentTerms, accountingCost
- Include schema.org Product attributes: name, image, url
### Authorization Messages (TAIP-4)
- Fix Reject message schema: correct type URI, add @context/@type, make reason optional
- Fix DID/IRI pattern conflicts in base-types.json to resolve validation errors
- Update Authorize schema documentation for TAIP-4 compliance
## TypeScript Updates
### TAIP-4 Authorization Flow Alignment
- Add settlementAsset and amount fields to Authorize interface per TAIP-4
- Update Settle interface: add required settlementAddress, make settlementId optional
- Fix Reject interface: make reason field optional per TAIP-4 specification
- Correct CAIP-220 format documentation: eip155:1:tx/ not eip155:1/tx/
### Validation Results
- All test vectors now pass JSON schema validation
- TypeScript compilation succeeds without errors
- Schemas fully synchronized with latest TAIP specifications
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent d9a3f71 commit f968557
4 files changed
Lines changed: 199 additions & 134 deletions
File tree
- packages/typescript/src
- schemas
- common
- data-structures
- messages
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| 725 | + | |
725 | 726 | | |
726 | 727 | | |
727 | 728 | | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
728 | 742 | | |
729 | 743 | | |
730 | 744 | | |
| |||
778 | 792 | | |
779 | 793 | | |
780 | 794 | | |
781 | | - | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
782 | 802 | | |
| 803 | + | |
783 | 804 | | |
784 | | - | |
| 805 | + | |
785 | 806 | | |
786 | 807 | | |
787 | 808 | | |
788 | 809 | | |
789 | | - | |
| 810 | + | |
790 | 811 | | |
791 | 812 | | |
792 | 813 | | |
| |||
799 | 820 | | |
800 | 821 | | |
801 | 822 | | |
802 | | - | |
803 | | - | |
| 823 | + | |
| 824 | + | |
804 | 825 | | |
805 | | - | |
| 826 | + | |
806 | 827 | | |
807 | 828 | | |
808 | 829 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
0 commit comments