@bankofai/x402 0.6.0-beta.0 → 0.6.0-beta.2

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.
Files changed (65) hide show
  1. package/dist/abi.d.ts +164 -0
  2. package/dist/abi.d.ts.map +1 -1
  3. package/dist/abi.js +115 -0
  4. package/dist/abi.js.map +1 -1
  5. package/dist/index.d.ts +4 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +4 -0
  8. package/dist/index.js.map +1 -1
  9. package/dist/mechanisms/_exact_base/facilitator.d.ts +47 -23
  10. package/dist/mechanisms/_exact_base/facilitator.d.ts.map +1 -1
  11. package/dist/mechanisms/_exact_base/facilitator.js +179 -43
  12. package/dist/mechanisms/_exact_base/facilitator.js.map +1 -1
  13. package/dist/mechanisms/_exact_permit_base/facilitator.d.ts +91 -19
  14. package/dist/mechanisms/_exact_permit_base/facilitator.d.ts.map +1 -1
  15. package/dist/mechanisms/_exact_permit_base/facilitator.js +227 -25
  16. package/dist/mechanisms/_exact_permit_base/facilitator.js.map +1 -1
  17. package/dist/mechanisms/evm/exact/facilitator.d.ts +12 -13
  18. package/dist/mechanisms/evm/exact/facilitator.d.ts.map +1 -1
  19. package/dist/mechanisms/evm/exact/facilitator.js +25 -19
  20. package/dist/mechanisms/evm/exact/facilitator.js.map +1 -1
  21. package/dist/mechanisms/evm/exact_permit/facilitator.d.ts +13 -9
  22. package/dist/mechanisms/evm/exact_permit/facilitator.d.ts.map +1 -1
  23. package/dist/mechanisms/evm/exact_permit/facilitator.js +41 -13
  24. package/dist/mechanisms/evm/exact_permit/facilitator.js.map +1 -1
  25. package/dist/mechanisms/index.d.ts +1 -1
  26. package/dist/mechanisms/index.d.ts.map +1 -1
  27. package/dist/mechanisms/tron/exact/facilitator.d.ts +12 -10
  28. package/dist/mechanisms/tron/exact/facilitator.d.ts.map +1 -1
  29. package/dist/mechanisms/tron/exact/facilitator.js +37 -16
  30. package/dist/mechanisms/tron/exact/facilitator.js.map +1 -1
  31. package/dist/mechanisms/tron/exact_gasfree/facilitator.d.ts +20 -29
  32. package/dist/mechanisms/tron/exact_gasfree/facilitator.d.ts.map +1 -1
  33. package/dist/mechanisms/tron/exact_gasfree/facilitator.js +176 -38
  34. package/dist/mechanisms/tron/exact_gasfree/facilitator.js.map +1 -1
  35. package/dist/mechanisms/tron/exact_gasfree/index.d.ts +1 -1
  36. package/dist/mechanisms/tron/exact_gasfree/index.d.ts.map +1 -1
  37. package/dist/mechanisms/tron/exact_permit/facilitator.d.ts +14 -6
  38. package/dist/mechanisms/tron/exact_permit/facilitator.d.ts.map +1 -1
  39. package/dist/mechanisms/tron/exact_permit/facilitator.js +82 -11
  40. package/dist/mechanisms/tron/exact_permit/facilitator.js.map +1 -1
  41. package/dist/middleware/core.d.ts +13 -1
  42. package/dist/middleware/core.d.ts.map +1 -1
  43. package/dist/middleware/core.js +76 -6
  44. package/dist/middleware/core.js.map +1 -1
  45. package/dist/signers/facilitator/base.d.ts +67 -0
  46. package/dist/signers/facilitator/base.d.ts.map +1 -0
  47. package/dist/signers/facilitator/base.js +11 -0
  48. package/dist/signers/facilitator/base.js.map +1 -0
  49. package/dist/signers/facilitator/evmSigner.d.ts +28 -0
  50. package/dist/signers/facilitator/evmSigner.d.ts.map +1 -0
  51. package/dist/signers/facilitator/evmSigner.js +148 -0
  52. package/dist/signers/facilitator/evmSigner.js.map +1 -0
  53. package/dist/signers/facilitator/tronSigner.d.ts +93 -0
  54. package/dist/signers/facilitator/tronSigner.d.ts.map +1 -0
  55. package/dist/signers/facilitator/tronSigner.js +308 -0
  56. package/dist/signers/facilitator/tronSigner.js.map +1 -0
  57. package/dist/signers/index.d.ts +4 -0
  58. package/dist/signers/index.d.ts.map +1 -1
  59. package/dist/signers/index.js +4 -0
  60. package/dist/signers/index.js.map +1 -1
  61. package/dist/utils/gasfree.d.ts +6 -0
  62. package/dist/utils/gasfree.d.ts.map +1 -1
  63. package/dist/utils/gasfree.js +10 -0
  64. package/dist/utils/gasfree.js.map +1 -1
  65. package/package.json +8 -8
package/dist/abi.d.ts CHANGED
@@ -124,5 +124,169 @@ export declare const ERC20_ABI: readonly [{
124
124
  readonly name: "";
125
125
  readonly type: "bool";
126
126
  }];
127
+ }, {
128
+ readonly name: "balanceOf";
129
+ readonly type: "function";
130
+ readonly stateMutability: "view";
131
+ readonly inputs: readonly [{
132
+ readonly name: "account";
133
+ readonly type: "address";
134
+ }];
135
+ readonly outputs: readonly [{
136
+ readonly name: "";
137
+ readonly type: "uint256";
138
+ }];
139
+ }];
140
+ /**
141
+ * PaymentPermit contract ABI (subset used by facilitator settlement).
142
+ *
143
+ * Mirrors Python `bankofai.x402.abi.PAYMENT_PERMIT_ABI`. Only the methods
144
+ * actually called by the facilitator are included; the on-chain contract
145
+ * exposes more (DOMAIN_SEPARATOR, nonceBitmap, nonceUsed) that we surface
146
+ * here in case TS callers need them too.
147
+ */
148
+ export declare const PAYMENT_PERMIT_ABI: readonly [{
149
+ readonly name: "permitTransferFrom";
150
+ readonly type: "function";
151
+ readonly stateMutability: "nonpayable";
152
+ readonly inputs: readonly [{
153
+ readonly name: "permit";
154
+ readonly type: "tuple";
155
+ readonly components: readonly [{
156
+ readonly name: "meta";
157
+ readonly type: "tuple";
158
+ readonly components: readonly [{
159
+ readonly name: "kind";
160
+ readonly type: "uint8";
161
+ }, {
162
+ readonly name: "paymentId";
163
+ readonly type: "bytes16";
164
+ }, {
165
+ readonly name: "nonce";
166
+ readonly type: "uint256";
167
+ }, {
168
+ readonly name: "validAfter";
169
+ readonly type: "uint256";
170
+ }, {
171
+ readonly name: "validBefore";
172
+ readonly type: "uint256";
173
+ }];
174
+ }, {
175
+ readonly name: "buyer";
176
+ readonly type: "address";
177
+ }, {
178
+ readonly name: "caller";
179
+ readonly type: "address";
180
+ }, {
181
+ readonly name: "payment";
182
+ readonly type: "tuple";
183
+ readonly components: readonly [{
184
+ readonly name: "payToken";
185
+ readonly type: "address";
186
+ }, {
187
+ readonly name: "payAmount";
188
+ readonly type: "uint256";
189
+ }, {
190
+ readonly name: "payTo";
191
+ readonly type: "address";
192
+ }];
193
+ }, {
194
+ readonly name: "fee";
195
+ readonly type: "tuple";
196
+ readonly components: readonly [{
197
+ readonly name: "feeTo";
198
+ readonly type: "address";
199
+ }, {
200
+ readonly name: "feeAmount";
201
+ readonly type: "uint256";
202
+ }];
203
+ }];
204
+ }, {
205
+ readonly name: "owner";
206
+ readonly type: "address";
207
+ }, {
208
+ readonly name: "signature";
209
+ readonly type: "bytes";
210
+ }];
211
+ readonly outputs: readonly [];
212
+ }, {
213
+ readonly name: "DOMAIN_SEPARATOR";
214
+ readonly type: "function";
215
+ readonly stateMutability: "view";
216
+ readonly inputs: readonly [];
217
+ readonly outputs: readonly [{
218
+ readonly name: "";
219
+ readonly type: "bytes32";
220
+ }];
221
+ }, {
222
+ readonly name: "nonceUsed";
223
+ readonly type: "function";
224
+ readonly stateMutability: "view";
225
+ readonly inputs: readonly [{
226
+ readonly name: "owner";
227
+ readonly type: "address";
228
+ }, {
229
+ readonly name: "nonce";
230
+ readonly type: "uint256";
231
+ }];
232
+ readonly outputs: readonly [{
233
+ readonly name: "";
234
+ readonly type: "bool";
235
+ }];
236
+ }];
237
+ /**
238
+ * ERC-3009 `transferWithAuthorization` ABI (v, r, s variant).
239
+ *
240
+ * Mirrors Python `bankofai.x402.mechanisms._exact_base.types.TRANSFER_WITH_AUTHORIZATION_ABI`.
241
+ * Used by `exact` scheme facilitator settle.
242
+ */
243
+ export declare const TRANSFER_WITH_AUTHORIZATION_ABI: readonly [{
244
+ readonly name: "transferWithAuthorization";
245
+ readonly type: "function";
246
+ readonly stateMutability: "nonpayable";
247
+ readonly inputs: readonly [{
248
+ readonly name: "from";
249
+ readonly type: "address";
250
+ }, {
251
+ readonly name: "to";
252
+ readonly type: "address";
253
+ }, {
254
+ readonly name: "value";
255
+ readonly type: "uint256";
256
+ }, {
257
+ readonly name: "validAfter";
258
+ readonly type: "uint256";
259
+ }, {
260
+ readonly name: "validBefore";
261
+ readonly type: "uint256";
262
+ }, {
263
+ readonly name: "nonce";
264
+ readonly type: "bytes32";
265
+ }, {
266
+ readonly name: "v";
267
+ readonly type: "uint8";
268
+ }, {
269
+ readonly name: "r";
270
+ readonly type: "bytes32";
271
+ }, {
272
+ readonly name: "s";
273
+ readonly type: "bytes32";
274
+ }];
275
+ readonly outputs: readonly [];
276
+ }, {
277
+ readonly name: "authorizationState";
278
+ readonly type: "function";
279
+ readonly stateMutability: "view";
280
+ readonly inputs: readonly [{
281
+ readonly name: "authorizer";
282
+ readonly type: "address";
283
+ }, {
284
+ readonly name: "nonce";
285
+ readonly type: "bytes32";
286
+ }];
287
+ readonly outputs: readonly [{
288
+ readonly name: "";
289
+ readonly type: "bool";
290
+ }];
127
291
  }];
128
292
  //# sourceMappingURL=abi.d.ts.map
package/dist/abi.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"abi.d.ts","sourceRoot":"","sources":["../src/abi.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,6CAA6C;AAC7C,eAAO,MAAM,2BAA2B,yBAAyB,CAAC;AAElE,uCAAuC;AACvC,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;EAIpC,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAKtB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBvB,CAAC;AAEX,mDAAmD;AACnD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAEjD,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBZ,CAAC"}
1
+ {"version":3,"file":"abi.d.ts","sourceRoot":"","sources":["../src/abi.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,6CAA6C;AAC7C,eAAO,MAAM,2BAA2B,yBAAyB,CAAC;AAElE,uCAAuC;AACvC,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;EAIpC,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAKtB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBvB,CAAC;AAEX,mDAAmD;AACnD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAEjD,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BZ,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgErB,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BlC,CAAC"}
package/dist/abi.js CHANGED
@@ -78,5 +78,120 @@ export const ERC20_ABI = [
78
78
  ],
79
79
  outputs: [{ name: '', type: 'bool' }],
80
80
  },
81
+ {
82
+ name: 'balanceOf',
83
+ type: 'function',
84
+ stateMutability: 'view',
85
+ inputs: [{ name: 'account', type: 'address' }],
86
+ outputs: [{ name: '', type: 'uint256' }],
87
+ },
88
+ ];
89
+ /**
90
+ * PaymentPermit contract ABI (subset used by facilitator settlement).
91
+ *
92
+ * Mirrors Python `bankofai.x402.abi.PAYMENT_PERMIT_ABI`. Only the methods
93
+ * actually called by the facilitator are included; the on-chain contract
94
+ * exposes more (DOMAIN_SEPARATOR, nonceBitmap, nonceUsed) that we surface
95
+ * here in case TS callers need them too.
96
+ */
97
+ export const PAYMENT_PERMIT_ABI = [
98
+ {
99
+ name: 'permitTransferFrom',
100
+ type: 'function',
101
+ stateMutability: 'nonpayable',
102
+ inputs: [
103
+ {
104
+ name: 'permit',
105
+ type: 'tuple',
106
+ components: [
107
+ {
108
+ name: 'meta',
109
+ type: 'tuple',
110
+ components: [
111
+ { name: 'kind', type: 'uint8' },
112
+ { name: 'paymentId', type: 'bytes16' },
113
+ { name: 'nonce', type: 'uint256' },
114
+ { name: 'validAfter', type: 'uint256' },
115
+ { name: 'validBefore', type: 'uint256' },
116
+ ],
117
+ },
118
+ { name: 'buyer', type: 'address' },
119
+ { name: 'caller', type: 'address' },
120
+ {
121
+ name: 'payment',
122
+ type: 'tuple',
123
+ components: [
124
+ { name: 'payToken', type: 'address' },
125
+ { name: 'payAmount', type: 'uint256' },
126
+ { name: 'payTo', type: 'address' },
127
+ ],
128
+ },
129
+ {
130
+ name: 'fee',
131
+ type: 'tuple',
132
+ components: [
133
+ { name: 'feeTo', type: 'address' },
134
+ { name: 'feeAmount', type: 'uint256' },
135
+ ],
136
+ },
137
+ ],
138
+ },
139
+ { name: 'owner', type: 'address' },
140
+ { name: 'signature', type: 'bytes' },
141
+ ],
142
+ outputs: [],
143
+ },
144
+ {
145
+ name: 'DOMAIN_SEPARATOR',
146
+ type: 'function',
147
+ stateMutability: 'view',
148
+ inputs: [],
149
+ outputs: [{ name: '', type: 'bytes32' }],
150
+ },
151
+ {
152
+ name: 'nonceUsed',
153
+ type: 'function',
154
+ stateMutability: 'view',
155
+ inputs: [
156
+ { name: 'owner', type: 'address' },
157
+ { name: 'nonce', type: 'uint256' },
158
+ ],
159
+ outputs: [{ name: '', type: 'bool' }],
160
+ },
161
+ ];
162
+ /**
163
+ * ERC-3009 `transferWithAuthorization` ABI (v, r, s variant).
164
+ *
165
+ * Mirrors Python `bankofai.x402.mechanisms._exact_base.types.TRANSFER_WITH_AUTHORIZATION_ABI`.
166
+ * Used by `exact` scheme facilitator settle.
167
+ */
168
+ export const TRANSFER_WITH_AUTHORIZATION_ABI = [
169
+ {
170
+ name: 'transferWithAuthorization',
171
+ type: 'function',
172
+ stateMutability: 'nonpayable',
173
+ inputs: [
174
+ { name: 'from', type: 'address' },
175
+ { name: 'to', type: 'address' },
176
+ { name: 'value', type: 'uint256' },
177
+ { name: 'validAfter', type: 'uint256' },
178
+ { name: 'validBefore', type: 'uint256' },
179
+ { name: 'nonce', type: 'bytes32' },
180
+ { name: 'v', type: 'uint8' },
181
+ { name: 'r', type: 'bytes32' },
182
+ { name: 's', type: 'bytes32' },
183
+ ],
184
+ outputs: [],
185
+ },
186
+ {
187
+ name: 'authorizationState',
188
+ type: 'function',
189
+ stateMutability: 'view',
190
+ inputs: [
191
+ { name: 'authorizer', type: 'address' },
192
+ { name: 'nonce', type: 'bytes32' },
193
+ ],
194
+ outputs: [{ name: '', type: 'bool' }],
195
+ },
81
196
  ];
82
197
  //# sourceMappingURL=abi.js.map
package/dist/abi.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"abi.js","sourceRoot":"","sources":["../src/abi.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,6CAA6C;AAC7C,MAAM,CAAC,MAAM,2BAA2B,GAAG,sBAAsB,CAAC;AAElE,uCAAuC;AACvC,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;AAErD;;GAEG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;IAChC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IACpC,EAAE,IAAI,EAAE,mBAAmB,EAA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,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;YAClC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE;YAC5B,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9B,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE;SAC/B;QACD,OAAO,EAAE,EAAE;KACZ;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE;YACvC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;SACnC;QACD,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;KACtC;CACO,CAAC"}
package/dist/index.d.ts CHANGED
@@ -20,4 +20,8 @@ export * from './mechanisms/evm/exact_permit/index.js';
20
20
  export * from './signers/signer.js';
21
21
  export * from './signers/evmSigner.js';
22
22
  export type { TronWeb, TypedDataDomain, TypedDataField, TronNetwork, TRON_CHAIN_IDS } from './signers/types.js';
23
+ export { FacilitatorSigner } from './signers/facilitator/base.js';
24
+ export type { FacilitatorTypedDataDomain, FacilitatorTypedDataTypes, FacilitatorTransactionReceipt, } from './signers/index.js';
25
+ export { TronFacilitatorSigner } from './signers/facilitator/tronSigner.js';
26
+ export { EvmFacilitatorSigner } from './signers/facilitator/evmSigner.js';
23
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,C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MAAM,oCAAoC,CAAC"}
package/dist/index.js CHANGED
@@ -28,4 +28,8 @@ export * from './mechanisms/evm/exact_permit/index.js';
28
28
  export * from './signers/signer.js';
29
29
  // EVM Signer
30
30
  export * from './signers/evmSigner.js';
31
+ // Facilitator signers (verify + writeContract + receipt polling)
32
+ export { FacilitatorSigner } from './signers/facilitator/base.js';
33
+ export { TronFacilitatorSigner } from './signers/facilitator/tronSigner.js';
34
+ export { EvmFacilitatorSigner } from './signers/facilitator/evmSigner.js';
31
35
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO;AACP,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAE7B,cAAc;AACd,cAAc,kBAAkB,CAAC;AAEjC,gFAAgF;AAChF,cAAc,wBAAwB,CAAC;AAEvC,sEAAsE;AACtE,cAAc,mBAAmB,CAAC;AAElC,wEAAwE;AACxE,cAAc,uBAAuB,CAAC;AAEtC,aAAa;AACb,cAAc,uBAAuB,CAAC;AAEtC,4BAA4B;AAC5B,cAAc,wCAAwC,CAAC;AAEvD,cAAc;AACd,cAAc,qBAAqB,CAAC;AACpC,aAAa;AACb,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO;AACP,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAE7B,cAAc;AACd,cAAc,kBAAkB,CAAC;AAEjC,gFAAgF;AAChF,cAAc,wBAAwB,CAAC;AAEvC,sEAAsE;AACtE,cAAc,mBAAmB,CAAC;AAElC,wEAAwE;AACxE,cAAc,uBAAuB,CAAC;AAEtC,aAAa;AACb,cAAc,uBAAuB,CAAC;AAEtC,4BAA4B;AAC5B,cAAc,wCAAwC,CAAC;AAEvD,cAAc;AACd,cAAc,qBAAqB,CAAC;AACpC,aAAa;AACb,cAAc,wBAAwB,CAAC;AAGvC,iEAAiE;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAMlE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC"}
@@ -3,44 +3,68 @@
3
3
  *
4
4
  * Mirrors Python `mechanisms._exact_base.base.ExactBaseFacilitatorMechanism`.
5
5
  *
6
- * Per-chain subclasses provide a {@link ChainAdapter} and the chain RPC client
7
- * (viem PublicClient / tronweb instance). The base handles:
8
- * - basic structural verification (asset / payTo / value match, time window)
9
- * - dispatching feeQuote / verify / settle to the chain-specific impl
6
+ * Per-chain subclasses provide a {@link ChainAdapter}. The base handles:
7
+ * - structural verification (asset / payTo / value match, time window)
8
+ * - ERC-3009 EIP-712 signature recovery via the injected FacilitatorSigner
9
+ * - `transferWithAuthorization` settle + receipt polling
10
10
  *
11
- * Subclasses MUST implement chain interactions: signature recovery, balance
12
- * check, transaction broadcast. The base provides defaults that return
13
- * `null` / `false` so non-fully-implemented mechanisms remain visible at
14
- * the structural level but don't pretend to verify on-chain state.
11
+ * Subclasses ONLY need to override:
12
+ * - `settlePaymentOnly()` chain-specific contract call dispatch (TRON
13
+ * triggerSmartContract vs EVM viem writeContract)
15
14
  */
16
15
  import type { ChainAdapter } from './adapter.js';
17
16
  import type { FacilitatorMechanism } from '../../facilitator/x402Facilitator.js';
18
- import type { FeeQuoteResponse, PaymentPayload, PaymentRequirements, SettleResponse, VerifyResponse } from '../../types/index.js';
17
+ import type { FeeQuoteResponse, PaymentPayload, PaymentRequirements, SettleResponse, TransferAuthorization, VerifyResponse } from '../../types/index.js';
18
+ import { FacilitatorSigner } from '../../signers/facilitator/base.js';
19
19
  export declare abstract class ExactBaseFacilitatorMechanism implements FacilitatorMechanism {
20
+ protected readonly signer: FacilitatorSigner;
20
21
  protected readonly adapter: ChainAdapter;
21
- constructor(adapter: ChainAdapter);
22
+ protected readonly allowedTokens: ReadonlySet<string> | null;
23
+ constructor(signer: FacilitatorSigner, adapter: ChainAdapter, options?: {
24
+ allowedTokens?: ReadonlyArray<string>;
25
+ });
22
26
  scheme(): string;
23
27
  /**
24
- * `exact` scheme has no facilitator fee return `null` to drop from the
25
- * supported quote list. Permit-based schemes override this.
28
+ * `exact` scheme has no facilitator fee (single transfer per authorization).
29
+ * Returns `feeAmount: "0"` for compatibility with the `/fee/quote` flow.
26
30
  */
27
- feeQuote(_accept: PaymentRequirements, _context?: Record<string, unknown>): Promise<FeeQuoteResponse | null>;
31
+ feeQuote(accept: PaymentRequirements, _context?: Record<string, unknown>): Promise<FeeQuoteResponse | null>;
28
32
  /**
29
- * Off-chain verification: structural + timing checks. Chain-specific
30
- * subclasses extend this to add signature recovery and balance check.
33
+ * Off-chain verify: structural + timing checks, then EIP-712 signature
34
+ * recovery against the token's ERC-3009 domain.
31
35
  */
32
36
  verify(payload: PaymentPayload, requirements: PaymentRequirements): Promise<VerifyResponse>;
33
37
  /**
34
- * Settle the authorization on-chain. Chain-specific subclasses must
35
- * implement using viem (EVM) or tronweb (TRON).
38
+ * Settle: verify, then submit `transferWithAuthorization(v,r,s)` via the
39
+ * subclass-provided `settlePaymentOnly`, then poll the receipt.
36
40
  */
37
- abstract settle(payload: PaymentPayload, requirements: PaymentRequirements): Promise<SettleResponse>;
41
+ settle(payload: PaymentPayload, requirements: PaymentRequirements): Promise<SettleResponse>;
42
+ protected validateAuthorization(auth: TransferAuthorization, requirements: PaymentRequirements): string | null;
38
43
  /**
39
- * Chain-specific signature recovery + balance check. Default returns
40
- * `isValid: true` (trust upstream); subclasses MUST override for real
41
- * signature verification. Marked protected so subclass can call super.
44
+ * Verify the buyer's ERC-3009 EIP-712 signature against the token's domain.
45
+ *
46
+ * Domain shape (ERC-3009): `{ name, version, chainId, verifyingContract: <token> }`.
47
+ * Token name / version come from the SDK token registry; addresses are
48
+ * converted to signing format (0x EVM hex) for both EVM and TRON.
42
49
  */
43
- protected verifySignatureOnChain(_payload: PaymentPayload, _requirements: PaymentRequirements): Promise<VerifyResponse>;
44
- protected extractAuthorization(payload: PaymentPayload): NonNullable<PaymentPayload['payload']['authorization']> | null;
50
+ protected verifySignature(auth: TransferAuthorization, signature: string, requirements: PaymentRequirements): Promise<boolean>;
51
+ /**
52
+ * Split a 65-byte signature into v / r / s for the (v, r, s) variant of
53
+ * `transferWithAuthorization`. v is normalized to 27 or 28 (some signers
54
+ * return 0 / 1).
55
+ */
56
+ protected splitSignature(signature: string): {
57
+ v: number;
58
+ r: `0x${string}`;
59
+ s: `0x${string}`;
60
+ };
61
+ protected extractAuthorization(payload: PaymentPayload): TransferAuthorization | null;
62
+ /**
63
+ * Submit the authorization on-chain. Chain-specific — subclasses MUST
64
+ * implement (TRON via tronweb, EVM via viem).
65
+ *
66
+ * Returns the tx hash on broadcast success, or `null` on broadcast failure.
67
+ */
68
+ protected abstract settlePaymentOnly(auth: TransferAuthorization, signature: string, requirements: PaymentRequirements): Promise<string | null>;
45
69
  }
46
70
  //# sourceMappingURL=facilitator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"facilitator.d.ts","sourceRoot":"","sources":["../../../src/mechanisms/_exact_base/facilitator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,oBAAoB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