@aibtc/tx-schemas 0.1.0 → 0.2.1
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 +5 -0
- package/dist/core/enums.d.ts +13 -16
- package/dist/core/enums.d.ts.map +1 -1
- package/dist/core/enums.js +18 -7
- package/dist/core/enums.js.map +1 -1
- package/dist/core/payment.d.ts +9 -25
- package/dist/core/payment.d.ts.map +1 -1
- package/dist/core/payment.js +0 -3
- package/dist/core/payment.js.map +1 -1
- package/dist/core/schemas.d.ts +1 -1
- package/dist/core/schemas.d.ts.map +1 -1
- package/dist/core/schemas.js +1 -1
- package/dist/core/schemas.js.map +1 -1
- package/dist/core/terminal-reasons.d.ts +2 -2
- package/dist/http/schemas.d.ts +32 -2
- package/dist/http/schemas.d.ts.map +1 -1
- package/dist/http/schemas.js +2 -0
- package/dist/http/schemas.js.map +1 -1
- package/dist/rpc/schemas.d.ts +35 -20
- package/dist/rpc/schemas.d.ts.map +1 -1
- package/dist/rpc/schemas.js +3 -1
- package/dist/rpc/schemas.js.map +1 -1
- package/docs/boring-state-machine-contract.md +83 -0
- package/docs/package-schemas.md +5 -1
- package/docs/workers-baseline.md +176 -0
- package/docs/x402-approval-spec.md +7 -5
- package/docs/x402-state-machines.md +16 -10
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -64,10 +64,15 @@ const settleRequest = HttpSettleRequestSchema.parse({
|
|
|
64
64
|
## Schema Rules
|
|
65
65
|
|
|
66
66
|
- Canonical payment states live in `core` and are the only shared payment-state source of truth.
|
|
67
|
+
- Public canonical states are `requires_payment`, `queued`, `broadcasting`, `mempool`, `confirmed`, `failed`, `replaced`, and `not_found`.
|
|
68
|
+
- `submitted` is reserved for relay internals and must not appear in the caller-facing contract.
|
|
67
69
|
- `rpc` and `http` may differ in field names and transport ergonomics, but they must reuse the same state semantics.
|
|
68
70
|
- The default protected-resource delivery invariant is `deliver-only-on-confirmed`.
|
|
69
71
|
- Any product that delivers on in-flight states should document that as an application exception, not a canonical package rule.
|
|
72
|
+
- `paymentId` is relay-owned and duplicate submission should reuse the same `paymentId` until terminal resolution.
|
|
73
|
+
- Terminal polling responses should carry a normalized `terminalReason` when one is known, even if transports also emit local error codes.
|
|
70
74
|
|
|
71
75
|
More detail lives in [docs/package-schemas.md](docs/package-schemas.md),
|
|
76
|
+
[docs/boring-state-machine-contract.md](docs/boring-state-machine-contract.md),
|
|
72
77
|
[docs/x402-approval-spec.md](docs/x402-approval-spec.md), and
|
|
73
78
|
[docs/x402-state-machines.md](docs/x402-state-machines.md).
|
package/dist/core/enums.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const PAYMENT_STATES: readonly ["requires_payment", "
|
|
3
|
-
export declare const TRACKED_PAYMENT_STATES: readonly ["
|
|
2
|
+
export declare const PAYMENT_STATES: readonly ["requires_payment", "queued", "broadcasting", "mempool", "confirmed", "failed", "replaced", "not_found"];
|
|
3
|
+
export declare const TRACKED_PAYMENT_STATES: readonly ["queued", "broadcasting", "mempool", "confirmed", "failed", "replaced", "not_found"];
|
|
4
4
|
export declare const PAYMENT_STATE_CATEGORIES: readonly ["pre-payment", "in-flight", "terminal-success", "terminal-failure"];
|
|
5
5
|
export declare const PRE_PAYMENT_STATES: readonly ["requires_payment"];
|
|
6
|
-
export declare const IN_FLIGHT_STATES: readonly ["
|
|
6
|
+
export declare const IN_FLIGHT_STATES: readonly ["queued", "broadcasting", "mempool"];
|
|
7
7
|
export declare const TERMINAL_SUCCESS_STATES: readonly ["confirmed"];
|
|
8
8
|
export declare const TERMINAL_FAILURE_STATES: readonly ["failed", "replaced", "not_found"];
|
|
9
9
|
export declare const PaymentStateSchema: z.ZodEnum<{
|
|
10
10
|
requires_payment: "requires_payment";
|
|
11
|
-
submitted: "submitted";
|
|
12
11
|
queued: "queued";
|
|
13
12
|
broadcasting: "broadcasting";
|
|
14
13
|
mempool: "mempool";
|
|
@@ -18,7 +17,6 @@ export declare const PaymentStateSchema: z.ZodEnum<{
|
|
|
18
17
|
not_found: "not_found";
|
|
19
18
|
}>;
|
|
20
19
|
export declare const TrackedPaymentStateSchema: z.ZodEnum<{
|
|
21
|
-
submitted: "submitted";
|
|
22
20
|
queued: "queued";
|
|
23
21
|
broadcasting: "broadcasting";
|
|
24
22
|
mempool: "mempool";
|
|
@@ -34,7 +32,6 @@ export declare const PaymentStateCategorySchema: z.ZodEnum<{
|
|
|
34
32
|
"terminal-failure": "terminal-failure";
|
|
35
33
|
}>;
|
|
36
34
|
export declare const InFlightPaymentStateSchema: z.ZodEnum<{
|
|
37
|
-
submitted: "submitted";
|
|
38
35
|
queued: "queued";
|
|
39
36
|
broadcasting: "broadcasting";
|
|
40
37
|
mempool: "mempool";
|
|
@@ -46,7 +43,6 @@ export declare const TerminalFailureStateSchema: z.ZodEnum<{
|
|
|
46
43
|
}>;
|
|
47
44
|
export declare const PAYMENT_STATE_TO_CATEGORY: {
|
|
48
45
|
readonly requires_payment: "pre-payment";
|
|
49
|
-
readonly submitted: "in-flight";
|
|
50
46
|
readonly queued: "in-flight";
|
|
51
47
|
readonly broadcasting: "in-flight";
|
|
52
48
|
readonly mempool: "in-flight";
|
|
@@ -57,7 +53,6 @@ export declare const PAYMENT_STATE_TO_CATEGORY: {
|
|
|
57
53
|
};
|
|
58
54
|
export declare const PAYMENT_STATE_DEFAULT_DELIVERY: {
|
|
59
55
|
readonly requires_payment: false;
|
|
60
|
-
readonly submitted: false;
|
|
61
56
|
readonly queued: false;
|
|
62
57
|
readonly broadcasting: false;
|
|
63
58
|
readonly mempool: false;
|
|
@@ -68,7 +63,6 @@ export declare const PAYMENT_STATE_DEFAULT_DELIVERY: {
|
|
|
68
63
|
};
|
|
69
64
|
export declare const PaymentStateCategoryByState: {
|
|
70
65
|
readonly requires_payment: "pre-payment";
|
|
71
|
-
readonly submitted: "in-flight";
|
|
72
66
|
readonly queued: "in-flight";
|
|
73
67
|
readonly broadcasting: "in-flight";
|
|
74
68
|
readonly mempool: "in-flight";
|
|
@@ -79,7 +73,6 @@ export declare const PaymentStateCategoryByState: {
|
|
|
79
73
|
};
|
|
80
74
|
export declare const paymentStateCategoryByState: {
|
|
81
75
|
readonly requires_payment: "pre-payment";
|
|
82
|
-
readonly submitted: "in-flight";
|
|
83
76
|
readonly queued: "in-flight";
|
|
84
77
|
readonly broadcasting: "in-flight";
|
|
85
78
|
readonly mempool: "in-flight";
|
|
@@ -90,7 +83,6 @@ export declare const paymentStateCategoryByState: {
|
|
|
90
83
|
};
|
|
91
84
|
export declare const PaymentStateDefaultDeliveryByState: {
|
|
92
85
|
readonly requires_payment: false;
|
|
93
|
-
readonly submitted: false;
|
|
94
86
|
readonly queued: false;
|
|
95
87
|
readonly broadcasting: false;
|
|
96
88
|
readonly mempool: false;
|
|
@@ -101,7 +93,6 @@ export declare const PaymentStateDefaultDeliveryByState: {
|
|
|
101
93
|
};
|
|
102
94
|
export declare const paymentStateDefaultDeliveryByState: {
|
|
103
95
|
readonly requires_payment: false;
|
|
104
|
-
readonly submitted: false;
|
|
105
96
|
readonly queued: false;
|
|
106
97
|
readonly broadcasting: false;
|
|
107
98
|
readonly mempool: false;
|
|
@@ -112,7 +103,6 @@ export declare const paymentStateDefaultDeliveryByState: {
|
|
|
112
103
|
};
|
|
113
104
|
export declare const PAYMENT_STATE_TRANSITIONS: {
|
|
114
105
|
readonly requires_payment: readonly [];
|
|
115
|
-
readonly submitted: readonly ["queued", "failed"];
|
|
116
106
|
readonly queued: readonly ["queued", "broadcasting", "failed"];
|
|
117
107
|
readonly broadcasting: readonly ["queued", "mempool", "failed"];
|
|
118
108
|
readonly mempool: readonly ["mempool", "confirmed", "failed", "replaced"];
|
|
@@ -123,7 +113,6 @@ export declare const PAYMENT_STATE_TRANSITIONS: {
|
|
|
123
113
|
};
|
|
124
114
|
export declare const PaymentStateTransitionMap: {
|
|
125
115
|
readonly requires_payment: readonly [];
|
|
126
|
-
readonly submitted: readonly ["queued", "failed"];
|
|
127
116
|
readonly queued: readonly ["queued", "broadcasting", "failed"];
|
|
128
117
|
readonly broadcasting: readonly ["queued", "mempool", "failed"];
|
|
129
118
|
readonly mempool: readonly ["mempool", "confirmed", "failed", "replaced"];
|
|
@@ -134,7 +123,6 @@ export declare const PaymentStateTransitionMap: {
|
|
|
134
123
|
};
|
|
135
124
|
export declare const paymentStateTransitionMap: {
|
|
136
125
|
readonly requires_payment: readonly [];
|
|
137
|
-
readonly submitted: readonly ["queued", "failed"];
|
|
138
126
|
readonly queued: readonly ["queued", "broadcasting", "failed"];
|
|
139
127
|
readonly broadcasting: readonly ["queued", "mempool", "failed"];
|
|
140
128
|
readonly mempool: readonly ["mempool", "confirmed", "failed", "replaced"];
|
|
@@ -149,8 +137,17 @@ export declare const CanonicalDomainBoundary: {
|
|
|
149
137
|
readonly defaultRule: "deliver-only-on-confirmed";
|
|
150
138
|
readonly deliverableStates: readonly ["confirmed"];
|
|
151
139
|
};
|
|
140
|
+
readonly paymentIdentity: {
|
|
141
|
+
readonly owner: "relay";
|
|
142
|
+
readonly field: "paymentId";
|
|
143
|
+
readonly duplicateSubmissionPolicy: "same-submission-reuses-paymentId-until-terminal-outcome";
|
|
144
|
+
};
|
|
145
|
+
readonly recoveryBoundaries: {
|
|
146
|
+
readonly senderOwned: readonly ["sender nonce correctness", "transaction rebuild after sender nonce stale/gap", "sender-wallet recovery actions"];
|
|
147
|
+
readonly relayOwned: readonly ["payment identity lifecycle", "sponsor ordering and sponsor nonce recovery", "in-flight payment transitions and terminal settlement truth"];
|
|
148
|
+
};
|
|
152
149
|
readonly transportBoundaries: {
|
|
153
|
-
readonly sharedDomain: readonly ["state", "category", "terminal-reason"];
|
|
150
|
+
readonly sharedDomain: readonly ["state", "category", "terminal-reason", "paymentId ownership"];
|
|
154
151
|
readonly rpc: readonly ["service-binding request/response shapes", "internal relay error codes"];
|
|
155
152
|
readonly http: readonly ["x402 request/response shapes", "polling and error envelopes"];
|
|
156
153
|
};
|
package/dist/core/enums.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/core/enums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/core/enums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc,oHASjB,CAAC;AAEX,eAAO,MAAM,sBAAsB,gGAQzB,CAAC;AAEX,eAAO,MAAM,wBAAwB,+EAK3B,CAAC;AAEX,eAAO,MAAM,kBAAkB,+BAAgC,CAAC;AAEhE,eAAO,MAAM,gBAAgB,gDAInB,CAAC;AAEX,eAAO,MAAM,uBAAuB,wBAAyB,CAAC;AAE9D,eAAO,MAAM,uBAAuB,8CAI1B,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;;;;EAAyB,CAAC;AACzD,eAAO,MAAM,yBAAyB;;;;;;;;EAAiC,CAAC;AACxE,eAAO,MAAM,0BAA0B;;;;;EAAmC,CAAC;AAC3E,eAAO,MAAM,0BAA0B;;;;EAA2B,CAAC;AACnE,eAAO,MAAM,0BAA0B;;;;EAAkC,CAAC;AAE1E,eAAO,MAAM,yBAAyB;;;;;;;;;CASiE,CAAC;AAExG,eAAO,MAAM,8BAA8B;;;;;;;;;CAS0B,CAAC;AAEtE,eAAO,MAAM,2BAA2B;;;;;;;;;CAA4B,CAAC;AACrE,eAAO,MAAM,2BAA2B;;;;;;;;;CAA4B,CAAC;AACrE,eAAO,MAAM,kCAAkC;;;;;;;;;CAAiC,CAAC;AACjF,eAAO,MAAM,kCAAkC;;;;;;;;;CAAiC,CAAC;AAEjF,eAAO,MAAM,yBAAyB;;;;;;;;;CASkE,CAAC;AAEzG,eAAO,MAAM,yBAAyB;;;;;;;;;CAA4B,CAAC;AACnE,eAAO,MAAM,yBAAyB;;;;;;;;;CAA4B,CAAC;AACnE,eAAO,MAAM,uCAAuC,2BAAyB,CAAC;AAC9E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;CA2B1B,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
package/dist/core/enums.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export const PAYMENT_STATES = [
|
|
3
3
|
"requires_payment",
|
|
4
|
-
"submitted",
|
|
5
4
|
"queued",
|
|
6
5
|
"broadcasting",
|
|
7
6
|
"mempool",
|
|
@@ -11,7 +10,6 @@ export const PAYMENT_STATES = [
|
|
|
11
10
|
"not_found",
|
|
12
11
|
];
|
|
13
12
|
export const TRACKED_PAYMENT_STATES = [
|
|
14
|
-
"submitted",
|
|
15
13
|
"queued",
|
|
16
14
|
"broadcasting",
|
|
17
15
|
"mempool",
|
|
@@ -28,7 +26,6 @@ export const PAYMENT_STATE_CATEGORIES = [
|
|
|
28
26
|
];
|
|
29
27
|
export const PRE_PAYMENT_STATES = ["requires_payment"];
|
|
30
28
|
export const IN_FLIGHT_STATES = [
|
|
31
|
-
"submitted",
|
|
32
29
|
"queued",
|
|
33
30
|
"broadcasting",
|
|
34
31
|
"mempool",
|
|
@@ -46,7 +43,6 @@ export const InFlightPaymentStateSchema = z.enum(IN_FLIGHT_STATES);
|
|
|
46
43
|
export const TerminalFailureStateSchema = z.enum(TERMINAL_FAILURE_STATES);
|
|
47
44
|
export const PAYMENT_STATE_TO_CATEGORY = {
|
|
48
45
|
requires_payment: "pre-payment",
|
|
49
|
-
submitted: "in-flight",
|
|
50
46
|
queued: "in-flight",
|
|
51
47
|
broadcasting: "in-flight",
|
|
52
48
|
mempool: "in-flight",
|
|
@@ -57,7 +53,6 @@ export const PAYMENT_STATE_TO_CATEGORY = {
|
|
|
57
53
|
};
|
|
58
54
|
export const PAYMENT_STATE_DEFAULT_DELIVERY = {
|
|
59
55
|
requires_payment: false,
|
|
60
|
-
submitted: false,
|
|
61
56
|
queued: false,
|
|
62
57
|
broadcasting: false,
|
|
63
58
|
mempool: false,
|
|
@@ -72,7 +67,6 @@ export const PaymentStateDefaultDeliveryByState = PAYMENT_STATE_DEFAULT_DELIVERY
|
|
|
72
67
|
export const paymentStateDefaultDeliveryByState = PAYMENT_STATE_DEFAULT_DELIVERY;
|
|
73
68
|
export const PAYMENT_STATE_TRANSITIONS = {
|
|
74
69
|
requires_payment: [],
|
|
75
|
-
submitted: ["queued", "failed"],
|
|
76
70
|
queued: ["queued", "broadcasting", "failed"],
|
|
77
71
|
broadcasting: ["queued", "mempool", "failed"],
|
|
78
72
|
mempool: ["mempool", "confirmed", "failed", "replaced"],
|
|
@@ -89,8 +83,25 @@ export const CanonicalDomainBoundary = {
|
|
|
89
83
|
defaultRule: "deliver-only-on-confirmed",
|
|
90
84
|
deliverableStates: ["confirmed"],
|
|
91
85
|
},
|
|
86
|
+
paymentIdentity: {
|
|
87
|
+
owner: "relay",
|
|
88
|
+
field: "paymentId",
|
|
89
|
+
duplicateSubmissionPolicy: "same-submission-reuses-paymentId-until-terminal-outcome",
|
|
90
|
+
},
|
|
91
|
+
recoveryBoundaries: {
|
|
92
|
+
senderOwned: [
|
|
93
|
+
"sender nonce correctness",
|
|
94
|
+
"transaction rebuild after sender nonce stale/gap",
|
|
95
|
+
"sender-wallet recovery actions",
|
|
96
|
+
],
|
|
97
|
+
relayOwned: [
|
|
98
|
+
"payment identity lifecycle",
|
|
99
|
+
"sponsor ordering and sponsor nonce recovery",
|
|
100
|
+
"in-flight payment transitions and terminal settlement truth",
|
|
101
|
+
],
|
|
102
|
+
},
|
|
92
103
|
transportBoundaries: {
|
|
93
|
-
sharedDomain: ["state", "category", "terminal-reason"],
|
|
104
|
+
sharedDomain: ["state", "category", "terminal-reason", "paymentId ownership"],
|
|
94
105
|
rpc: ["service-binding request/response shapes", "internal relay error codes"],
|
|
95
106
|
http: ["x402 request/response shapes", "polling and error envelopes"],
|
|
96
107
|
},
|
package/dist/core/enums.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/core/enums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,kBAAkB;IAClB,
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/core/enums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,kBAAkB;IAClB,QAAQ;IACR,cAAc;IACd,SAAS;IACT,WAAW;IACX,QAAQ;IACR,UAAU;IACV,WAAW;CACH,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,QAAQ;IACR,cAAc;IACd,SAAS;IACT,WAAW;IACX,QAAQ;IACR,UAAU;IACV,WAAW;CACH,CAAC;AAEX,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,aAAa;IACb,WAAW;IACX,kBAAkB;IAClB,kBAAkB;CACV,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,kBAAkB,CAAU,CAAC;AAEhE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ;IACR,cAAc;IACd,SAAS;CACD,CAAC;AAEX,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,WAAW,CAAU,CAAC;AAE9D,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,QAAQ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|
|
4
4
|
category: z.ZodLiteral<"pre-payment">;
|
|
5
5
|
}, z.core.$strip>;
|
|
6
|
-
export declare const SubmittedPaymentStatusSchema: z.ZodObject<{
|
|
7
|
-
state: z.ZodLiteral<"submitted" | "queued" | "broadcasting" | "mempool">;
|
|
8
|
-
category: z.ZodLiteral<"in-flight">;
|
|
9
|
-
paymentId: z.ZodString;
|
|
10
|
-
txid: z.ZodOptional<z.ZodString>;
|
|
11
|
-
}, z.core.$strip>;
|
|
12
6
|
export declare const QueuedPaymentStatusSchema: z.ZodObject<{
|
|
13
|
-
state: z.ZodLiteral<"
|
|
7
|
+
state: z.ZodLiteral<"queued" | "broadcasting" | "mempool">;
|
|
14
8
|
category: z.ZodLiteral<"in-flight">;
|
|
15
9
|
paymentId: z.ZodString;
|
|
16
10
|
txid: z.ZodOptional<z.ZodString>;
|
|
17
11
|
}, z.core.$strip>;
|
|
18
12
|
export declare const BroadcastingPaymentStatusSchema: z.ZodObject<{
|
|
19
|
-
state: z.ZodLiteral<"
|
|
13
|
+
state: z.ZodLiteral<"queued" | "broadcasting" | "mempool">;
|
|
20
14
|
category: z.ZodLiteral<"in-flight">;
|
|
21
15
|
paymentId: z.ZodString;
|
|
22
16
|
txid: z.ZodOptional<z.ZodString>;
|
|
23
17
|
}, z.core.$strip>;
|
|
24
18
|
export declare const MempoolPaymentStatusSchema: z.ZodObject<{
|
|
25
|
-
state: z.ZodLiteral<"
|
|
19
|
+
state: z.ZodLiteral<"queued" | "broadcasting" | "mempool">;
|
|
26
20
|
category: z.ZodLiteral<"in-flight">;
|
|
27
21
|
paymentId: z.ZodString;
|
|
28
22
|
txid: z.ZodOptional<z.ZodString>;
|
|
@@ -81,22 +75,17 @@ export declare const PaymentStatusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
81
75
|
state: z.ZodLiteral<"requires_payment">;
|
|
82
76
|
category: z.ZodLiteral<"pre-payment">;
|
|
83
77
|
}, z.core.$strip>, z.ZodObject<{
|
|
84
|
-
state: z.ZodLiteral<"
|
|
85
|
-
category: z.ZodLiteral<"in-flight">;
|
|
86
|
-
paymentId: z.ZodString;
|
|
87
|
-
txid: z.ZodOptional<z.ZodString>;
|
|
88
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
89
|
-
state: z.ZodLiteral<"submitted" | "queued" | "broadcasting" | "mempool">;
|
|
78
|
+
state: z.ZodLiteral<"queued" | "broadcasting" | "mempool">;
|
|
90
79
|
category: z.ZodLiteral<"in-flight">;
|
|
91
80
|
paymentId: z.ZodString;
|
|
92
81
|
txid: z.ZodOptional<z.ZodString>;
|
|
93
82
|
}, z.core.$strip>, z.ZodObject<{
|
|
94
|
-
state: z.ZodLiteral<"
|
|
83
|
+
state: z.ZodLiteral<"queued" | "broadcasting" | "mempool">;
|
|
95
84
|
category: z.ZodLiteral<"in-flight">;
|
|
96
85
|
paymentId: z.ZodString;
|
|
97
86
|
txid: z.ZodOptional<z.ZodString>;
|
|
98
87
|
}, z.core.$strip>, z.ZodObject<{
|
|
99
|
-
state: z.ZodLiteral<"
|
|
88
|
+
state: z.ZodLiteral<"queued" | "broadcasting" | "mempool">;
|
|
100
89
|
category: z.ZodLiteral<"in-flight">;
|
|
101
90
|
paymentId: z.ZodString;
|
|
102
91
|
txid: z.ZodOptional<z.ZodString>;
|
|
@@ -148,22 +137,17 @@ export declare const PaymentStatusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
148
137
|
detail: z.ZodOptional<z.ZodString>;
|
|
149
138
|
}, z.core.$strip>], "state">;
|
|
150
139
|
export declare const TrackedPaymentStatusSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
151
|
-
state: z.ZodLiteral<"
|
|
152
|
-
category: z.ZodLiteral<"in-flight">;
|
|
153
|
-
paymentId: z.ZodString;
|
|
154
|
-
txid: z.ZodOptional<z.ZodString>;
|
|
155
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
156
|
-
state: z.ZodLiteral<"submitted" | "queued" | "broadcasting" | "mempool">;
|
|
140
|
+
state: z.ZodLiteral<"queued" | "broadcasting" | "mempool">;
|
|
157
141
|
category: z.ZodLiteral<"in-flight">;
|
|
158
142
|
paymentId: z.ZodString;
|
|
159
143
|
txid: z.ZodOptional<z.ZodString>;
|
|
160
144
|
}, z.core.$strip>, z.ZodObject<{
|
|
161
|
-
state: z.ZodLiteral<"
|
|
145
|
+
state: z.ZodLiteral<"queued" | "broadcasting" | "mempool">;
|
|
162
146
|
category: z.ZodLiteral<"in-flight">;
|
|
163
147
|
paymentId: z.ZodString;
|
|
164
148
|
txid: z.ZodOptional<z.ZodString>;
|
|
165
149
|
}, z.core.$strip>, z.ZodObject<{
|
|
166
|
-
state: z.ZodLiteral<"
|
|
150
|
+
state: z.ZodLiteral<"queued" | "broadcasting" | "mempool">;
|
|
167
151
|
category: z.ZodLiteral<"in-flight">;
|
|
168
152
|
paymentId: z.ZodString;
|
|
169
153
|
txid: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../src/core/payment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkCxB,eAAO,MAAM,2BAA2B;;;iBAGtC,CAAC;AAEH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../src/core/payment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkCxB,eAAO,MAAM,2BAA2B;;;iBAGtC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;iBAAiC,CAAC;AACxE,eAAO,MAAM,+BAA+B;;;;;iBAAuC,CAAC;AACpF,eAAO,MAAM,0BAA0B;;;;;iBAAkC,CAAC;AAE1E,eAAO,MAAM,4BAA4B;;;;;;;;iBAQvC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;iBAQpC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;iBAOtC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;iBAMtC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAS9B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAQrC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAKtC,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
package/dist/core/payment.js
CHANGED
|
@@ -18,7 +18,6 @@ export const RequiresPaymentStatusSchema = PaymentStatusBaseSchema.extend({
|
|
|
18
18
|
state: z.literal("requires_payment"),
|
|
19
19
|
category: z.literal(PAYMENT_STATE_TO_CATEGORY.requires_payment),
|
|
20
20
|
});
|
|
21
|
-
export const SubmittedPaymentStatusSchema = inFlightStatusSchema("submitted");
|
|
22
21
|
export const QueuedPaymentStatusSchema = inFlightStatusSchema("queued");
|
|
23
22
|
export const BroadcastingPaymentStatusSchema = inFlightStatusSchema("broadcasting");
|
|
24
23
|
export const MempoolPaymentStatusSchema = inFlightStatusSchema("mempool");
|
|
@@ -57,7 +56,6 @@ export const NotFoundPaymentStatusSchema = PaymentStatusBaseSchema.extend({
|
|
|
57
56
|
});
|
|
58
57
|
export const PaymentStatusSchema = z.discriminatedUnion("state", [
|
|
59
58
|
RequiresPaymentStatusSchema,
|
|
60
|
-
SubmittedPaymentStatusSchema,
|
|
61
59
|
QueuedPaymentStatusSchema,
|
|
62
60
|
BroadcastingPaymentStatusSchema,
|
|
63
61
|
MempoolPaymentStatusSchema,
|
|
@@ -67,7 +65,6 @@ export const PaymentStatusSchema = z.discriminatedUnion("state", [
|
|
|
67
65
|
NotFoundPaymentStatusSchema,
|
|
68
66
|
]);
|
|
69
67
|
export const TrackedPaymentStatusSchema = z.discriminatedUnion("state", [
|
|
70
|
-
SubmittedPaymentStatusSchema,
|
|
71
68
|
QueuedPaymentStatusSchema,
|
|
72
69
|
BroadcastingPaymentStatusSchema,
|
|
73
70
|
MempoolPaymentStatusSchema,
|
package/dist/core/payment.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.js","sourceRoot":"","sources":["../../src/core/payment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,SAAS,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC;AAE/B,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,KAAK,EAAE,kBAAkB;IACzB,QAAQ,EAAE,0BAA0B;CACrC,CAAC,CAAC;AAEH,SAAS,oBAAoB,CAAC,KAAiD;IAC7E,OAAO,uBAAuB,CAAC,MAAM,CAAC;QACpC,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;QACvB,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC;QACrD,SAAS,EAAE,eAAe;QAC1B,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ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BroadcastingPaymentStatusSchema, ConfirmedPaymentStatusSchema, FailedPaymentStatusSchema, MempoolPaymentStatusSchema, NotFoundPaymentStatusSchema, PaymentStatusSchema, QueuedPaymentStatusSchema, ReplacedPaymentStatusSchema, RequiresPaymentStatusSchema,
|
|
1
|
+
export { BroadcastingPaymentStatusSchema, ConfirmedPaymentStatusSchema, FailedPaymentStatusSchema, MempoolPaymentStatusSchema, NotFoundPaymentStatusSchema, PaymentStatusSchema, QueuedPaymentStatusSchema, ReplacedPaymentStatusSchema, RequiresPaymentStatusSchema, TerminalPaymentStatusSchema, TrackedPaymentStatusSchema, } from "./payment.js";
|
|
2
2
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/core/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/core/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,cAAc,CAAC"}
|
package/dist/core/schemas.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BroadcastingPaymentStatusSchema, ConfirmedPaymentStatusSchema, FailedPaymentStatusSchema, MempoolPaymentStatusSchema, NotFoundPaymentStatusSchema, PaymentStatusSchema, QueuedPaymentStatusSchema, ReplacedPaymentStatusSchema, RequiresPaymentStatusSchema,
|
|
1
|
+
export { BroadcastingPaymentStatusSchema, ConfirmedPaymentStatusSchema, FailedPaymentStatusSchema, MempoolPaymentStatusSchema, NotFoundPaymentStatusSchema, PaymentStatusSchema, QueuedPaymentStatusSchema, ReplacedPaymentStatusSchema, RequiresPaymentStatusSchema, TerminalPaymentStatusSchema, TrackedPaymentStatusSchema, } from "./payment.js";
|
|
2
2
|
//# sourceMappingURL=schemas.js.map
|
package/dist/core/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/core/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/core/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,cAAc,CAAC"}
|
|
@@ -41,9 +41,9 @@ export declare const TerminalReasonSchema: z.ZodEnum<{
|
|
|
41
41
|
unknown_payment_identity: "unknown_payment_identity";
|
|
42
42
|
}>;
|
|
43
43
|
export declare const TerminalReasonCategorySchema: z.ZodEnum<{
|
|
44
|
+
relay: "relay";
|
|
44
45
|
validation: "validation";
|
|
45
46
|
sender: "sender";
|
|
46
|
-
relay: "relay";
|
|
47
47
|
settlement: "settlement";
|
|
48
48
|
replacement: "replacement";
|
|
49
49
|
identity: "identity";
|
|
@@ -130,9 +130,9 @@ export declare const TerminalReasonDetailSchema: z.ZodObject<{
|
|
|
130
130
|
unknown_payment_identity: "unknown_payment_identity";
|
|
131
131
|
}>;
|
|
132
132
|
category: z.ZodEnum<{
|
|
133
|
+
relay: "relay";
|
|
133
134
|
validation: "validation";
|
|
134
135
|
sender: "sender";
|
|
135
|
-
relay: "relay";
|
|
136
136
|
settlement: "settlement";
|
|
137
137
|
replacement: "replacement";
|
|
138
138
|
identity: "identity";
|
package/dist/http/schemas.d.ts
CHANGED
|
@@ -266,7 +266,6 @@ export declare const HttpSupportedResponseSchema: z.ZodObject<{
|
|
|
266
266
|
export declare const HttpPaymentStatusResponseSchema: z.ZodObject<{
|
|
267
267
|
paymentId: z.ZodString;
|
|
268
268
|
status: z.ZodEnum<{
|
|
269
|
-
submitted: "submitted";
|
|
270
269
|
queued: "queued";
|
|
271
270
|
broadcasting: "broadcasting";
|
|
272
271
|
mempool: "mempool";
|
|
@@ -279,6 +278,22 @@ export declare const HttpPaymentStatusResponseSchema: z.ZodObject<{
|
|
|
279
278
|
blockHeight: z.ZodOptional<z.ZodNumber>;
|
|
280
279
|
confirmedAt: z.ZodOptional<z.ZodString>;
|
|
281
280
|
explorerUrl: z.ZodOptional<z.ZodString>;
|
|
281
|
+
terminalReason: z.ZodOptional<z.ZodEnum<{
|
|
282
|
+
invalid_transaction: "invalid_transaction";
|
|
283
|
+
not_sponsored: "not_sponsored";
|
|
284
|
+
sender_nonce_stale: "sender_nonce_stale";
|
|
285
|
+
sender_nonce_gap: "sender_nonce_gap";
|
|
286
|
+
sender_nonce_duplicate: "sender_nonce_duplicate";
|
|
287
|
+
queue_unavailable: "queue_unavailable";
|
|
288
|
+
sponsor_failure: "sponsor_failure";
|
|
289
|
+
broadcast_failure: "broadcast_failure";
|
|
290
|
+
chain_abort: "chain_abort";
|
|
291
|
+
internal_error: "internal_error";
|
|
292
|
+
nonce_replacement: "nonce_replacement";
|
|
293
|
+
superseded: "superseded";
|
|
294
|
+
expired: "expired";
|
|
295
|
+
unknown_payment_identity: "unknown_payment_identity";
|
|
296
|
+
}>>;
|
|
282
297
|
error: z.ZodOptional<z.ZodString>;
|
|
283
298
|
errorCode: z.ZodOptional<z.ZodString>;
|
|
284
299
|
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -403,7 +418,6 @@ export declare const SupportedHttpResponseSchema: z.ZodObject<{
|
|
|
403
418
|
export declare const PaymentStatusHttpResponseSchema: z.ZodObject<{
|
|
404
419
|
paymentId: z.ZodString;
|
|
405
420
|
status: z.ZodEnum<{
|
|
406
|
-
submitted: "submitted";
|
|
407
421
|
queued: "queued";
|
|
408
422
|
broadcasting: "broadcasting";
|
|
409
423
|
mempool: "mempool";
|
|
@@ -416,6 +430,22 @@ export declare const PaymentStatusHttpResponseSchema: z.ZodObject<{
|
|
|
416
430
|
blockHeight: z.ZodOptional<z.ZodNumber>;
|
|
417
431
|
confirmedAt: z.ZodOptional<z.ZodString>;
|
|
418
432
|
explorerUrl: z.ZodOptional<z.ZodString>;
|
|
433
|
+
terminalReason: z.ZodOptional<z.ZodEnum<{
|
|
434
|
+
invalid_transaction: "invalid_transaction";
|
|
435
|
+
not_sponsored: "not_sponsored";
|
|
436
|
+
sender_nonce_stale: "sender_nonce_stale";
|
|
437
|
+
sender_nonce_gap: "sender_nonce_gap";
|
|
438
|
+
sender_nonce_duplicate: "sender_nonce_duplicate";
|
|
439
|
+
queue_unavailable: "queue_unavailable";
|
|
440
|
+
sponsor_failure: "sponsor_failure";
|
|
441
|
+
broadcast_failure: "broadcast_failure";
|
|
442
|
+
chain_abort: "chain_abort";
|
|
443
|
+
internal_error: "internal_error";
|
|
444
|
+
nonce_replacement: "nonce_replacement";
|
|
445
|
+
superseded: "superseded";
|
|
446
|
+
expired: "expired";
|
|
447
|
+
unknown_payment_identity: "unknown_payment_identity";
|
|
448
|
+
}>>;
|
|
419
449
|
error: z.ZodOptional<z.ZodString>;
|
|
420
450
|
errorCode: z.ZodOptional<z.ZodString>;
|
|
421
451
|
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/http/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/http/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,yBAAyB,wSAa5B,CAAC;AAEX,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;EAAoC,CAAC;AAE7E,eAAO,MAAM,oCAAoC;;;;iBAI/C,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;iBA4BnC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;iBAQvC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;iBAUpC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;iBAKxC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIlC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;iBAe9B,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;iBAM1C,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQ1C,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAGnC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;iBAgBnC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;iBAItC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAY1C,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA0B,CAAC;AAC/D,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAA2B,CAAC;AACjE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;iBAA2B,CAAC;AACjE,eAAO,MAAM,2BAA2B;;;;;;;;;iBAA8B,CAAC;AACvE,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAkC,CAAC"}
|
package/dist/http/schemas.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { TrackedPaymentStateSchema } from "../core/enums.js";
|
|
3
|
+
import { TerminalReasonSchema } from "../core/terminal-reasons.js";
|
|
3
4
|
import { AmountStringSchema, NonNegativeIntegerSchema, PaymentIdSchema, PositiveIntegerSchema, StacksAddressSchema, TransactionHexSchema, TransactionIdSchema, UrlSchema, } from "../core/primitives.js";
|
|
4
5
|
export const HTTP_SETTLE_ERROR_REASONS = [
|
|
5
6
|
"invalid_payload",
|
|
@@ -152,6 +153,7 @@ export const HttpPaymentStatusResponseSchema = z.object({
|
|
|
152
153
|
blockHeight: NonNegativeIntegerSchema.optional(),
|
|
153
154
|
confirmedAt: z.string().datetime({ offset: true }).optional(),
|
|
154
155
|
explorerUrl: UrlSchema.optional(),
|
|
156
|
+
terminalReason: TerminalReasonSchema.optional(),
|
|
155
157
|
error: z.string().min(1).optional(),
|
|
156
158
|
errorCode: z.string().min(1).optional(),
|
|
157
159
|
retryable: z.boolean().optional(),
|
package/dist/http/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/http/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,SAAS,GACV,MAAM,uBAAuB,CAAC;AAE/B,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,iBAAiB;IACjB,8BAA8B;IAC9B,iBAAiB;IACjB,oBAAoB;IACpB,2BAA2B;IAC3B,oBAAoB;IACpB,qBAAqB;IACrB,iBAAiB;IACjB,kBAAkB;IAClB,oBAAoB;IACpB,yBAAyB;IACzB,6BAA6B;CACrB,CAAC;AAEX,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;AAE7E,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,EAAE,EAAE,eAAe;KACpB,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,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C7C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACjC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC;AASH,MAAM,CAAC,MAAM,uBAAuB,GAAG,uBAAuB,CAAC;AAC/D,MAAM,CAAC,MAAM,wBAAwB,GAAG,wBAAwB,CAAC;AACjE,MAAM,CAAC,MAAM,wBAAwB,GAAG,wBAAwB,CAAC;AACjE,MAAM,CAAC,MAAM,2BAA2B,GAAG,2BAA2B,CAAC;AACvE,MAAM,CAAC,MAAM,+BAA+B,GAAG,+BAA+B,CAAC"}
|
package/dist/rpc/schemas.d.ts
CHANGED
|
@@ -71,12 +71,7 @@ export declare const RpcSubmitPaymentRequestSchema: z.ZodObject<{
|
|
|
71
71
|
export declare const RpcSubmitPaymentAcceptedSchema: z.ZodObject<{
|
|
72
72
|
accepted: z.ZodLiteral<true>;
|
|
73
73
|
paymentId: z.ZodString;
|
|
74
|
-
status: z.ZodUnion<readonly [z.
|
|
75
|
-
submitted: "submitted";
|
|
76
|
-
queued: "queued";
|
|
77
|
-
broadcasting: "broadcasting";
|
|
78
|
-
mempool: "mempool";
|
|
79
|
-
}>, z.ZodLiteral<"queued_with_warning">]>;
|
|
74
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<"queued">, z.ZodLiteral<"queued_with_warning">]>;
|
|
80
75
|
senderNonce: z.ZodOptional<z.ZodObject<{
|
|
81
76
|
provided: z.ZodNumber;
|
|
82
77
|
expected: z.ZodNumber;
|
|
@@ -130,12 +125,7 @@ export declare const RpcSubmitPaymentRejectedSchema: z.ZodObject<{
|
|
|
130
125
|
export declare const RpcSubmitPaymentResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
131
126
|
accepted: z.ZodLiteral<true>;
|
|
132
127
|
paymentId: z.ZodString;
|
|
133
|
-
status: z.ZodUnion<readonly [z.
|
|
134
|
-
submitted: "submitted";
|
|
135
|
-
queued: "queued";
|
|
136
|
-
broadcasting: "broadcasting";
|
|
137
|
-
mempool: "mempool";
|
|
138
|
-
}>, z.ZodLiteral<"queued_with_warning">]>;
|
|
128
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<"queued">, z.ZodLiteral<"queued_with_warning">]>;
|
|
139
129
|
senderNonce: z.ZodOptional<z.ZodObject<{
|
|
140
130
|
provided: z.ZodNumber;
|
|
141
131
|
expected: z.ZodNumber;
|
|
@@ -191,7 +181,6 @@ export declare const RpcCheckPaymentRequestSchema: z.ZodObject<{
|
|
|
191
181
|
export declare const RpcCheckPaymentResultSchema: z.ZodObject<{
|
|
192
182
|
paymentId: z.ZodString;
|
|
193
183
|
status: z.ZodEnum<{
|
|
194
|
-
submitted: "submitted";
|
|
195
184
|
queued: "queued";
|
|
196
185
|
broadcasting: "broadcasting";
|
|
197
186
|
mempool: "mempool";
|
|
@@ -204,6 +193,22 @@ export declare const RpcCheckPaymentResultSchema: z.ZodObject<{
|
|
|
204
193
|
blockHeight: z.ZodOptional<z.ZodNumber>;
|
|
205
194
|
confirmedAt: z.ZodOptional<z.ZodString>;
|
|
206
195
|
explorerUrl: z.ZodOptional<z.ZodString>;
|
|
196
|
+
terminalReason: z.ZodOptional<z.ZodEnum<{
|
|
197
|
+
invalid_transaction: "invalid_transaction";
|
|
198
|
+
not_sponsored: "not_sponsored";
|
|
199
|
+
sender_nonce_stale: "sender_nonce_stale";
|
|
200
|
+
sender_nonce_gap: "sender_nonce_gap";
|
|
201
|
+
sender_nonce_duplicate: "sender_nonce_duplicate";
|
|
202
|
+
queue_unavailable: "queue_unavailable";
|
|
203
|
+
sponsor_failure: "sponsor_failure";
|
|
204
|
+
broadcast_failure: "broadcast_failure";
|
|
205
|
+
chain_abort: "chain_abort";
|
|
206
|
+
internal_error: "internal_error";
|
|
207
|
+
nonce_replacement: "nonce_replacement";
|
|
208
|
+
superseded: "superseded";
|
|
209
|
+
expired: "expired";
|
|
210
|
+
unknown_payment_identity: "unknown_payment_identity";
|
|
211
|
+
}>>;
|
|
207
212
|
error: z.ZodOptional<z.ZodString>;
|
|
208
213
|
errorCode: z.ZodOptional<z.ZodEnum<{
|
|
209
214
|
INVALID_TRANSACTION: "INVALID_TRANSACTION";
|
|
@@ -238,12 +243,7 @@ export type RpcCheckPaymentResult = z.infer<typeof RpcCheckPaymentResultSchema>;
|
|
|
238
243
|
export declare const SubmitPaymentRpcResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
239
244
|
accepted: z.ZodLiteral<true>;
|
|
240
245
|
paymentId: z.ZodString;
|
|
241
|
-
status: z.ZodUnion<readonly [z.
|
|
242
|
-
submitted: "submitted";
|
|
243
|
-
queued: "queued";
|
|
244
|
-
broadcasting: "broadcasting";
|
|
245
|
-
mempool: "mempool";
|
|
246
|
-
}>, z.ZodLiteral<"queued_with_warning">]>;
|
|
246
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<"queued">, z.ZodLiteral<"queued_with_warning">]>;
|
|
247
247
|
senderNonce: z.ZodOptional<z.ZodObject<{
|
|
248
248
|
provided: z.ZodNumber;
|
|
249
249
|
expected: z.ZodNumber;
|
|
@@ -296,7 +296,6 @@ export declare const SubmitPaymentRpcResponseSchema: z.ZodDiscriminatedUnion<[z.
|
|
|
296
296
|
export declare const CheckPaymentRpcResponseSchema: z.ZodObject<{
|
|
297
297
|
paymentId: z.ZodString;
|
|
298
298
|
status: z.ZodEnum<{
|
|
299
|
-
submitted: "submitted";
|
|
300
299
|
queued: "queued";
|
|
301
300
|
broadcasting: "broadcasting";
|
|
302
301
|
mempool: "mempool";
|
|
@@ -309,6 +308,22 @@ export declare const CheckPaymentRpcResponseSchema: z.ZodObject<{
|
|
|
309
308
|
blockHeight: z.ZodOptional<z.ZodNumber>;
|
|
310
309
|
confirmedAt: z.ZodOptional<z.ZodString>;
|
|
311
310
|
explorerUrl: z.ZodOptional<z.ZodString>;
|
|
311
|
+
terminalReason: z.ZodOptional<z.ZodEnum<{
|
|
312
|
+
invalid_transaction: "invalid_transaction";
|
|
313
|
+
not_sponsored: "not_sponsored";
|
|
314
|
+
sender_nonce_stale: "sender_nonce_stale";
|
|
315
|
+
sender_nonce_gap: "sender_nonce_gap";
|
|
316
|
+
sender_nonce_duplicate: "sender_nonce_duplicate";
|
|
317
|
+
queue_unavailable: "queue_unavailable";
|
|
318
|
+
sponsor_failure: "sponsor_failure";
|
|
319
|
+
broadcast_failure: "broadcast_failure";
|
|
320
|
+
chain_abort: "chain_abort";
|
|
321
|
+
internal_error: "internal_error";
|
|
322
|
+
nonce_replacement: "nonce_replacement";
|
|
323
|
+
superseded: "superseded";
|
|
324
|
+
expired: "expired";
|
|
325
|
+
unknown_payment_identity: "unknown_payment_identity";
|
|
326
|
+
}>>;
|
|
312
327
|
error: z.ZodOptional<z.ZodString>;
|
|
313
328
|
errorCode: z.ZodOptional<z.ZodEnum<{
|
|
314
329
|
INVALID_TRANSACTION: "INVALID_TRANSACTION";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/rpc/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/rpc/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,eAAe,oWAiBlB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;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
1
|
import { z } from "zod";
|
|
2
2
|
import { InFlightPaymentStateSchema, TrackedPaymentStateSchema } from "../core/enums.js";
|
|
3
|
+
import { TerminalReasonSchema } from "../core/terminal-reasons.js";
|
|
3
4
|
import { AmountStringSchema, NonNegativeIntegerSchema, PaymentIdSchema, PositiveIntegerSchema, StacksAddressSchema, TransactionHexSchema, TransactionIdSchema, UrlSchema, } from "../core/primitives.js";
|
|
4
5
|
export const RPC_ERROR_CODES = [
|
|
5
6
|
"INVALID_TRANSACTION",
|
|
@@ -53,7 +54,7 @@ export const RpcSubmitPaymentRequestSchema = z.object({
|
|
|
53
54
|
export const RpcSubmitPaymentAcceptedSchema = z.object({
|
|
54
55
|
accepted: z.literal(true),
|
|
55
56
|
paymentId: PaymentIdSchema,
|
|
56
|
-
status: z.union([
|
|
57
|
+
status: z.union([z.literal("queued"), z.literal("queued_with_warning")]),
|
|
57
58
|
senderNonce: RpcSenderNonceInfoSchema.optional(),
|
|
58
59
|
warning: RpcSubmitPaymentWarningSchema.optional(),
|
|
59
60
|
checkStatusUrl: UrlSchema.optional(),
|
|
@@ -81,6 +82,7 @@ export const RpcCheckPaymentResultSchema = z.object({
|
|
|
81
82
|
blockHeight: NonNegativeIntegerSchema.optional(),
|
|
82
83
|
confirmedAt: z.string().datetime({ offset: true }).optional(),
|
|
83
84
|
explorerUrl: UrlSchema.optional(),
|
|
85
|
+
terminalReason: TerminalReasonSchema.optional(),
|
|
84
86
|
error: z.string().min(1).optional(),
|
|
85
87
|
errorCode: RpcErrorCodeSchema.optional(),
|
|
86
88
|
retryable: z.boolean().optional(),
|
package/dist/rpc/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/rpc/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC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,eAAe,EAAE,wBAAwB,CAAC,QAAQ,EAAE;CACrD,CAAC,CAAC;AAOH,MAAM,CAAC,MAAM,8BAA8B,GAAG,4BAA4B,CAAC;AAC3E,MAAM,CAAC,MAAM,6BAA6B,GAAG,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Boring State Machine Contract: Phase 1 Packet
|
|
2
|
+
|
|
3
|
+
This document is the phase 1 coordination packet for the `2026-04-01-boring-tx-state-machine` quest.
|
|
4
|
+
|
|
5
|
+
It freezes the canonical contract that downstream repos should consume before relay and service migrations continue.
|
|
6
|
+
|
|
7
|
+
Companion document:
|
|
8
|
+
|
|
9
|
+
- see `docs/workers-baseline.md` for the default Cloudflare Worker transport split, repo baseline, observability policy, and product-convention expectations that should accompany this contract
|
|
10
|
+
|
|
11
|
+
## Canonical Caller-Facing States
|
|
12
|
+
|
|
13
|
+
The shared public state machine is:
|
|
14
|
+
|
|
15
|
+
`requires_payment -> queued -> broadcasting -> mempool -> confirmed | failed | replaced | not_found`
|
|
16
|
+
|
|
17
|
+
Notes:
|
|
18
|
+
|
|
19
|
+
- `submitted` is allowed only as an internal relay observability step.
|
|
20
|
+
- RPC and HTTP adapters must collapse any internal `submitted` step into `queued` before returning caller-facing data.
|
|
21
|
+
- `confirmed` is the only default deliverable state.
|
|
22
|
+
|
|
23
|
+
## Identity and Duplicate Handling
|
|
24
|
+
|
|
25
|
+
- `paymentId` is relay-owned.
|
|
26
|
+
- Duplicate submission of the same already-known payment artifact should reuse the same `paymentId` until that payment reaches a terminal state.
|
|
27
|
+
- Internal and external polling should both treat `paymentId` as the stable handle for in-flight and terminal lookup.
|
|
28
|
+
|
|
29
|
+
## Terminal Outcome Contract
|
|
30
|
+
|
|
31
|
+
Polling and status responses should expose:
|
|
32
|
+
|
|
33
|
+
- canonical `status`
|
|
34
|
+
- relay-owned `paymentId`
|
|
35
|
+
- normalized `terminalReason` when the outcome is terminal and known
|
|
36
|
+
- transport-local `errorCode` only as an adapter detail, not as the semantic source of truth
|
|
37
|
+
|
|
38
|
+
Normalized terminal reasons let `landing-page`, `agent-news`, `x402-api`, `skills`, and `aibtc-mcp-server` stop inventing their own retry buckets from raw relay error strings.
|
|
39
|
+
|
|
40
|
+
## Recovery Boundary
|
|
41
|
+
|
|
42
|
+
Sender-owned responsibilities:
|
|
43
|
+
|
|
44
|
+
- sender nonce correctness
|
|
45
|
+
- rebuild after sender nonce stale or gap
|
|
46
|
+
- sender-wallet recovery actions
|
|
47
|
+
|
|
48
|
+
Relay-owned responsibilities:
|
|
49
|
+
|
|
50
|
+
- payment identity lifecycle
|
|
51
|
+
- sponsor ordering and sponsor nonce recovery
|
|
52
|
+
- in-flight payment transitions
|
|
53
|
+
- terminal settlement truth
|
|
54
|
+
|
|
55
|
+
## Compatibility Notes
|
|
56
|
+
|
|
57
|
+
- `RpcSubmitPaymentAccepted.status` should return `queued` for normal acceptance and `queued_with_warning` only as a temporary compatibility shim while warning-aware callers migrate.
|
|
58
|
+
- `RpcCheckPaymentResult.status` and `HttpPaymentStatusResponse.status` must never return `submitted`.
|
|
59
|
+
- `terminalReason` is additive and should be emitted wherever relay adapters already know the normalized terminal classification.
|
|
60
|
+
|
|
61
|
+
## Migration Order
|
|
62
|
+
|
|
63
|
+
1. `tx-schemas`: freeze the public contract and publish additive fields.
|
|
64
|
+
2. `x402-sponsor-relay`: collapse caller-facing `submitted` into `queued`, emit normalized `terminalReason`, and preserve duplicate reuse by `paymentId`.
|
|
65
|
+
3. `landing-page`, `agent-news`, `x402-api`: consume shared RPC/HTTP schemas and delete copied contract types.
|
|
66
|
+
4. `skills`, `aibtc-mcp-server`: converge on one external client retry and recovery matrix driven by shared statuses and terminal reasons.
|
|
67
|
+
|
|
68
|
+
## Scenario Matrix
|
|
69
|
+
|
|
70
|
+
| Scenario | Canonical status | terminalReason | Service delivery default | Client action |
|
|
71
|
+
| --- | --- | --- | --- | --- |
|
|
72
|
+
| Fresh submission accepted | `queued` | | wait or poll by `paymentId` | no rebuild |
|
|
73
|
+
| Duplicate same submission | `queued` or later existing status | | do not create a second receipt | reuse same `paymentId` / same tx |
|
|
74
|
+
| Relay broadcasting | `broadcasting` | | do not deliver by default | poll |
|
|
75
|
+
| Seen in mempool | `mempool` | | do not deliver by default unless route exception is documented | poll |
|
|
76
|
+
| Confirmed on-chain | `confirmed` | | deliver | success |
|
|
77
|
+
| Sender nonce stale | `failed` | `sender_nonce_stale` | do not deliver | rebuild transaction |
|
|
78
|
+
| Sender nonce gap | `failed` | `sender_nonce_gap` | do not deliver | rebuild or submit missing nonce |
|
|
79
|
+
| Invalid transaction | `failed` | `invalid_transaction` | do not deliver | stop |
|
|
80
|
+
| Sponsor/relay internal failure | `failed` | `queue_unavailable`, `sponsor_failure`, or `internal_error` | do not deliver | bounded retry only if adapter marks retryable |
|
|
81
|
+
| Broadcast failure | `failed` | `broadcast_failure` or `chain_abort` | do not deliver | treat as failed; rebuild only if caller owns sender recovery |
|
|
82
|
+
| Nonce replacement | `replaced` | `nonce_replacement` or `superseded` | do not deliver | stop polling old `paymentId`; decide next client action explicitly |
|
|
83
|
+
| Missing or expired identity | `not_found` | `expired` or `unknown_payment_identity` | do not deliver | stop or restart from a new payment flow |
|
package/docs/package-schemas.md
CHANGED
|
@@ -41,12 +41,16 @@ RPC and HTTP may not redefine:
|
|
|
41
41
|
The approval spec establishes these package-level semantics:
|
|
42
42
|
|
|
43
43
|
- `confirmed` is the only canonical terminal-success state.
|
|
44
|
-
- `
|
|
44
|
+
- `queued`, `broadcasting`, and `mempool` are in-flight states.
|
|
45
|
+
- `submitted` may still exist inside relay internals, but it is not part of the shared caller-facing contract.
|
|
45
46
|
- `failed`, `replaced`, and `not_found` are terminal-failure states.
|
|
46
47
|
- resource delivery during in-flight states is transport/product policy, not a new domain state
|
|
48
|
+
- duplicate submission should reuse the same relay-owned `paymentId` until that payment reaches a terminal state
|
|
49
|
+
- polling/status adapters should emit canonical `terminalReason` values when they know the terminal outcome
|
|
47
50
|
|
|
48
51
|
## Documented Assumptions
|
|
49
52
|
|
|
50
53
|
- Terminal reasons are normalized from the repo docs into stable package enums. Current relay/service error codes stay transport-specific in `rpc`.
|
|
51
54
|
- `paymentId` is treated as a relay-owned identifier with a `pay_` prefix because first-party polling endpoints require that prefix.
|
|
55
|
+
- Sender-wallet nonce repair belongs to clients; sponsor ordering and sponsor-wallet recovery belong to the relay.
|
|
52
56
|
- Address and URL primitives are intentionally light-touch. This package validates shared API schemas, not chain-specific checksum rules.
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# Workers Baseline For `@aibtc/tx-schemas` Consumers
|
|
2
|
+
|
|
3
|
+
This document is a companion to the `@aibtc/tx-schemas` package and the boring transaction state machine contract.
|
|
4
|
+
|
|
5
|
+
It defines the default Cloudflare Worker usage model we expect first-party repos to follow while consuming the shared payment schemas.
|
|
6
|
+
|
|
7
|
+
The goal is to reduce cross-repo drift without forcing every repo into the same storage engine or app architecture.
|
|
8
|
+
|
|
9
|
+
## Package Role
|
|
10
|
+
|
|
11
|
+
- `@aibtc/tx-schemas` is the schema and semantics anchor.
|
|
12
|
+
- It defines the caller-facing payment contract, not the relay runtime, not a Stacks.js wrapper, and not a generic Worker framework.
|
|
13
|
+
- `x402-sponsor-relay` remains the payment domain owner for payment identity, in-flight status, and terminal settlement truth.
|
|
14
|
+
- First-party apps and clients should adapt their Worker code to this package instead of copying relay-local types.
|
|
15
|
+
|
|
16
|
+
## Transport Split
|
|
17
|
+
|
|
18
|
+
Use this split by default:
|
|
19
|
+
|
|
20
|
+
- first-party Workers inside the AIBTC Cloudflare account should use the `x402-sponsor-relay` Service Binding with RPC for synchronous internal payment operations
|
|
21
|
+
- external agents and non-first-party consumers should use the relay's public HTTP interface
|
|
22
|
+
- `x402-api` stays on HTTP during the current stabilization rollout; future RPC migration is follow-up work, not part of this baseline
|
|
23
|
+
|
|
24
|
+
Rationale:
|
|
25
|
+
|
|
26
|
+
- RPC service bindings are the boring internal path for first-party Workers because they avoid public URL hops and keep the relay contract inside the account boundary
|
|
27
|
+
- HTTP remains the stable integration surface for agents, third parties, and any consumer that cannot rely on internal account bindings
|
|
28
|
+
|
|
29
|
+
## Repo Baseline
|
|
30
|
+
|
|
31
|
+
These defaults should be kept aligned across first-party Worker repos unless a repo has a concrete reason to diverge:
|
|
32
|
+
|
|
33
|
+
- use `wrangler.jsonc` as the primary Worker config file
|
|
34
|
+
- stay on Wrangler v4
|
|
35
|
+
- keep a current `compatibility_date` and bump it intentionally instead of letting it drift indefinitely
|
|
36
|
+
- use `nodejs_compat_v2` by default unless a repo has a specific compatibility reason not to
|
|
37
|
+
- keep standard environment names: `staging` and `production`
|
|
38
|
+
- prefer standard binding names for shared infrastructure:
|
|
39
|
+
- `LOGS` for the `worker-logs` Service Binding
|
|
40
|
+
- `X402_RELAY` for the relay Service Binding when the repo is a first-party app using RPC
|
|
41
|
+
- generate and check Worker env types in each repo so binding drift is caught in review rather than at runtime
|
|
42
|
+
|
|
43
|
+
Drift is natural. Silent drift is the problem.
|
|
44
|
+
|
|
45
|
+
## Observability Baseline
|
|
46
|
+
|
|
47
|
+
For this rollout, first-party Worker repos should standardize on:
|
|
48
|
+
|
|
49
|
+
- `worker-logs` as the shared logging path
|
|
50
|
+
- Worker `observability` disabled in repo configs
|
|
51
|
+
|
|
52
|
+
Rationale:
|
|
53
|
+
|
|
54
|
+
- prior attempts to compile and compare data cleanly across multiple Workers through Cloudflare observability have been operationally noisy
|
|
55
|
+
- `worker-logs` is already the shared cross-worker path in the AIBTC repos
|
|
56
|
+
|
|
57
|
+
This means:
|
|
58
|
+
|
|
59
|
+
- keep the `LOGS` binding in first-party Worker repos
|
|
60
|
+
- disable Worker observability flags unless there is an explicit exception with a concrete operational reason
|
|
61
|
+
- do not treat native observability as part of the payment contract rollout
|
|
62
|
+
|
|
63
|
+
## Product Conventions
|
|
64
|
+
|
|
65
|
+
Use the Cloudflare product surface this way by default:
|
|
66
|
+
|
|
67
|
+
1. Service Bindings with RPC
|
|
68
|
+
- for synchronous first-party Worker-to-Worker calls
|
|
69
|
+
- especially app -> relay calls inside the same Cloudflare account
|
|
70
|
+
2. HTTP endpoints
|
|
71
|
+
- for external agents and public consumers
|
|
72
|
+
- for `x402-api` during the current stabilization phase
|
|
73
|
+
3. Queues
|
|
74
|
+
- for simple asynchronous background work and buffering
|
|
75
|
+
- especially where serialization is part of correctness, such as relay payment processing
|
|
76
|
+
4. Durable Objects
|
|
77
|
+
- for per-key ownership, coordination, or app-local state
|
|
78
|
+
- not as a requirement that every app share the same storage pattern
|
|
79
|
+
- avoid turning DOs into a cross-app staging default, since locality and cold-start placement can produce different latency tradeoffs depending on where callers are coming from
|
|
80
|
+
5. Workflows
|
|
81
|
+
- not part of the baseline for this rollout
|
|
82
|
+
- current flows are simple enough that Workflows would add churn without solving the main coordination problem
|
|
83
|
+
|
|
84
|
+
## Smart Placement
|
|
85
|
+
|
|
86
|
+
Smart Placement is not part of the baseline.
|
|
87
|
+
|
|
88
|
+
- keep it only where it has a measured benefit
|
|
89
|
+
- remove it where it adds complexity or false confidence
|
|
90
|
+
- do not assume it improves relay RPC usage automatically
|
|
91
|
+
|
|
92
|
+
Repos may still opt into it for repo-specific fetch-heavy behavior, but it should not be treated as part of the shared payment contract.
|
|
93
|
+
|
|
94
|
+
## Confirmed-Only Staging
|
|
95
|
+
|
|
96
|
+
Confirmed-only staging should stay app-local by default.
|
|
97
|
+
|
|
98
|
+
- `landing-page` and `agent-news` should keep provisional staging in app-owned storage keyed by relay-owned `paymentId`
|
|
99
|
+
- pending states mean staged but not finalized
|
|
100
|
+
- finalize exactly once on `confirmed`
|
|
101
|
+
- discard or expire on `failed`, `replaced`, or `not_found`
|
|
102
|
+
|
|
103
|
+
Do not move this into a relay-owned generic holding tank by default.
|
|
104
|
+
|
|
105
|
+
Rationale:
|
|
106
|
+
|
|
107
|
+
- staging payload shape is product-specific
|
|
108
|
+
- future apps may need different provisional storage and cleanup behavior
|
|
109
|
+
- centralizing staging in the relay too early would increase coupling before the shared shape is proven
|
|
110
|
+
|
|
111
|
+
Possible future follow-up:
|
|
112
|
+
|
|
113
|
+
- if several first-party apps converge on the same staged-record lifecycle and payload envelope, the relay may later define a narrower handoff contract around payment success notifications
|
|
114
|
+
- that is not required for the current stabilization work
|
|
115
|
+
|
|
116
|
+
## Source Of Truth Boundaries
|
|
117
|
+
|
|
118
|
+
- relay owns payment identity, duplicate reuse, public status projection, and terminal settlement truth
|
|
119
|
+
- app Workers own product-specific staged data, delivery timing, and final side effects
|
|
120
|
+
- clients own sender-side rebuild actions when terminal reasons indicate sender nonce problems
|
|
121
|
+
|
|
122
|
+
These boundaries are intentionally boring. Keep them boring.
|
|
123
|
+
|
|
124
|
+
## Shared Sponsor Pool Operating Policy
|
|
125
|
+
|
|
126
|
+
The relay currently uses one shared sponsor wallet pool for x402 settlements and other sponsored transaction flows.
|
|
127
|
+
|
|
128
|
+
That is acceptable for this rollout as long as the relay preserves forward progress.
|
|
129
|
+
|
|
130
|
+
Operational rules:
|
|
131
|
+
|
|
132
|
+
- tx type does not matter to sponsor wallets; validity and nonce progression do
|
|
133
|
+
- no single sender may stall unrelated senders or the shared sponsor pool
|
|
134
|
+
- sender uncertainty must stay sender-local whenever possible
|
|
135
|
+
- sponsor-side congestion is relay-owned and should be recovered aggressively
|
|
136
|
+
|
|
137
|
+
Sender-side policy:
|
|
138
|
+
|
|
139
|
+
- if the relay can prove a sender tx is no longer valid, it should fail fast
|
|
140
|
+
- if the relay observes a later confirmed sender nonce, older pending sender nonces become terminal and should not keep occupying dispatchable paths
|
|
141
|
+
- if a sender tx may become valid later, it may remain held in sender-local state, but it must not poison global sponsor progress
|
|
142
|
+
- sender-side `TooMuchChaining` should be treated as an immediate sender failure for the current attempt; sender-local future handling is acceptable, but not global blocking
|
|
143
|
+
|
|
144
|
+
Sponsor-side policy:
|
|
145
|
+
|
|
146
|
+
- sponsor-side `TooMuchChaining` should be treated as abnormal relay congestion, not normal steady-state behavior
|
|
147
|
+
- if a sponsor wallet is not making forward progress for minutes rather than block-scale seconds, the relay should trigger automated recovery
|
|
148
|
+
- recovery should prefer a bounded ladder:
|
|
149
|
+
- resync
|
|
150
|
+
- replay/head-bump/gap-fill
|
|
151
|
+
- flush-wallet only as last resort
|
|
152
|
+
- the relay should prefer local intent/state and bounded inference over repeated hot-path Hiro lookups
|
|
153
|
+
|
|
154
|
+
Health definition:
|
|
155
|
+
|
|
156
|
+
- relay health means sponsor wallets keep moving transactions through the system
|
|
157
|
+
- queue depth alone is not a health definition
|
|
158
|
+
- forward progress matters more than explaining every pending tx in real time
|
|
159
|
+
|
|
160
|
+
Practical implication:
|
|
161
|
+
|
|
162
|
+
- mixed x402 and non-x402 traffic may share capacity, but neither flow should be able to corrupt the other's payment semantics or stall global sponsor progress because of one bad sender
|
|
163
|
+
|
|
164
|
+
## Current Default Matrix
|
|
165
|
+
|
|
166
|
+
| Consumer type | Default relay transport | Poll/status transport | Delivery/staging owner |
|
|
167
|
+
| --- | --- | --- | --- |
|
|
168
|
+
| First-party app Worker | Service Binding RPC | Service Binding RPC or app HTTP adapter | app-local |
|
|
169
|
+
| External agent consumer | HTTP | HTTP | consumer-local |
|
|
170
|
+
| `x402-api` during stabilization | HTTP | HTTP | service-local |
|
|
171
|
+
|
|
172
|
+
## Open Follow-Ups
|
|
173
|
+
|
|
174
|
+
- Should we add a small shared checklist for Worker repo bootstrap so `wrangler.jsonc`, binding names, generated env types, and `LOGS` setup start consistent?
|
|
175
|
+
- Should `x402-api` move to relay RPC after the package and repo baselines settle?
|
|
176
|
+
- If several apps converge on the same confirmed-only staging record shape, is there enough evidence to standardize a relay-to-app success handoff later?
|
|
@@ -68,14 +68,13 @@ All other repos consume that model. They do not redefine it.
|
|
|
68
68
|
|
|
69
69
|
### Canonical Payment States
|
|
70
70
|
|
|
71
|
-
The shared payment lifecycle is:
|
|
71
|
+
The shared caller-facing payment lifecycle is:
|
|
72
72
|
|
|
73
|
-
`requires_payment ->
|
|
73
|
+
`requires_payment -> queued -> broadcasting -> mempool -> confirmed | failed | replaced | not_found`
|
|
74
74
|
|
|
75
75
|
These states mean:
|
|
76
76
|
|
|
77
77
|
- `requires_payment`: protected resource requires proof of payment
|
|
78
|
-
- `submitted`: relay accepted a submission request and assigned identity
|
|
79
78
|
- `queued`: accepted but not yet broadcasting
|
|
80
79
|
- `broadcasting`: relay is actively attempting sponsor/broadcast work
|
|
81
80
|
- `mempool`: transaction accepted by node/network and awaiting finality
|
|
@@ -84,12 +83,14 @@ These states mean:
|
|
|
84
83
|
- `replaced`: terminal failure caused by nonce replacement or supersession
|
|
85
84
|
- `not_found`: missing, expired, or unknown payment identity
|
|
86
85
|
|
|
86
|
+
Relay internals may retain a richer acceptance step such as `submitted`, but that state is internal-only and must be collapsed into `queued` before it reaches shared caller-facing contracts.
|
|
87
|
+
|
|
87
88
|
### Canonical State Categories
|
|
88
89
|
|
|
89
90
|
Every state must fit one category:
|
|
90
91
|
|
|
91
92
|
- pre-payment: `requires_payment`
|
|
92
|
-
- in-flight: `
|
|
93
|
+
- in-flight: `queued`, `broadcasting`, `mempool`
|
|
93
94
|
- terminal-success: `confirmed`
|
|
94
95
|
- terminal-failure: `failed`, `replaced`, `not_found`
|
|
95
96
|
|
|
@@ -268,6 +269,7 @@ At minimum, all consumers must converge on:
|
|
|
268
269
|
- one `PaymentState` enum
|
|
269
270
|
- one `PaymentStateCategory` mapping
|
|
270
271
|
- one `PaymentTerminalReason` or equivalent error taxonomy
|
|
272
|
+
- one relay-owned `paymentId` identity contract with duplicate-submission reuse semantics
|
|
271
273
|
- one settlement response shape for `HTTP`
|
|
272
274
|
- one settlement response shape for `RPC`
|
|
273
275
|
- one rule set for which states permit resource delivery
|
|
@@ -414,7 +416,7 @@ Approval requires automated tests that enforce the architecture, not just the im
|
|
|
414
416
|
### State Transition Tests
|
|
415
417
|
|
|
416
418
|
- invalid transitions are rejected
|
|
417
|
-
- `
|
|
419
|
+
- `queued -> broadcasting -> mempool -> confirmed` is accepted
|
|
418
420
|
- `mempool -> replaced` is accepted
|
|
419
421
|
- `failed -> confirmed` is rejected
|
|
420
422
|
- `replaced -> confirmed` is rejected
|
|
@@ -82,22 +82,23 @@ stateDiagram-v2
|
|
|
82
82
|
RpcSubmit --> PollPaymentId: submitPayment accepted=true + paymentId
|
|
83
83
|
|
|
84
84
|
PollPaymentId --> DeliverConfirmed: checkPayment=confirmed
|
|
85
|
-
PollPaymentId -->
|
|
86
|
-
PollPaymentId -->
|
|
85
|
+
PollPaymentId --> StagePending: checkPayment=queued/broadcasting/mempool
|
|
86
|
+
PollPaymentId --> StagePending: poll exhausted with queued/broadcasting/mempool
|
|
87
87
|
PollPaymentId --> RelayRejected: checkPayment=failed
|
|
88
88
|
PollPaymentId --> RelayRejected: checkPayment=replaced
|
|
89
89
|
PollPaymentId --> RelayRejected: checkPayment=not_found
|
|
90
90
|
PollPaymentId --> RelayUnavailable: RPC error / circuit breaker
|
|
91
91
|
|
|
92
92
|
HttpSettle --> DeliverConfirmed: relay returns confirmed
|
|
93
|
-
HttpSettle -->
|
|
93
|
+
HttpSettle --> StagePending: relay returns pending
|
|
94
94
|
HttpSettle --> RelayRejected: 4xx settle rejection
|
|
95
95
|
HttpSettle --> RelayUnavailable: 5xx / timeout
|
|
96
96
|
|
|
97
97
|
DeliverConfirmed --> StoreResource
|
|
98
|
-
|
|
98
|
+
StagePending --> PendingResponse
|
|
99
99
|
|
|
100
100
|
StoreResource --> SuccessResponse
|
|
101
|
+
PendingResponse --> [*]
|
|
101
102
|
SuccessResponse --> [*]
|
|
102
103
|
|
|
103
104
|
RelayRejected --> ErrorResponse
|
|
@@ -107,8 +108,8 @@ stateDiagram-v2
|
|
|
107
108
|
|
|
108
109
|
What the service returns:
|
|
109
110
|
|
|
110
|
-
- `confirmed
|
|
111
|
-
- `pending`: resource is
|
|
111
|
+
- `confirmed`: resource is delivered normally.
|
|
112
|
+
- `queued`, `broadcasting`, `mempool`, or coarse `pending`: resource is not delivered by default; the service may stage provisional data keyed by `paymentId` and return polling instructions.
|
|
112
113
|
- `failed`, `replaced`, `not_found`, or relay unavailability: request fails.
|
|
113
114
|
|
|
114
115
|
## 3. Relay Queue Payment State Machine: `x402-sponsor-relay` RPC path
|
|
@@ -117,10 +118,11 @@ This is the async `paymentId` lifecycle behind `submitPayment()` and `checkPayme
|
|
|
117
118
|
|
|
118
119
|
```mermaid
|
|
119
120
|
stateDiagram-v2
|
|
120
|
-
[*] -->
|
|
121
|
+
[*] --> Accepted
|
|
121
122
|
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
Accepted --> Queued: paymentId created + KV record written + queue send ok
|
|
124
|
+
Accepted --> Queued: exact duplicate of already-known payment reuses existing paymentId
|
|
125
|
+
Accepted --> Failed: invalid tx / not sponsored / stale nonce / conflicting same-nonce replacement
|
|
124
126
|
|
|
125
127
|
Queued --> Broadcasting: queue consumer starts work
|
|
126
128
|
Queued --> Queued: held sender nonce gap
|
|
@@ -143,10 +145,14 @@ stateDiagram-v2
|
|
|
143
145
|
|
|
144
146
|
Stored `paymentId` statuses exposed by `checkPayment()`:
|
|
145
147
|
|
|
146
|
-
- Pending/in-flight: `queued`, `
|
|
148
|
+
- Pending/in-flight: `queued`, `broadcasting`, `mempool`
|
|
147
149
|
- Terminal: `confirmed`, `failed`, `replaced`
|
|
148
150
|
- Missing/expired: `not_found`
|
|
149
151
|
|
|
152
|
+
The relay may still track a more detailed internal acceptance/submission step, but caller-facing RPC and HTTP contracts should collapse that into `queued`.
|
|
153
|
+
|
|
154
|
+
Duplicate sender nonce is not always a terminal outcome. Exact replay of the same already-known signed payment should converge on the existing `paymentId`, while a same-nonce different-tx conflict remains a rejection/failure path.
|
|
155
|
+
|
|
150
156
|
## 4. Direct Relay Settlement State Machine: `/settle` to Hiro final status
|
|
151
157
|
|
|
152
158
|
This is the synchronous/native settlement flow used by the relay itself when handling direct `/settle` or `/relay` style settlement logic.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aibtc/tx-schemas",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Shared zod schemas for AIBTC transaction states, internal relay schemas, and external x402 payment schemas.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -56,7 +56,9 @@
|
|
|
56
56
|
"files": [
|
|
57
57
|
"dist",
|
|
58
58
|
"README.md",
|
|
59
|
+
"docs/boring-state-machine-contract.md",
|
|
59
60
|
"docs/package-schemas.md",
|
|
61
|
+
"docs/workers-baseline.md",
|
|
60
62
|
"docs/x402-approval-spec.md",
|
|
61
63
|
"docs/x402-state-machines.md",
|
|
62
64
|
"LICENSE"
|