@0xdivyanshh/tab-sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,324 @@
1
+ import type { MicroUsdc } from '@0xdivyanshh/tab-money';
2
+ import type { RefusalCode, WeightReason } from '@0xdivyanshh/tab-protocol';
3
+ /**
4
+ * The wire shapes, and the results a caller sees.
5
+ *
6
+ * Refusal codes and message schemas are **re-exported from `@0xdivyanshh/tab-protocol`,
7
+ * never redefined** — a second copy drifts, and the copy that drifts is always
8
+ * the one a consumer is holding.
9
+ *
10
+ * Amounts cross the wire as **decimal strings** and are parsed to `MicroUsdc`
11
+ * on the way in, because `bigint` does not survive `JSON.stringify`. Every
12
+ * `MicroUsdc` in this file has therefore already been parsed; every string
13
+ * amount is still on the wire.
14
+ */
15
+ export type { RefusalCode, WeightReason } from '@0xdivyanshh/tab-protocol';
16
+ export { BLOCKING_REASONS, isBlocking, isRetryable, REFUSAL_CODES, REFUSAL_GUIDANCE, WEIGHT_REASON_DETAIL, WEIGHT_REASONS, } from '@0xdivyanshh/tab-protocol';
17
+ export interface SpendRequest {
18
+ /** The agent's tab. */
19
+ tab: string;
20
+ /** The seller's URL, including whatever the seller needs to be paid. */
21
+ url: string;
22
+ /** The most this call may cost. */
23
+ /**
24
+ * The most to pay for this one call.
25
+ *
26
+ * Optional: omit it to accept the seller's own quoted price from its x402
27
+ * challenge, which is the usual case — the seller sets the price, so a caller
28
+ * with no budget of its own has nothing to add. Supply it only to spend LESS
29
+ * than the seller asks, which refuses rather than underpays.
30
+ */
31
+ max?: MicroUsdc;
32
+ /**
33
+ * Idempotency key.
34
+ *
35
+ * Generated by the client when absent, so a network retry cannot
36
+ * double-spend — the gateway treats it as the hold id. A caller that retries
37
+ * a `TabUnavailableError` MUST reuse the key it sent, which is why the client
38
+ * returns it even on failure.
39
+ */
40
+ idempotencyKey?: string;
41
+ init?: {
42
+ method?: string;
43
+ headers?: Record<string, string>;
44
+ body?: string;
45
+ };
46
+ }
47
+ export interface SpendPaid {
48
+ outcome: 'paid';
49
+ amount: MicroUsdc;
50
+ seller: string;
51
+ holdId: string;
52
+ /** Sequence number of the debit receipt on the HCS topic. */
53
+ receiptSeq: number | null;
54
+ /** The seller's own response body, untouched. */
55
+ body: unknown;
56
+ elapsedMs: number;
57
+ }
58
+ export interface SpendRefused {
59
+ outcome: 'refused';
60
+ /** The exact rule that fired. This is the product working, not an error. */
61
+ rule: RefusalCode;
62
+ reason: string;
63
+ /** What the agent should do next. Handling refusal is its main job. */
64
+ guidance: string;
65
+ retryable: boolean;
66
+ /** The numbers behind the decision, so a caller can show or log them. */
67
+ evidence?: Record<string, string | number>;
68
+ }
69
+ /**
70
+ * Infrastructure failed AFTER the decision to spend — distinct from a refusal
71
+ * on purpose. A refusal means the rail said no; this means nobody said
72
+ * anything, and the caller does not know whether the seller was paid.
73
+ */
74
+ export interface SpendFailed {
75
+ outcome: 'failed';
76
+ reason: string;
77
+ holdId: string;
78
+ }
79
+ export type SpendResult = SpendPaid | SpendRefused | SpendFailed;
80
+ /**
81
+ * A pre-flight check that reserves nothing.
82
+ *
83
+ * Separate from `spend` because an agent planning a batch needs to know what it
84
+ * can afford without taking headroom it may not use — and a hold taken by a
85
+ * quote would be a hold that never commits, which is exactly the shape the
86
+ * reconciler has to clean up.
87
+ */
88
+ export interface Quote {
89
+ tab: string;
90
+ affordable: boolean;
91
+ available: MicroUsdc;
92
+ ceiling: MicroUsdc;
93
+ perCallCap: MicroUsdc;
94
+ /** Set when not affordable — the rule that would fire. */
95
+ wouldRefuse?: RefusalCode;
96
+ reason?: string;
97
+ }
98
+ export interface TabState {
99
+ tab: string;
100
+ /** Signed. Negative means the agent owes. */
101
+ balance: MicroUsdc;
102
+ outstanding: MicroUsdc;
103
+ holds: MicroUsdc;
104
+ available: MicroUsdc;
105
+ ceiling: MicroUsdc;
106
+ perCallCap: MicroUsdc;
107
+ window: number;
108
+ entries: number;
109
+ }
110
+ export interface Hold {
111
+ holdId: string;
112
+ counterparty: string;
113
+ amount: MicroUsdc;
114
+ at: string;
115
+ expiresAt: string;
116
+ status: 'pending' | 'committed' | 'expired';
117
+ }
118
+ /**
119
+ * One counterparty's published independence weight.
120
+ *
121
+ * Read from what the ENGINE published to HCS, never recomputed — the reason
122
+ * codes come from `@0xdivyanshh/tab-protocol`, so the console renders the same vocabulary
123
+ * that is on the topic rather than a translation of it.
124
+ */
125
+ export interface CounterpartyWeight {
126
+ counterparty: string;
127
+ /** Basis points. 10000 counts in full, 0 blocks the spend. */
128
+ bp: number;
129
+ /** Every reason that applied, most severe first. Never empty. */
130
+ reasons: readonly WeightReason[];
131
+ /** True when a reason is fatal — refused, not merely discounted. */
132
+ blocking: boolean;
133
+ revenue: MicroUsdc;
134
+ /** Share of total revenue, basis points. */
135
+ shareBp: number;
136
+ window: number;
137
+ at: string;
138
+ token?: string;
139
+ /** Consensus timestamp of the counterparty's account creation. */
140
+ firstSeen?: string;
141
+ /** The account that created this counterparty. */
142
+ funder?: string;
143
+ /** Sequence number of the message that established `funder` — cite this. */
144
+ funderSeq?: number;
145
+ /**
146
+ * The account that created the TAB.
147
+ *
148
+ * On every row so each is self-contained: `COMMON_FUNDER` is decided by
149
+ * comparing exactly this against `funder`, so a reader holding one row can
150
+ * check the rule without correlating two shapes.
151
+ */
152
+ tabFunder?: string;
153
+ }
154
+ /** The inputs a ceiling was computed from, as published. */
155
+ export interface CeilingInputsView {
156
+ revenue: MicroUsdc;
157
+ revenueAttested: MicroUsdc;
158
+ revenueUnattested: MicroUsdc;
159
+ tier: 'A' | 'B' | 'C' | 'Unrated';
160
+ /** Tier multiple, basis points. 10000 = 1.0x, 0 = no credit at all. */
161
+ multBp: number;
162
+ /** Ramp factor, basis points. */
163
+ rampBp: number;
164
+ cap: MicroUsdc;
165
+ floor: MicroUsdc;
166
+ /** Has this tab ever missed a settlement? Zero credit if so, whatever the revenue. */
167
+ defaulted: boolean;
168
+ }
169
+ /** One published ceiling. */
170
+ export interface PublishedCeilingView {
171
+ ceiling: MicroUsdc;
172
+ /** The formula's result, when the asymmetry rule is holding a growth back. */
173
+ computed?: MicroUsdc;
174
+ window: number;
175
+ binding: string;
176
+ cause: string;
177
+ at: string;
178
+ model: string;
179
+ hash: string;
180
+ seq?: number;
181
+ inputs: CeilingInputsView;
182
+ }
183
+ /**
184
+ * A tab's ceiling, with the series behind it.
185
+ *
186
+ * `published: false` is the NORMAL state for a tab's first minutes — the engine
187
+ * has not run yet and the starter ceiling is in force. It is not an error, and
188
+ * `enforced` is populated either way, because something is always being
189
+ * enforced.
190
+ */
191
+ export interface CeilingView {
192
+ tab: string;
193
+ published: boolean;
194
+ /**
195
+ * What the fast path is actually checking right now.
196
+ *
197
+ * Normally equal to `current.ceiling`. When it is not, the gap is the most
198
+ * useful number on the screen: the gateway polls the topic every 15s, so a
199
+ * fresh collapse can be published and not yet enforced.
200
+ */
201
+ enforced: MicroUsdc;
202
+ current?: PublishedCeilingView;
203
+ /** Ascending. The last element is `current`. */
204
+ history: readonly PublishedCeilingView[];
205
+ /** Set when nothing has been published — says what is in force instead. */
206
+ note?: string;
207
+ }
208
+ /**
209
+ * One settled window.
210
+ *
211
+ * The gross legs are OPTIONAL because settlements published before those fields
212
+ * existed do not carry them. A reader must render absent as "not published"
213
+ * rather than as `0.0000` — a window whose credits were genuinely zero and one
214
+ * that never recorded its credits are different facts, and showing both as zero
215
+ * invents a netting that was never published.
216
+ */
217
+ export interface SettlementView {
218
+ window: number;
219
+ at: string;
220
+ seq?: number;
221
+ /** Signed. Positive paid out to the agent, negative carried as outstanding. */
222
+ net: MicroUsdc;
223
+ credits?: MicroUsdc;
224
+ debits?: MicroUsdc;
225
+ interest?: MicroUsdc;
226
+ outstanding?: MicroUsdc;
227
+ /** How many receipts collapsed into the one movement. */
228
+ receiptCount?: number;
229
+ outcome: 'clean' | 'missed' | 'carried';
230
+ rampFromBp: number;
231
+ rampToBp: number;
232
+ /** Absent when the window was missed and nothing moved. */
233
+ transactionId?: string;
234
+ token?: string;
235
+ }
236
+ /**
237
+ * One tab as the gateway knows it.
238
+ *
239
+ * `tier` and the `published*` fields are OPTIONAL and absent until the engine
240
+ * has published a ceiling for this tab. An unpublished tab has NO tier, which
241
+ * is a different fact from being `Unrated` — guessing one from the balance
242
+ * would put a rating on screen that no topic carries.
243
+ */
244
+ export interface TabSummary {
245
+ tab: string;
246
+ balance: MicroUsdc;
247
+ outstanding: MicroUsdc;
248
+ holds: MicroUsdc;
249
+ available: MicroUsdc;
250
+ /** What the fast path enforces for this tab right now. */
251
+ ceiling: MicroUsdc;
252
+ entries: number;
253
+ tier?: 'A' | 'B' | 'C' | 'Unrated';
254
+ publishedCeiling?: MicroUsdc;
255
+ binding?: string;
256
+ cause?: string;
257
+ model?: string;
258
+ seq?: number;
259
+ /**
260
+ * The funding root this tab holds the Starter Tab claim on.
261
+ *
262
+ * Absent means the engine has not registered it yet — NOT that it was denied.
263
+ * The gateway cannot tell those apart: resolving a funding root needs
264
+ * `@0xdivyanshh/tab-graph`, which it may not import.
265
+ */
266
+ registeredRoot?: string;
267
+ registeredAt?: string;
268
+ registrationSeq?: number;
269
+ /**
270
+ * The agent's HCS-14 Universal Agent Identifier.
271
+ *
272
+ * Derived from six canonical fields rather than issued, so anyone can
273
+ * recompute it. Absent on a registration published before it existed.
274
+ */
275
+ uaid?: string;
276
+ }
277
+ /**
278
+ * The tabs this gateway has seen — NOT a registry.
279
+ *
280
+ * `registrationEnforced` describes the RULE, not the data: one Starter Tab per
281
+ * funding root is applied on every engine pass whether or not any root has been
282
+ * claimed yet. A caller asking "has this actually run" should read
283
+ * `rootsClaimed`.
284
+ *
285
+ * It stays on the response rather than being left to a caller's assumption,
286
+ * because a consumer needs to know which rule is in force — and because it was
287
+ * `false` for most of this project's life, when nothing wrote a `register`
288
+ * message at all.
289
+ */
290
+ export interface TabList {
291
+ window: number;
292
+ registrationEnforced: boolean;
293
+ /** How many funding roots have actually been claimed. */
294
+ rootsClaimed: number;
295
+ note: string;
296
+ tabs: readonly TabSummary[];
297
+ }
298
+ export type ReceiptLeg = 'hold' | 'debit' | 'credit' | 'refusal' | 'repair' | 'settlement';
299
+ export interface ReceiptRow {
300
+ leg: ReceiptLeg;
301
+ /**
302
+ * The HCS sequence number, when this entry was replayed from a topic.
303
+ *
304
+ * Optional because an entry the gateway created this instant has not been
305
+ * published yet. It is the number to cite in an audit, so the console shows
306
+ * it rather than a counter of its own.
307
+ */
308
+ seq?: number;
309
+ /** Hash of the request, when the receipt carried one. Never the request. */
310
+ requestHash?: string;
311
+ /** The token these amounts are denominated in. Absent on pre-`tok` receipts. */
312
+ token?: string;
313
+ /** Consensus timestamp — the ordering key, and the only one that counts. */
314
+ at: string;
315
+ window: number;
316
+ counterparty?: string;
317
+ /** Signed, as the ledger holds it. */
318
+ amount?: MicroUsdc;
319
+ attested?: boolean;
320
+ transactionId?: string;
321
+ holdId?: string;
322
+ rule?: RefusalCode;
323
+ }
324
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE9D;;;;;;;;;;;GAWG;AAEH,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,GACf,MAAM,eAAe,CAAA;AAItB,MAAM,WAAW,YAAY;IAC3B,uBAAuB;IACvB,GAAG,EAAE,MAAM,CAAA;IACX,wEAAwE;IACxE,GAAG,EAAE,MAAM,CAAA;IACX,mCAAmC;IACnC;;;;;;;OAOG;IACH,GAAG,CAAC,EAAE,SAAS,CAAA;IACf;;;;;;;OAOG;IACH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E,MAAM,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,UAAU,EAAE,CAAA;CAC5B;AAID,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAA;AAE1F,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,UAAU,CAAA;IACf;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4EAA4E;IAC5E,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,sCAAsC;IACtC,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export { BLOCKING_REASONS, isBlocking, isRetryable, REFUSAL_CODES, REFUSAL_GUIDANCE, WEIGHT_REASON_DETAIL, WEIGHT_REASONS, } from '@0xdivyanshh/tab-protocol';
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,GACf,MAAM,eAAe,CAAA"}
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@0xdivyanshh/tab-sdk",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ }
12
+ },
13
+ "dependencies": {
14
+ "@0xdivyanshh/tab-money": "0.1.0",
15
+ "@0xdivyanshh/tab-params": "0.1.0",
16
+ "@0xdivyanshh/tab-protocol": "0.1.0"
17
+ },
18
+ "description": "Client for the Tab gateway: agent credit on Hedera. Ten verbs, two of which spend.",
19
+ "license": "MIT",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/0xNerd100/Tab.git",
23
+ "directory": "packages/sdk"
24
+ },
25
+ "homepage": "https://github.com/0xNerd100/Tab#readme",
26
+ "files": [
27
+ "dist/**/*.js",
28
+ "dist/**/*.d.ts",
29
+ "dist/**/*.map",
30
+ "README.md"
31
+ ],
32
+ "publishConfig": {
33
+ "access": "public"
34
+ }
35
+ }