@compose-market/sdk 0.8.28 → 0.8.31
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/dist/http.d.ts +5 -102
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +5 -418
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -28
- package/dist/index.js.map +1 -1
- package/dist/resources/accounts.d.ts.map +1 -1
- package/dist/resources/accounts.js +11 -25
- package/dist/resources/accounts.js.map +1 -1
- package/dist/resources/agent.d.ts +20 -2
- package/dist/resources/agent.d.ts.map +1 -1
- package/dist/resources/agent.js +116 -51
- package/dist/resources/agent.js.map +1 -1
- package/dist/resources/channels.d.ts.map +1 -1
- package/dist/resources/channels.js +4 -10
- package/dist/resources/channels.js.map +1 -1
- package/dist/resources/directory.d.ts +3 -0
- package/dist/resources/directory.d.ts.map +1 -1
- package/dist/resources/directory.js +1 -1
- package/dist/resources/directory.js.map +1 -1
- package/dist/resources/gated.d.ts +27 -0
- package/dist/resources/gated.d.ts.map +1 -0
- package/dist/resources/gated.js +99 -0
- package/dist/resources/gated.js.map +1 -0
- package/dist/resources/inference.d.ts.map +1 -1
- package/dist/resources/inference.js +1 -17
- package/dist/resources/inference.js.map +1 -1
- package/dist/resources/local.d.ts.map +1 -1
- package/dist/resources/local.js +11 -25
- package/dist/resources/local.js.map +1 -1
- package/dist/resources/permissions.d.ts.map +1 -1
- package/dist/resources/permissions.js +7 -21
- package/dist/resources/permissions.js.map +1 -1
- package/dist/resources/shared.d.ts +39 -0
- package/dist/resources/shared.d.ts.map +1 -0
- package/dist/resources/shared.js +56 -0
- package/dist/resources/shared.js.map +1 -0
- package/dist/resources/workflow.d.ts.map +1 -1
- package/dist/resources/workflow.js +1 -24
- package/dist/resources/workflow.js.map +1 -1
- package/dist/resources/x402.d.ts +7 -0
- package/dist/resources/x402.d.ts.map +1 -1
- package/dist/resources/x402.js +9 -2
- package/dist/resources/x402.js.map +1 -1
- package/dist/storage.d.ts +3 -21
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +3 -41
- package/dist/storage.js.map +1 -1
- package/dist/types/index.d.ts +195 -116
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/generated/channels/esm/lib/config.d.ts +3 -3
- package/generated/channels/esm/lib/config.js +3 -3
- package/generated/channels/package.json +1 -1
- package/generated/channels/src/lib/config.ts +3 -3
- package/generated/inference/esm/lib/config.d.ts +3 -3
- package/generated/inference/esm/lib/config.js +3 -3
- package/generated/inference/package.json +1 -1
- package/generated/inference/src/lib/config.ts +3 -3
- package/generated/manowar/esm/funcs/agents-approval-decide.d.ts +14 -0
- package/generated/manowar/esm/funcs/agents-approval-decide.d.ts.map +1 -0
- package/generated/manowar/esm/funcs/agents-approval-decide.js +88 -0
- package/generated/manowar/esm/funcs/agents-approval-decide.js.map +1 -0
- package/generated/manowar/esm/funcs/agents-run-stop.d.ts +11 -0
- package/generated/manowar/esm/funcs/agents-run-stop.d.ts.map +1 -0
- package/generated/manowar/esm/funcs/agents-run-stop.js +84 -0
- package/generated/manowar/esm/funcs/agents-run-stop.js.map +1 -0
- package/generated/manowar/esm/lib/config.d.ts +4 -4
- package/generated/manowar/esm/lib/config.js +4 -4
- package/generated/manowar/esm/models/agent-approval-request.d.ts +33 -0
- package/generated/manowar/esm/models/agent-approval-request.d.ts.map +1 -0
- package/generated/manowar/esm/models/agent-approval-request.js +25 -0
- package/generated/manowar/esm/models/agent-approval-request.js.map +1 -0
- package/generated/manowar/esm/models/agent-card.d.ts +73 -0
- package/generated/manowar/esm/models/agent-card.d.ts.map +1 -0
- package/generated/manowar/esm/models/agent-card.js +45 -0
- package/generated/manowar/esm/models/agent-card.js.map +1 -0
- package/generated/manowar/esm/models/agent-connector-tool.d.ts +26 -0
- package/generated/manowar/esm/models/agent-connector-tool.d.ts.map +1 -0
- package/generated/manowar/esm/models/agent-connector-tool.js +15 -0
- package/generated/manowar/esm/models/agent-connector-tool.js.map +1 -0
- package/generated/manowar/esm/models/agent-connector.d.ts +27 -0
- package/generated/manowar/esm/models/agent-connector.d.ts.map +1 -0
- package/generated/manowar/esm/models/agent-connector.js +22 -0
- package/generated/manowar/esm/models/agent-connector.js.map +1 -0
- package/generated/manowar/esm/models/agent-stream-request.d.ts +48 -0
- package/generated/manowar/esm/models/agent-stream-request.d.ts.map +1 -1
- package/generated/manowar/esm/models/agent-stream-request.js +29 -0
- package/generated/manowar/esm/models/agent-stream-request.js.map +1 -1
- package/generated/manowar/esm/models/index.d.ts +4 -0
- package/generated/manowar/esm/models/index.d.ts.map +1 -1
- package/generated/manowar/esm/models/index.js +4 -0
- package/generated/manowar/esm/models/index.js.map +1 -1
- package/generated/manowar/esm/models/operations/approval-decide.d.ts +24 -0
- package/generated/manowar/esm/models/operations/approval-decide.d.ts.map +1 -0
- package/generated/manowar/esm/models/operations/approval-decide.js +22 -0
- package/generated/manowar/esm/models/operations/approval-decide.js.map +1 -0
- package/generated/manowar/esm/models/operations/index.d.ts +2 -0
- package/generated/manowar/esm/models/operations/index.d.ts.map +1 -1
- package/generated/manowar/esm/models/operations/index.js +2 -0
- package/generated/manowar/esm/models/operations/index.js.map +1 -1
- package/generated/manowar/esm/models/operations/run-stop.d.ts +44 -0
- package/generated/manowar/esm/models/operations/run-stop.d.ts.map +1 -0
- package/generated/manowar/esm/models/operations/run-stop.js +37 -0
- package/generated/manowar/esm/models/operations/run-stop.js.map +1 -0
- package/generated/manowar/esm/sdk/agents.d.ts +4 -0
- package/generated/manowar/esm/sdk/agents.d.ts.map +1 -1
- package/generated/manowar/esm/sdk/agents.js +8 -0
- package/generated/manowar/esm/sdk/agents.js.map +1 -1
- package/generated/manowar/package.json +2 -2
- package/generated/manowar/src/funcs/agents-approval-decide.ts +181 -0
- package/generated/manowar/src/funcs/agents-run-stop.ts +172 -0
- package/generated/manowar/src/lib/config.ts +4 -4
- package/generated/manowar/src/models/agent-approval-request.ts +61 -0
- package/generated/manowar/src/models/agent-card.ts +127 -0
- package/generated/manowar/src/models/agent-connector-tool.ts +39 -0
- package/generated/manowar/src/models/agent-connector.ts +52 -0
- package/generated/manowar/src/models/agent-stream-request.ts +72 -0
- package/generated/manowar/src/models/index.ts +4 -0
- package/generated/manowar/src/models/operations/approval-decide.ts +46 -0
- package/generated/manowar/src/models/operations/index.ts +2 -0
- package/generated/manowar/src/models/operations/run-stop.ts +95 -0
- package/generated/manowar/src/sdk/agents.ts +24 -0
- package/generated/memory/esm/lib/config.d.ts +3 -3
- package/generated/memory/esm/lib/config.js +3 -3
- package/generated/memory/package.json +1 -1
- package/generated/memory/src/lib/config.ts +3 -3
- package/generated/x402/esm/funcs/payments-settle.d.ts +2 -3
- package/generated/x402/esm/funcs/payments-settle.d.ts.map +1 -1
- package/generated/x402/esm/funcs/payments-settle.js +2 -1
- package/generated/x402/esm/funcs/payments-settle.js.map +1 -1
- package/generated/x402/esm/funcs/x402-chains-list.d.ts +1 -1
- package/generated/x402/esm/funcs/x402-chains-list.d.ts.map +1 -1
- package/generated/x402/esm/funcs/x402-chains-list.js +1 -1
- package/generated/x402/esm/funcs/x402-chains-list.js.map +1 -1
- package/generated/x402/esm/lib/config.d.ts +4 -4
- package/generated/x402/esm/lib/config.js +4 -4
- package/generated/x402/esm/models/facilitator-chain.d.ts +37 -0
- package/generated/x402/esm/models/facilitator-chain.d.ts.map +1 -0
- package/generated/x402/esm/models/facilitator-chain.js +39 -0
- package/generated/x402/esm/models/facilitator-chain.js.map +1 -0
- package/generated/x402/esm/models/facilitator-chains-response.d.ts +12 -0
- package/generated/x402/esm/models/facilitator-chains-response.d.ts.map +1 -0
- package/generated/x402/esm/models/facilitator-chains-response.js +16 -0
- package/generated/x402/esm/models/facilitator-chains-response.js.map +1 -0
- package/generated/x402/esm/models/index.d.ts +5 -2
- package/generated/x402/esm/models/index.d.ts.map +1 -1
- package/generated/x402/esm/models/index.js +5 -2
- package/generated/x402/esm/models/index.js.map +1 -1
- package/generated/x402/esm/models/operations/prepare.d.ts +1 -3
- package/generated/x402/esm/models/operations/prepare.d.ts.map +1 -1
- package/generated/x402/esm/models/operations/prepare.js +1 -1
- package/generated/x402/esm/models/operations/prepare.js.map +1 -1
- package/generated/x402/esm/models/operations/settle.d.ts +25 -2
- package/generated/x402/esm/models/operations/settle.d.ts.map +1 -1
- package/generated/x402/esm/models/operations/settle.js +19 -1
- package/generated/x402/esm/models/operations/settle.js.map +1 -1
- package/generated/x402/esm/models/payment-intent-status.d.ts +14 -0
- package/generated/x402/esm/models/payment-intent-status.d.ts.map +1 -0
- package/generated/x402/esm/models/payment-intent-status.js +15 -0
- package/generated/x402/esm/models/payment-intent-status.js.map +1 -0
- package/generated/x402/esm/models/payment-prepare-response.d.ts +17 -0
- package/generated/x402/esm/models/payment-prepare-response.d.ts.map +1 -0
- package/generated/x402/esm/models/payment-prepare-response.js +17 -0
- package/generated/x402/esm/models/payment-prepare-response.js.map +1 -0
- package/generated/x402/esm/models/payment-requirements.d.ts +1 -0
- package/generated/x402/esm/models/payment-requirements.d.ts.map +1 -1
- package/generated/x402/esm/models/payment-requirements.js +1 -0
- package/generated/x402/esm/models/payment-requirements.js.map +1 -1
- package/generated/x402/esm/models/payment-settle-response.d.ts +36 -0
- package/generated/x402/esm/models/payment-settle-response.d.ts.map +1 -0
- package/generated/x402/esm/models/payment-settle-response.js +25 -0
- package/generated/x402/esm/models/payment-settle-response.js.map +1 -0
- package/generated/x402/esm/models/settle-response.d.ts +3 -0
- package/generated/x402/esm/models/settle-response.d.ts.map +1 -1
- package/generated/x402/esm/models/settle-response.js +1 -0
- package/generated/x402/esm/models/settle-response.js.map +1 -1
- package/generated/x402/esm/sdk/payments.d.ts +1 -3
- package/generated/x402/esm/sdk/payments.d.ts.map +1 -1
- package/generated/x402/esm/sdk/payments.js.map +1 -1
- package/generated/x402/esm/sdk/x402.d.ts +1 -1
- package/generated/x402/esm/sdk/x402.d.ts.map +1 -1
- package/generated/x402/esm/sdk/x402.js.map +1 -1
- package/generated/x402/package.json +2 -2
- package/generated/x402/src/funcs/payments-settle.ts +5 -4
- package/generated/x402/src/funcs/x402-chains-list.ts +4 -4
- package/generated/x402/src/lib/config.ts +4 -4
- package/generated/x402/src/models/facilitator-chain.ts +78 -0
- package/generated/x402/src/models/facilitator-chains-response.ts +37 -0
- package/generated/x402/src/models/index.ts +5 -2
- package/generated/x402/src/models/operations/prepare.ts +2 -2
- package/generated/x402/src/models/operations/settle.ts +57 -6
- package/generated/x402/src/models/payment-intent-status.ts +23 -0
- package/generated/x402/src/models/payment-prepare-response.ts +46 -0
- package/generated/x402/src/models/payment-requirements.ts +1 -0
- package/generated/x402/src/models/payment-settle-response.ts +71 -0
- package/generated/x402/src/models/settle-response.ts +2 -0
- package/generated/x402/src/sdk/payments.ts +1 -1
- package/generated/x402/src/sdk/x402.ts +1 -1
- package/package.json +13 -17
- package/generated/x402/esm/models/facilitator-network.d.ts +0 -27
- package/generated/x402/esm/models/facilitator-network.d.ts.map +0 -1
- package/generated/x402/esm/models/facilitator-network.js +0 -30
- package/generated/x402/esm/models/facilitator-network.js.map +0 -1
- package/generated/x402/esm/models/facilitator-networks-response.d.ts +0 -12
- package/generated/x402/esm/models/facilitator-networks-response.d.ts.map +0 -1
- package/generated/x402/esm/models/facilitator-networks-response.js +0 -16
- package/generated/x402/esm/models/facilitator-networks-response.js.map +0 -1
- package/generated/x402/src/models/facilitator-network.ts +0 -65
- package/generated/x402/src/models/facilitator-networks-response.ts +0 -37
|
@@ -3,34 +3,85 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { smartUnion } from "../../types/smart-union.js";
|
|
6
7
|
import * as models from "../index.js";
|
|
7
8
|
|
|
8
|
-
export type
|
|
9
|
+
export type RequestBody2 = {
|
|
9
10
|
paymentIntentId: string;
|
|
10
11
|
/**
|
|
11
12
|
* Non-negative integer amount in USDC atomic units.
|
|
12
13
|
*/
|
|
13
14
|
finalAmountWei?: string | undefined;
|
|
15
|
+
meter: models.MeteredInput;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type RequestBody1 = {
|
|
19
|
+
paymentIntentId: string;
|
|
20
|
+
/**
|
|
21
|
+
* Non-negative integer amount in USDC atomic units.
|
|
22
|
+
*/
|
|
23
|
+
finalAmountWei: string;
|
|
14
24
|
meter?: models.MeteredInput | undefined;
|
|
15
25
|
};
|
|
16
26
|
|
|
27
|
+
export type SettleRequest = RequestBody1 | RequestBody2;
|
|
28
|
+
|
|
17
29
|
/** @internal */
|
|
18
|
-
export type
|
|
30
|
+
export type RequestBody2$Outbound = {
|
|
19
31
|
paymentIntentId: string;
|
|
20
32
|
finalAmountWei?: string | undefined;
|
|
21
|
-
meter
|
|
33
|
+
meter: models.MeteredInput$Outbound;
|
|
22
34
|
};
|
|
23
35
|
|
|
24
36
|
/** @internal */
|
|
25
|
-
export const
|
|
26
|
-
|
|
27
|
-
|
|
37
|
+
export const RequestBody2$outboundSchema: z.ZodMiniType<
|
|
38
|
+
RequestBody2$Outbound,
|
|
39
|
+
RequestBody2
|
|
28
40
|
> = z.object({
|
|
29
41
|
paymentIntentId: z.string(),
|
|
30
42
|
finalAmountWei: z.optional(z.string()),
|
|
43
|
+
meter: models.MeteredInput$outboundSchema,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export function requestBody2ToJSON(requestBody2: RequestBody2): string {
|
|
47
|
+
return JSON.stringify(RequestBody2$outboundSchema.parse(requestBody2));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export type RequestBody1$Outbound = {
|
|
52
|
+
paymentIntentId: string;
|
|
53
|
+
finalAmountWei: string;
|
|
54
|
+
meter?: models.MeteredInput$Outbound | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const RequestBody1$outboundSchema: z.ZodMiniType<
|
|
59
|
+
RequestBody1$Outbound,
|
|
60
|
+
RequestBody1
|
|
61
|
+
> = z.object({
|
|
62
|
+
paymentIntentId: z.string(),
|
|
63
|
+
finalAmountWei: z.string(),
|
|
31
64
|
meter: z.optional(models.MeteredInput$outboundSchema),
|
|
32
65
|
});
|
|
33
66
|
|
|
67
|
+
export function requestBody1ToJSON(requestBody1: RequestBody1): string {
|
|
68
|
+
return JSON.stringify(RequestBody1$outboundSchema.parse(requestBody1));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export type SettleRequest$Outbound =
|
|
73
|
+
| RequestBody1$Outbound
|
|
74
|
+
| RequestBody2$Outbound;
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
export const SettleRequest$outboundSchema: z.ZodMiniType<
|
|
78
|
+
SettleRequest$Outbound,
|
|
79
|
+
SettleRequest
|
|
80
|
+
> = smartUnion([
|
|
81
|
+
z.lazy(() => RequestBody1$outboundSchema),
|
|
82
|
+
z.lazy(() => RequestBody2$outboundSchema),
|
|
83
|
+
]);
|
|
84
|
+
|
|
34
85
|
export function settleRequestToJSON(settleRequest: SettleRequest): string {
|
|
35
86
|
return JSON.stringify(SettleRequest$outboundSchema.parse(settleRequest));
|
|
36
87
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import * as openEnums from "../types/enums.js";
|
|
7
|
+
import { OpenEnum } from "../types/enums.js";
|
|
8
|
+
|
|
9
|
+
export const PaymentIntentStatus = {
|
|
10
|
+
Authorized: "authorized",
|
|
11
|
+
Queued: "queued",
|
|
12
|
+
Submitted: "submitted",
|
|
13
|
+
Confirmed: "confirmed",
|
|
14
|
+
Aborted: "aborted",
|
|
15
|
+
Failed: "failed",
|
|
16
|
+
} as const;
|
|
17
|
+
export type PaymentIntentStatus = OpenEnum<typeof PaymentIntentStatus>;
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const PaymentIntentStatus$inboundSchema: z.ZodMiniType<
|
|
21
|
+
PaymentIntentStatus,
|
|
22
|
+
unknown
|
|
23
|
+
> = openEnums.inboundSchema(PaymentIntentStatus);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import * as types from "../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
10
|
+
import {
|
|
11
|
+
PaymentIntentStatus,
|
|
12
|
+
PaymentIntentStatus$inboundSchema,
|
|
13
|
+
} from "./payment-intent-status.js";
|
|
14
|
+
|
|
15
|
+
export type PaymentPrepareResponse = {
|
|
16
|
+
paymentIntentId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Non-negative integer amount in USDC atomic units.
|
|
19
|
+
*/
|
|
20
|
+
maxAmountWei: string;
|
|
21
|
+
status: PaymentIntentStatus;
|
|
22
|
+
[additionalProperties: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const PaymentPrepareResponse$inboundSchema: z.ZodMiniType<
|
|
27
|
+
PaymentPrepareResponse,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.catchall(
|
|
30
|
+
z.object({
|
|
31
|
+
paymentIntentId: types.string(),
|
|
32
|
+
maxAmountWei: types.string(),
|
|
33
|
+
status: PaymentIntentStatus$inboundSchema,
|
|
34
|
+
}),
|
|
35
|
+
z.any(),
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export function paymentPrepareResponseFromJSON(
|
|
39
|
+
jsonString: string,
|
|
40
|
+
): SafeParseResult<PaymentPrepareResponse, SDKValidationError> {
|
|
41
|
+
return safeParse(
|
|
42
|
+
jsonString,
|
|
43
|
+
(x) => PaymentPrepareResponse$inboundSchema.parse(JSON.parse(x)),
|
|
44
|
+
`Failed to parse 'PaymentPrepareResponse' from JSON`,
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -13,6 +13,7 @@ import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
|
13
13
|
export const PaymentRequirementsScheme = {
|
|
14
14
|
Exact: "exact",
|
|
15
15
|
Upto: "upto",
|
|
16
|
+
BatchSettlement: "batch-settlement",
|
|
16
17
|
} as const;
|
|
17
18
|
export type PaymentRequirementsScheme = OpenEnum<
|
|
18
19
|
typeof PaymentRequirementsScheme
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import * as types from "../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
10
|
+
import {
|
|
11
|
+
PaymentIntentStatus,
|
|
12
|
+
PaymentIntentStatus$inboundSchema,
|
|
13
|
+
} from "./payment-intent-status.js";
|
|
14
|
+
|
|
15
|
+
export type PaymentSettleResponse = {
|
|
16
|
+
paymentIntentId: string;
|
|
17
|
+
network: string;
|
|
18
|
+
/**
|
|
19
|
+
* Non-negative integer amount in USDC atomic units.
|
|
20
|
+
*/
|
|
21
|
+
maxAmountWei: string;
|
|
22
|
+
/**
|
|
23
|
+
* Non-negative integer amount in USDC atomic units.
|
|
24
|
+
*/
|
|
25
|
+
finalAmountWei: string;
|
|
26
|
+
status: PaymentIntentStatus;
|
|
27
|
+
meterSubject?: string | undefined;
|
|
28
|
+
lineItems?: Array<{ [k: string]: any }> | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Non-negative integer amount in USDC atomic units.
|
|
31
|
+
*/
|
|
32
|
+
providerAmountWei?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Non-negative integer amount in USDC atomic units.
|
|
35
|
+
*/
|
|
36
|
+
platformFeeWei?: string | undefined;
|
|
37
|
+
txHash?: string | undefined;
|
|
38
|
+
confirmedAt?: number | undefined;
|
|
39
|
+
[additionalProperties: string]: unknown;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const PaymentSettleResponse$inboundSchema: z.ZodMiniType<
|
|
44
|
+
PaymentSettleResponse,
|
|
45
|
+
unknown
|
|
46
|
+
> = z.catchall(
|
|
47
|
+
z.object({
|
|
48
|
+
paymentIntentId: types.string(),
|
|
49
|
+
network: types.string(),
|
|
50
|
+
maxAmountWei: types.string(),
|
|
51
|
+
finalAmountWei: types.string(),
|
|
52
|
+
status: PaymentIntentStatus$inboundSchema,
|
|
53
|
+
meterSubject: types.optional(types.string()),
|
|
54
|
+
lineItems: types.optional(z.array(z.record(z.string(), z.any()))),
|
|
55
|
+
providerAmountWei: types.optional(types.string()),
|
|
56
|
+
platformFeeWei: types.optional(types.string()),
|
|
57
|
+
txHash: types.optional(types.string()),
|
|
58
|
+
confirmedAt: types.optional(types.number()),
|
|
59
|
+
}),
|
|
60
|
+
z.any(),
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
export function paymentSettleResponseFromJSON(
|
|
64
|
+
jsonString: string,
|
|
65
|
+
): SafeParseResult<PaymentSettleResponse, SDKValidationError> {
|
|
66
|
+
return safeParse(
|
|
67
|
+
jsonString,
|
|
68
|
+
(x) => PaymentSettleResponse$inboundSchema.parse(JSON.parse(x)),
|
|
69
|
+
`Failed to parse 'PaymentSettleResponse' from JSON`,
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -19,6 +19,7 @@ export type SettleResponse = {
|
|
|
19
19
|
* Non-negative integer amount in USDC atomic units.
|
|
20
20
|
*/
|
|
21
21
|
amount?: string | undefined;
|
|
22
|
+
extra?: { [k: string]: any } | undefined;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
/** @internal */
|
|
@@ -33,6 +34,7 @@ export const SettleResponse$inboundSchema: z.ZodMiniType<
|
|
|
33
34
|
transaction: types.optional(types.string()),
|
|
34
35
|
network: types.optional(types.string()),
|
|
35
36
|
amount: types.optional(types.string()),
|
|
37
|
+
extra: types.optional(z.record(z.string(), z.any())),
|
|
36
38
|
});
|
|
37
39
|
|
|
38
40
|
export function settleResponseFromJSON(
|
|
@@ -28,7 +28,7 @@ export class Payments extends ClientSDK {
|
|
|
28
28
|
async settle(
|
|
29
29
|
request: operations.SettleRequest,
|
|
30
30
|
options?: RequestOptions,
|
|
31
|
-
): Promise<
|
|
31
|
+
): Promise<models.PaymentSettleResponse> {
|
|
32
32
|
return unwrapAsync(paymentsSettle(
|
|
33
33
|
this,
|
|
34
34
|
request,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compose-market/sdk",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.31",
|
|
4
4
|
"description": "Official Compose.Market SDK: Compose Keys, x402 facilitator, multi-provider model catalog, native streaming inference with typed receipts, unified tool-call events, agent + workflow runtime streams, live session events, and wallet-scoped persistence.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compose",
|
|
@@ -185,11 +185,6 @@
|
|
|
185
185
|
"types": "./dist/commands/index.d.ts",
|
|
186
186
|
"import": "./dist/commands/index.js",
|
|
187
187
|
"default": "./dist/commands/index.js"
|
|
188
|
-
},
|
|
189
|
-
"./msm": {
|
|
190
|
-
"types": "./dist/msm/index.d.ts",
|
|
191
|
-
"import": "./dist/msm/index.js",
|
|
192
|
-
"default": "./dist/msm/index.js"
|
|
193
188
|
}
|
|
194
189
|
},
|
|
195
190
|
"main": "./dist/index.js",
|
|
@@ -231,6 +226,7 @@
|
|
|
231
226
|
"scripts": {
|
|
232
227
|
"clean": "rm -rf dist",
|
|
233
228
|
"sync-version": "node scripts/sync-version.mjs",
|
|
229
|
+
"validate-arazzo": "node scripts/validate-arazzo.mjs",
|
|
234
230
|
"speakeasy:watch": "npm run sync-version && cd ../shared && speakeasy run --watch --target all --output console --skip-versioning",
|
|
235
231
|
"build:generated:x402": "rm -rf generated/x402/esm && npm --prefix generated/x402 install --ignore-scripts && npm --prefix generated/x402 run build",
|
|
236
232
|
"build:generated:inference": "rm -rf generated/inference/esm && npm --prefix generated/inference install --ignore-scripts && npm --prefix generated/inference run build",
|
|
@@ -238,8 +234,8 @@
|
|
|
238
234
|
"build:generated:manowar": "rm -rf generated/manowar/esm && npm --prefix generated/manowar install --ignore-scripts && npm --prefix generated/manowar run build",
|
|
239
235
|
"build:generated:channels": "rm -rf generated/channels/esm && npm --prefix generated/channels install --ignore-scripts && npm --prefix generated/channels run build",
|
|
240
236
|
"build:generated": "npm run build:generated:x402 && npm run build:generated:inference && npm run build:generated:memory && npm run build:generated:manowar && npm run build:generated:channels",
|
|
241
|
-
"build": "npm run sync-version && npm run clean && tsc -p tsconfig.json && npm run build:generated",
|
|
242
|
-
"test": "npm run sync-version && node --import tsx --test tests/sdk.unit.test.ts tests/sdk.streaming.test.ts tests/sdk.contract.test.ts tests/sdk.session-events.test.ts tests/sdk.domain-events.test.ts tests/sdk.events.test.ts tests/sdk.runtime-streams.test.ts tests/sdk.blockchain.test.ts",
|
|
237
|
+
"build": "npm run sync-version && npm run validate-arazzo && npm run clean && tsc -p tsconfig.json && npm run build:generated",
|
|
238
|
+
"test": "npm run sync-version && npm run validate-arazzo && node --import tsx --test tests/sdk.unit.test.ts tests/sdk.streaming.test.ts tests/sdk.contract.test.ts tests/sdk.session-events.test.ts tests/sdk.domain-events.test.ts tests/sdk.events.test.ts tests/sdk.runtime-streams.test.ts tests/sdk.blockchain.test.ts",
|
|
243
239
|
"test:build": "npm run build && npm test",
|
|
244
240
|
"obs:eval": "tsx tests/e2e/eval-recall.ts",
|
|
245
241
|
"obs:retention": "tsx tests/e2e/memory-d-validation.ts",
|
|
@@ -247,20 +243,20 @@
|
|
|
247
243
|
"prepublishOnly": "npm run test:build"
|
|
248
244
|
},
|
|
249
245
|
"devDependencies": {
|
|
250
|
-
"@types/node": "^26.
|
|
246
|
+
"@types/node": "^26.4.1",
|
|
251
247
|
"dotenv": "^17.4.2",
|
|
252
|
-
"tsx": "^4.23.
|
|
248
|
+
"tsx": "^4.23.13",
|
|
253
249
|
"typescript": "^7.0.2"
|
|
254
250
|
},
|
|
255
251
|
"dependencies": {
|
|
256
|
-
"@compose-market/core": "^0.2.
|
|
257
|
-
"@solana/kit": "^
|
|
258
|
-
"@x402/core": "^2.
|
|
259
|
-
"@x402/evm": "^2.
|
|
260
|
-
"viem": "^2.
|
|
261
|
-
"zod": "^4.4
|
|
252
|
+
"@compose-market/core": "^0.2.20",
|
|
253
|
+
"@solana/kit": "^8.2.0",
|
|
254
|
+
"@x402/core": "^2.24.0",
|
|
255
|
+
"@x402/evm": "^2.24.0",
|
|
256
|
+
"viem": "^2.56.3",
|
|
257
|
+
"zod": "^4.5.4"
|
|
262
258
|
},
|
|
263
259
|
"publishConfig": {
|
|
264
260
|
"access": "public"
|
|
265
261
|
}
|
|
266
|
-
}
|
|
262
|
+
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4-mini";
|
|
2
|
-
import { OpenEnum } from "../types/enums.js";
|
|
3
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
-
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
5
|
-
export declare const FacilitatorNetworkScheme: {
|
|
6
|
-
readonly Exact: "exact";
|
|
7
|
-
readonly Upto: "upto";
|
|
8
|
-
};
|
|
9
|
-
export type FacilitatorNetworkScheme = OpenEnum<typeof FacilitatorNetworkScheme>;
|
|
10
|
-
export type FacilitatorNetwork = {
|
|
11
|
-
network: string;
|
|
12
|
-
name: string;
|
|
13
|
-
shortName?: string | undefined;
|
|
14
|
-
isTestnet: boolean;
|
|
15
|
-
explorer?: string | undefined;
|
|
16
|
-
usdcAddress: string;
|
|
17
|
-
x402UptoPermit2Proxy?: string | undefined;
|
|
18
|
-
schemes: Array<FacilitatorNetworkScheme>;
|
|
19
|
-
asset: "USDC";
|
|
20
|
-
decimals: 6;
|
|
21
|
-
};
|
|
22
|
-
/** @internal */
|
|
23
|
-
export declare const FacilitatorNetworkScheme$inboundSchema: z.ZodMiniType<FacilitatorNetworkScheme, unknown>;
|
|
24
|
-
/** @internal */
|
|
25
|
-
export declare const FacilitatorNetwork$inboundSchema: z.ZodMiniType<FacilitatorNetwork, unknown>;
|
|
26
|
-
export declare function facilitatorNetworkFromJSON(jsonString: string): SafeParseResult<FacilitatorNetwork, SDKValidationError>;
|
|
27
|
-
//# sourceMappingURL=facilitator-network.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"facilitator-network.d.ts","sourceRoot":"","sources":["../../src/models/facilitator-network.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AACX,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAC7C,OAAO,wBAAwB,CAChC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,OAAO,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,CAAC;CACb,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,WAAW,CAChE,wBAAwB,EACxB,OAAO,CAC4C,CAAC;AAEtD,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,WAAW,CAC1D,kBAAkB,EAClB,OAAO,CAYP,CAAC;AAEH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAMzD"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod/v4-mini";
|
|
5
|
-
import { safeParse } from "../lib/schemas.js";
|
|
6
|
-
import * as openEnums from "../types/enums.js";
|
|
7
|
-
import * as types from "../types/primitives.js";
|
|
8
|
-
export const FacilitatorNetworkScheme = {
|
|
9
|
-
Exact: "exact",
|
|
10
|
-
Upto: "upto",
|
|
11
|
-
};
|
|
12
|
-
/** @internal */
|
|
13
|
-
export const FacilitatorNetworkScheme$inboundSchema = openEnums.inboundSchema(FacilitatorNetworkScheme);
|
|
14
|
-
/** @internal */
|
|
15
|
-
export const FacilitatorNetwork$inboundSchema = z.object({
|
|
16
|
-
network: types.string(),
|
|
17
|
-
name: types.string(),
|
|
18
|
-
shortName: types.optional(types.string()),
|
|
19
|
-
isTestnet: types.boolean(),
|
|
20
|
-
explorer: types.optional(types.string()),
|
|
21
|
-
usdcAddress: types.string(),
|
|
22
|
-
x402UptoPermit2Proxy: types.optional(types.string()),
|
|
23
|
-
schemes: z.array(FacilitatorNetworkScheme$inboundSchema),
|
|
24
|
-
asset: types.literal("USDC"),
|
|
25
|
-
decimals: types.literal(6),
|
|
26
|
-
});
|
|
27
|
-
export function facilitatorNetworkFromJSON(jsonString) {
|
|
28
|
-
return safeParse(jsonString, (x) => FacilitatorNetwork$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FacilitatorNetwork' from JSON`);
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=facilitator-network.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"facilitator-network.js","sourceRoot":"","sources":["../../src/models/facilitator-network.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAG/C,OAAO,KAAK,KAAK,MAAM,wBAAwB,CAAC;AAGhD,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;CACJ,CAAC;AAkBX,gBAAgB;AAChB,MAAM,CAAC,MAAM,sCAAsC,GAG/C,SAAS,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC;AAEtD,gBAAgB;AAChB,MAAM,CAAC,MAAM,gCAAgC,GAGzC,CAAC,CAAC,MAAM,CAAC;IACX,OAAO,EAAE,KAAK,CAAC,MAAM,EAAE;IACvB,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE;IACpB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IACzC,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE;IAC1B,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IACxC,WAAW,EAAE,KAAK,CAAC,MAAM,EAAE;IAC3B,oBAAoB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IACpD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,sCAAsC,CAAC;IACxD,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;CAC3B,CAAC,CAAC;AAEH,MAAM,UAAU,0BAA0B,CACxC,UAAkB,EACuC;IACzD,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC5D,gDAAgD,CACjD,CAAC;AAAA,CACH"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4-mini";
|
|
2
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
4
|
-
import { FacilitatorNetwork } from "./facilitator-network.js";
|
|
5
|
-
export type FacilitatorNetworksResponse = {
|
|
6
|
-
networks: Array<FacilitatorNetwork>;
|
|
7
|
-
defaultNetwork: number;
|
|
8
|
-
};
|
|
9
|
-
/** @internal */
|
|
10
|
-
export declare const FacilitatorNetworksResponse$inboundSchema: z.ZodMiniType<FacilitatorNetworksResponse, unknown>;
|
|
11
|
-
export declare function facilitatorNetworksResponseFromJSON(jsonString: string): SafeParseResult<FacilitatorNetworksResponse, SDKValidationError>;
|
|
12
|
-
//# sourceMappingURL=facilitator-networks-response.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"facilitator-networks-response.d.ts","sourceRoot":"","sources":["../../src/models/facilitator-networks-response.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EACL,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACpC,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,WAAW,CACnE,2BAA2B,EAC3B,OAAO,CAIP,CAAC;AAEH,wBAAgB,mCAAmC,CACjD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,2BAA2B,EAAE,kBAAkB,CAAC,CAMlE"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod/v4-mini";
|
|
5
|
-
import { safeParse } from "../lib/schemas.js";
|
|
6
|
-
import * as types from "../types/primitives.js";
|
|
7
|
-
import { FacilitatorNetwork$inboundSchema, } from "./facilitator-network.js";
|
|
8
|
-
/** @internal */
|
|
9
|
-
export const FacilitatorNetworksResponse$inboundSchema = z.object({
|
|
10
|
-
networks: z.array(FacilitatorNetwork$inboundSchema),
|
|
11
|
-
defaultNetwork: types.number(),
|
|
12
|
-
});
|
|
13
|
-
export function facilitatorNetworksResponseFromJSON(jsonString) {
|
|
14
|
-
return safeParse(jsonString, (x) => FacilitatorNetworksResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FacilitatorNetworksResponse' from JSON`);
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=facilitator-networks-response.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"facilitator-networks-response.js","sourceRoot":"","sources":["../../src/models/facilitator-networks-response.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,KAAK,KAAK,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAEL,gCAAgC,GACjC,MAAM,0BAA0B,CAAC;AAOlC,gBAAgB;AAChB,MAAM,CAAC,MAAM,yCAAyC,GAGlD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,gCAAgC,CAAC;IACnD,cAAc,EAAE,KAAK,CAAC,MAAM,EAAE;CAC/B,CAAC,CAAC;AAEH,MAAM,UAAU,mCAAmC,CACjD,UAAkB,EACgD;IAClE,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,yCAAyC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACrE,yDAAyD,CAC1D,CAAC;AAAA,CACH"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import * as openEnums from "../types/enums.js";
|
|
8
|
-
import { OpenEnum } from "../types/enums.js";
|
|
9
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
-
import * as types from "../types/primitives.js";
|
|
11
|
-
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
12
|
-
|
|
13
|
-
export const FacilitatorNetworkScheme = {
|
|
14
|
-
Exact: "exact",
|
|
15
|
-
Upto: "upto",
|
|
16
|
-
} as const;
|
|
17
|
-
export type FacilitatorNetworkScheme = OpenEnum<
|
|
18
|
-
typeof FacilitatorNetworkScheme
|
|
19
|
-
>;
|
|
20
|
-
|
|
21
|
-
export type FacilitatorNetwork = {
|
|
22
|
-
network: string;
|
|
23
|
-
name: string;
|
|
24
|
-
shortName?: string | undefined;
|
|
25
|
-
isTestnet: boolean;
|
|
26
|
-
explorer?: string | undefined;
|
|
27
|
-
usdcAddress: string;
|
|
28
|
-
x402UptoPermit2Proxy?: string | undefined;
|
|
29
|
-
schemes: Array<FacilitatorNetworkScheme>;
|
|
30
|
-
asset: "USDC";
|
|
31
|
-
decimals: 6;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
/** @internal */
|
|
35
|
-
export const FacilitatorNetworkScheme$inboundSchema: z.ZodMiniType<
|
|
36
|
-
FacilitatorNetworkScheme,
|
|
37
|
-
unknown
|
|
38
|
-
> = openEnums.inboundSchema(FacilitatorNetworkScheme);
|
|
39
|
-
|
|
40
|
-
/** @internal */
|
|
41
|
-
export const FacilitatorNetwork$inboundSchema: z.ZodMiniType<
|
|
42
|
-
FacilitatorNetwork,
|
|
43
|
-
unknown
|
|
44
|
-
> = z.object({
|
|
45
|
-
network: types.string(),
|
|
46
|
-
name: types.string(),
|
|
47
|
-
shortName: types.optional(types.string()),
|
|
48
|
-
isTestnet: types.boolean(),
|
|
49
|
-
explorer: types.optional(types.string()),
|
|
50
|
-
usdcAddress: types.string(),
|
|
51
|
-
x402UptoPermit2Proxy: types.optional(types.string()),
|
|
52
|
-
schemes: z.array(FacilitatorNetworkScheme$inboundSchema),
|
|
53
|
-
asset: types.literal("USDC"),
|
|
54
|
-
decimals: types.literal(6),
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
export function facilitatorNetworkFromJSON(
|
|
58
|
-
jsonString: string,
|
|
59
|
-
): SafeParseResult<FacilitatorNetwork, SDKValidationError> {
|
|
60
|
-
return safeParse(
|
|
61
|
-
jsonString,
|
|
62
|
-
(x) => FacilitatorNetwork$inboundSchema.parse(JSON.parse(x)),
|
|
63
|
-
`Failed to parse 'FacilitatorNetwork' from JSON`,
|
|
64
|
-
);
|
|
65
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
-
import * as types from "../types/primitives.js";
|
|
9
|
-
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
10
|
-
import {
|
|
11
|
-
FacilitatorNetwork,
|
|
12
|
-
FacilitatorNetwork$inboundSchema,
|
|
13
|
-
} from "./facilitator-network.js";
|
|
14
|
-
|
|
15
|
-
export type FacilitatorNetworksResponse = {
|
|
16
|
-
networks: Array<FacilitatorNetwork>;
|
|
17
|
-
defaultNetwork: number;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/** @internal */
|
|
21
|
-
export const FacilitatorNetworksResponse$inboundSchema: z.ZodMiniType<
|
|
22
|
-
FacilitatorNetworksResponse,
|
|
23
|
-
unknown
|
|
24
|
-
> = z.object({
|
|
25
|
-
networks: z.array(FacilitatorNetwork$inboundSchema),
|
|
26
|
-
defaultNetwork: types.number(),
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export function facilitatorNetworksResponseFromJSON(
|
|
30
|
-
jsonString: string,
|
|
31
|
-
): SafeParseResult<FacilitatorNetworksResponse, SDKValidationError> {
|
|
32
|
-
return safeParse(
|
|
33
|
-
jsonString,
|
|
34
|
-
(x) => FacilitatorNetworksResponse$inboundSchema.parse(JSON.parse(x)),
|
|
35
|
-
`Failed to parse 'FacilitatorNetworksResponse' from JSON`,
|
|
36
|
-
);
|
|
37
|
-
}
|