@antseed/node 0.2.105 → 0.2.107

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 (220) hide show
  1. package/dist/billing/index.d.ts +2 -0
  2. package/dist/billing/index.d.ts.map +1 -0
  3. package/dist/billing/index.js +2 -0
  4. package/dist/billing/index.js.map +1 -0
  5. package/dist/billing/unit.d.ts +3 -0
  6. package/dist/billing/unit.d.ts.map +1 -0
  7. package/dist/billing/unit.js +3 -0
  8. package/dist/billing/unit.js.map +1 -0
  9. package/dist/buyer-request-handler.d.ts +1 -54
  10. package/dist/buyer-request-handler.d.ts.map +1 -1
  11. package/dist/buyer-request-handler.js +2 -379
  12. package/dist/buyer-request-handler.js.map +1 -1
  13. package/dist/discovery/announcer.d.ts +7 -1
  14. package/dist/discovery/announcer.d.ts.map +1 -1
  15. package/dist/discovery/announcer.js +84 -33
  16. package/dist/discovery/announcer.js.map +1 -1
  17. package/dist/discovery/http-metadata-resolver.d.ts +4 -0
  18. package/dist/discovery/http-metadata-resolver.d.ts.map +1 -1
  19. package/dist/discovery/http-metadata-resolver.js +42 -2
  20. package/dist/discovery/http-metadata-resolver.js.map +1 -1
  21. package/dist/discovery/index.d.ts +1 -1
  22. package/dist/discovery/index.d.ts.map +1 -1
  23. package/dist/discovery/index.js +1 -1
  24. package/dist/discovery/index.js.map +1 -1
  25. package/dist/discovery/metadata-codec.d.ts +4 -4
  26. package/dist/discovery/metadata-codec.d.ts.map +1 -1
  27. package/dist/discovery/metadata-codec.js +339 -23
  28. package/dist/discovery/metadata-codec.js.map +1 -1
  29. package/dist/discovery/metadata-validator.d.ts +7 -3
  30. package/dist/discovery/metadata-validator.d.ts.map +1 -1
  31. package/dist/discovery/metadata-validator.js +139 -8
  32. package/dist/discovery/metadata-validator.js.map +1 -1
  33. package/dist/discovery/peer-lookup.d.ts +1 -0
  34. package/dist/discovery/peer-lookup.d.ts.map +1 -1
  35. package/dist/discovery/peer-lookup.js +23 -5
  36. package/dist/discovery/peer-lookup.js.map +1 -1
  37. package/dist/discovery/peer-metadata.d.ts +2 -90
  38. package/dist/discovery/peer-metadata.d.ts.map +1 -1
  39. package/dist/discovery/peer-metadata.js +3 -11
  40. package/dist/discovery/peer-metadata.js.map +1 -1
  41. package/dist/discovery/seller-address-resolver.d.ts +1 -49
  42. package/dist/discovery/seller-address-resolver.d.ts.map +1 -1
  43. package/dist/discovery/seller-address-resolver.js +2 -114
  44. package/dist/discovery/seller-address-resolver.js.map +1 -1
  45. package/dist/errors.d.ts +43 -0
  46. package/dist/errors.d.ts.map +1 -0
  47. package/dist/errors.js +73 -0
  48. package/dist/errors.js.map +1 -0
  49. package/dist/health/model-health-checker.d.ts +6 -5
  50. package/dist/health/model-health-checker.d.ts.map +1 -1
  51. package/dist/health/model-health-checker.js +22 -10
  52. package/dist/health/model-health-checker.js.map +1 -1
  53. package/dist/index.d.ts +3 -1
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +3 -1
  56. package/dist/index.js.map +1 -1
  57. package/dist/interfaces/seller-provider.d.ts +6 -0
  58. package/dist/interfaces/seller-provider.d.ts.map +1 -1
  59. package/dist/node.d.ts.map +1 -1
  60. package/dist/node.js +28 -0
  61. package/dist/node.js.map +1 -1
  62. package/dist/p2p/connection-auth.d.ts +3 -8
  63. package/dist/p2p/connection-auth.d.ts.map +1 -1
  64. package/dist/p2p/connection-auth.js +4 -6
  65. package/dist/p2p/connection-auth.js.map +1 -1
  66. package/dist/p2p/connection-manager.d.ts +3 -1
  67. package/dist/p2p/connection-manager.d.ts.map +1 -1
  68. package/dist/p2p/connection-manager.js.map +1 -1
  69. package/dist/p2p/identity.d.ts +1 -21
  70. package/dist/p2p/identity.d.ts.map +1 -1
  71. package/dist/p2p/identity.js +3 -62
  72. package/dist/p2p/identity.js.map +1 -1
  73. package/dist/p2p/message-protocol.d.ts +1 -49
  74. package/dist/p2p/message-protocol.d.ts.map +1 -1
  75. package/dist/p2p/message-protocol.js +2 -125
  76. package/dist/p2p/message-protocol.js.map +1 -1
  77. package/dist/p2p/payment-codec.d.ts +1 -21
  78. package/dist/p2p/payment-codec.d.ts.map +1 -1
  79. package/dist/p2p/payment-codec.js +2 -220
  80. package/dist/p2p/payment-codec.js.map +1 -1
  81. package/dist/p2p/payment-mux.d.ts +1 -51
  82. package/dist/p2p/payment-mux.d.ts.map +1 -1
  83. package/dist/p2p/payment-mux.js +2 -159
  84. package/dist/p2p/payment-mux.js.map +1 -1
  85. package/dist/payments/buyer-free-usage-manager.d.ts +1 -43
  86. package/dist/payments/buyer-free-usage-manager.d.ts.map +1 -1
  87. package/dist/payments/buyer-free-usage-manager.js +2 -298
  88. package/dist/payments/buyer-free-usage-manager.js.map +1 -1
  89. package/dist/payments/buyer-payment-manager.d.ts +1 -277
  90. package/dist/payments/buyer-payment-manager.d.ts.map +1 -1
  91. package/dist/payments/buyer-payment-manager.js +2 -1039
  92. package/dist/payments/buyer-payment-manager.js.map +1 -1
  93. package/dist/payments/buyer-payment-negotiator.d.ts +1 -130
  94. package/dist/payments/buyer-payment-negotiator.d.ts.map +1 -1
  95. package/dist/payments/buyer-payment-negotiator.js +2 -950
  96. package/dist/payments/buyer-payment-negotiator.js.map +1 -1
  97. package/dist/payments/chain-config.d.ts.map +1 -1
  98. package/dist/payments/chain-config.js +13 -2
  99. package/dist/payments/chain-config.js.map +1 -1
  100. package/dist/payments/channel-session-state.d.ts +1 -13
  101. package/dist/payments/channel-session-state.d.ts.map +1 -1
  102. package/dist/payments/channel-session-state.js +2 -25
  103. package/dist/payments/channel-session-state.js.map +1 -1
  104. package/dist/payments/channel-store.d.ts +2 -51
  105. package/dist/payments/channel-store.d.ts.map +1 -1
  106. package/dist/payments/channel-store.js +3 -14
  107. package/dist/payments/channel-store.js.map +1 -1
  108. package/dist/payments/channel-usage-accounting.d.ts +1 -17
  109. package/dist/payments/channel-usage-accounting.d.ts.map +1 -1
  110. package/dist/payments/channel-usage-accounting.js +2 -65
  111. package/dist/payments/channel-usage-accounting.js.map +1 -1
  112. package/dist/payments/evm/base-evm-client.d.ts +1 -26
  113. package/dist/payments/evm/base-evm-client.d.ts.map +1 -1
  114. package/dist/payments/evm/base-evm-client.js +2 -115
  115. package/dist/payments/evm/base-evm-client.js.map +1 -1
  116. package/dist/payments/evm/channels-client.d.ts +1 -85
  117. package/dist/payments/evm/channels-client.d.ts.map +1 -1
  118. package/dist/payments/evm/channels-client.js +2 -193
  119. package/dist/payments/evm/channels-client.js.map +1 -1
  120. package/dist/payments/evm/deposits-client.d.ts +1 -29
  121. package/dist/payments/evm/deposits-client.d.ts.map +1 -1
  122. package/dist/payments/evm/deposits-client.js +2 -67
  123. package/dist/payments/evm/deposits-client.js.map +1 -1
  124. package/dist/payments/evm/signatures.d.ts +1 -203
  125. package/dist/payments/evm/signatures.d.ts.map +1 -1
  126. package/dist/payments/evm/signatures.js +2 -236
  127. package/dist/payments/evm/signatures.js.map +1 -1
  128. package/dist/payments/evm/subpool-client.d.ts +32 -0
  129. package/dist/payments/evm/subpool-client.d.ts.map +1 -0
  130. package/dist/payments/evm/subpool-client.js +158 -0
  131. package/dist/payments/evm/subpool-client.js.map +1 -0
  132. package/dist/payments/index.d.ts +1 -1
  133. package/dist/payments/index.d.ts.map +1 -1
  134. package/dist/payments/index.js +1 -1
  135. package/dist/payments/index.js.map +1 -1
  136. package/dist/payments/pricing.d.ts +1 -26
  137. package/dist/payments/pricing.d.ts.map +1 -1
  138. package/dist/payments/pricing.js +2 -36
  139. package/dist/payments/pricing.js.map +1 -1
  140. package/dist/payments/seller-payment-manager.d.ts +7 -0
  141. package/dist/payments/seller-payment-manager.d.ts.map +1 -1
  142. package/dist/payments/seller-payment-manager.js +27 -2
  143. package/dist/payments/seller-payment-manager.js.map +1 -1
  144. package/dist/payments/usdc-utils.d.ts +1 -8
  145. package/dist/payments/usdc-utils.d.ts.map +1 -1
  146. package/dist/payments/usdc-utils.js +2 -16
  147. package/dist/payments/usdc-utils.js.map +1 -1
  148. package/dist/proxy/proxy-mux.d.ts +1 -69
  149. package/dist/proxy/proxy-mux.d.ts.map +1 -1
  150. package/dist/proxy/proxy-mux.js +2 -346
  151. package/dist/proxy/proxy-mux.js.map +1 -1
  152. package/dist/proxy/request-codec.d.ts +1 -41
  153. package/dist/proxy/request-codec.d.ts.map +1 -1
  154. package/dist/proxy/request-codec.js +2 -280
  155. package/dist/proxy/request-codec.js.map +1 -1
  156. package/dist/seller-request-handler.d.ts +10 -3
  157. package/dist/seller-request-handler.d.ts.map +1 -1
  158. package/dist/seller-request-handler.js +112 -17
  159. package/dist/seller-request-handler.js.map +1 -1
  160. package/dist/types/billing.d.ts +2 -0
  161. package/dist/types/billing.d.ts.map +1 -0
  162. package/dist/types/billing.js +2 -0
  163. package/dist/types/billing.js.map +1 -0
  164. package/dist/types/capability.d.ts +1 -25
  165. package/dist/types/capability.d.ts.map +1 -1
  166. package/dist/types/capability.js +2 -1
  167. package/dist/types/capability.js.map +1 -1
  168. package/dist/types/connection.d.ts +1 -26
  169. package/dist/types/connection.d.ts.map +1 -1
  170. package/dist/types/connection.js +2 -10
  171. package/dist/types/connection.js.map +1 -1
  172. package/dist/types/http.d.ts +1 -39
  173. package/dist/types/http.d.ts.map +1 -1
  174. package/dist/types/http.js +2 -16
  175. package/dist/types/http.js.map +1 -1
  176. package/dist/types/index.d.ts +1 -0
  177. package/dist/types/index.d.ts.map +1 -1
  178. package/dist/types/index.js +1 -0
  179. package/dist/types/index.js.map +1 -1
  180. package/dist/types/peer.d.ts +9 -31
  181. package/dist/types/peer.d.ts.map +1 -1
  182. package/dist/types/peer.js +2 -14
  183. package/dist/types/peer.js.map +1 -1
  184. package/dist/types/protocol.d.ts +1 -306
  185. package/dist/types/protocol.d.ts.map +1 -1
  186. package/dist/types/protocol.js +2 -81
  187. package/dist/types/protocol.js.map +1 -1
  188. package/dist/types/service-api.d.ts +1 -5
  189. package/dist/types/service-api.d.ts.map +1 -1
  190. package/dist/types/service-api.js +2 -12
  191. package/dist/types/service-api.js.map +1 -1
  192. package/dist/utils/debug.d.ts +1 -5
  193. package/dist/utils/debug.d.ts.map +1 -1
  194. package/dist/utils/debug.js +2 -52
  195. package/dist/utils/debug.js.map +1 -1
  196. package/dist/utils/hex.d.ts +1 -2
  197. package/dist/utils/hex.d.ts.map +1 -1
  198. package/dist/utils/hex.js +2 -14
  199. package/dist/utils/hex.js.map +1 -1
  200. package/dist/utils/json-codec.d.ts +1 -9
  201. package/dist/utils/json-codec.d.ts.map +1 -1
  202. package/dist/utils/json-codec.js +2 -51
  203. package/dist/utils/json-codec.js.map +1 -1
  204. package/dist/utils/response-usage.d.ts +1 -9
  205. package/dist/utils/response-usage.d.ts.map +1 -1
  206. package/dist/utils/response-usage.js +2 -39
  207. package/dist/utils/response-usage.js.map +1 -1
  208. package/dist/verification/codec.d.ts +1 -3
  209. package/dist/verification/codec.d.ts.map +1 -1
  210. package/dist/verification/codec.js +2 -37
  211. package/dist/verification/codec.js.map +1 -1
  212. package/dist/verification/response-auth.d.ts +1 -30
  213. package/dist/verification/response-auth.d.ts.map +1 -1
  214. package/dist/verification/response-auth.js +2 -110
  215. package/dist/verification/response-auth.js.map +1 -1
  216. package/dist/verification/verification-mux.d.ts +1 -19
  217. package/dist/verification/verification-mux.d.ts.map +1 -1
  218. package/dist/verification/verification-mux.js +2 -99
  219. package/dist/verification/verification-mux.js.map +1 -1
  220. package/package.json +4 -2
@@ -1,307 +1,2 @@
1
- export declare enum MessageType {
2
- HandshakeInit = 1,
3
- HandshakeAck = 2,
4
- Ping = 16,
5
- Pong = 17,
6
- HttpRequest = 32,
7
- HttpResponse = 33,
8
- HttpResponseChunk = 34,
9
- HttpResponseEnd = 35,
10
- HttpResponseError = 36,
11
- HttpRequestChunk = 37,
12
- HttpRequestEnd = 38,
13
- SpendingAuth = 80,
14
- AuthAck = 81,
15
- FreeUsageOpen = 82,
16
- FreeUsageAuth = 83,
17
- FreeUsageAck = 84,
18
- NeedFreeUsageAuth = 85,
19
- PaymentRequired = 86,
20
- NeedAuth = 88,
21
- CloseChannelRequest = 89,
22
- CloseChannelResult = 90,
23
- PeerReport = 96,
24
- ReportAck = 97,
25
- PeerRating = 112,
26
- RatingQuery = 113,
27
- RatingResponse = 114,
28
- VerificationResponseAuth = 128,
29
- SweepRequest = 160,
30
- SweepReceipt = 161,
31
- Disconnect = 240,
32
- Error = 255
33
- }
34
- export declare const CONNECTION_CAPABILITY_RESPONSE_AUTH_V1: "verification.response-auth.v1";
35
- export declare const CONNECTION_CAPABILITY_RELAYS_SWEEPS_V1: "payments.relays-sweeps.v1";
36
- /** Seller honours buyer-initiated cooperative channel close (0x59 / 0x5A). */
37
- export declare const CONNECTION_CAPABILITY_COOPERATIVE_CLOSE_V1: "payments.cooperative-close.v1";
38
- /**
39
- * Seller runs periodic model health self-checks and unadvertises services
40
- * that stop working, so its announced service list reflects live health.
41
- */
42
- export declare const CONNECTION_CAPABILITY_MODEL_HEALTH_V1: "seller.model-health.v1";
43
- export declare function peerRelaysSweeps(peer: {
44
- capabilities?: string[];
45
- metadata?: {
46
- capabilities?: string[];
47
- };
48
- }): boolean;
49
- export declare function peerSupportsCooperativeClose(peer: {
50
- capabilities?: string[];
51
- metadata?: {
52
- capabilities?: string[];
53
- };
54
- }): boolean;
55
- export declare function peerRunsModelHealthChecks(peer: {
56
- capabilities?: string[];
57
- metadata?: {
58
- capabilities?: string[];
59
- };
60
- }): boolean;
61
- export interface FramedMessage {
62
- type: MessageType;
63
- messageId: number;
64
- payload: Uint8Array;
65
- }
66
- export declare const FRAME_HEADER_SIZE = 9;
67
- export declare const MAX_PAYLOAD_SIZE: number;
68
- /**
69
- * Buyer authorizes spending via a single EIP-712 SpendingAuth signature.
70
- * The signature covers channelId, cumulativeAmount, and metadataHash.
71
- */
72
- export interface SpendingAuthPayload {
73
- channelId: string;
74
- cumulativeAmount: string;
75
- metadataHash: string;
76
- metadata: string;
77
- spendingAuthSig: string;
78
- reserveSalt?: string;
79
- reserveMaxAmount?: string;
80
- reserveDeadline?: number;
81
- }
82
- /**
83
- * Seller acknowledges the spending authorization was reserved on-chain.
84
- */
85
- export interface AuthAckPayload {
86
- channelId: string;
87
- }
88
- /**
89
- * Buyer opens a zero-price usage channel. This does not require deposits.
90
- */
91
- export interface FreeUsageOpenPayload {
92
- channelId: string;
93
- salt: string;
94
- deadline: number;
95
- openSig: string;
96
- }
97
- /**
98
- * Buyer authorizes a cumulative zero-price usage record after the seller reports
99
- * usage for a served request.
100
- */
101
- export interface FreeUsageAuthPayload {
102
- channelId: string;
103
- cumulativeInputTokens: string;
104
- cumulativeOutputTokens: string;
105
- sequence: string;
106
- metadataHash: string;
107
- metadata: string;
108
- deadline: number;
109
- usageSig: string;
110
- }
111
- /**
112
- * Seller acknowledges a free usage channel/open or record was accepted for
113
- * on-chain reporting.
114
- */
115
- export interface FreeUsageAckPayload {
116
- channelId: string;
117
- acceptedSequence?: string;
118
- }
119
- /**
120
- * Seller asks the buyer to sign zero-price usage for a completed request.
121
- */
122
- export interface NeedFreeUsageAuthPayload {
123
- channelId: string;
124
- requiredSequence: string;
125
- currentAcceptedSequence: string;
126
- requestId?: string;
127
- inputTokens?: string;
128
- outputTokens?: string;
129
- service?: string;
130
- }
131
- /**
132
- * Seller tells buyer what's needed to start a payment session.
133
- * Sent via PaymentMux alongside the HTTP 402 response.
134
- */
135
- export interface PaymentRequiredPayload {
136
- minBudgetPerRequest: string;
137
- suggestedAmount: string;
138
- requestId: string;
139
- inputUsdPerMillion?: number;
140
- outputUsdPerMillion?: number;
141
- cachedInputUsdPerMillion?: number;
142
- /**
143
- * For budget-exhausted 402s on an existing channel: the cumulative
144
- * amount the buyer must sign to catch up with the seller's recorded
145
- * spend and unblock further requests. Absent for pre-session 402s.
146
- */
147
- requiredCumulativeAmount?: string;
148
- /** Seller-side cumulative spend at the time the 402 was emitted. */
149
- currentSpent?: string;
150
- /** Seller-side last-accepted cumulative at the time the 402 was emitted. */
151
- currentAcceptedCumulative?: string;
152
- /** Channel ID for the exhausted session (so buyer can match it locally). */
153
- channelId?: string;
154
- /**
155
- * On-chain reserve ceiling for this channel. When present and the seller's
156
- * `requiredCumulativeAmount` exceeds it, the channel is permanently
157
- * exhausted and the buyer must retire it and open a new one — no amount
158
- * of additional signing on the same channel will be accepted.
159
- */
160
- reserveMaxAmount?: string;
161
- /**
162
- * Stable machine-readable code so callers can switch on it without coupling
163
- * to internal phrasing. Only set on irrecoverable 402s today.
164
- */
165
- code?: PaymentRequiredCode;
166
- }
167
- export declare const PAYMENT_CODE_CHANNEL_EXHAUSTED: "channel_exhausted";
168
- export type PaymentRequiredCode = typeof PAYMENT_CODE_CHANNEL_EXHAUSTED;
169
- /**
170
- * Seller tells buyer that the current cumulative authorization is insufficient.
171
- * After every served request the seller includes the cost of that request so
172
- * the buyer can validate before signing a new SpendingAuth.
173
- */
174
- export interface NeedAuthPayload {
175
- channelId: string;
176
- requiredCumulativeAmount: string;
177
- currentAcceptedCumulative: string;
178
- deposit: string;
179
- /** requestId of the request whose cost is reported below. */
180
- requestId?: string;
181
- /** Seller-computed cost for the last request (USDC base units). */
182
- lastRequestCost?: string;
183
- /** Total input tokens consumed by the last request (provider-style total — may include cached). */
184
- inputTokens?: string;
185
- /** Output tokens consumed by the last request. */
186
- outputTokens?: string;
187
- /** Cached input tokens consumed by the last request. */
188
- cachedInputTokens?: string;
189
- /**
190
- * Fresh (non-cached) input tokens consumed by the last request.
191
- * Sent explicitly by the seller so the buyer doesn't have to guess at
192
- * OpenAI-vs-Anthropic cached-token semantics (OpenAI: prompt_tokens
193
- * includes cached; Anthropic: input_tokens excludes cached). When absent,
194
- * the buyer falls back to `inputTokens - cachedInputTokens` (OpenAI
195
- * convention) for backward compat with older sellers.
196
- */
197
- freshInputTokens?: string;
198
- /** Service/model name for service-specific pricing validation. */
199
- service?: string;
200
- }
201
- /**
202
- * Buyer asks the seller to close a payment channel now, skipping the on-chain
203
- * `requestClose()` → 15-minute grace → `withdraw()` path.
204
- *
205
- * The buyer MAY attach its latest SpendingAuth so the seller can close at that
206
- * cumulative even if the seller never received it (e.g. the frame was lost on
207
- * disconnect). The seller closes at whichever cumulative is higher — its own
208
- * last-accepted auth or the one attached here — so neither side can use this
209
- * message to under-report spend.
210
- *
211
- * All four auth fields travel together: either all are present or none are.
212
- */
213
- export interface CloseChannelRequestPayload {
214
- version: 1;
215
- /** Channel the buyer wants closed. Must match the seller's active channel. */
216
- channelId: string;
217
- /** Cumulative USDC (base units) the attached signature authorizes. */
218
- cumulativeAmount?: string;
219
- /** bytes32 keccak256 of `metadata`. */
220
- metadataHash?: string;
221
- /** Hex-encoded abi.encode(...) usage metadata covered by the signature. */
222
- metadata?: string;
223
- /** EIP-712 SpendingAuth signature over (channelId, cumulativeAmount, metadataHash). */
224
- spendingAuthSig?: string;
225
- }
226
- /** Why a seller declined to close a channel on request. */
227
- export declare const CLOSE_CHANNEL_REJECT_CODES: readonly ["busy", "pending_auth", "no_channel", "invalid_auth", "close_failed", "unsupported"];
228
- export type CloseChannelRejectCode = typeof CLOSE_CHANNEL_REJECT_CODES[number];
229
- /**
230
- * Seller's answer to a CloseChannelRequest. On success it carries the
231
- * transaction hash of the on-chain `close()`; on refusal, a stable code the
232
- * buyer can switch on.
233
- */
234
- export interface CloseChannelResultPayload {
235
- version: 1;
236
- channelId: string;
237
- status: 'closed' | 'rejected';
238
- /** Present when status === 'closed'. */
239
- txHash?: string;
240
- /** Cumulative the channel was closed at (base units). Present on success. */
241
- finalAmount?: string;
242
- /** Present when status === 'rejected'. */
243
- code?: CloseChannelRejectCode;
244
- /** Human-readable detail. Never load-bearing — switch on `code`. */
245
- reason?: string;
246
- /** Hint for 'busy' / 'pending_auth': wait this long before retrying. */
247
- retryAfterMs?: number;
248
- /** For 'pending_auth': the cumulative the buyer must sign before retrying. */
249
- requiredCumulativeAmount?: string;
250
- }
251
- /**
252
- * Buyer broadcasts a signed gasless deposit sweep for permissionless relayers
253
- * (sellers by default) to submit on-chain. Carries everything
254
- * AntseedDepositRelay.sweepDeposit needs; the relayer earns the contract's
255
- * fixed, immutable FEE in USDC. The single EIP-3009 signature — addressed to
256
- * the relay contract — is the buyer's consent to those terms. Replay-safe via
257
- * the EIP-3009 nonce; losing a submission race is harmless.
258
- */
259
- export interface SweepRequestPayload {
260
- version: 1;
261
- evmChainId: number;
262
- /** AntseedDepositRelay address the buyer signed against. Relayers must only
263
- * submit when this matches their own configured relay address. */
264
- relayAddress: string;
265
- from: string;
266
- /** Total USDC pulled via EIP-3009, base units (uint256 decimal string). */
267
- amount: string;
268
- validAfter: number;
269
- validBefore: number;
270
- /** EIP-3009 authorization nonce (bytes32 hex). Also the correlation key. */
271
- nonce: string;
272
- /** Buyer signature over the USDC ReceiveWithAuthorization typed data. */
273
- sig3009: string;
274
- }
275
- export type SweepReceiptStatus = 'submitted' | 'confirmed' | 'rejected';
276
- /**
277
- * Optional relayer progress report for a SweepRequest, correlated by the
278
- * EIP-3009 nonce. Purely informational — the buyer's source of truth is its
279
- * Deposits balance on-chain.
280
- */
281
- export interface SweepReceiptPayload {
282
- version: 1;
283
- authNonce: string;
284
- status: SweepReceiptStatus;
285
- txHash?: string;
286
- reason?: string;
287
- }
288
- /**
289
- * Seller-signed commitment for one completed inference response.
290
- * Carries hashes and context only; plaintext request/response bytes stay local.
291
- */
292
- export interface ResponseAuthPayload {
293
- version: 1;
294
- requestId: string;
295
- channelId?: string;
296
- buyerPeerId: string;
297
- sellerPeerId: string;
298
- advertisedService: string;
299
- provider: string;
300
- statusCode: number;
301
- requestHash: string;
302
- responseHash: string;
303
- responseStartedAt: number;
304
- responseCompletedAt: number;
305
- signature: string;
306
- }
1
+ export * from '@antseed/protocol/messages';
307
2
  //# sourceMappingURL=protocol.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/types/protocol.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,aAAa,IAAO;IACpB,YAAY,IAAO;IACnB,IAAI,KAAO;IACX,IAAI,KAAO;IACX,WAAW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AC,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB;uEACmE;IACnE,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,WAAW,GAAG,UAAU,CAAC;AAExE;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,CAAC,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAID;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,CAAC,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/types/protocol.ts"],"names":[],"mappings":"AACA,cAAc,4BAA4B,CAAC"}
@@ -1,82 +1,3 @@
1
- export var MessageType;
2
- (function (MessageType) {
3
- MessageType[MessageType["HandshakeInit"] = 1] = "HandshakeInit";
4
- MessageType[MessageType["HandshakeAck"] = 2] = "HandshakeAck";
5
- MessageType[MessageType["Ping"] = 16] = "Ping";
6
- MessageType[MessageType["Pong"] = 17] = "Pong";
7
- MessageType[MessageType["HttpRequest"] = 32] = "HttpRequest";
8
- MessageType[MessageType["HttpResponse"] = 33] = "HttpResponse";
9
- MessageType[MessageType["HttpResponseChunk"] = 34] = "HttpResponseChunk";
10
- MessageType[MessageType["HttpResponseEnd"] = 35] = "HttpResponseEnd";
11
- MessageType[MessageType["HttpResponseError"] = 36] = "HttpResponseError";
12
- // Chunked request upload (buyer→seller body streaming)
13
- MessageType[MessageType["HttpRequestChunk"] = 37] = "HttpRequestChunk";
14
- MessageType[MessageType["HttpRequestEnd"] = 38] = "HttpRequestEnd";
15
- // --- Payment Protocol (0x50-0x5F) ---
16
- MessageType[MessageType["SpendingAuth"] = 80] = "SpendingAuth";
17
- MessageType[MessageType["AuthAck"] = 81] = "AuthAck";
18
- MessageType[MessageType["FreeUsageOpen"] = 82] = "FreeUsageOpen";
19
- MessageType[MessageType["FreeUsageAuth"] = 83] = "FreeUsageAuth";
20
- MessageType[MessageType["FreeUsageAck"] = 84] = "FreeUsageAck";
21
- MessageType[MessageType["NeedFreeUsageAuth"] = 85] = "NeedFreeUsageAuth";
22
- MessageType[MessageType["PaymentRequired"] = 86] = "PaymentRequired";
23
- MessageType[MessageType["NeedAuth"] = 88] = "NeedAuth";
24
- MessageType[MessageType["CloseChannelRequest"] = 89] = "CloseChannelRequest";
25
- MessageType[MessageType["CloseChannelResult"] = 90] = "CloseChannelResult";
26
- // Report message types
27
- MessageType[MessageType["PeerReport"] = 96] = "PeerReport";
28
- MessageType[MessageType["ReportAck"] = 97] = "ReportAck";
29
- // Rating message types
30
- MessageType[MessageType["PeerRating"] = 112] = "PeerRating";
31
- MessageType[MessageType["RatingQuery"] = 113] = "RatingQuery";
32
- MessageType[MessageType["RatingResponse"] = 114] = "RatingResponse";
33
- // Verification / attestation protocol (0x80-0x8F)
34
- MessageType[MessageType["VerificationResponseAuth"] = 128] = "VerificationResponseAuth";
35
- // 0x90-0x9F reserved: delegated-verification protocol (feat/verifier-network)
36
- // Deposit sweep protocol (0xA0-0xAF)
37
- MessageType[MessageType["SweepRequest"] = 160] = "SweepRequest";
38
- MessageType[MessageType["SweepReceipt"] = 161] = "SweepReceipt";
39
- MessageType[MessageType["Disconnect"] = 240] = "Disconnect";
40
- MessageType[MessageType["Error"] = 255] = "Error";
41
- })(MessageType || (MessageType = {}));
42
- export const CONNECTION_CAPABILITY_RESPONSE_AUTH_V1 = 'verification.response-auth.v1';
43
- export const CONNECTION_CAPABILITY_RELAYS_SWEEPS_V1 = 'payments.relays-sweeps.v1';
44
- /** Seller honours buyer-initiated cooperative channel close (0x59 / 0x5A). */
45
- export const CONNECTION_CAPABILITY_COOPERATIVE_CLOSE_V1 = 'payments.cooperative-close.v1';
46
- /**
47
- * Seller runs periodic model health self-checks and unadvertises services
48
- * that stop working, so its announced service list reflects live health.
49
- */
50
- export const CONNECTION_CAPABILITY_MODEL_HEALTH_V1 = 'seller.model-health.v1';
51
- export function peerRelaysSweeps(peer) {
52
- return peer.capabilities?.includes(CONNECTION_CAPABILITY_RELAYS_SWEEPS_V1) === true
53
- || peer.metadata?.capabilities?.includes(CONNECTION_CAPABILITY_RELAYS_SWEEPS_V1) === true;
54
- }
55
- export function peerSupportsCooperativeClose(peer) {
56
- return peer.capabilities?.includes(CONNECTION_CAPABILITY_COOPERATIVE_CLOSE_V1) === true
57
- || peer.metadata?.capabilities?.includes(CONNECTION_CAPABILITY_COOPERATIVE_CLOSE_V1) === true;
58
- }
59
- export function peerRunsModelHealthChecks(peer) {
60
- return peer.capabilities?.includes(CONNECTION_CAPABILITY_MODEL_HEALTH_V1) === true
61
- || peer.metadata?.capabilities?.includes(CONNECTION_CAPABILITY_MODEL_HEALTH_V1) === true;
62
- }
63
- export const FRAME_HEADER_SIZE = 9;
64
- export const MAX_PAYLOAD_SIZE = 64 * 1024 * 1024;
65
- export const PAYMENT_CODE_CHANNEL_EXHAUSTED = 'channel_exhausted';
66
- /** Why a seller declined to close a channel on request. */
67
- export const CLOSE_CHANNEL_REJECT_CODES = [
68
- /** Seller is still serving requests for this buyer — retry shortly. */
69
- 'busy',
70
- /** Seller has served work the buyer has not signed for yet. A NeedAuth was
71
- * sent alongside this result; sign `requiredCumulativeAmount` and retry. */
72
- 'pending_auth',
73
- /** No active channel for this buyer, or `channelId` does not match it. */
74
- 'no_channel',
75
- /** The attached SpendingAuth failed verification. */
76
- 'invalid_auth',
77
- /** The on-chain close() call failed. `reason` carries the revert text. */
78
- 'close_failed',
79
- /** Seller has no payment manager configured. */
80
- 'unsupported',
81
- ];
1
+ // Moved to @antseed/protocol; re-exported here for compatibility.
2
+ export * from '@antseed/protocol/messages';
82
3
  //# sourceMappingURL=protocol.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/types/protocol.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WA8CX;AA9CD,WAAY,WAAW;IACrB,+DAAoB,CAAA;IACpB,6DAAmB,CAAA;IACnB,8CAAW,CAAA;IACX,8CAAW,CAAA;IACX,4DAAkB,CAAA;IAClB,8DAAmB,CAAA;IACnB,wEAAwB,CAAA;IACxB,oEAAsB,CAAA;IACtB,wEAAwB,CAAA;IACxB,uDAAuD;IACvD,sEAAuB,CAAA;IACvB,kEAAuB,CAAA;IAEvB,uCAAuC;IACvC,8DAAmB,CAAA;IACnB,oDAAc,CAAA;IACd,gEAAoB,CAAA;IACpB,gEAAoB,CAAA;IACpB,8DAAmB,CAAA;IACnB,wEAAwB,CAAA;IACxB,oEAAsB,CAAA;IACtB,sDAAe,CAAA;IACf,4EAA0B,CAAA;IAC1B,0EAAyB,CAAA;IAEzB,uBAAuB;IACvB,0DAAiB,CAAA;IACjB,wDAAgB,CAAA;IAEhB,uBAAuB;IACvB,2DAAiB,CAAA;IACjB,6DAAkB,CAAA;IAClB,mEAAqB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MAAM,CAAC,MAAM,8BAA8B,GAAG,mBAA4B,CAAC;AAgE3E,2DAA2D;AAC3D,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,uEAAuE;IACvE,MAAM;IACN;iFAC6E;IAC7E,cAAc;IACd,0EAA0E;IAC1E,YAAY;IACZ,qDAAqD;IACrD,cAAc;IACd,0EAA0E;IAC1E,cAAc;IACd,gDAAgD;IAChD,aAAa;CACL,CAAC"}
1
+ {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/types/protocol.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,cAAc,4BAA4B,CAAC"}
@@ -1,6 +1,2 @@
1
- export declare const ANTSEED_MODEL_CONTEXT_WINDOW = 280000;
2
- export declare const ANTSEED_MODEL_MAX_OUTPUT_TOKENS = 8192;
3
- export declare const WELL_KNOWN_SERVICE_API_PROTOCOLS: readonly ["anthropic-messages", "openai-chat-completions", "openai-completions", "openai-responses"];
4
- export type ServiceApiProtocol = (typeof WELL_KNOWN_SERVICE_API_PROTOCOLS)[number];
5
- export declare function isKnownServiceApiProtocol(value: string): value is ServiceApiProtocol;
1
+ export * from '@antseed/protocol/service-api';
6
2
  //# sourceMappingURL=service-api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"service-api.d.ts","sourceRoot":"","sources":["../../src/types/service-api.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,SAAU,CAAC;AACpD,eAAO,MAAM,+BAA+B,OAAQ,CAAC;AAErD,eAAO,MAAM,gCAAgC,sGAKnC,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,CAAC,CAAC;AAInF,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,kBAAkB,CAEpF"}
1
+ {"version":3,"file":"service-api.d.ts","sourceRoot":"","sources":["../../src/types/service-api.ts"],"names":[],"mappings":"AACA,cAAc,+BAA+B,CAAC"}
@@ -1,13 +1,3 @@
1
- export const ANTSEED_MODEL_CONTEXT_WINDOW = 280_000;
2
- export const ANTSEED_MODEL_MAX_OUTPUT_TOKENS = 8_192;
3
- export const WELL_KNOWN_SERVICE_API_PROTOCOLS = [
4
- 'anthropic-messages',
5
- 'openai-chat-completions',
6
- 'openai-completions',
7
- 'openai-responses',
8
- ];
9
- const SERVICE_API_PROTOCOL_SET = new Set(WELL_KNOWN_SERVICE_API_PROTOCOLS);
10
- export function isKnownServiceApiProtocol(value) {
11
- return SERVICE_API_PROTOCOL_SET.has(value);
12
- }
1
+ // Moved to @antseed/protocol; re-exported for compatibility.
2
+ export * from '@antseed/protocol/service-api';
13
3
  //# sourceMappingURL=service-api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"service-api.js","sourceRoot":"","sources":["../../src/types/service-api.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,4BAA4B,GAAG,OAAO,CAAC;AACpD,MAAM,CAAC,MAAM,+BAA+B,GAAG,KAAK,CAAC;AAErD,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,oBAAoB;IACpB,yBAAyB;IACzB,oBAAoB;IACpB,kBAAkB;CACV,CAAC;AAIX,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAS,gCAAgC,CAAC,CAAC;AAEnF,MAAM,UAAU,yBAAyB,CAAC,KAAa;IACrD,OAAO,wBAAwB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC7C,CAAC"}
1
+ {"version":3,"file":"service-api.js","sourceRoot":"","sources":["../../src/types/service-api.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,+BAA+B,CAAC"}
@@ -1,6 +1,2 @@
1
- export declare function getDebugFilters(): readonly string[];
2
- export declare function shouldEmitDebugLine(line: string): boolean;
3
- export declare function isDebugEnabled(): boolean;
4
- export declare function debugLog(...args: unknown[]): void;
5
- export declare function debugWarn(...args: unknown[]): void;
1
+ export * from '@antseed/buyer-core/debug';
6
2
  //# sourceMappingURL=debug.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/utils/debug.ts"],"names":[],"mappings":"AAMA,wBAAgB,eAAe,IAAI,SAAS,MAAM,EAAE,CAWnD;AAOD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CASzD;AAMD,wBAAgB,cAAc,IAAI,OAAO,CAaxC;AAED,wBAAgB,QAAQ,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAIjD;AAED,wBAAgB,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAIlD"}
1
+ {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/utils/debug.ts"],"names":[],"mappings":"AACA,cAAc,2BAA2B,CAAC"}
@@ -1,53 +1,3 @@
1
- function normalizeDebugValue(value) {
2
- return (value ?? '').trim().toLowerCase();
3
- }
4
- let cachedDebugFilters = null;
5
- export function getDebugFilters() {
6
- if (cachedDebugFilters) {
7
- return cachedDebugFilters;
8
- }
9
- const raw = process.env['ANTSEED_LOG_FILTER'] ?? process.env['ANTSEED_DEBUG_FILTER'] ?? '';
10
- cachedDebugFilters = raw
11
- .split(',')
12
- .map((part) => part.trim().toLowerCase())
13
- .filter((part) => part.length > 0);
14
- return cachedDebugFilters;
15
- }
16
- function getDebugSource(line) {
17
- const match = /^\s*\[([^\]]{1,48})\]/.exec(line);
18
- return match?.[1]?.trim().toLowerCase() ?? null;
19
- }
20
- export function shouldEmitDebugLine(line) {
21
- const filters = getDebugFilters();
22
- if (filters.length === 0) {
23
- return true;
24
- }
25
- const normalizedLine = line.toLowerCase();
26
- const source = getDebugSource(line);
27
- return filters.some((filter) => source === filter || normalizedLine.includes(filter));
28
- }
29
- function shouldEmitDebug(args) {
30
- return shouldEmitDebugLine(args.map((arg) => typeof arg === 'string' ? arg : String(arg)).join(' '));
31
- }
32
- export function isDebugEnabled() {
33
- const fromAntseed = normalizeDebugValue(process.env['ANTSEED_DEBUG']);
34
- if (fromAntseed === '1' ||
35
- fromAntseed === 'true' ||
36
- fromAntseed === 'yes' ||
37
- fromAntseed === 'on') {
38
- return true;
39
- }
40
- const fromDebug = normalizeDebugValue(process.env['DEBUG']);
41
- return fromDebug === '*' || fromDebug.includes('antseed');
42
- }
43
- export function debugLog(...args) {
44
- if (isDebugEnabled() && shouldEmitDebug(args)) {
45
- console.log(...args);
46
- }
47
- }
48
- export function debugWarn(...args) {
49
- if (isDebugEnabled() && shouldEmitDebug(args)) {
50
- console.warn(...args);
51
- }
52
- }
1
+ // Moved to @antseed/buyer-core; re-exported for compatibility.
2
+ export * from '@antseed/buyer-core/debug';
53
3
  //# sourceMappingURL=debug.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/utils/debug.ts"],"names":[],"mappings":"AAAA,SAAS,mBAAmB,CAAC,KAAyB;IACpD,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAC5C,CAAC;AAED,IAAI,kBAAkB,GAAoB,IAAI,CAAC;AAE/C,MAAM,UAAU,eAAe;IAC7B,IAAI,kBAAkB,EAAE,CAAC;QACvB,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,IAAI,EAAE,CAAC;IAC3F,kBAAkB,GAAG,GAAG;SACrB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;SACxC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACrC,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAED,SAAS,cA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,OAAO,SAAS,KAAK,GAAG,IAAI,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,GAAG,IAAe;IACzC,IAAI,cAAc,EAAE,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,GAAG,IAAe;IAC1C,IAAI,cAAc,EAAE,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IACxB,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/utils/debug.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,cAAc,2BAA2B,CAAC"}
@@ -1,3 +1,2 @@
1
- export declare function hexToBytes(hex: string): Uint8Array;
2
- export declare function bytesToHex(bytes: Uint8Array): string;
1
+ export { hexToBytes, bytesToHex } from '@antseed/protocol/signing';
3
2
  //# sourceMappingURL=hex.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hex.d.ts","sourceRoot":"","sources":["../../src/utils/hex.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAOlD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAIpD"}
1
+ {"version":3,"file":"hex.d.ts","sourceRoot":"","sources":["../../src/utils/hex.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC"}
package/dist/utils/hex.js CHANGED
@@ -1,15 +1,3 @@
1
- export function hexToBytes(hex) {
2
- if (hex.length % 2 !== 0)
3
- throw new Error("Hex string must have even length");
4
- const bytes = new Uint8Array(hex.length / 2);
5
- for (let i = 0; i < hex.length; i += 2) {
6
- bytes[i / 2] = parseInt(hex.slice(i, i + 2), 16);
7
- }
8
- return bytes;
9
- }
10
- export function bytesToHex(bytes) {
11
- return Array.from(bytes)
12
- .map((b) => b.toString(16).padStart(2, "0"))
13
- .join("");
14
- }
1
+ // Moved to @antseed/protocol; re-exported for compatibility.
2
+ export { hexToBytes, bytesToHex } from '@antseed/protocol/signing';
15
3
  //# sourceMappingURL=hex.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hex.js","sourceRoot":"","sources":["../../src/utils/hex.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IAC9E,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACvC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAiB;IAC1C,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;SACrB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;SAC3C,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"hex.js","sourceRoot":"","sources":["../../src/utils/hex.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,10 +1,2 @@
1
- export interface JsonObjectParseOptions {
2
- maxBytes?: number;
3
- payloadName?: string;
4
- }
5
- export declare function parseJsonObject(input: Uint8Array | string, options?: JsonObjectParseOptions): Record<string, unknown>;
6
- export declare function tryParseJsonObject(input: Uint8Array | string, options?: JsonObjectParseOptions): Record<string, unknown> | null;
7
- export declare function hasJsonContentType(headers: Record<string, string>): boolean;
8
- export declare function requireStringField(obj: Record<string, unknown>, field: string): string;
9
- export declare function requireFiniteNumberField(obj: Record<string, unknown>, field: string): number;
1
+ export * from '@antseed/protocol/json-codec';
10
2
  //# sourceMappingURL=json-codec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"json-codec.d.ts","sourceRoot":"","sources":["../../src/utils/json-codec.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,UAAU,GAAG,MAAM,EAC1B,OAAO,GAAE,sBAA2B,GACnC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAOzB;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,UAAU,GAAG,MAAM,EAC1B,OAAO,GAAE,sBAA2B,GACnC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAMhC;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAG3E;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMtF;AAED,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAM5F"}
1
+ {"version":3,"file":"json-codec.d.ts","sourceRoot":"","sources":["../../src/utils/json-codec.ts"],"names":[],"mappings":"AACA,cAAc,8BAA8B,CAAC"}
@@ -1,52 +1,3 @@
1
- const decoder = new TextDecoder();
2
- const encoder = new TextEncoder();
3
- export function parseJsonObject(input, options = {}) {
4
- const text = decodeJsonInput(input, options);
5
- const raw = JSON.parse(text);
6
- if (typeof raw !== 'object' || raw === null || Array.isArray(raw)) {
7
- throw new Error('Expected JSON object');
8
- }
9
- return raw;
10
- }
11
- export function tryParseJsonObject(input, options = {}) {
12
- try {
13
- return parseJsonObject(input, options);
14
- }
15
- catch {
16
- return null;
17
- }
18
- }
19
- export function hasJsonContentType(headers) {
20
- const contentType = headers['content-type'] ?? headers['Content-Type'] ?? '';
21
- return contentType.toLowerCase().includes('application/json');
22
- }
23
- export function requireStringField(obj, field) {
24
- const value = obj[field];
25
- if (typeof value !== 'string' || value.length === 0) {
26
- throw new Error(`Missing or invalid string field: ${field}`);
27
- }
28
- return value;
29
- }
30
- export function requireFiniteNumberField(obj, field) {
31
- const value = obj[field];
32
- if (typeof value !== 'number' || !Number.isFinite(value)) {
33
- throw new Error(`Missing or invalid number field: ${field}`);
34
- }
35
- return value;
36
- }
37
- function decodeJsonInput(input, options) {
38
- const maxBytes = options.maxBytes;
39
- const payloadName = options.payloadName ?? 'JSON payload';
40
- if (typeof input === 'string') {
41
- const byteLength = maxBytes === undefined ? 0 : encoder.encode(input).byteLength;
42
- if (maxBytes !== undefined && byteLength > maxBytes) {
43
- throw new Error(`${payloadName} too large: ${byteLength} bytes (max ${maxBytes})`);
44
- }
45
- return input;
46
- }
47
- if (maxBytes !== undefined && input.byteLength > maxBytes) {
48
- throw new Error(`${payloadName} too large: ${input.byteLength} bytes (max ${maxBytes})`);
49
- }
50
- return decoder.decode(input);
51
- }
1
+ // Moved to @antseed/protocol; re-exported here for compatibility.
2
+ export * from '@antseed/protocol/json-codec';
52
3
  //# sourceMappingURL=json-codec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"json-codec.js","sourceRoot":"","sources":["../../src/utils/json-codec.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAOlC,MAAM,UAAU,eAAe,CAC7B,KAA0B,EAC1B,UAAkC,EAAE;IAEpC,MAAM,IAAI,GAAG,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC7C,MAAM,GAAG,GAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAClE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,GAA8B,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,KAA0B,EAC1B,UAAkC,EAAE;IAEpC,IAAI,CAAC;QACH,OAAO,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,OAA+B;IAChE,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,IAAI,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;IAC7E,OAAO,WAAW,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,GAA4B,EAAE,KAAa;IAC5E,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;IACzB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,KA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