@integraledger/lcp-placement-visa-tap 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # @integraledger/lcp-placement-visa-tap
2
+
3
+ ## 0.9.0
4
+
5
+ First public release.
6
+
7
+ `0.9.0` is deliberate: this is a release candidate for 1.0, not a preview. The implementation is complete
8
+ against LCP v1.38 and certified by the conformance corpus, and the remaining distance to 1.0 is the
9
+ specification's own — the standard is still moving through its steering committee, and this package will not
10
+ claim a stability its protocol has not yet promised.
11
+
12
+ Development before this release happened in a private repository and is not reproduced here; no earlier
13
+ version was ever available to install.
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,14 @@
1
+ Integra Protocol
2
+ Copyright 2026 Integra Ledger
3
+
4
+ This product includes software developed by Integra Ledger (https://integraledger.com).
5
+
6
+ "Integra", "Integra Ledger", and the Integra logo are trademarks of Integra Ledger.
7
+ Trademark use is not granted by the Apache License 2.0 (see Section 6).
8
+
9
+ The Legal Context Protocol is co-stewarded by Integra Ledger and AAA-ICDR. This repository is a
10
+ reference implementation of the standard's open layer; the specification itself is published at
11
+ https://legalcontextprotocol.org/standard and is not part of this distribution.
12
+
13
+ The vendored submodule under lib/commerce-payments is Coinbase's AuthCaptureEscrow and carries its own
14
+ MIT licence at lib/commerce-payments/LICENSE.md. It is not covered by the Apache License above.
package/README.md ADDED
@@ -0,0 +1,149 @@
1
+ # @integraledger/lcp-placement-visa-tap
2
+
3
+ **The header this package writes is not covered by any Visa TAP signature, and that is the first thing to
4
+ know about it.** TAP's agent recognition signature covers exactly two derived components — `@authority` and
5
+ `@path` — and RFC 9421 puts only the components enumerated in `Signature-Input` into the signature base.
6
+ A custom header sits outside that base, so any party in the request path may replace it and every TAP
7
+ signature still verifies. This placement makes an ATR reference **available** on a TAP request. It proves
8
+ nothing about integrity of the transport, and `verify` treats it as a placement — it never raises the class
9
+ ladder, so an unbound header can never be mistaken for evidence of a weld.
10
+
11
+ ```bash
12
+ npm install @integraledger/lcp-placement-visa-tap
13
+ ```
14
+
15
+ | | |
16
+ |---|---|
17
+ | **Chain** | none — TAP authorizes a payment, it settles nothing on-chain |
18
+ | **Pattern** | `http-advisory` (LCP §8.3.7, Tier A) |
19
+ | **Field** | `headers.x-lcp-hash` — the only `header-map` container in the placement set |
20
+ | **Carrier types** | `sha256` only |
21
+ | **Signature coverage** | **none** — the header is outside `Signature-Input`'s covered components |
22
+ | **Spec** | Visa TAP specifications (Visa Developer) + RFC 9421, gate discharged **2026-07-30** |
23
+
24
+ ## Use
25
+
26
+ ```ts
27
+ import { VISA_TAP_PLACEMENT_TIER_A, visaTapPlacement } from "@integraledger/lcp-placement-visa-tap";
28
+
29
+ declare const request: { headers: Record<string, string> }; // the TAP request, as received
30
+
31
+ const placed = visaTapPlacement.place({ type: "sha256", value: "0x…" }, { headers: {} });
32
+ const ref = visaTapPlacement.extract(request);
33
+ ```
34
+
35
+ ## Specification provenance — verified against the live host, 2026-07-30
36
+
37
+ Read against the live Visa TAP specification published at Visa Developer
38
+ (`developer.visa.com/capabilities/trusted-agent-protocol/trusted-agent-protocol-specifications`), the
39
+ `visa/trusted-agent-protocol` reference implementation's RFC 9421 documentation, and RFC 9421 itself. Three
40
+ claims were put to the spec, and all three hold:
41
+
42
+ 1. **The three-signature model is real, and its shapes differ.** TAP carries an *Agent Recognition
43
+ Signature* "provided in the message header (HTTP header, REST API header or similar message header)", a
44
+ *Consumer/Device Identity Signature* "provided in the message request body", and a *Payment Container
45
+ Signature* also in the request body. Two of the three are body objects — the Agentic Consumer Recognition
46
+ Object and the Agentic Payment Container.
47
+
48
+ 2. **`Signature-Input` names the covered components, and TAP names two of them.** The agent recognition
49
+ signature covers `@authority` (the target URI authority) and `@path` (the absolute path), plus the
50
+ signature parameters `created`, `expires`, `keyid`, `alg`, `nonce` and `tag` (`agent-browser-auth` or
51
+ `agent-payer-auth`). RFC 9421 §1.1 defines covered components as "an ordered set of HTTP message
52
+ component identifiers … that indicates the set of message components covered by the signature", and §2.5
53
+ builds the signature base from exactly that set. **A header absent from the enumeration is not in the
54
+ signature base**, which is what makes `x-lcp-hash` replaceable in transit without invalidating anything.
55
+ The reference implementation's documentation records the same two derived components.
56
+
57
+ 3. **A sibling body object lacking its own `nonce`/`kid`/`alg`/`signature` quartet is genuinely unbound.**
58
+ Both existing body objects carry that quartet, with the object's `nonce` **matching the message
59
+ signature's nonce** — so a nonce mismatch invalidates the binding even where the object's own signature
60
+ verifies. An LCP reference dropped into the body as a bare `{ type, value }` sibling inherits nothing
61
+ from that chain: no key identifier, no algorithm, no signature, no nonce to mismatch. It would be
62
+ silently replaceable while *looking* bound to a reader, which is strictly worse than an honestly
63
+ advertised header.
64
+
65
+ **Drift against LCP v1.37 §C.6: none material.** The appendix is an illustration; the host spec is binding
66
+ — the host's live specification is what binds. §C.6's description of the covered components, the body-object quartet and the nonce-match rule all
67
+ survive the live read. Two notes for the record: the covered-component limitation is stated for the agent
68
+ recognition signature in the specification and repeated for the reference implementation, so it is the
69
+ protocol's shape and not one demo's shortcut; and no TAP extension registry or change-management process
70
+ surfaced anywhere in the specification index, matching §C.6's own finding. TAP's only extensibility language
71
+ is that "an Agent or a Payment Scheme may optionally define additional fields that could be part of the
72
+ signature" — a coordinated arrangement, not a filing.
73
+
74
+ ## What is Tier B here, and why no manifest declares it
75
+
76
+ Two integration points would actually be **bound**, and both need TAP's stewards or a payment scheme:
77
+
78
+ - the reference inside one of the existing signed body objects, under the extensibility clause above; or
79
+ - a new sibling object carrying its own `nonce`/`kid`/`alg`/`signature` quartet, mirroring the pattern the
80
+ two existing objects follow.
81
+
82
+ A third path binds the header itself: add `x-lcp-hash` to the `Signature-Input` covered components. That is
83
+ also a coordinated change, and therefore also Tier B.
84
+
85
+ None of the three is declared as a manifest. A manifest asserting a field shape whose owner has not defined
86
+ it asserts a shape the host has not defined, and a manifest is the thing a stranger acts on. The forward
87
+ path lives here in prose, honestly, and the stewards are invited to define the placement.
88
+
89
+ ## Not `sidecar-attestation`
90
+
91
+ LCP §8.3.3 is a separate on-chain transaction anchored to a settlement. **TAP settles nothing on-chain** —
92
+ it authorizes a payment that some rail later settles — so there is no settlement transaction to anchor to.
93
+ An earlier plan draft assigned that pattern token to this package and it was wrong. The pattern is §8.3.7
94
+ HTTP-Layer Advisory, which is exactly what an uncovered header is.
95
+
96
+ ## The surface is deliberately two exports
97
+
98
+ `visaTapPlacement` is `makePlacement(VISA_TAP_PLACEMENT_TIER_A)` — `makePlacement` comes from
99
+ [`@integraledger/lcp-binding-core`](../binding-core#readme) — and nothing else — the manifest *is* the
100
+ adapter (S7). Both members are total: a refusal is a returned value, never a thrown exception.
101
+
102
+ **There is no helper here that builds an unsigned sibling body object, and a test pins the export set so
103
+ there never is.** That helper is the single worst thing this package could ship: a body sibling carrying the
104
+ reference without the quartet does not inherit TAP's signature chain, is silently replaceable, and would
105
+ look bound to a reader. The anti-pattern is unbuildable from this surface rather than discouraged in a
106
+ comment.
107
+
108
+ ## Reading the header is case-insensitive; writing preserves the counterparty's spelling
109
+
110
+ RFC 9110 makes `X-LCP-Hash` and `x-lcp-hash` the same field, so `extract` folds case — that is what reading
111
+ this container correctly means, not a heuristic. `place` writes the manifest's own lowercase spelling on a
112
+ fresh header and **reuses an existing key's casing** when one folds to a match, because emitting a second
113
+ spelling would produce two headers RFC 9110 considers one. Only the declared name is read: a header named
114
+ anything else does not exist to this package.
115
+
116
+ What `place` does **not** do is repair a document that arrives already carrying two spellings of this one
117
+ field. The write updates the first key that folds to a match and leaves the other exactly as the counterparty
118
+ sent it, stale — and a stack that canonicalizes field names would then collapse the two JSON keys into one
119
+ field with two values. That input is malformed at the HTTP layer before this placement ever sees it, and
120
+ repairing it would change the kit's header-map rule for every protocol using it, so the state is pinned in
121
+ this package's tests rather than fixed here.
122
+
123
+ ## Carrier types are `["sha256"]`, and the list is exactly one on purpose
124
+
125
+ A header holds a scalar, so the encoding is `bare-value` and the field's own name fixes the type — a bare
126
+ value carries no type tag, so a second permitted type would leave a reader unable to tell a hash from a
127
+ URL. `url` is absent for the further reason that this carrier is already the weakest one in the set;
128
+ offering discovery-grade content through it would compound an uncovered header with an unattested target.
129
+
130
+ ## A placement, not a binding
131
+
132
+ TAP describes an authorization, not a settlement. This package is a `ReferencePlacementAdapter` — two pure
133
+ functions and a manifest, no ports, no chain, no lifecycle. Where the payment TAP authorizes settles on a
134
+ bound rail, that rail's binding welds the record; otherwise this placement is the record's whole protocol
135
+ reach and reads with an honest `not-attempted` at settlement-enumeration.
136
+
137
+ ## Provenance
138
+
139
+ Cut against the Visa TAP specification at Visa Developer and RFC 9421, gate discharged **2026-07-30**, and
140
+ reconciled against LCP v1.37 §C.6 the same day.
141
+
142
+ ---
143
+
144
+ **Requires Node >= 24.** Part of the
145
+ [Legal Context Protocol open layer](https://github.com/IntegraLedger/integra-protocol) — see the
146
+ [documentation](https://github.com/IntegraLedger/integra-protocol/blob/main/docs/developer/index.md)
147
+ and the
148
+ [package index](https://github.com/IntegraLedger/integra-protocol/blob/main/docs/developer/reference.md).
149
+ Apache-2.0.
@@ -0,0 +1,3 @@
1
+ export { VISA_TAP_PLACEMENT_TIER_A } from "./manifest.js";
2
+ export { visaTapPlacement } from "./placement.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { VISA_TAP_PLACEMENT_TIER_A } from "./manifest.js";
2
+ export { visaTapPlacement } from "./placement.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,52 @@
1
+ import type { PlacementManifest } from "@integraledger/lcp-binding-core";
2
+ /**
3
+ * Visa TAP (Trusted Agent Protocol) reference placement — Tier A, and UNBOUND.
4
+ *
5
+ * Cut against the LIVE TAP specification published at Visa Developer
6
+ * (`developer.visa.com/capabilities/trusted-agent-protocol/trusted-agent-protocol-specifications`), the
7
+ * `visa/trusted-agent-protocol` reference implementation's RFC 9421 documentation, and RFC 9421 itself —
8
+ * gate discharged 2026-07-30 against LCP v1.37 §C.6, re-checked against v1.38 §C.6 on 2026-08-08 — no
9
+ * material drift either time.
10
+ *
11
+ * TAP is built on HTTP Message Signatures [RFC 9421] with a three-signature model establishing agent
12
+ * identity (a header signature), consumer identity and payment authorization (two signed body objects). A
13
+ * custom header carrying the reference is available today with no coordination — and it is **not covered by
14
+ * any signature**: TAP's agent recognition signature covers exactly `@authority` and `@path`, and RFC 9421
15
+ * §2.5 builds the signature base from only the components `Signature-Input` enumerates. Anything on the path
16
+ * can therefore replace `x-lcp-hash` while every TAP signature still verifies. Binding it means adding the
17
+ * header to the covered components, which is itself a coordinated change and therefore Tier B.
18
+ *
19
+ * This manifest declares the unbound header because it is what is honestly available. The README leads with
20
+ * the limitation rather than burying it, and `verify` treats the result as a placement — it never raises the
21
+ * class ladder through the reference-placement step, so an unbound header can never be mistaken for
22
+ * evidence of a weld.
23
+ *
24
+ * **NOT `sidecar-attestation`.** §8.3.3 is a separate on-chain transaction anchored to a settlement. TAP
25
+ * settles nothing on-chain; there is no settlement transaction to anchor to. An earlier plan draft assigned
26
+ * that token and it was wrong. §8.3.7 HTTP-Layer Advisory is what an uncovered header actually is.
27
+ *
28
+ * **The `_TIER_A` in the name is load-bearing here**, unlike in `placement-ucp` where the re-cut collapsed
29
+ * the two-manifest design into one: TAP genuinely has Tier B integration points (inside one of the signed
30
+ * body objects under the spec's extensibility clause, a new sibling object carrying its own
31
+ * `nonce`/`kid`/`alg`/`signature` quartet, or naming this header in `Signature-Input`). None is declared as
32
+ *
33
+ * (`kid` here is the BODY OBJECT's quartet field, not RFC 9421's `keyid` signature parameter — the two
34
+ * spellings sit side by side in this package and are two different structures, not a contradiction to
35
+ * reconcile. RFC 9421 §2.3 names the parameter `keyid`; the body objects follow JOSE's `kid`. Neither is
36
+ * verifiable from the reference implementation, which mentions neither, so both are left as read.)
37
+ * a manifest — a manifest asserting a shape whose owner has not defined it is the asserting-a-shape defect,
38
+ * and a manifest is the thing a stranger acts on — so the forward path lives in the README's prose and this
39
+ * name says which tier the shipped thing is.
40
+ *
41
+ * `encoding` is `bare-value` with `carrierTypes: ["sha256"]`: a header holds a scalar and the field's own
42
+ * name fixes the type. That is also why the type list is exactly one — a bare value carries no type tag, so
43
+ * a second permitted type would leave a reader unable to tell a hash from a URL. `url` is excluded for the
44
+ * further reason that this carrier is already the weakest in the set; pairing an uncovered header with an
45
+ * unattested target would compound two weaknesses into something a reader could easily overread.
46
+ *
47
+ * The container is `header-map`, the only one in the placement set: RFC 9110 field names compare
48
+ * case-insensitively, so the kit folds case on read and reuses an existing key's casing on write. Neither is
49
+ * a heuristic — it is what reading and writing an HTTP field map correctly means.
50
+ */
51
+ export declare const VISA_TAP_PLACEMENT_TIER_A: PlacementManifest;
52
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,eAAO,MAAM,yBAAyB,EAAE,iBAUvC,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Visa TAP (Trusted Agent Protocol) reference placement — Tier A, and UNBOUND.
3
+ *
4
+ * Cut against the LIVE TAP specification published at Visa Developer
5
+ * (`developer.visa.com/capabilities/trusted-agent-protocol/trusted-agent-protocol-specifications`), the
6
+ * `visa/trusted-agent-protocol` reference implementation's RFC 9421 documentation, and RFC 9421 itself —
7
+ * gate discharged 2026-07-30 against LCP v1.37 §C.6, re-checked against v1.38 §C.6 on 2026-08-08 — no
8
+ * material drift either time.
9
+ *
10
+ * TAP is built on HTTP Message Signatures [RFC 9421] with a three-signature model establishing agent
11
+ * identity (a header signature), consumer identity and payment authorization (two signed body objects). A
12
+ * custom header carrying the reference is available today with no coordination — and it is **not covered by
13
+ * any signature**: TAP's agent recognition signature covers exactly `@authority` and `@path`, and RFC 9421
14
+ * §2.5 builds the signature base from only the components `Signature-Input` enumerates. Anything on the path
15
+ * can therefore replace `x-lcp-hash` while every TAP signature still verifies. Binding it means adding the
16
+ * header to the covered components, which is itself a coordinated change and therefore Tier B.
17
+ *
18
+ * This manifest declares the unbound header because it is what is honestly available. The README leads with
19
+ * the limitation rather than burying it, and `verify` treats the result as a placement — it never raises the
20
+ * class ladder through the reference-placement step, so an unbound header can never be mistaken for
21
+ * evidence of a weld.
22
+ *
23
+ * **NOT `sidecar-attestation`.** §8.3.3 is a separate on-chain transaction anchored to a settlement. TAP
24
+ * settles nothing on-chain; there is no settlement transaction to anchor to. An earlier plan draft assigned
25
+ * that token and it was wrong. §8.3.7 HTTP-Layer Advisory is what an uncovered header actually is.
26
+ *
27
+ * **The `_TIER_A` in the name is load-bearing here**, unlike in `placement-ucp` where the re-cut collapsed
28
+ * the two-manifest design into one: TAP genuinely has Tier B integration points (inside one of the signed
29
+ * body objects under the spec's extensibility clause, a new sibling object carrying its own
30
+ * `nonce`/`kid`/`alg`/`signature` quartet, or naming this header in `Signature-Input`). None is declared as
31
+ *
32
+ * (`kid` here is the BODY OBJECT's quartet field, not RFC 9421's `keyid` signature parameter — the two
33
+ * spellings sit side by side in this package and are two different structures, not a contradiction to
34
+ * reconcile. RFC 9421 §2.3 names the parameter `keyid`; the body objects follow JOSE's `kid`. Neither is
35
+ * verifiable from the reference implementation, which mentions neither, so both are left as read.)
36
+ * a manifest — a manifest asserting a shape whose owner has not defined it is the asserting-a-shape defect,
37
+ * and a manifest is the thing a stranger acts on — so the forward path lives in the README's prose and this
38
+ * name says which tier the shipped thing is.
39
+ *
40
+ * `encoding` is `bare-value` with `carrierTypes: ["sha256"]`: a header holds a scalar and the field's own
41
+ * name fixes the type. That is also why the type list is exactly one — a bare value carries no type tag, so
42
+ * a second permitted type would leave a reader unable to tell a hash from a URL. `url` is excluded for the
43
+ * further reason that this carrier is already the weakest in the set; pairing an uncovered header with an
44
+ * unattested target would compound two weaknesses into something a reader could easily overread.
45
+ *
46
+ * The container is `header-map`, the only one in the placement set: RFC 9110 field names compare
47
+ * case-insensitively, so the kit folds case on read and reuses an existing key's casing on write. Neither is
48
+ * a heuristic — it is what reading and writing an HTTP field map correctly means.
49
+ */
50
+ export const VISA_TAP_PLACEMENT_TIER_A = {
51
+ protocol: "visa-tap",
52
+ pattern: "http-advisory",
53
+ tier: "A",
54
+ encoding: "bare-value",
55
+ container: { kind: "header-map" },
56
+ field: "headers.x-lcp-hash",
57
+ carrierTypes: ["sha256"],
58
+ specRef: "Visa TAP — custom HTTP header outside the Signature-Input covered set (@authority, @path); RFC 9421 §1.1/§2.5 (gate discharged 2026-07-30: see README)",
59
+ };
60
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAsB;IAC1D,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,eAAe;IACxB,IAAI,EAAE,GAAG;IACT,QAAQ,EAAE,YAAY;IACtB,SAAS,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE;IACjC,KAAK,EAAE,oBAAoB;IAC3B,YAAY,EAAE,CAAC,QAAQ,CAAC;IACxB,OAAO,EACL,wJAAwJ;CAC3J,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { type ReferencePlacementAdapter } from "@integraledger/lcp-binding-core";
2
+ /**
3
+ * The Visa TAP reference placement. The manifest IS the adapter (S7) — there is nothing else here, and that
4
+ * is a claim about the protocol, not brevity for its own sake.
5
+ *
6
+ * `header-map` supplies every mechanic this placement needs: the RFC 9110 case fold on read, the
7
+ * existing-key-casing reuse on write so this placement never ADDS a second spelling of one HTTP field
8
+ * (a document that arrived with two is not repaired either — README), creation of an absent header map,
9
+ * replacement of an unmergeable one, purity, and every refusal the vectors pin. TAP adds no
10
+ * semantic rule on top — unlike UCP, whose terms link must be HTTPS, the only thing this header can hold is
11
+ * an atrHash, and the §8.1 codec already rules on that. A wrap here would be a third override of the kit
12
+ * with nothing to justify it.
13
+ *
14
+ * **A CONSTANT, not a factory.** The header name is fixed by this package, not by the deployment: it is an
15
+ * ordinary custom HTTP field, so there is no namespace to parameterize and nothing a caller could supply that
16
+ * would make the header any more bound than it is. The export set is pinned by a test for the related
17
+ * reason — no helper here may build an unsigned sibling body object.
18
+ */
19
+ export declare const visaTapPlacement: ReferencePlacementAdapter;
20
+ //# sourceMappingURL=placement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placement.d.ts","sourceRoot":"","sources":["../src/placement.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,iCAAiC,CAAC;AAGzC;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,EAAE,yBAE9B,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { makePlacement, } from "@integraledger/lcp-binding-core";
2
+ import { VISA_TAP_PLACEMENT_TIER_A } from "./manifest.js";
3
+ /**
4
+ * The Visa TAP reference placement. The manifest IS the adapter (S7) — there is nothing else here, and that
5
+ * is a claim about the protocol, not brevity for its own sake.
6
+ *
7
+ * `header-map` supplies every mechanic this placement needs: the RFC 9110 case fold on read, the
8
+ * existing-key-casing reuse on write so this placement never ADDS a second spelling of one HTTP field
9
+ * (a document that arrived with two is not repaired either — README), creation of an absent header map,
10
+ * replacement of an unmergeable one, purity, and every refusal the vectors pin. TAP adds no
11
+ * semantic rule on top — unlike UCP, whose terms link must be HTTPS, the only thing this header can hold is
12
+ * an atrHash, and the §8.1 codec already rules on that. A wrap here would be a third override of the kit
13
+ * with nothing to justify it.
14
+ *
15
+ * **A CONSTANT, not a factory.** The header name is fixed by this package, not by the deployment: it is an
16
+ * ordinary custom HTTP field, so there is no namespace to parameterize and nothing a caller could supply that
17
+ * would make the header any more bound than it is. The export set is pinned by a test for the related
18
+ * reason — no helper here may build an unsigned sibling body object.
19
+ */
20
+ export const visaTapPlacement = makePlacement(VISA_TAP_PLACEMENT_TIER_A);
21
+ //# sourceMappingURL=placement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placement.js","sourceRoot":"","sources":["../src/placement.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,GAEd,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAE1D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA8B,aAAa,CACtE,yBAAyB,CAC1B,CAAC"}
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@integraledger/lcp-placement-visa-tap",
3
+ "version": "0.9.0",
4
+ "description": "Places an LCP reference into a Visa TAP request. The header sits outside TAP's signature.",
5
+ "keywords": [
6
+ "lcp",
7
+ "legal-context-protocol",
8
+ "legal-terms",
9
+ "agentic-commerce",
10
+ "placement",
11
+ "visa",
12
+ "tap"
13
+ ],
14
+ "type": "module",
15
+ "sideEffects": false,
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "default": "./dist/index.js"
20
+ },
21
+ "./package.json": "./package.json"
22
+ },
23
+ "files": [
24
+ "dist",
25
+ "src",
26
+ "CHANGELOG.md",
27
+ "LICENSE",
28
+ "NOTICE"
29
+ ],
30
+ "publishConfig": {
31
+ "registry": "https://registry.npmjs.org",
32
+ "access": "public"
33
+ },
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://github.com/IntegraLedger/integra-protocol.git",
37
+ "directory": "packages/placement-visa-tap"
38
+ },
39
+ "bugs": {
40
+ "url": "https://github.com/IntegraLedger/integra-protocol/issues"
41
+ },
42
+ "homepage": "https://github.com/IntegraLedger/integra-protocol/tree/main/packages/placement-visa-tap#readme",
43
+ "dependencies": {
44
+ "@integraledger/lcp-binding-core": "0.9.0"
45
+ },
46
+ "devDependencies": {
47
+ "@cfworker/json-schema": "4.1.1",
48
+ "@types/node": "24.13.3",
49
+ "vitest": "4.1.10"
50
+ },
51
+ "license": "Apache-2.0",
52
+ "engines": {
53
+ "node": ">=24"
54
+ },
55
+ "scripts": {
56
+ "build": "tsc -p tsconfig.build.json",
57
+ "typecheck": "tsc -p tsconfig.json --noEmit",
58
+ "test": "vitest run"
59
+ }
60
+ }
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { VISA_TAP_PLACEMENT_TIER_A } from "./manifest.js";
2
+ export { visaTapPlacement } from "./placement.js";
@@ -0,0 +1,62 @@
1
+ import type { PlacementManifest } from "@integraledger/lcp-binding-core";
2
+
3
+ /**
4
+ * Visa TAP (Trusted Agent Protocol) reference placement — Tier A, and UNBOUND.
5
+ *
6
+ * Cut against the LIVE TAP specification published at Visa Developer
7
+ * (`developer.visa.com/capabilities/trusted-agent-protocol/trusted-agent-protocol-specifications`), the
8
+ * `visa/trusted-agent-protocol` reference implementation's RFC 9421 documentation, and RFC 9421 itself —
9
+ * gate discharged 2026-07-30 against LCP v1.37 §C.6, re-checked against v1.38 §C.6 on 2026-08-08 — no
10
+ * material drift either time.
11
+ *
12
+ * TAP is built on HTTP Message Signatures [RFC 9421] with a three-signature model establishing agent
13
+ * identity (a header signature), consumer identity and payment authorization (two signed body objects). A
14
+ * custom header carrying the reference is available today with no coordination — and it is **not covered by
15
+ * any signature**: TAP's agent recognition signature covers exactly `@authority` and `@path`, and RFC 9421
16
+ * §2.5 builds the signature base from only the components `Signature-Input` enumerates. Anything on the path
17
+ * can therefore replace `x-lcp-hash` while every TAP signature still verifies. Binding it means adding the
18
+ * header to the covered components, which is itself a coordinated change and therefore Tier B.
19
+ *
20
+ * This manifest declares the unbound header because it is what is honestly available. The README leads with
21
+ * the limitation rather than burying it, and `verify` treats the result as a placement — it never raises the
22
+ * class ladder through the reference-placement step, so an unbound header can never be mistaken for
23
+ * evidence of a weld.
24
+ *
25
+ * **NOT `sidecar-attestation`.** §8.3.3 is a separate on-chain transaction anchored to a settlement. TAP
26
+ * settles nothing on-chain; there is no settlement transaction to anchor to. An earlier plan draft assigned
27
+ * that token and it was wrong. §8.3.7 HTTP-Layer Advisory is what an uncovered header actually is.
28
+ *
29
+ * **The `_TIER_A` in the name is load-bearing here**, unlike in `placement-ucp` where the re-cut collapsed
30
+ * the two-manifest design into one: TAP genuinely has Tier B integration points (inside one of the signed
31
+ * body objects under the spec's extensibility clause, a new sibling object carrying its own
32
+ * `nonce`/`kid`/`alg`/`signature` quartet, or naming this header in `Signature-Input`). None is declared as
33
+ *
34
+ * (`kid` here is the BODY OBJECT's quartet field, not RFC 9421's `keyid` signature parameter — the two
35
+ * spellings sit side by side in this package and are two different structures, not a contradiction to
36
+ * reconcile. RFC 9421 §2.3 names the parameter `keyid`; the body objects follow JOSE's `kid`. Neither is
37
+ * verifiable from the reference implementation, which mentions neither, so both are left as read.)
38
+ * a manifest — a manifest asserting a shape whose owner has not defined it is the asserting-a-shape defect,
39
+ * and a manifest is the thing a stranger acts on — so the forward path lives in the README's prose and this
40
+ * name says which tier the shipped thing is.
41
+ *
42
+ * `encoding` is `bare-value` with `carrierTypes: ["sha256"]`: a header holds a scalar and the field's own
43
+ * name fixes the type. That is also why the type list is exactly one — a bare value carries no type tag, so
44
+ * a second permitted type would leave a reader unable to tell a hash from a URL. `url` is excluded for the
45
+ * further reason that this carrier is already the weakest in the set; pairing an uncovered header with an
46
+ * unattested target would compound two weaknesses into something a reader could easily overread.
47
+ *
48
+ * The container is `header-map`, the only one in the placement set: RFC 9110 field names compare
49
+ * case-insensitively, so the kit folds case on read and reuses an existing key's casing on write. Neither is
50
+ * a heuristic — it is what reading and writing an HTTP field map correctly means.
51
+ */
52
+ export const VISA_TAP_PLACEMENT_TIER_A: PlacementManifest = {
53
+ protocol: "visa-tap",
54
+ pattern: "http-advisory",
55
+ tier: "A",
56
+ encoding: "bare-value",
57
+ container: { kind: "header-map" },
58
+ field: "headers.x-lcp-hash",
59
+ carrierTypes: ["sha256"],
60
+ specRef:
61
+ "Visa TAP — custom HTTP header outside the Signature-Input covered set (@authority, @path); RFC 9421 §1.1/§2.5 (gate discharged 2026-07-30: see README)",
62
+ };
@@ -0,0 +1,26 @@
1
+ import {
2
+ makePlacement,
3
+ type ReferencePlacementAdapter,
4
+ } from "@integraledger/lcp-binding-core";
5
+ import { VISA_TAP_PLACEMENT_TIER_A } from "./manifest.js";
6
+
7
+ /**
8
+ * The Visa TAP reference placement. The manifest IS the adapter (S7) — there is nothing else here, and that
9
+ * is a claim about the protocol, not brevity for its own sake.
10
+ *
11
+ * `header-map` supplies every mechanic this placement needs: the RFC 9110 case fold on read, the
12
+ * existing-key-casing reuse on write so this placement never ADDS a second spelling of one HTTP field
13
+ * (a document that arrived with two is not repaired either — README), creation of an absent header map,
14
+ * replacement of an unmergeable one, purity, and every refusal the vectors pin. TAP adds no
15
+ * semantic rule on top — unlike UCP, whose terms link must be HTTPS, the only thing this header can hold is
16
+ * an atrHash, and the §8.1 codec already rules on that. A wrap here would be a third override of the kit
17
+ * with nothing to justify it.
18
+ *
19
+ * **A CONSTANT, not a factory.** The header name is fixed by this package, not by the deployment: it is an
20
+ * ordinary custom HTTP field, so there is no namespace to parameterize and nothing a caller could supply that
21
+ * would make the header any more bound than it is. The export set is pinned by a test for the related
22
+ * reason — no helper here may build an unsigned sibling body object.
23
+ */
24
+ export const visaTapPlacement: ReferencePlacementAdapter = makePlacement(
25
+ VISA_TAP_PLACEMENT_TIER_A,
26
+ );