@hightop/sdk 0.1.7 → 0.1.9
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.
|
@@ -40,6 +40,10 @@ export type AgentErrorDetailsByCode = {
|
|
|
40
40
|
period: 'manager_period';
|
|
41
41
|
cap_kind: 'max_num_swaps_per_period';
|
|
42
42
|
quote_id: string;
|
|
43
|
+
} | {
|
|
44
|
+
cap_kind: 'per_tx';
|
|
45
|
+
cap_usd: string;
|
|
46
|
+
requested_usd: string;
|
|
43
47
|
};
|
|
44
48
|
ltv_too_high: {
|
|
45
49
|
current_ltv: string;
|
|
@@ -809,7 +813,6 @@ export type AgentApiX402QuoteResponse = {
|
|
|
809
813
|
unsupported_details?: {
|
|
810
814
|
advertised_max_timeout_seconds: number;
|
|
811
815
|
min_supported_seconds: number;
|
|
812
|
-
max_supported_seconds: number;
|
|
813
816
|
};
|
|
814
817
|
};
|
|
815
818
|
export type AgentApiX402PurchaseRequest = {
|
|
@@ -36,7 +36,11 @@ export const agentErrorDetailsValidators = {
|
|
|
36
36
|
typeof value['observed'] === 'number' &&
|
|
37
37
|
['manager_period'].includes(value['period']) &&
|
|
38
38
|
['max_num_swaps_per_period'].includes(value['cap_kind']) &&
|
|
39
|
-
typeof value['quote_id'] === 'string')
|
|
39
|
+
typeof value['quote_id'] === 'string') ||
|
|
40
|
+
(isAgentSdkRecord(value) &&
|
|
41
|
+
['per_tx'].includes(value['cap_kind']) &&
|
|
42
|
+
typeof value['cap_usd'] === 'string' &&
|
|
43
|
+
typeof value['requested_usd'] === 'string'),
|
|
40
44
|
ltv_too_high: (value) => isAgentSdkRecord(value) &&
|
|
41
45
|
typeof value['current_ltv'] === 'string' &&
|
|
42
46
|
typeof value['estimated_ltv_after'] === 'string' &&
|