agentic-payments 0.1.14 → 0.1.16
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/README.md +90 -116
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/visa-tap/index.d.ts +9 -10
- package/dist/visa-tap/index.d.ts.map +1 -1
- package/dist/visa-tap/index.js +8 -9
- package/dist/visa-tap/index.js.map +1 -1
- package/dist/visa-tap/quic-transport.d.ts +70 -8
- package/dist/visa-tap/quic-transport.d.ts.map +1 -1
- package/dist/visa-tap/quic-transport.js +130 -22
- package/dist/visa-tap/quic-transport.js.map +1 -1
- package/dist/visa-tap/rfc9421-fields.d.ts +29 -0
- package/dist/visa-tap/rfc9421-fields.d.ts.map +1 -0
- package/dist/visa-tap/rfc9421-fields.js +207 -0
- package/dist/visa-tap/rfc9421-fields.js.map +1 -0
- package/dist/visa-tap/rfc9421.d.ts +26 -8
- package/dist/visa-tap/rfc9421.d.ts.map +1 -1
- package/dist/visa-tap/rfc9421.js +188 -81
- package/dist/visa-tap/rfc9421.js.map +1 -1
- package/dist/visa-tap/types.d.ts +52 -2
- package/dist/visa-tap/types.d.ts.map +1 -1
- package/package.json +4 -25
package/dist/visa-tap/rfc9421.js
CHANGED
|
@@ -1,95 +1,212 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* RFC 9421 HTTP Message Signatures
|
|
2
|
+
* RFC 9421 HTTP Message Signatures (Ed25519)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* The signer lists every component it signs, in signing order, in the
|
|
5
|
+
* `Signature-Input` field, and the `@signature-params` line of the signature
|
|
6
|
+
* base is byte-identical to that field's value, so any RFC 9421 verifier can
|
|
7
|
+
* rebuild the same base. The verifier is driven by the received
|
|
8
|
+
* `Signature-Input`: it rebuilds the base in the listed order, refuses
|
|
9
|
+
* components the caller relies on but the signer did not cover, and checks
|
|
10
|
+
* `created`, `expires` and `alg`.
|
|
5
11
|
*/
|
|
6
12
|
import { sha256 } from '@noble/hashes/sha256';
|
|
13
|
+
import { sha512 } from '@noble/hashes/sha512';
|
|
7
14
|
import { bytesToHex, hexToBytes } from '@noble/hashes/utils';
|
|
8
15
|
import * as ed25519 from '@noble/ed25519';
|
|
16
|
+
import { assertLabel, parseSignatureField, parseSignatureInputField, serializeSignatureParams, serializeString, } from './rfc9421-fields.js';
|
|
17
|
+
ed25519.etc.sha512Sync = (...m) => sha512(ed25519.etc.concatBytes(...m));
|
|
18
|
+
const ALG = 'ed25519';
|
|
19
|
+
const DEFAULT_LABEL = 'sig1';
|
|
20
|
+
const DEFAULT_EXPIRES_IN = 300;
|
|
21
|
+
const DEFAULT_CLOCK_SKEW = 30;
|
|
22
|
+
/** Derived components this implementation can resolve, in signing order. */
|
|
23
|
+
const DERIVED = ['@method', '@authority', '@path'];
|
|
24
|
+
const FIELD_NAME_RE = /^[a-z0-9!#$%&'*+.^_`|~-]+$/;
|
|
25
|
+
function assertFieldValue(name, value) {
|
|
26
|
+
if (/[\r\n\0]/.test(value)) {
|
|
27
|
+
throw new Error(`component "${name}" contains CR, LF or NUL`);
|
|
28
|
+
}
|
|
29
|
+
return value.trim();
|
|
30
|
+
}
|
|
9
31
|
/**
|
|
10
|
-
*
|
|
32
|
+
* Resolve the caller's view of the message into canonical component values.
|
|
33
|
+
* Field names are lowercased; a name supplied twice (in any case) is an error.
|
|
11
34
|
*/
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (
|
|
22
|
-
|
|
35
|
+
function resolveComponents(components) {
|
|
36
|
+
const values = new Map();
|
|
37
|
+
const method = assertFieldValue('@method', components.method);
|
|
38
|
+
const authority = assertFieldValue('@authority', components.authority).toLowerCase();
|
|
39
|
+
let path = assertFieldValue('@path', components.path);
|
|
40
|
+
if (path === '')
|
|
41
|
+
path = '/';
|
|
42
|
+
if (!method || !authority)
|
|
43
|
+
throw new Error('@method and @authority must be non-empty');
|
|
44
|
+
if (!path.startsWith('/') || path.includes('?')) {
|
|
45
|
+
throw new Error('@path must be an absolute path without a query');
|
|
23
46
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
47
|
+
values.set('@method', method);
|
|
48
|
+
values.set('@authority', authority);
|
|
49
|
+
values.set('@path', path);
|
|
50
|
+
if (components.contentDigest !== undefined) {
|
|
51
|
+
values.set('content-digest', assertFieldValue('content-digest', components.contentDigest));
|
|
52
|
+
}
|
|
53
|
+
for (const [rawName, rawValue] of Object.entries(components.headers ?? {})) {
|
|
54
|
+
const name = rawName.toLowerCase();
|
|
55
|
+
if (!FIELD_NAME_RE.test(name))
|
|
56
|
+
throw new Error(`invalid header name "${rawName}"`);
|
|
57
|
+
if (values.has(name))
|
|
58
|
+
throw new Error(`header "${name}" is supplied more than once`);
|
|
59
|
+
values.set(name, assertFieldValue(name, rawValue));
|
|
60
|
+
}
|
|
61
|
+
return values;
|
|
62
|
+
}
|
|
63
|
+
function buildSignatureBase(covered, values, signatureParams) {
|
|
64
|
+
const lines = covered.map((name) => {
|
|
65
|
+
const value = values.get(name);
|
|
66
|
+
if (value === undefined)
|
|
67
|
+
throw new Error(`covered component "${name}" is not available`);
|
|
68
|
+
return `${serializeString(name)}: ${value}`;
|
|
69
|
+
});
|
|
70
|
+
lines.push(`"@signature-params": ${signatureParams}`);
|
|
71
|
+
return lines.join('\n');
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Sign an HTTP request per RFC 9421 with Ed25519.
|
|
75
|
+
*
|
|
76
|
+
* Covers `@method`, `@authority`, `@path`, then `content-digest` when
|
|
77
|
+
* `contentDigest` is given, then every entry of `headers` in insertion order.
|
|
78
|
+
* All of them are listed, in that order, in `Signature-Input`.
|
|
79
|
+
*/
|
|
80
|
+
export async function signHttpMessage(components, privateKeyHex, keyId, options = {}) {
|
|
81
|
+
const label = options.label ?? DEFAULT_LABEL;
|
|
82
|
+
assertLabel(label);
|
|
83
|
+
const values = resolveComponents(components);
|
|
84
|
+
const covered = [...values.keys()];
|
|
85
|
+
const created = options.created ?? Math.floor(Date.now() / 1000);
|
|
86
|
+
const expiresIn = options.expiresInSeconds ?? DEFAULT_EXPIRES_IN;
|
|
87
|
+
if (!Number.isInteger(created) || created < 0)
|
|
88
|
+
throw new Error('created must be a non-negative integer');
|
|
89
|
+
if (!Number.isInteger(expiresIn) || expiresIn < 0) {
|
|
90
|
+
throw new Error('expiresInSeconds must be a non-negative integer');
|
|
28
91
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
92
|
+
const expires = expiresIn > 0 ? created + expiresIn : undefined;
|
|
93
|
+
const nonce = options.nonce ?? generateNonce();
|
|
94
|
+
const params = [['created', created]];
|
|
95
|
+
if (expires !== undefined)
|
|
96
|
+
params.push(['expires', expires]);
|
|
97
|
+
params.push(['nonce', nonce], ['keyid', keyId], ['alg', ALG]);
|
|
98
|
+
if (options.tag !== undefined)
|
|
99
|
+
params.push(['tag', options.tag]);
|
|
100
|
+
const signatureParams = serializeSignatureParams(covered, params);
|
|
101
|
+
const signatureBase = buildSignatureBase(covered, values, signatureParams);
|
|
102
|
+
const signatureBytes = ed25519.sign(new TextEncoder().encode(signatureBase), hexToBytes(privateKeyHex));
|
|
36
103
|
const signatureB64 = Buffer.from(signatureBytes).toString('base64');
|
|
37
|
-
// Build Signature-Input header
|
|
38
|
-
const signatureInput = `sig1=("@method" "@authority" "@path");created=${created};nonce="${nonce}";keyid="${keyId}";alg="ed25519"`;
|
|
39
104
|
return {
|
|
40
|
-
signatureInput
|
|
41
|
-
signature:
|
|
105
|
+
signatureInput: `${label}=${signatureParams}`,
|
|
106
|
+
signature: `${label}=:${signatureB64}:`,
|
|
42
107
|
nonce,
|
|
43
108
|
created,
|
|
109
|
+
...(expires !== undefined ? { expires } : {}),
|
|
110
|
+
coveredComponents: covered,
|
|
44
111
|
};
|
|
45
112
|
}
|
|
113
|
+
function selectMember(members, label, field) {
|
|
114
|
+
if (label !== undefined) {
|
|
115
|
+
const value = members.get(label);
|
|
116
|
+
if (value === undefined)
|
|
117
|
+
throw new Error(`${field} has no member "${label}"`);
|
|
118
|
+
return [label, value];
|
|
119
|
+
}
|
|
120
|
+
if (members.size !== 1)
|
|
121
|
+
throw new Error(`${field} has ${members.size} members; pass options.label`);
|
|
122
|
+
return [...members.entries()][0];
|
|
123
|
+
}
|
|
124
|
+
function checkParams(input, signed, maxAgeSeconds, options) {
|
|
125
|
+
const params = new Map(input.params);
|
|
126
|
+
const created = params.get('created');
|
|
127
|
+
const expires = params.get('expires');
|
|
128
|
+
const alg = params.get('alg');
|
|
129
|
+
const now = options.now ?? Math.floor(Date.now() / 1000);
|
|
130
|
+
const skew = options.clockSkewSeconds ?? DEFAULT_CLOCK_SKEW;
|
|
131
|
+
if (typeof created !== 'number')
|
|
132
|
+
throw new Error('signature has no created parameter');
|
|
133
|
+
if (created > now + skew)
|
|
134
|
+
throw new Error('signature created in the future');
|
|
135
|
+
if (now - created > maxAgeSeconds)
|
|
136
|
+
throw new Error('signature is older than maxAgeSeconds');
|
|
137
|
+
if (expires !== undefined) {
|
|
138
|
+
if (typeof expires !== 'number' || expires < created)
|
|
139
|
+
throw new Error('invalid expires parameter');
|
|
140
|
+
if (now > expires + skew)
|
|
141
|
+
throw new Error('signature has expired');
|
|
142
|
+
}
|
|
143
|
+
else if (options.requireExpires) {
|
|
144
|
+
throw new Error('signature has no expires parameter');
|
|
145
|
+
}
|
|
146
|
+
if (alg !== undefined && alg !== ALG)
|
|
147
|
+
throw new Error(`unsupported alg "${String(alg)}"`);
|
|
148
|
+
if (options.expectedKeyId !== undefined && params.get('keyid') !== options.expectedKeyId) {
|
|
149
|
+
throw new Error('keyid does not match the expected key');
|
|
150
|
+
}
|
|
151
|
+
if (signed.created !== undefined && signed.created !== created) {
|
|
152
|
+
throw new Error('created does not match Signature-Input');
|
|
153
|
+
}
|
|
154
|
+
if (signed.nonce !== undefined && signed.nonce !== params.get('nonce')) {
|
|
155
|
+
throw new Error('nonce does not match Signature-Input');
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function checkCoverage(covered, values, options) {
|
|
159
|
+
const seen = new Set();
|
|
160
|
+
for (const name of covered) {
|
|
161
|
+
if (seen.has(name))
|
|
162
|
+
throw new Error(`component "${name}" is listed twice`);
|
|
163
|
+
seen.add(name);
|
|
164
|
+
if (name.startsWith('@') && !DERIVED.includes(name)) {
|
|
165
|
+
throw new Error(`unsupported derived component "${name}"`);
|
|
166
|
+
}
|
|
167
|
+
if (!name.startsWith('@') && !FIELD_NAME_RE.test(name)) {
|
|
168
|
+
throw new Error(`invalid component name "${name}"`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
// Everything the caller relies on must be covered; nothing unlisted is trusted.
|
|
172
|
+
const required = [...values.keys(), ...(options.requiredComponents ?? []).map((n) => n.toLowerCase())];
|
|
173
|
+
for (const name of required) {
|
|
174
|
+
if (!seen.has(name))
|
|
175
|
+
throw new Error(`component "${name}" is not covered by the signature`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
46
178
|
/**
|
|
47
|
-
* Verify RFC 9421 HTTP
|
|
179
|
+
* Verify an RFC 9421 Ed25519 signature on an HTTP request.
|
|
180
|
+
*
|
|
181
|
+
* `components` is the verifier's view of the received request. The signature
|
|
182
|
+
* base is rebuilt from the received `Signature-Input` (its order, its
|
|
183
|
+
* parameters). Verification fails unless every supplied component, including
|
|
184
|
+
* `contentDigest` and every entry of `headers`, is covered, `created` is
|
|
185
|
+
* present and no older than `maxAgeSeconds` (and not in the future beyond the
|
|
186
|
+
* clock skew), `expires` (if present) has not passed, and `alg` (if present)
|
|
187
|
+
* is `ed25519`. Never throws; returns false on any failure.
|
|
48
188
|
*
|
|
49
|
-
* @param maxAgeSeconds - Maximum age of signature in seconds (default
|
|
189
|
+
* @param maxAgeSeconds - Maximum age of the signature in seconds (default 300)
|
|
50
190
|
*/
|
|
51
|
-
export async function verifyHttpSignature(components, signed, publicKeyHex, maxAgeSeconds = 300) {
|
|
191
|
+
export async function verifyHttpSignature(components, signed, publicKeyHex, maxAgeSeconds = 300, options = {}) {
|
|
52
192
|
try {
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
if (
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
if (components.headers) {
|
|
70
|
-
for (const [name, value] of Object.entries(components.headers)) {
|
|
71
|
-
baseParts.push(`"${name.toLowerCase()}": ${value}`);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
// Extract keyid from signature input
|
|
75
|
-
const keyId = extractKeyId(signed.signatureInput);
|
|
76
|
-
// Add signature parameters
|
|
77
|
-
baseParts.push(`"@signature-params": ("@method" "@authority" "@path");created=${signed.created};nonce="${signed.nonce}";keyid="${keyId}"`);
|
|
78
|
-
const signatureBase = baseParts.join('\n');
|
|
79
|
-
// Extract signature bytes
|
|
80
|
-
const sigMatch = signed.signature.match(/^sig1=:(.+):$/);
|
|
81
|
-
if (!sigMatch || !sigMatch[1]) {
|
|
82
|
-
throw new Error('Invalid signature format');
|
|
83
|
-
}
|
|
84
|
-
const signatureB64 = sigMatch[1];
|
|
85
|
-
const signatureBytes = Buffer.from(signatureB64, 'base64');
|
|
86
|
-
// Verify with Ed25519
|
|
87
|
-
const publicKey = hexToBytes(publicKeyHex);
|
|
88
|
-
const messageBytes = new TextEncoder().encode(signatureBase);
|
|
89
|
-
return await ed25519.verify(signatureBytes, messageBytes, publicKey);
|
|
193
|
+
const [label, input] = selectMember(parseSignatureInputField(signed.signatureInput), options.label, 'Signature-Input');
|
|
194
|
+
const signatures = parseSignatureField(signed.signature);
|
|
195
|
+
const signatureBytes = signatures.get(label);
|
|
196
|
+
if (!signatureBytes)
|
|
197
|
+
throw new Error(`Signature has no member "${label}"`);
|
|
198
|
+
if (signatureBytes.length !== 64)
|
|
199
|
+
throw new Error('Ed25519 signatures are 64 bytes');
|
|
200
|
+
const values = resolveComponents(components);
|
|
201
|
+
checkCoverage(input.components, values, options);
|
|
202
|
+
checkParams(input, signed, maxAgeSeconds, options);
|
|
203
|
+
const signatureParams = serializeSignatureParams(input.components, input.params);
|
|
204
|
+
const signatureBase = buildSignatureBase(input.components, values, signatureParams);
|
|
205
|
+
return ed25519.verify(signatureBytes, new TextEncoder().encode(signatureBase), hexToBytes(publicKeyHex), {
|
|
206
|
+
zip215: false,
|
|
207
|
+
});
|
|
90
208
|
}
|
|
91
|
-
catch
|
|
92
|
-
console.error('Signature verification failed:', error);
|
|
209
|
+
catch {
|
|
93
210
|
return false;
|
|
94
211
|
}
|
|
95
212
|
}
|
|
@@ -109,14 +226,4 @@ function generateNonce() {
|
|
|
109
226
|
crypto.getRandomValues(bytes);
|
|
110
227
|
return bytesToHex(bytes);
|
|
111
228
|
}
|
|
112
|
-
/**
|
|
113
|
-
* Extract keyid from Signature-Input header
|
|
114
|
-
*/
|
|
115
|
-
function extractKeyId(signatureInput) {
|
|
116
|
-
const match = signatureInput.match(/keyid="([^"]+)"/);
|
|
117
|
-
if (!match || !match[1]) {
|
|
118
|
-
throw new Error('Missing keyid in signature-input');
|
|
119
|
-
}
|
|
120
|
-
return match[1];
|
|
121
|
-
}
|
|
122
229
|
//# sourceMappingURL=rfc9421.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rfc9421.js","sourceRoot":"","sources":["../../src/visa-tap/rfc9421.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"rfc9421.js","sourceRoot":"","sources":["../../src/visa-tap/rfc9421.ts"],"names":[],"mappings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U,CAAC,YAAY,CAAC,EAAE;YACvG,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAgB;IACnD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAC1B,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrD,OAAO,YAAY,OAAO,GAAG,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,SAAS,aAAa;IACpB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACjC,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC9B,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC"}
|
package/dist/visa-tap/types.d.ts
CHANGED
|
@@ -61,10 +61,10 @@ export interface SignatureComponents {
|
|
|
61
61
|
headers?: Record<string, string>;
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
* RFC 9421 Signed HTTP Message
|
|
64
|
+
* RFC 9421 Signed HTTP Message, as returned by signHttpMessage
|
|
65
65
|
*/
|
|
66
66
|
export interface SignedHttpMessage {
|
|
67
|
-
/** Signature-Input header value */
|
|
67
|
+
/** Signature-Input header value; lists every covered component, in order */
|
|
68
68
|
signatureInput: string;
|
|
69
69
|
/** Signature header value */
|
|
70
70
|
signature: string;
|
|
@@ -72,6 +72,56 @@ export interface SignedHttpMessage {
|
|
|
72
72
|
nonce: string;
|
|
73
73
|
/** Creation timestamp (Unix seconds) */
|
|
74
74
|
created: number;
|
|
75
|
+
/** Expiry timestamp (Unix seconds), when one was set */
|
|
76
|
+
expires?: number;
|
|
77
|
+
/** Covered component identifiers, in signing order */
|
|
78
|
+
coveredComponents: string[];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* A received RFC 9421 signature to verify. Only the two header values are
|
|
82
|
+
* required; `created` and `nonce`, when given, must match Signature-Input.
|
|
83
|
+
*/
|
|
84
|
+
export interface VerifiableHttpSignature {
|
|
85
|
+
/** Signature-Input header value */
|
|
86
|
+
signatureInput: string;
|
|
87
|
+
/** Signature header value */
|
|
88
|
+
signature: string;
|
|
89
|
+
/** Expected nonce (must equal the signed nonce parameter) */
|
|
90
|
+
nonce?: string;
|
|
91
|
+
/** Expected created time (must equal the signed created parameter) */
|
|
92
|
+
created?: number;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Options for signHttpMessage
|
|
96
|
+
*/
|
|
97
|
+
export interface SignHttpMessageOptions {
|
|
98
|
+
/** Signature label (default "sig1") */
|
|
99
|
+
label?: string;
|
|
100
|
+
/** Creation time in Unix seconds (default: now) */
|
|
101
|
+
created?: number;
|
|
102
|
+
/** Lifetime written to the expires parameter (default 300; 0 omits expires) */
|
|
103
|
+
expiresInSeconds?: number;
|
|
104
|
+
/** Nonce (default: 16 random bytes, hex) */
|
|
105
|
+
nonce?: string;
|
|
106
|
+
/** Optional tag parameter */
|
|
107
|
+
tag?: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Options for verifyHttpSignature
|
|
111
|
+
*/
|
|
112
|
+
export interface VerifyHttpSignatureOptions {
|
|
113
|
+
/** Label to verify; required when Signature-Input has several members */
|
|
114
|
+
label?: string;
|
|
115
|
+
/** Current time in Unix seconds (default: now) */
|
|
116
|
+
now?: number;
|
|
117
|
+
/** Allowed clock skew for created/expires in seconds (default 30) */
|
|
118
|
+
clockSkewSeconds?: number;
|
|
119
|
+
/** Reject unless the keyid parameter equals this value */
|
|
120
|
+
expectedKeyId?: string;
|
|
121
|
+
/** Extra component identifiers that must be covered */
|
|
122
|
+
requiredComponents?: string[];
|
|
123
|
+
/** Reject signatures that carry no expires parameter */
|
|
124
|
+
requireExpires?: boolean;
|
|
75
125
|
}
|
|
76
126
|
/**
|
|
77
127
|
* QUIC Transport Configuration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/visa-tap/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB;IACnB,IAAI,EAAE,WAAW,CAAC;IAClB,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,iCAAiC;IACjC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,cAAc;IACd,OAAO,EAAE,oBAAoB,CAAC;IAC9B,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAA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C;IAC9B,wDAAwD;IACxD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iCAAiC;IACjC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,uBAAuB;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,2BAA2B;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,+BAA+B;IAC/B,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa;IACb,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;IAC5C,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-payments",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "Dual-protocol payment infrastructure for autonomous AI commerce (AP2 + ACP)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,20 +12,6 @@
|
|
|
12
12
|
"import": "./dist/index.js",
|
|
13
13
|
"default": "./dist/index.js"
|
|
14
14
|
},
|
|
15
|
-
"./wasm": {
|
|
16
|
-
"types": "./dist/wasm/index.d.ts",
|
|
17
|
-
"import": "./dist/wasm/index.js",
|
|
18
|
-
"browser": "./dist/wasm/browser.js",
|
|
19
|
-
"node": "./dist/wasm/node.js"
|
|
20
|
-
},
|
|
21
|
-
"./ap2": {
|
|
22
|
-
"types": "./dist/ap2/index.d.ts",
|
|
23
|
-
"import": "./dist/ap2/index.js"
|
|
24
|
-
},
|
|
25
|
-
"./acp": {
|
|
26
|
-
"types": "./dist/acp/index.d.ts",
|
|
27
|
-
"import": "./dist/acp/index.js"
|
|
28
|
-
},
|
|
29
15
|
"./visa-tap": {
|
|
30
16
|
"types": "./dist/visa-tap/index.d.ts",
|
|
31
17
|
"import": "./dist/visa-tap/index.js"
|
|
@@ -96,15 +82,7 @@
|
|
|
96
82
|
],
|
|
97
83
|
"author": "rUv <ruv@ruv.io>",
|
|
98
84
|
"license": "(MIT OR Apache-2.0)",
|
|
99
|
-
"
|
|
100
|
-
"type": "git",
|
|
101
|
-
"url": "https://github.com/agentic-catalog/agentic-payments.git",
|
|
102
|
-
"directory": "crates/agentic-payments"
|
|
103
|
-
},
|
|
104
|
-
"bugs": {
|
|
105
|
-
"url": "https://github.com/agentic-catalog/agentic-payments/issues"
|
|
106
|
-
},
|
|
107
|
-
"homepage": "https://github.com/agentic-catalog/agentic-payments#readme",
|
|
85
|
+
"homepage": "https://www.npmjs.com/package/agentic-payments",
|
|
108
86
|
"engines": {
|
|
109
87
|
"node": ">=18.0.0",
|
|
110
88
|
"npm": ">=8.0.0"
|
|
@@ -135,11 +113,12 @@
|
|
|
135
113
|
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
136
114
|
"@typescript-eslint/parser": "^6.19.0",
|
|
137
115
|
"@vitest/coverage-v8": "^1.6.1",
|
|
138
|
-
"agentic-flow": "^3.4.
|
|
116
|
+
"agentic-flow": "^3.4.4",
|
|
139
117
|
"eslint": "^8.56.0",
|
|
140
118
|
"eslint-config-prettier": "^9.1.0",
|
|
141
119
|
"eslint-plugin-import": "^2.29.1",
|
|
142
120
|
"eventsource": "^4.0.0",
|
|
121
|
+
"http-message-signatures": "^1.0.6",
|
|
143
122
|
"node-fetch": "^3.3.2",
|
|
144
123
|
"prettier": "^3.2.4",
|
|
145
124
|
"size-limit": "^11.0.1",
|