@hightop/sdk 0.1.3 → 0.1.4

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.
@@ -1,4 +1,4 @@
1
- export declare const AGENT_API_CONTRACT_VERSION = "1.5.0";
1
+ export declare const AGENT_API_CONTRACT_VERSION = "1.6.0";
2
2
  export type EthAddress = `0x${string}`;
3
3
  export type AgentErrorDetailsByCode = {
4
4
  idempotency_request_in_progress: {
@@ -103,7 +103,7 @@ export type AgentApiSelfResponse = {
103
103
  export type AgentApiSelfUsageResponse = {
104
104
  ok: true;
105
105
  rate_limits: Array<{
106
- route_class?: 'read' | 'write' | 'webhook_management' | 'simulate';
106
+ route_class?: 'read' | 'write' | 'bulk_write' | 'webhook_management' | 'simulate';
107
107
  window_seconds: number;
108
108
  limit: number;
109
109
  remaining: number;
@@ -119,22 +119,36 @@ export type AgentApiCapabilitiesResponse = {
119
119
  ok: true;
120
120
  api_version: '1.0';
121
121
  agent_api_contract_version: string;
122
+ target_wrapper_version: '7';
122
123
  base_path: '/v1/agent';
123
124
  endpoints: Array<{
124
125
  method: 'GET' | 'POST' | 'PATCH' | 'DELETE';
125
126
  path: string;
126
127
  description: string;
127
- oauth_scope: 'agent:read' | 'agent:simulate' | 'agent:payments:write' | 'agent:conversions:write' | 'agent:withdrawals:write' | 'agent:earn:write' | 'agent:borrow:write' | 'agent:webhooks:manage';
128
- rate_limit_class: 'read' | 'write' | 'webhook_management' | 'simulate';
128
+ oauth_scope: 'agent:read' | 'agent:simulate' | 'agent:payments:write' | 'agent:trusted_destinations:write' | 'agent:conversions:write' | 'agent:withdrawals:write' | 'agent:earn:write' | 'agent:borrow:write' | 'agent:webhooks:manage';
129
+ rate_limit_class: 'read' | 'write' | 'bulk_write' | 'webhook_management' | 'simulate';
129
130
  idempotency_required: boolean;
130
131
  request_schema?: string;
131
132
  response_schema?: string;
132
133
  }>;
133
- webhook_event_types: Array<'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'operation.policy_rejected' | 'webhook.test'>;
134
- emitted_webhook_event_types: Array<'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'operation.policy_rejected' | 'webhook.test'>;
134
+ webhook_event_types: Array<'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'one_off_payment.pay_failed.stale' | 'one_off_payment.pay_failed.replaced' | 'one_off_payment.pay_failed.already_paid' | 'one_off_payment.pay_failed.inactive' | 'one_off_payment.pull_issued' | 'one_off_payment.pull_child_created' | 'one_off_payment.harvest_and_created' | 'one_off_payment.harvest_and_create_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'loot.claimed_all' | 'loot.claimed_revshare' | 'loot.claimed_deposit_rewards' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'trusted_destination.maintenance.executed' | 'trusted_destination.maintenance.failed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.self_removed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'one_off_payment_settings.pending_set' | 'one_off_payment_settings.confirmed' | 'one_off_payment_settings.cancelled' | 'time_lock.pending_set' | 'time_lock.confirmed' | 'time_lock.cancelled' | 'operation.policy_rejected' | 'webhook.test'>;
135
+ emitted_webhook_event_types: Array<'payment.executed' | 'payment.execution_failed' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'agent.webhook_disabled' | 'operation.policy_rejected' | 'webhook.test'>;
135
136
  subscribable_webhook_event_types: Array<'payment.executed' | 'payment.execution_failed' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'agent.webhook_disabled' | 'operation.policy_rejected' | 'webhook.test'>;
136
137
  operation_types: Array<'payment' | 'conversion' | 'earn.deposit' | 'earn.withdraw' | 'earn.move' | 'earn.rewards_claim' | 'debt.borrow' | 'debt.repay' | 'debt.deleverage' | 'collateral.add' | 'collateral.remove' | 'trusted_destination.confirm' | 'trusted_destination.cancel' | 'trusted_destination.remove' | 'withdrawal.bank' | 'withdrawal.crypto' | 'one_off_payment.create'>;
137
138
  operation_statuses: Array<'accepted' | 'policy_rejected' | 'submitted' | 'executed' | 'execution_failed' | 'cancelled'>;
139
+ supported_actions: Array<{
140
+ action: number;
141
+ wrapper_version: '7';
142
+ action_version: 1;
143
+ enabled: boolean;
144
+ supported_by_wrapper: boolean;
145
+ feature_flag: string;
146
+ }>;
147
+ can_claim_loot: {
148
+ value: boolean;
149
+ as_of_block: number | null;
150
+ stale_after_seconds: number;
151
+ };
138
152
  };
139
153
  export type AgentApiAccountResponse = {
140
154
  ok: true;
@@ -247,7 +261,7 @@ export type AgentApiOperationsResponse = {
247
261
  executed_at?: string;
248
262
  failed_at?: string;
249
263
  error?: {
250
- code: 'authentication_failed' | 'agent_disabled' | 'agent_not_yet_active' | 'agent_expired' | 'owner_only_action' | 'identity_gated_action' | 'permission_not_granted' | 'insufficient_scope' | 'asset_not_allowed' | 'recipient_not_allowed' | 'protocol_not_allowed' | 'limit_exceeded' | 'cooldown_active' | 'ltv_too_high' | 'validation_failed' | 'not_found' | 'insufficient_funds' | 'slippage_exceeded' | 'price_stale' | 'quote_expired' | 'quote_already_consumed' | 'timelock_not_elapsed' | 'ltv_target_unreachable' | 'idempotency_key_reuse_mismatch' | 'idempotency_request_in_progress' | 'rule_changed_during_execution' | 'operation_not_cancellable' | 'execution_failed' | 'execution_timeout' | 'batch_step_failed' | 'rate_limited' | 'internal_error';
264
+ code: 'authentication_failed' | 'agent_disabled' | 'agent_not_yet_active' | 'agent_expired' | 'owner_only_action' | 'identity_gated_action' | 'permission_not_granted' | 'insufficient_scope' | 'asset_not_allowed' | 'recipient_not_allowed' | 'protocol_not_allowed' | 'limit_exceeded' | 'cooldown_active' | 'ltv_too_high' | 'validation_failed' | 'agent_api_cutover_in_progress' | 'agent_api_chain_unavailable' | 'signature_expired' | 'signature_invalid_s' | 'not_found' | 'insufficient_funds' | 'slippage_exceeded' | 'price_stale' | 'quote_expired' | 'quote_already_consumed' | 'signature_invalid_nonce' | 'one_off_payment_not_active' | 'one_off_payment_stale' | 'one_off_payment_replaced' | 'one_off_payment_already_paid' | 'cheque_not_found' | 'cheque_replaced' | 'starter_agent_not_removable' | 'pending_one_off_payment_settings_exists' | 'pending_one_off_payment_settings_missing' | 'pending_time_lock_exists' | 'time_delay_not_reached' | 'owner_changed_pending_state' | 'migration_blocked_pending_one_off_payment_settings' | 'migration_blocked_pending_time_lock' | 'loot_not_available' | 'invalid_pull_one_off_payment_flags' | 'operation_feature_disabled' | 'timelock_not_elapsed' | 'ltv_target_unreachable' | 'idempotency_key_reuse_mismatch' | 'idempotency_request_in_progress' | 'rule_changed_during_execution' | 'operation_not_cancellable' | 'execution_failed' | 'execution_timeout' | 'batch_step_failed' | 'operation_not_supported_for_wrapper_version' | 'rate_limited' | 'internal_error';
251
265
  message: string;
252
266
  details?: Record<string, unknown>;
253
267
  remediation?: {
@@ -299,7 +313,7 @@ export type AgentApiOperationResponse = {
299
313
  executed_at?: string;
300
314
  failed_at?: string;
301
315
  error?: {
302
- code: 'authentication_failed' | 'agent_disabled' | 'agent_not_yet_active' | 'agent_expired' | 'owner_only_action' | 'identity_gated_action' | 'permission_not_granted' | 'insufficient_scope' | 'asset_not_allowed' | 'recipient_not_allowed' | 'protocol_not_allowed' | 'limit_exceeded' | 'cooldown_active' | 'ltv_too_high' | 'validation_failed' | 'not_found' | 'insufficient_funds' | 'slippage_exceeded' | 'price_stale' | 'quote_expired' | 'quote_already_consumed' | 'timelock_not_elapsed' | 'ltv_target_unreachable' | 'idempotency_key_reuse_mismatch' | 'idempotency_request_in_progress' | 'rule_changed_during_execution' | 'operation_not_cancellable' | 'execution_failed' | 'execution_timeout' | 'batch_step_failed' | 'rate_limited' | 'internal_error';
316
+ code: 'authentication_failed' | 'agent_disabled' | 'agent_not_yet_active' | 'agent_expired' | 'owner_only_action' | 'identity_gated_action' | 'permission_not_granted' | 'insufficient_scope' | 'asset_not_allowed' | 'recipient_not_allowed' | 'protocol_not_allowed' | 'limit_exceeded' | 'cooldown_active' | 'ltv_too_high' | 'validation_failed' | 'agent_api_cutover_in_progress' | 'agent_api_chain_unavailable' | 'signature_expired' | 'signature_invalid_s' | 'not_found' | 'insufficient_funds' | 'slippage_exceeded' | 'price_stale' | 'quote_expired' | 'quote_already_consumed' | 'signature_invalid_nonce' | 'one_off_payment_not_active' | 'one_off_payment_stale' | 'one_off_payment_replaced' | 'one_off_payment_already_paid' | 'cheque_not_found' | 'cheque_replaced' | 'starter_agent_not_removable' | 'pending_one_off_payment_settings_exists' | 'pending_one_off_payment_settings_missing' | 'pending_time_lock_exists' | 'time_delay_not_reached' | 'owner_changed_pending_state' | 'migration_blocked_pending_one_off_payment_settings' | 'migration_blocked_pending_time_lock' | 'loot_not_available' | 'invalid_pull_one_off_payment_flags' | 'operation_feature_disabled' | 'timelock_not_elapsed' | 'ltv_target_unreachable' | 'idempotency_key_reuse_mismatch' | 'idempotency_request_in_progress' | 'rule_changed_during_execution' | 'operation_not_cancellable' | 'execution_failed' | 'execution_timeout' | 'batch_step_failed' | 'operation_not_supported_for_wrapper_version' | 'rate_limited' | 'internal_error';
303
317
  message: string;
304
318
  details?: Record<string, unknown>;
305
319
  remediation?: {
@@ -393,7 +407,7 @@ export type AgentApiWriteResponse = {
393
407
  allowed: boolean;
394
408
  }>;
395
409
  blocks?: Array<{
396
- code: 'authentication_failed' | 'agent_disabled' | 'agent_not_yet_active' | 'agent_expired' | 'owner_only_action' | 'identity_gated_action' | 'permission_not_granted' | 'insufficient_scope' | 'asset_not_allowed' | 'recipient_not_allowed' | 'protocol_not_allowed' | 'limit_exceeded' | 'cooldown_active' | 'ltv_too_high' | 'validation_failed' | 'not_found' | 'insufficient_funds' | 'slippage_exceeded' | 'price_stale' | 'quote_expired' | 'quote_already_consumed' | 'timelock_not_elapsed' | 'ltv_target_unreachable' | 'idempotency_key_reuse_mismatch' | 'idempotency_request_in_progress' | 'rule_changed_during_execution' | 'operation_not_cancellable' | 'execution_failed' | 'execution_timeout' | 'batch_step_failed' | 'rate_limited' | 'internal_error';
410
+ code: 'authentication_failed' | 'agent_disabled' | 'agent_not_yet_active' | 'agent_expired' | 'owner_only_action' | 'identity_gated_action' | 'permission_not_granted' | 'insufficient_scope' | 'asset_not_allowed' | 'recipient_not_allowed' | 'protocol_not_allowed' | 'limit_exceeded' | 'cooldown_active' | 'ltv_too_high' | 'validation_failed' | 'agent_api_cutover_in_progress' | 'agent_api_chain_unavailable' | 'signature_expired' | 'signature_invalid_s' | 'not_found' | 'insufficient_funds' | 'slippage_exceeded' | 'price_stale' | 'quote_expired' | 'quote_already_consumed' | 'signature_invalid_nonce' | 'one_off_payment_not_active' | 'one_off_payment_stale' | 'one_off_payment_replaced' | 'one_off_payment_already_paid' | 'cheque_not_found' | 'cheque_replaced' | 'starter_agent_not_removable' | 'pending_one_off_payment_settings_exists' | 'pending_one_off_payment_settings_missing' | 'pending_time_lock_exists' | 'time_delay_not_reached' | 'owner_changed_pending_state' | 'migration_blocked_pending_one_off_payment_settings' | 'migration_blocked_pending_time_lock' | 'loot_not_available' | 'invalid_pull_one_off_payment_flags' | 'operation_feature_disabled' | 'timelock_not_elapsed' | 'ltv_target_unreachable' | 'idempotency_key_reuse_mismatch' | 'idempotency_request_in_progress' | 'rule_changed_during_execution' | 'operation_not_cancellable' | 'execution_failed' | 'execution_timeout' | 'batch_step_failed' | 'operation_not_supported_for_wrapper_version' | 'rate_limited' | 'internal_error';
397
411
  message: string;
398
412
  details?: Record<string, unknown>;
399
413
  remediation?: {
@@ -649,6 +663,7 @@ export type AgentApiConversionQuoteResponse = {
649
663
  export type AgentApiConversionExecuteRequest = {
650
664
  quote_id: string;
651
665
  };
666
+ export type AgentApiTrustedDestinationWriteRequest = {};
652
667
  export type AgentApiSimulateRequest = {
653
668
  method: 'POST' | 'PATCH' | 'DELETE';
654
669
  path: string;
@@ -659,7 +674,7 @@ export type AgentApiSimulateResponse = {
659
674
  would_succeed: boolean;
660
675
  execution_path: string[];
661
676
  blocks?: Array<{
662
- code: 'authentication_failed' | 'agent_disabled' | 'agent_not_yet_active' | 'agent_expired' | 'owner_only_action' | 'identity_gated_action' | 'permission_not_granted' | 'insufficient_scope' | 'asset_not_allowed' | 'recipient_not_allowed' | 'protocol_not_allowed' | 'limit_exceeded' | 'cooldown_active' | 'ltv_too_high' | 'validation_failed' | 'not_found' | 'insufficient_funds' | 'slippage_exceeded' | 'price_stale' | 'quote_expired' | 'quote_already_consumed' | 'timelock_not_elapsed' | 'ltv_target_unreachable' | 'idempotency_key_reuse_mismatch' | 'idempotency_request_in_progress' | 'rule_changed_during_execution' | 'operation_not_cancellable' | 'execution_failed' | 'execution_timeout' | 'batch_step_failed' | 'rate_limited' | 'internal_error';
677
+ code: 'authentication_failed' | 'agent_disabled' | 'agent_not_yet_active' | 'agent_expired' | 'owner_only_action' | 'identity_gated_action' | 'permission_not_granted' | 'insufficient_scope' | 'asset_not_allowed' | 'recipient_not_allowed' | 'protocol_not_allowed' | 'limit_exceeded' | 'cooldown_active' | 'ltv_too_high' | 'validation_failed' | 'agent_api_cutover_in_progress' | 'agent_api_chain_unavailable' | 'signature_expired' | 'signature_invalid_s' | 'not_found' | 'insufficient_funds' | 'slippage_exceeded' | 'price_stale' | 'quote_expired' | 'quote_already_consumed' | 'signature_invalid_nonce' | 'one_off_payment_not_active' | 'one_off_payment_stale' | 'one_off_payment_replaced' | 'one_off_payment_already_paid' | 'cheque_not_found' | 'cheque_replaced' | 'starter_agent_not_removable' | 'pending_one_off_payment_settings_exists' | 'pending_one_off_payment_settings_missing' | 'pending_time_lock_exists' | 'time_delay_not_reached' | 'owner_changed_pending_state' | 'migration_blocked_pending_one_off_payment_settings' | 'migration_blocked_pending_time_lock' | 'loot_not_available' | 'invalid_pull_one_off_payment_flags' | 'operation_feature_disabled' | 'timelock_not_elapsed' | 'ltv_target_unreachable' | 'idempotency_key_reuse_mismatch' | 'idempotency_request_in_progress' | 'rule_changed_during_execution' | 'operation_not_cancellable' | 'execution_failed' | 'execution_timeout' | 'batch_step_failed' | 'operation_not_supported_for_wrapper_version' | 'rate_limited' | 'internal_error';
663
678
  message: string;
664
679
  details?: Record<string, unknown>;
665
680
  remediation?: {
@@ -775,7 +790,7 @@ export type AgentApiX402PurchaseResponse = {
775
790
  } | null;
776
791
  recoverable?: boolean;
777
792
  recovery_error?: {
778
- code: 'authentication_failed' | 'agent_disabled' | 'agent_not_yet_active' | 'agent_expired' | 'owner_only_action' | 'identity_gated_action' | 'permission_not_granted' | 'insufficient_scope' | 'asset_not_allowed' | 'recipient_not_allowed' | 'protocol_not_allowed' | 'limit_exceeded' | 'cooldown_active' | 'ltv_too_high' | 'validation_failed' | 'not_found' | 'insufficient_funds' | 'slippage_exceeded' | 'price_stale' | 'quote_expired' | 'quote_already_consumed' | 'timelock_not_elapsed' | 'ltv_target_unreachable' | 'idempotency_key_reuse_mismatch' | 'idempotency_request_in_progress' | 'rule_changed_during_execution' | 'operation_not_cancellable' | 'execution_failed' | 'execution_timeout' | 'batch_step_failed' | 'rate_limited' | 'internal_error';
793
+ code: 'authentication_failed' | 'agent_disabled' | 'agent_not_yet_active' | 'agent_expired' | 'owner_only_action' | 'identity_gated_action' | 'permission_not_granted' | 'insufficient_scope' | 'asset_not_allowed' | 'recipient_not_allowed' | 'protocol_not_allowed' | 'limit_exceeded' | 'cooldown_active' | 'ltv_too_high' | 'validation_failed' | 'agent_api_cutover_in_progress' | 'agent_api_chain_unavailable' | 'signature_expired' | 'signature_invalid_s' | 'not_found' | 'insufficient_funds' | 'slippage_exceeded' | 'price_stale' | 'quote_expired' | 'quote_already_consumed' | 'signature_invalid_nonce' | 'one_off_payment_not_active' | 'one_off_payment_stale' | 'one_off_payment_replaced' | 'one_off_payment_already_paid' | 'cheque_not_found' | 'cheque_replaced' | 'starter_agent_not_removable' | 'pending_one_off_payment_settings_exists' | 'pending_one_off_payment_settings_missing' | 'pending_time_lock_exists' | 'time_delay_not_reached' | 'owner_changed_pending_state' | 'migration_blocked_pending_one_off_payment_settings' | 'migration_blocked_pending_time_lock' | 'loot_not_available' | 'invalid_pull_one_off_payment_flags' | 'operation_feature_disabled' | 'timelock_not_elapsed' | 'ltv_target_unreachable' | 'idempotency_key_reuse_mismatch' | 'idempotency_request_in_progress' | 'rule_changed_during_execution' | 'operation_not_cancellable' | 'execution_failed' | 'execution_timeout' | 'batch_step_failed' | 'operation_not_supported_for_wrapper_version' | 'rate_limited' | 'internal_error';
779
794
  message: string;
780
795
  details?: Record<string, unknown>;
781
796
  remediation?: {
@@ -784,7 +799,7 @@ export type AgentApiX402PurchaseResponse = {
784
799
  };
785
800
  };
786
801
  seller_error?: {
787
- code: 'authentication_failed' | 'agent_disabled' | 'agent_not_yet_active' | 'agent_expired' | 'owner_only_action' | 'identity_gated_action' | 'permission_not_granted' | 'insufficient_scope' | 'asset_not_allowed' | 'recipient_not_allowed' | 'protocol_not_allowed' | 'limit_exceeded' | 'cooldown_active' | 'ltv_too_high' | 'validation_failed' | 'not_found' | 'insufficient_funds' | 'slippage_exceeded' | 'price_stale' | 'quote_expired' | 'quote_already_consumed' | 'timelock_not_elapsed' | 'ltv_target_unreachable' | 'idempotency_key_reuse_mismatch' | 'idempotency_request_in_progress' | 'rule_changed_during_execution' | 'operation_not_cancellable' | 'execution_failed' | 'execution_timeout' | 'batch_step_failed' | 'rate_limited' | 'internal_error';
802
+ code: 'authentication_failed' | 'agent_disabled' | 'agent_not_yet_active' | 'agent_expired' | 'owner_only_action' | 'identity_gated_action' | 'permission_not_granted' | 'insufficient_scope' | 'asset_not_allowed' | 'recipient_not_allowed' | 'protocol_not_allowed' | 'limit_exceeded' | 'cooldown_active' | 'ltv_too_high' | 'validation_failed' | 'agent_api_cutover_in_progress' | 'agent_api_chain_unavailable' | 'signature_expired' | 'signature_invalid_s' | 'not_found' | 'insufficient_funds' | 'slippage_exceeded' | 'price_stale' | 'quote_expired' | 'quote_already_consumed' | 'signature_invalid_nonce' | 'one_off_payment_not_active' | 'one_off_payment_stale' | 'one_off_payment_replaced' | 'one_off_payment_already_paid' | 'cheque_not_found' | 'cheque_replaced' | 'starter_agent_not_removable' | 'pending_one_off_payment_settings_exists' | 'pending_one_off_payment_settings_missing' | 'pending_time_lock_exists' | 'time_delay_not_reached' | 'owner_changed_pending_state' | 'migration_blocked_pending_one_off_payment_settings' | 'migration_blocked_pending_time_lock' | 'loot_not_available' | 'invalid_pull_one_off_payment_flags' | 'operation_feature_disabled' | 'timelock_not_elapsed' | 'ltv_target_unreachable' | 'idempotency_key_reuse_mismatch' | 'idempotency_request_in_progress' | 'rule_changed_during_execution' | 'operation_not_cancellable' | 'execution_failed' | 'execution_timeout' | 'batch_step_failed' | 'operation_not_supported_for_wrapper_version' | 'rate_limited' | 'internal_error';
788
803
  message: string;
789
804
  details?: Record<string, unknown>;
790
805
  remediation?: {
@@ -804,7 +819,7 @@ export type AgentApiWebhookCreateResponse = {
804
819
  id: string;
805
820
  url: string;
806
821
  description: string | null;
807
- event_types: Array<'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'operation.policy_rejected' | 'webhook.test'>;
822
+ event_types: Array<'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'one_off_payment.pay_failed.stale' | 'one_off_payment.pay_failed.replaced' | 'one_off_payment.pay_failed.already_paid' | 'one_off_payment.pay_failed.inactive' | 'one_off_payment.pull_issued' | 'one_off_payment.pull_child_created' | 'one_off_payment.harvest_and_created' | 'one_off_payment.harvest_and_create_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'loot.claimed_all' | 'loot.claimed_revshare' | 'loot.claimed_deposit_rewards' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'trusted_destination.maintenance.executed' | 'trusted_destination.maintenance.failed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.self_removed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'one_off_payment_settings.pending_set' | 'one_off_payment_settings.confirmed' | 'one_off_payment_settings.cancelled' | 'time_lock.pending_set' | 'time_lock.confirmed' | 'time_lock.cancelled' | 'operation.policy_rejected' | 'webhook.test'>;
808
823
  enabled: boolean;
809
824
  disabled_reason: 'owner_disabled' | 'sustained_failures' | 'agent_disabled' | 'security_action' | null;
810
825
  consecutive_failures: number;
@@ -821,7 +836,7 @@ export type AgentApiWebhooksResponse = {
821
836
  id: string;
822
837
  url: string;
823
838
  description: string | null;
824
- event_types: Array<'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'operation.policy_rejected' | 'webhook.test'>;
839
+ event_types: Array<'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'one_off_payment.pay_failed.stale' | 'one_off_payment.pay_failed.replaced' | 'one_off_payment.pay_failed.already_paid' | 'one_off_payment.pay_failed.inactive' | 'one_off_payment.pull_issued' | 'one_off_payment.pull_child_created' | 'one_off_payment.harvest_and_created' | 'one_off_payment.harvest_and_create_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'loot.claimed_all' | 'loot.claimed_revshare' | 'loot.claimed_deposit_rewards' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'trusted_destination.maintenance.executed' | 'trusted_destination.maintenance.failed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.self_removed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'one_off_payment_settings.pending_set' | 'one_off_payment_settings.confirmed' | 'one_off_payment_settings.cancelled' | 'time_lock.pending_set' | 'time_lock.confirmed' | 'time_lock.cancelled' | 'operation.policy_rejected' | 'webhook.test'>;
825
840
  enabled: boolean;
826
841
  disabled_reason: 'owner_disabled' | 'sustained_failures' | 'agent_disabled' | 'security_action' | null;
827
842
  consecutive_failures: number;
@@ -839,7 +854,7 @@ export type AgentApiWebhookResponse = {
839
854
  id: string;
840
855
  url: string;
841
856
  description: string | null;
842
- event_types: Array<'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'operation.policy_rejected' | 'webhook.test'>;
857
+ event_types: Array<'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'one_off_payment.pay_failed.stale' | 'one_off_payment.pay_failed.replaced' | 'one_off_payment.pay_failed.already_paid' | 'one_off_payment.pay_failed.inactive' | 'one_off_payment.pull_issued' | 'one_off_payment.pull_child_created' | 'one_off_payment.harvest_and_created' | 'one_off_payment.harvest_and_create_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'loot.claimed_all' | 'loot.claimed_revshare' | 'loot.claimed_deposit_rewards' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'trusted_destination.maintenance.executed' | 'trusted_destination.maintenance.failed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.self_removed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'one_off_payment_settings.pending_set' | 'one_off_payment_settings.confirmed' | 'one_off_payment_settings.cancelled' | 'time_lock.pending_set' | 'time_lock.confirmed' | 'time_lock.cancelled' | 'operation.policy_rejected' | 'webhook.test'>;
843
858
  enabled: boolean;
844
859
  disabled_reason: 'owner_disabled' | 'sustained_failures' | 'agent_disabled' | 'security_action' | null;
845
860
  consecutive_failures: number;
@@ -862,7 +877,7 @@ export type AgentApiWebhookDeleteResponse = {
862
877
  id: string;
863
878
  url: string;
864
879
  description: string | null;
865
- event_types: Array<'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'operation.policy_rejected' | 'webhook.test'>;
880
+ event_types: Array<'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'one_off_payment.pay_failed.stale' | 'one_off_payment.pay_failed.replaced' | 'one_off_payment.pay_failed.already_paid' | 'one_off_payment.pay_failed.inactive' | 'one_off_payment.pull_issued' | 'one_off_payment.pull_child_created' | 'one_off_payment.harvest_and_created' | 'one_off_payment.harvest_and_create_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'loot.claimed_all' | 'loot.claimed_revshare' | 'loot.claimed_deposit_rewards' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'trusted_destination.maintenance.executed' | 'trusted_destination.maintenance.failed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.self_removed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'one_off_payment_settings.pending_set' | 'one_off_payment_settings.confirmed' | 'one_off_payment_settings.cancelled' | 'time_lock.pending_set' | 'time_lock.confirmed' | 'time_lock.cancelled' | 'operation.policy_rejected' | 'webhook.test'>;
866
881
  enabled: boolean;
867
882
  disabled_reason: 'owner_disabled' | 'sustained_failures' | 'agent_disabled' | 'security_action' | null;
868
883
  consecutive_failures: number;
@@ -879,7 +894,7 @@ export type AgentApiWebhookRotateSecretResponse = {
879
894
  id: string;
880
895
  url: string;
881
896
  description: string | null;
882
- event_types: Array<'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'operation.policy_rejected' | 'webhook.test'>;
897
+ event_types: Array<'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'one_off_payment.pay_failed.stale' | 'one_off_payment.pay_failed.replaced' | 'one_off_payment.pay_failed.already_paid' | 'one_off_payment.pay_failed.inactive' | 'one_off_payment.pull_issued' | 'one_off_payment.pull_child_created' | 'one_off_payment.harvest_and_created' | 'one_off_payment.harvest_and_create_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'loot.claimed_all' | 'loot.claimed_revshare' | 'loot.claimed_deposit_rewards' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'trusted_destination.maintenance.executed' | 'trusted_destination.maintenance.failed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.self_removed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'one_off_payment_settings.pending_set' | 'one_off_payment_settings.confirmed' | 'one_off_payment_settings.cancelled' | 'time_lock.pending_set' | 'time_lock.confirmed' | 'time_lock.cancelled' | 'operation.policy_rejected' | 'webhook.test'>;
883
898
  enabled: boolean;
884
899
  disabled_reason: 'owner_disabled' | 'sustained_failures' | 'agent_disabled' | 'security_action' | null;
885
900
  consecutive_failures: number;
@@ -915,7 +930,7 @@ export type AgentApiWebhookDeliveriesResponse = {
915
930
  terminal_at: string | null;
916
931
  created_at: string;
917
932
  updated_at: string;
918
- event_type: 'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'operation.policy_rejected' | 'webhook.test';
933
+ event_type: 'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'one_off_payment.pay_failed.stale' | 'one_off_payment.pay_failed.replaced' | 'one_off_payment.pay_failed.already_paid' | 'one_off_payment.pay_failed.inactive' | 'one_off_payment.pull_issued' | 'one_off_payment.pull_child_created' | 'one_off_payment.harvest_and_created' | 'one_off_payment.harvest_and_create_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'loot.claimed_all' | 'loot.claimed_revshare' | 'loot.claimed_deposit_rewards' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'trusted_destination.maintenance.executed' | 'trusted_destination.maintenance.failed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.self_removed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'one_off_payment_settings.pending_set' | 'one_off_payment_settings.confirmed' | 'one_off_payment_settings.cancelled' | 'time_lock.pending_set' | 'time_lock.confirmed' | 'time_lock.cancelled' | 'operation.policy_rejected' | 'webhook.test';
919
934
  event_created_at: string;
920
935
  response_body: string | null;
921
936
  }>;
@@ -927,7 +942,7 @@ export type AgentApiWebhookTestResponse = {
927
942
  ok: true;
928
943
  event: {
929
944
  id: string;
930
- type: 'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'operation.policy_rejected' | 'webhook.test';
945
+ type: 'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'one_off_payment.pay_failed.stale' | 'one_off_payment.pay_failed.replaced' | 'one_off_payment.pay_failed.already_paid' | 'one_off_payment.pay_failed.inactive' | 'one_off_payment.pull_issued' | 'one_off_payment.pull_child_created' | 'one_off_payment.harvest_and_created' | 'one_off_payment.harvest_and_create_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'loot.claimed_all' | 'loot.claimed_revshare' | 'loot.claimed_deposit_rewards' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'trusted_destination.maintenance.executed' | 'trusted_destination.maintenance.failed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.self_removed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'one_off_payment_settings.pending_set' | 'one_off_payment_settings.confirmed' | 'one_off_payment_settings.cancelled' | 'time_lock.pending_set' | 'time_lock.confirmed' | 'time_lock.cancelled' | 'operation.policy_rejected' | 'webhook.test';
931
946
  created_at: string;
932
947
  payload: Record<string, unknown>;
933
948
  };
@@ -946,12 +961,12 @@ export type AgentApiWebhookTestResponse = {
946
961
  terminal_at: string | null;
947
962
  created_at: string;
948
963
  updated_at: string;
949
- event_type: 'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'operation.policy_rejected' | 'webhook.test';
964
+ event_type: 'payment.submitted' | 'payment.executed' | 'payment.execution_failed' | 'payment.received' | 'one_off_payment.created' | 'one_off_payment.claimed' | 'one_off_payment.expired' | 'one_off_payment.execution_failed' | 'one_off_payment.pay_failed.stale' | 'one_off_payment.pay_failed.replaced' | 'one_off_payment.pay_failed.already_paid' | 'one_off_payment.pay_failed.inactive' | 'one_off_payment.pull_issued' | 'one_off_payment.pull_child_created' | 'one_off_payment.harvest_and_created' | 'one_off_payment.harvest_and_create_failed' | 'conversion.executed' | 'conversion.execution_failed' | 'earn.deposit.executed' | 'earn.withdraw.executed' | 'earn.move.executed' | 'rewards.claimed' | 'loot.claimed_all' | 'loot.claimed_revshare' | 'loot.claimed_deposit_rewards' | 'debt.borrowed' | 'debt.repaid' | 'debt.deleveraged' | 'collateral.added' | 'collateral.removed' | 'withdrawal.submitted' | 'withdrawal.settled' | 'withdrawal.execution_failed' | 'deposit.received' | 'trusted_destination.confirmed' | 'trusted_destination.cancelled' | 'trusted_destination.removed' | 'trusted_destination.maintenance.executed' | 'trusted_destination.maintenance.failed' | 'recurring_payment.updated' | 'recipient.changed' | 'agent.self_removed' | 'agent.limit_approaching' | 'agent.limit_reached' | 'agent.disabled' | 'agent.expired' | 'agent.expiring_soon' | 'agent.webhook_disabled' | 'one_off_payment_settings.pending_set' | 'one_off_payment_settings.confirmed' | 'one_off_payment_settings.cancelled' | 'time_lock.pending_set' | 'time_lock.confirmed' | 'time_lock.cancelled' | 'operation.policy_rejected' | 'webhook.test';
950
965
  event_created_at: string;
951
966
  response_body: string | null;
952
967
  };
953
968
  };
954
- export type AgentApiHttpMethod = 'GET' | 'POST' | 'PATCH' | 'DELETE';
969
+ export type AgentApiHttpMethod = 'GET' | 'POST' | 'DELETE' | 'PATCH';
955
970
  export type AgentApiRouteClass = 'read' | 'write' | 'simulate' | 'webhook_management';
956
971
  export type AgentApiEndpointMetadata = {
957
972
  readonly key: string;
@@ -1689,6 +1704,51 @@ export declare const agentApiEndpoints: readonly [{
1689
1704
  readonly idempotencyRequired: false;
1690
1705
  readonly routeClass: "read";
1691
1706
  readonly description: "Get one trusted destination visible to the authenticated agent wallet.";
1707
+ }, {
1708
+ readonly key: "DELETE /v1/agent/trusted-destinations/{id}";
1709
+ readonly method: "DELETE";
1710
+ readonly path: "/v1/agent/trusted-destinations/{id}";
1711
+ readonly pathParams: readonly ["id"];
1712
+ readonly queryParams: readonly [];
1713
+ readonly bodyParams: readonly [];
1714
+ readonly requestSchema: "agentApiTrustedDestinationWriteRequest";
1715
+ readonly bodySchema: "agentApiTrustedDestinationWriteRequest";
1716
+ readonly responseSchema: "agentApiWriteResponse";
1717
+ readonly requestType: "AgentApiTrustedDestinationWriteRequest";
1718
+ readonly responseType: "AgentApiWriteResponse";
1719
+ readonly idempotencyRequired: true;
1720
+ readonly routeClass: "write";
1721
+ readonly description: "Remove a trusted destination from the authenticated agent wallet.";
1722
+ }, {
1723
+ readonly key: "POST /v1/agent/trusted-destinations/{id}/confirm";
1724
+ readonly method: "POST";
1725
+ readonly path: "/v1/agent/trusted-destinations/{id}/confirm";
1726
+ readonly pathParams: readonly ["id"];
1727
+ readonly queryParams: readonly [];
1728
+ readonly bodyParams: readonly [];
1729
+ readonly requestSchema: "agentApiTrustedDestinationWriteRequest";
1730
+ readonly bodySchema: "agentApiTrustedDestinationWriteRequest";
1731
+ readonly responseSchema: "agentApiWriteResponse";
1732
+ readonly requestType: "AgentApiTrustedDestinationWriteRequest";
1733
+ readonly responseType: "AgentApiWriteResponse";
1734
+ readonly idempotencyRequired: true;
1735
+ readonly routeClass: "write";
1736
+ readonly description: "Confirm a pending trusted destination for the authenticated agent wallet.";
1737
+ }, {
1738
+ readonly key: "POST /v1/agent/trusted-destinations/{id}/cancel";
1739
+ readonly method: "POST";
1740
+ readonly path: "/v1/agent/trusted-destinations/{id}/cancel";
1741
+ readonly pathParams: readonly ["id"];
1742
+ readonly queryParams: readonly [];
1743
+ readonly bodyParams: readonly [];
1744
+ readonly requestSchema: "agentApiTrustedDestinationWriteRequest";
1745
+ readonly bodySchema: "agentApiTrustedDestinationWriteRequest";
1746
+ readonly responseSchema: "agentApiWriteResponse";
1747
+ readonly requestType: "AgentApiTrustedDestinationWriteRequest";
1748
+ readonly responseType: "AgentApiWriteResponse";
1749
+ readonly idempotencyRequired: true;
1750
+ readonly routeClass: "write";
1751
+ readonly description: "Cancel a pending trusted destination for the authenticated agent wallet.";
1692
1752
  }, {
1693
1753
  readonly key: "GET /v1/agent/recurring-payments";
1694
1754
  readonly method: "GET";
@@ -1970,6 +2030,15 @@ export type AgentApiEndpointRequestMap = {
1970
2030
  readonly 'GET /v1/agent/trusted-destinations/{id}': AgentApiRecipientDetailQuery & {
1971
2031
  id: AgentApiPathParamValue;
1972
2032
  };
2033
+ readonly 'DELETE /v1/agent/trusted-destinations/{id}': AgentApiTrustedDestinationWriteRequest & {
2034
+ id: AgentApiPathParamValue;
2035
+ };
2036
+ readonly 'POST /v1/agent/trusted-destinations/{id}/confirm': AgentApiTrustedDestinationWriteRequest & {
2037
+ id: AgentApiPathParamValue;
2038
+ };
2039
+ readonly 'POST /v1/agent/trusted-destinations/{id}/cancel': AgentApiTrustedDestinationWriteRequest & {
2040
+ id: AgentApiPathParamValue;
2041
+ };
1973
2042
  readonly 'GET /v1/agent/recurring-payments': AgentApiResourceListQuery;
1974
2043
  readonly 'GET /v1/agent/recurring-payments/{id}': AgentApiRecipientDetailQuery & {
1975
2044
  id: AgentApiPathParamValue;
@@ -2048,6 +2117,9 @@ export type AgentApiEndpointResponseMap = {
2048
2117
  readonly 'GET /v1/agent/conversions/{id}': AgentApiOperationResponse;
2049
2118
  readonly 'GET /v1/agent/trusted-destinations': AgentApiRecipientsResponse;
2050
2119
  readonly 'GET /v1/agent/trusted-destinations/{id}': AgentApiRecipientResponse;
2120
+ readonly 'DELETE /v1/agent/trusted-destinations/{id}': AgentApiWriteResponse;
2121
+ readonly 'POST /v1/agent/trusted-destinations/{id}/confirm': AgentApiWriteResponse;
2122
+ readonly 'POST /v1/agent/trusted-destinations/{id}/cancel': AgentApiWriteResponse;
2051
2123
  readonly 'GET /v1/agent/recurring-payments': AgentApiRecipientsResponse;
2052
2124
  readonly 'GET /v1/agent/recurring-payments/{id}': AgentApiRecipientResponse;
2053
2125
  readonly 'POST /v1/agent/simulate': AgentApiSimulateResponse;
@@ -3,7 +3,7 @@
3
3
  // Generated by scripts/generateAgentPackageSdk.ts
4
4
  // ═══════════════════════════════════════════════════════════════════════════
5
5
  /* eslint-disable */
6
- export const AGENT_API_CONTRACT_VERSION = '1.5.0';
6
+ export const AGENT_API_CONTRACT_VERSION = '1.6.0';
7
7
  function isAgentSdkRecord(value) {
8
8
  return typeof value === 'object' && value !== null && !Array.isArray(value);
9
9
  }
@@ -880,6 +880,54 @@ export const agentApiEndpoints = [
880
880
  routeClass: 'read',
881
881
  description: 'Get one trusted destination visible to the authenticated agent wallet.',
882
882
  },
883
+ {
884
+ key: 'DELETE /v1/agent/trusted-destinations/{id}',
885
+ method: 'DELETE',
886
+ path: '/v1/agent/trusted-destinations/{id}',
887
+ pathParams: ['id'],
888
+ queryParams: [],
889
+ bodyParams: [],
890
+ requestSchema: 'agentApiTrustedDestinationWriteRequest',
891
+ bodySchema: 'agentApiTrustedDestinationWriteRequest',
892
+ responseSchema: 'agentApiWriteResponse',
893
+ requestType: 'AgentApiTrustedDestinationWriteRequest',
894
+ responseType: 'AgentApiWriteResponse',
895
+ idempotencyRequired: true,
896
+ routeClass: 'write',
897
+ description: 'Remove a trusted destination from the authenticated agent wallet.',
898
+ },
899
+ {
900
+ key: 'POST /v1/agent/trusted-destinations/{id}/confirm',
901
+ method: 'POST',
902
+ path: '/v1/agent/trusted-destinations/{id}/confirm',
903
+ pathParams: ['id'],
904
+ queryParams: [],
905
+ bodyParams: [],
906
+ requestSchema: 'agentApiTrustedDestinationWriteRequest',
907
+ bodySchema: 'agentApiTrustedDestinationWriteRequest',
908
+ responseSchema: 'agentApiWriteResponse',
909
+ requestType: 'AgentApiTrustedDestinationWriteRequest',
910
+ responseType: 'AgentApiWriteResponse',
911
+ idempotencyRequired: true,
912
+ routeClass: 'write',
913
+ description: 'Confirm a pending trusted destination for the authenticated agent wallet.',
914
+ },
915
+ {
916
+ key: 'POST /v1/agent/trusted-destinations/{id}/cancel',
917
+ method: 'POST',
918
+ path: '/v1/agent/trusted-destinations/{id}/cancel',
919
+ pathParams: ['id'],
920
+ queryParams: [],
921
+ bodyParams: [],
922
+ requestSchema: 'agentApiTrustedDestinationWriteRequest',
923
+ bodySchema: 'agentApiTrustedDestinationWriteRequest',
924
+ responseSchema: 'agentApiWriteResponse',
925
+ requestType: 'AgentApiTrustedDestinationWriteRequest',
926
+ responseType: 'AgentApiWriteResponse',
927
+ idempotencyRequired: true,
928
+ routeClass: 'write',
929
+ description: 'Cancel a pending trusted destination for the authenticated agent wallet.',
930
+ },
883
931
  {
884
932
  key: 'GET /v1/agent/recurring-payments',
885
933
  method: 'GET',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hightop/sdk",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",